[
  {
    "path": ".gitignore",
    "content": "node_modules/\npublic/\n.DS_Store\nnpm-debug.log\n"
  },
  {
    "path": ".jshintrc",
    "content": "{\n\t\"curly\": true,\n\t\"eqeqeq\": true,\n\t\"immed\": true,\n\t\"latedef\": true,\n\t\"newcap\": true,\n\t\"noarg\": true,\n\t\"sub\": true,\n\t\"undef\": true,\n\t\"boss\": true,\n\t\"eqnull\": true,\n\t\"browser\": true,\n\t\"globals\": {\n\t\t\"CodeMirror\": true,\n\t\t\"define\": true,\n\t\t\"require\": true,\n\t\t\"_gaq\": true\n\t}\n}\n"
  },
  {
    "path": ".travis.yml",
    "content": "branches:\n  only:\n    - master\nbefore_install:\n  - sudo apt update\n  - sudo apt install software-properties-common\n  - sudo apt-add-repository --yes --update ppa:ansible/ansible\n  - sudo apt install -y ansible\n  # The private SSH key checked into this repository is protected with a\n  # passphrase. The passphrase is stored in the `SSH_PASSPHRASE` environment\n  # variable in the TravisCI environment. Create a utility script to allow SSH\n  # key to be unlocked during the \"script\" lifecyle event (see below) without\n  # prompting for command-line input.\n  - echo 'echo $SSH_PASSPHRASE' > ./dummy-askpass.sh\n  - chmod +x ./dummy-askpass.sh\n  - chmod 0600 ./deploy/id_ed25519-robocoup-jqfundamentals.com\n  # Add the SSH fingerprint of the production system so that SSH connections\n  # are not susceptible to man-in-the-middle attacks.\n  - echo 'jqfundamentals.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBG9H/L3aKp9ZP7Vx+v0xjD2nYeIHWS9K4L1MTlwet8c9Jh8Qngd1Z3mz4esFmK1sE38PsUKoqdCMhoBOGsGxcIk=' >> $HOME/.ssh/known_hosts\nscript:\n  - eval \"$(ssh-agent -s)\"\n  - DISPLAY=1 SSH_ASKPASS=./dummy-askpass.sh ssh-add ./deploy/id_ed25519-robocoup-jqfundamentals.com < /dev/null\n  - ansible-playbook deploy/ansible/deploy.yml --user robocoup --inventory=deploy/ansible/inventory/production\n"
  },
  {
    "path": "Gruntfile.js",
    "content": "/*jshint node:true*/\nmodule.exports = function(grunt) {\n\n  require( \"load-grunt-tasks\" )( grunt );\n\n  grunt.initConfig({\n    watch: {\n      files: '<%= jshint.files %>',\n      tasks: 'default'\n    },\n    jshint: {\n      options: {\n        jshintrc: true\n      },\n      files: ['Gruntfile.js', 'assets/js/**/*.js' ]\n    },\n    requirejs: {\n      compile: {\n        options: {\n          mainConfigFile: \"assets/main.js\",\n          baseUrl: \"assets/\",\n          dir: \"public\"\n        }\n      }\n    },\n    mocha: {\n      index: [ 'test/index.html' ]\n    }\n  });\n\n  grunt.registerTask('default', 'jshint');\n};\n"
  },
  {
    "path": "README.md",
    "content": "### This site was retired on 2023-08-16.\n\n# [jQuery Fundamentals]\n\n> jQuery Fundamentals is designed to get you comfortable working through common problems you'll be called upon to solve using jQuery. To get the most out of this site, you'll want to read the content and try the various interactive examples. Each chapter will cover a concept and give you a chance to try example code related to the concept.\n\n## Install and development\n\nYou first need to have [`git`][git] and [`nodejs`][nodejs] installed in your machine.\n\n- Clone this repository\n- run `npm install` from the repo's root.\n- run `node server` to run the server at http://localhost:4444\n\n## Deploy\n\nWith the rights to deploy to the production server, you also need [Ansible] to be installed on your machine.\n\nAfter that, you can simply run\n\n- `npm run provision` to provision the production machine; or\n- `npm run deploy` to just deploy content changes\n\n[jQuery Fundamentals]: http://jqfundamentals.com/\n[git]: http://www.git-scm.com/\n[nodejs]: http://nodejs.org/\n[Ansible]: http://www.ansible.com/home\n"
  },
  {
    "path": "assets/css/base.css",
    "content": "* { box-sizing: border-box; }\n\n#adzerk_ad {\n  vertical-align: top;\n}\n\n.navbar .brand {\n  margin-left: 0;\n  padding-left: 0;\n}\n\n.navbar-inner {\n  z-index: 13;\n  position: relative;\n}\n\n.row {\n  margin-top: 60px;\n}\n\n.editor {\n  border: 1px solid #eee;\n  margin: 0 0 10px 0;\n}\n\n.CodeMirror pre {\n  line-height: 1.5em;\n  letter-spacing: 1.5;\n}\n\n.editor-buttons {\n  background-color: #f7f7f7;\n  text-align: right;\n  padding: 5px;\n  border-bottom: 1px solid #eee;\n}\n\n.editor-buttons i {\n  margin-left: 5px;\n  cursor: pointer;\n}\n\n.editor-info {\n  margin-top: 20px;\n  padding-top: 10px;\n  border-top: 1px solid #eee;\n  font-weight: bold;\n  text-transform: uppercase;\n  font-size: 80%;\n}\n\n.editor-info .caution {\n  color: red;\n  padding-right: 5px;\n}\n\n.CodeMirror {\n  font-family: Monaco, Menlo,\"Andale Mono\",\"lucida console\",\"Courier New\",monospace !important;\n  font-size: 90%;\n}\n\n.editor .CodeMirror-scroll {\n  height: 250px;\n}\n\n.editor-container {\n  border: 1px solid #eee;\n  margin: 20px 0;\n}\n\n.editor-container .CodeMirror-scroll {\n  height: auto;\n  overflow-y: hidden;\n  overflow-x: auto;\n}\n\n.btn + .btn {\n  margin: 0 10px;\n}\n\n.CodeMirror .cm-s-default span.cm-comment {\n  color: #888;\n}\n\n#main, .sandbox-visible #main, #sandbox, .sandbox-visible #sandbox {\n  -webkit-transition: all 0.2s ease;\n  -moz-transition: all 0.2s ease;\n  transition: all 0.2s ease;\n}\n\n#main {\n  margin-top: 80px;\n}\n\n#sandbox {\n  position: fixed;\n  padding: 20px 0;\n  z-index: 12;\n  margin-top: -400px;\n}\n\n.sandbox-visible #main {\n  margin-top: 460px;\n}\n\n.sandbox-visible #sandbox {\n  margin-top: 20px;\n}\n\n#results, #editor {\n  background-color: #fff;\n}\n\n#sandbox:before {\n  position: absolute;\n  z-index: -1;\n  width: 3000px;\n  height: 365px;\n  background: #eaeaea;\n  left: -500px;\n  top: -20px;\n}\n\nfooter {\n  height: 50px;\n  font-size: 11px;\n  background-repeat: no-repeat;\n  background-size: 25px;\n  background-position: right 0%;\n  background-image: url('../img/bob-bust.png');\n  padding-right: 33px;\n  text-align: right;\n  margin-top: 43px\n}\n\nfooter p {\n  margin-bottom: 5px;\n}\n\n#links {\n  padding: 8px 0;\n}\n\n.centered {\n  text-align: center;\n}\n\n.alert {\n  margin: 20px 0;\n}\n\n.alert a {\n  text-decoration: underline;\n}\n\n.home-page-header {\n  padding-top: 0;\n  margin-top: 0;\n}\n\n.home-page-header h1 {\n  margin-top: 0;\n}\n\n@media (max-width: 979px){\n\n  .navbar-fixed-top, .navbar-fixed-bottom {\n    position: fixed;\n  }\n\n  .navbar .container {\n    width: 724px;\n    padding: 0;\n  }\n\n}\n\n@media (max-width: 979px) and (min-width: 768px) {\n\n  .span4 {\n    width: 287px;\n  }\n\n  .span8 {\n    width: 406px;\n  }\n\n}\n\n@media (max-width: 767px) {\n\n  [class*=\"span\"], .row-fluid [class*=\"span\"] {\n    width: none;\n  }\n\n  .navbar-fixed-top, .navbar-fixed-bottom {\n    margin-left: 0;\n    }\n\n  .navbar .navbar-inner {\n    padding-right: 35px;\n  }\n\n  .navbar .container {\n    width: 100%;\n  }\n\n  #sandbox {\n    width: 100%;\n    padding: 0 20px 0 20px;\n   }\n\n  .sandbox-visible #main {\n    margin-top: 420px;\n  }\n\n  #sandbox .span8 {\n    width: 50%;\n    float: left;\n  }\n\n  #sandbox .span4 {\n    float: left;\n  }\n\n  #sandbox::before {\n    height: 325px;\n  }\n\n}\n\n@media (max-width: 637px) {\n  .navbar .nav {\n    margin: 0;\n  }\n\n  .btn-primary {\n    font-size: 12px;\n    padding: 4px 4px;\n  }\n\n}\n\n@media (max-width: 633px) {\n  #sandbox .span8 {\n    width: 47%;\n    float: left;\n  }\n\n}\n\n@media (max-width: 600px) {\n\n  .btn-primary, #sandbox {\n    display: none;\n  }\n\n  .sandbox-visible #main {\n    margin-top: 80px;\n  }\n\n}\n\n.results-container {\n  height: 100%;\n  width: 100%;\n}\n\n#sandbox .results-container {\n  height: 283px;\n}\n\niframe {\n  width: 100%;\n  height: 100%;\n}\n\n#results .results-container {\n  padding: 10px;\n  border: 1px solid #eee;\n}\n\n.adsbybocoup {\n  font-size: 10px;\n  font-style: italic;\n  padding: 10px 0 0 0;\n}\n\n.advertisements p {\n  display: inline-block;\n  width: 200px;\n  margin: 3px 0 0 10px;\n  line-height: 1.4;\n  font-size: 12px;\n}\n\n.github-ribbon {\n  position: absolute;\n  top: 40px;\n  right: 0;\n  border: 0;\n}\n\n@media (max-width: 420px) {\n  .github-ribbon {\n    display: none;\n  }\n}\n"
  },
  {
    "path": "assets/js/chapter.js",
    "content": "/*! jQuery Fundamentals is Copyright 2012 Bocoup LLC */\n\nrequire([ 'controllers/chapter' ], function(ChapterController) {\n  new ChapterController();\n});"
  },
  {
    "path": "assets/js/controllers/chapter.js",
    "content": "define([\n  'jquery',\n  'widgets/editor',\n  'widgets/example',\n  'widgets/results',\n\n  'bootstrap'\n], function($, Editor, Example, Results) {\n  return function() {\n\n    var cls = 'sandbox-visible';\n\n    var chapter = $('#main').attr('data-chapter');\n    var body = $('body');\n    var editorBtn = $('#editor-btn');\n    var editor, results;\n\n    var editorEnabled = $(window).width() > 600;\n\n    // set up code examples\n    $('#main pre > code').each(function(idx, el) {\n      var example = new Example(el, {\n        editorEnabled : editorEnabled,\n        onExplore : editorEnabled ? function(content) {\n          editor.setValue(content);\n          body.addClass(cls);\n          editorBtn.html('Hide Editor');\n          _gaq.push([ '_trackEvent', 'code', 'explore' ]);\n        } : $.noop\n      });\n    });\n\n    if ( editorEnabled ) {\n\n      editor = new Editor( $('#editor')[0] );\n      results = new Results( $('#results')[0], chapter );\n\n      $('#sandbox').on('scroll', function(e) {\n        e.preventDefault();\n        e.stopPropagation();\n      });\n\n      editor.on('execute', function(code) {\n        results.executeCode(code);\n        _gaq.push([ '_trackEvent', 'code', 'execute' ]);\n      });\n\n      editor.on('reset', function() {\n        results.reset();\n        _gaq.push([ '_trackEvent', 'editor', 'reset' ]);\n      });\n\n      editorBtn.click(function() {\n        body.toggleClass(cls);\n\n        var visible = body.hasClass(cls);\n\n        editorBtn.html( visible ? 'Hide Editor' : 'Show Editor' );\n        _gaq.push([ '_trackEvent', 'editor', visible ? 'show' : 'hide' ]);\n      });\n\n    } else {\n\n      editorBtn.remove();\n\n    }\n\n\n  };\n});"
  },
  {
    "path": "assets/js/sandbox.js",
    "content": "var log = window.log = function(msg) {\n  var p = document.createElement('p');\n  p.innerHTML = msg;\n  document.body.appendChild(p);\n};"
  },
  {
    "path": "assets/js/widgets/_evented.js",
    "content": "define([ 'jquery' ], function($) {\n  return {\n    on : function(evt, fn) {\n      this._listeners = this._listeners || {};\n      this._listeners[evt] = this._listeners[evt] || [];\n      this._listeners[evt].push(fn);\n    },\n\n    trigger : function(evt, data) {\n      if (\n        this._listeners &&\n        this._listeners[evt] &&\n        this._listeners[evt].length\n      ) {\n        $.each(this._listeners[evt], function(idx, fn) {\n          fn(data);\n        });\n      }\n    }\n  };\n});"
  },
  {
    "path": "assets/js/widgets/editor.js",
    "content": "define([\n  'jquery',\n  'widgets/_evented',\n  'vendor/codemirror'\n], function($, _evented, CodeMirror) {\n  var Editor = function(el) {\n    var self = this;\n\n    var destination = $('<div>', {\n      'class' : 'editor'\n    }).appendTo(el)[0];\n\n    var editor = this.editor = new CodeMirror(destination, {\n      value : ' ',\n      mode : 'javascript',\n      lineNumbers : true,\n      theme : 'default',\n      readOnly : false\n    });\n\n    var buttonArea = $('<div>', {\n      'class' : 'editor-buttons'\n    }).prependTo(destination);\n\n    $('<i>', {\n      'class' : 'icon-play',\n      'title' : 'Execute Code'\n    })\n    .appendTo(buttonArea)\n    .click(function() { self.trigger('execute', editor.getValue()); });\n\n    $('<i>', {\n      'class' : 'icon-repeat',\n      'title' : 'Reset to original'\n    })\n    .appendTo(buttonArea)\n    .click(function() { self.trigger('reset'); });\n  };\n\n  Editor.prototype = $.extend({\n    setValue : function(content) {\n      this.editor.setValue(content);\n    },\n\n    getValue : function(content) {\n      return this.editor.getValue(content);\n    }\n  }, _evented);\n\n  return Editor;\n});"
  },
  {
    "path": "assets/js/widgets/example.js",
    "content": "define([\n  'jquery',\n  'widgets/_evented',\n  'vendor/codemirror'\n], function($, _evented, CodeMirror) {\n  var Example = function(el, config) {\n    this.onExplore = config.onExplore || $.noop;\n\n    var code = $(el);\n    var pre = code.parent();\n    var self = this;\n\n    var container = $('<div>', {\n      'class' : 'editor-container'\n    }).insertBefore(pre)[0];\n\n    var content = $.trim(code.text());\n    var editorInfo = content.match(/^```(.+)\\n/);\n\n    if ( editorInfo ) {\n      content = content.replace(/^.+\\n/, '');\n    }\n\n    var mode = /^</.test(content) ?\n                { name : 'xml', htmlMode : true } :\n                'javascript';\n\n    var editor = this.editor = new CodeMirror(container, {\n      value : content,\n      mode : mode,\n      lineNumbers : true,\n      theme : 'default',\n      readOnly : true\n    });\n\n    pre.remove();\n\n    if ( editorInfo ) {\n      $('<div>', {\n        'class' : 'editor-info'\n      })\n      .insertBefore( container )\n      .html( editorInfo[1] );\n    }\n\n    if ( !config.editorEnabled ) {\n      return;\n    }\n\n    if ( mode !== 'javascript' ) {\n      return;\n    }\n\n    var buttonArea = $('<div>', {\n      'class' : 'editor-buttons'\n    }).prependTo(container);\n\n    var exploreButton = $('<i>', {\n      'class' : 'icon-eye-open',\n      'title' : 'Try in editor'\n    }).appendTo(buttonArea);\n\n    exploreButton.click(function() {\n      var content = editor.getValue();\n      self.onExplore( content );\n      self.trigger( 'explore', content );\n    });\n\n  };\n\n  Example.prototype = $.extend({}, _evented);\n\n  return Example;\n});\n"
  },
  {
    "path": "assets/js/widgets/results.js",
    "content": "define([ 'jquery', 'widgets/_evented' ], function($, _evented) {\n  var Results = function(el, src) {\n    this.el = el;\n    this.src = src;\n\n    this._createIframe();\n  };\n\n  Results.prototype = $.extend({\n    _createIframe : function() {\n      var self = this;\n      var el = $(this.el);\n      this.ready = false;\n\n      el.empty();\n      var container = $('<div>', {\n        'class' : 'results-container'\n      }).appendTo(el);\n\n      var iframe = $('<iframe>', {\n        src : this.src,\n        frameBorder : 0\n      }).appendTo(container);\n\n      this.contentWindow = iframe[0].contentWindow;\n\n      this.contentWindow.onload = function() {\n        self._ready.call(self);\n      };\n    },\n\n    _ready : function() {\n      this.ready = true;\n    },\n\n    executeCode : function(code) {\n      if (!this.ready) {\n        setTimeout(this.executeCode, 200);\n        return;\n      }\n\n      (new this.contentWindow.Function(code))();\n    },\n\n    reset : function() {\n      this._createIframe();\n    }\n  }, _evented);\n\n  return Results;\n});"
  },
  {
    "path": "assets/main.js",
    "content": "requirejs.config({\n  baseUrl : '/public/',\n  shim : {\n    'vendor/codemirror' : {\n      deps : [ 'vendor/CodeMirror-2.25/lib/codemirror'],\n      exports : 'CodeMirror'\n    }\n  },\n  paths : {\n    bootstrap : 'vendor/bootstrap/js/bootstrap',\n    jquery : 'vendor/jquery',\n    widgets : 'js/widgets',\n    controllers : 'js/controllers'\n  },\n  dir: '../public'\n});"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/LICENSE",
    "content": "Copyright (C) 2012 by Marijn Haverbeke <marijnh@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\nPlease note that some subdirectories of the CodeMirror distribution\ninclude their own LICENSE files, and are released under different\nlicences.\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/README.md",
    "content": "# CodeMirror 2\n\nCodeMirror 2 is a rewrite of [CodeMirror\n1](http://github.com/marijnh/CodeMirror). The docs live\n[here](http://codemirror.net/doc/manual.html), and the project page is\n[http://codemirror.net/](http://codemirror.net/).\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/demo/activeline.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Active Line Demo</title>\n    <link rel=\"stylesheet\" href=\"../lib/codemirror.css\">\n    <script src=\"../lib/codemirror.js\"></script>\n    <script src=\"../mode/xml/xml.js\"></script>\n    <link rel=\"stylesheet\" href=\"../doc/docs.css\">\n\n    <style type=\"text/css\">\n      .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}\n      .activeline {background: #e8f2ff !important;}\n    </style>\n  </head>\n  <body>\n    <h1>CodeMirror: Active Line Demo</h1>\n\n    <form><textarea id=\"code\" name=\"code\">\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rss xmlns:atom=\"http://www.w3.org/2005/Atom\" version=\"2.0\"\n     xmlns:georss=\"http://www.georss.org/georss\"\n     xmlns:twitter=\"http://api.twitter.com\">\n  <channel>\n    <title>Twitter / codemirror</title>\n    <link>http://twitter.com/codemirror</link>\n    <atom:link type=\"application/rss+xml\"\n               href=\"http://twitter.com/statuses/user_timeline/242283288.rss\" rel=\"self\"/>\n    <description>Twitter updates from CodeMirror / codemirror.</description>\n    <language>en-us</language>\n    <ttl>40</ttl>\n  <item>\n    <title>codemirror: http://cloud-ide.com &#8212; they're springing up like mushrooms. This one\n      uses CodeMirror as its editor.</title>\n    <description>codemirror: http://cloud-ide.com &#8212; they're springing up like mushrooms. This\n      one uses CodeMirror as its editor.</description>\n    <pubDate>Thu, 17 Mar 2011 23:34:47 +0000</pubDate>\n    <guid>http://twitter.com/codemirror/statuses/48527733722058752</guid>\n    <link>http://twitter.com/codemirror/statuses/48527733722058752</link>\n    <twitter:source>web</twitter:source>\n    <twitter:place/>\n  </item>\n  <item>\n    <title>codemirror: Posted a description of the CodeMirror 2 internals at\n      http://codemirror.net/2/internals.html</title>\n    <description>codemirror: Posted a description of the CodeMirror 2 internals at\n      http://codemirror.net/2/internals.html</description>\n    <pubDate>Wed, 02 Mar 2011 12:15:09 +0000</pubDate>\n    <guid>http://twitter.com/codemirror/statuses/42920879788789760</guid>\n    <link>http://twitter.com/codemirror/statuses/42920879788789760</link>\n    <twitter:source>web</twitter:source>\n    <twitter:place/>\n  </item>\n  </channel>\n</rss></textarea></form>\n\n    <script>\nvar editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n  mode: \"application/xml\",\n  lineNumbers: true,\n  lineWrapping: true,\n  onCursorActivity: function() {\n    editor.setLineClass(hlLine, null, null);\n    hlLine = editor.setLineClass(editor.getCursor().line, null, \"activeline\");\n  }\n});\nvar hlLine = editor.setLineClass(0, \"activeline\");\n</script>\n\n    <p>Styling the current cursor line.</p>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/demo/changemode.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Mode-Changing Demo</title>\n    <link rel=\"stylesheet\" href=\"../lib/codemirror.css\">\n    <script src=\"../lib/codemirror.js\"></script>\n    <script src=\"../mode/javascript/javascript.js\"></script>\n    <script src=\"../mode/scheme/scheme.js\"></script>\n    <link rel=\"stylesheet\" href=\"../doc/docs.css\">\n\n    <style type=\"text/css\">\n      .CodeMirror {border: 1px solid black;}\n    </style>\n  </head>\n  <body>\n    <h1>CodeMirror: Mode-Changing demo</h1>\n\n    <form><textarea id=\"code\" name=\"code\">\n;; If there is Scheme code in here, the editor will be in Scheme mode.\n;; If you put in JS instead, it'll switch to JS mode.\n\n(define (double x)\n  (* x x))\n</textarea></form>\n\n<p>On changes to the content of the above editor, a (crude) script\ntries to auto-detect the language used, and switches the editor to\neither JavaScript or Scheme mode based on that.</p>\n\n<script>\n  var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n    mode: \"scheme\",\n    lineNumbers: true,\n    matchBrackets: true,\n    tabMode: \"indent\",\n    onChange: function() {\n      clearTimeout(pending);\n      setTimeout(update, 400);\n    }\n  });\n  var pending;\n  function looksLikeScheme(code) {\n    return !/^\\s*\\(\\s*function\\b/.test(code) && /^\\s*[;\\(]/.test(code);\n  }\n  function update() {\n    editor.setOption(\"mode\", looksLikeScheme(editor.getValue()) ? \"scheme\" : \"javascript\");\n  }\n</script>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/demo/closetag.html",
    "content": "<!doctype html>\r\n<html>\r\n\t<head>\r\n\t\t<title>CodeMirror: Close-Tag Demo</title>\r\n\t\t<link rel=\"stylesheet\" href=\"../lib/codemirror.css\">\r\n\t\t<script src=\"../lib/codemirror.js\"></script>\r\n\t\t<script src=\"../lib/util/closetag.js\"></script>\r\n\t\t<script src=\"../mode/xml/xml.js\"></script>\r\n\t\t<script src=\"../mode/javascript/javascript.js\"></script>\r\n\t\t<script src=\"../mode/css/css.js\"></script>\r\n\t\t<script src=\"../mode/htmlmixed/htmlmixed.js\"></script>\r\n\t\t<link rel=\"stylesheet\" href=\"../doc/docs.css\">\r\n\t\t<style type=\"text/css\">\r\n\t\t\t.CodeMirror {border-top: 1px solid #eee; border-bottom: 1px solid #eee;}\r\n\t\t</style>\r\n\t</head>\r\n\t<body>\r\n\t\r\n\t\t<h1>Close-Tag Demo</h1>\r\n\t\t<ul>\r\n\t\t\t<li>Type an html tag.  When you type '>' or '/', the tag will auto-close/complete.  Block-level tags will indent.</li>\r\n\t\t\t<li>There are options for disabling tag closing or customizing the list of tags to indent.</li>\r\n\t\t\t<li>Works with \"text/html\" (based on htmlmixed.js or xml.js) mode.</li>\r\n\t\t\t<li>View source for key binding details.</li>\r\n\t\t</p>\r\n\r\n\t\t<form><textarea id=\"code\" name=\"code\"></textarea></form>\r\n\r\n\t\t<script type=\"text/javascript\">\r\n\t\tvar editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\r\n\t\t\tmode: 'text/html',\r\n\t\t\t\r\n\t\t\t//closeTagEnabled: false, // Set this option to disable tag closing behavior without having to remove the key bindings.\r\n\t\t\t//closeTagIndent: false, // Pass false or an array of tag names to override the default indentation behavior.\r\n\t\t\t\r\n\t\t\textraKeys: {\r\n\t\t\t\t\"'>'\": function(cm) { cm.closeTag(cm, '>'); },\r\n\t\t\t\t\"'/'\": function(cm) { cm.closeTag(cm, '/'); }\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t// extraKeys is the easier way to go, but if you need native key event processing, this should work too.\r\n\t\t\tonKeyEvent: function(cm, e) {\r\n\t\t\t\tif (e.type == 'keydown') {\r\n\t\t\t\t\tvar c = e.keyCode || e.which;\r\n\t\t\t\t\tif (c == 190 || c == 191) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tcm.closeTag(cm, c == 190 ? '>' : '/');\r\n\t\t\t\t\t\t\te.stop();\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t} catch (e) {\r\n\t\t\t\t\t\t\tif (e != CodeMirror.Pass) throw e;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t},\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t\twordWrap: true\r\n\t\t});\r\n\t\t</script>\r\n\r\n\t</body>\r\n</html>\r\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/demo/complete.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Autocomplete Demo</title>\n    <link rel=\"stylesheet\" href=\"../lib/codemirror.css\">\n    <script src=\"../lib/codemirror.js\"></script>\n    <script src=\"../lib/util/simple-hint.js\"></script>\n    <link rel=\"stylesheet\" href=\"../lib/util/simple-hint.css\">\n    <script src=\"../lib/util/javascript-hint.js\"></script>\n    <script src=\"../mode/javascript/javascript.js\"></script>\n    <link rel=\"stylesheet\" href=\"../doc/docs.css\">\n    <style type=\"text/css\">.CodeMirror {border: 1px solid #eee;} .CodeMirror-scroll { height: 100% }</style>\n  </head>\n  <body>\n    <h1>CodeMirror: Autocomplete demo</h1>\n\n    <form><textarea id=\"code\" name=\"code\">\nfunction getCompletions(token, context) {\n  var found = [], start = token.string;\n  function maybeAdd(str) {\n    if (str.indexOf(start) == 0) found.push(str);\n  }\n  function gatherCompletions(obj) {\n    if (typeof obj == \"string\") forEach(stringProps, maybeAdd);\n    else if (obj instanceof Array) forEach(arrayProps, maybeAdd);\n    else if (obj instanceof Function) forEach(funcProps, maybeAdd);\n    for (var name in obj) maybeAdd(name);\n  }\n\n  if (context) {\n    // If this is a property, see if it belongs to some object we can\n    // find in the current environment.\n    var obj = context.pop(), base;\n    if (obj.className == \"js-variable\")\n      base = window[obj.string];\n    else if (obj.className == \"js-string\")\n      base = \"\";\n    else if (obj.className == \"js-atom\")\n      base = 1;\n    while (base != null && context.length)\n      base = base[context.pop().string];\n    if (base != null) gatherCompletions(base);\n  }\n  else {\n    // If not, just look in the window object and any local scope\n    // (reading into JS mode internals to get at the local variables)\n    for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);\n    gatherCompletions(window);\n    forEach(keywords, maybeAdd);\n  }\n  return found;\n}\n</textarea></form>\n\n<p>Press <strong>ctrl-space</strong> to activate autocompletion. See\nthe code (<a href=\"../lib/util/simple-hint.js\">here</a>\nand <a href=\"../lib/util/javascript-hint.js\">here</a>) to figure out\nhow it works.</p>\n\n    <script>\n      CodeMirror.commands.autocomplete = function(cm) {\n        CodeMirror.simpleHint(cm, CodeMirror.javascriptHint);\n      }\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        extraKeys: {\"Ctrl-Space\": \"autocomplete\"}\n      });\n    </script>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/demo/emacs.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Emacs bindings demo</title>\n    <link rel=\"stylesheet\" href=\"../lib/codemirror.css\">\n    <script src=\"../lib/codemirror.js\"></script>\n    <script src=\"../mode/clike/clike.js\"></script>\n    <script src=\"../keymap/emacs.js\"></script>\n    <link rel=\"stylesheet\" href=\"../doc/docs.css\">\n\n    <style type=\"text/css\">\n      .CodeMirror {border-top: 1px solid #eee; border-bottom: 1px solid #eee;}\n    </style>\n  </head>\n  <body>\n    <h1>CodeMirror: Emacs bindings demo</h1>\n\n    <form><textarea id=\"code\" name=\"code\">\n#include \"syscalls.h\"\n/* getchar:  simple buffered version */\nint getchar(void)\n{\n  static char buf[BUFSIZ];\n  static char *bufp = buf;\n  static int n = 0;\n  if (n == 0) {  /* buffer is empty */\n    n = read(0, buf, sizeof buf);\n    bufp = buf;\n  }\n  return (--n >= 0) ? (unsigned char) *bufp++ : EOF;\n}\n</textarea></form>\n\n<p>The emacs keybindings are enabled by\nincluding <a href=\"../keymap/emacs.js\">keymap/emacs.js</a> and setting\nthe <code>keyMap</code> option to <code>\"emacs\"</code>. Because\nCodeMirror's internal API is quite different from Emacs, they are only\na loose approximation of actual emacs bindings, though.</p>\n\n<p>Also note that a lot of browsers disallow certain keys from being\ncaptured. For example, Chrome blocks both Ctrl-W and Ctrl-N, with the\nresult that idiomatic use of Emacs keys will constantly close your tab\nor open a new window.</p>\n\n    <script>\n      CodeMirror.commands.save = function() {\n        var elt = editor.getWrapperElement();\n        elt.style.background = \"#def\";\n        setTimeout(function() { elt.style.background = \"\"; }, 300);\n      };\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        mode: \"text/x-csrc\",\n        keyMap: \"emacs\"\n      });\n    </script>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/demo/folding.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Code Folding Demo</title>\n    <link rel=\"stylesheet\" href=\"../lib/codemirror.css\">\n    <script src=\"../lib/codemirror.js\"></script>\n    <script src=\"../lib/util/foldcode.js\"></script>\n    <script src=\"../mode/javascript/javascript.js\"></script>\n    <script src=\"../mode/xml/xml.js\"></script>\n    <link rel=\"stylesheet\" href=\"../doc/docs.css\">\n\n    <style type=\"text/css\">\n      .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}\n      .CodeMirror-gutter {min-width: 2.6em; cursor: pointer;}\n    </style>\n  </head>\n  <body>\n    <h1>CodeMirror: Code Folding Demo</h1>\n\n    <p>Demonstration of code folding using the code\n    in <a href=\"../lib/util/foldcode.js\"><code>foldcode.js</code></a>.\n    Press ctrl-q or click on the gutter to fold a block, again\n    to unfold.</p>\n    <form>\n      <div style=\"max-width: 50em; margin-bottom: 1em\">JavaScript:<br><textarea id=\"code\" name=\"code\"></textarea></div>\n      <div style=\"max-width: 50em\">HTML:<br><textarea id=\"code-html\" name=\"code-html\"></textarea></div>\n    </form>\n    <script id=\"script\">\nwindow.onload = function() {\n  var te = document.getElementById(\"code\");\n  var sc = document.getElementById(\"script\");\n  te.value = (sc.textContent || sc.innerText || sc.innerHTML).replace(/^\\s*/, \"\");\n  sc.innerHTML = \"\";\n  var te_html = document.getElementById(\"code-html\");\n  te_html.value = \"<html>\\n  \" + document.documentElement.innerHTML + \"\\n</html>\";\n\n  var foldFunc = CodeMirror.newFoldFunction(CodeMirror.braceRangeFinder);\n  window.editor = CodeMirror.fromTextArea(te, {\n    mode: \"javascript\",\n    lineNumbers: true,\n    lineWrapping: true,\n    onGutterClick: foldFunc,\n    extraKeys: {\"Ctrl-Q\": function(cm){foldFunc(cm, cm.getCursor().line);}}\n  });\n  foldFunc(editor, 9);\n  foldFunc(editor, 20);\n\n  var foldFunc_html = CodeMirror.newFoldFunction(CodeMirror.tagRangeFinder);\n  window.editor_html = CodeMirror.fromTextArea(te_html, {\n    mode: \"text/html\",\n    lineNumbers: true,\n    lineWrapping: true,\n    onGutterClick: foldFunc_html,\n    extraKeys: {\"Ctrl-Q\": function(cm){foldFunc_html(cm, cm.getCursor().line);}}\n  })\n  foldFunc_html(editor_html, 1);\n  foldFunc_html(editor_html, 15);\n};\n</script>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/demo/formatting.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Formatting Demo</title>\n    <link rel=\"stylesheet\" href=\"../lib/codemirror.css\">\n    <script src=\"../lib/codemirror.js\"></script>\n    <script src=\"../lib/util/formatting.js\"></script>\n    <script src=\"../mode/css/css.js\"></script>\n    <script src=\"../mode/xml/xml.js\"></script>\n    <script src=\"../mode/javascript/javascript.js\"></script>\n    <script src=\"../mode/htmlmixed/htmlmixed.js\"></script>\n    <link rel=\"stylesheet\" href=\"../doc/docs.css\">\n\n    <style type=\"text/css\">\n      .CodeMirror {\n        border: 1px solid #eee;\n      }\n      td {\n        padding-right: 20px;\n      }\n    </style>\n  </head>\n  <body>\n    <h1>CodeMirror: Formatting demo</h1>\n\n    <form><textarea id=\"code\" name=\"code\"><script> function (s,e){ for(var i=0; i < 1; i++) test(\"test();a=1\");} </script>\n<script>\nfunction test(c){  for (var i = 0; i < 10; i++){\t          process(\"a.b();c = null;\", 300);}\n}\n</script>\n<table><tr><td>test 1</td></tr><tr><td>test 2</td></tr></table>\n<script> function test() { return 1;} </script>\n<style> .test { font-size: medium; font-family: monospace; }\n</style></textarea></form>\n\n<p>Select a piece of code and click one of the links below to apply automatic formatting to the selected text or comment/uncomment the selected text. Note that the formatting behavior depends on the current block's mode.\n    <table>\n      <tr>\n        <td>\n          <a href=\"javascript:autoFormatSelection()\">\n            Autoformat Selected\n          </a>\n        </td>\n        <td>\n          <a href=\"javascript:commentSelection(true)\">\n            Comment Selected\n          </a>\n        </td>\n        <td>\n          <a href=\"javascript:commentSelection(false)\">\n            Uncomment Selected\n          </a>\n        </td>\n      </tr>\n    </table>\n</p>    \n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        mode: \"htmlmixed\"\n      });\n      CodeMirror.commands[\"selectAll\"](editor);\n      \n      function getSelectedRange() {\n        return { from: editor.getCursor(true), to: editor.getCursor(false) };\n      }\n      \n      function autoFormatSelection() {\n        var range = getSelectedRange();\n        editor.autoFormatRange(range.from, range.to);\n      }\n      \n      function commentSelection(isComment) {\n        var range = getSelectedRange();\n        editor.commentRange(isComment, range.from, range.to);\n      }      \n    </script>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/demo/fullscreen.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Full Screen Editing</title>\n    <link rel=\"stylesheet\" href=\"../lib/codemirror.css\">\n    <script src=\"../lib/codemirror.js\"></script>\n    <link rel=\"stylesheet\" href=\"../theme/night.css\">\n    <script src=\"../mode/xml/xml.js\"></script>\n    <link rel=\"stylesheet\" href=\"../doc/docs.css\">\n\n    <style type=\"text/css\">\n        .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}\n        .CodeMirror-fullscreen {\n            display: block;\n            position: absolute;\n            top: 0;\n            left: 0;\n            width: 100%;\n            height: 100%;\n            z-index: 9999;\n            margin: 0;\n            padding: 0;\n            border: 0px solid #BBBBBB;\n            opacity: 1;\n        }\n    </style>\n  </head>\n  <body>\n    <h1>CodeMirror: Full Screen Editing</h1>\n\n    <form><textarea id=\"code\" name=\"code\" rows=\"5\">\n  <dt id=\"option_indentWithTabs\"><code>indentWithTabs (boolean)</code></dt>\n  <dd>Whether, when indenting, the first N*8 spaces should be\n  replaced by N tabs. Default is false.</dd>\n\n  <dt id=\"option_tabMode\"><code>tabMode (string)</code></dt>\n  <dd>Determines what happens when the user presses the tab key.\n  Must be one of the following:\n    <dl>\n      <dt><code>\"classic\" (the default)</code></dt>\n      <dd>When nothing is selected, insert a tab. Otherwise,\n      behave like the <code>\"shift\"</code> mode. (When shift is\n      held, this behaves like the <code>\"indent\"</code> mode.)</dd>\n      <dt><code>\"shift\"</code></dt>\n      <dd>Indent all selected lines by\n      one <a href=\"#option_indentUnit\"><code>indentUnit</code></a>.\n      If shift was held while pressing tab, un-indent all selected\n      lines one unit.</dd>\n      <dt><code>\"indent\"</code></dt>\n      <dd>Indent the line the 'correctly', based on its syntactic\n      context. Only works if the\n      mode <a href=\"#indent\">supports</a> it.</dd>\n      <dt><code>\"default\"</code></dt>\n      <dd>Do not capture tab presses, let the browser apply its\n      default behaviour (which usually means it skips to the next\n      control).</dd>\n    </dl></dd>\n\n  <dt id=\"option_enterMode\"><code>enterMode (string)</code></dt>\n  <dd>Determines whether and how new lines are indented when the\n  enter key is pressed. The following modes are supported:\n    <dl>\n      <dt><code>\"indent\" (the default)</code></dt>\n      <dd>Use the mode's indentation rules to give the new line\n      the correct indentation.</dd>\n      <dt><code>\"keep\"</code></dt>\n      <dd>Indent the line the same as the previous line.</dd>\n      <dt><code>\"flat\"</code></dt>\n      <dd>Do not indent the new line.</dd>\n    </dl></dd>\n\n  <dt id=\"option_enterMode\"><code>enterMode (string)</code></dt>\n  <dd>Determines whether and how new lines are indented when the\n  enter key is pressed. The following modes are supported:\n    <dl>\n      <dt><code>\"indent\" (the default)</code></dt>\n      <dd>Use the mode's indentation rules to give the new line\n      the correct indentation.</dd>\n      <dt><code>\"keep\"</code></dt>\n      <dd>Indent the line the same as the previous line.</dd>\n      <dt><code>\"flat\"</code></dt>\n      <dd>Do not indent the new line.</dd>\n    </dl></dd>\n\n  <dt id=\"option_enterMode\"><code>enterMode (string)</code></dt>\n  <dd>Determines whether and how new lines are indented when the\n  enter key is pressed. The following modes are supported:\n    <dl>\n      <dt><code>\"indent\" (the default)</code></dt>\n      <dd>Use the mode's indentation rules to give the new line\n      the correct indentation.</dd>\n      <dt><code>\"keep\"</code></dt>\n      <dd>Indent the line the same as the previous line.</dd>\n      <dt><code>\"flat\"</code></dt>\n      <dd>Do not indent the new line.</dd>\n    </dl></dd>\n\n  <dt id=\"option_enterMode\"><code>enterMode (string)</code></dt>\n  <dd>Determines whether and how new lines are indented when the\n  enter key is pressed. The following modes are supported:\n    <dl>\n      <dt><code>\"indent\" (the default)</code></dt>\n      <dd>Use the mode's indentation rules to give the new line\n      the correct indentation.</dd>\n      <dt><code>\"keep\"</code></dt>\n      <dd>Indent the line the same as the previous line.</dd>\n      <dt><code>\"flat\"</code></dt>\n      <dd>Do not indent the new line.</dd>\n    </dl></dd>\n\n</textarea></form>\n <script>\n    var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        theme: \"night\",\n        extraKeys: {\n            \"F11\": function() {\n              var scroller = editor.getScrollerElement();\n              if (scroller.className.search(/\\bCodeMirror-fullscreen\\b/) === -1) {\n                scroller.className += \" CodeMirror-fullscreen\";\n                scroller.style.height = \"100%\";\n                scroller.style.width = \"100%\";\n                editor.refresh();\n              } else {\n                scroller.className = scroller.className.replace(\" CodeMirror-fullscreen\", \"\");\n                scroller.style.height = '';\n                scroller.style.width = '';\n                editor.refresh();\n              }\n            },\n            \"Esc\": function() {\n              var scroller = editor.getScrollerElement();\n              if (scroller.className.search(/\\bCodeMirror-fullscreen\\b/) !== -1) {\n                scroller.className = scroller.className.replace(\" CodeMirror-fullscreen\", \"\");\n                scroller.style.height = '';\n                scroller.style.width = '';\n                editor.refresh();\n              }\n            }\n        }\n    });\n\n</script>\n\n    <p>Press <strong>F11</strong> when cursor is in the editor to toggle full screen editing. <strong>Esc</strong> can also be used to <i>exit</i> full screen editing.</p>\n\n    <p><strong>Note:</strong> Does not currently work correctly in IE\n    6 and 7, where setting the height of something\n    to <code>100%</code> doesn't make it full screen.</p>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/demo/loadmode.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Lazy Mode Loading Demo</title>\n    <link rel=\"stylesheet\" href=\"../lib/codemirror.css\">\n    <script src=\"../lib/codemirror.js\"></script>\n    <script src=\"../lib/util/loadmode.js\"></script>\n    <link rel=\"stylesheet\" href=\"../doc/docs.css\">\n\n    <style type=\"text/css\">\n      .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}\n    </style>\n  </head>\n  <body>\n    <h1>CodeMirror: Lazy Mode Loading</h1>\n\n    <form><textarea id=\"code\" name=\"code\">This is the editor.\n// It starts out in plain text mode,\n#  use the control below to load and apply a mode\n  \"you'll see the highlighting of\" this text /*change*/.\n</textarea></form>\n<p><input type=text value=javascript id=mode> <button type=button onclick=\"change()\">change mode</button></p>\n\n    <script>\nCodeMirror.modeURL = \"../mode/%N/%N.js\";\nvar editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n  lineNumbers: true\n});\nvar modeInput = document.getElementById(\"mode\");\nCodeMirror.connect(modeInput, \"keypress\", function(e) {\n  if (e.keyCode == 13) change();\n});\nfunction change() {\n   editor.setOption(\"mode\", modeInput.value);\n   CodeMirror.autoLoadMode(editor, modeInput.value);\n}\n</script>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/demo/marker.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Breakpoint Demo</title>\n    <link rel=\"stylesheet\" href=\"../lib/codemirror.css\">\n    <script src=\"../lib/codemirror.js\"></script>\n    <script src=\"../mode/javascript/javascript.js\"></script>\n    <link rel=\"stylesheet\" href=\"../doc/docs.css\">\n\n    <style type=\"text/css\">\n      .CodeMirror-gutter {\n        width: 3em;\n        background: white;\n      }\n      .CodeMirror {\n        border: 1px solid #aaa;\n      }\n    </style>\n  </head>\n  <body>\n    <h1>CodeMirror: Breakpoint demo</h1>\n\n    <form><textarea id=\"code\" name=\"code\">\nCodeMirror.fromTextArea(document.getElementById(\"code\"), {\n  lineNumbers: true,\n  onGutterClick: function(cm, n) {\n    var info = cm.lineInfo(n);\n    if (info.markerText)\n      cm.clearMarker(n);\n    else\n      cm.setMarker(n, \"<span style=\\\"color: #900\\\">●</span> %N%\");\n  }\n});\n</textarea></form>\n\n<p>Click the line-number gutter to add or remove 'breakpoints'.</p>\n\n    <script>\n      CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        onGutterClick: function(cm, n) {\n          var info = cm.lineInfo(n);\n          if (info.markerText)\n            cm.clearMarker(n);\n          else\n            cm.setMarker(n, \"<span style=\\\"color: #900\\\">●</span> %N%\");\n        }\n      });\n    </script>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/demo/matchhighlighter.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Match Highlighter Demo</title>\n    <link rel=\"stylesheet\" href=\"../lib/codemirror.css\">\n    <script src=\"../lib/codemirror.js\"></script>\n    <script src=\"../lib/util/searchcursor.js\"></script>\n    <script src=\"../lib/util/match-highlighter.js\"></script>\n    <link rel=\"stylesheet\" href=\"../doc/docs.css\">\n\n    <style type=\"text/css\">\n      .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}\n\t  \n      span.CodeMirror-matchhighlight { background: #e9e9e9 }\n      .CodeMirror-focused span.CodeMirror-matchhighlight { background: #e7e4ff; !important }\n    </style>\n  </head>\n  <body>\n    <h1>CodeMirror: Match Highlighter Demo</h1>\n\n    <form><textarea id=\"code\" name=\"code\">Select this text: hardToSpotVar\n\tAnd everywhere else in your code where hardToSpotVar appears will automatically illuminate.\nGive it a try!  No more hardToSpotVars.</textarea></form>\n\n    <script>\nvar editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n  lineNumbers : true,\n  onCursorActivity: function() {\n    editor.matchHighlight(\"CodeMirror-matchhighlight\");\n  }\n});\n</script>\n\n    <p>Highlight matches of selected text on select</p>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/demo/mustache.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Overlay Parser Demo</title>\n    <link rel=\"stylesheet\" href=\"../lib/codemirror.css\">\n    <script src=\"../lib/codemirror.js\"></script>\n    <script src=\"../lib/util/overlay.js\"></script>\n    <script src=\"../mode/xml/xml.js\"></script>\n    <link rel=\"stylesheet\" href=\"../doc/docs.css\">\n\n    <style type=\"text/css\">\n      .CodeMirror {border: 1px solid black;}\n      .cm-mustache {color: #0ca;}\n    </style>\n  </head>\n  <body>\n    <h1>CodeMirror: Overlay Parser Demo</h1>\n\n    <form><textarea id=\"code\" name=\"code\">\n<html>\n  <body>\n    <h1>{{title}}</h1>\n    <p>These are links to {{things}}:</p>\n    <ul>{{#links}}\n      <li><a href=\"{{url}}\">{{text}}</a></li>\n    {{/links}}</ul>\n  </body>\n</html>\n</textarea></form>\n\n    <script>\nCodeMirror.defineMode(\"mustache\", function(config, parserConfig) {\n  var mustacheOverlay = {\n    token: function(stream, state) {\n      var ch;\n      if (stream.match(\"{{\")) {\n        while ((ch = stream.next()) != null)\n          if (ch == \"}\" && stream.next() == \"}\") break;\n        return \"mustache\";\n      }\n      while (stream.next() != null && !stream.match(\"{{\", false)) {}\n      return null;\n    }\n  };\n  return CodeMirror.overlayParser(CodeMirror.getMode(config, parserConfig.backdrop || \"text/html\"), mustacheOverlay);\n});\nvar editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {mode: \"mustache\"});\n</script>\n\n    <p>Demonstration of a mode that parses HTML, highlighting\n    the <a href=\"http://mustache.github.com/\">Mustache</a> templating\n    directives inside of it by using the code\n    in <a href=\"../lib/util/overlay.js\"><code>overlay.js</code></a>. View\n    source to see the 15 lines of code needed to accomplish this.</p>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/demo/preview.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: HTML5 preview</title>\n    <meta charset=utf-8>\n    <script src=../lib/codemirror.js></script>\n    <script src=../mode/xml/xml.js></script>\n    <script src=../mode/javascript/javascript.js></script>\n    <script src=../mode/css/css.js></script>\n    <script src=../mode/htmlmixed/htmlmixed.js></script>\n    <link rel=stylesheet href=../lib/codemirror.css>\n    <link rel=stylesheet href=../doc/docs.css>\n    <style type=text/css>\n      .CodeMirror {\n        float: left;\n        width: 50%;\n        border: 1px solid black;\n      }\n      iframe {\n        width: 49%;\n        float: left;\n        height: 300px;\n        border: 1px solid black;\n        border-left: 0px;\n      }\n    </style>\n  </head>\n  <body>\n    <h1>CodeMirror: HTML5 preview</h1>\n    <textarea id=code name=code>\n<!doctype html>\n<html>\n  <head>\n    <meta charset=utf-8>\n    <title>HTML5 canvas demo</title>\n    <style>p {font-family: monospace;}</style>\n  </head>\n  <body>\n    <p>Canvas pane goes here:</p>\n    <canvas id=pane width=300 height=200></canvas>\n    <script>\n      var canvas = document.getElementById('pane');\n      var context = canvas.getContext('2d');\n\n      context.fillStyle = 'rgb(250,0,0)';\n      context.fillRect(10, 10, 55, 50);\n\n      context.fillStyle = 'rgba(0, 0, 250, 0.5)';\n      context.fillRect(30, 30, 55, 50);\n    </script>\n  </body>\n</html></textarea>\n    <iframe id=preview></iframe>\n    <script>\n      var delay;\n      // Initialize CodeMirror editor with a nice html5 canvas demo.\n      var editor = CodeMirror.fromTextArea(document.getElementById('code'), {\n        mode: 'text/html',\n        tabMode: 'indent',\n        onChange: function() {\n          clearTimeout(delay);\n          delay = setTimeout(updatePreview, 300);\n        }\n      });\n      \n      function updatePreview() {\n        var previewFrame = document.getElementById('preview');\n        var preview =  previewFrame.contentDocument ||  previewFrame.contentWindow.document;\n        preview.open();\n        preview.write(editor.getValue());\n        preview.close();\n      }\n      setTimeout(updatePreview, 300);\n    </script>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/demo/resize.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Autoresize Demo</title>\n    <link rel=\"stylesheet\" href=\"../lib/codemirror.css\">\n    <script src=\"../lib/codemirror.js\"></script>\n    <script src=\"../mode/css/css.js\"></script>\n    <link rel=\"stylesheet\" href=\"../doc/docs.css\">\n\n    <style type=\"text/css\">\n      .CodeMirror {\n        border: 1px solid #eee;\n      }\n      .CodeMirror-scroll {\n        height: auto;\n        overflow-y: hidden;\n        overflow-x: auto;\n        width: 100%;\n      }\n    </style>\n  </head>\n  <body>\n    <h1>CodeMirror: Autoresize demo</h1>\n\n    <form><textarea id=\"code\" name=\"code\">\n.CodeMirror-scroll {\n  height: auto;\n  overflow-y: hidden;\n  overflow-x: auto;\n  width: 100%\n}</textarea></form>\n\n<p>By setting a few CSS properties, CodeMirror can be made to\nautomatically resize to fit its content.</p>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true\n      });\n    </script>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/demo/runmode.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Mode Runner Demo</title>\n    <link rel=\"stylesheet\" href=\"../lib/codemirror.css\">\n    <script src=\"../lib/codemirror.js\"></script>\n    <script src=\"../lib/util/runmode.js\"></script>\n    <script src=\"../mode/xml/xml.js\"></script>\n    <link rel=\"stylesheet\" href=\"../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: Mode Runner Demo</h1>\n\n    <textarea id=\"code\" style=\"width: 90%; height: 7em; border: 1px solid black; padding: .2em .4em;\">\n<foobar>\n  <blah>Enter your xml here and press the button below to display\n    it as highlighted by the CodeMirror XML mode</blah>\n  <tag2 foo=\"2\" bar=\"&amp;quot;bar&amp;quot;\"/>\n</foobar></textarea><br>\n    <button onclick=\"doHighlight();\">Highlight!</button>\n    <pre id=\"output\" class=\"cm-s-default\"></pre>\n\n    <script>\nfunction doHighlight() {\n  CodeMirror.runMode(document.getElementById(\"code\").value, \"application/xml\",\n                     document.getElementById(\"output\"));\n}\n</script>\n\n    <p>Running a CodeMirror mode outside of the editor.\n    The <code>CodeMirror.runMode</code> function, defined\n    in <code><a href=\"../lib/util/runmode.js\">lib/runmode.js</a></code> takes the following arguments:</p>\n\n    <dl>\n      <dt><code>text (string)</code></dt>\n      <dd>The document to run through the highlighter.</dd>\n      <dt><code>mode (<a href=\"../doc/manual.html#option_mode\">mode spec</a>)</code></dt>\n      <dd>The mode to use (must be loaded as normal).</dd>\n      <dt><code>output (function or DOM node)</code></dt>\n      <dd>If this is a function, it will be called for each token with\n      two arguments, the token's text and the token's style class (may\n      be <code>null</code> for unstyled tokens). If it is a DOM node,\n      the tokens will be converted to <code>span</code> elements as in\n      an editor, and inserted into the node\n      (through <code>innerHTML</code>).</dd>\n    </dl>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/demo/search.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Search/Replace Demo</title>\n    <link rel=\"stylesheet\" href=\"../lib/codemirror.css\">\n    <script src=\"../lib/codemirror.js\"></script>\n    <script src=\"../mode/xml/xml.js\"></script>\n    <script src=\"../lib/util/dialog.js\"></script>\n    <link rel=\"stylesheet\" href=\"../lib/util/dialog.css\">\n    <script src=\"../lib/util/searchcursor.js\"></script>\n    <script src=\"../lib/util/search.js\"></script>\n    <link rel=\"stylesheet\" href=\"../doc/docs.css\">\n\n    <style type=\"text/css\">\n      .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}\n      dt {font-family: monospace; color: #666;}\n    </style>\n  </head>\n  <body>\n    <h1>CodeMirror: Search/Replace Demo</h1>\n\n    <form><textarea id=\"code\" name=\"code\">\n  <dt id=\"option_indentWithTabs\"><code>indentWithTabs (boolean)</code></dt>\n  <dd>Whether, when indenting, the first N*8 spaces should be\n  replaced by N tabs. Default is false.</dd>\n\n  <dt id=\"option_tabMode\"><code>tabMode (string)</code></dt>\n  <dd>Determines what happens when the user presses the tab key.\n  Must be one of the following:\n    <dl>\n      <dt><code>\"classic\" (the default)</code></dt>\n      <dd>When nothing is selected, insert a tab. Otherwise,\n      behave like the <code>\"shift\"</code> mode. (When shift is\n      held, this behaves like the <code>\"indent\"</code> mode.)</dd>\n      <dt><code>\"shift\"</code></dt>\n      <dd>Indent all selected lines by\n      one <a href=\"#option_indentUnit\"><code>indentUnit</code></a>.\n      If shift was held while pressing tab, un-indent all selected\n      lines one unit.</dd>\n      <dt><code>\"indent\"</code></dt>\n      <dd>Indent the line the 'correctly', based on its syntactic\n      context. Only works if the\n      mode <a href=\"#indent\">supports</a> it.</dd>\n      <dt><code>\"default\"</code></dt>\n      <dd>Do not capture tab presses, let the browser apply its\n      default behaviour (which usually means it skips to the next\n      control).</dd>\n    </dl></dd>\n\n  <dt id=\"option_enterMode\"><code>enterMode (string)</code></dt>\n  <dd>Determines whether and how new lines are indented when the\n  enter key is pressed. The following modes are supported:\n    <dl>\n      <dt><code>\"indent\" (the default)</code></dt>\n      <dd>Use the mode's indentation rules to give the new line\n      the correct indentation.</dd>\n      <dt><code>\"keep\"</code></dt>\n      <dd>Indent the line the same as the previous line.</dd>\n      <dt><code>\"flat\"</code></dt>\n      <dd>Do not indent the new line.</dd>\n    </dl></dd>\n</textarea></form>\n\n    <script>\nvar editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {mode: \"text/html\", lineNumbers: true});\n</script>\n\n    <p>Demonstration of primitive search/replace functionality. The\n    keybindings (which can be overridden by custom keymaps) are:</p>\n    <dl>\n      <dt>Ctrl-F / Cmd-F</dt><dd>Start searching</dd>\n      <dt>Ctrl-G / Cmd-G</dt><dd>Find next</dd>\n      <dt>Shift-Ctrl-G / Shift-Cmd-G</dt><dd>Find previous</dd>\n      <dt>Shift-Ctrl-F / Cmd-Option-F</dt><dd>Replace</dd>\n      <dt>Shift-Ctrl-R / Shift-Cmd-Option-F</dt><dd>Replace all</dd>\n    </dl>\n    <p>Searching is enabled by\n    including <a href=\"../lib/util/search.js\">lib/util/search.js</a>.\n    For good-looking input dialogs, you also want to include\n    <a href=\"../lib/util/dialog.js\">lib/util/dialog.js</a>\n    and <a href=\"../lib/util/dialog.css\">lib/util/dialog.css</a>.</p>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/demo/theme.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Theme Demo</title>\n    <link rel=\"stylesheet\" href=\"../lib/codemirror.css\">\n    <script src=\"../lib/codemirror.js\"></script>\n    <link rel=\"stylesheet\" href=\"../theme/neat.css\">\n    <link rel=\"stylesheet\" href=\"../theme/elegant.css\">\n    <link rel=\"stylesheet\" href=\"../theme/erlang-dark.css\">\n    <link rel=\"stylesheet\" href=\"../theme/night.css\">\n    <link rel=\"stylesheet\" href=\"../theme/monokai.css\">\n    <link rel=\"stylesheet\" href=\"../theme/cobalt.css\">\n    <link rel=\"stylesheet\" href=\"../theme/eclipse.css\">\n    <link rel=\"stylesheet\" href=\"../theme/rubyblue.css\">\n    <link rel=\"stylesheet\" href=\"../theme/lesser-dark.css\">\n    <link rel=\"stylesheet\" href=\"../theme/xq-dark.css\">\n    <link rel=\"stylesheet\" href=\"../theme/ambiance.css\">\n    <link rel=\"stylesheet\" href=\"../theme/blackboard.css\">\n    <script src=\"../mode/javascript/javascript.js\"></script>\n    <link rel=\"stylesheet\" href=\"../doc/docs.css\">\n\n    <style type=\"text/css\">\n      .CodeMirror {border: 1px solid black;}\n    </style>\n  </head>\n  <body>\n    <h1>CodeMirror: Theme demo</h1>\n\n    <form><textarea id=\"code\" name=\"code\">\nfunction findSequence(goal) {\n  function find(start, history) {\n    if (start == goal)\n      return history;\n    else if (start > goal)\n      return null;\n    else\n      return find(start + 5, \"(\" + history + \" + 5)\") ||\n             find(start * 3, \"(\" + history + \" * 3)\");\n  }\n  return find(1, \"1\");\n}</textarea></form>\n\n<p>Select a theme: <select onchange=\"selectTheme()\" id=select>\n    <option selected>default</option>\n    <option>ambiance</option>\n    <option>blackboard</option>\n    <option>cobalt</option>\n    <option>eclipse</option>\n    <option>elegant</option>\n    <option>erlang-dark</option>\n    <option>lesser-dark</option>\n    <option>monokai</option>\n    <option>neat</option>\n    <option>night</option>\n    <option>rubyblue</option>\n    <option>xq-dark</option>\n</select>\n</p>\n\n<script>\n  var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n    lineNumbers: true\n  });\n  var input = document.getElementById(\"select\");\n  function selectTheme() {\n    var theme = input.options[input.selectedIndex].innerHTML;\n    editor.setOption(\"theme\", theme);\n  }\n  var choice = document.location.search && document.location.search.slice(1);\n  if (choice) {\n    input.value = choice;\n    editor.setOption(\"theme\", choice);\n  }\n</script>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/demo/vim.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Vim bindings demo</title>\n    <link rel=\"stylesheet\" href=\"../lib/codemirror.css\">\n    <script src=\"../lib/codemirror.js\"></script>\n    <script src=\"../mode/clike/clike.js\"></script>\n    <script src=\"../keymap/vim.js\"></script>\n    <link rel=\"stylesheet\" href=\"../doc/docs.css\">\n\n    <style type=\"text/css\">\n      .CodeMirror {border-top: 1px solid #eee; border-bottom: 1px solid #eee;}\n    </style>\n  </head>\n  <body>\n    <h1>CodeMirror: Vim bindings demo</h1>\n\n    <form><textarea id=\"code\" name=\"code\">\n#include \"syscalls.h\"\n/* getchar:  simple buffered version */\nint getchar(void)\n{\n  static char buf[BUFSIZ];\n  static char *bufp = buf;\n  static int n = 0;\n  if (n == 0) {  /* buffer is empty */\n    n = read(0, buf, sizeof buf);\n    bufp = buf;\n  }\n  return (--n >= 0) ? (unsigned char) *bufp++ : EOF;\n}\n</textarea></form>\n\n<p>The vim keybindings are enabled by\nincluding <a href=\"../keymap/vim.js\">keymap/vim.js</a> and setting\nthe <code>keyMap</code> option to <code>\"vim\"</code>. Because\nCodeMirror's internal API is quite different from Vim, they are only\na loose approximation of actual vim bindings, though.</p>\n\n    <script>\n      CodeMirror.commands.save = function(){ alert(\"Saving\"); };\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        mode: \"text/x-csrc\",\n        keyMap: \"vim\"\n      });\n    </script>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/demo/visibletabs.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Visible tabs demo</title>\n    <link rel=\"stylesheet\" href=\"../lib/codemirror.css\">\n    <script src=\"../lib/codemirror.js\"></script>\n    <script src=\"../mode/clike/clike.js\"></script>\n    <link rel=\"stylesheet\" href=\"../doc/docs.css\">\n\n    <style type=\"text/css\">\n      .CodeMirror {border-top: 1px solid #eee; border-bottom: 1px solid #eee;}\n      .cm-tab:after {\n        content: \"\\21e5\";\n        display: -moz-inline-block;\n        display: -webkit-inline-block;\n        display: inline-block;\n        width: 0px;\n        position: relative;\n        overflow: visible;\n        left: -1.4em;\n        color: #aaa;\n      }\n    </style>\n  </head>\n  <body>\n    <h1>CodeMirror: Visible tabs demo</h1>\n\n    <form><textarea id=\"code\" name=\"code\">\n#include \"syscalls.h\"\n/* getchar:  simple buffered version */\nint getchar(void)\n{\n\tstatic char buf[BUFSIZ];\n\tstatic char *bufp = buf;\n\tstatic int n = 0;\n\tif (n == 0) {  /* buffer is empty */\n\t\tn = read(0, buf, sizeof buf);\n\t\tbufp = buf;\n\t}\n\treturn (--n >= 0) ? (unsigned char) *bufp++ : EOF;\n}\n</textarea></form>\n\n<p>Tabs inside the editor are spans with the\nclass <code>cm-tab</code>, and can be styled. This demo uses\nan <code>:after</code> pseudo-class CSS hack that will not work on old\nbrowsers. You can use a more conservative technique like a background\nimage as an alternative.</p>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        tabSize: 4,\n        indentUnit: 4,\n        indentWithTabs: true,\n        mode: \"text/x-csrc\"\n      });\n    </script>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/doc/compress.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Compression Helper</title>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans:bold\"/>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"docs.css\"/>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n  </head>\n  <body>\n\n<h1><span class=\"logo-braces\">{ }</span> <a href=\"http://codemirror.net/\">CodeMirror</a></h1>\n\n<pre class=\"grey\">\n<img src=\"baboon.png\" class=\"logo\" alt=\"logo\"/>/* Script compression\n   helper */\n</pre>\n\n    <p>To optimize loading CodeMirror, especially when including a\n    bunch of different modes, it is recommended that you combine and\n    minify (and preferably also gzip) the scripts. This page makes\n    those first two steps very easy. Simply select the version and\n    scripts you need in the form below, and\n    click <strong>Compress</strong> to download the minified script\n    file.</p>\n\n    <form id=\"form\" action=\"http://marijnhaverbeke.nl/uglifyjs\" method=\"post\">\n      <input type=\"hidden\" id=\"download\" name=\"download\" value=\"codemirror-compressed.js\"/>\n      <p>Version: <select id=\"version\" onchange=\"setVersion(this);\" style=\"padding: 1px\">\n        <option value=\"http://codemirror.net/\">HEAD</option>\n        <option value=\"http://marijnhaverbeke.nl/git/codemirror2?a=blob_plain;hb=v2.24;f=\">2.24</option>\n        <option value=\"http://marijnhaverbeke.nl/git/codemirror2?a=blob_plain;hb=v2.23;f=\">2.23</option>\n        <option value=\"http://marijnhaverbeke.nl/git/codemirror2?a=blob_plain;hb=v2.22;f=\">2.22</option>\n        <option value=\"http://marijnhaverbeke.nl/git/codemirror2?a=blob_plain;hb=v2.21;f=\">2.21</option>\n        <option value=\"http://marijnhaverbeke.nl/git/codemirror2?a=blob_plain;hb=v2.2;f=\">2.2</option>\n        <option value=\"http://marijnhaverbeke.nl/git/codemirror2?a=blob_plain;hb=v2.18;f=\">2.18</option>\n        <option value=\"http://marijnhaverbeke.nl/git/codemirror2?a=blob_plain;hb=v2.16;f=\">2.16</option>\n        <option value=\"http://marijnhaverbeke.nl/git/codemirror2?a=blob_plain;hb=v2.15;f=\">2.15</option>\n        <option value=\"http://marijnhaverbeke.nl/git/codemirror2?a=blob_plain;hb=v2.13;f=\">2.13</option>\n        <option value=\"http://marijnhaverbeke.nl/git/codemirror2?a=blob_plain;hb=v2.12;f=\">2.12</option>\n        <option value=\"http://marijnhaverbeke.nl/git/codemirror2?a=blob_plain;hb=v2.11;f=\">2.11</option>\n        <option value=\"http://marijnhaverbeke.nl/git/codemirror2?a=blob_plain;hb=v2.1;f=\">2.1</option>\n        <option value=\"http://marijnhaverbeke.nl/git/codemirror2?a=blob_plain;hb=v2.02;f=\">2.02</option>\n        <option value=\"http://marijnhaverbeke.nl/git/codemirror2?a=blob_plain;hb=v2.01;f=\">2.01</option>\n        <option value=\"http://marijnhaverbeke.nl/git/codemirror2?a=blob_plain;hb=v2.0;f=\">2.0</option>\n        <option value=\"http://marijnhaverbeke.nl/git/codemirror2?a=blob_plain;hb=beta2;f=\">beta2</option>\n        <option value=\"http://marijnhaverbeke.nl/git/codemirror2?a=blob_plain;hb=beta1;f=\">beta1</option>\n      </select></p>\n\n      <select multiple=\"multiple\" size=\"20\" name=\"code_url\" style=\"width: 40em;\" class=\"field\" id=\"files\">\n        <optgroup label=\"CodeMirror Library\">\n          <option value=\"http://codemirror.net/lib/codemirror.js\" selected>codemirror.js</option>\n        </optgroup>\n        <optgroup label=\"Modes\">\n          <option value=\"http://codemirror.net/mode/clike/clike.js\">clike.js</option>\n          <option value=\"http://codemirror.net/mode/clojure/clojure.js\">clojure.js</option>\n          <option value=\"http://codemirror.net/mode/coffeescript/coffeescript.js\">coffeescript.js</option>\n          <option value=\"http://codemirror.net/mode/css/css.js\">css.js</option>\n          <option value=\"http://codemirror.net/mode/diff/diff.js\">diff.js</option>\n          <option value=\"http://codemirror.net/mode/ecl/ecl.js\">ecl.js</option>\n          <option value=\"http://codemirror.net/mode/erlang/erlang.js\">erlang.js</option>\n          <option value=\"http://codemirror.net/mode/gfm/gfm.js\">gfm.js</option>\n          <option value=\"http://codemirror.net/mode/go/go.js\">go.js</option>\n          <option value=\"http://codemirror.net/mode/groovy/groovy.js\">groovy.js</option>\n          <option value=\"http://codemirror.net/mode/haskell/haskell.js\">haskell.js</option>\n          <option value=\"http://codemirror.net/mode/htmlembedded/htmlembedded.js\">htmlembedded.js</option>\n          <option value=\"http://codemirror.net/mode/htmlmixed/htmlmixed.js\">htmlmixed.js</option>\n          <option value=\"http://codemirror.net/mode/javascript/javascript.js\">javascript.js</option>\n          <option value=\"http://codemirror.net/mode/jinja2/jinja2.js\">jinja2.js</option>\n          <option value=\"http://codemirror.net/mode/less/less.js\">less.js</option>\n          <option value=\"http://codemirror.net/mode/lua/lua.js\">lua.js</option>\n          <option value=\"http://codemirror.net/mode/markdown/markdown.js\">markdown.js</option>\n          <option value=\"http://codemirror.net/mode/mysql/mysql.js\">mysql.js</option>\n          <option value=\"http://codemirror.net/mode/ntriples/ntriples.js\">ntriples.js</option>\n          <option value=\"http://codemirror.net/mode/pascal/pascal.js\">pascal.js</option>\n          <option value=\"http://codemirror.net/mode/perl/perl.js\">perl.js</option>\n          <option value=\"http://codemirror.net/mode/php/php.js\">php.js</option>\n          <option value=\"http://codemirror.net/mode/pig/pig.js\">pig.js</option>\n          <option value=\"http://codemirror.net/mode/plsql/plsql.js\">plsql.js</option>\n          <option value=\"http://codemirror.net/mode/properties/properties.js\">properties.js</option>\n          <option value=\"http://codemirror.net/mode/python/python.js\">python.js</option>\n          <option value=\"http://codemirror.net/mode/r/r.js\">r.js</option>\n          <option value=\"http://codemirror.net/mode/rpm/changes/changes.js\">rpm/changes.js</option>\n          <option value=\"http://codemirror.net/mode/rpm/spec/spec.js\">rpm/spec.js</option>\n          <option value=\"http://codemirror.net/mode/rst/rst.js\">rst.js</option>\n          <option value=\"http://codemirror.net/mode/ruby/ruby.js\">ruby.js</option>\n          <option value=\"http://codemirror.net/mode/rust/rust.js\">rust.js</option>\n          <option value=\"http://codemirror.net/mode/scheme/scheme.js\">scheme.js</option>\n          <option value=\"http://codemirror.net/mode/shell/shell.js\">shell.js</option>\n          <option value=\"http://codemirror.net/mode/smalltalk/smalltalk.js\">smalltalk.js</option>\n          <option value=\"http://codemirror.net/mode/smarty/smarty.js\">smarty.js</option>\n          <option value=\"http://codemirror.net/mode/sparql/sparql.js\">sparql.js</option>\n          <option value=\"http://codemirror.net/mode/stex/stex.js\">stex.js</option>\n          <option value=\"http://codemirror.net/mode/tiddlywiki/tiddlywiki.js\">tiddlywiki.js</option>\n          <option value=\"http://codemirror.net/mode/tiki/tiki.js\">tiki.js</option>\n          <option value=\"http://codemirror.net/mode/vbscript/vbscript.js\">vbscript.js</option>\n          <option value=\"http://codemirror.net/mode/velocity/velocity.js\">velocity.js</option>\n          <option value=\"http://codemirror.net/mode/verilog/verilog.js\">verilog.js</option>\n          <option value=\"http://codemirror.net/mode/xml/xml.js\">xml.js</option>\n          <option value=\"http://codemirror.net/mode/xquery/xquery.js\">xquery.js</option>\n          <option value=\"http://codemirror.net/mode/yaml/yaml.js\">yaml.js</option>\n        </optgroup>\n        <optgroup label=\"Utilities and add-ons\">\n          <option value=\"http://codemirror.net/lib/util/overlay.js\">overlay.js</option>\n          <option value=\"http://codemirror.net/lib/util/runmode.js\">runmode.js</option>\n          <option value=\"http://codemirror.net/lib/util/simple-hint.js\">simple-hint.js</option>\n          <option value=\"http://codemirror.net/lib/util/javascript-hint.js\">javascript-hint.js</option>\n          <option value=\"http://codemirror.net/lib/util/foldcode.js\">foldcode.js</option>\n          <option value=\"http://codemirror.net/lib/util/dialog.js\">dialog.js</option>\n          <option value=\"http://codemirror.net/lib/util/search.js\">search.js</option>\n          <option value=\"http://codemirror.net/lib/util/searchcursor.js\">searchcursor.js</option>\n          <option value=\"http://codemirror.net/lib/util/formatting.js\">formatting.js</option>\n          <option value=\"http://codemirror.net/lib/util/match-highlighter.js\">match-highlighter.js</option>\n          <option value=\"http://codemirror.net/lib/util/closetag.js\">closetag.js</option>\n          <option value=\"http://codemirror.net/lib/util/loadmode.js\">loadmode.js</option>\n        </optgroup>\n        <optgroup label=\"Keymaps\">\n          <option value=\"http://codemirror.net/keymap/emacs.js\">emacs.js</option>\n          <option value=\"http://codemirror.net/keymap/vim.js\">vim.js</option>\n        </optgroup>\n      </select></p>\n\n      <p>\n        <button type=\"submit\">Compress</button> with <a href=\"http://github.com/mishoo/UglifyJS/\">UglifyJS</a>\n      </p>\n\n      <p>Custom code to add to the compressed file:<textarea name=\"js_code\" style=\"width: 100%; height: 15em;\" class=\"field\"></textarea></p>\n    </form>\n\n    <script type=\"text/javascript\">\n      function setVersion(ver) {\n        var urlprefix = ver.options[ver.selectedIndex].value;\n        var select = document.getElementById(\"files\"), m;\n        for (var optgr = select.firstChild; optgr; optgr = optgr.nextSibling)\n          for (var opt = optgr.firstChild; opt; opt = opt.nextSibling) {\n            if (opt.nodeName != \"OPTION\")\n              continue;\n            else if (m = opt.value.match(/^http:\\/\\/codemirror.net\\/(.*)$/))\n              opt.value = urlprefix + m[1];\n            else if (m = opt.value.match(/http:\\/\\/marijnhaverbeke.nl\\/git\\/codemirror2\\?a=blob_plain;hb=[^;]+;f=(.*)$/))\n              opt.value = urlprefix + m[1];\n          }\n       }\n    </script>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/doc/docs.css",
    "content": "body {\n  font-family: Droid Sans, Arial, sans-serif;\n  line-height: 1.5;\n  max-width: 64.3em;\n  margin: 3em auto;\n  padding: 0 1em;\n}\n\nh1 {\n  letter-spacing: -3px;\n  font-size: 3.23em;\n  font-weight: bold;\n  margin: 0;\n}\n\nh2 {\n  font-size: 1.23em;\n  font-weight: bold;\n  margin: .5em 0;\n  letter-spacing: -1px;\n}\n\nh3 {\n  font-size: 1em;\n  font-weight: bold;\n  margin: .4em 0;\n}\n\npre {\n  background-color: #eee;\n  -moz-border-radius: 6px;\n  -webkit-border-radius: 6px;\n  border-radius: 6px;\n  padding: 1em;\n}\n\npre.code {\n  margin: 0 1em;\n}\n\n.grey {\n  font-size: 2.2em;\n  padding: .5em 1em;\n  line-height: 1.2em;\n  margin-top: .5em;\n  position: relative;\n}\n\nimg.logo {\n  position: absolute;\n  right: -25px;\n  bottom: 4px;\n}\n\na:link, a:visited, .quasilink {\n  color: #df0019;\n  cursor: pointer;\n  text-decoration: none;\n}\n\na:hover, .quasilink:hover {\n  color: #800004;\n}\n\nh1 a:link, h1 a:visited, h1 a:hover {\n  color: black;\n}\n\nul {\n  margin: 0;\n  padding-left: 1.2em;\n}\n\na.download {\n  color: white;\n  background-color: #df0019;\n  width: 100%;\n  display: block;\n  text-align: center;\n  font-size: 1.23em;\n  font-weight: bold;\n  text-decoration: none;\n  -moz-border-radius: 6px;\n  -webkit-border-radius: 6px;\n  border-radius: 6px;\n  padding: .5em 0;\n  margin-bottom: 1em;\n}\n\na.download:hover {\n  background-color: #bb0010;\n}\n\n.rel {\n  margin-bottom: 0;\n}\n\n.rel-note {\n  color: #777;\n  font-size: .9em;\n  margin-top: .1em;\n}\n\n.logo-braces {\n  color: #df0019;\n  position: relative;\n  top: -4px;\n}\n\n.blk {\n  float: left;\n}\n\n.left {\n  width: 37em;\n  padding-right: 6.53em;\n  padding-bottom: 1em;\n}\n\n.left1 {\n  width: 15.24em;\n  padding-right: 6.45em;\n}\n\n.left2 {\n  width: 15.24em;\n}\n\n.right {\n  width: 20.68em;\n}\n\n.leftbig {\n  width: 42.44em;\n  padding-right: 6.53em;\n}\n\n.rightsmall {\n  width: 15.24em;\n}\n\n.clear:after {\n  visibility: hidden;\n  display: block;\n  font-size: 0;\n  content: \" \";\n  clear: both;\n  height: 0;\n}\n.clear { display: inline-block; }\n/* start commented backslash hack \\*/\n* html .clear { height: 1%; }\n.clear { display: block; }\n/* close commented backslash hack */\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/doc/internals.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Internals</title>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans:bold\"/>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"docs.css\"/>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n    <style>dl dl {margin: 0;} .update {color: #d40 !important}</style>\n  </head>\n  <body>\n\n<h1><span class=\"logo-braces\">{ }</span> <a href=\"http://codemirror.net/\">CodeMirror</a></h1>\n\n<pre class=\"grey\">\n<img src=\"baboon.png\" class=\"logo\" alt=\"logo\"/>/* (Re-) Implementing A Syntax-\n   Highlighting Editor in JavaScript */\n</pre>\n\n<div class=\"clear\"><div class=\"leftbig blk\">\n\n<p style=\"font-size: 85%\" id=\"intro\">\n  <strong>Topic:</strong> JavaScript, code editor implementation<br>\n  <strong>Author:</strong> Marijn Haverbeke<br>\n  <strong>Date:</strong> March 2nd 2011 (updated November 13th 2011)\n</p>\n\n<p>This is a followup to\nmy <a href=\"http://codemirror.net/story.html\">Brutal Odyssey to the\nDark Side of the DOM Tree</a> story. That one describes the\nmind-bending process of implementing (what would become) CodeMirror 1.\nThis one describes the internals of CodeMirror 2, a complete rewrite\nand rethink of the old code base. I wanted to give this piece another\nHunter Thompson copycat subtitle, but somehow that would be out of\nplace—the process this time around was one of straightforward\nengineering, requiring no serious mind-bending whatsoever.</p>\n\n<p>So, what is wrong with CodeMirror 1? I'd estimate, by mailing list\nactivity and general search-engine presence, that it has been\nintegrated into about a thousand systems by now. The most prominent\none, since a few weeks,\nbeing <a href=\"http://googlecode.blogspot.com/2011/01/make-quick-fixes-quicker-on-google.html\">Google\ncode's project hosting</a>. It works, and it's being used widely.</a>\n\n<p>Still, I did not start replacing it because I was bored. CodeMirror\n1 was heavily reliant on <code>designMode</code>\nor <code>contentEditable</code> (depending on the browser). Neither of\nthese are well specified (HTML5 tries\nto <a href=\"http://www.w3.org/TR/html5/editing.html#contenteditable\">specify</a>\ntheir basics), and, more importantly, they tend to be one of the more\nobscure and buggy areas of browser functionality—CodeMirror, by using\nthis functionality in a non-typical way, was constantly running up\nagainst browser bugs. WebKit wouldn't show an empty line at the end of\nthe document, and in some releases would suddenly get unbearably slow.\nFirefox would show the cursor in the wrong place. Internet Explorer\nwould insist on linkifying everything that looked like a URL or email\naddress, a behaviour that can't be turned off. Some bugs I managed to\nwork around (which was often a frustrating, painful process), others,\nsuch as the Firefox cursor placement, I gave up on, and had to tell\nuser after user that they were known problems, but not something I\ncould help.</p>\n\n<p>Also, there is the fact that <code>designMode</code> (which seemed\nto be less buggy than <code>contentEditable</code> in Webkit and\nFirefox, and was thus used by CodeMirror 1 in those browsers) requires\na frame. Frames are another tricky area. It takes some effort to\nprevent getting tripped up by domain restrictions, they don't\ninitialize synchronously, behave strangely in response to the back\nbutton, and, on several browsers, can't be moved around the DOM\nwithout having them re-initialize. They did provide a very nice way to\nnamespace the library, though—CodeMirror 1 could freely pollute the\nnamespace inside the frame.</p>\n\n<p>Finally, working with an editable document means working with\nselection in arbitrary DOM structures. Internet Explorer (8 and\nbefore) has an utterly different (and awkward) selection API than all\nof the other browsers, and even among the different implementations of\n<code>document.selection</code>, details about how exactly a selection\nis represented vary quite a bit. Add to that the fact that Opera's\nselection support tended to be very buggy until recently, and you can\nimagine why CodeMirror 1 contains 700 lines of selection-handling\ncode.</p>\n\n<p>And that brings us to the main issue with the CodeMirror 1\ncode base: The proportion of browser-bug-workarounds to real\napplication code was getting dangerously high. By building on top of a\nfew dodgy features, I put the system in a vulnerable position—any\nincompatibility and bugginess in these features, I had to paper over\nwith my own code. Not only did I have to do some serious stunt-work to\nget it to work on older browsers (as detailed in the\nprevious <a href=\"http://codemirror.net/story.html\">story</a>), things\nalso kept breaking in newly released versions, requiring me to come up\nwith <em>new</em> scary hacks in order to keep up. This was starting\nto lose its appeal.</p>\n\n<h2 id=\"approach\">General Approach</h2>\n\n<p>What CodeMirror 2 does is try to sidestep most of the hairy hacks\nthat came up in version 1. I owe a lot to the\n<a href=\"http://ace.ajax.org\">ACE</a> editor for inspiration on how to\napproach this.</p>\n\n<p>I absolutely did not want to be completely reliant on key events to\ngenerate my input. Every JavaScript programmer knows that key event\ninformation is horrible and incomplete. Some people (most awesomely\nMihai Bazon with <a href=\"http://ymacs.org\">Ymacs</a>) have been able\nto build more or less functioning editors by directly reading key\nevents, but it takes a lot of work (the kind of never-ending, fragile\nwork I described earlier), and will never be able to properly support\nthings like multi-keystoke international character\ninput. <a href=\"#keymap\" class=\"update\">[see below for caveat]</a></p>\n\n<p>So what I do is focus a hidden textarea, and let the browser\nbelieve that the user is typing into that. What we show to the user is\na DOM structure we built to represent his document. If this is updated\nquickly enough, and shows some kind of believable cursor, it feels\nlike a real text-input control.</p>\n\n<p>Another big win is that this DOM representation does not have to\nspan the whole document. Some CodeMirror 1 users insisted that they\nneeded to put a 30 thousand line XML document into CodeMirror. Putting\nall that into the DOM takes a while, especially since, for some\nreason, an editable DOM tree is slower than a normal one on most\nbrowsers. If we have full control over what we show, we must only\nensure that the visible part of the document has been added, and can\ndo the rest only when needed. (Fortunately, the <code>onscroll</code>\nevent works almost the same on all browsers, and lends itself well to\ndisplaying things only as they are scrolled into view.)</p>\n\n<h2 id=\"input\">Input</h2>\n\n<p>ACE uses its hidden textarea only as a text input shim, and does\nall cursor movement and things like text deletion itself by directly\nhandling key events. CodeMirror's way is to let the browser do its\nthing as much as possible, and not, for example, define its own set of\nkey bindings. One way to do this would have been to have the whole\ndocument inside the hidden textarea, and after each key event update\nthe display DOM to reflect what's in that textarea.</p>\n\n<p>That'd be simple, but it is not realistic. For even medium-sized\ndocument the editor would be constantly munging huge strings, and get\nterribly slow. What CodeMirror 2 does is put the current selection,\nalong with an extra line on the top and on the bottom, into the\ntextarea.</p>\n\n<p>This means that the arrow keys (and their ctrl-variations), home,\nend, etcetera, do not have to be handled specially. We just read the\ncursor position in the textarea, and update our cursor to match it.\nAlso, copy and paste work pretty much for free, and people get their\nnative key bindings, without any special work on my part. For example,\nI have emacs key bindings configured for Chrome and Firefox. There is\nno way for a script to detect this. <a class=\"update\"\nhref=\"#keymap\">[no longer the case]</a></p>\n\n<p>Of course, since only a small part of the document sits in the\ntextarea, keys like page up and ctrl-end won't do the right thing.\nCodeMirror is catching those events and handling them itself.</p>\n\n<h2 id=\"selection\">Selection</h2>\n\n<p>Getting and setting the selection range of a textarea in modern\nbrowsers is trivial—you just use the <code>selectionStart</code>\nand <code>selectionEnd</code> properties. On IE you have to do some\ninsane stuff with temporary ranges and compensating for the fact that\nmoving the selection by a 'character' will treat \\r\\n as a single\ncharacter, but even there it is possible to build functions that\nreliably set and get the selection range.</p>\n\n<p>But consider this typical case: When I'm somewhere in my document,\npress shift, and press the up arrow, something gets selected. Then, if\nI, still holding shift, press the up arrow again, the top of my\nselection is adjusted. The selection remembers where its <em>head</em>\nand its <em>anchor</em> are, and moves the head when we shift-move.\nThis is a generally accepted property of selections, and done right by\nevery editing component built in the past twenty years.</p>\n\n<p>But not something that the browser selection APIs expose.</p>\n\n<p>Great. So when someone creates an 'upside-down' selection, the next\ntime CodeMirror has to update the textarea, it'll re-create the\nselection as an 'upside-up' selection, with the anchor at the top, and\nthe next cursor motion will behave in an unexpected way—our second\nup-arrow press in the example above will not do anything, since it is\ninterpreted in exactly the same way as the first.</p>\n\n<p>No problem. We'll just, ehm, detect that the selection is\nupside-down (you can tell by the way it was created), and then, when\nan upside-down selection is present, and a cursor-moving key is\npressed in combination with shift, we quickly collapse the selection\nin the textarea to its start, allow the key to take effect, and then\ncombine its new head with its old anchor to get the <em>real</em>\nselection.</p>\n\n<p>In short, scary hacks could not be avoided entirely in CodeMirror\n2.</p>\n\n<p>And, the observant reader might ask, how do you even know that a\nkey combo is a cursor-moving combo, if you claim you support any\nnative key bindings? Well, we don't, but we can learn. The editor\nkeeps a set known cursor-movement combos (initialized to the\npredictable defaults), and updates this set when it observes that\npressing a certain key had (only) the effect of moving the cursor.\nThis, of course, doesn't work if the first time the key is used was\nfor extending an inverted selection, but it works most of the\ntime.</p>\n\n<h2 id=\"update\">Intelligent Updating</h2>\n\n<p>One thing that always comes up when you have a complicated internal\nstate that's reflected in some user-visible external representation\n(in this case, the displayed code and the textarea's content) is\nkeeping the two in sync. The naive way is to just update the display\nevery time you change your state, but this is not only error prone\n(you'll forget), it also easily leads to duplicate work on big,\ncomposite operations. Then you start passing around flags indicating\nwhether the display should be updated in an attempt to be efficient\nagain and, well, at that point you might as well give up completely.</p>\n\n<p>I did go down that road, but then switched to a much simpler model:\nsimply keep track of all the things that have been changed during an\naction, and then, only at the end, use this information to update the\nuser-visible display.</p>\n\n<p>CodeMirror uses a concept of <em>operations</em>, which start by\ncalling a specific set-up function that clears the state and end by\ncalling another function that reads this state and does the required\nupdating. Most event handlers, and all the user-visible methods that\nchange state are wrapped like this. There's a method\ncalled <code>operation</code> that accepts a function, and returns\nanother function that wraps the given function as an operation.</p>\n\n<p>It's trivial to extend this (as CodeMirror does) to detect nesting,\nand, when an operation is started inside an operation, simply\nincrement the nesting count, and only do the updating when this count\nreaches zero again.</p>\n\n<p>If we have a set of changed ranges and know the currently shown\nrange, we can (with some awkward code to deal with the fact that\nchanges can add and remove lines, so we're dealing with a changing\ncoordinate system) construct a map of the ranges that were left\nintact. We can then compare this map with the part of the document\nthat's currently visible (based on scroll offset and editor height) to\ndetermine whether something needs to be updated.</p>\n\n<p>CodeMirror uses two update algorithms—a full refresh, where it just\ndiscards the whole part of the DOM that contains the edited text and\nrebuilds it, and a patch algorithm, where it uses the information\nabout changed and intact ranges to update only the out-of-date parts\nof the DOM. When more than 30 percent (which is the current heuristic,\nmight change) of the lines need to be updated, the full refresh is\nchosen (since it's faster to do than painstakingly finding and\nupdating all the changed lines), in the other case it does the\npatching (so that, if you scroll a line or select another character,\nthe whole screen doesn't have to be\nre-rendered). <span class=\"update\">[the full-refresh\nalgorithm was dropped, it wasn't really faster than the patching\none]</span></p>\n\n<p>All updating uses <code>innerHTML</code> rather than direct DOM\nmanipulation, since that still seems to be by far the fastest way to\nbuild documents. There's a per-line function that combines the\nhighlighting, <a href=\"manual.html#markText\">marking</a>, and\nselection info for that line into a snippet of HTML. The patch updater\nuses this to reset individual lines, the refresh updater builds an\nHTML chunk for the whole visible document at once, and then uses a\nsingle <code>innerHTML</code> update to do the refresh.</p>\n\n<h2 id=\"parse\">Parsers can be Simple</h2>\n\n<p>When I wrote CodeMirror 1, I\nthought <a href=\"http://codemirror.net/story.html#parser\">interruptable\nparsers</a> were a hugely scary and complicated thing, and I used a\nbunch of heavyweight abstractions to keep this supposed complexity\nunder control: parsers\nwere <a href=\"http://bob.pythonmac.org/archives/2005/07/06/iteration-in-javascript/\">iterators</a>\nthat consumed input from another iterator, and used funny\nclosure-resetting tricks to copy and resume themselves.</p>\n\n<p>This made for a rather nice system, in that parsers formed strictly\nseparate modules, and could be composed in predictable ways.\nUnfortunately, it was quite slow (stacking three or four iterators on\ntop of each other), and extremely intimidating to people not used to a\nfunctional programming style.</p>\n\n<p>With a few small changes, however, we can keep all those\nadvantages, but simplify the API and make the whole thing less\nindirect and inefficient. CodeMirror\n2's <a href=\"manual.html#modeapi\">mode API</a> uses explicit state\nobjects, and makes the parser/tokenizer a function that simply takes a\nstate and a character stream abstraction, advances the stream one\ntoken, and returns the way the token should be styled. This state may\nbe copied, optionally in a mode-defined way, in order to be able to\ncontinue a parse at a given point. Even someone who's never touched a\nlambda in his life can understand this approach. Additionally, far\nfewer objects are allocated in the course of parsing now.</p>\n\n<p>The biggest speedup comes from the fact that the parsing no longer\nhas to touch the DOM though. In CodeMirror 1, on an older browser, you\ncould <em>see</em> the parser work its way through the document,\nmanaging some twenty lines in each 50-millisecond time slice it got. It\nwas reading its input from the DOM, and updating the DOM as it went\nalong, which any experienced JavaScript programmer will immediately\nspot as a recipe for slowness. In CodeMirror 2, the parser usually\nfinishes the whole document in a single 100-millisecond time slice—it\nmanages some 1500 lines during that time on Chrome. All it has to do\nis munge strings, so there is no real reason for it to be slow\nanymore.</p>\n\n<h2 id=\"summary\">What Gives?</h2>\n\n<p>Given all this, what can you expect from CodeMirror 2?</p>\n\n<ul>\n\n<li><strong>Small.</strong> the base library is\nsome <span class=\"update\">45k</span> when minified\nnow, <span class=\"update\">17k</span> when gzipped. It's smaller than\nits own logo.</li>\n\n<li><strong>Lightweight.</strong> CodeMirror 2 initializes very\nquickly, and does almost no work when it is not focused. This means\nyou can treat it almost like a textarea, have multiple instances on a\npage without trouble.</li>\n\n<li><strong>Huge document support.</strong> Since highlighting is\nreally fast, and no DOM structure is being built for non-visible\ncontent, you don't have to worry about locking up your browser when a\nuser enters a megabyte-sized document.</li>\n\n<li><strong>Extended API.</strong> Some things kept coming up in the\nmailing list, such as marking pieces of text or lines, which were\nextremely hard to do with CodeMirror 1. The new version has proper\nsupport for these built in.</li>\n\n<li><strong>Tab support.</strong> Tabs inside editable documents were,\nfor some reason, a no-go. At least six different people announced they\nwere going to add tab support to CodeMirror 1, none survived (I mean,\nnone delivered a working version). CodeMirror 2 no longer removes tabs\nfrom your document.</li>\n\n<li><strong>Sane styling.</strong> <code>iframe</code> nodes aren't\nreally known for respecting document flow. Now that an editor instance\nis a plain <code>div</code> element, it is much easier to size it to\nfit the surrounding elements. You don't even have to make it scroll if\nyou do not <a href=\"../demo/resize.html\">want to</a>.</li>\n\n</ul>\n\n<p>On the downside, a CodeMirror 2 instance is <em>not</em> a native\neditable component. Though it does its best to emulate such a\ncomponent as much as possible, there is functionality that browsers\njust do not allow us to hook into. Doing select-all from the context\nmenu, for example, is not currently detected by CodeMirror.</p>\n\n<p id=\"changes\" style=\"margin-top: 2em;\"><span style=\"font-weight:\nbold\">[Updates from November 13th 2011]</span> Recently, I've made\nsome changes to the codebase that cause some of the text above to no\nlonger be current. I've left the text intact, but added markers at the\npassages that are now inaccurate. The new situation is described\nbelow.</p>\n\n<h2 id=\"btree\">Content Representation</h2>\n\n<p>The original implementation of CodeMirror 2 represented the\ndocument as a flat array of line objects. This worked well—splicing\narrays will require the part of the array after the splice to be\nmoved, but this is basically just a simple <code>memmove</code> of a\nbunch of pointers, so it is cheap even for huge documents.</p>\n\n<p>However, I recently added line wrapping and code folding (line\ncollapsing, basically). Once lines start taking up a non-constant\namount of vertical space, looking up a line by vertical position\n(which is needed when someone clicks the document, and to determine\nthe visible part of the document during scrolling) can only be done\nwith a linear scan through the whole array, summing up line heights as\nyou go. Seeing how I've been going out of my way to make big documents\nfast, this is not acceptable.</p>\n\n<p>The new representation is based on a B-tree. The leaves of the tree\ncontain arrays of line objects, with a fixed minimum and maximum size,\nand the non-leaf nodes simply hold arrays of child nodes. Each node\nstores both the amount of lines that live below them and the vertical\nspace taken up by these lines. This allows the tree to be indexed both\nby line number and by vertical position, and all access has\nlogarithmic complexity in relation to the document size.</p>\n\n<p>I gave line objects and tree nodes parent pointers, to the node\nabove them. When a line has to update its height, it can simply walk\nthese pointers to the top of the tree, adding or subtracting the\ndifference in height from each node it encounters. The parent pointers\nalso make it cheaper (in complexity terms, the difference is probably\ntiny in normal-sized documents) to find the current line number when\ngiven a line object. In the old approach, the whole document array had\nto be searched. Now, we can just walk up the tree and count the sizes\nof the nodes coming before us at each level.</p>\n\n<p>I chose B-trees, not regular binary trees, mostly because they\nallow for very fast bulk insertions and deletions. When there is a big\nchange to a document, it typically involves adding, deleting, or\nreplacing a chunk of subsequent lines. In a regular balanced tree, all\nthese inserts or deletes would have to be done separately, which could\nbe really expensive. In a B-tree, to insert a chunk, you just walk\ndown the tree once to find where it should go, insert them all in one\nshot, and then break up the node if needed. This breaking up might\ninvolve breaking up nodes further up, but only requires a single pass\nback up the tree. For deletion, I'm somewhat lax in keeping things\nbalanced—I just collapse nodes into a leaf when their child count goes\nbelow a given number. This means that there are some weird editing\npatterns that may result in a seriously unbalanced tree, but even such\nan unbalanced tree will perform well, unless you spend a day making\nstrangely repeating edits to a really big document.</p>\n\n<h2 id=\"keymap\">Keymaps</h2>\n\n<p><a href=\"#approach\">Above</a>, I claimed that directly catching key\nevents for things like cursor movement is impractical because it\nrequires some browser-specific kludges. I then proceeded to explain\nsome awful <a href=\"#selection\">hacks</a> that were needed to make it\npossible for the selection changes to be detected through the\ntextarea. In fact, the second hack is about as bad as the first.</p>\n\n<p>On top of that, in the presence of user-configurable tab sizes and\ncollapsed and wrapped lines, lining up cursor movement in the textarea\nwith what's visible on the screen becomes a nightmare. Thus, I've\ndecided to move to a model where the textarea's selection is no longer\ndepended on.</p>\n\n<p>So I moved to a model where all cursor movement is handled by my\nown code. This adds support for a goal column, proper interaction of\ncursor movement with collapsed lines, and makes it possible for\nvertical movement to move through wrapped lines properly, instead of\njust treating them like non-wrapped lines.</p>\n\n<p>The key event handlers now translate the key event into a string,\nsomething like <code>Ctrl-Home</code> or <code>Shift-Cmd-R</code>, and\nuse that string to look up an action to perform. To make keybinding\ncustomizable, this lookup goes through\na <a href=\"manual.html#option_keyMap\">table</a>, using a scheme that\nallows such tables to be chained together (for example, the default\nMac bindings fall through to a table named 'emacsy', which defines\nbasic Emacs-style bindings like <code>Ctrl-F</code>, and which is also\nused by the custom Emacs bindings).</p>\n\n<p>A new\noption <a href=\"manual.html#option_extraKeys\"><code>extraKeys</code></a>\nallows ad-hoc keybindings to be defined in a much nicer way than what\nwas possible with the\nold <a href=\"manual.html#option_onKeyEvent\"><code>onKeyEvent</code></a>\ncallback. You simply provide an object mapping key identifiers to\nfunctions, instead of painstakingly looking at raw key events.</p>\n\n<p>Built-in commands map to strings, rather than functions, for\nexample <code>\"goLineUp\"</code> is the default action bound to the up\narrow key. This allows new keymaps to refer to them without\nduplicating any code. New commands can be defined by assigning to\nthe <code>CodeMirror.commands</code> object, which maps such commands\nto functions.</p>\n\n<p>The hidden textarea now only holds the current selection, with no\nextra characters around it. This has a nice advantage: polling for\ninput becomes much, much faster. If there's a big selection, this text\ndoes not have to be read from the textarea every time—when we poll,\njust noticing that something is still selected is enough to tell us\nthat no new text was typed.</p>\n\n<p>The reason that cheap polling is important is that many browsers do\nnot fire useful events on IME (input method engine) input, which is\nthe thing where people inputting a language like Japanese or Chinese\nuse multiple keystrokes to create a character or sequence of\ncharacters. Most modern browsers fire <code>input</code> when the\ncomposing is finished, but many don't fire anything when the character\nis updated <em>during</em> composition. So we poll, whenever the\neditor is focused, to provide immediate updates of the display.</p>\n\n</div><div class=\"rightsmall blk\">\n\n    <h2>Contents</h2>\n\n    <ul>\n      <li><a href=\"#intro\">Introduction</a></li>\n      <li><a href=\"#approach\">General Approach</a></li>\n      <li><a href=\"#input\">Input</a></li>\n      <li><a href=\"#selection\">Selection</a></li>\n      <li><a href=\"#update\">Intelligent Updating</a></li>\n      <li><a href=\"#parse\">Parsing</a></li>\n      <li><a href=\"#summary\">What Gives?</a></li>\n      <li><a href=\"#btree\">Content Representation</a></li>\n      <li><a href=\"#keymap\">Key Maps</a></li>\n    </ul>\n\n</div></div>\n\n<div style=\"height: 2em\">&nbsp;</div>\n\n</body></html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/doc/manual.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: User Manual</title>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans:bold\"/>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"docs.css\"/>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n    <style>dl dl {margin: 0;}</style>\n  </head>\n  <body>\n\n<h1><span class=\"logo-braces\">{ }</span> <a href=\"http://codemirror.net/\">CodeMirror</a></h1>\n\n<pre class=\"grey\">\n<img src=\"baboon.png\" class=\"logo\" alt=\"logo\"/>/* User manual and\n   reference guide */\n</pre>\n\n<div class=\"clear\"><div class=\"leftbig blk\">\n\n    <h2 id=\"overview\">Overview</h2>\n\n    <p>CodeMirror is a code-editor component that can be embedded in\n    Web pages. The code library provides <em>only</em> the editor\n    component, no accompanying buttons, auto-completion, or other IDE\n    functionality. It does provide a rich API on top of which such\n    functionality can be straightforwardly implemented. See\n    the <a href=\"#addons\">add-ons</a> included in the distribution,\n    and\n    the <a href=\"https://github.com/jagthedrummer/codemirror-ui\">CodeMirror\n    UI</a> project, for reusable implementations of extra features.</p>\n\n    <p>CodeMirror works with language-specific modes. Modes are\n    JavaScript programs that help color (and optionally indent) text\n    written in a given language. The distribution comes with a number\n    of modes (see the <code>mode/</code> directory), and it isn't hard\n    to <a href=\"#modeapi\">write new ones</a> for other languages.</p>\n\n    <h2 id=\"usage\">Basic Usage</h2>\n\n    <p>The easiest way to use CodeMirror is to simply load the script\n    and style sheet found under <code>lib/</code> in the distribution,\n    plus a mode script from one of the <code>mode/</code> directories\n    and a theme stylesheet from <code>theme/</code>. (See\n    also <a href=\"compress.html\">the compression helper</a>.) For\n    example:</p>\n\n    <pre>&lt;script src=\"lib/codemirror.js\">&lt;/script>\n&lt;link rel=\"stylesheet\" href=\"../lib/codemirror.css\">\n&lt;script src=\"mode/javascript/javascript.js\">&lt;/script></pre>\n\n    <p>Having done this, an editor instance can be created like\n    this:</p>\n\n    <pre>var myCodeMirror = CodeMirror(document.body);</pre>\n\n    <p>The editor will be appended to the document body, will start\n    empty, and will use the mode that we loaded. To have more control\n    over the new editor, a configuration object can be passed\n    to <code>CodeMirror</code> as a second argument:</p>\n\n    <pre>var myCodeMirror = CodeMirror(document.body, {\n  value: \"function myScript(){return 100;}\\n\",\n  mode:  \"javascript\"\n});</pre>\n\n    <p>This will initialize the editor with a piece of code already in\n    it, and explicitly tell it to use the JavaScript mode (which is\n    useful when multiple modes are loaded).\n    See <a href=\"#config\">below</a> for a full discussion of the\n    configuration options that CodeMirror accepts.</p>\n\n    <p>In cases where you don't want to append the editor to an\n    element, and need more control over the way it is inserted, the\n    first argument to the <code>CodeMirror</code> function can also\n    be a function that, when given a DOM element, inserts it into the\n    document somewhere. This could be used to, for example, replace a\n    textarea with a real editor:</p>\n\n    <pre>var myCodeMirror = CodeMirror(function(elt) {\n  myTextArea.parentNode.replaceChild(elt, myTextArea);\n}, {value: myTextArea.value});</pre>\n\n    <p>However, for this use case, which is a common way to use\n    CodeMirror, the library provides a much more powerful\n    shortcut:</p>\n\n    <pre>var myCodeMirror = CodeMirror.fromTextArea(myTextArea);</pre>\n\n    <p>This will, among other things, ensure that the textarea's value\n    is updated when the form (if it is part of a form) is submitted.\n    See the <a href=\"#fromTextArea\">API reference</a> for a full\n    description of this method.</p>\n\n    <h2 id=\"config\">Configuration</h2>\n\n    <p>Both the <code>CodeMirror</code> function and\n    its <code>fromTextArea</code> method take as second (optional)\n    argument an object containing configuration options. Any option\n    not supplied like this will be taken\n    from <code>CodeMirror.defaults</code>, an object containing the\n    default options. You can update this object to change the defaults\n    on your page.</p>\n\n    <p>Options are not checked in any way, so setting bogus option\n    values is bound to lead to odd errors.</p>\n\n    <p>These are the supported options:</p>\n\n    <dl>\n      <dt id=\"option_value\"><code>value (string)</code></dt>\n      <dd>The starting value of the editor.</dd>\n\n      <dt id=\"option_mode\"><code>mode (string or object)</code></dt>\n      <dd>The mode to use. When not given, this will default to the\n      first mode that was loaded. It may be a string, which either\n      simply names the mode or is\n      a <a href=\"http://en.wikipedia.org/wiki/MIME\">MIME</a> type\n      associated with the mode. Alternatively, it may be an object\n      containing configuration options for the mode, with\n      a <code>name</code> property that names the mode (for\n      example <code>{name: \"javascript\", json: true}</code>). The demo\n      pages for each mode contain information about what configuration\n      parameters the mode supports. You can ask CodeMirror which modes\n      and MIME types are loaded with\n      the <code>CodeMirror.listModes</code>\n      and <code>CodeMirror.listMIMEs</code> functions.</dd>\n\n      <dt id=\"option_theme\"><code>theme (string)</code></dt>\n      <dd>The theme to style the editor with. You must make sure the\n      CSS file defining the corresponding <code>.cm-s-[name]</code>\n      styles is loaded (see\n      the <a href=\"../theme/\"><code>theme</code></a> directory in the\n      distribution). The default is <code>\"default\"</code>, for which\n      colors are included in <code>codemirror.css</code>. It is\n      possible to use multiple theming classes at once—for\n      example <code>\"foo bar\"</code> will assign both\n      the <code>cm-s-foo</code> and the <code>cm-s-bar</code> classes\n      to the editor.</dd>\n\n      <dt id=\"option_indentUnit\"><code>indentUnit (integer)</code></dt>\n      <dd>How many spaces a block (whatever that means in the edited\n      language) should be indented. The default is 2.</dd>\n\n      <dt id=\"option_smartIndent\"><code>smartIndent (boolean)</code></dt>\n      <dd>Whether to use the context-sensitive indentation that the\n      mode provides (or just indent the same as the line before).\n      Defaults to true.</dd>\n\n      <dt id=\"option_tabSize\"><code>tabSize (integer)</code></dt>\n      <dd>The width of a tab character. Defaults to 4.</dd>\n\n      <dt id=\"option_indentWithTabs\"><code>indentWithTabs (boolean)</code></dt>\n      <dd>Whether, when indenting, the first N*<code>tabSize</code>\n      spaces should be replaced by N tabs. Default is false.</dd>\n\n      <dt id=\"option_electricChars\"><code>electricChars (boolean)</code></dt>\n      <dd>Configures whether the editor should re-indent the current\n      line when a character is typed that might change its proper\n      indentation (only works if the mode supports indentation).\n      Default is true.</dd>\n\n      <dt id=\"option_autoClearEmptyLines\"><code>autoClearEmptyLines (boolean)</code></dt>\n      <dd>When turned on (default is off), this will clear\n      automatically clear lines consisting only of whitespace when the\n      cursor leaves them. This is mostly useful to prevent auto\n      indentation from introducing trailing whitespace in a file.</dd>\n\n      <dt id=\"option_keyMap\"><code>keyMap (string)</code></dt>\n      <dd>Configures the keymap to use. The default\n      is <code>\"default\"</code>, which is the only keymap defined\n      in <code>codemirror.js</code> itself. Extra keymaps are found in\n      the <a href=\"../keymap/\"><code>keymap</code></a> directory. See\n      the <a href=\"#keymaps\">section on keymaps</a> for more\n      information.</dd>\n\n      <dt id=\"option_extraKeys\"><code>extraKeys (object)</code></dt>\n      <dd>Can be used to specify extra keybindings for the editor,\n      alongside the ones defined\n      by <a href=\"#option_keyMap\"><code>keyMap</code></a>. Should be\n      either null, or a valid <a href=\"#keymaps\">keymap</a> value.</dd>\n\n      <dt id=\"option_lineWrapping\"><code>lineWrapping (boolean)</code></dt>\n      <dd>Whether CodeMirror should scroll or wrap for long lines.\n      Defaults to <code>false</code> (scroll).</dd>\n\n      <dt id=\"option_lineNumbers\"><code>lineNumbers (boolean)</code></dt>\n      <dd>Whether to show line numbers to the left of the editor.</dd>\n\n      <dt id=\"option_firstLineNumber\"><code>firstLineNumber (integer)</code></dt>\n      <dd>At which number to start counting lines. Default is 1.</dd>\n\n      <dt id=\"option_gutter\"><code>gutter (boolean)</code></dt>\n      <dd>Can be used to force a 'gutter' (empty space on the left of\n      the editor) to be shown even when no line numbers are active.\n      This is useful for setting <a href=\"#setMarker\">markers</a>.</dd>\n\n      <dt id=\"option_fixedGutter\"><code>fixedGutter (boolean)</code></dt>\n      <dd>When enabled (off by default), this will make the gutter\n      stay visible when the document is scrolled horizontally.</dd>\n\n      <dt id=\"option_readOnly\"><code>readOnly (boolean)</code></dt>\n      <dd>This disables editing of the editor content by the user. If\n      the special value <code>\"nocursor\"</code> is given (instead of\n      simply <code>true</code>), focusing of the editor is also\n      disallowed.</dd>\n\n      <dt id=\"option_onChange\"><code>onChange (function)</code></dt>\n      <dd>When given, this function will be called every time the\n      content of the editor is changed. It will be given the editor\n      instance as first argument, and an <code>{from, to, text, next}</code>\n      object containing information about the changes\n      that occurred as second argument. <code>from</code>\n      and <code>to</code> are the positions (in the pre-change\n      coordinate system) where the change started and\n      ended (for example, it might be <code>{ch:0, line:18}</code> if the\n      position is at the beginning of line #19). <code>text</code>\n      is an array of strings representing the text that replaced the changed\n      range (split by line). If multiple changes happened during a single\n      operation, the object will have a <code>next</code> property pointing to\n      another change object (which may point to another, etc).</dd>\n\n      <dt id=\"option_onCursorActivity\"><code>onCursorActivity (function)</code></dt>\n      <dd>Will be called when the cursor or selection moves, or any\n      change is made to the editor content.</dd>\n\n      <dt id=\"option_onGutterClick\"><code>onGutterClick (function)</code></dt>\n      <dd>When given, will be called whenever the editor gutter (the\n      line-number area) is clicked. Will be given the editor instance\n      as first argument, the (zero-based) number of the line that was\n      clicked as second argument, and the raw <code>mousedown</code>\n      event object as third argument.</dd>\n\n      <dt id=\"option_onFocus\"><code>onFocus, onBlur (function)</code></dt>\n      <dd>The given functions will be called whenever the editor is\n      focused or unfocused.</dd>\n\n      <dt id=\"option_onScroll\"><code>onScroll (function)</code></dt>\n      <dd>When given, will be called whenever the editor is\n      scrolled.</dd>\n\n      <dt id=\"option_onHighlightComplete\"><code>onHighlightComplete (function)</code></dt>\n      <dd>Whenever the editor's content has been fully highlighted,\n      this function (if given) will be called. It'll be given a single\n      argument, the editor instance.</dd>\n\n      <dt id=\"option_onUpdate\"><code>onUpdate (function)</code></dt>\n      <dd>Will be called whenever CodeMirror updates its DOM display.</dd>\n\n      <dt id=\"option_matchBrackets\"><code>matchBrackets (boolean)</code></dt>\n      <dd>Determines whether brackets are matched whenever the cursor\n      is moved next to a bracket.</dd>\n\n      <dt id=\"option_workTime\"><code>workTime, workDelay (number)</code></dt>\n      <dd>Highlighting is done by a pseudo background-thread that will\n      work for <code>workTime</code> milliseconds, and then use\n      timeout to sleep for <code>workDelay</code> milliseconds. The\n      defaults are 200 and 300, you can change these options to make\n      the highlighting more or less aggressive.</dd>\n\n      <dt id=\"option_pollInterval\"><code>pollInterval (number)</code></dt>\n      <dd>Indicates how quickly CodeMirror should poll its input\n      textarea for changes. Most input is captured by events, but some\n      things, like IME input on some browsers, doesn't generate events\n      that allow CodeMirror to properly detect it. Thus, it polls.\n      Default is 100 milliseconds.</dd>\n\n      <dt id=\"option_undoDepth\"><code>undoDepth (integer)</code></dt>\n      <dd>The maximum number of undo levels that the editor stores.\n      Defaults to 40.</dd>\n\n      <dt id=\"option_tabindex\"><code>tabindex (integer)</code></dt>\n      <dd>The <a href=\"http://www.w3.org/TR/html401/interact/forms.html#adef-tabindex\">tab\n      index</a> to assign to the editor. If not given, no tab index\n      will be assigned.</dd>\n\n      <dt id=\"option_autofocus\"><code>autofocus (boolean)</code></dt>\n      <dd>Can be used to make CodeMirror focus itself on\n      initialization. Defaults to off.\n      When <a href=\"#fromTextArea\"><code>fromTextArea</code></a> is\n      used, and no explicit value is given for this option, it will\n      inherit the setting from the textarea's <code>autofocus</code>\n      attribute.</dd>\n\n      <dt id=\"option_dragDrop\"><code>dragDrop (boolean)</code></dt>\n      <dd>Controls whether drag-and-drop is enabled. On by default.</dd>\n\n      <dt id=\"option_onDragEvent\"><code>onDragEvent (function)</code></dt>\n      <dd>When given, this will be called when the editor is handling\n      a <code>dragenter</code>, <code>dragover</code>,\n      or <code>drop</code> event. It will be passed the editor instance\n      and the event object as arguments. The callback can choose to\n      handle the event itself, in which case it should\n      return <code>true</code> to indicate that CodeMirror should not\n      do anything further.</dd>\n\n      <dt id=\"option_onKeyEvent\"><code>onKeyEvent (function)</code></dt>\n      <dd>This provides a rather low-level hook into CodeMirror's key\n      handling. If provided, this function will be called on\n      every <code>keydown</code>, <code>keyup</code>,\n      and <code>keypress</code> event that CodeMirror captures. It\n      will be passed two arguments, the editor instance and the key\n      event. This key event is pretty much the raw key event, except\n      that a <code>stop()</code> method is always added to it. You\n      could feed it to, for example, <code>jQuery.Event</code> to\n      further normalize it.<br>This function can inspect the key\n      event, and handle it if it wants to. It may return true to tell\n      CodeMirror to ignore the event. Be wary that, on some browsers,\n      stopping a <code>keydown</code> does not stop\n      the <code>keypress</code> from firing, whereas on others it\n      does. If you respond to an event, you should probably inspect\n      its <code>type</code> property and only do something when it\n      is <code>keydown</code> (or <code>keypress</code> for actions\n      that need character data).</dd>\n    </dl>\n\n    <h2 id=\"keymaps\">Keymaps</h2>\n\n    <p>Keymaps are ways to associate keys with functionality. A keymap\n    is an object mapping strings that identify the keys to functions\n    that implement their functionality.</p>\n\n    <p>Keys are identified either by name or by character.\n    The <code>CodeMirror.keyNames</code> object defines names for\n    common keys and associates them with their key codes. Examples of\n    names defined here are <code>Enter</code>, <code>F5</code>,\n    and <code>Q</code>. These can be prefixed\n    with <code>Shift-</code>, <code>Cmd-</code>, <code>Ctrl-</code>,\n    and <code>Alt-</code> (in that order!) to specify a modifier. So\n    for example, <code>Shift-Ctrl-Space</code> would be a valid key\n    identifier.</p>\n\n    <p>Alternatively, a character can be specified directly by\n    surrounding it in single quotes, for example <code>'$'</code>\n    or <code>'q'</code>. Due to limitations in the way browsers fire\n    key events, these may not be prefixed with modifiers.</p>\n\n    <p>The <code>CodeMirror.keyMap</code> object associates keymaps\n    with names. User code and keymap definitions can assign extra\n    properties to this object. Anywhere where a keymap is expected, a\n    string can be given, which will be looked up in this object. It\n    also contains the <code>\"default\"</code> keymap holding the\n    default bindings.</p>\n\n    <p>The values of properties in keymaps can be either functions of\n    a single argument (the CodeMirror instance), or strings. Such\n    strings refer to properties of the\n    <code>CodeMirror.commands</code> object, which defines a number of\n    common commands that are used by the default keybindings, and maps\n    them to functions. A key handler function may throw\n    <code>CodeMirror.Pass</code> to indicate that it has decided not\n    to handle the key, and other handlers (or the default behavior)\n    should be given a turn.</p>\n\n    <p>Keys mapped to command names that start with the\n    characters <code>\"go\"</code> (which should be used for\n    cursor-movement actions) will be fired even when an\n    extra <code>Shift</code> modifier is present (i.e. <code>\"Up\":\n    \"goLineUp\"</code> matches both up and shift-up). This is used to\n    easily implement shift-selection.</p>\n\n    <p>Keymaps can defer to each other by defining\n    a <code>fallthrough</code> property. This indicates that when a\n    key is not found in the map itself, one or more other maps should\n    be searched. It can hold either a single keymap or an array of\n    keymaps.</p>\n\n    <p>When a keymap contains a <code>nofallthrough</code> property\n    set to <code>true</code>, keys matched against that map will be\n    ignored if they don't match any of the bindings in the map (no\n    further child maps will be tried, and the default effect of\n    inserting a character will not occur).</p>\n\n    <h2 id=\"styling\">Customized Styling</h2>\n\n    <p>Up to a certain extent, CodeMirror's look can be changed by\n    modifying style sheet files. The style sheets supplied by modes\n    simply provide the colors for that mode, and can be adapted in a\n    very straightforward way. To style the editor itself, it is\n    possible to alter or override the styles defined\n    in <a href=\"../lib/codemirror.css\"><code>codemirror.css</code></a>.</p>\n\n    <p>Some care must be taken there, since a lot of the rules in this\n    file are necessary to have CodeMirror function properly. Adjusting\n    colors should be safe, of course, and with some care a lot of\n    other things can be changed as well. The CSS classes defined in\n    this file serve the following roles:</p>\n\n    <dl>\n      <dt id=\"class_CodeMirror\"><code>CodeMirror</code></dt>\n      <dd>The outer element of the editor. This should be used for\n      borders and positioning. Can also be used to set styles that\n      should hold for everything inside the editor (such as font\n      and font size), or to set a background.</dd>\n\n      <dt id=\"class_CodeMirror_scroll\"><code>CodeMirror-scroll</code></dt>\n      <dd>This determines whether the editor scrolls (<code>overflow:\n      auto</code> + fixed height). By default, it does. Giving\n      this <code>height: auto; overflow: visible;</code> will cause\n      the editor to resize to fit its content.</dd>\n\n      <dt id=\"class_CodeMirror_focused\"><code>CodeMirror-focused</code></dt>\n      <dd>Whenever the editor is focused, the top element gets this\n      class. This is used to hide the cursor and give the selection a\n      different color when the editor is not focused.</dd>\n\n      <dt id=\"class_CodeMirror_gutter\"><code>CodeMirror-gutter</code></dt>\n      <dd>Use this for giving a background or a border to the editor\n      gutter. Don't set any padding here,\n      use <code>CodeMirror-gutter-text</code> for that. By default,\n      the gutter is 'fluid', meaning it will adjust its width to the\n      maximum line number or line marker width. You can also set a\n      fixed width if you want.</dd>\n\n      <dt id=\"class_CodeMirror_gutter_text\"><code>CodeMirror-gutter-text</code></dt>\n      <dd>Used to style the actual line numbers. For the numbers to\n      line up, you must make sure that the font in the gutter is the\n      same as the one in the rest of the editor, so you should\n      probably only set font style and size in\n      the <code>CodeMirror</code> class.</dd>\n\n      <dt id=\"class_CodeMirror_lines\"><code>CodeMirror-lines</code></dt>\n      <dd>The visible lines. If this has vertical\n      padding, <code>CodeMirror-gutter</code> should have the same\n      padding.</dd>\n\n      <dt id=\"class_CodeMirror_cursor\"><code>CodeMirror-cursor</code></dt>\n      <dd>The cursor is a block element that is absolutely positioned.\n      You can make it look whichever way you want.</dd>\n\n      <dt id=\"class_CodeMirror_selected\"><code>CodeMirror-selected</code></dt>\n      <dd>The selection is represented by <code>span</code> elements\n      with this class.</dd>\n\n      <dt id=\"class_CodeMirror_matchingbracket\"><code>CodeMirror-matchingbracket</code>,\n        <code>CodeMirror-nonmatchingbracket</code></dt>\n      <dd>These are used to style matched (or unmatched) brackets.</dd>\n    </dl>\n\n    <p>The actual lines, as well as the cursor, are represented\n    by <code>pre</code> elements. By default no text styling (such as\n    bold) that might change line height is applied. If you do want\n    such effects, you'll have to give <code>CodeMirror pre</code> a\n    fixed height. Also, you must still take care that character width\n    is constant.</p>\n\n    <p>If your page's style sheets do funky things to\n    all <code>div</code> or <code>pre</code> elements (you probably\n    shouldn't do that), you'll have to define rules to cancel these\n    effects out again for elements under the <code>CodeMirror</code>\n    class.</p>\n\n    <p>Themes are also simply CSS files, which define colors for\n    various syntactic elements. See the files in\n    the <a href=\"../theme/\"><code>theme</code></a> directory.</p>\n\n    <h2 id=\"api\">Programming API</h2>\n\n    <p>A lot of CodeMirror features are only available through its API.\n    This has the disadvantage that you need to do work to enable them,\n    and the advantage that CodeMirror will fit seamlessly into your\n    application.</p>\n\n    <p>Whenever points in the document are represented, the API uses\n    objects with <code>line</code> and <code>ch</code> properties.\n    Both are zero-based. CodeMirror makes sure to 'clip' any positions\n    passed by client code so that they fit inside the document, so you\n    shouldn't worry too much about sanitizing your coordinates. If you\n    give <code>ch</code> a value of <code>null</code>, or don't\n    specify it, it will be replaced with the length of the specified\n    line.</p>\n\n    <dl>\n      <dt id=\"getValue\"><code>getValue() → string</code></dt>\n      <dd>Get the current editor content.</dd>\n      <dt id=\"setValue\"><code>setValue(string)</code></dt>\n      <dd>Set the editor content.</dd>\n\n      <dt id=\"getSelection\"><code>getSelection() → string</code></dt>\n      <dd>Get the currently selected code.</dd>\n      <dt id=\"replaceSelection\"><code>replaceSelection(string)</code></dt>\n      <dd>Replace the selection with the given string.</dd>\n\n      <dt id=\"focus\"><code>focus()</code></dt>\n      <dd>Give the editor focus.</dd>\n      <dt id=\"scrollTo\"><code>scrollTo(x, y)</code></dt>\n      <dd>Scroll the editor to a given (pixel) position. Both\n      arguments may be left as <code>null</code>\n      or <code>undefined</code> to have no effect.</dd>\n\n      <dt id=\"setOption\"><code>setOption(option, value)</code></dt>\n      <dd>Change the configuration of the editor. <code>option</code>\n      should the name of an <a href=\"#config\">option</a>,\n      and <code>value</code> should be a valid value for that\n      option.</dd>\n      <dt id=\"getOption\"><code>getOption(option) → value</code></dt>\n      <dd>Retrieves the current value of the given option for this\n      editor instance.</dd>\n\n      <dt id=\"cursorCoords\"><code>cursorCoords(start, mode) → object</code></dt>\n      <dd>Returns an <code>{x, y, yBot}</code> object containing the\n      coordinates of the cursor. If <code>mode</code>\n      is <code>\"local\"</code>, they will be relative to the top-left\n      corner of the editable document. If it is <code>\"page\"</code> or\n      not given, they are relative to the top-left corner of the\n      page. <code>yBot</code> is the coordinate of the bottom of the\n      cursor. <code>start</code> is a boolean indicating whether you\n      want the start or the end of the selection.</dd>\n      <dt id=\"charCoords\"><code>charCoords(pos, mode) → object</code></dt>\n      <dd>Like <code>cursorCoords</code>, but returns the position of\n      an arbitrary characters. <code>pos</code> should be\n      a <code>{line, ch}</code> object.</dd>\n      <dt id=\"coordsChar\"><code>coordsChar(object) → pos</code></dt>\n      <dd>Given an <code>{x, y}</code> object (in page coordinates),\n      returns the <code>{line, ch}</code> position that corresponds to\n      it.</dd>\n\n      <dt id=\"undo\"><code>undo()</code></dt>\n      <dd>Undo one edit (if any undo events are stored).</dd>\n      <dt id=\"redo\"><code>redo()</code></dt>\n      <dd>Redo one undone edit.</dd>\n      <dt id=\"historySize\"><code>historySize() → object</code></dt>\n      <dd>Returns an object with <code>{undo, redo}</code> properties,\n      both of which hold integers, indicating the amount of stored\n      undo and redo operations.</dd>\n      <dt id=\"clearHistory\"><code>clearHistory()</code></dt>\n      <dd>Clears the editor's undo history.</dd>\n\n      <dt id=\"indentLine\"><code>indentLine(line, dir)</code></dt>\n      <dd>Reset the given line's indentation to the indentation\n      prescribed by the mode. If the second argument is given,\n      indentation will be increased (if <code>dir</code> is true) or\n      decreased (if false) by an <a href=\"#option_indentUnit\">indent\n      unit</a> instead.</dd>\n\n      <dt id=\"getTokenAt\"><code>getTokenAt(pos) → object</code></dt>\n      <dd>Retrieves information about the token the current mode found\n      at the given position (a <code>{line, ch}</code> object). The\n      returned object has the following properties:\n      <dl>\n        <dt><code>start</code></dt><dd>The character (on the given line) at which the token starts.</dd>\n        <dt><code>end</code></dt><dd>The character at which the token ends.</dd>\n        <dt><code>string</code></dt><dd>The token's string.</dd>\n        <dt><code>className</code></dt><dd>The class the mode assigned\n        to the token. (Can be null when no class was assigned.)</dd>\n        <dt><code>state</code></dt><dd>The mode's state at the end of this token.</dd>\n      </dl></dd>\n\n      <dt id=\"markText\"><code>markText(from, to, className) → object</code></dt>\n      <dd>Can be used to mark a range of text with a specific CSS\n      class name. <code>from</code> and <code>to</code> should\n      be <code>{line, ch}</code> objects. The method will return an\n      object with two methods, <code>clear()</code>, which removes the\n      mark, and <code>find()</code>, which returns a <code>{from,\n      to}</code> (both document positions), indicating the current\n      position of the marked range.</dd>\n\n      <dt id=\"setBookmark\"><code>setBookmark(pos) → object</code></dt>\n      <dd>Inserts a bookmark, a handle that follows the text around it\n      as it is being edited, at the given position. A bookmark has two\n      methods <code>find()</code> and <code>clear()</code>. The first\n      returns the current position of the bookmark, if it is still in\n      the document, and the second explicitly removes the\n      bookmark.</dd>\n\n      <dt id=\"findMarksAt\"><code>findMarksAt(pos) → array</code></dt>\n      <dd>Returns an array of all the bookmarks and marked ranges\n      present at the given position.</dd>\n\n      <dt id=\"setMarker\"><code>setMarker(line, text, className) → lineHandle</code></dt>\n      <dd>Add a gutter marker for the given line. Gutter markers are\n      shown in the line-number area (instead of the number for this\n      line). Both <code>text</code> and <code>className</code> are\n      optional. Setting <code>text</code> to a Unicode character like\n      ● tends to give a nice effect. To put a picture in the gutter,\n      set <code>text</code> to a space and <code>className</code> to\n      something that sets a background image. If you\n      specify <code>text</code>, the given text (which may contain\n      HTML) will, by default, replace the line number for that line.\n      If this is not what you want, you can include the\n      string <code>%N%</code> in the text, which will be replaced by\n      the line number.</dd>\n      <dt id=\"clearMarker\"><code>clearMarker(line)</code></dt>\n      <dd>Clears a marker created\n      with <code>setMarker</code>. <code>line</code> can be either a\n      number or a handle returned by <code>setMarker</code> (since a\n      number may now refer to a different line if something was added\n      or deleted).</dd>\n      <dt id=\"setLineClass\"><code>setLineClass(line, className, backgroundClassName) → lineHandle</code></dt>\n      <dd>Set a CSS class name for the given line. <code>line</code>\n      can be a number or a line handle (as returned\n      by <code>setMarker</code> or this\n      function). <code>className</code> will be used to style the text\n      for the line, and <code>backgroundClassName</code> to style its\n      background (which lies behind the selection).\n      Pass <code>null</code> to clear the classes for a line.</dd>\n      <dt id=\"hideLine\"><code>hideLine(line) → lineHandle</code></dt>\n      <dd>Hide the given line (either by number or by handle). Hidden\n      lines don't show up in the editor, and their numbers are skipped\n      when <a href=\"#option_lineNumbers\">line numbers</a> are enabled.\n      Deleting a region around them does delete them, and coping a\n      region around will include them in the copied text.</dd>\n      <dt id=\"showLine\"><code>showLine(line) → lineHandle</code></dt>\n      <dd>The inverse of <code>hideLine</code>—re-shows a previously\n      hidden line, by number or by handle.</dd>\n\n      <dt id=\"onDeleteLine\"><code>onDeleteLine(line, func)</code></dt>\n      <dd>Register a function that should be called when the line is\n      deleted from the document.</dd>\n\n      <dt id=\"lineInfo\"><code>lineInfo(line) → object</code></dt>\n      <dd>Returns the line number, text content, and marker status of\n      the given line, which can be either a number or a handle\n      returned by <code>setMarker</code>. The returned object has the\n      structure <code>{line, handle, text, markerText, markerClass,\n      lineClass, bgClass}</code>.</dd>\n\n      <dt id=\"getLineHandle\"><code>getLineHandle(num) → lineHandle</code></dt>\n      <dd>Fetches the line handle for the given line number.</dd>\n\n      <dt id=\"addWidget\"><code>addWidget(pos, node, scrollIntoView)</code></dt>\n      <dd>Puts <code>node</code>, which should be an absolutely\n      positioned DOM node, into the editor, positioned right below the\n      given <code>{line, ch}</code> position.\n      When <code>scrollIntoView</code> is true, the editor will ensure\n      that the entire node is visible (if possible). To remove the\n      widget again, simply use DOM methods (move it somewhere else, or\n      call <code>removeChild</code> on its parent).</dd>\n\n      <dt id=\"matchBrackets\"><code>matchBrackets()</code></dt>\n      <dd>Force matching-bracket-highlighting to happen.</dd>\n\n      <dt id=\"lineCount\"><code>lineCount() → number</code></dt>\n      <dd>Get the number of lines in the editor.</dd>\n\n      <dt id=\"getCursor\"><code>getCursor(start) → object</code></dt>\n      <dd><code>start</code> is a boolean indicating whether the start\n      or the end of the selection must be retrieved. If it is not\n      given, the current cursor pos, i.e. the side of the selection\n      that would move if you pressed an arrow key, is chosen.\n      A <code>{line, ch}</code> object will be returned.</dd>\n      <dt id=\"somethingSelected\"><code>somethingSelected() → boolean</code></dt>\n      <dd>Return true if any text is selected.</dd>\n      <dt id=\"setCursor\"><code>setCursor(pos)</code></dt>\n      <dd>Set the cursor position. You can either pass a\n      single <code>{line, ch}</code> object, or the line and the\n      character as two separate parameters.</dd>\n      <dt id=\"setSelection\"><code>setSelection(start, end)</code></dt>\n      <dd>Set the selection range. <code>start</code>\n      and <code>end</code> should be <code>{line, ch}</code> objects.</dd>\n\n      <dt id=\"getLine\"><code>getLine(n) → string</code></dt>\n      <dd>Get the content of line <code>n</code>.</dd>\n      <dt id=\"setLine\"><code>setLine(n, text)</code></dt>\n      <dd>Set the content of line <code>n</code>.</dd>\n      <dt id=\"removeLine\"><code>removeLine(n)</code></dt>\n      <dd>Remove the given line from the document.</dd>\n\n      <dt id=\"getRange\"><code>getRange(from, to) → string</code></td>\n      <dd>Get the text between the given points in the editor, which\n      should be <code>{line, ch}</code> objects.</dd>\n      <dt id=\"replaceRange\"><code>replaceRange(string, from, to)</code></dt>\n      <dd>Replace the part of the document between <code>from</code>\n      and <code>to</code> with the given string. <code>from</code>\n      and <code>to</code> must be <code>{line, ch}</code>\n      objects. <code>to</code> can be left off to simply insert the\n      string at position <code>from</code>.</dd>\n\n      <dt id=\"posFromIndex\"><code>posFromIndex(index) → object</code></dt>\n      <dd>Calculates and returns a <code>{line, ch}</code> object for a\n      zero-based <code>index</code> who's value is relative to the start of the\n      editor's text. If the <code>index</code> is out of range of the text then\n      the returned object is clipped to start or end of the text\n      respectively.</dd>\n      <dt id=\"indexFromPos\"><code>indexFromPos(object) → number</code></dt>\n      <dd>The reverse of <a href=\"#posFromIndex\"><code>posFromIndex</code></a>.</dd>\n    </dl>\n\n    <p>The following are more low-level methods:</p>\n\n    <dl>\n      <dt id=\"operation\"><code>operation(func) → result</code></dt>\n      <dd>CodeMirror internally buffers changes and only updates its\n      DOM structure after it has finished performing some operation.\n      If you need to perform a lot of operations on a CodeMirror\n      instance, you can call this method with a function argument. It\n      will call the function, buffering up all changes, and only doing\n      the expensive update after the function returns. This can be a\n      lot faster. The return value from this method will be the return\n      value of your function.</dd>\n\n      <dt id=\"compoundChange\"><code>compoundChange(func) → result</code></dt>\n      <dd>Will call the given function (and return its result),\n      combining all changes made while that function executes into a\n      single undo event.</dd>\n\n      <dt id=\"refresh\"><code>refresh()</code></dt>\n      <dd>If your code does something to change the size of the editor\n      element (window resizes are already listened for), or unhides\n      it, you should probably follow up by calling this method to\n      ensure CodeMirror is still looking as intended.</dd>\n\n      <dt id=\"getInputField\"><code>getInputField() → textarea</code></dt>\n      <dd>Returns the hidden textarea used to read input.</dd>\n      <dt id=\"getWrapperElement\"><code>getWrapperElement() → node</code></dt>\n      <dd>Returns the DOM node that represents the editor. Remove this\n      from your tree to delete an editor instance.</dd>\n      <dt id=\"getScrollerElement\"><code>getScrollerElement() → node</code></dt>\n      <dd>Returns the DOM node that is responsible for the sizing and\n      the scrolling of the editor. You can change\n      the <code>height</code> and <code>width</code> styles of this\n      element to resize an editor. (You might have to call\n      the <a href=\"#refresh\"><code>refresh</code></a> method\n      afterwards.)</dd>\n      <dt id=\"getGutterElement\"><code>getGutterElement() → node</code></dt>\n      <dd>Fetches the DOM node that represents the editor gutter.</dd>\n\n      <dt id=\"getStateAfter\"><code>getStateAfter(line) → state</code></dt>\n      <dd>Returns the mode's parser state, if any, at the end of the\n      given line number. If no line number is given, the state at the\n      end of the document is returned. This can be useful for storing\n      parsing errors in the state, or getting other kinds of\n      contextual information for a line.</dd>\n    </dl>\n\n    <p id=\"fromTextArea\">Finally, the <code>CodeMirror</code> object\n    itself has a method <code>fromTextArea</code>. This takes a\n    textarea DOM node as first argument and an optional configuration\n    object as second. It will replace the textarea with a CodeMirror\n    instance, and wire up the form of that textarea (if any) to make\n    sure the editor contents are put into the textarea when the form\n    is submitted. A CodeMirror instance created this way has two\n    additional methods:</p>\n\n    <dl>\n      <dt id=\"save\"><code>save()</code></dt>\n      <dd>Copy the content of the editor into the textarea.</dd>\n\n      <dt id=\"toTextArea\"><code>toTextArea()</code></dt>\n      <dd>Remove the editor, and restore the original textarea (with\n      the editor's current content).</dd>\n\n      <dt id=\"getTextArea\"><code>getTextArea() → textarea</code></dt>\n      <dd>Returns the textarea that the instance was based on.</dd>\n    </dl>\n\n    <p id=\"defineExtension\">If you want to define extra methods in terms\n    of the CodeMirror API, it is possible to\n    use <code>CodeMirror.defineExtension(name, value)</code>. This\n    will cause the given value (usually a method) to be added to all\n    CodeMirror instances created from then on.</p>\n\n    <h2 id=\"addons\">Add-ons</h2>\n\n    <p>The <code>lib/util</code> directory in the distribution\n    contains a number of reusable components that implement extra\n    editor functionality. In brief, they are:</p>\n\n    <dl>\n      <dt id=\"util_dialog\"><a href=\"../lib/util/dialog.js\"><code>dialog.js</code></a></dt>\n      <dd>Provides a very simple way to query users for text input.\n      Adds an <code>openDialog</code> method to CodeMirror instances,\n      which can be called with an HTML fragment that provides the\n      prompt (should include an <code>input</code> tag), and a\n      callback function that is called when text has been entered.\n      Depends on <code>lib/util/dialog.css</code>.</dd>\n      <dt id=\"util_searchcursor\"><a href=\"../lib/util/searchcursor.js\"><code>searchcursor.js</code></a></dt>\n      <dd>Adds the <code>getSearchCursor(query, start, caseFold) →\n      cursor</code> method to CodeMirror instances, which can be used\n      to implement search/replace functionality. <code>query</code>\n      can be a regular expression or a string (only strings will match\n      across lines—if they contain newlines). <code>start</code>\n      provides the starting position of the search. It can be\n      a <code>{line, ch}</code> object, or can be left off to default\n      to the start of the document. <code>caseFold</code> is only\n      relevant when matching a string. It will cause the search to be\n      case-insensitive. A search cursor has the following methods:\n        <dl>\n          <dt><code>findNext(), findPrevious() → boolean</code></dt>\n          <dd>Search forward or backward from the current position.\n          The return value indicates whether a match was found. If\n          matching a regular expression, the return value will be the\n          array returned by the <code>match</code> method, in case you\n          want to extract matched groups.</dd>\n          <dt><code>from(), to() → object</code></dt>\n          <dd>These are only valid when the last call\n          to <code>findNext</code> or <code>findPrevious</code> did\n          not return false. They will return <code>{line, ch}</code>\n          objects pointing at the start and end of the match.</dd>\n          <dt><code>replace(text)</code></dt>\n          <dd>Replaces the currently found match with the given text\n          and adjusts the cursor position to reflect the\n          replacement.</dd>\n        </dl></dd>\n\n      <dt id=\"util_search\"><a href=\"../lib/util/search.js\"><code>search.js</code></a></dt>\n      <dd>Implements the search commands. CodeMirror has keys bound to\n      these by default, but will not do anything with them unless an\n      implementation is provided. Depends\n      on <code>searchcursor.js</code>, and will make use\n      of <a href=\"#util_dialog\"><code>openDialog</code></a> when\n      available to make prompting for search queries less ugly.</dd>\n      <dt id=\"util_foldcode\"><a href=\"../lib/util/foldcode.js\"><code>foldcode.js</code></a></dt>\n      <dd>Helps with code folding.\n      See <a href=\"../demo/folding.html\">the demo</a> for an example.\n      Call <code>CodeMirror.newFoldFunction</code> with a range-finder\n      helper function to create a function that will, when applied to\n      a CodeMirror instance and a line number, attempt to fold or\n      unfold the block starting at the given line. A range-finder is a\n      language-specific function that also takes an instance and a\n      line number, and returns an end line for the block, or null if\n      no block is started on that line. This file\n      provides <code>CodeMirror.braceRangeFinder</code>, which finds\n      blocks in brace languages (JavaScript, C, Java,\n      etc), <code>CodeMirror.indentRangeFinder</code>, for languages\n      where indentation determines block structure (Python, Haskell),\n      and <code>CodeMirror.tagRangeFinder</code>, for XML-style\n      languages.</dd>\n      <dt id=\"util_runmode\"><a href=\"../lib/util/runmode.js\"><code>runmode.js</code></a></dt>\n      <dd>Can be used to run a CodeMirror mode over text without\n      actually opening an editor instance.\n      See <a href=\"../demo/runmode.html\">the demo</a> for an\n      example.</dd>\n      <dt id=\"util_simple-hint\"><a href=\"../lib/util/simple-hint.js\"><code>simple-hint.js</code></a></dt>\n      <dd>Provides a framework for showing autocompletion hints.\n      Defines <code>CodeMirror.simpleHint</code>, which takes a\n      CodeMirror instance and a hinting function, and pops up a widget\n      that allows the user to select a completion. Hinting functions\n      are function that take an editor instance, and return\n      a <code>{list, from, to}</code> object, where <code>list</code>\n      is an array of strings (the completions), and <code>from</code>\n      and <code>to</code> give the start and end of the token that is\n      being completed. Depends\n      on <code>lib/util/simple-hint.css</code>.</dd>\n      <dt id=\"util_javascript-hint\"><a href=\"../lib/util/javascript-hint.js\"><code>javascript-hint.js</code></a></dt>\n      <dd>Defines <code>CodeMirror.javascriptHint</code>\n      and <code>CodeMirror.coffeescriptHint</code>, which are simple\n      hinting functions for the JavaScript and CoffeeScript\n      modes.</dd>\n      <dt id=\"util_match-highlighter\"><a href=\"../lib/util/match-highlighter.js\"><code>match-highlighter.js</code></a></dt>\n      <dd>Adds a <code>matchHighlight</code> method to CodeMirror\n      instances that can be called (typically from\n      a <a href=\"#option_onCursorActivity\"><code>onCursorActivity</code></a>\n      handler) to highlight all instances of a currently selected word\n      with the a classname given as a first argument to the method.\n      Depends on\n      the <a href=\"#util_searchcursor\"><code>searchcursor</code></a>\n      add-on. Demo <a href=\"../demo/matchhighlighter.html\">here</a>.</dd>\n      <dt id=\"util_closetag\"><a href=\"../lib/util/closetag.js\"><code>closetag.js</code></a></dt>\n      <dd>Provides utility functions for adding automatic tag closing\n      to XML modes. See\n      the <a href=\"../demo/closetag.html\">demo</a>.</dd>\n      <dt id=\"util_loadmode\"><a href=\"../lib/util/loadmode.js\"><code>loadmode.js</code></a></dt>\n      <dd>Defines a <code>CodeMirror.requireMode(modename,\n      callback)</code> function that will try to load a given mode and\n      call the callback when it succeeded. You'll have to\n      set <code>CodeMirror.modeURL</code> to a string that mode paths\n      can be constructed from, for\n      example <code>\"mode/%N/%N.js\"</code>—the <code>%N</code>'s will\n      be replaced with the mode name. Also\n      defines <code>CodeMirror.autoLoadMode(instance, mode)</code>,\n      which will ensure the given mode is loaded and cause the given\n      editor instance to refresh its mode when the loading\n      succeeded. See the <a href=\"../demo/loadmode.html\">demo</a>.</dd>\n    </dl>\n\n    <h2 id=\"modeapi\">Writing CodeMirror Modes</h2>\n\n    <p>Modes typically consist of a single JavaScript file. This file\n    defines, in the simplest case, a lexer (tokenizer) for your\n    language—a function that takes a character stream as input,\n    advances it past a token, and returns a style for that token. More\n    advanced modes can also handle indentation for the language.</p>\n\n    <p id=\"defineMode\">The mode script should\n    call <code>CodeMirror.defineMode</code> to register itself with\n    CodeMirror. This function takes two arguments. The first should be\n    the name of the mode, for which you should use a lowercase string,\n    preferably one that is also the name of the files that define the\n    mode (i.e. <code>\"xml\"</code> is defined <code>xml.js</code>). The\n    second argument should be a function that, given a CodeMirror\n    configuration object (the thing passed to\n    the <code>CodeMirror</code> function) and an optional mode\n    configuration object (as in\n    the <a href=\"#option_mode\"><code>mode</code></a> option), returns\n    a mode object.</p>\n\n    <p>Typically, you should use this second argument\n    to <code>defineMode</code> as your module scope function (modes\n    should not leak anything into the global scope!), i.e. write your\n    whole mode inside this function.</p>\n\n    <p>The main responsibility of a mode script is <em>parsing</em>\n    the content of the editor. Depending on the language and the\n    amount of functionality desired, this can be done in really easy\n    or extremely complicated ways. Some parsers can be stateless,\n    meaning that they look at one element (<em>token</em>) of the code\n    at a time, with no memory of what came before. Most, however, will\n    need to remember something. This is done by using a <em>state\n    object</em>, which is an object that is always passed when\n    reading a token, and which can be mutated by the tokenizer.</p>\n\n    <p id=\"startState\">Modes that use a state must define\n    a <code>startState</code> method on their mode object. This is a\n    function of no arguments that produces a state object to be used\n    at the start of a document.</p>\n\n    <p id=\"token\">The most important part of a mode object is\n    its <code>token(stream, state)</code> method. All modes must\n    define this method. It should read one token from the stream it is\n    given as an argument, optionally update its state, and return a\n    style string, or <code>null</code> for tokens that do not have to\n    be styled. For your styles, you can either use the 'standard' ones\n    defined in the themes (without the <code>cm-</code> prefix), or\n    define your own and have people include a custom CSS file for your\n    mode.<p>\n\n    <p id=\"StringStream\">The stream object encapsulates a line of code\n    (tokens may never span lines) and our current position in that\n    line. It has the following API:</p>\n\n    <dl>\n      <dt><code>eol() → boolean</code></dt>\n      <dd>Returns true only if the stream is at the end of the\n      line.</dd>\n      <dt><code>sol() → boolean</code></dt>\n      <dd>Returns true only if the stream is at the start of the\n      line.</dd>\n\n      <dt><code>peek() → character</code></dt>\n      <dd>Returns the next character in the stream without advancing\n      it. Will return <code>undefined</code> at the end of the\n      line.</dd>\n      <dt><code>next() → character</code></dt>\n      <dd>Returns the next character in the stream and advances it.\n      Also returns <code>undefined</code> when no more characters are\n      available.</dd>\n\n      <dt><code>eat(match) → character</code></dt>\n      <dd><code>match</code> can be a character, a regular expression,\n      or a function that takes a character and returns a boolean. If\n      the next character in the stream 'matches' the given argument,\n      it is consumed and returned. Otherwise, <code>undefined</code>\n      is returned.</dd>\n      <dt><code>eatWhile(match) → boolean</code></dt>\n      <dd>Repeatedly calls <code>eat</code> with the given argument,\n      until it fails. Returns true if any characters were eaten.</dd>\n      <dt><code>eatSpace() → boolean</code></dt>\n      <dd>Shortcut for <code>eatWhile</code> when matching\n      white-space.</dd>\n      <dt><code>skipToEnd()</code></dt>\n      <dd>Moves the position to the end of the line.</dd>\n      <dt><code>skipTo(ch) → boolean</code></dt>\n      <dd>Skips to the next occurrence of the given character, if\n      found on the current line (doesn't advance the stream if the\n      character does not occur on the line). Returns true if the\n      character was found.</dd>\n      <dt><code>match(pattern, consume, caseFold) → boolean</code></dt>\n      <dd>Act like a\n      multi-character <code>eat</code>—if <code>consume</code> is true\n      or not given—or a look-ahead that doesn't update the stream\n      position—if it is false. <code>pattern</code> can be either a\n      string or a regular expression starting with <code>^</code>.\n      When it is a string, <code>caseFold</code> can be set to true to\n      make the match case-insensitive. When successfully matching a\n      regular expression, the returned value will be the array\n      returned by <code>match</code>, in case you need to extract\n      matched groups.</dd>\n\n      <dt><code>backUp(n)</code></dt>\n      <dd>Backs up the stream <code>n</code> characters. Backing it up\n      further than the start of the current token will cause things to\n      break, so be careful.</dd>\n      <dt><code>column() → integer</code></dt>\n      <dd>Returns the column (taking into account tabs) at which the\n      current token starts. Can be used to find out whether a token\n      starts a new line.</dd>\n      <dt><code>indentation() → integer</code></dt>\n      <dd>Tells you how far the current line has been indented, in\n      spaces. Corrects for tab characters.</dd>\n\n      <dt><code>current() → string</code></dt>\n      <dd>Get the string between the start of the current token and\n      the current stream position.</dd>\n    </dl>\n\n    <p id=\"blankLine\">By default, blank lines are simply skipped when\n    tokenizing a document. For languages that have significant blank\n    lines, you can define a <code>blankLine(state)</code> method on\n    your mode that will get called whenever a blank line is passed\n    over, so that it can update the parser state.</p>\n\n    <p id=\"copyState\">Because state object are mutated, and CodeMirror\n    needs to keep valid versions of a state around so that it can\n    restart a parse at any line, copies must be made of state objects.\n    The default algorithm used is that a new state object is created,\n    which gets all the properties of the old object. Any properties\n    which hold arrays get a copy of these arrays (since arrays tend to\n    be used as mutable stacks). When this is not correct, for example\n    because a mode mutates non-array properties of its state object, a\n    mode object should define a <code>copyState</code> method,\n    which is given a state and should return a safe copy of that\n    state.</p>\n\n    <p id=\"compareStates\">By default, CodeMirror will stop re-parsing\n    a document as soon as it encounters a few lines that were\n    highlighted the same in the old parse as in the new one. It is\n    possible to provide an explicit way to test whether a state is\n    equivalent to another one, which CodeMirror will use (instead of\n    the unchanged-lines heuristic) to decide when to stop\n    highlighting. You do this by providing\n    a <code>compareStates</code> method on your mode object, which\n    takes two state arguments and returns a boolean indicating whether\n    they are equivalent. See the XML mode, which uses this to provide\n    reliable highlighting of bad closing tags, as an example.</p>\n\n    <p id=\"indent\">If you want your mode to provide smart indentation\n    (though the <a href=\"#indentLine\"><code>indentLine</code></a>\n    method and the <code>indentAuto</code>\n    and <code>newlineAndIndent</code> commands, which keys can be\n    <a href=\"#option_extraKeys\">bound</a> to), you must define\n    an <code>indent(state, textAfter)</code> method on your mode\n    object.</p>\n\n    <p>The indentation method should inspect the given state object,\n    and optionally the <code>textAfter</code> string, which contains\n    the text on the line that is being indented, and return an\n    integer, the amount of spaces to indent. It should usually take\n    the <a href=\"#option_indentUnit\"><code>indentUnit</code></a>\n    option into account.</p>\n\n    <p id=\"electricChars\">Finally, a mode may define\n    an <code>electricChars</code> property, which should hold a string\n    containing all the characters that should trigger the behaviour\n    described for\n    the <a href=\"#option_electricChars\"><code>electricChars</code></a>\n    option.</p>\n\n    <p>So, to summarize, a mode <em>must</em> provide\n    a <code>token</code> method, and it <em>may</em>\n    provide <code>startState</code>, <code>copyState</code>,\n    <code>compareStates</code>, and <code>indent</code> methods. For\n    an example of a trivial mode, see\n    the <a href=\"../mode/diff/diff.js\">diff mode</a>, for a more involved\n    example, see the <a href=\"../mode/clike/clike.js\">C-like\n    mode</a>.</p>\n\n    <p>Sometimes, it is useful for modes to <em>nest</em>—to have one\n    mode delegate work to another mode. An example of this kind of\n    mode is the <a href=\"../mode/htmlmixed/htmlmixed.js\">mixed-mode HTML\n    mode</a>. To implement such nesting, it is usually necessary to\n    create mode objects and copy states yourself. To create a mode\n    object, there are <code>CodeMirror.getMode(options,\n    parserConfig)</code>, where the first argument is a configuration\n    object as passed to the mode constructor function, and the second\n    argument is a mode specification as in\n    the <a href=\"#option_mode\"><code>mode</code></a> option. To copy a\n    state object, call <code>CodeMirror.copyState(mode, state)</code>,\n    where <code>mode</code> is the mode that created the given\n    state.</p>\n\n    <p>To make indentation work properly in a nested parser, it is\n    advisable to give the <code>startState</code> method of modes that\n    are intended to be nested an optional argument that provides the\n    base indentation for the block of code. The JavaScript and CSS\n    parser do this, for example, to allow JavaScript and CSS code\n    inside the mixed-mode HTML mode to be properly indented.</p>\n\n    <p>Finally, it is possible to associate your mode, or a certain\n    configuration of your mode, with\n    a <a href=\"http://en.wikipedia.org/wiki/MIME\">MIME</a> type. For\n    example, the JavaScript mode associates itself\n    with <code>text/javascript</code>, and its JSON variant\n    with <code>application/json</code>. To do this,\n    call <code>CodeMirror.defineMIME(mime, modeSpec)</code>,\n    where <code>modeSpec</code> can be a string or object specifying a\n    mode, as in the <a href=\"#option_mode\"><code>mode</code></a>\n    option.</p>\n\n</div><div class=\"rightsmall blk\">\n\n    <h2>Contents</h2>\n\n    <ul>\n      <li><a href=\"#overview\">Overview</a></li>\n      <li><a href=\"#usage\">Basic Usage</a></li>\n      <li><a href=\"#config\">Configuration</a></li>\n      <li><a href=\"#keymaps\">Keymaps</a></li>\n      <li><a href=\"#styling\">Customized Styling</a></li>\n      <li><a href=\"#api\">Programming API</a></li>\n      <li><a href=\"#addons\">Add-ons</a></li>\n      <li><a href=\"#modeapi\">Writing CodeMirror Modes</a></li>\n    </ul>\n\n</div></div>\n\n<div style=\"height: 2em\">&nbsp;</div>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/doc/oldrelease.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror</title>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans:bold\"/>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"docs.css\"/>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n    <link rel=\"alternate\" href=\"http://twitter.com/statuses/user_timeline/242283288.rss\" type=\"application/rss+xml\"/>\n  </head>\n  <body>\n\n<h1><span class=\"logo-braces\">{ }</span> <a href=\"http://codemirror.net/\">CodeMirror</a></h1>\n\n<pre class=\"grey\">\n<img src=\"baboon.png\" class=\"logo\" alt=\"logo\"/>/* Old release history */\n\n</pre>\n\n  <p class=\"rel\">23-08-2011: <a href=\"http://codemirror.net/codemirror-2.13.zip\">Version 2.13</a>:</p>\n  <ul class=\"rel-note\">\n    <li>Add <a href=\"../mode/ruby/index.html\">Ruby</a>, <a href=\"../mode/r/index.html\">R</a>, <a href=\"../mode/coffeescript/index.html\">CoffeeScript</a>, and <a href=\"../mode/velocity/index.html\">Velocity</a> modes.</li>\n    <li>Add <a href=\"manual.html#getGutterElement\"><code>getGutterElement</code></a> to API.</li>\n    <li>Several fixes to scrolling and positioning.</li>\n    <li>Add <a href=\"manual.html#option_smartHome\"><code>smartHome</code></a> option.</li>\n    <li>Add an experimental <a href=\"../mode/xmlpure/index.html\">pure XML</a> mode.</li>\n  </ul>\n\n  <p class=\"rel\">25-07-2011: <a href=\"http://codemirror.net/codemirror-2.12.zip\">Version 2.12</a>:</p>\n  <ul class=\"rel-note\">\n    <li>Add a <a href=\"../mode/sparql/index.html\">SPARQL</a> mode.</li>\n    <li>Fix bug with cursor jumping around in an unfocused editor in IE.</li>\n    <li>Allow key and mouse events to bubble out of the editor. Ignore widget clicks.</li>\n    <li>Solve cursor flakiness after undo/redo.</li>\n    <li>Fix block-reindent ignoring the last few lines.</li>\n    <li>Fix parsing of multi-line attrs in XML mode.</li>\n    <li>Use <code>innerHTML</code> for HTML-escaping.</li>\n    <li>Some fixes to indentation in C-like mode.</li>\n    <li>Shrink horiz scrollbars when long lines removed.</li>\n    <li>Fix width feedback loop bug that caused the width of an inner DIV to shrink.</li>\n  </ul>\n\n  <p class=\"rel\">04-07-2011: <a href=\"http://codemirror.net/codemirror-2.11.zip\">Version 2.11</a>:</p>\n  <ul class=\"rel-note\">\n    <li>Add a <a href=\"../mode/scheme/index.html\">Scheme mode</a>.</li>\n    <li>Add a <code>replace</code> method to search cursors, for cursor-preserving replacements.</li>\n    <li>Make the <a href=\"../mode/clike/index.html\">C-like mode</a> mode more customizable.</li>\n    <li>Update XML mode to spot mismatched tags.</li>\n    <li>Add <code>getStateAfter</code> API and <code>compareState</code> mode API methods for finer-grained mode magic.</li>\n    <li>Add a <code>getScrollerElement</code> API method to manipulate the scrolling DIV.</li>\n    <li>Fix drag-and-drop for Firefox.</li>\n    <li>Add a C# configuration for the <a href=\"../mode/clike/index.html\">C-like mode</a>.</li>\n    <li>Add <a href=\"../demo/fullscreen.html\">full-screen editing</a> and <a href=\"../demo/changemode.html\">mode-changing</a> demos.</li>\n  </ul>\n\n  <p class=\"rel\">07-06-2011: <a href=\"http://codemirror.net/codemirror-2.1.zip\">Version 2.1</a>:</p>\n  <p class=\"rel-note\">Add\n  a <a href=\"manual.html#option_theme\">theme</a> system\n  (<a href=\"../demo/theme.html\">demo</a>). Note that this is not\n  backwards-compatible—you'll have to update your styles and\n  modes!</p>\n\n  <p class=\"rel\">07-06-2011: <a href=\"http://codemirror.net/codemirror-2.02.zip\">Version 2.02</a>:</p>\n  <ul class=\"rel-note\">\n    <li>Add a <a href=\"../mode/lua/index.html\">Lua mode</a>.</li>\n    <li>Fix reverse-searching for a regexp.</li>\n    <li>Empty lines can no longer break highlighting.</li>\n    <li>Rework scrolling model (the outer wrapper no longer does the scrolling).</li>\n    <li>Solve horizontal jittering on long lines.</li>\n    <li>Add <a href=\"../demo/runmode.html\">runmode.js</a>.</li>\n    <li>Immediately re-highlight text when typing.</li>\n    <li>Fix problem with 'sticking' horizontal scrollbar.</li>\n  </ul>\n\n  <p class=\"rel\">26-05-2011: <a href=\"http://codemirror.net/codemirror-2.01.zip\">Version 2.01</a>:</p>\n  <ul class=\"rel-note\">\n    <li>Add a <a href=\"../mode/smalltalk/index.html\">Smalltalk mode</a>.</li>\n    <li>Add a <a href=\"../mode/rst/index.html\">reStructuredText mode</a>.</li>\n    <li>Add a <a href=\"../mode/python/index.html\">Python mode</a>.</li>\n    <li>Add a <a href=\"../mode/plsql/index.html\">PL/SQL mode</a>.</li>\n    <li><code>coordsChar</code> now works</li>\n    <li>Fix a problem where <code>onCursorActivity</code> interfered with <code>onChange</code>.</li>\n    <li>Fix a number of scrolling and mouse-click-position glitches.</li>\n    <li>Pass information about the changed lines to <code>onChange</code>.</li>\n    <li>Support cmd-up/down on OS X.</li>\n    <li>Add triple-click line selection.</li>\n    <li>Don't handle shift when changing the selection through the API.</li>\n    <li>Support <code>\"nocursor\"</code> mode for <code>readOnly</code> option.</li>\n    <li>Add an <code>onHighlightComplete</code> option.</li>\n    <li>Fix the context menu for Firefox.</li>\n  </ul>\n\n  <p class=\"rel\">28-03-2011: <a href=\"http://codemirror.net/codemirror-2.0.zip\">Version 2.0</a>:</p>\n  <p class=\"rel-note\">CodeMirror 2 is a complete rewrite that's\n  faster, smaller, simpler to use, and less dependent on browser\n  quirks. See <a href=\"internals.html\">this</a>\n  and <a href=\"http://groups.google.com/group/codemirror/browse_thread/thread/5a8e894024a9f580\">this</a>\n  for more information.</a>\n\n  <p class=\"rel\">28-03-2011: <a href=\"http://codemirror.net/codemirror-1.0.zip\">Version 1.0</a>:</p>\n  <ul class=\"rel-note\">\n    <li>Fix error when debug history overflows.</li>\n    <li>Refine handling of C# verbatim strings.</li>\n    <li>Fix some issues with JavaScript indentation.</li>\n  </ul>\n\n  <p class=\"rel\">22-02-2011: <a href=\"https://github.com/marijnh/codemirror2/tree/beta2\">Version 2.0 beta 2</a>:</p>\n  <p class=\"rel-note\">Somewhat more mature API, lots of bugs shaken out.</a>\n\n  <p class=\"rel\">17-02-2011: <a href=\"http://codemirror.net/codemirror-0.94.zip\">Version 0.94</a>:</p>\n  <ul class=\"rel-note\">\n    <li><code>tabMode: \"spaces\"</code> was modified slightly (now indents when something is selected).</li>\n    <li>Fixes a bug that would cause the selection code to break on some IE versions.</li>\n    <li>Disabling spell-check on WebKit browsers now works.</li>\n  </ul>\n\n  <p class=\"rel\">08-02-2011: <a href=\"http://codemirror.net/\">Version 2.0 beta 1</a>:</p>\n  <p class=\"rel-note\">CodeMirror 2 is a complete rewrite of\n  CodeMirror, no longer depending on an editable frame.</p>\n\n  <p class=\"rel\">19-01-2011: <a href=\"http://codemirror.net/codemirror-0.93.zip\">Version 0.93</a>:</p>\n  <ul class=\"rel-note\">\n    <li>Added a <a href=\"contrib/regex/index.html\">Regular Expression</a> parser.</li>\n    <li>Fixes to the PHP parser.</li>\n    <li>Support for regular expression in search/replace.</li>\n    <li>Add <code>save</code> method to instances created with <code>fromTextArea</code>.</li>\n    <li>Add support for MS T-SQL in the SQL parser.</li>\n    <li>Support use of CSS classes for highlighting brackets.</li>\n    <li>Fix yet another hang with line-numbering in hidden editors.</li>\n  </ul>\n\n  <p class=\"rel\">17-12-2010: <a href=\"http://codemirror.net/codemirror-0.92.zip\">Version 0.92</a>:</p>\n  <ul class=\"rel-note\">\n    <li>Make CodeMirror work in XHTML documents.</li>\n    <li>Fix bug in handling of backslashes in Python strings.</li>\n    <li>The <code>styleNumbers</code> option is now officially\n    supported and documented.</li>\n    <li><code>onLineNumberClick</code> option added.</li>\n    <li>More consistent names <code>onLoad</code> and\n    <code>onCursorActivity</code> callbacks. Old names still work, but\n    are deprecated.</li>\n    <li>Add a <a href=\"contrib/freemarker/index.html\">Freemarker</a> mode.</li>\n  </ul>\n\n  <p class=\"rel\">11-11-2010: <a\n  href=\"http://codemirror.net/codemirror-0.91.zip\">Version 0.91</a>:</p>\n  <ul class=\"rel-note\">\n    <li>Adds support for <a href=\"contrib/java\">Java</a>.</li>\n    <li>Small additions to the <a href=\"contrib/php\">PHP</a> and <a href=\"contrib/sql\">SQL</a> parsers.</li>\n    <li>Work around various <a href=\"https://bugs.webkit.org/show_bug.cgi?id=47806\">Webkit</a> <a href=\"https://bugs.webkit.org/show_bug.cgi?id=23474\">issues</a>.</li>\n    <li>Fix <code>toTextArea</code> to update the code in the textarea.</li>\n    <li>Add a <code>noScriptCaching</code> option (hack to ease development).</li>\n    <li>Make sub-modes of <a href=\"mixedtest.html\">HTML mixed</a> mode configurable.</li>\n  </ul>\n\n  <p class=\"rel\">02-10-2010: <a\n  href=\"http://codemirror.net/codemirror-0.9.zip\">Version 0.9</a>:</p>\n  <ul class=\"rel-note\">\n    <li>Add support for searching backwards.</li>\n    <li>There are now parsers for <a href=\"contrib/scheme/index.html\">Scheme</a>, <a href=\"contrib/xquery/index.html\">XQuery</a>, and <a href=\"contrib/ometa/index.html\">OmetaJS</a>.</li>\n    <li>Makes <code>height: \"dynamic\"</code> more robust.</li>\n    <li>Fixes bug where paste did not work on OS X.</li>\n    <li>Add a <code>enterMode</code> and <code>electricChars</code> options to make indentation even more customizable.</li>\n    <li>Add <code>firstLineNumber</code> option.</li>\n    <li>Fix bad handling of <code>@media</code> rules by the CSS parser.</li>\n    <li>Take a new, more robust approach to working around the invisible-last-line bug in WebKit.</li>\n  </ul>\n\n  <p class=\"rel\">22-07-2010: <a\n  href=\"http://codemirror.net/codemirror-0.8.zip\">Version 0.8</a>:</p>\n  <ul class=\"rel-note\">\n    <li>Add a <code>cursorCoords</code> method to find the screen\n    coordinates of the cursor.</li>\n    <li>A number of fixes and support for more syntax in the PHP parser.</li>\n    <li>Fix indentation problem with JSON-mode JS parser in Webkit.</li>\n    <li>Add a <a href=\"compress.html\">minification</a> UI.</li>\n    <li>Support a <code>height: dynamic</code> mode, where the editor's\n    height will adjust to the size of its content.</li>\n    <li>Better support for IME input mode.</li>\n    <li>Fix JavaScript parser getting confused when seeing a no-argument\n    function call.</li>\n    <li>Have CSS parser see the difference between selectors and other\n    identifiers.</li>\n    <li>Fix scrolling bug when pasting in a horizontally-scrolled\n    editor.</li>\n    <li>Support <code>toTextArea</code> method in instances created with\n    <code>fromTextArea</code>.</li>\n    <li>Work around new Opera cursor bug that causes the cursor to jump\n    when pressing backspace at the end of a line.</li>\n  </ul>\n\n  <p class=\"rel\">27-04-2010: <a\n  href=\"http://codemirror.net/codemirror-0.67.zip\">Version\n  0.67</a>:</p>\n  <p class=\"rel-note\">More consistent page-up/page-down behaviour\n  across browsers. Fix some issues with hidden editors looping forever\n  when line-numbers were enabled. Make PHP parser parse\n  <code>\"\\\\\"</code> correctly. Have <code>jumpToLine</code> work on\n  line handles, and add <code>cursorLine</code> function to fetch the\n  line handle where the cursor currently is. Add new\n  <code>setStylesheet</code> function to switch style-sheets in a\n  running editor.</p>\n\n  <p class=\"rel\">01-03-2010: <a\n  href=\"http://codemirror.net/codemirror-0.66.zip\">Version\n  0.66</a>:</p>\n  <p class=\"rel-note\">Adds <code>removeLine</code> method to API.\n  Introduces the <a href=\"contrib/plsql/index.html\">PLSQL parser</a>.\n  Marks XML errors by adding (rather than replacing) a CSS class, so\n  that they can be disabled by modifying their style. Fixes several\n  selection bugs, and a number of small glitches.</p>\n\n  <p class=\"rel\">12-11-2009: <a\n  href=\"http://codemirror.net/codemirror-0.65.zip\">Version\n  0.65</a>:</p>\n  <p class=\"rel-note\">Add support for having both line-wrapping and\n  line-numbers turned on, make paren-highlighting style customisable\n  (<code>markParen</code> and <code>unmarkParen</code> config\n  options), work around a selection bug that Opera\n  <em>re</em>introduced in version 10.</p>\n\n  <p class=\"rel\">23-10-2009: <a\n  href=\"http://codemirror.net/codemirror-0.64.zip\">Version\n  0.64</a>:</p>\n  <p class=\"rel-note\">Solves some issues introduced by the\n  paste-handling changes from the previous release. Adds\n  <code>setSpellcheck</code>, <code>setTextWrapping</code>,\n  <code>setIndentUnit</code>, <code>setUndoDepth</code>,\n  <code>setTabMode</code>, and <code>setLineNumbers</code> to\n  customise a running editor. Introduces an <a\n  href=\"contrib/sql/index.html\">SQL</a> parser. Fixes a few small\n  problems in the <a href=\"contrib/python/index.html\">Python</a>\n  parser. And, as usual, add workarounds for various newly discovered\n  browser incompatibilities.</p>\n\n<p class=\"rel\"><em>31-08-2009</em>: <a\nhref=\"http://codemirror.net/codemirror-0.63.zip\">Version\n0.63</a>:</p>\n<p class=\"rel-note\"> Overhaul of paste-handling (less fragile), fixes for several\nserious IE8 issues (cursor jumping, end-of-document bugs) and a number\nof small problems.</p>\n\n<p class=\"rel\"><em>30-05-2009</em>: <a\nhref=\"http://codemirror.net/codemirror-0.62.zip\">Version\n0.62</a>:</p>\n<p class=\"rel-note\">Introduces <a href=\"contrib/python/index.html\">Python</a>\nand <a href=\"contrib/lua/index.html\">Lua</a> parsers. Add\n<code>setParser</code> (on-the-fly mode changing) and\n<code>clearHistory</code> methods. Make parsing passes time-based\ninstead of lines-based (see the <code>passTime</code> option).</p>\n\n</body></html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/doc/reporting.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Reporting Bugs</title>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans:bold\"/>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"docs.css\"/>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n    <style>li { margin-top: 1em; }</style>\n  </head>\n  <body>\n\n<h1><span class=\"logo-braces\">{ }</span> <a href=\"http://codemirror.net/\">CodeMirror</a></h1>\n\n<pre class=\"grey\">\n<img src=\"baboon.png\" class=\"logo\" alt=\"logo\"/>/* Reporting bugs\n   effectively */\n</pre>\n\n<div class=\"left\">\n\n<p>So you found a problem in CodeMirror. By all means, report it! Bug\nreports from users are the main drive behind improvements to\nCodeMirror. But first, please read over these points:</p>\n\n<ol>\n  <li>CodeMirror is maintained by volunteers. They don't owe you\n  anything, so be polite. Reports with an indignant or belligerent\n  tone tend to be moved to the bottom of the pile.</li>\n\n  <li>Include information about <strong>the browser in which the\n  problem occurred</strong>. Even if you tested several browsers, and\n  the problem occurred in all of them, mention this fact in the bug\n  report. Also include browser version numbers and the operating\n  system that you're on.</li>\n\n  <li>Mention which release of CodeMirror you're using. Preferably,\n  try also with the current development snapshot, to ensure the\n  problem has not already been fixed.</li>\n\n  <li>Mention very precisely what went wrong. \"X is broken\" is not a\n  good bug report. What did you expect to happen? What happened\n  instead? Describe the exact steps a maintainer has to take to make\n  the problem occur. We can not fix something that we can not\n  observe.</li>\n\n  <li>If the problem can not be reproduced in any of the demos\n  included in the CodeMirror distribution, please provide an HTML\n  document that demonstrates the problem. The best way to do this is\n  to go to <a href=\"http://jsbin.com/ihunin/edit\">jsbin.com</a>, enter\n  it there, press save, and include the resulting link in your bug\n  report.</li>\n</ol>\n\n</div>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/doc/upgrade_v2.2.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Upgrading to v2.2</title>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans:bold\"/>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"docs.css\"/>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n  </head>\n  <body>\n\n<h1><span class=\"logo-braces\">{ }</span> <a href=\"http://codemirror.net/\">CodeMirror</a></h1>\n\n<pre class=\"grey\">\n<img src=\"baboon.png\" class=\"logo\" alt=\"logo\"/>/* Upgrading to v2.2\n */\n</pre>\n\n<div class=\"left\">\n\n<p>There are a few things in the 2.2 release that require some care\nwhen upgrading.</p>\n\n<h2>No more default.css</h2>\n\n<p>The default theme is now included\nin <a href=\"../lib/codemirror.css\"><code>codemirror.css</code></a>, so\nyou do not have to included it separately anymore. (It was tiny, so\neven if you're not using it, the extra data overhead is negligible.)\n\n<h2>Different key customization</h2>\n\n<p>CodeMirror has moved to a system\nwhere <a href=\"manual.html#option_keyMap\">keymaps</a> are used to\nbind behavior to keys. This means <a href=\"../demo/emacs.html\">custom\nbindings</a> are now possible.</p>\n\n<p>Three options that influenced key\nbehavior, <code>tabMode</code>, <code>enterMode</code>,\nand <code>smartHome</code>, are no longer supported. Instead, you can\nprovide custom bindings to influence the way these keys act. This is\ndone through the\nnew <a href=\"manual.html#option_extraKeys\"><code>extraKeys</code></a>\noption, which can hold an object mapping key names to functionality. A\nsimple example would be:</p>\n\n<pre>  extraKeys: {\n    \"Ctrl-S\": function(instance) { saveText(instance.getValue()); },\n    \"Ctrl-/\": \"undo\"\n  }</pre>\n\n<p>Keys can be mapped either to functions, which will be given the\neditor instance as argument, or to strings, which are mapped through\nfunctions through the <code>CodeMirror.commands</code> table, which\ncontains all the built-in editing commands, and can be inspected and\nextended by external code.</p>\n\n<p>By default, the <code>Home</code> key is bound to\nthe <code>\"goLineStartSmart\"</code> command, which moves the cursor to\nthe first non-whitespace character on the line. You can set do this to\nmake it always go to the very start instead:</p>\n\n<pre>  extraKeys: {\"Home\": \"goLineStart\"}</pre>\n\n<p>Similarly, <code>Enter</code> is bound\nto <code>\"newlineAndIndent\"</code> by default. You can bind it to\nsomething else to get different behavior. To disable special handling\ncompletely and only get a newline character inserted, you can bind it\nto <code>false</code>:</p>\n\n<pre>  extraKeys: {\"Enter\": false}</pre>\n\n<p>The same works for <code>Tab</code>. If you don't want CodeMirror\nto handle it, bind it to <code>false</code>. The default behaviour is\nto indent the current line more (<code>\"indentMore\"</code> command),\nand indent it less when shift is held (<code>\"indentLess\"</code>).\nThere are also <code>\"indentAuto\"</code> (smart indent)\nand <code>\"insertTab\"</code> commands provided for alternate\nbehaviors. Or you can write your own handler function to do something\ndifferent altogether.</p>\n\n<h2>Tabs</h2>\n\n<p>Handling of tabs changed completely. The display width of tabs can\nnow be set with the <code>tabSize</code> option, and tabs can\nbe <a href=\"../demo/visibletabs.html\">styled</a> by setting CSS rules\nfor the <code>cm-tab</code> class.</p>\n\n<p>The default width for tabs is now 4, as opposed to the 8 that is\nhard-wired into browsers. If you are relying on 8-space tabs, make\nsure you explicitly set <code>tabSize: 8</code> in your options.</p>\n\n</div>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror</title>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans:bold\"/>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"doc/docs.css\"/>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n    <link rel=\"alternate\" href=\"http://twitter.com/statuses/user_timeline/242283288.rss\" type=\"application/rss+xml\"/>\n  </head>\n  <body>\n\n<h1><span class=\"logo-braces\">{ }</span> <a href=\"http://codemirror.net/\">CodeMirror</a></h1>\n\n<pre class=\"grey\">\n<img src=\"doc/baboon.png\" class=\"logo\" alt=\"logo\"/>/* In-browser code editing\n   made bearable */\n</pre>\n\n<div class=\"clear\"><div class=\"left blk\">\n\n  <p style=\"margin-top: 0\">CodeMirror is a JavaScript component that\n  provides a code editor in the browser. When a mode is available for\n  the language you are coding in, it will color your code, and\n  optionally help with indentation.</p>\n\n  <p>A <a href=\"doc/manual.html\">rich programming API</a> and a CSS\n  theming system are available for customizing CodeMirror to fit your\n  application, and extending it with new functionality.</p>\n\n  <div class=\"clear\"><div class=\"left1 blk\">\n\n    <h2 style=\"margin-top: 0\">Supported modes:</h2>\n\n    <ul>\n      <li><a href=\"mode/clike/index.html\">C, C++, C#, Java, and similar</a></li>\n      <li><a href=\"mode/clojure/index.html\">Clojure</a></li>\n      <li><a href=\"mode/coffeescript/index.html\">CoffeeScript</a></li>\n      <li><a href=\"mode/css/index.html\">CSS</a></li>\n      <li><a href=\"mode/diff/index.html\">diff</a></li>\n      <li><a href=\"mode/ecl/index.html\">ECL</a></li>\n      <li><a href=\"mode/erlang/index.html\">Erlang</a></li>\n      <li><a href=\"mode/go/index.html\">Go</a></li>\n      <li><a href=\"mode/groovy/index.html\">Groovy</a></li>\n      <li><a href=\"mode/haskell/index.html\">Haskell</a></li>\n      <li><a href=\"mode/htmlembedded/index.html\">HTML embedded scripts</a></li>\n      <li><a href=\"mode/htmlmixed/index.html\">HTML mixed-mode</a></li>\n      <li><a href=\"mode/javascript/index.html\">JavaScript</a></li>\n      <li><a href=\"mode/jinja2/index.html\">Jinja2</a></li>\n      <li><a href=\"mode/less/index.html\">LESS</a></li>\n      <li><a href=\"mode/lua/index.html\">Lua</a></li>\n      <li><a href=\"mode/markdown/index.html\">Markdown</a> (<a href=\"mode/gfm/index.html\">Github-flavour</a>)</li>\n      <li><a href=\"mode/mysql/index.html\">MySQL</a></li>\n      <li><a href=\"mode/ntriples/index.html\">NTriples</a></li>\n      <li><a href=\"mode/pascal/index.html\">Pascal</a></li>\n      <li><a href=\"mode/perl/index.html\">Perl</a></li>\n      <li><a href=\"mode/php/index.html\">PHP</a></li>\n      <li><a href=\"mode/pig/index.html\">Pig Latin</a></li>\n      <li><a href=\"mode/plsql/index.html\">PL/SQL</a></li>\n      <li><a href=\"mode/properties/index.html\">Properties files</a></li>\n      <li><a href=\"mode/python/index.html\">Python</a></li>\n      <li><a href=\"mode/r/index.html\">R</a></li>\n      <li>RPM <a href=\"mode/rpm/spec/index.html\">spec</a> and <a href=\"mode/rpm/changes/index.html\">changelog</a></li>\n      <li><a href=\"mode/rst/index.html\">reStructuredText</a></li>\n      <li><a href=\"mode/ruby/index.html\">Ruby</a></li>\n      <li><a href=\"mode/rust/index.html\">Rust</a></li>\n      <li><a href=\"mode/scheme/index.html\">Scheme</a></li>\n      <li><a href=\"mode/shell/index.html\">Shell</a></li>\n      <li><a href=\"mode/smalltalk/index.html\">Smalltalk</a></li>\n      <li><a href=\"mode/smarty/index.html\">Smarty</a></li>\n      <li><a href=\"mode/sparql/index.html\">SPARQL</a></li>\n      <li><a href=\"mode/stex/index.html\">sTeX, LaTeX</a></li>\n      <li><a href=\"mode/tiddlywiki/index.html\">Tiddlywiki</a></li>\n      <li><a href=\"mode/tiki/index.html\">Tiki wiki</a></li>\n      <li><a href=\"mode/vbscript/index.html\">VBScript</a></li>\n      <li><a href=\"mode/velocity/index.html\">Velocity</a></li>\n      <li><a href=\"mode/verilog/index.html\">Verilog</a></li>\n      <li><a href=\"mode/xml/index.html\">XML/HTML</a></li>\n      <li><a href=\"mode/xquery/index.html\">XQuery</a></li>\n      <li><a href=\"mode/yaml/index.html\">YAML</a></li>\n    </ul>\n\n  </div><div class=\"left2 blk\">\n\n    <h2 style=\"margin-top: 0\">Usage demos:</h2>\n\n    <ul>\n      <li><a href=\"demo/complete.html\">Autocompletion</a></li>\n      <li><a href=\"demo/mustache.html\">Mode overlays</a></li>\n      <li><a href=\"demo/search.html\">Search/replace</a></li>\n      <li><a href=\"demo/folding.html\">Code folding</a></li>\n      <li><a href=\"demo/preview.html\">HTML editor with preview</a></li>\n      <li><a href=\"demo/resize.html\">Auto-resizing editor</a></li>\n      <li><a href=\"demo/marker.html\">Setting breakpoints</a></li>\n      <li><a href=\"demo/activeline.html\">Highlighting the current line</a></li>\n      <li><a href=\"demo/matchhighlighter.html\">Highlighting selection matches</a></li>\n      <li><a href=\"demo/theme.html\">Theming</a></li>\n      <li><a href=\"demo/runmode.html\">Stand-alone highlighting</a></li>\n      <li><a href=\"demo/fullscreen.html\">Full-screen editing</a></li>\n      <li><a href=\"demo/changemode.html\">Mode auto-changing</a></li>\n      <li><a href=\"demo/visibletabs.html\">Visible tabs</a></li>\n      <li><a href=\"demo/formatting.html\">Autoformatting of code</a></li>\n      <li><a href=\"demo/emacs.html\">Emacs keybindings</a></li>\n      <li><a href=\"demo/vim.html\">Vim keybindings</a></li>\n      <li><a href=\"demo/closetag.html\">Automatic xml tag closing</a></li>\n      <li><a href=\"demo/loadmode.html\">Lazy mode loading</a></li>\n    </ul>\n\n    <h2>Real-world uses:</h2>\n\n    <ul>\n      <li><a href=\"http://jsbin.com\">jsbin.com</a> (JS playground)</li>\n      <li><a href=\"http://buzzard.ups.edu/\">Sage demo</a> (math system)</li>\n      <li><a href=\"http://www.sourcelair.com/\">sourceLair</a> (online IDE)</li>\n      <li><a href=\"http://eloquentjavascript.net/chapter1.html\">Eloquent JavaScript</a> (book)</a></li>\n      <li><a href=\"http://www.mergely.com/\">Mergely</a> (interactive diffing)</li>\n      <li><a href=\"http://paperjs.org/\">Paper.js</a> (graphics scripting)</li>\n      <li><a href=\"http://www.wescheme.org/\">WeScheme</a> (learning tool)</li>\n      <li><a href=\"http://webglplayground.net/\">WebGL playground</a></li>\n      <li><a href=\"http://ql.io/\">ql.io</a> (http API query helper)</li>\n      <li><a href=\"http://elm-lang.org/Examples.elm\">Elm language examples</a></li>\n      <li><a href=\"http://bluegriffon.org/\">BlueGriffon</a> (HTML editor)</li>\n      <li><a href=\"http://www.jshint.com/\">JSHint</a> (JS linter)</li>\n      <li><a href=\"http://kl1p.com/cmtest/1\">kl1p</a> (paste service)</li>\n      <li><a href=\"http://sqlfiddle.com\">SQLFiddle</a> (SQL playground)</li>\n      <li><a href=\"http://tour.golang.org\">Go language tour</a></li>\n      <li><a href=\"http://cssdeck.com/\">CSSDeck</a> (CSS showcase)</li>\n      <li><a href=\"http://www.ckwnc.com/\">CKWNC</a> (UML editor)</li>\n      <li><a href=\"http://www.sketchpatch.net/labs/livecodelabIntro.html\">sketchPatch Livecodelab</a></li>\n      <li><a href=\"https://thefiletree.com\">The File Tree</a> (collab editor)</li>\n      <li><a href=\"http://enjalot.com/tributary/2636296/sinwaves.js\">Tributary</a> (augmented editing)</li>\n    </ul>\n\n  </div></div>\n\n  <h2 id=\"code\">Getting the code</h2>\n\n  <p>All of CodeMirror is released under a <a\n  href=\"LICENSE\">MIT-style</a> license. To get it, you can download\n  the <a href=\"http://codemirror.net/codemirror.zip\">latest\n  release</a> or the current <a\n  href=\"http://codemirror.net/codemirror2-latest.zip\">development\n  snapshot</a> as zip files. To create a custom minified script file,\n  you can use the <a href=\"doc/compress.html\">compression API</a>.</p>\n\n  <p>We use <a href=\"http://git-scm.com/\">git</a> for version control.\n  The main repository can be fetched in this way:</p>\n\n  <pre class=\"code\">git clone http://marijnhaverbeke.nl/git/codemirror2</pre>\n\n  <p>CodeMirror can also be found on GitHub at <a\n  href=\"http://github.com/marijnh/CodeMirror2\">marijnh/CodeMirror2</a>.\n  If you plan to hack on the code and contribute patches, the best way\n  to do it is to create a GitHub fork, and send pull requests.</p>\n\n  <h2 id=\"documention\">Documentation</h2>\n\n  <p>The <a href=\"doc/manual.html\">manual</a> is your first stop for\n  learning how to use this library. It starts with a quick explanation\n  of how to use the editor, and then describes the API in detail.</p>\n\n  <p>For those who want to learn more about the code, there is\n  an <a href=\"doc/internals.html\">overview of the internals</a> available.\n  The <a href=\"http://github.com/marijnh/CodeMirror2\">source code</a>\n  itself is, for the most part, also well commented.</p>\n\n  <h2 id=\"support\">Support and bug reports</h2>\n\n  <p>There is\n  a <a href=\"http://groups.google.com/group/codemirror\">Google\n  group</a> (a sort of mailing list/newsgroup thing) for discussion\n  and news related to CodeMirror. When reporting a bug,\n  <a href=\"doc/reporting.html\">read this first</a>. If you have\n  a <a href=\"http://github.com\">github</a> account,\n  simply <a href=\"http://github.com/marijnh/CodeMirror2/issues\">open\n  an issue there</a>. Otherwise, post something to\n  the <a href=\"http://groups.google.com/group/codemirror\">group</a>,\n  or e-mail me directly: <a href=\"mailto:marijnh@gmail.com\">Marijn\n  Haverbeke</a>.</p>\n\n  <h2 id=\"supported\">Supported browsers</h2>\n\n  <p>The following browsers are able to run CodeMirror:</p>\n\n  <ul>\n    <li>Firefox 2 or higher</li>\n    <li>Chrome, any version</li>\n    <li>Safari 3 or higher</li>\n    <li>Internet Explorer 7 or higher in standards (<strong>non-quirks</strong>) mode</li>\n    <li>Opera 9 or higher (with some key-handling problems on OS X)</li>\n  </ul>\n\n  <p>I am not actively testing against every new browser release, and\n  vendors have a habit of introducing bugs all the time, so I am\n  relying on the community to tell me when something breaks.\n  See <a href=\"#support\">here</a> for information on how to contact\n  me.</p>\n\n  <h2 id=\"commercial\">Commercial support</h2>\n\n  <p>CodeMirror is developed and maintained by me, Marijn Haverbeke,\n  in my own time. If your company is getting value out of CodeMirror,\n  please consider purchasing a support contract.</p>\n\n  <ul>\n    <li>You'll be funding further work on CodeMirror.</li>\n    <li>You ensure that you get a quick response when you have a\n    problem, even when I am otherwise busy.</li>\n  </ul>\n\n  <p>CodeMirror support contracts exist in two\n  forms—<strong>basic</strong> at €100 per month,\n  and <strong>premium</strong> at €500 per\n  month. <a href=\"mailto:marijnh@gmail.com\">Contact me</a> for further\n  information.</p>\n\n</div>\n\n<div class=\"right blk\">\n\n  <a href=\"http://codemirror.net/codemirror.zip\" class=\"download\">Download the latest release</a>\n\n  <h2>Support CodeMirror</h2>\n\n  <ul>\n    <li>Donate\n    (<span onclick=\"document.getElementById('paypal').submit();\"\n    class=\"quasilink\">Paypal</span>\n    or <span onclick=\"document.getElementById('bankinfo').style.display = 'block';\"\n             class=\"quasilink\">bank</span>)</li>\n    <li>Purchase <a href=\"#commercial\">commercial support</a></li>\n  </ul>\n\n  <p id=\"bankinfo\" style=\"display: none;\">\n    Bank: <i>Rabobank</i><br/>\n    Country: <i>Netherlands</i><br/>\n    SWIFT: <i>RABONL2U</i><br/>\n    Account: <i>147850770</i><br/>\n    Name: <i>Marijn Haverbeke</i><br/>\n    IBAN: <i>NL26 RABO 0147 8507 70</i>\n  </p>\n\n  <h2>Releases:</h2>\n\n  <p class=\"rel\">23-05-2012: <a href=\"http://codemirror.net/codemirror-2.25.zip\">Version 2.25</a>:</p>\n\n  <ul class=\"rel-note\">\n    <li>New mode: <a href=\"mode/erlang/index.html\">Erlang</a>.</li>\n    <li><strong>Remove xmlpure mode</strong> (use <a href=\"mode/xml/index.html\">xml.js</a>).</li>\n    <li>Fix line-wrapping in Opera.</li>\n    <li>Fix X Windows middle-click paste in Chrome.</li>\n    <li>Fix bug that broke pasting of huge documents.</li>\n    <li>Fix backspace and tab key repeat in Opera.</li>\n  </ul>\n\n  <p class=\"rel\">23-04-2012: <a href=\"http://codemirror.net/codemirror-2.24.zip\">Version 2.24</a>:</p>\n\n  <ul class=\"rel-note\">\n    <li><strong>Drop support for Internet Explorer 6</strong>.</li>\n    <li>New\n    modes: <a href=\"mode/shell/index.html\">Shell</a>, <a href=\"mode/tiki/index.html\">Tiki\n    wiki</a>, <a href=\"mode/pig/index.html\">Pig Latin</a>.</li>\n    <li>New themes: <a href=\"demo/theme.html?ambiance\">Ambiance</a>, <a href=\"demo/theme.html?blackboard\">Blackboard</a>.</li>\n    <li>More control over drag/drop\n    with <a href=\"doc/manual.html#option_dragDrop\"><code>dragDrop</code></a>\n    and <a href=\"doc/manual.html#option_onDragEvent\"><code>onDragEvent</code></a>\n    options.</li>\n    <li>Make HTML mode a bit less pedantic.</li>\n    <li>Add <a href=\"doc/manual.html#compoundChange\"><code>compoundChange</code></a> API method.</li>\n    <li>Several fixes in undo history and line hiding.</li>\n    <li>Remove (broken) support for <code>catchall</code> in key maps,\n    add <code>nofallthrough</code> boolean field instead.</li>\n  </ul>\n\n  <p class=\"rel\">26-03-2012: <a href=\"http://codemirror.net/codemirror-2.23.zip\">Version 2.23</a>:</p>\n\n  <ul class=\"rel-note\">\n    <li>Change <strong>default binding for tab</strong> <a href=\"javascript:void(document.getElementById('tabbinding').style.display='')\">[more]</a>\n      <div style=\"display: none\" id=tabbinding>\n        Starting in 2.23, these bindings are default:\n        <ul><li>Tab: Insert tab character</li>\n          <li>Shift-tab: Reset line indentation to default</li>\n          <li>Ctrl/Cmd-[: Reduce line indentation (old tab behaviour)</li>\n          <li>Ctrl/Cmd-]: Increase line indentation (old shift-tab behaviour)</li>\n        </ul>\n      </div>\n    </li>\n    <li>New modes: <a href=\"mode/xquery/index.html\">XQuery</a> and <a href=\"mode/vbscript/index.html\">VBScript</a>.</li>\n    <li>Two new themes: <a href=\"mode/less/index.html\">lesser-dark</a> and <a href=\"mode/xquery/index.html\">xq-dark</a>.</li>\n    <li>Differentiate between background and text styles in <a href=\"doc/manual.html#setLineClass\"><code>setLineClass</code></a>.</li>\n    <li>Fix drag-and-drop in IE9+.</li>\n    <li>Extend <a href=\"doc/manual.html#charCoords\"><code>charCoords</code></a>\n    and <a href=\"doc/manual.html#cursorCoords\"><code>cursorCoords</code></a> with a <code>mode</code> argument.</li>\n    <li>Add <a href=\"doc/manual.html#option_autofocus\"><code>autofocus</code></a> option.</li>\n    <li>Add <a href=\"doc/manual.html#findMarksAt\"><code>findMarksAt</code></a> method.</li>\n  </ul>\n\n  <p class=\"rel\">27-02-2012: <a href=\"http://codemirror.net/codemirror-2.22.zip\">Version 2.22</a>:</p>\n\n  <ul class=\"rel-note\">\n    <li>Allow <a href=\"doc/manual.html#keymaps\">key handlers</a> to pass up events, allow binding characters.</li>\n    <li>Add <a href=\"doc/manual.html#option_autoClearEmptyLines\"><code>autoClearEmptyLines</code></a> option.</li>\n    <li>Properly use tab stops when rendering tabs.</li>\n    <li>Make PHP mode more robust.</li>\n    <li>Support indentation blocks in <a href=\"doc/manual.html#util_foldcode\">code folder</a>.</li>\n    <li>Add a script for <a href=\"doc/manual.html#util_match-highlighter\">highlighting instances of the selection</a>.</li>\n    <li>New <a href=\"mode/properties/index.html\">.properties</a> mode.</li>\n    <li>Fix many bugs.</li>\n  </ul>\n\n  <p class=\"rel\">27-01-2012: <a href=\"http://codemirror.net/codemirror-2.21.zip\">Version 2.21</a>:</p>\n\n  <ul class=\"rel-note\">\n    <li>Added <a href=\"mode/less/index.html\">LESS</a>, <a href=\"mode/mysql/index.html\">MySQL</a>,\n    <a href=\"mode/go/index.html\">Go</a>, and <a href=\"mode/verilog/index.html\">Verilog</a> modes.</li>\n    <li>Add <a href=\"doc/manual.html#option_smartIndent\"><code>smartIndent</code></a>\n    option.</li>\n    <li>Support a cursor in <a href=\"doc/manual.html#option_readOnly\"><code>readOnly</code></a>-mode.</li>\n    <li>Support assigning multiple styles to a token.</li>\n    <li>Use a new approach to drawing the selection.</li>\n    <li>Add <a href=\"doc/manual.html#scrollTo\"><code>scrollTo</code></a> method.</li>\n    <li>Allow undo/redo events to span non-adjacent lines.</li>\n    <li>Lots and lots of bugfixes.</li>\n  </ul>\n\n  <p class=\"rel\">20-12-2011: <a href=\"http://codemirror.net/codemirror-2.2.zip\">Version 2.2</a>:</p>\n\n  <ul class=\"rel-note\">\n    <li>Slightly incompatible API changes. Read <a href=\"doc/upgrade_v2.2.html\">this</a>.</li>\n    <li>New approach\n    to <a href=\"doc/manual.html#option_extraKeys\">binding</a> keys,\n    support for <a href=\"doc/manual.html#option_keyMap\">custom\n    bindings</a>.</li>\n    <li>Support for overwrite (insert).</li>\n    <li><a href=\"doc/manual.html#option_tabSize\">Custom-width</a>\n    and <a href=\"demo/visibletabs.html\">stylable</a> tabs.</li>\n    <li>Moved more code into <a href=\"doc/manual.html#addons\">add-on scripts</a>.</li>\n    <li>Support for sane vertical cursor movement in wrapped lines.</li>\n    <li>More reliable handling of\n    editing <a href=\"doc/manual.html#markText\">marked text</a>.</li>\n    <li>Add minimal <a href=\"demo/emacs.html\">emacs</a>\n    and <a href=\"demo/vim.html\">vim</a> bindings.</li>\n    <li>Rename <code>coordsFromIndex</code>\n    to <a href=\"doc/manual.html#posFromIndex\"><code>posFromIndex</code></a>,\n    add <a href=\"doc/manual.html#indexFromPos\"><code>indexFromPos</code></a>\n    method.</li>\n  </ul>\n\n  <p class=\"rel\">21-11-2011: <a href=\"http://codemirror.net/codemirror-2.18.zip\">Version 2.18</a>:</p>\n  <p class=\"rel-note\">Fixes <code>TextMarker.clear</code>, which is broken in 2.17.</p>\n\n  <p class=\"rel\">21-11-2011: <a href=\"http://codemirror.net/codemirror-2.17.zip\">Version 2.17</a>:</p>\n  <ul class=\"rel-note\">\n    <li>Add support for <a href=\"doc/manual.html#option_lineWrapping\">line\n    wrapping</a> and <a href=\"doc/manual.html#hideLine\">code\n    folding</a>.</li>\n    <li>Add <a href=\"mode/gfm/index.html\">Github-style Markdown</a> mode.</li>\n    <li>Add <a href=\"theme/monokai.css\">Monokai</a>\n    and <a href=\"theme/rubyblue.css\">Rubyblue</a> themes.</li>\n    <li>Add <a href=\"doc/manual.html#setBookmark\"><code>setBookmark</code></a> method.</li>\n    <li>Move some of the demo code into reusable components\n    under <a href=\"lib/util/\"><code>lib/util</code></a>.</li>\n    <li>Make screen-coord-finding code faster and more reliable.</li>\n    <li>Fix drag-and-drop in Firefox.</li>\n    <li>Improve support for IME.</li>\n    <li>Speed up content rendering.</li>\n    <li>Fix browser's built-in search in Webkit.</li>\n    <li>Make double- and triple-click work in IE.</li>\n    <li>Various fixes to modes.</li>\n  </ul>\n\n  <p class=\"rel\">27-10-2011: <a href=\"http://codemirror.net/codemirror-2.16.zip\">Version 2.16</a>:</p>\n  <ul class=\"rel-note\">\n    <li>Add <a href=\"mode/perl/index.html\">Perl</a>, <a href=\"mode/rust/index.html\">Rust</a>, <a href=\"mode/tiddlywiki/index.html\">TiddlyWiki</a>, and <a href=\"mode/groovy/index.html\">Groovy</a> modes.</li>\n    <li>Dragging text inside the editor now moves, rather than copies.</li>\n    <li>Add a <a href=\"doc/manual.html#coordsFromIndex\"><code>coordsFromIndex</code></a> method.</li>\n    <li><strong>API change</strong>: <code>setValue</code> now no longer clears history. Use <a href=\"doc/manual.html#clearHistory\"><code>clearHistory</code></a> for that.</li>\n    <li><strong>API change</strong>: <a href=\"doc/manual.html#markText\"><code>markText</code></a> now\n    returns an object with <code>clear</code> and <code>find</code>\n    methods. Marked text is now more robust when edited.</li>\n    <li>Fix editing code with tabs in Internet Explorer.</li>\n  </ul>\n\n  <p class=\"rel\">26-09-2011: <a href=\"http://codemirror.net/codemirror-2.15.zip\">Version 2.15</a>:</p>\n  <p class=\"rel-note\">Fix bug that snuck into 2.14: Clicking the\n  character that currently has the cursor didn't re-focus the\n  editor.</p>\n\n  <p class=\"rel\">26-09-2011: <a href=\"http://codemirror.net/codemirror-2.14.zip\">Version 2.14</a>:</p>\n  <ul class=\"rel-note\">\n    <li>Add <a href=\"mode/clojure/index.html\">Clojure</a>, <a href=\"mode/pascal/index.html\">Pascal</a>, <a href=\"mode/ntriples/index.html\">NTriples</a>, <a href=\"mode/jinja2/index.html\">Jinja2</a>, and <a href=\"mode/markdown/index.html\">Markdown</a> modes.</li>\n    <li>Add <a href=\"theme/cobalt.css\">Cobalt</a> and <a href=\"theme/eclipse.css\">Eclipse</a> themes.</li>\n    <li>Add a <a href=\"doc/manual.html#option_fixedGutter\"><code>fixedGutter</code></a> option.</li>\n    <li>Fix bug with <code>setValue</code> breaking cursor movement.</li>\n    <li>Make gutter updates much more efficient.</li>\n    <li>Allow dragging of text out of the editor (on modern browsers).</li>\n  </ul>\n\n  <p><a href=\"doc/oldrelease.html\">Older releases...</a></p>\n\n</div></div>\n\n<div style=\"height: 2em\">&nbsp;</div>\n\n  <form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\" id=\"paypal\">\n    <input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\"/>\n    <input type=\"hidden\" name=\"hosted_button_id\" value=\"3FVHS5FGUY7CC\"/>\n  </form>\n\n  </body>\n</html>\n\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/keymap/emacs.js",
    "content": "// TODO number prefixes\n(function() {\n  // Really primitive kill-ring implementation.\n  var killRing = [];\n  function addToRing(str) {\n    killRing.push(str);\n    if (killRing.length > 50) killRing.shift();\n  }\n  function getFromRing() { return killRing[killRing.length - 1] || \"\"; }\n  function popFromRing() { if (killRing.length > 1) killRing.pop(); return getFromRing(); }\n\n  CodeMirror.keyMap.emacs = {\n    \"Ctrl-X\": function(cm) {cm.setOption(\"keyMap\", \"emacs-Ctrl-X\");},\n    \"Ctrl-W\": function(cm) {addToRing(cm.getSelection()); cm.replaceSelection(\"\");},\n    \"Ctrl-Alt-W\": function(cm) {addToRing(cm.getSelection()); cm.replaceSelection(\"\");},\n    \"Alt-W\": function(cm) {addToRing(cm.getSelection());},\n    \"Ctrl-Y\": function(cm) {cm.replaceSelection(getFromRing());},\n    \"Alt-Y\": function(cm) {cm.replaceSelection(popFromRing());},\n    \"Ctrl-/\": \"undo\", \"Shift-Ctrl--\": \"undo\", \"Shift-Alt-,\": \"goDocStart\", \"Shift-Alt-.\": \"goDocEnd\",\n    \"Ctrl-S\": \"findNext\", \"Ctrl-R\": \"findPrev\", \"Ctrl-G\": \"clearSearch\", \"Shift-Alt-5\": \"replace\",\n    \"Ctrl-Z\": \"undo\", \"Cmd-Z\": \"undo\", \"Alt-/\": \"autocomplete\",\n    fallthrough: [\"basic\", \"emacsy\"]\n  };\n\n  CodeMirror.keyMap[\"emacs-Ctrl-X\"] = {\n    \"Ctrl-S\": \"save\", \"Ctrl-W\": \"save\", \"S\": \"saveAll\", \"F\": \"open\", \"U\": \"undo\", \"K\": \"close\",\n    auto: \"emacs\", nofallthrough: true\n  };\n})();\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/keymap/vim.js",
    "content": "// Supported keybindings:\n// \n// Cursor movement:\n// h, j, k, l\n// e, E, w, W, b, B\n// Ctrl-f, Ctrl-b\n// Ctrl-n, Ctrl-p\n// $, ^, 0\n// G\n// ge, gE\n// gg\n// f<char>, F<char>, t<char>, T<char> \n// Ctrl-o, Ctrl-i TODO (FIXME - Ctrl-O wont work in Chrome)\n// /, ?, n, N TODO (does not work)\n// #, * TODO\n//\n// Entering insert mode:\n// i, I, a, A, o, O\n// s\n// ce, cb (without support for number of actions like c3e - TODO)\n// cc\n// S, C TODO\n// cf<char>, cF<char>, ct<char>, cT<char>\n//\n// Deleting text:\n// x, X \n// J\n// dd, D\n// de, db (without support for number of actions like d3e - TODO)\n// df<char>, dF<char>, dt<char>, dT<char> \n//\n// Yanking and pasting:\n// yy, Y\n// p, P\n// p'<char> TODO - test\n// y'<char> TODO - test\n// m<char> TODO - test\n//\n// Changing text in place:\n// ~\n// r<char>\n//\n// Visual mode:\n// v, V TODO\n//\n// Misc:\n// . TODO\n//\n\n\n(function() {\n  var count = \"\";\n  var sdir = \"f\";\n  var buf = \"\";\n  var yank = 0;\n  var mark = [];\n  function emptyBuffer() { buf = \"\"; }\n  function pushInBuffer(str) { buf += str; };\n  function pushCountDigit(digit) { return function(cm) {count += digit;} }\n  function popCount() { var i = parseInt(count); count = \"\"; return i || 1; }\n  function iterTimes(func) {\n    for (var i = 0, c = popCount(); i < c; ++i) func(i, i == c - 1);\n  }\n  function countTimes(func) {\n    if (typeof func == \"string\") func = CodeMirror.commands[func];\n    return function(cm) { iterTimes(function () { func(cm); }) };\n  }\n\n  function iterObj(o, f) {\n    for (var prop in o) if (o.hasOwnProperty(prop)) f(prop, o[prop]);\n  }\n  function iterList(l, f) {\n    for (var i in l) f(l[i]);\n  }\n  function toLetter(ch) {\n    // T -> t, Shift-T -> T, '*' -> *, \"Space\" -> \" \"\n    if (ch.slice(0, 6) == \"Shift-\") {\n      return ch.slice(0, 1);\n    } else {\n      if (ch == \"Space\") return \" \";\n      if (ch.length == 3 && ch[0] == \"'\" && ch[2] == \"'\") return ch[1];\n      return ch.toLowerCase();\n    }\n  }\n  var SPECIAL_SYMBOLS = \"~`!@#$%^&*()_-+=[{}]\\\\|/?.,<>:;\\\"\\'1234567890\"; \n  function toCombo(ch) { \n    // t -> T, T -> Shift-T, * -> '*', \" \" -> \"Space\"\n    if (ch == \" \") return \"Space\";\n    var specialIdx = SPECIAL_SYMBOLS.indexOf(ch);\n    if (specialIdx != -1) return \"'\" + ch + \"'\";\n    if (ch.toLowerCase() == ch) return ch.toUpperCase();\n    return \"Shift-\" + ch.toUpperCase();\n  }\n\n  var word = [/\\w/, /[^\\w\\s]/], bigWord = [/\\S/];\n  function findWord(line, pos, dir, regexps) {\n    var stop = 0, next = -1;\n    if (dir > 0) { stop = line.length; next = 0; }\n    var start = stop, end = stop;\n    // Find bounds of next one.\n    outer: for (; pos != stop; pos += dir) {\n      for (var i = 0; i < regexps.length; ++i) {\n        if (regexps[i].test(line.charAt(pos + next))) {\n          start = pos;\n          for (; pos != stop; pos += dir) {\n            if (!regexps[i].test(line.charAt(pos + next))) break;\n          }\n          end = pos;\n          break outer;\n        }\n      }\n    }\n    return {from: Math.min(start, end), to: Math.max(start, end)};\n  }\n  function moveToWord(cm, regexps, dir, where) {\n    var cur = cm.getCursor(), ch = cur.ch, line = cm.getLine(cur.line), word;\n    while (true) {\n      word = findWord(line, ch, dir, regexps);\n      ch = word[where == \"end\" ? \"to\" : \"from\"];\n      if (ch == cur.ch && word.from != word.to) ch = word[dir < 0 ? \"from\" : \"to\"];\n      else break;\n    }\n    cm.setCursor(cur.line, word[where == \"end\" ? \"to\" : \"from\"], true);\n  }\n  function joinLineNext(cm) {\n    var cur = cm.getCursor(), ch = cur.ch, line = cm.getLine(cur.line);\n    CodeMirror.commands.goLineEnd(cm); \n    if (cur.line != cm.lineCount()) {\n      CodeMirror.commands.goLineEnd(cm);\n      cm.replaceSelection(\" \", \"end\");\n      CodeMirror.commands.delCharRight(cm);\n    } \n  }\n  function delTillMark(cm, cHar) { \n    var i = mark[cHar];\n    if (i === undefined) {\n      // console.log(\"Mark not set\"); // TODO - show in status bar\n      return;\n    }\n    var l = cm.getCursor().line, start = i > l ? l : i, end = i > l ? i : l;\n    cm.setCursor(start);\n    for (var c = start; c <= end; c++) {\n      pushInBuffer(\"\\n\"+cm.getLine(start)); \n      cm.removeLine(start);\n    }\n  }\n  function yankTillMark(cm, cHar) { \n    var i = mark[cHar];\n    if (i === undefined) {\n      // console.log(\"Mark not set\"); // TODO - show in status bar\n      return;\n    }\n    var l = cm.getCursor().line, start = i > l ? l : i, end = i > l ? i : l;\n    for (var c = start; c <= end; c++) {\n      pushInBuffer(\"\\n\"+cm.getLine(c));\n    }\n    cm.setCursor(start);\n  }\n  function goLineStartText(cm) {\n    // Go to the start of the line where the text begins, or the end for whitespace-only lines\n    var cur = cm.getCursor(), firstNonWS = cm.getLine(cur.line).search(/\\S/);\n    cm.setCursor(cur.line, firstNonWS == -1 ? line.length : firstNonWS, true);\n  }\n\n  function charIdxInLine(cm, cHar, motion_options) {\n    // Search for cHar in line. \n    // motion_options: {forward, inclusive}\n    // If inclusive = true, include it too.\n    // If forward = true, search forward, else search backwards.\n    // If char is not found on this line, do nothing\n    var cur = cm.getCursor(), line = cm.getLine(cur.line), idx;\n    var ch = toLetter(cHar), mo = motion_options;\n    if (mo.forward) {\n      idx = line.indexOf(ch, cur.ch + 1); \n      if (idx != -1 && mo.inclusive) idx += 1;\n    } else {\n      idx = line.lastIndexOf(ch, cur.ch);\n      if (idx != -1 && !mo.inclusive) idx += 1;\n    }\n    return idx;\n  }\n\n  function moveTillChar(cm, cHar, motion_options) {\n    // Move to cHar in line, as found by charIdxInLine. \n    var idx = charIdxInLine(cm, cHar, motion_options), cur = cm.getCursor();\n    if (idx != -1) cm.setCursor({line: cur.line, ch: idx}); \n  }\n\n  function delTillChar(cm, cHar, motion_options) {\n    // delete text in this line, untill cHar is met,\n    // as found by charIdxInLine.\n    // If char is not found on this line, do nothing\n    var idx = charIdxInLine(cm, cHar, motion_options);\n    var cur = cm.getCursor();\n    if (idx !== -1) {\n      if (motion_options.forward) {\n        cm.replaceRange(\"\", {line: cur.line, ch: cur.ch}, {line: cur.line, ch: idx});\n      } else {\n        cm.replaceRange(\"\", {line: cur.line, ch: idx}, {line: cur.line, ch: cur.ch});\n      }\n    }\n  }\n\n  function enterInsertMode(cm) {\n    // enter insert mode: switch mode and cursor\n    if (!cm) console.log(\"call enterInsertMode with 'cm' as an argument\");\n    popCount();\n    cm.setOption(\"keyMap\", \"vim-insert\");\n  }\n\n  // main keymap\n  var map = CodeMirror.keyMap.vim = {\n    // Pipe (|); TODO: should be *screen* chars, so need a util function to turn tabs into spaces?\n    \"'|'\": function(cm) {\n      cm.setCursor(cm.getCursor().line, popCount() - 1, true);\n    },\n    \"'^'\": function(cm) { popCount(); goLineStartText(cm);},\n    \"A\": function(cm) {\n      cm.setCursor(cm.getCursor().line, cm.getCursor().ch+1, true);\n      enterInsertMode(cm);\n    },\n    \"Shift-A\": function(cm) { CodeMirror.commands.goLineEnd(cm); enterInsertMode(cm);},\n    \"I\": function(cm) { enterInsertMode(cm);},\n    \"Shift-I\": function(cm) { goLineStartText(cm); enterInsertMode(cm);},\n    \"O\": function(cm) {\n      CodeMirror.commands.goLineEnd(cm);\n      CodeMirror.commands.newlineAndIndent(cm);\n      enterInsertMode(cm);\n    },\n    \"Shift-O\": function(cm) {\n      CodeMirror.commands.goLineStart(cm);\n      cm.replaceSelection(\"\\n\", \"start\");\n      cm.indentLine(cm.getCursor().line);\n      enterInsertMode(cm);\n    },\n    \"G\": function(cm) { cm.setOption(\"keyMap\", \"vim-prefix-g\");},\n    \"Shift-D\": function(cm) {\n      // commented out verions works, but I left original, cause maybe \n      // I don't know vim enouth to see what it does\n      /* var cur = cm.getCursor();\n      var f = {line: cur.line, ch: cur.ch}, t = {line: cur.line};\n      pushInBuffer(cm.getRange(f, t));\n      cm.replaceRange(\"\", f, t);\n      */\n      emptyBuffer();\n      mark[\"Shift-D\"] = cm.getCursor(false).line;\n      cm.setCursor(cm.getCursor(true).line);\n      delTillMark(cm,\"Shift-D\"); mark = [];\n    },\n\n    \"S\": function (cm) {\n      countTimes(function (_cm) {\n        CodeMirror.commands.delCharRight(_cm);\n      })(cm);\n      enterInsertMode(cm);\n    },\n    \"M\": function(cm) {cm.setOption(\"keyMap\", \"vim-prefix-m\"); mark = [];},\n    \"Y\": function(cm) {cm.setOption(\"keyMap\", \"vim-prefix-y\"); emptyBuffer(); yank = 0;},\n    \"Shift-Y\": function(cm) {\n      emptyBuffer();\n      mark[\"Shift-D\"] = cm.getCursor(false).line;\n      cm.setCursor(cm.getCursor(true).line);\n      yankTillMark(cm,\"Shift-D\"); mark = [];\n    },\n    \"/\": function(cm) {var f = CodeMirror.commands.find; f && f(cm); sdir = \"f\";},\n    \"'?'\": function(cm) {\n      var f = CodeMirror.commands.find;\n      if (f) { f(cm); CodeMirror.commands.findPrev(cm); sdir = \"r\"; }\n    },\n    \"N\": function(cm) {\n      var fn = CodeMirror.commands.findNext;\n      if (fn) sdir != \"r\" ? fn(cm) : CodeMirror.commands.findPrev(cm);\n    },\n    \"Shift-N\": function(cm) {\n      var fn = CodeMirror.commands.findNext;\n      if (fn) sdir != \"r\" ? CodeMirror.commands.findPrev(cm) : fn.findNext(cm);\n    },\n    \"Shift-G\": function(cm) {\n      count == \"\" ? cm.setCursor(cm.lineCount()) : cm.setCursor(parseInt(count)-1);\n      popCount();\n      CodeMirror.commands.goLineStart(cm);\n    },\n    \"'$'\": function (cm) {\n      countTimes(\"goLineEnd\")(cm);\n      if (cm.getCursor().ch) CodeMirror.commands.goColumnLeft(cm);\n    },\n    nofallthrough: true, style: \"fat-cursor\"\n  };\n\n  // standard mode switching\n  iterList([\"d\", \"t\", \"T\", \"f\", \"F\", \"c\", \"r\"],\n      function (ch) {\n        CodeMirror.keyMap.vim[toCombo(ch)] = function (cm) {\n          cm.setOption(\"keyMap\", \"vim-prefix-\" + ch);\n          emptyBuffer();\n        };\n      });\n\n  function addCountBindings(keyMap) {\n    // Add bindings for number keys\n    keyMap[\"0\"] = function(cm) {\n      count.length > 0 ? pushCountDigit(\"0\")(cm) : CodeMirror.commands.goLineStart(cm);\n    };\n    for (var i = 1; i < 10; ++i) keyMap[i] = pushCountDigit(i);\n  }\n  addCountBindings(CodeMirror.keyMap.vim);\n\n  // main num keymap\n  // Add bindings that are influenced by number keys\n  iterObj({\n    \"H\": \"goColumnLeft\", \"L\": \"goColumnRight\", \"J\": \"goLineDown\",\n    \"K\": \"goLineUp\", \"Left\": \"goColumnLeft\", \"Right\": \"goColumnRight\",\n    \"Down\": \"goLineDown\", \"Up\": \"goLineUp\", \"Backspace\": \"goCharLeft\",\n    \"Space\": \"goCharRight\",\n    \"B\": function(cm) {moveToWord(cm, word, -1, \"end\");},\n    \"E\": function(cm) {moveToWord(cm, word, 1, \"end\");},\n    \"W\": function(cm) {moveToWord(cm, word, 1, \"start\");},\n    \"Shift-B\": function(cm) {moveToWord(cm, bigWord, -1, \"end\");},\n    \"Shift-E\": function(cm) {moveToWord(cm, bigWord, 1, \"end\");},\n    \"Shift-W\": function(cm) {moveToWord(cm, bigWord, 1, \"start\");},\n    \"X\": function(cm) {CodeMirror.commands.delCharRight(cm);},\n    \"P\": function(cm) {\n      var cur = cm.getCursor().line;\n      if (buf!= \"\") {\n        CodeMirror.commands.goLineEnd(cm); \n        cm.replaceSelection(buf, \"end\");\n      }\n      cm.setCursor(cur+1);\n    },\n    \"Shift-X\": function(cm) {CodeMirror.commands.delCharLeft(cm);},\n    \"Shift-J\": function(cm) {joinLineNext(cm);},\n    \"Shift-P\": function(cm) {\n      var cur = cm.getCursor().line;\n      if (buf!= \"\") {\n        CodeMirror.commands.goLineUp(cm); \n        CodeMirror.commands.goLineEnd(cm); \n        cm.replaceSelection(buf, \"end\");\n      }\n      cm.setCursor(cur+1);\n    },\n    \"'~'\": function(cm) {\n      var cur = cm.getCursor(), cHar = cm.getRange({line: cur.line, ch: cur.ch}, {line: cur.line, ch: cur.ch+1});\n      cHar = cHar != cHar.toLowerCase() ? cHar.toLowerCase() : cHar.toUpperCase();\n      cm.replaceRange(cHar, {line: cur.line, ch: cur.ch}, {line: cur.line, ch: cur.ch+1});\n      cm.setCursor(cur.line, cur.ch+1);\n    },\n    \"Ctrl-B\": function(cm) {CodeMirror.commands.goPageUp(cm);},\n    \"Ctrl-F\": function(cm) {CodeMirror.commands.goPageDown(cm);},\n    \"Ctrl-P\": \"goLineUp\", \"Ctrl-N\": \"goLineDown\", \n    \"U\": \"undo\", \"Ctrl-R\": \"redo\"\n  }, function(key, cmd) { map[key] = countTimes(cmd); });\n\n  // empty key maps\n  iterList([\n      \"vim-prefix-d'\", \n      \"vim-prefix-y'\", \n      \"vim-prefix-df\",\n      \"vim-prefix-dF\",\n      \"vim-prefix-dt\",\n      \"vim-prefix-dT\",\n      \"vim-prefix-c\",\n      \"vim-prefix-cf\",\n      \"vim-prefix-cF\",\n      \"vim-prefix-ct\",\n      \"vim-prefix-cT\",\n      \"vim-prefix-\",\n      \"vim-prefix-f\",\n      \"vim-prefix-F\",\n      \"vim-prefix-t\",\n      \"vim-prefix-T\",\n      \"vim-prefix-r\",\n      \"vim-prefix-m\"\n      ], \n      function (prefix) {\n        CodeMirror.keyMap[prefix] = {\n          auto: \"vim\", \n          nofallthrough: true\n        };\n      });\n\n  CodeMirror.keyMap[\"vim-prefix-g\"] = {\n    \"E\": countTimes(function(cm) { moveToWord(cm, word, -1, \"start\");}),\n    \"Shift-E\": countTimes(function(cm) { moveToWord(cm, bigWord, -1, \"start\");}),\n    \"G\": function (cm) { cm.setCursor({line: 0, ch: cm.getCursor().ch});},\n    auto: \"vim\", nofallthrough: true, style: \"fat-cursor\"\n  };\n\n  CodeMirror.keyMap[\"vim-prefix-d\"] = {\n    \"D\": countTimes(function(cm) {\n      pushInBuffer(\"\\n\"+cm.getLine(cm.getCursor().line));\n      cm.removeLine(cm.getCursor().line);\n    }),\n    \"'\": function(cm) {\n      cm.setOption(\"keyMap\", \"vim-prefix-d'\");\n      emptyBuffer();\n    },\n    \"E\": countTimes(\"delWordRight\"),\n    \"B\": countTimes(\"delWordLeft\"),\n    auto: \"vim\", nofallthrough: true, style: \"fat-cursor\"\n  }; \n  // FIXME - does not work for bindings like \"d3e\"\n  addCountBindings(CodeMirror.keyMap[\"vim-prefix-d\"]);\n\n  CodeMirror.keyMap[\"vim-prefix-c\"] = {\n    \"E\": function (cm) {\n      countTimes(\"delWordRight\")(cm);\n      enterInsertMode(cm);\n    },\n    \"B\": function (cm) {\n      countTimes(\"delWordLeft\")(cm);\n      enterInsertMode(cm);\n    },\n    \"C\": function (cm) {\n      iterTimes(function (i, last) {\n        CodeMirror.commands.deleteLine(cm);\n        if (i) {\n          CodeMirror.commands.delCharRight(cm);\n          if (last) CodeMirror.commands.deleteLine(cm);\n        }\n      });\n      enterInsertMode(cm);\n    },\n    auto: \"vim\", nofallthrough: true, style: \"fat-cursor\"\n  };\n\n  iterList([\"vim-prefix-d\", \"vim-prefix-c\", \"vim-prefix-\"], function (prefix) {\n    iterList([\"f\", \"F\", \"T\", \"t\"],\n      function (ch) {\n        CodeMirror.keyMap[prefix][toCombo(ch)] = function (cm) {\n          cm.setOption(\"keyMap\", prefix + ch);\n          emptyBuffer();\n        };\n      });\n  });\n\n  var MOTION_OPTIONS = {\n    \"t\": {inclusive: false, forward: true},\n    \"f\": {inclusive: true,  forward: true},\n    \"T\": {inclusive: false, forward: false},\n    \"F\": {inclusive: true,  forward: false}\n  };\n\n  function setupPrefixBindingForKey(m) {\n    CodeMirror.keyMap[\"vim-prefix-m\"][m] = function(cm) {\n      mark[m] = cm.getCursor().line;\n    };\n    CodeMirror.keyMap[\"vim-prefix-d'\"][m] = function(cm) {\n      delTillMark(cm,m);\n    };\n    CodeMirror.keyMap[\"vim-prefix-y'\"][m] = function(cm) {\n      yankTillMark(cm,m);\n    };\n    CodeMirror.keyMap[\"vim-prefix-r\"][m] = function (cm) {\n      var cur = cm.getCursor();\n      cm.replaceRange(toLetter(m), \n          {line: cur.line, ch: cur.ch},\n          {line: cur.line, ch: cur.ch + 1});\n      CodeMirror.commands.goColumnLeft(cm);\n    };\n    // all commands, related to motions till char in line\n    iterObj(MOTION_OPTIONS, function (ch, options) {\n      CodeMirror.keyMap[\"vim-prefix-\" + ch][m] = function(cm) {\n        moveTillChar(cm, m, options);\n      };\n      CodeMirror.keyMap[\"vim-prefix-d\" + ch][m] = function(cm) {\n        delTillChar(cm, m, options);\n      };\n      CodeMirror.keyMap[\"vim-prefix-c\" + ch][m] = function(cm) {\n        delTillChar(cm, m, options);\n        enterInsertMode(cm);\n      };\n    });\n  };\n  for (var i = 65; i < 65 + 26; i++) { // uppercase alphabet char codes\n    var ch = String.fromCharCode(i);\n    setupPrefixBindingForKey(toCombo(ch));\n    setupPrefixBindingForKey(toCombo(ch.toLowerCase()));\n  }\n  iterList(SPECIAL_SYMBOLS, function (ch) {\n    setupPrefixBindingForKey(toCombo(ch));\n  });\n  setupPrefixBindingForKey(\"Space\");\n\n  CodeMirror.keyMap[\"vim-prefix-y\"] = {\n    \"Y\": countTimes(function(cm) { pushInBuffer(\"\\n\"+cm.getLine(cm.getCursor().line+yank)); yank++; }),\n    \"'\": function(cm) {cm.setOption(\"keyMap\", \"vim-prefix-y'\"); emptyBuffer();},\n    auto: \"vim\", nofallthrough: true, style: \"fat-cursor\"\n  };\n\n  CodeMirror.keyMap[\"vim-insert\"] = {\n    // TODO: override navigation keys so that Esc will cancel automatic indentation from o, O, i_<CR>\n    \"Esc\": function(cm) {\n      cm.setCursor(cm.getCursor().line, cm.getCursor().ch-1, true); \n      cm.setOption(\"keyMap\", \"vim\");\n    },\n    \"Ctrl-N\": \"autocomplete\",\n    \"Ctrl-P\": \"autocomplete\",\n    fallthrough: [\"default\"]\n  };\n})();\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/lib/codemirror.css",
    "content": ".CodeMirror {\n  line-height: 1em;\n  font-family: monospace;\n}\n\n.CodeMirror-scroll {\n  overflow: auto;\n  height: 300px;\n  /* This is needed to prevent an IE[67] bug where the scrolled content\n     is visible outside of the scrolling box. */\n  position: relative;\n  outline: none;\n}\n\n.CodeMirror-gutter {\n  position: absolute; left: 0; top: 0;\n  z-index: 10;\n  background-color: #f7f7f7;\n  border-right: 1px solid #eee;\n  min-width: 2em;\n  height: 100%;\n}\n.CodeMirror-gutter-text {\n  color: #aaa;\n  text-align: right;\n  padding: .4em .2em .4em .4em;\n  white-space: pre !important;\n}\n.CodeMirror-lines {\n  padding: .4em;\n  white-space: pre;\n}\n\n.CodeMirror pre {\n  -moz-border-radius: 0;\n  -webkit-border-radius: 0;\n  -o-border-radius: 0;\n  border-radius: 0;\n  border-width: 0; margin: 0; padding: 0; background: transparent;\n  font-family: inherit;\n  font-size: inherit;\n  padding: 0; margin: 0;\n  white-space: pre;\n  word-wrap: normal;\n  line-height: inherit;\n  color: inherit;\n}\n\n.CodeMirror-wrap pre {\n  word-wrap: break-word;\n  white-space: pre-wrap;\n  word-break: normal;\n}\n.CodeMirror-wrap .CodeMirror-scroll {\n  overflow-x: hidden;\n}\n\n.CodeMirror textarea {\n  outline: none !important;\n}\n\n.CodeMirror pre.CodeMirror-cursor {\n  z-index: 10;\n  position: absolute;\n  visibility: hidden;\n  border-left: 1px solid black;\n  border-right: none;\n  width: 0;\n}\n.cm-keymap-fat-cursor pre.CodeMirror-cursor {\n  width: auto;\n  border: 0;\n  background: transparent;\n  background: rgba(0, 200, 0, .4);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#6600c800, endColorstr=#4c00c800);\n}\n/* Kludge to turn off filter in ie9+, which also accepts rgba */\n.cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id) {\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n}\n.CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite {}\n.CodeMirror-focused pre.CodeMirror-cursor {\n  visibility: visible;\n}\n\ndiv.CodeMirror-selected { background: #d9d9d9; }\n.CodeMirror-focused div.CodeMirror-selected { background: #d7d4f0; }\n\n.CodeMirror-searching {\n  background: #ffa;\n  background: rgba(255, 255, 0, .4);\n}\n\n/* Default theme */\n\n.cm-s-default span.cm-keyword {color: #708;}\n.cm-s-default span.cm-atom {color: #219;}\n.cm-s-default span.cm-number {color: #164;}\n.cm-s-default span.cm-def {color: #00f;}\n.cm-s-default span.cm-variable {color: black;}\n.cm-s-default span.cm-variable-2 {color: #05a;}\n.cm-s-default span.cm-variable-3 {color: #085;}\n.cm-s-default span.cm-property {color: black;}\n.cm-s-default span.cm-operator {color: black;}\n.cm-s-default span.cm-comment {color: #a50;}\n.cm-s-default span.cm-string {color: #a11;}\n.cm-s-default span.cm-string-2 {color: #f50;}\n.cm-s-default span.cm-meta {color: #555;}\n.cm-s-default span.cm-error {color: #f00;}\n.cm-s-default span.cm-qualifier {color: #555;}\n.cm-s-default span.cm-builtin {color: #30a;}\n.cm-s-default span.cm-bracket {color: #cc7;}\n.cm-s-default span.cm-tag {color: #170;}\n.cm-s-default span.cm-attribute {color: #00c;}\n.cm-s-default span.cm-header {color: blue;}\n.cm-s-default span.cm-quote {color: #090;}\n.cm-s-default span.cm-hr {color: #999;}\n.cm-s-default span.cm-link {color: #00c;}\n\nspan.cm-header, span.cm-strong {font-weight: bold;}\nspan.cm-em {font-style: italic;}\nspan.cm-emstrong {font-style: italic; font-weight: bold;}\nspan.cm-link {text-decoration: underline;}\n\ndiv.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}\ndiv.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/lib/codemirror.js",
    "content": "// CodeMirror version 2.25\n//\n// All functions that need access to the editor's state live inside\n// the CodeMirror function. Below that, at the bottom of the file,\n// some utilities are defined.\n\n// CodeMirror is the only global var we claim\nvar CodeMirror = (function() {\n  // This is the function that produces an editor instance. Its\n  // closure is used to store the editor state.\n  function CodeMirror(place, givenOptions) {\n    // Determine effective options based on given values and defaults.\n    var options = {}, defaults = CodeMirror.defaults;\n    for (var opt in defaults)\n      if (defaults.hasOwnProperty(opt))\n        options[opt] = (givenOptions && givenOptions.hasOwnProperty(opt) ? givenOptions : defaults)[opt];\n\n    // The element in which the editor lives.\n    var wrapper = document.createElement(\"div\");\n    wrapper.className = \"CodeMirror\" + (options.lineWrapping ? \" CodeMirror-wrap\" : \"\");\n    // This mess creates the base DOM structure for the editor.\n    wrapper.innerHTML =\n      '<div style=\"overflow: hidden; position: relative; width: 3px; height: 0px;\">' + // Wraps and hides input textarea\n        '<textarea style=\"position: absolute; padding: 0; width: 1px; height: 1em\" wrap=\"off\" ' +\n          'autocorrect=\"off\" autocapitalize=\"off\"></textarea></div>' +\n      '<div class=\"CodeMirror-scroll\" tabindex=\"-1\">' +\n        '<div style=\"position: relative\">' + // Set to the height of the text, causes scrolling\n          '<div style=\"position: relative\">' + // Moved around its parent to cover visible view\n            '<div class=\"CodeMirror-gutter\"><div class=\"CodeMirror-gutter-text\"></div></div>' +\n            // Provides positioning relative to (visible) text origin\n            '<div class=\"CodeMirror-lines\"><div style=\"position: relative; z-index: 0\">' +\n              '<div style=\"position: absolute; width: 100%; height: 0; overflow: hidden; visibility: hidden;\"></div>' +\n              '<pre class=\"CodeMirror-cursor\">&#160;</pre>' + // Absolutely positioned blinky cursor\n              '<div style=\"position: relative; z-index: -1\"></div><div></div>' + // DIVs containing the selection and the actual code\n            '</div></div></div></div></div>';\n    if (place.appendChild) place.appendChild(wrapper); else place(wrapper);\n    // I've never seen more elegant code in my life.\n    var inputDiv = wrapper.firstChild, input = inputDiv.firstChild,\n        scroller = wrapper.lastChild, code = scroller.firstChild,\n        mover = code.firstChild, gutter = mover.firstChild, gutterText = gutter.firstChild,\n        lineSpace = gutter.nextSibling.firstChild, measure = lineSpace.firstChild,\n        cursor = measure.nextSibling, selectionDiv = cursor.nextSibling,\n        lineDiv = selectionDiv.nextSibling;\n    themeChanged(); keyMapChanged();\n    // Needed to hide big blue blinking cursor on Mobile Safari\n    if (ios) input.style.width = \"0px\";\n    if (!webkit) lineSpace.draggable = true;\n    lineSpace.style.outline = \"none\";\n    if (options.tabindex != null) input.tabIndex = options.tabindex;\n    if (options.autofocus) focusInput();\n    if (!options.gutter && !options.lineNumbers) gutter.style.display = \"none\";\n    // Needed to handle Tab key in KHTML\n    if (khtml) inputDiv.style.height = \"1px\", inputDiv.style.position = \"absolute\";\n\n    // Check for problem with IE innerHTML not working when we have a\n    // P (or similar) parent node.\n    try { stringWidth(\"x\"); }\n    catch (e) {\n      if (e.message.match(/runtime/i))\n        e = new Error(\"A CodeMirror inside a P-style element does not work in Internet Explorer. (innerHTML bug)\");\n      throw e;\n    }\n\n    // Delayed object wrap timeouts, making sure only one is active. blinker holds an interval.\n    var poll = new Delayed(), highlight = new Delayed(), blinker;\n\n    // mode holds a mode API object. doc is the tree of Line objects,\n    // work an array of lines that should be parsed, and history the\n    // undo history (instance of History constructor).\n    var mode, doc = new BranchChunk([new LeafChunk([new Line(\"\")])]), work, focused;\n    loadMode();\n    // The selection. These are always maintained to point at valid\n    // positions. Inverted is used to remember that the user is\n    // selecting bottom-to-top.\n    var sel = {from: {line: 0, ch: 0}, to: {line: 0, ch: 0}, inverted: false};\n    // Selection-related flags. shiftSelecting obviously tracks\n    // whether the user is holding shift.\n    var shiftSelecting, lastClick, lastDoubleClick, lastScrollPos = 0, draggingText,\n        overwrite = false, suppressEdits = false;\n    // Variables used by startOperation/endOperation to track what\n    // happened during the operation.\n    var updateInput, userSelChange, changes, textChanged, selectionChanged, leaveInputAlone,\n        gutterDirty, callbacks, maxLengthChanged;\n    // Current visible range (may be bigger than the view window).\n    var displayOffset = 0, showingFrom = 0, showingTo = 0, lastSizeC = 0;\n    // bracketHighlighted is used to remember that a bracket has been\n    // marked.\n    var bracketHighlighted;\n    // Tracks the maximum line length so that the horizontal scrollbar\n    // can be kept static when scrolling.\n    var maxLine = \"\", maxWidth;\n    var tabCache = {};\n\n    // Initialize the content.\n    operation(function(){setValue(options.value || \"\"); updateInput = false;})();\n    var history = new History();\n\n    // Register our event handlers.\n    connect(scroller, \"mousedown\", operation(onMouseDown));\n    connect(scroller, \"dblclick\", operation(onDoubleClick));\n    connect(lineSpace, \"selectstart\", e_preventDefault);\n    // Gecko browsers fire contextmenu *after* opening the menu, at\n    // which point we can't mess with it anymore. Context menu is\n    // handled in onMouseDown for Gecko.\n    if (!gecko) connect(scroller, \"contextmenu\", onContextMenu);\n    connect(scroller, \"scroll\", function() {\n      lastScrollPos = scroller.scrollTop;\n      updateDisplay([]);\n      if (options.fixedGutter) gutter.style.left = scroller.scrollLeft + \"px\";\n      if (options.onScroll) options.onScroll(instance);\n    });\n    connect(window, \"resize\", function() {updateDisplay(true);});\n    connect(input, \"keyup\", operation(onKeyUp));\n    connect(input, \"input\", fastPoll);\n    connect(input, \"keydown\", operation(onKeyDown));\n    connect(input, \"keypress\", operation(onKeyPress));\n    connect(input, \"focus\", onFocus);\n    connect(input, \"blur\", onBlur);\n\n    if (options.dragDrop) {\n      connect(lineSpace, \"dragstart\", onDragStart);\n      function drag_(e) {\n        if (options.onDragEvent && options.onDragEvent(instance, addStop(e))) return;\n        e_stop(e);\n      }\n      connect(scroller, \"dragenter\", drag_);\n      connect(scroller, \"dragover\", drag_);\n      connect(scroller, \"drop\", operation(onDrop));\n    }\n    connect(scroller, \"paste\", function(){focusInput(); fastPoll();});\n    connect(input, \"paste\", fastPoll);\n    connect(input, \"cut\", operation(function(){\n      if (!options.readOnly) replaceSelection(\"\");\n    }));\n\n    // Needed to handle Tab key in KHTML\n    if (khtml) connect(code, \"mouseup\", function() {\n        if (document.activeElement == input) input.blur();\n        focusInput();\n    });\n\n    // IE throws unspecified error in certain cases, when\n    // trying to access activeElement before onload\n    var hasFocus; try { hasFocus = (document.activeElement == input); } catch(e) { }\n    if (hasFocus || options.autofocus) setTimeout(onFocus, 20);\n    else onBlur();\n\n    function isLine(l) {return l >= 0 && l < doc.size;}\n    // The instance object that we'll return. Mostly calls out to\n    // local functions in the CodeMirror function. Some do some extra\n    // range checking and/or clipping. operation is used to wrap the\n    // call so that changes it makes are tracked, and the display is\n    // updated afterwards.\n    var instance = wrapper.CodeMirror = {\n      getValue: getValue,\n      setValue: operation(setValue),\n      getSelection: getSelection,\n      replaceSelection: operation(replaceSelection),\n      focus: function(){window.focus(); focusInput(); onFocus(); fastPoll();},\n      setOption: function(option, value) {\n        var oldVal = options[option];\n        options[option] = value;\n        if (option == \"mode\" || option == \"indentUnit\") loadMode();\n        else if (option == \"readOnly\" && value == \"nocursor\") {onBlur(); input.blur();}\n        else if (option == \"readOnly\" && !value) {resetInput(true);}\n        else if (option == \"theme\") themeChanged();\n        else if (option == \"lineWrapping\" && oldVal != value) operation(wrappingChanged)();\n        else if (option == \"tabSize\") updateDisplay(true);\n        else if (option == \"keyMap\") keyMapChanged();\n        if (option == \"lineNumbers\" || option == \"gutter\" || option == \"firstLineNumber\" || option == \"theme\") {\n          gutterChanged();\n          updateDisplay(true);\n        }\n      },\n      getOption: function(option) {return options[option];},\n      undo: operation(undo),\n      redo: operation(redo),\n      indentLine: operation(function(n, dir) {\n        if (typeof dir != \"string\") {\n          if (dir == null) dir = options.smartIndent ? \"smart\" : \"prev\";\n          else dir = dir ? \"add\" : \"subtract\";\n        }\n        if (isLine(n)) indentLine(n, dir);\n      }),\n      indentSelection: operation(indentSelected),\n      historySize: function() {return {undo: history.done.length, redo: history.undone.length};},\n      clearHistory: function() {history = new History();},\n      matchBrackets: operation(function(){matchBrackets(true);}),\n      getTokenAt: operation(function(pos) {\n        pos = clipPos(pos);\n        return getLine(pos.line).getTokenAt(mode, getStateBefore(pos.line), pos.ch);\n      }),\n      getStateAfter: function(line) {\n        line = clipLine(line == null ? doc.size - 1: line);\n        return getStateBefore(line + 1);\n      },\n      cursorCoords: function(start, mode) {\n        if (start == null) start = sel.inverted;\n        return this.charCoords(start ? sel.from : sel.to, mode);\n      },\n      charCoords: function(pos, mode) {\n        pos = clipPos(pos);\n        if (mode == \"local\") return localCoords(pos, false);\n        if (mode == \"div\") return localCoords(pos, true);\n        return pageCoords(pos);\n      },\n      coordsChar: function(coords) {\n        var off = eltOffset(lineSpace);\n        return coordsChar(coords.x - off.left, coords.y - off.top);\n      },\n      markText: operation(markText),\n      setBookmark: setBookmark,\n      findMarksAt: findMarksAt,\n      setMarker: operation(addGutterMarker),\n      clearMarker: operation(removeGutterMarker),\n      setLineClass: operation(setLineClass),\n      hideLine: operation(function(h) {return setLineHidden(h, true);}),\n      showLine: operation(function(h) {return setLineHidden(h, false);}),\n      onDeleteLine: function(line, f) {\n        if (typeof line == \"number\") {\n          if (!isLine(line)) return null;\n          line = getLine(line);\n        }\n        (line.handlers || (line.handlers = [])).push(f);\n        return line;\n      },\n      lineInfo: lineInfo,\n      addWidget: function(pos, node, scroll, vert, horiz) {\n        pos = localCoords(clipPos(pos));\n        var top = pos.yBot, left = pos.x;\n        node.style.position = \"absolute\";\n        code.appendChild(node);\n        if (vert == \"over\") top = pos.y;\n        else if (vert == \"near\") {\n          var vspace = Math.max(scroller.offsetHeight, doc.height * textHeight()),\n              hspace = Math.max(code.clientWidth, lineSpace.clientWidth) - paddingLeft();\n          if (pos.yBot + node.offsetHeight > vspace && pos.y > node.offsetHeight)\n            top = pos.y - node.offsetHeight;\n          if (left + node.offsetWidth > hspace)\n            left = hspace - node.offsetWidth;\n        }\n        node.style.top = (top + paddingTop()) + \"px\";\n        node.style.left = node.style.right = \"\";\n        if (horiz == \"right\") {\n          left = code.clientWidth - node.offsetWidth;\n          node.style.right = \"0px\";\n        } else {\n          if (horiz == \"left\") left = 0;\n          else if (horiz == \"middle\") left = (code.clientWidth - node.offsetWidth) / 2;\n          node.style.left = (left + paddingLeft()) + \"px\";\n        }\n        if (scroll)\n          scrollIntoView(left, top, left + node.offsetWidth, top + node.offsetHeight);\n      },\n\n      lineCount: function() {return doc.size;},\n      clipPos: clipPos,\n      getCursor: function(start) {\n        if (start == null) start = sel.inverted;\n        return copyPos(start ? sel.from : sel.to);\n      },\n      somethingSelected: function() {return !posEq(sel.from, sel.to);},\n      setCursor: operation(function(line, ch, user) {\n        if (ch == null && typeof line.line == \"number\") setCursor(line.line, line.ch, user);\n        else setCursor(line, ch, user);\n      }),\n      setSelection: operation(function(from, to, user) {\n        (user ? setSelectionUser : setSelection)(clipPos(from), clipPos(to || from));\n      }),\n      getLine: function(line) {if (isLine(line)) return getLine(line).text;},\n      getLineHandle: function(line) {if (isLine(line)) return getLine(line);},\n      setLine: operation(function(line, text) {\n        if (isLine(line)) replaceRange(text, {line: line, ch: 0}, {line: line, ch: getLine(line).text.length});\n      }),\n      removeLine: operation(function(line) {\n        if (isLine(line)) replaceRange(\"\", {line: line, ch: 0}, clipPos({line: line+1, ch: 0}));\n      }),\n      replaceRange: operation(replaceRange),\n      getRange: function(from, to) {return getRange(clipPos(from), clipPos(to));},\n\n      triggerOnKeyDown: operation(onKeyDown),\n      execCommand: function(cmd) {return commands[cmd](instance);},\n      // Stuff used by commands, probably not much use to outside code.\n      moveH: operation(moveH),\n      deleteH: operation(deleteH),\n      moveV: operation(moveV),\n      toggleOverwrite: function() {\n        if(overwrite){\n          overwrite = false;\n          cursor.className = cursor.className.replace(\" CodeMirror-overwrite\", \"\");\n        } else {\n          overwrite = true;\n          cursor.className += \" CodeMirror-overwrite\";\n        }\n      },\n\n      posFromIndex: function(off) {\n        var lineNo = 0, ch;\n        doc.iter(0, doc.size, function(line) {\n          var sz = line.text.length + 1;\n          if (sz > off) { ch = off; return true; }\n          off -= sz;\n          ++lineNo;\n        });\n        return clipPos({line: lineNo, ch: ch});\n      },\n      indexFromPos: function (coords) {\n        if (coords.line < 0 || coords.ch < 0) return 0;\n        var index = coords.ch;\n        doc.iter(0, coords.line, function (line) {\n          index += line.text.length + 1;\n        });\n        return index;\n      },\n      scrollTo: function(x, y) {\n        if (x != null) scroller.scrollLeft = x;\n        if (y != null) scroller.scrollTop = y;\n        updateDisplay([]);\n      },\n\n      operation: function(f){return operation(f)();},\n      compoundChange: function(f){return compoundChange(f);},\n      refresh: function(){\n        updateDisplay(true);\n        if (scroller.scrollHeight > lastScrollPos)\n          scroller.scrollTop = lastScrollPos;\n      },\n      getInputField: function(){return input;},\n      getWrapperElement: function(){return wrapper;},\n      getScrollerElement: function(){return scroller;},\n      getGutterElement: function(){return gutter;}\n    };\n\n    function getLine(n) { return getLineAt(doc, n); }\n    function updateLineHeight(line, height) {\n      gutterDirty = true;\n      var diff = height - line.height;\n      for (var n = line; n; n = n.parent) n.height += diff;\n    }\n\n    function setValue(code) {\n      var top = {line: 0, ch: 0};\n      updateLines(top, {line: doc.size - 1, ch: getLine(doc.size-1).text.length},\n                  splitLines(code), top, top);\n      updateInput = true;\n    }\n    function getValue() {\n      var text = [];\n      doc.iter(0, doc.size, function(line) { text.push(line.text); });\n      return text.join(\"\\n\");\n    }\n\n    function onMouseDown(e) {\n      setShift(e_prop(e, \"shiftKey\"));\n      // Check whether this is a click in a widget\n      for (var n = e_target(e); n != wrapper; n = n.parentNode)\n        if (n.parentNode == code && n != mover) return;\n\n      // See if this is a click in the gutter\n      for (var n = e_target(e); n != wrapper; n = n.parentNode)\n        if (n.parentNode == gutterText) {\n          if (options.onGutterClick)\n            options.onGutterClick(instance, indexOf(gutterText.childNodes, n) + showingFrom, e);\n          return e_preventDefault(e);\n        }\n\n      var start = posFromMouse(e);\n\n      switch (e_button(e)) {\n      case 3:\n        if (gecko && !mac) onContextMenu(e);\n        return;\n      case 2:\n        if (start) setCursor(start.line, start.ch, true);\n        setTimeout(focusInput, 20);\n        return;\n      }\n      // For button 1, if it was clicked inside the editor\n      // (posFromMouse returning non-null), we have to adjust the\n      // selection.\n      if (!start) {if (e_target(e) == scroller) e_preventDefault(e); return;}\n\n      if (!focused) onFocus();\n\n      var now = +new Date;\n      if (lastDoubleClick && lastDoubleClick.time > now - 400 && posEq(lastDoubleClick.pos, start)) {\n        e_preventDefault(e);\n        setTimeout(focusInput, 20);\n        return selectLine(start.line);\n      } else if (lastClick && lastClick.time > now - 400 && posEq(lastClick.pos, start)) {\n        lastDoubleClick = {time: now, pos: start};\n        e_preventDefault(e);\n        return selectWordAt(start);\n      } else { lastClick = {time: now, pos: start}; }\n\n      var last = start, going;\n      if (options.dragDrop && dragAndDrop && !options.readOnly && !posEq(sel.from, sel.to) &&\n          !posLess(start, sel.from) && !posLess(sel.to, start)) {\n        // Let the drag handler handle this.\n        if (webkit) lineSpace.draggable = true;\n        function dragEnd(e2) {\n          if (webkit) lineSpace.draggable = false;\n          draggingText = false;\n          up(); drop();\n          if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) {\n            e_preventDefault(e2);\n            setCursor(start.line, start.ch, true);\n            focusInput();\n          }\n        }\n        var up = connect(document, \"mouseup\", operation(dragEnd), true);\n        var drop = connect(scroller, \"drop\", operation(dragEnd), true);\n        draggingText = true;\n        // IE's approach to draggable\n        if (lineSpace.dragDrop) lineSpace.dragDrop();\n        return;\n      }\n      e_preventDefault(e);\n      setCursor(start.line, start.ch, true);\n\n      function extend(e) {\n        var cur = posFromMouse(e, true);\n        if (cur && !posEq(cur, last)) {\n          if (!focused) onFocus();\n          last = cur;\n          setSelectionUser(start, cur);\n          updateInput = false;\n          var visible = visibleLines();\n          if (cur.line >= visible.to || cur.line < visible.from)\n            going = setTimeout(operation(function(){extend(e);}), 150);\n        }\n      }\n\n      function done(e) {\n        clearTimeout(going);\n        var cur = posFromMouse(e);\n        if (cur) setSelectionUser(start, cur);\n        e_preventDefault(e);\n        focusInput();\n        updateInput = true;\n        move(); up();\n      }\n      var move = connect(document, \"mousemove\", operation(function(e) {\n        clearTimeout(going);\n        e_preventDefault(e);\n        if (!ie && !e_button(e)) done(e);\n        else extend(e);\n      }), true);\n      var up = connect(document, \"mouseup\", operation(done), true);\n    }\n    function onDoubleClick(e) {\n      for (var n = e_target(e); n != wrapper; n = n.parentNode)\n        if (n.parentNode == gutterText) return e_preventDefault(e);\n      var start = posFromMouse(e);\n      if (!start) return;\n      lastDoubleClick = {time: +new Date, pos: start};\n      e_preventDefault(e);\n      selectWordAt(start);\n    }\n    function onDrop(e) {\n      if (options.onDragEvent && options.onDragEvent(instance, addStop(e))) return;\n      e.preventDefault();\n      var pos = posFromMouse(e, true), files = e.dataTransfer.files;\n      if (!pos || options.readOnly) return;\n      if (files && files.length && window.FileReader && window.File) {\n        function loadFile(file, i) {\n          var reader = new FileReader;\n          reader.onload = function() {\n            text[i] = reader.result;\n            if (++read == n) {\n              pos = clipPos(pos);\n              operation(function() {\n                var end = replaceRange(text.join(\"\"), pos, pos);\n                setSelectionUser(pos, end);\n              })();\n            }\n          };\n          reader.readAsText(file);\n        }\n        var n = files.length, text = Array(n), read = 0;\n        for (var i = 0; i < n; ++i) loadFile(files[i], i);\n      }\n      else {\n        try {\n          var text = e.dataTransfer.getData(\"Text\");\n          if (text) {\n            compoundChange(function() {\n              var curFrom = sel.from, curTo = sel.to;\n              setSelectionUser(pos, pos);\n              if (draggingText) replaceRange(\"\", curFrom, curTo);\n              replaceSelection(text);\n              focusInput();\n            });\n          }\n        }\n        catch(e){}\n      }\n    }\n    function onDragStart(e) {\n      var txt = getSelection();\n      e.dataTransfer.setData(\"Text\", txt);\n      \n      // Use dummy image instead of default browsers image.\n      if (gecko || chrome) {\n        var img = document.createElement('img');\n        img.scr = 'data:image/gif;base64,R0lGODdhAgACAIAAAAAAAP///ywAAAAAAgACAAACAoRRADs='; //1x1 image\n        e.dataTransfer.setDragImage(img, 0, 0);\n      }\n    }\n\n    function doHandleBinding(bound, dropShift) {\n      if (typeof bound == \"string\") {\n        bound = commands[bound];\n        if (!bound) return false;\n      }\n      var prevShift = shiftSelecting;\n      try {\n        if (options.readOnly) suppressEdits = true;\n        if (dropShift) shiftSelecting = null;\n        bound(instance);\n      } catch(e) {\n        if (e != Pass) throw e;\n        return false;\n      } finally {\n        shiftSelecting = prevShift;\n        suppressEdits = false;\n      }\n      return true;\n    }\n    function handleKeyBinding(e) {\n      // Handle auto keymap transitions\n      var startMap = getKeyMap(options.keyMap), next = startMap.auto;\n      clearTimeout(maybeTransition);\n      if (next && !isModifierKey(e)) maybeTransition = setTimeout(function() {\n        if (getKeyMap(options.keyMap) == startMap) {\n          options.keyMap = (next.call ? next.call(null, instance) : next);\n        }\n      }, 50);\n\n      var name = keyNames[e_prop(e, \"keyCode\")], handled = false;\n      if (name == null || e.altGraphKey) return false;\n      if (e_prop(e, \"altKey\")) name = \"Alt-\" + name;\n      if (e_prop(e, \"ctrlKey\")) name = \"Ctrl-\" + name;\n      if (e_prop(e, \"metaKey\")) name = \"Cmd-\" + name;\n\n      var stopped = false;\n      function stop() { stopped = true; }\n\n      if (e_prop(e, \"shiftKey\")) {\n        handled = lookupKey(\"Shift-\" + name, options.extraKeys, options.keyMap,\n                            function(b) {return doHandleBinding(b, true);}, stop)\n               || lookupKey(name, options.extraKeys, options.keyMap, function(b) {\n                 if (typeof b == \"string\" && /^go[A-Z]/.test(b)) return doHandleBinding(b);\n               }, stop);\n      } else {\n        handled = lookupKey(name, options.extraKeys, options.keyMap, doHandleBinding, stop);\n      }\n      if (stopped) handled = false;\n      if (handled) {\n        e_preventDefault(e);\n        restartBlink();\n        if (ie) { e.oldKeyCode = e.keyCode; e.keyCode = 0; }\n      }\n      return handled;\n    }\n    function handleCharBinding(e, ch) {\n      var handled = lookupKey(\"'\" + ch + \"'\", options.extraKeys,\n                              options.keyMap, function(b) { return doHandleBinding(b, true); });\n      if (handled) {\n        e_preventDefault(e);\n        restartBlink();\n      }\n      return handled;\n    }\n\n    var lastStoppedKey = null, maybeTransition;\n    function onKeyDown(e) {\n      if (!focused) onFocus();\n      if (ie && e.keyCode == 27) { e.returnValue = false; }\n      if (pollingFast) { if (readInput()) pollingFast = false; }\n      if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return;\n      var code = e_prop(e, \"keyCode\");\n      // IE does strange things with escape.\n      setShift(code == 16 || e_prop(e, \"shiftKey\"));\n      // First give onKeyEvent option a chance to handle this.\n      var handled = handleKeyBinding(e);\n      if (window.opera) {\n        lastStoppedKey = handled ? code : null;\n        // Opera has no cut event... we try to at least catch the key combo\n        if (!handled && code == 88 && e_prop(e, mac ? \"metaKey\" : \"ctrlKey\"))\n          replaceSelection(\"\");\n      }\n    }\n    function onKeyPress(e) {\n      if (pollingFast) readInput();\n      if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return;\n      var keyCode = e_prop(e, \"keyCode\"), charCode = e_prop(e, \"charCode\");\n      if (window.opera && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;}\n      if (((window.opera && (!e.which || e.which < 10)) || khtml) && handleKeyBinding(e)) return;\n      var ch = String.fromCharCode(charCode == null ? keyCode : charCode);\n      if (options.electricChars && mode.electricChars && options.smartIndent && !options.readOnly) {\n        if (mode.electricChars.indexOf(ch) > -1)\n          setTimeout(operation(function() {indentLine(sel.to.line, \"smart\");}), 75);\n      }\n      if (handleCharBinding(e, ch)) return;\n      fastPoll();\n    }\n    function onKeyUp(e) {\n      if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return;\n      if (e_prop(e, \"keyCode\") == 16) shiftSelecting = null;\n    }\n\n    function onFocus() {\n      if (options.readOnly == \"nocursor\") return;\n      if (!focused) {\n        if (options.onFocus) options.onFocus(instance);\n        focused = true;\n        if (wrapper.className.search(/\\bCodeMirror-focused\\b/) == -1)\n          wrapper.className += \" CodeMirror-focused\";\n        if (!leaveInputAlone) resetInput(true);\n      }\n      slowPoll();\n      restartBlink();\n    }\n    function onBlur() {\n      if (focused) {\n        if (options.onBlur) options.onBlur(instance);\n        focused = false;\n        if (bracketHighlighted)\n          operation(function(){\n            if (bracketHighlighted) { bracketHighlighted(); bracketHighlighted = null; }\n          })();\n        wrapper.className = wrapper.className.replace(\" CodeMirror-focused\", \"\");\n      }\n      clearInterval(blinker);\n      setTimeout(function() {if (!focused) shiftSelecting = null;}, 150);\n    }\n\n    // Replace the range from from to to by the strings in newText.\n    // Afterwards, set the selection to selFrom, selTo.\n    function updateLines(from, to, newText, selFrom, selTo) {\n      if (suppressEdits) return;\n      if (history) {\n        var old = [];\n        doc.iter(from.line, to.line + 1, function(line) { old.push(line.text); });\n        history.addChange(from.line, newText.length, old);\n        while (history.done.length > options.undoDepth) history.done.shift();\n      }\n      updateLinesNoUndo(from, to, newText, selFrom, selTo);\n    }\n    function unredoHelper(from, to) {\n      if (!from.length) return;\n      var set = from.pop(), out = [];\n      for (var i = set.length - 1; i >= 0; i -= 1) {\n        var change = set[i];\n        var replaced = [], end = change.start + change.added;\n        doc.iter(change.start, end, function(line) { replaced.push(line.text); });\n        out.push({start: change.start, added: change.old.length, old: replaced});\n        var pos = clipPos({line: change.start + change.old.length - 1,\n                           ch: editEnd(replaced[replaced.length-1], change.old[change.old.length-1])});\n        updateLinesNoUndo({line: change.start, ch: 0}, {line: end - 1, ch: getLine(end-1).text.length}, change.old, pos, pos);\n      }\n      updateInput = true;\n      to.push(out);\n    }\n    function undo() {unredoHelper(history.done, history.undone);}\n    function redo() {unredoHelper(history.undone, history.done);}\n\n    function updateLinesNoUndo(from, to, newText, selFrom, selTo) {\n      if (suppressEdits) return;\n      var recomputeMaxLength = false, maxLineLength = maxLine.length;\n      if (!options.lineWrapping)\n        doc.iter(from.line, to.line + 1, function(line) {\n          if (!line.hidden && line.text.length == maxLineLength) {recomputeMaxLength = true; return true;}\n        });\n      if (from.line != to.line || newText.length > 1) gutterDirty = true;\n\n      var nlines = to.line - from.line, firstLine = getLine(from.line), lastLine = getLine(to.line);\n      // First adjust the line structure, taking some care to leave highlighting intact.\n      if (from.ch == 0 && to.ch == 0 && newText[newText.length - 1] == \"\") {\n        // This is a whole-line replace. Treated specially to make\n        // sure line objects move the way they are supposed to.\n        var added = [], prevLine = null;\n        if (from.line) {\n          prevLine = getLine(from.line - 1);\n          prevLine.fixMarkEnds(lastLine);\n        } else lastLine.fixMarkStarts();\n        for (var i = 0, e = newText.length - 1; i < e; ++i)\n          added.push(Line.inheritMarks(newText[i], prevLine));\n        if (nlines) doc.remove(from.line, nlines, callbacks);\n        if (added.length) doc.insert(from.line, added);\n      } else if (firstLine == lastLine) {\n        if (newText.length == 1)\n          firstLine.replace(from.ch, to.ch, newText[0]);\n        else {\n          lastLine = firstLine.split(to.ch, newText[newText.length-1]);\n          firstLine.replace(from.ch, null, newText[0]);\n          firstLine.fixMarkEnds(lastLine);\n          var added = [];\n          for (var i = 1, e = newText.length - 1; i < e; ++i)\n            added.push(Line.inheritMarks(newText[i], firstLine));\n          added.push(lastLine);\n          doc.insert(from.line + 1, added);\n        }\n      } else if (newText.length == 1) {\n        firstLine.replace(from.ch, null, newText[0]);\n        lastLine.replace(null, to.ch, \"\");\n        firstLine.append(lastLine);\n        doc.remove(from.line + 1, nlines, callbacks);\n      } else {\n        var added = [];\n        firstLine.replace(from.ch, null, newText[0]);\n        lastLine.replace(null, to.ch, newText[newText.length-1]);\n        firstLine.fixMarkEnds(lastLine);\n        for (var i = 1, e = newText.length - 1; i < e; ++i)\n          added.push(Line.inheritMarks(newText[i], firstLine));\n        if (nlines > 1) doc.remove(from.line + 1, nlines - 1, callbacks);\n        doc.insert(from.line + 1, added);\n      }\n      if (options.lineWrapping) {\n        var perLine = Math.max(5, scroller.clientWidth / charWidth() - 3);\n        doc.iter(from.line, from.line + newText.length, function(line) {\n          if (line.hidden) return;\n          var guess = Math.ceil(line.text.length / perLine) || 1;\n          if (guess != line.height) updateLineHeight(line, guess);\n        });\n      } else {\n        doc.iter(from.line, from.line + newText.length, function(line) {\n          var l = line.text;\n          if (!line.hidden && l.length > maxLineLength) {\n            maxLine = l; maxLineLength = l.length; maxWidth = null;\n            recomputeMaxLength = false;\n          }\n        });\n        if (recomputeMaxLength) maxLengthChanged = true;\n      }\n\n      // Add these lines to the work array, so that they will be\n      // highlighted. Adjust work lines if lines were added/removed.\n      var newWork = [], lendiff = newText.length - nlines - 1;\n      for (var i = 0, l = work.length; i < l; ++i) {\n        var task = work[i];\n        if (task < from.line) newWork.push(task);\n        else if (task > to.line) newWork.push(task + lendiff);\n      }\n      var hlEnd = from.line + Math.min(newText.length, 500);\n      highlightLines(from.line, hlEnd);\n      newWork.push(hlEnd);\n      work = newWork;\n      startWorker(100);\n      // Remember that these lines changed, for updating the display\n      changes.push({from: from.line, to: to.line + 1, diff: lendiff});\n      var changeObj = {from: from, to: to, text: newText};\n      if (textChanged) {\n        for (var cur = textChanged; cur.next; cur = cur.next) {}\n        cur.next = changeObj;\n      } else textChanged = changeObj;\n\n      // Update the selection\n      function updateLine(n) {return n <= Math.min(to.line, to.line + lendiff) ? n : n + lendiff;}\n      setSelection(selFrom, selTo, updateLine(sel.from.line), updateLine(sel.to.line));\n\n      // Make sure the scroll-size div has the correct height.\n      if (scroller.clientHeight)\n        code.style.height = (doc.height * textHeight() + 2 * paddingTop()) + \"px\";\n    }\n    \n    function computeMaxLength() {\n      var maxLineLength = 0; \n      maxLine = \"\"; maxWidth = null;\n      doc.iter(0, doc.size, function(line) {\n        var l = line.text;\n        if (!line.hidden && l.length > maxLineLength) {\n          maxLineLength = l.length; maxLine = l;\n        }\n      });\n      maxLengthChanged = false;\n    }\n\n    function replaceRange(code, from, to) {\n      from = clipPos(from);\n      if (!to) to = from; else to = clipPos(to);\n      code = splitLines(code);\n      function adjustPos(pos) {\n        if (posLess(pos, from)) return pos;\n        if (!posLess(to, pos)) return end;\n        var line = pos.line + code.length - (to.line - from.line) - 1;\n        var ch = pos.ch;\n        if (pos.line == to.line)\n          ch += code[code.length-1].length - (to.ch - (to.line == from.line ? from.ch : 0));\n        return {line: line, ch: ch};\n      }\n      var end;\n      replaceRange1(code, from, to, function(end1) {\n        end = end1;\n        return {from: adjustPos(sel.from), to: adjustPos(sel.to)};\n      });\n      return end;\n    }\n    function replaceSelection(code, collapse) {\n      replaceRange1(splitLines(code), sel.from, sel.to, function(end) {\n        if (collapse == \"end\") return {from: end, to: end};\n        else if (collapse == \"start\") return {from: sel.from, to: sel.from};\n        else return {from: sel.from, to: end};\n      });\n    }\n    function replaceRange1(code, from, to, computeSel) {\n      var endch = code.length == 1 ? code[0].length + from.ch : code[code.length-1].length;\n      var newSel = computeSel({line: from.line + code.length - 1, ch: endch});\n      updateLines(from, to, code, newSel.from, newSel.to);\n    }\n\n    function getRange(from, to) {\n      var l1 = from.line, l2 = to.line;\n      if (l1 == l2) return getLine(l1).text.slice(from.ch, to.ch);\n      var code = [getLine(l1).text.slice(from.ch)];\n      doc.iter(l1 + 1, l2, function(line) { code.push(line.text); });\n      code.push(getLine(l2).text.slice(0, to.ch));\n      return code.join(\"\\n\");\n    }\n    function getSelection() {\n      return getRange(sel.from, sel.to);\n    }\n\n    var pollingFast = false; // Ensures slowPoll doesn't cancel fastPoll\n    function slowPoll() {\n      if (pollingFast) return;\n      poll.set(options.pollInterval, function() {\n        startOperation();\n        readInput();\n        if (focused) slowPoll();\n        endOperation();\n      });\n    }\n    function fastPoll() {\n      var missed = false;\n      pollingFast = true;\n      function p() {\n        startOperation();\n        var changed = readInput();\n        if (!changed && !missed) {missed = true; poll.set(60, p);}\n        else {pollingFast = false; slowPoll();}\n        endOperation();\n      }\n      poll.set(20, p);\n    }\n\n    // Previnput is a hack to work with IME. If we reset the textarea\n    // on every change, that breaks IME. So we look for changes\n    // compared to the previous content instead. (Modern browsers have\n    // events that indicate IME taking place, but these are not widely\n    // supported or compatible enough yet to rely on.)\n    var prevInput = \"\";\n    function readInput() {\n      if (leaveInputAlone || !focused || hasSelection(input) || options.readOnly) return false;\n      var text = input.value;\n      if (text == prevInput) return false;\n      shiftSelecting = null;\n      var same = 0, l = Math.min(prevInput.length, text.length);\n      while (same < l && prevInput[same] == text[same]) ++same;\n      if (same < prevInput.length)\n        sel.from = {line: sel.from.line, ch: sel.from.ch - (prevInput.length - same)};\n      else if (overwrite && posEq(sel.from, sel.to))\n        sel.to = {line: sel.to.line, ch: Math.min(getLine(sel.to.line).text.length, sel.to.ch + (text.length - same))};\n      replaceSelection(text.slice(same), \"end\");\n      if (text.length > 1000) { input.value = prevInput = \"\"; }\n      else prevInput = text;\n      return true;\n    }\n    function resetInput(user) {\n      if (!posEq(sel.from, sel.to)) {\n        prevInput = \"\";\n        input.value = getSelection();\n        selectInput(input);\n      } else if (user) prevInput = input.value = \"\";\n    }\n\n    function focusInput() {\n      if (options.readOnly != \"nocursor\") input.focus();\n    }\n\n    function scrollEditorIntoView() {\n      if (!cursor.getBoundingClientRect) return;\n      var rect = cursor.getBoundingClientRect();\n      // IE returns bogus coordinates when the instance sits inside of an iframe and the cursor is hidden\n      if (ie && rect.top == rect.bottom) return;\n      var winH = window.innerHeight || Math.max(document.body.offsetHeight, document.documentElement.offsetHeight);\n      if (rect.top < 0 || rect.bottom > winH) cursor.scrollIntoView();\n    }\n    function scrollCursorIntoView() {\n      var cursor = localCoords(sel.inverted ? sel.from : sel.to);\n      var x = options.lineWrapping ? Math.min(cursor.x, lineSpace.offsetWidth) : cursor.x;\n      return scrollIntoView(x, cursor.y, x, cursor.yBot);\n    }\n    function scrollIntoView(x1, y1, x2, y2) {\n      var pl = paddingLeft(), pt = paddingTop();\n      y1 += pt; y2 += pt; x1 += pl; x2 += pl;\n      var screen = scroller.clientHeight, screentop = scroller.scrollTop, scrolled = false, result = true;\n      if (y1 < screentop) {scroller.scrollTop = Math.max(0, y1); scrolled = true;}\n      else if (y2 > screentop + screen) {scroller.scrollTop = y2 - screen; scrolled = true;}\n\n      var screenw = scroller.clientWidth, screenleft = scroller.scrollLeft;\n      var gutterw = options.fixedGutter ? gutter.clientWidth : 0;\n      var atLeft = x1 < gutterw + pl + 10;\n      if (x1 < screenleft + gutterw || atLeft) {\n        if (atLeft) x1 = 0;\n        scroller.scrollLeft = Math.max(0, x1 - 10 - gutterw);\n        scrolled = true;\n      }\n      else if (x2 > screenw + screenleft - 3) {\n        scroller.scrollLeft = x2 + 10 - screenw;\n        scrolled = true;\n        if (x2 > code.clientWidth) result = false;\n      }\n      if (scrolled && options.onScroll) options.onScroll(instance);\n      return result;\n    }\n\n    function visibleLines() {\n      var lh = textHeight(), top = scroller.scrollTop - paddingTop();\n      var fromHeight = Math.max(0, Math.floor(top / lh));\n      var toHeight = Math.ceil((top + scroller.clientHeight) / lh);\n      return {from: lineAtHeight(doc, fromHeight),\n              to: lineAtHeight(doc, toHeight)};\n    }\n    // Uses a set of changes plus the current scroll position to\n    // determine which DOM updates have to be made, and makes the\n    // updates.\n    function updateDisplay(changes, suppressCallback) {\n      if (!scroller.clientWidth) {\n        showingFrom = showingTo = displayOffset = 0;\n        return;\n      }\n      // Compute the new visible window\n      var visible = visibleLines();\n      // Bail out if the visible area is already rendered and nothing changed.\n      if (changes !== true && changes.length == 0 && visible.from > showingFrom && visible.to < showingTo) return;\n      var from = Math.max(visible.from - 100, 0), to = Math.min(doc.size, visible.to + 100);\n      if (showingFrom < from && from - showingFrom < 20) from = showingFrom;\n      if (showingTo > to && showingTo - to < 20) to = Math.min(doc.size, showingTo);\n\n      // Create a range of theoretically intact lines, and punch holes\n      // in that using the change info.\n      var intact = changes === true ? [] :\n        computeIntact([{from: showingFrom, to: showingTo, domStart: 0}], changes);\n      // Clip off the parts that won't be visible\n      var intactLines = 0;\n      for (var i = 0; i < intact.length; ++i) {\n        var range = intact[i];\n        if (range.from < from) {range.domStart += (from - range.from); range.from = from;}\n        if (range.to > to) range.to = to;\n        if (range.from >= range.to) intact.splice(i--, 1);\n        else intactLines += range.to - range.from;\n      }\n      if (intactLines == to - from && from == showingFrom && to == showingTo) return;\n      intact.sort(function(a, b) {return a.domStart - b.domStart;});\n\n      var th = textHeight(), gutterDisplay = gutter.style.display;\n      lineDiv.style.display = \"none\";\n      patchDisplay(from, to, intact);\n      lineDiv.style.display = gutter.style.display = \"\";\n\n      // Position the mover div to align with the lines it's supposed\n      // to be showing (which will cover the visible display)\n      var different = from != showingFrom || to != showingTo || lastSizeC != scroller.clientHeight + th;\n      // This is just a bogus formula that detects when the editor is\n      // resized or the font size changes.\n      if (different) lastSizeC = scroller.clientHeight + th;\n      showingFrom = from; showingTo = to;\n      displayOffset = heightAtLine(doc, from);\n      mover.style.top = (displayOffset * th) + \"px\";\n      if (scroller.clientHeight)\n        code.style.height = (doc.height * th + 2 * paddingTop()) + \"px\";\n\n      // Since this is all rather error prone, it is honoured with the\n      // only assertion in the whole file.\n      if (lineDiv.childNodes.length != showingTo - showingFrom)\n        throw new Error(\"BAD PATCH! \" + JSON.stringify(intact) + \" size=\" + (showingTo - showingFrom) +\n                        \" nodes=\" + lineDiv.childNodes.length);\n\n      function checkHeights() {\n        maxWidth = scroller.clientWidth;\n        var curNode = lineDiv.firstChild, heightChanged = false;\n        doc.iter(showingFrom, showingTo, function(line) {\n          if (!line.hidden) {\n            var height = Math.round(curNode.offsetHeight / th) || 1;\n            if (line.height != height) {\n              updateLineHeight(line, height);\n              gutterDirty = heightChanged = true;\n            }\n          }\n          curNode = curNode.nextSibling;\n        });\n        if (heightChanged)\n          code.style.height = (doc.height * th + 2 * paddingTop()) + \"px\";\n        return heightChanged;\n      }\n\n      if (options.lineWrapping) {\n        checkHeights();\n      } else {\n        if (maxWidth == null) maxWidth = stringWidth(maxLine);\n        if (maxWidth > scroller.clientWidth) {\n          lineSpace.style.width = maxWidth + \"px\";\n          // Needed to prevent odd wrapping/hiding of widgets placed in here.\n          code.style.width = \"\";\n          code.style.width = scroller.scrollWidth + \"px\";\n        } else {\n          lineSpace.style.width = code.style.width = \"\";\n        }\n      }\n\n      gutter.style.display = gutterDisplay;\n      if (different || gutterDirty) {\n        // If the gutter grew in size, re-check heights. If those changed, re-draw gutter.\n        updateGutter() && options.lineWrapping && checkHeights() && updateGutter();\n      }\n      updateSelection();\n      if (!suppressCallback && options.onUpdate) options.onUpdate(instance);\n      return true;\n    }\n\n    function computeIntact(intact, changes) {\n      for (var i = 0, l = changes.length || 0; i < l; ++i) {\n        var change = changes[i], intact2 = [], diff = change.diff || 0;\n        for (var j = 0, l2 = intact.length; j < l2; ++j) {\n          var range = intact[j];\n          if (change.to <= range.from && change.diff)\n            intact2.push({from: range.from + diff, to: range.to + diff,\n                          domStart: range.domStart});\n          else if (change.to <= range.from || change.from >= range.to)\n            intact2.push(range);\n          else {\n            if (change.from > range.from)\n              intact2.push({from: range.from, to: change.from, domStart: range.domStart});\n            if (change.to < range.to)\n              intact2.push({from: change.to + diff, to: range.to + diff,\n                            domStart: range.domStart + (change.to - range.from)});\n          }\n        }\n        intact = intact2;\n      }\n      return intact;\n    }\n\n    function patchDisplay(from, to, intact) {\n      // The first pass removes the DOM nodes that aren't intact.\n      if (!intact.length) lineDiv.innerHTML = \"\";\n      else {\n        function killNode(node) {\n          var tmp = node.nextSibling;\n          node.parentNode.removeChild(node);\n          return tmp;\n        }\n        var domPos = 0, curNode = lineDiv.firstChild, n;\n        for (var i = 0; i < intact.length; ++i) {\n          var cur = intact[i];\n          while (cur.domStart > domPos) {curNode = killNode(curNode); domPos++;}\n          for (var j = 0, e = cur.to - cur.from; j < e; ++j) {curNode = curNode.nextSibling; domPos++;}\n        }\n        while (curNode) curNode = killNode(curNode);\n      }\n      // This pass fills in the lines that actually changed.\n      var nextIntact = intact.shift(), curNode = lineDiv.firstChild, j = from;\n      var scratch = document.createElement(\"div\");\n      doc.iter(from, to, function(line) {\n        if (nextIntact && nextIntact.to == j) nextIntact = intact.shift();\n        if (!nextIntact || nextIntact.from > j) {\n          if (line.hidden) var html = scratch.innerHTML = \"<pre></pre>\";\n          else {\n            var html = '<pre' + (line.className ? ' class=\"' + line.className + '\"' : '') + '>'\n              + line.getHTML(makeTab) + '</pre>';\n            // Kludge to make sure the styled element lies behind the selection (by z-index)\n            if (line.bgClassName)\n              html = '<div style=\"position: relative\"><pre class=\"' + line.bgClassName +\n              '\" style=\"position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: -2\">&#160;</pre>' + html + \"</div>\";\n          }\n          scratch.innerHTML = html;\n          lineDiv.insertBefore(scratch.firstChild, curNode);\n        } else {\n          curNode = curNode.nextSibling;\n        }\n        ++j;\n      });\n    }\n\n    function updateGutter() {\n      if (!options.gutter && !options.lineNumbers) return;\n      var hText = mover.offsetHeight, hEditor = scroller.clientHeight;\n      gutter.style.height = (hText - hEditor < 2 ? hEditor : hText) + \"px\";\n      var html = [], i = showingFrom, normalNode;\n      doc.iter(showingFrom, Math.max(showingTo, showingFrom + 1), function(line) {\n        if (line.hidden) {\n          html.push(\"<pre></pre>\");\n        } else {\n          var marker = line.gutterMarker;\n          var text = options.lineNumbers ? i + options.firstLineNumber : null;\n          if (marker && marker.text)\n            text = marker.text.replace(\"%N%\", text != null ? text : \"\");\n          else if (text == null)\n            text = \"\\u00a0\";\n          html.push((marker && marker.style ? '<pre class=\"' + marker.style + '\">' : \"<pre>\"), text);\n          for (var j = 1; j < line.height; ++j) html.push(\"<br/>&#160;\");\n          html.push(\"</pre>\");\n          if (!marker) normalNode = i;\n        }\n        ++i;\n      });\n      gutter.style.display = \"none\";\n      gutterText.innerHTML = html.join(\"\");\n      // Make sure scrolling doesn't cause number gutter size to pop\n      if (normalNode != null) {\n        var node = gutterText.childNodes[normalNode - showingFrom];\n        var minwidth = String(doc.size).length, val = eltText(node), pad = \"\";\n        while (val.length + pad.length < minwidth) pad += \"\\u00a0\";\n        if (pad) node.insertBefore(document.createTextNode(pad), node.firstChild);\n      }\n      gutter.style.display = \"\";\n      var resized = Math.abs((parseInt(lineSpace.style.marginLeft) || 0) - gutter.offsetWidth) > 2;\n      lineSpace.style.marginLeft = gutter.offsetWidth + \"px\";\n      gutterDirty = false;\n      return resized;\n    }\n    function updateSelection() {\n      var collapsed = posEq(sel.from, sel.to);\n      var fromPos = localCoords(sel.from, true);\n      var toPos = collapsed ? fromPos : localCoords(sel.to, true);\n      var headPos = sel.inverted ? fromPos : toPos, th = textHeight();\n      var wrapOff = eltOffset(wrapper), lineOff = eltOffset(lineDiv);\n      inputDiv.style.top = Math.max(0, Math.min(scroller.offsetHeight, headPos.y + lineOff.top - wrapOff.top)) + \"px\";\n      inputDiv.style.left = Math.max(0, Math.min(scroller.offsetWidth, headPos.x + lineOff.left - wrapOff.left)) + \"px\";\n      if (collapsed) {\n        cursor.style.top = headPos.y + \"px\";\n        cursor.style.left = (options.lineWrapping ? Math.min(headPos.x, lineSpace.offsetWidth) : headPos.x) + \"px\";\n        cursor.style.display = \"\";\n        selectionDiv.style.display = \"none\";\n      } else {\n        var sameLine = fromPos.y == toPos.y, html = \"\";\n        var clientWidth = lineSpace.clientWidth || lineSpace.offsetWidth;\n        var clientHeight = lineSpace.clientHeight || lineSpace.offsetHeight;\n        function add(left, top, right, height) {\n          var rstyle = quirksMode ? \"width: \" + (!right ? clientWidth : clientWidth - right - left) + \"px\"\n                                  : \"right: \" + right + \"px\";\n          html += '<div class=\"CodeMirror-selected\" style=\"position: absolute; left: ' + left +\n            'px; top: ' + top + 'px; ' + rstyle + '; height: ' + height + 'px\"></div>';\n        }\n        if (sel.from.ch && fromPos.y >= 0) {\n          var right = sameLine ? clientWidth - toPos.x : 0;\n          add(fromPos.x, fromPos.y, right, th);\n        }\n        var middleStart = Math.max(0, fromPos.y + (sel.from.ch ? th : 0));\n        var middleHeight = Math.min(toPos.y, clientHeight) - middleStart;\n        if (middleHeight > 0.2 * th)\n          add(0, middleStart, 0, middleHeight);\n        if ((!sameLine || !sel.from.ch) && toPos.y < clientHeight - .5 * th)\n          add(0, toPos.y, clientWidth - toPos.x, th);\n        selectionDiv.innerHTML = html;\n        cursor.style.display = \"none\";\n        selectionDiv.style.display = \"\";\n      }\n    }\n\n    function setShift(val) {\n      if (val) shiftSelecting = shiftSelecting || (sel.inverted ? sel.to : sel.from);\n      else shiftSelecting = null;\n    }\n    function setSelectionUser(from, to) {\n      var sh = shiftSelecting && clipPos(shiftSelecting);\n      if (sh) {\n        if (posLess(sh, from)) from = sh;\n        else if (posLess(to, sh)) to = sh;\n      }\n      setSelection(from, to);\n      userSelChange = true;\n    }\n    // Update the selection. Last two args are only used by\n    // updateLines, since they have to be expressed in the line\n    // numbers before the update.\n    function setSelection(from, to, oldFrom, oldTo) {\n      goalColumn = null;\n      if (oldFrom == null) {oldFrom = sel.from.line; oldTo = sel.to.line;}\n      if (posEq(sel.from, from) && posEq(sel.to, to)) return;\n      if (posLess(to, from)) {var tmp = to; to = from; from = tmp;}\n\n      // Skip over hidden lines.\n      if (from.line != oldFrom) {\n        var from1 = skipHidden(from, oldFrom, sel.from.ch);\n        // If there is no non-hidden line left, force visibility on current line\n        if (!from1) setLineHidden(from.line, false);\n        else from = from1;\n      }\n      if (to.line != oldTo) to = skipHidden(to, oldTo, sel.to.ch);\n\n      if (posEq(from, to)) sel.inverted = false;\n      else if (posEq(from, sel.to)) sel.inverted = false;\n      else if (posEq(to, sel.from)) sel.inverted = true;\n\n      if (options.autoClearEmptyLines && posEq(sel.from, sel.to)) {\n        var head = sel.inverted ? from : to;\n        if (head.line != sel.from.line && sel.from.line < doc.size) {\n          var oldLine = getLine(sel.from.line);\n          if (/^\\s+$/.test(oldLine.text))\n            setTimeout(operation(function() {\n              if (oldLine.parent && /^\\s+$/.test(oldLine.text)) {\n                var no = lineNo(oldLine);\n                replaceRange(\"\", {line: no, ch: 0}, {line: no, ch: oldLine.text.length});\n              }\n            }, 10));\n        }\n      }\n\n      sel.from = from; sel.to = to;\n      selectionChanged = true;\n    }\n    function skipHidden(pos, oldLine, oldCh) {\n      function getNonHidden(dir) {\n        var lNo = pos.line + dir, end = dir == 1 ? doc.size : -1;\n        while (lNo != end) {\n          var line = getLine(lNo);\n          if (!line.hidden) {\n            var ch = pos.ch;\n            if (toEnd || ch > oldCh || ch > line.text.length) ch = line.text.length;\n            return {line: lNo, ch: ch};\n          }\n          lNo += dir;\n        }\n      }\n      var line = getLine(pos.line);\n      var toEnd = pos.ch == line.text.length && pos.ch != oldCh;\n      if (!line.hidden) return pos;\n      if (pos.line >= oldLine) return getNonHidden(1) || getNonHidden(-1);\n      else return getNonHidden(-1) || getNonHidden(1);\n    }\n    function setCursor(line, ch, user) {\n      var pos = clipPos({line: line, ch: ch || 0});\n      (user ? setSelectionUser : setSelection)(pos, pos);\n    }\n\n    function clipLine(n) {return Math.max(0, Math.min(n, doc.size-1));}\n    function clipPos(pos) {\n      if (pos.line < 0) return {line: 0, ch: 0};\n      if (pos.line >= doc.size) return {line: doc.size-1, ch: getLine(doc.size-1).text.length};\n      var ch = pos.ch, linelen = getLine(pos.line).text.length;\n      if (ch == null || ch > linelen) return {line: pos.line, ch: linelen};\n      else if (ch < 0) return {line: pos.line, ch: 0};\n      else return pos;\n    }\n\n    function findPosH(dir, unit) {\n      var end = sel.inverted ? sel.from : sel.to, line = end.line, ch = end.ch;\n      var lineObj = getLine(line);\n      function findNextLine() {\n        for (var l = line + dir, e = dir < 0 ? -1 : doc.size; l != e; l += dir) {\n          var lo = getLine(l);\n          if (!lo.hidden) { line = l; lineObj = lo; return true; }\n        }\n      }\n      function moveOnce(boundToLine) {\n        if (ch == (dir < 0 ? 0 : lineObj.text.length)) {\n          if (!boundToLine && findNextLine()) ch = dir < 0 ? lineObj.text.length : 0;\n          else return false;\n        } else ch += dir;\n        return true;\n      }\n      if (unit == \"char\") moveOnce();\n      else if (unit == \"column\") moveOnce(true);\n      else if (unit == \"word\") {\n        var sawWord = false;\n        for (;;) {\n          if (dir < 0) if (!moveOnce()) break;\n          if (isWordChar(lineObj.text.charAt(ch))) sawWord = true;\n          else if (sawWord) {if (dir < 0) {dir = 1; moveOnce();} break;}\n          if (dir > 0) if (!moveOnce()) break;\n        }\n      }\n      return {line: line, ch: ch};\n    }\n    function moveH(dir, unit) {\n      var pos = dir < 0 ? sel.from : sel.to;\n      if (shiftSelecting || posEq(sel.from, sel.to)) pos = findPosH(dir, unit);\n      setCursor(pos.line, pos.ch, true);\n    }\n    function deleteH(dir, unit) {\n      if (!posEq(sel.from, sel.to)) replaceRange(\"\", sel.from, sel.to);\n      else if (dir < 0) replaceRange(\"\", findPosH(dir, unit), sel.to);\n      else replaceRange(\"\", sel.from, findPosH(dir, unit));\n      userSelChange = true;\n    }\n    var goalColumn = null;\n    function moveV(dir, unit) {\n      var dist = 0, pos = localCoords(sel.inverted ? sel.from : sel.to, true);\n      if (goalColumn != null) pos.x = goalColumn;\n      if (unit == \"page\") dist = Math.min(scroller.clientHeight, window.innerHeight || document.documentElement.clientHeight);\n      else if (unit == \"line\") dist = textHeight();\n      var target = coordsChar(pos.x, pos.y + dist * dir + 2);\n      if (unit == \"page\") scroller.scrollTop += localCoords(target, true).y - pos.y;\n      setCursor(target.line, target.ch, true);\n      goalColumn = pos.x;\n    }\n\n    function selectWordAt(pos) {\n      var line = getLine(pos.line).text;\n      var start = pos.ch, end = pos.ch;\n      while (start > 0 && isWordChar(line.charAt(start - 1))) --start;\n      while (end < line.length && isWordChar(line.charAt(end))) ++end;\n      setSelectionUser({line: pos.line, ch: start}, {line: pos.line, ch: end});\n    }\n    function selectLine(line) {\n      setSelectionUser({line: line, ch: 0}, clipPos({line: line + 1, ch: 0}));\n    }\n    function indentSelected(mode) {\n      if (posEq(sel.from, sel.to)) return indentLine(sel.from.line, mode);\n      var e = sel.to.line - (sel.to.ch ? 0 : 1);\n      for (var i = sel.from.line; i <= e; ++i) indentLine(i, mode);\n    }\n\n    function indentLine(n, how) {\n      if (!how) how = \"add\";\n      if (how == \"smart\") {\n        if (!mode.indent) how = \"prev\";\n        else var state = getStateBefore(n);\n      }\n\n      var line = getLine(n), curSpace = line.indentation(options.tabSize),\n          curSpaceString = line.text.match(/^\\s*/)[0], indentation;\n      if (how == \"prev\") {\n        if (n) indentation = getLine(n-1).indentation(options.tabSize);\n        else indentation = 0;\n      }\n      else if (how == \"smart\") indentation = mode.indent(state, line.text.slice(curSpaceString.length), line.text);\n      else if (how == \"add\") indentation = curSpace + options.indentUnit;\n      else if (how == \"subtract\") indentation = curSpace - options.indentUnit;\n      indentation = Math.max(0, indentation);\n      var diff = indentation - curSpace;\n\n      if (!diff) {\n        if (sel.from.line != n && sel.to.line != n) return;\n        var indentString = curSpaceString;\n      }\n      else {\n        var indentString = \"\", pos = 0;\n        if (options.indentWithTabs)\n          for (var i = Math.floor(indentation / options.tabSize); i; --i) {pos += options.tabSize; indentString += \"\\t\";}\n        while (pos < indentation) {++pos; indentString += \" \";}\n      }\n\n      replaceRange(indentString, {line: n, ch: 0}, {line: n, ch: curSpaceString.length});\n    }\n\n    function loadMode() {\n      mode = CodeMirror.getMode(options, options.mode);\n      doc.iter(0, doc.size, function(line) { line.stateAfter = null; });\n      work = [0];\n      startWorker();\n    }\n    function gutterChanged() {\n      var visible = options.gutter || options.lineNumbers;\n      gutter.style.display = visible ? \"\" : \"none\";\n      if (visible) gutterDirty = true;\n      else lineDiv.parentNode.style.marginLeft = 0;\n    }\n    function wrappingChanged(from, to) {\n      if (options.lineWrapping) {\n        wrapper.className += \" CodeMirror-wrap\";\n        var perLine = scroller.clientWidth / charWidth() - 3;\n        doc.iter(0, doc.size, function(line) {\n          if (line.hidden) return;\n          var guess = Math.ceil(line.text.length / perLine) || 1;\n          if (guess != 1) updateLineHeight(line, guess);\n        });\n        lineSpace.style.width = code.style.width = \"\";\n      } else {\n        wrapper.className = wrapper.className.replace(\" CodeMirror-wrap\", \"\");\n        maxWidth = null; maxLine = \"\";\n        doc.iter(0, doc.size, function(line) {\n          if (line.height != 1 && !line.hidden) updateLineHeight(line, 1);\n          if (line.text.length > maxLine.length) maxLine = line.text;\n        });\n      }\n      changes.push({from: 0, to: doc.size});\n    }\n    function makeTab(col) {\n      var w = options.tabSize - col % options.tabSize, cached = tabCache[w];\n      if (cached) return cached;\n      for (var str = '<span class=\"cm-tab\">', i = 0; i < w; ++i) str += \" \";\n      return (tabCache[w] = {html: str + \"</span>\", width: w});\n    }\n    function themeChanged() {\n      scroller.className = scroller.className.replace(/\\s*cm-s-\\S+/g, \"\") +\n        options.theme.replace(/(^|\\s)\\s*/g, \" cm-s-\");\n    }\n    function keyMapChanged() {\n      var style = keyMap[options.keyMap].style;\n      wrapper.className = wrapper.className.replace(/\\s*cm-keymap-\\S+/g, \"\") +\n        (style ? \" cm-keymap-\" + style : \"\");\n    }\n\n    function TextMarker() { this.set = []; }\n    TextMarker.prototype.clear = operation(function() {\n      var min = Infinity, max = -Infinity;\n      for (var i = 0, e = this.set.length; i < e; ++i) {\n        var line = this.set[i], mk = line.marked;\n        if (!mk || !line.parent) continue;\n        var lineN = lineNo(line);\n        min = Math.min(min, lineN); max = Math.max(max, lineN);\n        for (var j = 0; j < mk.length; ++j)\n          if (mk[j].marker == this) mk.splice(j--, 1);\n      }\n      if (min != Infinity)\n        changes.push({from: min, to: max + 1});\n    });\n    TextMarker.prototype.find = function() {\n      var from, to;\n      for (var i = 0, e = this.set.length; i < e; ++i) {\n        var line = this.set[i], mk = line.marked;\n        for (var j = 0; j < mk.length; ++j) {\n          var mark = mk[j];\n          if (mark.marker == this) {\n            if (mark.from != null || mark.to != null) {\n              var found = lineNo(line);\n              if (found != null) {\n                if (mark.from != null) from = {line: found, ch: mark.from};\n                if (mark.to != null) to = {line: found, ch: mark.to};\n              }\n            }\n          }\n        }\n      }\n      return {from: from, to: to};\n    };\n\n    function markText(from, to, className) {\n      from = clipPos(from); to = clipPos(to);\n      var tm = new TextMarker();\n      if (!posLess(from, to)) return tm;\n      function add(line, from, to, className) {\n        getLine(line).addMark(new MarkedText(from, to, className, tm));\n      }\n      if (from.line == to.line) add(from.line, from.ch, to.ch, className);\n      else {\n        add(from.line, from.ch, null, className);\n        for (var i = from.line + 1, e = to.line; i < e; ++i)\n          add(i, null, null, className);\n        add(to.line, null, to.ch, className);\n      }\n      changes.push({from: from.line, to: to.line + 1});\n      return tm;\n    }\n\n    function setBookmark(pos) {\n      pos = clipPos(pos);\n      var bm = new Bookmark(pos.ch);\n      getLine(pos.line).addMark(bm);\n      return bm;\n    }\n\n    function findMarksAt(pos) {\n      pos = clipPos(pos);\n      var markers = [], marked = getLine(pos.line).marked;\n      if (!marked) return markers;\n      for (var i = 0, e = marked.length; i < e; ++i) {\n        var m = marked[i];\n        if ((m.from == null || m.from <= pos.ch) &&\n            (m.to == null || m.to >= pos.ch))\n          markers.push(m.marker || m);\n      }\n      return markers;\n    }\n\n    function addGutterMarker(line, text, className) {\n      if (typeof line == \"number\") line = getLine(clipLine(line));\n      line.gutterMarker = {text: text, style: className};\n      gutterDirty = true;\n      return line;\n    }\n    function removeGutterMarker(line) {\n      if (typeof line == \"number\") line = getLine(clipLine(line));\n      line.gutterMarker = null;\n      gutterDirty = true;\n    }\n\n    function changeLine(handle, op) {\n      var no = handle, line = handle;\n      if (typeof handle == \"number\") line = getLine(clipLine(handle));\n      else no = lineNo(handle);\n      if (no == null) return null;\n      if (op(line, no)) changes.push({from: no, to: no + 1});\n      else return null;\n      return line;\n    }\n    function setLineClass(handle, className, bgClassName) {\n      return changeLine(handle, function(line) {\n        if (line.className != className || line.bgClassName != bgClassName) {\n          line.className = className;\n          line.bgClassName = bgClassName;\n          return true;\n        }\n      });\n    }\n    function setLineHidden(handle, hidden) {\n      return changeLine(handle, function(line, no) {\n        if (line.hidden != hidden) {\n          line.hidden = hidden;\n          if (!options.lineWrapping) {\n            var l = line.text;\n            if (hidden && l.length == maxLine.length) {\n              maxLengthChanged = true;\n            }\n            else if (!hidden && l.length > maxLine.length) {\n              maxLine = l; maxWidth = null;\n              maxLengthChanged = false;\n            }\n          }\n          updateLineHeight(line, hidden ? 0 : 1);\n          var fline = sel.from.line, tline = sel.to.line;\n          if (hidden && (fline == no || tline == no)) {\n            var from = fline == no ? skipHidden({line: fline, ch: 0}, fline, 0) : sel.from;\n            var to = tline == no ? skipHidden({line: tline, ch: 0}, tline, 0) : sel.to;\n            // Can't hide the last visible line, we'd have no place to put the cursor\n            if (!to) return;\n            setSelection(from, to);\n          }\n          return (gutterDirty = true);\n        }\n      });\n    }\n\n    function lineInfo(line) {\n      if (typeof line == \"number\") {\n        if (!isLine(line)) return null;\n        var n = line;\n        line = getLine(line);\n        if (!line) return null;\n      }\n      else {\n        var n = lineNo(line);\n        if (n == null) return null;\n      }\n      var marker = line.gutterMarker;\n      return {line: n, handle: line, text: line.text, markerText: marker && marker.text,\n              markerClass: marker && marker.style, lineClass: line.className, bgClass: line.bgClassName};\n    }\n\n    function stringWidth(str) {\n      measure.innerHTML = \"<pre><span>x</span></pre>\";\n      measure.firstChild.firstChild.firstChild.nodeValue = str;\n      return measure.firstChild.firstChild.offsetWidth || 10;\n    }\n    // These are used to go from pixel positions to character\n    // positions, taking varying character widths into account.\n    function charFromX(line, x) {\n      if (x <= 0) return 0;\n      var lineObj = getLine(line), text = lineObj.text;\n      function getX(len) {\n        return measureLine(lineObj, len).left;\n      }\n      var from = 0, fromX = 0, to = text.length, toX;\n      // Guess a suitable upper bound for our search.\n      var estimated = Math.min(to, Math.ceil(x / charWidth()));\n      for (;;) {\n        var estX = getX(estimated);\n        if (estX <= x && estimated < to) estimated = Math.min(to, Math.ceil(estimated * 1.2));\n        else {toX = estX; to = estimated; break;}\n      }\n      if (x > toX) return to;\n      // Try to guess a suitable lower bound as well.\n      estimated = Math.floor(to * 0.8); estX = getX(estimated);\n      if (estX < x) {from = estimated; fromX = estX;}\n      // Do a binary search between these bounds.\n      for (;;) {\n        if (to - from <= 1) return (toX - x > x - fromX) ? from : to;\n        var middle = Math.ceil((from + to) / 2), middleX = getX(middle);\n        if (middleX > x) {to = middle; toX = middleX;}\n        else {from = middle; fromX = middleX;}\n      }\n    }\n\n    var tempId = \"CodeMirror-temp-\" + Math.floor(Math.random() * 0xffffff).toString(16);\n    function measureLine(line, ch) {\n      if (ch == 0) return {top: 0, left: 0};\n      var wbr = options.lineWrapping && ch < line.text.length &&\n                spanAffectsWrapping.test(line.text.slice(ch - 1, ch + 1));\n      measure.innerHTML = \"<pre>\" + line.getHTML(makeTab, ch, tempId, wbr) + \"</pre>\";\n      var elt = document.getElementById(tempId);\n      var top = elt.offsetTop, left = elt.offsetLeft;\n      // Older IEs report zero offsets for spans directly after a wrap\n      if (ie && top == 0 && left == 0) {\n        var backup = document.createElement(\"span\");\n        backup.innerHTML = \"x\";\n        elt.parentNode.insertBefore(backup, elt.nextSibling);\n        top = backup.offsetTop;\n      }\n      return {top: top, left: left};\n    }\n    function localCoords(pos, inLineWrap) {\n      var x, lh = textHeight(), y = lh * (heightAtLine(doc, pos.line) - (inLineWrap ? displayOffset : 0));\n      if (pos.ch == 0) x = 0;\n      else {\n        var sp = measureLine(getLine(pos.line), pos.ch);\n        x = sp.left;\n        if (options.lineWrapping) y += Math.max(0, sp.top);\n      }\n      return {x: x, y: y, yBot: y + lh};\n    }\n    // Coords must be lineSpace-local\n    function coordsChar(x, y) {\n      if (y < 0) y = 0;\n      var th = textHeight(), cw = charWidth(), heightPos = displayOffset + Math.floor(y / th);\n      var lineNo = lineAtHeight(doc, heightPos);\n      if (lineNo >= doc.size) return {line: doc.size - 1, ch: getLine(doc.size - 1).text.length};\n      var lineObj = getLine(lineNo), text = lineObj.text;\n      var tw = options.lineWrapping, innerOff = tw ? heightPos - heightAtLine(doc, lineNo) : 0;\n      if (x <= 0 && innerOff == 0) return {line: lineNo, ch: 0};\n      function getX(len) {\n        var sp = measureLine(lineObj, len);\n        if (tw) {\n          var off = Math.round(sp.top / th);\n          return Math.max(0, sp.left + (off - innerOff) * scroller.clientWidth);\n        }\n        return sp.left;\n      }\n      var from = 0, fromX = 0, to = text.length, toX;\n      // Guess a suitable upper bound for our search.\n      var estimated = Math.min(to, Math.ceil((x + innerOff * scroller.clientWidth * .9) / cw));\n      for (;;) {\n        var estX = getX(estimated);\n        if (estX <= x && estimated < to) estimated = Math.min(to, Math.ceil(estimated * 1.2));\n        else {toX = estX; to = estimated; break;}\n      }\n      if (x > toX) return {line: lineNo, ch: to};\n      // Try to guess a suitable lower bound as well.\n      estimated = Math.floor(to * 0.8); estX = getX(estimated);\n      if (estX < x) {from = estimated; fromX = estX;}\n      // Do a binary search between these bounds.\n      for (;;) {\n        if (to - from <= 1) return {line: lineNo, ch: (toX - x > x - fromX) ? from : to};\n        var middle = Math.ceil((from + to) / 2), middleX = getX(middle);\n        if (middleX > x) {to = middle; toX = middleX;}\n        else {from = middle; fromX = middleX;}\n      }\n    }\n    function pageCoords(pos) {\n      var local = localCoords(pos, true), off = eltOffset(lineSpace);\n      return {x: off.left + local.x, y: off.top + local.y, yBot: off.top + local.yBot};\n    }\n\n    var cachedHeight, cachedHeightFor, measureText;\n    function textHeight() {\n      if (measureText == null) {\n        measureText = \"<pre>\";\n        for (var i = 0; i < 49; ++i) measureText += \"x<br/>\";\n        measureText += \"x</pre>\";\n      }\n      var offsetHeight = lineDiv.clientHeight;\n      if (offsetHeight == cachedHeightFor) return cachedHeight;\n      cachedHeightFor = offsetHeight;\n      measure.innerHTML = measureText;\n      cachedHeight = measure.firstChild.offsetHeight / 50 || 1;\n      measure.innerHTML = \"\";\n      return cachedHeight;\n    }\n    var cachedWidth, cachedWidthFor = 0;\n    function charWidth() {\n      if (scroller.clientWidth == cachedWidthFor) return cachedWidth;\n      cachedWidthFor = scroller.clientWidth;\n      return (cachedWidth = stringWidth(\"x\"));\n    }\n    function paddingTop() {return lineSpace.offsetTop;}\n    function paddingLeft() {return lineSpace.offsetLeft;}\n\n    function posFromMouse(e, liberal) {\n      var offW = eltOffset(scroller, true), x, y;\n      // Fails unpredictably on IE[67] when mouse is dragged around quickly.\n      try { x = e.clientX; y = e.clientY; } catch (e) { return null; }\n      // This is a mess of a heuristic to try and determine whether a\n      // scroll-bar was clicked or not, and to return null if one was\n      // (and !liberal).\n      if (!liberal && (x - offW.left > scroller.clientWidth || y - offW.top > scroller.clientHeight))\n        return null;\n      var offL = eltOffset(lineSpace, true);\n      return coordsChar(x - offL.left, y - offL.top);\n    }\n    function onContextMenu(e) {\n      var pos = posFromMouse(e), scrollPos = scroller.scrollTop;\n      if (!pos || window.opera) return; // Opera is difficult.\n      if (posEq(sel.from, sel.to) || posLess(pos, sel.from) || !posLess(pos, sel.to))\n        operation(setCursor)(pos.line, pos.ch);\n\n      var oldCSS = input.style.cssText;\n      inputDiv.style.position = \"absolute\";\n      input.style.cssText = \"position: fixed; width: 30px; height: 30px; top: \" + (e.clientY - 5) +\n        \"px; left: \" + (e.clientX - 5) + \"px; z-index: 1000; background: white; \" +\n        \"border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);\";\n      leaveInputAlone = true;\n      var val = input.value = getSelection();\n      focusInput();\n      selectInput(input);\n      function rehide() {\n        var newVal = splitLines(input.value).join(\"\\n\");\n        if (newVal != val) operation(replaceSelection)(newVal, \"end\");\n        inputDiv.style.position = \"relative\";\n        input.style.cssText = oldCSS;\n        if (ie_lt9) scroller.scrollTop = scrollPos;\n        leaveInputAlone = false;\n        resetInput(true);\n        slowPoll();\n      }\n\n      if (gecko) {\n        e_stop(e);\n        var mouseup = connect(window, \"mouseup\", function() {\n          mouseup();\n          setTimeout(rehide, 20);\n        }, true);\n      } else {\n        setTimeout(rehide, 50);\n      }\n    }\n\n    // Cursor-blinking\n    function restartBlink() {\n      clearInterval(blinker);\n      var on = true;\n      cursor.style.visibility = \"\";\n      blinker = setInterval(function() {\n        cursor.style.visibility = (on = !on) ? \"\" : \"hidden\";\n      }, 650);\n    }\n\n    var matching = {\"(\": \")>\", \")\": \"(<\", \"[\": \"]>\", \"]\": \"[<\", \"{\": \"}>\", \"}\": \"{<\"};\n    function matchBrackets(autoclear) {\n      var head = sel.inverted ? sel.from : sel.to, line = getLine(head.line), pos = head.ch - 1;\n      var match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)];\n      if (!match) return;\n      var ch = match.charAt(0), forward = match.charAt(1) == \">\", d = forward ? 1 : -1, st = line.styles;\n      for (var off = pos + 1, i = 0, e = st.length; i < e; i+=2)\n        if ((off -= st[i].length) <= 0) {var style = st[i+1]; break;}\n\n      var stack = [line.text.charAt(pos)], re = /[(){}[\\]]/;\n      function scan(line, from, to) {\n        if (!line.text) return;\n        var st = line.styles, pos = forward ? 0 : line.text.length - 1, cur;\n        for (var i = forward ? 0 : st.length - 2, e = forward ? st.length : -2; i != e; i += 2*d) {\n          var text = st[i];\n          if (st[i+1] != null && st[i+1] != style) {pos += d * text.length; continue;}\n          for (var j = forward ? 0 : text.length - 1, te = forward ? text.length : -1; j != te; j += d, pos+=d) {\n            if (pos >= from && pos < to && re.test(cur = text.charAt(j))) {\n              var match = matching[cur];\n              if (match.charAt(1) == \">\" == forward) stack.push(cur);\n              else if (stack.pop() != match.charAt(0)) return {pos: pos, match: false};\n              else if (!stack.length) return {pos: pos, match: true};\n            }\n          }\n        }\n      }\n      for (var i = head.line, e = forward ? Math.min(i + 100, doc.size) : Math.max(-1, i - 100); i != e; i+=d) {\n        var line = getLine(i), first = i == head.line;\n        var found = scan(line, first && forward ? pos + 1 : 0, first && !forward ? pos : line.text.length);\n        if (found) break;\n      }\n      if (!found) found = {pos: null, match: false};\n      var style = found.match ? \"CodeMirror-matchingbracket\" : \"CodeMirror-nonmatchingbracket\";\n      var one = markText({line: head.line, ch: pos}, {line: head.line, ch: pos+1}, style),\n          two = found.pos != null && markText({line: i, ch: found.pos}, {line: i, ch: found.pos + 1}, style);\n      var clear = operation(function(){one.clear(); two && two.clear();});\n      if (autoclear) setTimeout(clear, 800);\n      else bracketHighlighted = clear;\n    }\n\n    // Finds the line to start with when starting a parse. Tries to\n    // find a line with a stateAfter, so that it can start with a\n    // valid state. If that fails, it returns the line with the\n    // smallest indentation, which tends to need the least context to\n    // parse correctly.\n    function findStartLine(n) {\n      var minindent, minline;\n      for (var search = n, lim = n - 40; search > lim; --search) {\n        if (search == 0) return 0;\n        var line = getLine(search-1);\n        if (line.stateAfter) return search;\n        var indented = line.indentation(options.tabSize);\n        if (minline == null || minindent > indented) {\n          minline = search - 1;\n          minindent = indented;\n        }\n      }\n      return minline;\n    }\n    function getStateBefore(n) {\n      var start = findStartLine(n), state = start && getLine(start-1).stateAfter;\n      if (!state) state = startState(mode);\n      else state = copyState(mode, state);\n      doc.iter(start, n, function(line) {\n        line.highlight(mode, state, options.tabSize);\n        line.stateAfter = copyState(mode, state);\n      });\n      if (start < n) changes.push({from: start, to: n});\n      if (n < doc.size && !getLine(n).stateAfter) work.push(n);\n      return state;\n    }\n    function highlightLines(start, end) {\n      var state = getStateBefore(start);\n      doc.iter(start, end, function(line) {\n        line.highlight(mode, state, options.tabSize);\n        line.stateAfter = copyState(mode, state);\n      });\n    }\n    function highlightWorker() {\n      var end = +new Date + options.workTime;\n      var foundWork = work.length;\n      while (work.length) {\n        if (!getLine(showingFrom).stateAfter) var task = showingFrom;\n        else var task = work.pop();\n        if (task >= doc.size) continue;\n        var start = findStartLine(task), state = start && getLine(start-1).stateAfter;\n        if (state) state = copyState(mode, state);\n        else state = startState(mode);\n\n        var unchanged = 0, compare = mode.compareStates, realChange = false,\n            i = start, bail = false;\n        doc.iter(i, doc.size, function(line) {\n          var hadState = line.stateAfter;\n          if (+new Date > end) {\n            work.push(i);\n            startWorker(options.workDelay);\n            if (realChange) changes.push({from: task, to: i + 1});\n            return (bail = true);\n          }\n          var changed = line.highlight(mode, state, options.tabSize);\n          if (changed) realChange = true;\n          line.stateAfter = copyState(mode, state);\n          var done = null;\n          if (compare) {\n            var same = hadState && compare(hadState, state);\n            if (same != Pass) done = !!same;\n          }\n          if (done == null) {\n            if (changed !== false || !hadState) unchanged = 0;\n            else if (++unchanged > 3 && (!mode.indent || mode.indent(hadState, \"\") == mode.indent(state, \"\")))\n              done = true;\n          }\n          if (done) return true;\n          ++i;\n        });\n        if (bail) return;\n        if (realChange) changes.push({from: task, to: i + 1});\n      }\n      if (foundWork && options.onHighlightComplete)\n        options.onHighlightComplete(instance);\n    }\n    function startWorker(time) {\n      if (!work.length) return;\n      highlight.set(time, operation(highlightWorker));\n    }\n\n    // Operations are used to wrap changes in such a way that each\n    // change won't have to update the cursor and display (which would\n    // be awkward, slow, and error-prone), but instead updates are\n    // batched and then all combined and executed at once.\n    function startOperation() {\n      updateInput = userSelChange = textChanged = null;\n      changes = []; selectionChanged = false; callbacks = [];\n    }\n    function endOperation() {\n      var reScroll = false, updated;\n      if (maxLengthChanged) computeMaxLength();\n      if (selectionChanged) reScroll = !scrollCursorIntoView();\n      if (changes.length) updated = updateDisplay(changes, true);\n      else {\n        if (selectionChanged) updateSelection();\n        if (gutterDirty) updateGutter();\n      }\n      if (reScroll) scrollCursorIntoView();\n      if (selectionChanged) {scrollEditorIntoView(); restartBlink();}\n\n      if (focused && !leaveInputAlone &&\n          (updateInput === true || (updateInput !== false && selectionChanged)))\n        resetInput(userSelChange);\n\n      if (selectionChanged && options.matchBrackets)\n        setTimeout(operation(function() {\n          if (bracketHighlighted) {bracketHighlighted(); bracketHighlighted = null;}\n          if (posEq(sel.from, sel.to)) matchBrackets(false);\n        }), 20);\n      var tc = textChanged, cbs = callbacks; // these can be reset by callbacks\n      if (selectionChanged && options.onCursorActivity)\n        options.onCursorActivity(instance);\n      if (tc && options.onChange && instance)\n        options.onChange(instance, tc);\n      for (var i = 0; i < cbs.length; ++i) cbs[i](instance);\n      if (updated && options.onUpdate) options.onUpdate(instance);\n    }\n    var nestedOperation = 0;\n    function operation(f) {\n      return function() {\n        if (!nestedOperation++) startOperation();\n        try {var result = f.apply(this, arguments);}\n        finally {if (!--nestedOperation) endOperation();}\n        return result;\n      };\n    }\n\n    function compoundChange(f) {\n      history.startCompound();\n      try { return f(); } finally { history.endCompound(); }\n    }\n\n    for (var ext in extensions)\n      if (extensions.propertyIsEnumerable(ext) &&\n          !instance.propertyIsEnumerable(ext))\n        instance[ext] = extensions[ext];\n    return instance;\n  } // (end of function CodeMirror)\n\n  // The default configuration options.\n  CodeMirror.defaults = {\n    value: \"\",\n    mode: null,\n    theme: \"default\",\n    indentUnit: 2,\n    indentWithTabs: false,\n    smartIndent: true,\n    tabSize: 4,\n    keyMap: \"default\",\n    extraKeys: null,\n    electricChars: true,\n    autoClearEmptyLines: false,\n    onKeyEvent: null,\n    onDragEvent: null,\n    lineWrapping: false,\n    lineNumbers: false,\n    gutter: false,\n    fixedGutter: false,\n    firstLineNumber: 1,\n    readOnly: false,\n    dragDrop: true,\n    onChange: null,\n    onCursorActivity: null,\n    onGutterClick: null,\n    onHighlightComplete: null,\n    onUpdate: null,\n    onFocus: null, onBlur: null, onScroll: null,\n    matchBrackets: false,\n    workTime: 100,\n    workDelay: 200,\n    pollInterval: 100,\n    undoDepth: 40,\n    tabindex: null,\n    autofocus: null\n  };\n\n  var ios = /AppleWebKit/.test(navigator.userAgent) && /Mobile\\/\\w+/.test(navigator.userAgent);\n  var mac = ios || /Mac/.test(navigator.platform);\n  var win = /Win/.test(navigator.platform);\n\n  // Known modes, by name and by MIME\n  var modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {};\n  CodeMirror.defineMode = function(name, mode) {\n    if (!CodeMirror.defaults.mode && name != \"null\") CodeMirror.defaults.mode = name;\n    if (arguments.length > 2) {\n      mode.dependencies = [];\n      for (var i = 2; i < arguments.length; ++i) mode.dependencies.push(arguments[i]);\n    }\n    modes[name] = mode;\n  };\n  CodeMirror.defineMIME = function(mime, spec) {\n    mimeModes[mime] = spec;\n  };\n  CodeMirror.resolveMode = function(spec) {\n    if (typeof spec == \"string\" && mimeModes.hasOwnProperty(spec))\n      spec = mimeModes[spec];\n    else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+xml$/.test(spec))\n      return CodeMirror.resolveMode(\"application/xml\");\n    if (typeof spec == \"string\") return {name: spec};\n    else return spec || {name: \"null\"};\n  };\n  CodeMirror.getMode = function(options, spec) {\n    var spec = CodeMirror.resolveMode(spec);\n    var mfactory = modes[spec.name];\n    if (!mfactory) return CodeMirror.getMode(options, \"text/plain\");\n    return mfactory(options, spec);\n  };\n  CodeMirror.listModes = function() {\n    var list = [];\n    for (var m in modes)\n      if (modes.propertyIsEnumerable(m)) list.push(m);\n    return list;\n  };\n  CodeMirror.listMIMEs = function() {\n    var list = [];\n    for (var m in mimeModes)\n      if (mimeModes.propertyIsEnumerable(m)) list.push({mime: m, mode: mimeModes[m]});\n    return list;\n  };\n\n  var extensions = CodeMirror.extensions = {};\n  CodeMirror.defineExtension = function(name, func) {\n    extensions[name] = func;\n  };\n\n  var commands = CodeMirror.commands = {\n    selectAll: function(cm) {cm.setSelection({line: 0, ch: 0}, {line: cm.lineCount() - 1});},\n    killLine: function(cm) {\n      var from = cm.getCursor(true), to = cm.getCursor(false), sel = !posEq(from, to);\n      if (!sel && cm.getLine(from.line).length == from.ch) cm.replaceRange(\"\", from, {line: from.line + 1, ch: 0});\n      else cm.replaceRange(\"\", from, sel ? to : {line: from.line});\n    },\n    deleteLine: function(cm) {var l = cm.getCursor().line; cm.replaceRange(\"\", {line: l, ch: 0}, {line: l});},\n    undo: function(cm) {cm.undo();},\n    redo: function(cm) {cm.redo();},\n    goDocStart: function(cm) {cm.setCursor(0, 0, true);},\n    goDocEnd: function(cm) {cm.setSelection({line: cm.lineCount() - 1}, null, true);},\n    goLineStart: function(cm) {cm.setCursor(cm.getCursor().line, 0, true);},\n    goLineStartSmart: function(cm) {\n      var cur = cm.getCursor();\n      var text = cm.getLine(cur.line), firstNonWS = Math.max(0, text.search(/\\S/));\n      cm.setCursor(cur.line, cur.ch <= firstNonWS && cur.ch ? 0 : firstNonWS, true);\n    },\n    goLineEnd: function(cm) {cm.setSelection({line: cm.getCursor().line}, null, true);},\n    goLineUp: function(cm) {cm.moveV(-1, \"line\");},\n    goLineDown: function(cm) {cm.moveV(1, \"line\");},\n    goPageUp: function(cm) {cm.moveV(-1, \"page\");},\n    goPageDown: function(cm) {cm.moveV(1, \"page\");},\n    goCharLeft: function(cm) {cm.moveH(-1, \"char\");},\n    goCharRight: function(cm) {cm.moveH(1, \"char\");},\n    goColumnLeft: function(cm) {cm.moveH(-1, \"column\");},\n    goColumnRight: function(cm) {cm.moveH(1, \"column\");},\n    goWordLeft: function(cm) {cm.moveH(-1, \"word\");},\n    goWordRight: function(cm) {cm.moveH(1, \"word\");},\n    delCharLeft: function(cm) {cm.deleteH(-1, \"char\");},\n    delCharRight: function(cm) {cm.deleteH(1, \"char\");},\n    delWordLeft: function(cm) {cm.deleteH(-1, \"word\");},\n    delWordRight: function(cm) {cm.deleteH(1, \"word\");},\n    indentAuto: function(cm) {cm.indentSelection(\"smart\");},\n    indentMore: function(cm) {cm.indentSelection(\"add\");},\n    indentLess: function(cm) {cm.indentSelection(\"subtract\");},\n    insertTab: function(cm) {cm.replaceSelection(\"\\t\", \"end\");},\n    defaultTab: function(cm) {\n      if (cm.somethingSelected()) cm.indentSelection(\"add\");\n      else cm.replaceSelection(\"\\t\", \"end\");\n    },\n    transposeChars: function(cm) {\n      var cur = cm.getCursor(), line = cm.getLine(cur.line);\n      if (cur.ch > 0 && cur.ch < line.length - 1)\n        cm.replaceRange(line.charAt(cur.ch) + line.charAt(cur.ch - 1),\n                        {line: cur.line, ch: cur.ch - 1}, {line: cur.line, ch: cur.ch + 1});\n    },\n    newlineAndIndent: function(cm) {\n      cm.replaceSelection(\"\\n\", \"end\");\n      cm.indentLine(cm.getCursor().line);\n    },\n    toggleOverwrite: function(cm) {cm.toggleOverwrite();}\n  };\n\n  var keyMap = CodeMirror.keyMap = {};\n  keyMap.basic = {\n    \"Left\": \"goCharLeft\", \"Right\": \"goCharRight\", \"Up\": \"goLineUp\", \"Down\": \"goLineDown\",\n    \"End\": \"goLineEnd\", \"Home\": \"goLineStartSmart\", \"PageUp\": \"goPageUp\", \"PageDown\": \"goPageDown\",\n    \"Delete\": \"delCharRight\", \"Backspace\": \"delCharLeft\", \"Tab\": \"defaultTab\", \"Shift-Tab\": \"indentAuto\",\n    \"Enter\": \"newlineAndIndent\", \"Insert\": \"toggleOverwrite\"\n  };\n  // Note that the save and find-related commands aren't defined by\n  // default. Unknown commands are simply ignored.\n  keyMap.pcDefault = {\n    \"Ctrl-A\": \"selectAll\", \"Ctrl-D\": \"deleteLine\", \"Ctrl-Z\": \"undo\", \"Shift-Ctrl-Z\": \"redo\", \"Ctrl-Y\": \"redo\",\n    \"Ctrl-Home\": \"goDocStart\", \"Alt-Up\": \"goDocStart\", \"Ctrl-End\": \"goDocEnd\", \"Ctrl-Down\": \"goDocEnd\",\n    \"Ctrl-Left\": \"goWordLeft\", \"Ctrl-Right\": \"goWordRight\", \"Alt-Left\": \"goLineStart\", \"Alt-Right\": \"goLineEnd\",\n    \"Ctrl-Backspace\": \"delWordLeft\", \"Ctrl-Delete\": \"delWordRight\", \"Ctrl-S\": \"save\", \"Ctrl-F\": \"find\",\n    \"Ctrl-G\": \"findNext\", \"Shift-Ctrl-G\": \"findPrev\", \"Shift-Ctrl-F\": \"replace\", \"Shift-Ctrl-R\": \"replaceAll\",\n    \"Ctrl-[\": \"indentLess\", \"Ctrl-]\": \"indentMore\",\n    fallthrough: \"basic\"\n  };\n  keyMap.macDefault = {\n    \"Cmd-A\": \"selectAll\", \"Cmd-D\": \"deleteLine\", \"Cmd-Z\": \"undo\", \"Shift-Cmd-Z\": \"redo\", \"Cmd-Y\": \"redo\",\n    \"Cmd-Up\": \"goDocStart\", \"Cmd-End\": \"goDocEnd\", \"Cmd-Down\": \"goDocEnd\", \"Alt-Left\": \"goWordLeft\",\n    \"Alt-Right\": \"goWordRight\", \"Cmd-Left\": \"goLineStart\", \"Cmd-Right\": \"goLineEnd\", \"Alt-Backspace\": \"delWordLeft\",\n    \"Ctrl-Alt-Backspace\": \"delWordRight\", \"Alt-Delete\": \"delWordRight\", \"Cmd-S\": \"save\", \"Cmd-F\": \"find\",\n    \"Cmd-G\": \"findNext\", \"Shift-Cmd-G\": \"findPrev\", \"Cmd-Alt-F\": \"replace\", \"Shift-Cmd-Alt-F\": \"replaceAll\",\n    \"Cmd-[\": \"indentLess\", \"Cmd-]\": \"indentMore\",\n    fallthrough: [\"basic\", \"emacsy\"]\n  };\n  keyMap[\"default\"] = mac ? keyMap.macDefault : keyMap.pcDefault;\n  keyMap.emacsy = {\n    \"Ctrl-F\": \"goCharRight\", \"Ctrl-B\": \"goCharLeft\", \"Ctrl-P\": \"goLineUp\", \"Ctrl-N\": \"goLineDown\",\n    \"Alt-F\": \"goWordRight\", \"Alt-B\": \"goWordLeft\", \"Ctrl-A\": \"goLineStart\", \"Ctrl-E\": \"goLineEnd\",\n    \"Ctrl-V\": \"goPageUp\", \"Shift-Ctrl-V\": \"goPageDown\", \"Ctrl-D\": \"delCharRight\", \"Ctrl-H\": \"delCharLeft\",\n    \"Alt-D\": \"delWordRight\", \"Alt-Backspace\": \"delWordLeft\", \"Ctrl-K\": \"killLine\", \"Ctrl-T\": \"transposeChars\"\n  };\n\n  function getKeyMap(val) {\n    if (typeof val == \"string\") return keyMap[val];\n    else return val;\n  }\n  function lookupKey(name, extraMap, map, handle, stop) {\n    function lookup(map) {\n      map = getKeyMap(map);\n      var found = map[name];\n      if (found != null && handle(found)) return true;\n      if (map.nofallthrough) {\n        if (stop) stop();\n        return true;\n      }\n      var fallthrough = map.fallthrough;\n      if (fallthrough == null) return false;\n      if (Object.prototype.toString.call(fallthrough) != \"[object Array]\")\n        return lookup(fallthrough);\n      for (var i = 0, e = fallthrough.length; i < e; ++i) {\n        if (lookup(fallthrough[i])) return true;\n      }\n      return false;\n    }\n    if (extraMap && lookup(extraMap)) return true;\n    return lookup(map);\n  }\n  function isModifierKey(event) {\n    var name = keyNames[e_prop(event, \"keyCode\")];\n    return name == \"Ctrl\" || name == \"Alt\" || name == \"Shift\" || name == \"Mod\";\n  }\n\n  CodeMirror.fromTextArea = function(textarea, options) {\n    if (!options) options = {};\n    options.value = textarea.value;\n    if (!options.tabindex && textarea.tabindex)\n      options.tabindex = textarea.tabindex;\n    if (options.autofocus == null && textarea.getAttribute(\"autofocus\") != null)\n      options.autofocus = true;\n\n    function save() {textarea.value = instance.getValue();}\n    if (textarea.form) {\n      // Deplorable hack to make the submit method do the right thing.\n      var rmSubmit = connect(textarea.form, \"submit\", save, true);\n      if (typeof textarea.form.submit == \"function\") {\n        var realSubmit = textarea.form.submit;\n        function wrappedSubmit() {\n          save();\n          textarea.form.submit = realSubmit;\n          textarea.form.submit();\n          textarea.form.submit = wrappedSubmit;\n        }\n        textarea.form.submit = wrappedSubmit;\n      }\n    }\n\n    textarea.style.display = \"none\";\n    var instance = CodeMirror(function(node) {\n      textarea.parentNode.insertBefore(node, textarea.nextSibling);\n    }, options);\n    instance.save = save;\n    instance.getTextArea = function() { return textarea; };\n    instance.toTextArea = function() {\n      save();\n      textarea.parentNode.removeChild(instance.getWrapperElement());\n      textarea.style.display = \"\";\n      if (textarea.form) {\n        rmSubmit();\n        if (typeof textarea.form.submit == \"function\")\n          textarea.form.submit = realSubmit;\n      }\n    };\n    return instance;\n  };\n\n  // Utility functions for working with state. Exported because modes\n  // sometimes need to do this.\n  function copyState(mode, state) {\n    if (state === true) return state;\n    if (mode.copyState) return mode.copyState(state);\n    var nstate = {};\n    for (var n in state) {\n      var val = state[n];\n      if (val instanceof Array) val = val.concat([]);\n      nstate[n] = val;\n    }\n    return nstate;\n  }\n  CodeMirror.copyState = copyState;\n  function startState(mode, a1, a2) {\n    return mode.startState ? mode.startState(a1, a2) : true;\n  }\n  CodeMirror.startState = startState;\n\n  // The character stream used by a mode's parser.\n  function StringStream(string, tabSize) {\n    this.pos = this.start = 0;\n    this.string = string;\n    this.tabSize = tabSize || 8;\n  }\n  StringStream.prototype = {\n    eol: function() {return this.pos >= this.string.length;},\n    sol: function() {return this.pos == 0;},\n    peek: function() {return this.string.charAt(this.pos);},\n    next: function() {\n      if (this.pos < this.string.length)\n        return this.string.charAt(this.pos++);\n    },\n    eat: function(match) {\n      var ch = this.string.charAt(this.pos);\n      if (typeof match == \"string\") var ok = ch == match;\n      else var ok = ch && (match.test ? match.test(ch) : match(ch));\n      if (ok) {++this.pos; return ch;}\n    },\n    eatWhile: function(match) {\n      var start = this.pos;\n      while (this.eat(match)){}\n      return this.pos > start;\n    },\n    eatSpace: function() {\n      var start = this.pos;\n      while (/[\\s\\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos;\n      return this.pos > start;\n    },\n    skipToEnd: function() {this.pos = this.string.length;},\n    skipTo: function(ch) {\n      var found = this.string.indexOf(ch, this.pos);\n      if (found > -1) {this.pos = found; return true;}\n    },\n    backUp: function(n) {this.pos -= n;},\n    column: function() {return countColumn(this.string, this.start, this.tabSize);},\n    indentation: function() {return countColumn(this.string, null, this.tabSize);},\n    match: function(pattern, consume, caseInsensitive) {\n      if (typeof pattern == \"string\") {\n        function cased(str) {return caseInsensitive ? str.toLowerCase() : str;}\n        if (cased(this.string).indexOf(cased(pattern), this.pos) == this.pos) {\n          if (consume !== false) this.pos += pattern.length;\n          return true;\n        }\n      }\n      else {\n        var match = this.string.slice(this.pos).match(pattern);\n        if (match && consume !== false) this.pos += match[0].length;\n        return match;\n      }\n    },\n    current: function(){return this.string.slice(this.start, this.pos);}\n  };\n  CodeMirror.StringStream = StringStream;\n\n  function MarkedText(from, to, className, marker) {\n    this.from = from; this.to = to; this.style = className; this.marker = marker;\n  }\n  MarkedText.prototype = {\n    attach: function(line) { this.marker.set.push(line); },\n    detach: function(line) {\n      var ix = indexOf(this.marker.set, line);\n      if (ix > -1) this.marker.set.splice(ix, 1);\n    },\n    split: function(pos, lenBefore) {\n      if (this.to <= pos && this.to != null) return null;\n      var from = this.from < pos || this.from == null ? null : this.from - pos + lenBefore;\n      var to = this.to == null ? null : this.to - pos + lenBefore;\n      return new MarkedText(from, to, this.style, this.marker);\n    },\n    dup: function() { return new MarkedText(null, null, this.style, this.marker); },\n    clipTo: function(fromOpen, from, toOpen, to, diff) {\n      if (fromOpen && to > this.from && (to < this.to || this.to == null))\n        this.from = null;\n      else if (this.from != null && this.from >= from)\n        this.from = Math.max(to, this.from) + diff;\n      if (toOpen && (from < this.to || this.to == null) && (from > this.from || this.from == null))\n        this.to = null;\n      else if (this.to != null && this.to > from)\n        this.to = to < this.to ? this.to + diff : from;\n    },\n    isDead: function() { return this.from != null && this.to != null && this.from >= this.to; },\n    sameSet: function(x) { return this.marker == x.marker; }\n  };\n\n  function Bookmark(pos) {\n    this.from = pos; this.to = pos; this.line = null;\n  }\n  Bookmark.prototype = {\n    attach: function(line) { this.line = line; },\n    detach: function(line) { if (this.line == line) this.line = null; },\n    split: function(pos, lenBefore) {\n      if (pos < this.from) {\n        this.from = this.to = (this.from - pos) + lenBefore;\n        return this;\n      }\n    },\n    isDead: function() { return this.from > this.to; },\n    clipTo: function(fromOpen, from, toOpen, to, diff) {\n      if ((fromOpen || from < this.from) && (toOpen || to > this.to)) {\n        this.from = 0; this.to = -1;\n      } else if (this.from > from) {\n        this.from = this.to = Math.max(to, this.from) + diff;\n      }\n    },\n    sameSet: function(x) { return false; },\n    find: function() {\n      if (!this.line || !this.line.parent) return null;\n      return {line: lineNo(this.line), ch: this.from};\n    },\n    clear: function() {\n      if (this.line) {\n        var found = indexOf(this.line.marked, this);\n        if (found != -1) this.line.marked.splice(found, 1);\n        this.line = null;\n      }\n    }\n  };\n\n  // Line objects. These hold state related to a line, including\n  // highlighting info (the styles array).\n  function Line(text, styles) {\n    this.styles = styles || [text, null];\n    this.text = text;\n    this.height = 1;\n    this.marked = this.gutterMarker = this.className = this.bgClassName = this.handlers = null;\n    this.stateAfter = this.parent = this.hidden = null;\n  }\n  Line.inheritMarks = function(text, orig) {\n    var ln = new Line(text), mk = orig && orig.marked;\n    if (mk) {\n      for (var i = 0; i < mk.length; ++i) {\n        if (mk[i].to == null && mk[i].style) {\n          var newmk = ln.marked || (ln.marked = []), mark = mk[i];\n          var nmark = mark.dup(); newmk.push(nmark); nmark.attach(ln);\n        }\n      }\n    }\n    return ln;\n  }\n  Line.prototype = {\n    // Replace a piece of a line, keeping the styles around it intact.\n    replace: function(from, to_, text) {\n      var st = [], mk = this.marked, to = to_ == null ? this.text.length : to_;\n      copyStyles(0, from, this.styles, st);\n      if (text) st.push(text, null);\n      copyStyles(to, this.text.length, this.styles, st);\n      this.styles = st;\n      this.text = this.text.slice(0, from) + text + this.text.slice(to);\n      this.stateAfter = null;\n      if (mk) {\n        var diff = text.length - (to - from);\n        for (var i = 0; i < mk.length; ++i) {\n          var mark = mk[i];\n          mark.clipTo(from == null, from || 0, to_ == null, to, diff);\n          if (mark.isDead()) {mark.detach(this); mk.splice(i--, 1);}\n        }\n      }\n    },\n    // Split a part off a line, keeping styles and markers intact.\n    split: function(pos, textBefore) {\n      var st = [textBefore, null], mk = this.marked;\n      copyStyles(pos, this.text.length, this.styles, st);\n      var taken = new Line(textBefore + this.text.slice(pos), st);\n      if (mk) {\n        for (var i = 0; i < mk.length; ++i) {\n          var mark = mk[i];\n          var newmark = mark.split(pos, textBefore.length);\n          if (newmark) {\n            if (!taken.marked) taken.marked = [];\n            taken.marked.push(newmark); newmark.attach(taken);\n            if (newmark == mark) mk.splice(i--, 1);\n          }\n        }\n      }\n      return taken;\n    },\n    append: function(line) {\n      var mylen = this.text.length, mk = line.marked, mymk = this.marked;\n      this.text += line.text;\n      copyStyles(0, line.text.length, line.styles, this.styles);\n      if (mymk) {\n        for (var i = 0; i < mymk.length; ++i)\n          if (mymk[i].to == null) mymk[i].to = mylen;\n      }\n      if (mk && mk.length) {\n        if (!mymk) this.marked = mymk = [];\n        outer: for (var i = 0; i < mk.length; ++i) {\n          var mark = mk[i];\n          if (!mark.from) {\n            for (var j = 0; j < mymk.length; ++j) {\n              var mymark = mymk[j];\n              if (mymark.to == mylen && mymark.sameSet(mark)) {\n                mymark.to = mark.to == null ? null : mark.to + mylen;\n                if (mymark.isDead()) {\n                  mymark.detach(this);\n                  mk.splice(i--, 1);\n                }\n                continue outer;\n              }\n            }\n          }\n          mymk.push(mark);\n          mark.attach(this);\n          mark.from += mylen;\n          if (mark.to != null) mark.to += mylen;\n        }\n      }\n    },\n    fixMarkEnds: function(other) {\n      var mk = this.marked, omk = other.marked;\n      if (!mk) return;\n      for (var i = 0; i < mk.length; ++i) {\n        var mark = mk[i], close = mark.to == null;\n        if (close && omk) {\n          for (var j = 0; j < omk.length; ++j)\n            if (omk[j].sameSet(mark)) {close = false; break;}\n        }\n        if (close) mark.to = this.text.length;\n      }\n    },\n    fixMarkStarts: function() {\n      var mk = this.marked;\n      if (!mk) return;\n      for (var i = 0; i < mk.length; ++i)\n        if (mk[i].from == null) mk[i].from = 0;\n    },\n    addMark: function(mark) {\n      mark.attach(this);\n      if (this.marked == null) this.marked = [];\n      this.marked.push(mark);\n      this.marked.sort(function(a, b){return (a.from || 0) - (b.from || 0);});\n    },\n    // Run the given mode's parser over a line, update the styles\n    // array, which contains alternating fragments of text and CSS\n    // classes.\n    highlight: function(mode, state, tabSize) {\n      var stream = new StringStream(this.text, tabSize), st = this.styles, pos = 0;\n      var changed = false, curWord = st[0], prevWord;\n      if (this.text == \"\" && mode.blankLine) mode.blankLine(state);\n      while (!stream.eol()) {\n        var style = mode.token(stream, state);\n        var substr = this.text.slice(stream.start, stream.pos);\n        stream.start = stream.pos;\n        if (pos && st[pos-1] == style)\n          st[pos-2] += substr;\n        else if (substr) {\n          if (!changed && (st[pos+1] != style || (pos && st[pos-2] != prevWord))) changed = true;\n          st[pos++] = substr; st[pos++] = style;\n          prevWord = curWord; curWord = st[pos];\n        }\n        // Give up when line is ridiculously long\n        if (stream.pos > 5000) {\n          st[pos++] = this.text.slice(stream.pos); st[pos++] = null;\n          break;\n        }\n      }\n      if (st.length != pos) {st.length = pos; changed = true;}\n      if (pos && st[pos-2] != prevWord) changed = true;\n      // Short lines with simple highlights return null, and are\n      // counted as changed by the driver because they are likely to\n      // highlight the same way in various contexts.\n      return changed || (st.length < 5 && this.text.length < 10 ? null : false);\n    },\n    // Fetch the parser token for a given character. Useful for hacks\n    // that want to inspect the mode state (say, for completion).\n    getTokenAt: function(mode, state, ch) {\n      var txt = this.text, stream = new StringStream(txt);\n      while (stream.pos < ch && !stream.eol()) {\n        stream.start = stream.pos;\n        var style = mode.token(stream, state);\n      }\n      return {start: stream.start,\n              end: stream.pos,\n              string: stream.current(),\n              className: style || null,\n              state: state};\n    },\n    indentation: function(tabSize) {return countColumn(this.text, null, tabSize);},\n    // Produces an HTML fragment for the line, taking selection,\n    // marking, and highlighting into account.\n    getHTML: function(makeTab, wrapAt, wrapId, wrapWBR) {\n      var html = [], first = true, col = 0;\n      function span_(text, style) {\n        if (!text) return;\n        // Work around a bug where, in some compat modes, IE ignores leading spaces\n        if (first && ie && text.charAt(0) == \" \") text = \"\\u00a0\" + text.slice(1);\n        first = false;\n        if (text.indexOf(\"\\t\") == -1) {\n          col += text.length;\n          var escaped = htmlEscape(text);\n        } else {\n          var escaped = \"\";\n          for (var pos = 0;;) {\n            var idx = text.indexOf(\"\\t\", pos);\n            if (idx == -1) {\n              escaped += htmlEscape(text.slice(pos));\n              col += text.length - pos;\n              break;\n            } else {\n              col += idx - pos;\n              var tab = makeTab(col);\n              escaped += htmlEscape(text.slice(pos, idx)) + tab.html;\n              col += tab.width;\n              pos = idx + 1;\n            }\n          }\n        }\n        if (style) html.push('<span class=\"', style, '\">', escaped, \"</span>\");\n        else html.push(escaped);\n      }\n      var span = span_;\n      if (wrapAt != null) {\n        var outPos = 0, open = \"<span id=\\\"\" + wrapId + \"\\\">\";\n        span = function(text, style) {\n          var l = text.length;\n          if (wrapAt >= outPos && wrapAt < outPos + l) {\n            if (wrapAt > outPos) {\n              span_(text.slice(0, wrapAt - outPos), style);\n              // See comment at the definition of spanAffectsWrapping\n              if (wrapWBR) html.push(\"<wbr>\");\n            }\n            html.push(open);\n            var cut = wrapAt - outPos;\n            span_(window.opera ? text.slice(cut, cut + 1) : text.slice(cut), style);\n            html.push(\"</span>\");\n            if (window.opera) span_(text.slice(cut + 1), style);\n            wrapAt--;\n            outPos += l;\n          } else {\n            outPos += l;\n            span_(text, style);\n            // Output empty wrapper when at end of line\n            if (outPos == wrapAt && outPos == len) html.push(open + \" </span>\");\n            // Stop outputting HTML when gone sufficiently far beyond measure\n            else if (outPos > wrapAt + 10 && /\\s/.test(text)) span = function(){};\n          }\n        }\n      }\n\n      var st = this.styles, allText = this.text, marked = this.marked;\n      var len = allText.length;\n      function styleToClass(style) {\n        if (!style) return null;\n        return \"cm-\" + style.replace(/ +/g, \" cm-\");\n      }\n\n      if (!allText && wrapAt == null) {\n        span(\" \");\n      } else if (!marked || !marked.length) {\n        for (var i = 0, ch = 0; ch < len; i+=2) {\n          var str = st[i], style = st[i+1], l = str.length;\n          if (ch + l > len) str = str.slice(0, len - ch);\n          ch += l;\n          span(str, styleToClass(style));\n        }\n      } else {\n        var pos = 0, i = 0, text = \"\", style, sg = 0;\n        var nextChange = marked[0].from || 0, marks = [], markpos = 0;\n        function advanceMarks() {\n          var m;\n          while (markpos < marked.length &&\n                 ((m = marked[markpos]).from == pos || m.from == null)) {\n            if (m.style != null) marks.push(m);\n            ++markpos;\n          }\n          nextChange = markpos < marked.length ? marked[markpos].from : Infinity;\n          for (var i = 0; i < marks.length; ++i) {\n            var to = marks[i].to || Infinity;\n            if (to == pos) marks.splice(i--, 1);\n            else nextChange = Math.min(to, nextChange);\n          }\n        }\n        var m = 0;\n        while (pos < len) {\n          if (nextChange == pos) advanceMarks();\n          var upto = Math.min(len, nextChange);\n          while (true) {\n            if (text) {\n              var end = pos + text.length;\n              var appliedStyle = style;\n              for (var j = 0; j < marks.length; ++j)\n                appliedStyle = (appliedStyle ? appliedStyle + \" \" : \"\") + marks[j].style;\n              span(end > upto ? text.slice(0, upto - pos) : text, appliedStyle);\n              if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}\n              pos = end;\n            }\n            text = st[i++]; style = styleToClass(st[i++]);\n          }\n        }\n      }\n      return html.join(\"\");\n    },\n    cleanUp: function() {\n      this.parent = null;\n      if (this.marked)\n        for (var i = 0, e = this.marked.length; i < e; ++i) this.marked[i].detach(this);\n    }\n  };\n  // Utility used by replace and split above\n  function copyStyles(from, to, source, dest) {\n    for (var i = 0, pos = 0, state = 0; pos < to; i+=2) {\n      var part = source[i], end = pos + part.length;\n      if (state == 0) {\n        if (end > from) dest.push(part.slice(from - pos, Math.min(part.length, to - pos)), source[i+1]);\n        if (end >= from) state = 1;\n      }\n      else if (state == 1) {\n        if (end > to) dest.push(part.slice(0, to - pos), source[i+1]);\n        else dest.push(part, source[i+1]);\n      }\n      pos = end;\n    }\n  }\n\n  // Data structure that holds the sequence of lines.\n  function LeafChunk(lines) {\n    this.lines = lines;\n    this.parent = null;\n    for (var i = 0, e = lines.length, height = 0; i < e; ++i) {\n      lines[i].parent = this;\n      height += lines[i].height;\n    }\n    this.height = height;\n  }\n  LeafChunk.prototype = {\n    chunkSize: function() { return this.lines.length; },\n    remove: function(at, n, callbacks) {\n      for (var i = at, e = at + n; i < e; ++i) {\n        var line = this.lines[i];\n        this.height -= line.height;\n        line.cleanUp();\n        if (line.handlers)\n          for (var j = 0; j < line.handlers.length; ++j) callbacks.push(line.handlers[j]);\n      }\n      this.lines.splice(at, n);\n    },\n    collapse: function(lines) {\n      lines.splice.apply(lines, [lines.length, 0].concat(this.lines));\n    },\n    insertHeight: function(at, lines, height) {\n      this.height += height;\n      this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));\n      for (var i = 0, e = lines.length; i < e; ++i) lines[i].parent = this;\n    },\n    iterN: function(at, n, op) {\n      for (var e = at + n; at < e; ++at)\n        if (op(this.lines[at])) return true;\n    }\n  };\n  function BranchChunk(children) {\n    this.children = children;\n    var size = 0, height = 0;\n    for (var i = 0, e = children.length; i < e; ++i) {\n      var ch = children[i];\n      size += ch.chunkSize(); height += ch.height;\n      ch.parent = this;\n    }\n    this.size = size;\n    this.height = height;\n    this.parent = null;\n  }\n  BranchChunk.prototype = {\n    chunkSize: function() { return this.size; },\n    remove: function(at, n, callbacks) {\n      this.size -= n;\n      for (var i = 0; i < this.children.length; ++i) {\n        var child = this.children[i], sz = child.chunkSize();\n        if (at < sz) {\n          var rm = Math.min(n, sz - at), oldHeight = child.height;\n          child.remove(at, rm, callbacks);\n          this.height -= oldHeight - child.height;\n          if (sz == rm) { this.children.splice(i--, 1); child.parent = null; }\n          if ((n -= rm) == 0) break;\n          at = 0;\n        } else at -= sz;\n      }\n      if (this.size - n < 25) {\n        var lines = [];\n        this.collapse(lines);\n        this.children = [new LeafChunk(lines)];\n        this.children[0].parent = this;\n      }\n    },\n    collapse: function(lines) {\n      for (var i = 0, e = this.children.length; i < e; ++i) this.children[i].collapse(lines);\n    },\n    insert: function(at, lines) {\n      var height = 0;\n      for (var i = 0, e = lines.length; i < e; ++i) height += lines[i].height;\n      this.insertHeight(at, lines, height);\n    },\n    insertHeight: function(at, lines, height) {\n      this.size += lines.length;\n      this.height += height;\n      for (var i = 0, e = this.children.length; i < e; ++i) {\n        var child = this.children[i], sz = child.chunkSize();\n        if (at <= sz) {\n          child.insertHeight(at, lines, height);\n          if (child.lines && child.lines.length > 50) {\n            while (child.lines.length > 50) {\n              var spilled = child.lines.splice(child.lines.length - 25, 25);\n              var newleaf = new LeafChunk(spilled);\n              child.height -= newleaf.height;\n              this.children.splice(i + 1, 0, newleaf);\n              newleaf.parent = this;\n            }\n            this.maybeSpill();\n          }\n          break;\n        }\n        at -= sz;\n      }\n    },\n    maybeSpill: function() {\n      if (this.children.length <= 10) return;\n      var me = this;\n      do {\n        var spilled = me.children.splice(me.children.length - 5, 5);\n        var sibling = new BranchChunk(spilled);\n        if (!me.parent) { // Become the parent node\n          var copy = new BranchChunk(me.children);\n          copy.parent = me;\n          me.children = [copy, sibling];\n          me = copy;\n        } else {\n          me.size -= sibling.size;\n          me.height -= sibling.height;\n          var myIndex = indexOf(me.parent.children, me);\n          me.parent.children.splice(myIndex + 1, 0, sibling);\n        }\n        sibling.parent = me.parent;\n      } while (me.children.length > 10);\n      me.parent.maybeSpill();\n    },\n    iter: function(from, to, op) { this.iterN(from, to - from, op); },\n    iterN: function(at, n, op) {\n      for (var i = 0, e = this.children.length; i < e; ++i) {\n        var child = this.children[i], sz = child.chunkSize();\n        if (at < sz) {\n          var used = Math.min(n, sz - at);\n          if (child.iterN(at, used, op)) return true;\n          if ((n -= used) == 0) break;\n          at = 0;\n        } else at -= sz;\n      }\n    }\n  };\n\n  function getLineAt(chunk, n) {\n    while (!chunk.lines) {\n      for (var i = 0;; ++i) {\n        var child = chunk.children[i], sz = child.chunkSize();\n        if (n < sz) { chunk = child; break; }\n        n -= sz;\n      }\n    }\n    return chunk.lines[n];\n  }\n  function lineNo(line) {\n    if (line.parent == null) return null;\n    var cur = line.parent, no = indexOf(cur.lines, line);\n    for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n      for (var i = 0, e = chunk.children.length; ; ++i) {\n        if (chunk.children[i] == cur) break;\n        no += chunk.children[i].chunkSize();\n      }\n    }\n    return no;\n  }\n  function lineAtHeight(chunk, h) {\n    var n = 0;\n    outer: do {\n      for (var i = 0, e = chunk.children.length; i < e; ++i) {\n        var child = chunk.children[i], ch = child.height;\n        if (h < ch) { chunk = child; continue outer; }\n        h -= ch;\n        n += child.chunkSize();\n      }\n      return n;\n    } while (!chunk.lines);\n    for (var i = 0, e = chunk.lines.length; i < e; ++i) {\n      var line = chunk.lines[i], lh = line.height;\n      if (h < lh) break;\n      h -= lh;\n    }\n    return n + i;\n  }\n  function heightAtLine(chunk, n) {\n    var h = 0;\n    outer: do {\n      for (var i = 0, e = chunk.children.length; i < e; ++i) {\n        var child = chunk.children[i], sz = child.chunkSize();\n        if (n < sz) { chunk = child; continue outer; }\n        n -= sz;\n        h += child.height;\n      }\n      return h;\n    } while (!chunk.lines);\n    for (var i = 0; i < n; ++i) h += chunk.lines[i].height;\n    return h;\n  }\n\n  // The history object 'chunks' changes that are made close together\n  // and at almost the same time into bigger undoable units.\n  function History() {\n    this.time = 0;\n    this.done = []; this.undone = [];\n    this.compound = 0;\n    this.closed = false;\n  }\n  History.prototype = {\n    addChange: function(start, added, old) {\n      this.undone.length = 0;\n      var time = +new Date, cur = this.done[this.done.length - 1], last = cur && cur[cur.length - 1];\n      var dtime = time - this.time;\n\n      if (this.compound && cur && !this.closed) {\n        cur.push({start: start, added: added, old: old});\n      } else if (dtime > 400 || !last || this.closed ||\n                 last.start > start + old.length || last.start + last.added < start) {\n        this.done.push([{start: start, added: added, old: old}]);\n        this.closed = false;\n      } else {\n        var startBefore = Math.max(0, last.start - start),\n            endAfter = Math.max(0, (start + old.length) - (last.start + last.added));\n        for (var i = startBefore; i > 0; --i) last.old.unshift(old[i - 1]);\n        for (var i = endAfter; i > 0; --i) last.old.push(old[old.length - i]);\n        if (startBefore) last.start = start;\n        last.added += added - (old.length - startBefore - endAfter);\n      }\n      this.time = time;\n    },\n    startCompound: function() {\n      if (!this.compound++) this.closed = true;\n    },\n    endCompound: function() {\n      if (!--this.compound) this.closed = true;\n    }\n  };\n\n  function stopMethod() {e_stop(this);}\n  // Ensure an event has a stop method.\n  function addStop(event) {\n    if (!event.stop) event.stop = stopMethod;\n    return event;\n  }\n\n  function e_preventDefault(e) {\n    if (e.preventDefault) e.preventDefault();\n    else e.returnValue = false;\n  }\n  function e_stopPropagation(e) {\n    if (e.stopPropagation) e.stopPropagation();\n    else e.cancelBubble = true;\n  }\n  function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}\n  CodeMirror.e_stop = e_stop;\n  CodeMirror.e_preventDefault = e_preventDefault;\n  CodeMirror.e_stopPropagation = e_stopPropagation;\n\n  function e_target(e) {return e.target || e.srcElement;}\n  function e_button(e) {\n    if (e.which) return e.which;\n    else if (e.button & 1) return 1;\n    else if (e.button & 2) return 3;\n    else if (e.button & 4) return 2;\n  }\n\n  // Allow 3rd-party code to override event properties by adding an override\n  // object to an event object.\n  function e_prop(e, prop) {\n    var overridden = e.override && e.override.hasOwnProperty(prop);\n    return overridden ? e.override[prop] : e[prop];\n  }\n\n  // Event handler registration. If disconnect is true, it'll return a\n  // function that unregisters the handler.\n  function connect(node, type, handler, disconnect) {\n    if (typeof node.addEventListener == \"function\") {\n      node.addEventListener(type, handler, false);\n      if (disconnect) return function() {node.removeEventListener(type, handler, false);};\n    }\n    else {\n      var wrapHandler = function(event) {handler(event || window.event);};\n      node.attachEvent(\"on\" + type, wrapHandler);\n      if (disconnect) return function() {node.detachEvent(\"on\" + type, wrapHandler);};\n    }\n  }\n  CodeMirror.connect = connect;\n\n  function Delayed() {this.id = null;}\n  Delayed.prototype = {set: function(ms, f) {clearTimeout(this.id); this.id = setTimeout(f, ms);}};\n\n  var Pass = CodeMirror.Pass = {toString: function(){return \"CodeMirror.Pass\";}};\n\n  var gecko = /gecko\\/\\d{7}/i.test(navigator.userAgent);\n  var ie = /MSIE \\d/.test(navigator.userAgent);\n  var ie_lt9 = /MSIE [1-8]\\b/.test(navigator.userAgent);\n  var quirksMode = ie && document.documentMode == 5;\n  var webkit = /WebKit\\//.test(navigator.userAgent);\n  var chrome = /Chrome\\//.test(navigator.userAgent);\n  var safari = /Apple Computer/.test(navigator.vendor);\n  var khtml = /KHTML\\//.test(navigator.userAgent);\n\n  // Detect drag-and-drop\n  var dragAndDrop = function() {\n    // There is *some* kind of drag-and-drop support in IE6-8, but I\n    // couldn't get it to work yet.\n    if (ie_lt9) return false;\n    var div = document.createElement('div');\n    return \"draggable\" in div || \"dragDrop\" in div;\n  }();\n\n  // Feature-detect whether newlines in textareas are converted to \\r\\n\n  var lineSep = function () {\n    var te = document.createElement(\"textarea\");\n    te.value = \"foo\\nbar\";\n    if (te.value.indexOf(\"\\r\") > -1) return \"\\r\\n\";\n    return \"\\n\";\n  }();\n\n  // For a reason I have yet to figure out, some browsers disallow\n  // word wrapping between certain characters *only* if a new inline\n  // element is started between them. This makes it hard to reliably\n  // measure the position of things, since that requires inserting an\n  // extra span. This terribly fragile set of regexps matches the\n  // character combinations that suffer from this phenomenon on the\n  // various browsers.\n  var spanAffectsWrapping = /^$/; // Won't match any two-character string\n  if (gecko) spanAffectsWrapping = /$'/;\n  else if (safari) spanAffectsWrapping = /\\-[^ \\-?]|\\?[^ !'\\\"\\),.\\-\\/:;\\?\\]\\}]/;\n  else if (chrome) spanAffectsWrapping = /\\-[^ \\-\\.?]|\\?[^ \\-\\.?\\]\\}:;!'\\\"\\),\\/]|[\\.!\\\"#&%\\)*+,:;=>\\]|\\}~][\\(\\{\\[<]|\\$'/;\n\n  // Counts the column offset in a string, taking tabs into account.\n  // Used mostly to find indentation.\n  function countColumn(string, end, tabSize) {\n    if (end == null) {\n      end = string.search(/[^\\s\\u00a0]/);\n      if (end == -1) end = string.length;\n    }\n    for (var i = 0, n = 0; i < end; ++i) {\n      if (string.charAt(i) == \"\\t\") n += tabSize - (n % tabSize);\n      else ++n;\n    }\n    return n;\n  }\n\n  function computedStyle(elt) {\n    if (elt.currentStyle) return elt.currentStyle;\n    return window.getComputedStyle(elt, null);\n  }\n\n  // Find the position of an element by following the offsetParent chain.\n  // If screen==true, it returns screen (rather than page) coordinates.\n  function eltOffset(node, screen) {\n    var bod = node.ownerDocument.body;\n    var x = 0, y = 0, skipBody = false;\n    for (var n = node; n; n = n.offsetParent) {\n      var ol = n.offsetLeft, ot = n.offsetTop;\n      // Firefox reports weird inverted offsets when the body has a border.\n      if (n == bod) { x += Math.abs(ol); y += Math.abs(ot); }\n      else { x += ol, y += ot; }\n      if (screen && computedStyle(n).position == \"fixed\")\n        skipBody = true;\n    }\n    var e = screen && !skipBody ? null : bod;\n    for (var n = node.parentNode; n != e; n = n.parentNode)\n      if (n.scrollLeft != null) { x -= n.scrollLeft; y -= n.scrollTop;}\n    return {left: x, top: y};\n  }\n  // Use the faster and saner getBoundingClientRect method when possible.\n  if (document.documentElement.getBoundingClientRect != null) eltOffset = function(node, screen) {\n    // Take the parts of bounding client rect that we are interested in so we are able to edit if need be,\n    // since the returned value cannot be changed externally (they are kept in sync as the element moves within the page)\n    try { var box = node.getBoundingClientRect(); box = { top: box.top, left: box.left }; }\n    catch(e) { box = {top: 0, left: 0}; }\n    if (!screen) {\n      // Get the toplevel scroll, working around browser differences.\n      if (window.pageYOffset == null) {\n        var t = document.documentElement || document.body.parentNode;\n        if (t.scrollTop == null) t = document.body;\n        box.top += t.scrollTop; box.left += t.scrollLeft;\n      } else {\n        box.top += window.pageYOffset; box.left += window.pageXOffset;\n      }\n    }\n    return box;\n  };\n\n  // Get a node's text content.\n  function eltText(node) {\n    return node.textContent || node.innerText || node.nodeValue || \"\";\n  }\n  function selectInput(node) {\n    if (ios) { // Mobile Safari apparently has a bug where select() is broken.\n      node.selectionStart = 0;\n      node.selectionEnd = node.value.length;\n    } else node.select();\n  }\n\n  // Operations on {line, ch} objects.\n  function posEq(a, b) {return a.line == b.line && a.ch == b.ch;}\n  function posLess(a, b) {return a.line < b.line || (a.line == b.line && a.ch < b.ch);}\n  function copyPos(x) {return {line: x.line, ch: x.ch};}\n\n  var escapeElement = document.createElement(\"pre\");\n  function htmlEscape(str) {\n    escapeElement.textContent = str;\n    return escapeElement.innerHTML;\n  }\n  // Recent (late 2011) Opera betas insert bogus newlines at the start\n  // of the textContent, so we strip those.\n  if (htmlEscape(\"a\") == \"\\na\")\n    htmlEscape = function(str) {\n      escapeElement.textContent = str;\n      return escapeElement.innerHTML.slice(1);\n    };\n  // Some IEs don't preserve tabs through innerHTML\n  else if (htmlEscape(\"\\t\") != \"\\t\")\n    htmlEscape = function(str) {\n      escapeElement.innerHTML = \"\";\n      escapeElement.appendChild(document.createTextNode(str));\n      return escapeElement.innerHTML;\n    };\n  CodeMirror.htmlEscape = htmlEscape;\n\n  // Used to position the cursor after an undo/redo by finding the\n  // last edited character.\n  function editEnd(from, to) {\n    if (!to) return 0;\n    if (!from) return to.length;\n    for (var i = from.length, j = to.length; i >= 0 && j >= 0; --i, --j)\n      if (from.charAt(i) != to.charAt(j)) break;\n    return j + 1;\n  }\n\n  function indexOf(collection, elt) {\n    if (collection.indexOf) return collection.indexOf(elt);\n    for (var i = 0, e = collection.length; i < e; ++i)\n      if (collection[i] == elt) return i;\n    return -1;\n  }\n  function isWordChar(ch) {\n    return /\\w/.test(ch) || ch.toUpperCase() != ch.toLowerCase();\n  }\n\n  // See if \"\".split is the broken IE version, if so, provide an\n  // alternative way to split lines.\n  var splitLines = \"\\n\\nb\".split(/\\n/).length != 3 ? function(string) {\n    var pos = 0, nl, result = [];\n    while ((nl = string.indexOf(\"\\n\", pos)) > -1) {\n      result.push(string.slice(pos, string.charAt(nl-1) == \"\\r\" ? nl - 1 : nl));\n      pos = nl + 1;\n    }\n    result.push(string.slice(pos));\n    return result;\n  } : function(string){return string.split(/\\r?\\n/);};\n  CodeMirror.splitLines = splitLines;\n\n  var hasSelection = window.getSelection ? function(te) {\n    try { return te.selectionStart != te.selectionEnd; }\n    catch(e) { return false; }\n  } : function(te) {\n    try {var range = te.ownerDocument.selection.createRange();}\n    catch(e) {}\n    if (!range || range.parentElement() != te) return false;\n    return range.compareEndPoints(\"StartToEnd\", range) != 0;\n  };\n\n  CodeMirror.defineMode(\"null\", function() {\n    return {token: function(stream) {stream.skipToEnd();}};\n  });\n  CodeMirror.defineMIME(\"text/plain\", \"null\");\n\n  var keyNames = {3: \"Enter\", 8: \"Backspace\", 9: \"Tab\", 13: \"Enter\", 16: \"Shift\", 17: \"Ctrl\", 18: \"Alt\",\n                  19: \"Pause\", 20: \"CapsLock\", 27: \"Esc\", 32: \"Space\", 33: \"PageUp\", 34: \"PageDown\", 35: \"End\",\n                  36: \"Home\", 37: \"Left\", 38: \"Up\", 39: \"Right\", 40: \"Down\", 44: \"PrintScrn\", 45: \"Insert\",\n                  46: \"Delete\", 59: \";\", 91: \"Mod\", 92: \"Mod\", 93: \"Mod\", 127: \"Delete\", 186: \";\", 187: \"=\", 188: \",\",\n                  189: \"-\", 190: \".\", 191: \"/\", 192: \"`\", 219: \"[\", 220: \"\\\\\", 221: \"]\", 222: \"'\", 63276: \"PageUp\",\n                  63277: \"PageDown\", 63275: \"End\", 63273: \"Home\", 63234: \"Left\", 63232: \"Up\", 63235: \"Right\",\n                  63233: \"Down\", 63302: \"Insert\", 63272: \"Delete\"};\n  CodeMirror.keyNames = keyNames;\n  (function() {\n    // Number keys\n    for (var i = 0; i < 10; i++) keyNames[i + 48] = String(i);\n    // Alphabetic keys\n    for (var i = 65; i <= 90; i++) keyNames[i] = String.fromCharCode(i);\n    // Function keys\n    for (var i = 1; i <= 12; i++) keyNames[i + 111] = keyNames[i + 63235] = \"F\" + i;\n  })();\n\n  return CodeMirror;\n})();\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/lib/util/closetag.js",
    "content": "/**\r\n * Tag-closer extension for CodeMirror.\r\n *\r\n * This extension adds a \"closeTag\" utility function that can be used with key bindings to \r\n * insert a matching end tag after the \">\" character of a start tag has been typed.  It can\r\n * also complete \"</\" if a matching start tag is found.  It will correctly ignore signal\r\n * characters for empty tags, comments, CDATA, etc.\r\n *\r\n * The function depends on internal parser state to identify tags.  It is compatible with the\r\n * following CodeMirror modes and will ignore all others:\r\n * - htmlmixed\r\n * - xml\r\n *\r\n * See demos/closetag.html for a usage example.\r\n * \r\n * @author Nathan Williams <nathan@nlwillia.net>\r\n * Contributed under the same license terms as CodeMirror.\r\n */\r\n(function() {\r\n\t/** Option that allows tag closing behavior to be toggled.  Default is true. */\r\n\tCodeMirror.defaults['closeTagEnabled'] = true;\r\n\t\r\n\t/** Array of tag names to add indentation after the start tag for.  Default is the list of block-level html tags. */\r\n\tCodeMirror.defaults['closeTagIndent'] = ['applet', 'blockquote', 'body', 'button', 'div', 'dl', 'fieldset', 'form', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'html', 'iframe', 'layer', 'legend', 'object', 'ol', 'p', 'select', 'table', 'ul'];\r\n\r\n\t/**\r\n\t * Call during key processing to close tags.  Handles the key event if the tag is closed, otherwise throws CodeMirror.Pass.\r\n\t * - cm: The editor instance.\r\n\t * - ch: The character being processed.\r\n\t * - indent: Optional.  Omit or pass true to use the default indentation tag list defined in the 'closeTagIndent' option.\r\n\t *   Pass false to disable indentation.  Pass an array to override the default list of tag names.\r\n\t */\r\n\tCodeMirror.defineExtension(\"closeTag\", function(cm, ch, indent) {\r\n\t\tif (!cm.getOption('closeTagEnabled')) {\r\n\t\t\tthrow CodeMirror.Pass;\r\n\t\t}\r\n\t\t\r\n\t\tvar mode = cm.getOption('mode');\r\n\t\t\r\n\t\tif (mode == 'text/html') {\r\n\t\t\r\n\t\t\t/*\r\n\t\t\t * Relevant structure of token:\r\n\t\t\t *\r\n\t\t\t * htmlmixed\r\n\t\t\t * \t\tclassName\r\n\t\t\t * \t\tstate\r\n\t\t\t * \t\t\thtmlState\r\n\t\t\t * \t\t\t\ttype\r\n\t\t\t * \t\t\t\tcontext\r\n\t\t\t * \t\t\t\t\ttagName\r\n\t\t\t * \t\t\tmode\r\n\t\t\t * \r\n\t\t\t * xml\r\n\t\t\t * \t\tclassName\r\n\t\t\t * \t\tstate\r\n\t\t\t * \t\t\ttagName\r\n\t\t\t * \t\t\ttype\r\n\t\t\t */\r\n\t\t\r\n\t\t\tvar pos = cm.getCursor();\r\n\t\t\tvar tok = cm.getTokenAt(pos);\r\n\t\t\tvar state = tok.state;\r\n\t\t\t\r\n\t\t\tif (state.mode && state.mode != 'html') {\r\n\t\t\t\tthrow CodeMirror.Pass; // With htmlmixed, we only care about the html sub-mode.\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (ch == '>') {\r\n\t\t\t\tvar type = state.htmlState ? state.htmlState.type : state.type; // htmlmixed : xml\r\n\t\t\t\t\r\n\t\t\t\tif (tok.className == 'tag' && type == 'closeTag') {\r\n\t\t\t\t\tthrow CodeMirror.Pass; // Don't process the '>' at the end of an end-tag.\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\tcm.replaceSelection('>'); // Mode state won't update until we finish the tag.\r\n\t\t\t\tpos = {line: pos.line, ch: pos.ch + 1};\r\n\t\t\t\tcm.setCursor(pos);\r\n\t\t\r\n\t\t\t\ttok = cm.getTokenAt(cm.getCursor());\r\n\t\t\t\tstate = tok.state;\r\n\t\t\t\ttype = state.htmlState ? state.htmlState.type : state.type; // htmlmixed : xml\r\n\r\n\t\t\t\tif (tok.className == 'tag' && type != 'selfcloseTag') {\r\n\t\t\t\t\tvar tagName = state.htmlState ? state.htmlState.context.tagName : state.tagName; // htmlmixed : xml\r\n\t\t\t\t\tif (tagName.length > 0) {\r\n\t\t\t\t\t\tinsertEndTag(cm, indent, pos, tagName);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Undo the '>' insert and allow cm to handle the key instead.\r\n\t\t\t\tcm.setSelection({line: pos.line, ch: pos.ch - 1}, pos);\r\n\t\t\t\tcm.replaceSelection(\"\");\r\n\t\t\t\r\n\t\t\t} else if (ch == '/') {\r\n\t\t\t\tif (tok.className == 'tag' && tok.string == '<') {\r\n\t\t\t\t\tvar tagName = state.htmlState ? (state.htmlState.context ? state.htmlState.context.tagName : '') : state.context.tagName; // htmlmixed : xml # extra htmlmized check is for '</' edge case\r\n\t\t\t\t\tif (tagName.length > 0) {\r\n\t\t\t\t\t\tcompleteEndTag(cm, pos, tagName);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\tthrow CodeMirror.Pass; // Bubble if not handled\r\n\t});\r\n\r\n\tfunction insertEndTag(cm, indent, pos, tagName) {\r\n\t\tif (shouldIndent(cm, indent, tagName)) {\r\n\t\t\tcm.replaceSelection('\\n\\n</' + tagName + '>', 'end');\r\n\t\t\tcm.indentLine(pos.line + 1);\r\n\t\t\tcm.indentLine(pos.line + 2);\r\n\t\t\tcm.setCursor({line: pos.line + 1, ch: cm.getLine(pos.line + 1).length});\r\n\t\t} else {\r\n\t\t\tcm.replaceSelection('</' + tagName + '>');\r\n\t\t\tcm.setCursor(pos);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction shouldIndent(cm, indent, tagName) {\r\n\t\tif (typeof indent == 'undefined' || indent == null || indent == true) {\r\n\t\t\tindent = cm.getOption('closeTagIndent');\r\n\t\t}\r\n\t\tif (!indent) {\r\n\t\t\tindent = [];\r\n\t\t}\r\n\t\treturn indexOf(indent, tagName.toLowerCase()) != -1;\r\n\t}\r\n\t\r\n\t// C&P from codemirror.js...would be nice if this were visible to utilities.\r\n\tfunction indexOf(collection, elt) {\r\n\t\tif (collection.indexOf) return collection.indexOf(elt);\r\n\t\tfor (var i = 0, e = collection.length; i < e; ++i)\r\n\t\t\tif (collection[i] == elt) return i;\r\n\t\treturn -1;\r\n\t}\r\n\r\n\tfunction completeEndTag(cm, pos, tagName) {\r\n\t\tcm.replaceSelection('/' + tagName + '>');\r\n\t\tcm.setCursor({line: pos.line, ch: pos.ch + tagName.length + 2 });\r\n\t}\r\n\t\r\n})();\r\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/lib/util/dialog.css",
    "content": ".CodeMirror-dialog {\n  position: relative;\n}\n\n.CodeMirror-dialog > div {\n  position: absolute;\n  top: 0; left: 0; right: 0;\n  background: white;\n  border-bottom: 1px solid #eee;\n  z-index: 15;\n  padding: .1em .8em;\n  overflow: hidden;\n  color: #333;\n}\n\n.CodeMirror-dialog input {\n  border: none;\n  outline: none;\n  background: transparent;\n  width: 20em;\n  color: inherit;\n  font-family: monospace;\n}\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/lib/util/dialog.js",
    "content": "// Open simple dialogs on top of an editor. Relies on dialog.css.\n\n(function() {\n  function dialogDiv(cm, template) {\n    var wrap = cm.getWrapperElement();\n    var dialog = wrap.insertBefore(document.createElement(\"div\"), wrap.firstChild);\n    dialog.className = \"CodeMirror-dialog\";\n    dialog.innerHTML = '<div>' + template + '</div>';\n    return dialog;\n  }\n\n  CodeMirror.defineExtension(\"openDialog\", function(template, callback) {\n    var dialog = dialogDiv(this, template);\n    var closed = false, me = this;\n    function close() {\n      if (closed) return;\n      closed = true;\n      dialog.parentNode.removeChild(dialog);\n    }\n    var inp = dialog.getElementsByTagName(\"input\")[0];\n    if (inp) {\n      CodeMirror.connect(inp, \"keydown\", function(e) {\n        if (e.keyCode == 13 || e.keyCode == 27) {\n          CodeMirror.e_stop(e);\n          close();\n          me.focus();\n          if (e.keyCode == 13) callback(inp.value);\n        }\n      });\n      inp.focus();\n      CodeMirror.connect(inp, \"blur\", close);\n    }\n    return close;\n  });\n\n  CodeMirror.defineExtension(\"openConfirm\", function(template, callbacks) {\n    var dialog = dialogDiv(this, template);\n    var buttons = dialog.getElementsByTagName(\"button\");\n    var closed = false, me = this, blurring = 1;\n    function close() {\n      if (closed) return;\n      closed = true;\n      dialog.parentNode.removeChild(dialog);\n      me.focus();\n    }\n    buttons[0].focus();\n    for (var i = 0; i < buttons.length; ++i) {\n      var b = buttons[i];\n      (function(callback) {\n        CodeMirror.connect(b, \"click\", function(e) {\n          CodeMirror.e_preventDefault(e);\n          close();\n          if (callback) callback(me);\n        });\n      })(callbacks[i]);\n      CodeMirror.connect(b, \"blur\", function() {\n        --blurring;\n        setTimeout(function() { if (blurring <= 0) close(); }, 200);\n      });\n      CodeMirror.connect(b, \"focus\", function() { ++blurring; });\n    }\n  });\n})();"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/lib/util/foldcode.js",
    "content": "// the tagRangeFinder function is\n//   Copyright (C) 2011 by Daniel Glazman <daniel@glazman.org>\n// released under the MIT license (../../LICENSE) like the rest of CodeMirror\nCodeMirror.tagRangeFinder = function(cm, line, hideEnd) {\n  var nameStartChar = \"A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n  var nameChar = nameStartChar + \"\\-\\.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\n  var xmlNAMERegExp = new RegExp(\"^[\" + nameStartChar + \"][\" + nameChar + \"]*\");\n\n  var lineText = cm.getLine(line);\n  var found = false;\n  var tag = null;\n  var pos = 0;\n  while (!found) {\n    pos = lineText.indexOf(\"<\", pos);\n    if (-1 == pos) // no tag on line\n      return;\n    if (pos + 1 < lineText.length && lineText[pos + 1] == \"/\") { // closing tag\n      pos++;\n      continue;\n    }\n    // ok we weem to have a start tag\n    if (!lineText.substr(pos + 1).match(xmlNAMERegExp)) { // not a tag name...\n      pos++;\n      continue;\n    }\n    var gtPos = lineText.indexOf(\">\", pos + 1);\n    if (-1 == gtPos) { // end of start tag not in line\n      var l = line + 1;\n      var foundGt = false;\n      var lastLine = cm.lineCount();\n      while (l < lastLine && !foundGt) {\n        var lt = cm.getLine(l);\n        var gt = lt.indexOf(\">\");\n        if (-1 != gt) { // found a >\n          foundGt = true;\n          var slash = lt.lastIndexOf(\"/\", gt);\n          if (-1 != slash && slash < gt) {\n            var str = lineText.substr(slash, gt - slash + 1);\n            if (!str.match( /\\/\\s*\\>/ )) { // yep, that's the end of empty tag\n              if (hideEnd === true) l++;\n              return l;\n            }\n          }\n        }\n        l++;\n      }\n      found = true;\n    }\n    else {\n      var slashPos = lineText.lastIndexOf(\"/\", gtPos);\n      if (-1 == slashPos) { // cannot be empty tag\n        found = true;\n        // don't continue\n      }\n      else { // empty tag?\n        // check if really empty tag\n        var str = lineText.substr(slashPos, gtPos - slashPos + 1);\n        if (!str.match( /\\/\\s*\\>/ )) { // finally not empty\n          found = true;\n          // don't continue\n        }\n      }\n    }\n    if (found) {\n      var subLine = lineText.substr(pos + 1);\n      tag = subLine.match(xmlNAMERegExp);\n      if (tag) {\n        // we have an element name, wooohooo !\n        tag = tag[0];\n        // do we have the close tag on same line ???\n        if (-1 != lineText.indexOf(\"</\" + tag + \">\", pos)) // yep\n        {\n          found = false;\n        }\n        // we don't, so we have a candidate...\n      }\n      else\n        found = false;\n    }\n    if (!found)\n      pos++;\n  }\n\n  if (found) {\n    var startTag = \"(\\\\<\\\\/\" + tag + \"\\\\>)|(\\\\<\" + tag + \"\\\\>)|(\\\\<\" + tag + \"\\\\s)|(\\\\<\" + tag + \"$)\";\n    var startTagRegExp = new RegExp(startTag, \"g\");\n    var endTag = \"</\" + tag + \">\";\n    var depth = 1;\n    var l = line + 1;\n    var lastLine = cm.lineCount();\n    while (l < lastLine) {\n      lineText = cm.getLine(l);\n      var match = lineText.match(startTagRegExp);\n      if (match) {\n        for (var i = 0; i < match.length; i++) {\n          if (match[i] == endTag)\n            depth--;\n          else\n            depth++;\n          if (!depth) {\n            if (hideEnd === true) l++;\n            return l;\n          }\n        }\n      }\n      l++;\n    }\n    return;\n  }\n};\n\nCodeMirror.braceRangeFinder = function(cm, line, hideEnd) {\n  var lineText = cm.getLine(line);\n  var startChar = lineText.lastIndexOf(\"{\");\n  if (startChar < 0 || lineText.lastIndexOf(\"}\") > startChar) return;\n  var tokenType = cm.getTokenAt({line: line, ch: startChar}).className;\n  var count = 1, lastLine = cm.lineCount(), end;\n  outer: for (var i = line + 1; i < lastLine; ++i) {\n    var text = cm.getLine(i), pos = 0;\n    for (;;) {\n      var nextOpen = text.indexOf(\"{\", pos), nextClose = text.indexOf(\"}\", pos);\n      if (nextOpen < 0) nextOpen = text.length;\n      if (nextClose < 0) nextClose = text.length;\n      pos = Math.min(nextOpen, nextClose);\n      if (pos == text.length) break;\n      if (cm.getTokenAt({line: i, ch: pos + 1}).className == tokenType) {\n        if (pos == nextOpen) ++count;\n        else if (!--count) { end = i; break outer; }\n      }\n      ++pos;\n    }\n  }\n  if (end == null || end == line + 1) return;\n  if (hideEnd === true) end++;\n  return end;\n};\n\nCodeMirror.indentRangeFinder = function(cm, line) {\n  var tabSize = cm.getOption(\"tabSize\");\n  var myIndent = cm.getLineHandle(line).indentation(tabSize), last;\n  for (var i = line + 1, end = cm.lineCount(); i < end; ++i) {\n    var handle = cm.getLineHandle(i);\n    if (!/^\\s*$/.test(handle.text)) {\n      if (handle.indentation(tabSize) <= myIndent) break;\n      last = i;\n    }\n  }\n  if (!last) return null;\n  return last + 1;\n};\n\nCodeMirror.newFoldFunction = function(rangeFinder, markText, hideEnd) {\n  var folded = [];\n  if (markText == null) markText = '<div style=\"position: absolute; left: 2px; color:#600\">&#x25bc;</div>%N%';\n\n  function isFolded(cm, n) {\n    for (var i = 0; i < folded.length; ++i) {\n      var start = cm.lineInfo(folded[i].start);\n      if (!start) folded.splice(i--, 1);\n      else if (start.line == n) return {pos: i, region: folded[i]};\n    }\n  }\n\n  function expand(cm, region) {\n    cm.clearMarker(region.start);\n    for (var i = 0; i < region.hidden.length; ++i)\n      cm.showLine(region.hidden[i]);\n  }\n\n  return function(cm, line) {\n    cm.operation(function() {\n      var known = isFolded(cm, line);\n      if (known) {\n        folded.splice(known.pos, 1);\n        expand(cm, known.region);\n      } else {\n        var end = rangeFinder(cm, line, hideEnd);\n        if (end == null) return;\n        var hidden = [];\n        for (var i = line + 1; i < end; ++i) {\n          var handle = cm.hideLine(i);\n          if (handle) hidden.push(handle);\n        }\n        var first = cm.setMarker(line, markText);\n        var region = {start: first, hidden: hidden};\n        cm.onDeleteLine(first, function() { expand(cm, region); });\n        folded.push(region);\n      }\n    });\n  };\n};\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/lib/util/formatting.js",
    "content": "// ============== Formatting extensions ============================\n// A common storage for all mode-specific formatting features\nif (!CodeMirror.modeExtensions) CodeMirror.modeExtensions = {};\n\n// Returns the extension of the editor's current mode\nCodeMirror.defineExtension(\"getModeExt\", function () {\n  var mname = CodeMirror.resolveMode(this.getOption(\"mode\")).name;\n  var ext = CodeMirror.modeExtensions[mname];\n  if (!ext) throw new Error(\"No extensions found for mode \" + mname);\n  return ext;\n});\n\n// If the current mode is 'htmlmixed', returns the extension of a mode located at\n// the specified position (can be htmlmixed, css or javascript). Otherwise, simply\n// returns the extension of the editor's current mode.\nCodeMirror.defineExtension(\"getModeExtAtPos\", function (pos) {\n  var token = this.getTokenAt(pos);\n  if (token && token.state && token.state.mode)\n    return CodeMirror.modeExtensions[token.state.mode == \"html\" ? \"htmlmixed\" : token.state.mode];\n  else\n    return this.getModeExt();\n});\n\n// Comment/uncomment the specified range\nCodeMirror.defineExtension(\"commentRange\", function (isComment, from, to) {\n  var curMode = this.getModeExtAtPos(this.getCursor());\n  if (isComment) { // Comment range\n    var commentedText = this.getRange(from, to);\n    this.replaceRange(curMode.commentStart + this.getRange(from, to) + curMode.commentEnd\n      , from, to);\n    if (from.line == to.line && from.ch == to.ch) { // An empty comment inserted - put cursor inside\n      this.setCursor(from.line, from.ch + curMode.commentStart.length);\n    }\n  }\n  else { // Uncomment range\n    var selText = this.getRange(from, to);\n    var startIndex = selText.indexOf(curMode.commentStart);\n    var endIndex = selText.lastIndexOf(curMode.commentEnd);\n    if (startIndex > -1 && endIndex > -1 && endIndex > startIndex) {\n      // Take string till comment start\n      selText = selText.substr(0, startIndex)\n      // From comment start till comment end\n        + selText.substring(startIndex + curMode.commentStart.length, endIndex)\n      // From comment end till string end\n        + selText.substr(endIndex + curMode.commentEnd.length);\n    }\n    this.replaceRange(selText, from, to);\n  }\n});\n\n// Applies automatic mode-aware indentation to the specified range\nCodeMirror.defineExtension(\"autoIndentRange\", function (from, to) {\n  var cmInstance = this;\n  this.operation(function () {\n    for (var i = from.line; i <= to.line; i++) {\n      cmInstance.indentLine(i, \"smart\");\n    }\n  });\n});\n\n// Applies automatic formatting to the specified range\nCodeMirror.defineExtension(\"autoFormatRange\", function (from, to) {\n  var absStart = this.indexFromPos(from);\n  var absEnd = this.indexFromPos(to);\n  // Insert additional line breaks where necessary according to the\n  // mode's syntax\n  var res = this.getModeExt().autoFormatLineBreaks(this.getValue(), absStart, absEnd);\n  var cmInstance = this;\n\n  // Replace and auto-indent the range\n  this.operation(function () {\n    cmInstance.replaceRange(res, from, to);\n    var startLine = cmInstance.posFromIndex(absStart).line;\n    var endLine = cmInstance.posFromIndex(absStart + res.length).line;\n    for (var i = startLine; i <= endLine; i++) {\n      cmInstance.indentLine(i, \"smart\");\n    }\n  });\n});\n\n// Define extensions for a few modes\n\nCodeMirror.modeExtensions[\"css\"] = {\n  commentStart: \"/*\",\n  commentEnd: \"*/\",\n  wordWrapChars: [\";\", \"\\\\{\", \"\\\\}\"],\n  autoFormatLineBreaks: function (text) {\n    return text.replace(new RegExp(\"(;|\\\\{|\\\\})([^\\r\\n])\", \"g\"), \"$1\\n$2\");\n  }\n};\n\nCodeMirror.modeExtensions[\"javascript\"] = {\n  commentStart: \"/*\",\n  commentEnd: \"*/\",\n  wordWrapChars: [\";\", \"\\\\{\", \"\\\\}\"],\n\n  getNonBreakableBlocks: function (text) {\n    var nonBreakableRegexes = [\n        new RegExp(\"for\\\\s*?\\\\(([\\\\s\\\\S]*?)\\\\)\"),\n        new RegExp(\"'([\\\\s\\\\S]*?)('|$)\"),\n        new RegExp(\"\\\"([\\\\s\\\\S]*?)(\\\"|$)\"),\n        new RegExp(\"//.*([\\r\\n]|$)\")\n      ];\n    var nonBreakableBlocks = new Array();\n    for (var i = 0; i < nonBreakableRegexes.length; i++) {\n      var curPos = 0;\n      while (curPos < text.length) {\n        var m = text.substr(curPos).match(nonBreakableRegexes[i]);\n        if (m != null) {\n          nonBreakableBlocks.push({\n            start: curPos + m.index,\n            end: curPos + m.index + m[0].length\n          });\n          curPos += m.index + Math.max(1, m[0].length);\n        }\n        else { // No more matches\n          break;\n        }\n      }\n    }\n    nonBreakableBlocks.sort(function (a, b) {\n      return a.start - b.start;\n    });\n\n    return nonBreakableBlocks;\n  },\n\n  autoFormatLineBreaks: function (text) {\n    var curPos = 0;\n    var reLinesSplitter = new RegExp(\"(;|\\\\{|\\\\})([^\\r\\n])\", \"g\");\n    var nonBreakableBlocks = this.getNonBreakableBlocks(text);\n    if (nonBreakableBlocks != null) {\n      var res = \"\";\n      for (var i = 0; i < nonBreakableBlocks.length; i++) {\n        if (nonBreakableBlocks[i].start > curPos) { // Break lines till the block\n          res += text.substring(curPos, nonBreakableBlocks[i].start).replace(reLinesSplitter, \"$1\\n$2\");\n          curPos = nonBreakableBlocks[i].start;\n        }\n        if (nonBreakableBlocks[i].start <= curPos\n          && nonBreakableBlocks[i].end >= curPos) { // Skip non-breakable block\n          res += text.substring(curPos, nonBreakableBlocks[i].end);\n          curPos = nonBreakableBlocks[i].end;\n        }\n      }\n      if (curPos < text.length - 1) {\n        res += text.substr(curPos).replace(reLinesSplitter, \"$1\\n$2\");\n      }\n      return res;\n    }\n    else {\n      return text.replace(reLinesSplitter, \"$1\\n$2\");\n    }\n  }\n};\n\nCodeMirror.modeExtensions[\"xml\"] = {\n  commentStart: \"<!--\",\n  commentEnd: \"-->\",\n  wordWrapChars: [\">\"],\n\n  autoFormatLineBreaks: function (text) {\n    var lines = text.split(\"\\n\");\n    var reProcessedPortion = new RegExp(\"(^\\\\s*?<|^[^<]*?)(.+)(>\\\\s*?$|[^>]*?$)\");\n    var reOpenBrackets = new RegExp(\"<\", \"g\");\n    var reCloseBrackets = new RegExp(\"(>)([^\\r\\n])\", \"g\");\n    for (var i = 0; i < lines.length; i++) {\n      var mToProcess = lines[i].match(reProcessedPortion);\n      if (mToProcess != null && mToProcess.length > 3) { // The line starts with whitespaces and ends with whitespaces\n        lines[i] = mToProcess[1]\n            + mToProcess[2].replace(reOpenBrackets, \"\\n$&\").replace(reCloseBrackets, \"$1\\n$2\")\n            + mToProcess[3];\n        continue;\n      }\n    }\n\n    return lines.join(\"\\n\");\n  }\n};\n\nCodeMirror.modeExtensions[\"htmlmixed\"] = {\n  commentStart: \"<!--\",\n  commentEnd: \"-->\",\n  wordWrapChars: [\">\", \";\", \"\\\\{\", \"\\\\}\"],\n\n  getModeInfos: function (text, absPos) {\n    var modeInfos = new Array();\n    modeInfos[0] =\n      {\n        pos: 0,\n        modeExt: CodeMirror.modeExtensions[\"xml\"],\n        modeName: \"xml\"\n      };\n\n    var modeMatchers = new Array();\n    modeMatchers[0] =\n      {\n        regex: new RegExp(\"<style[^>]*>([\\\\s\\\\S]*?)(</style[^>]*>|$)\", \"i\"),\n        modeExt: CodeMirror.modeExtensions[\"css\"],\n        modeName: \"css\"\n      };\n    modeMatchers[1] =\n      {\n        regex: new RegExp(\"<script[^>]*>([\\\\s\\\\S]*?)(</script[^>]*>|$)\", \"i\"),\n        modeExt: CodeMirror.modeExtensions[\"javascript\"],\n        modeName: \"javascript\"\n      };\n\n    var lastCharPos = (typeof (absPos) !== \"undefined\" ? absPos : text.length - 1);\n    // Detect modes for the entire text\n    for (var i = 0; i < modeMatchers.length; i++) {\n      var curPos = 0;\n      while (curPos <= lastCharPos) {\n        var m = text.substr(curPos).match(modeMatchers[i].regex);\n        if (m != null) {\n          if (m.length > 1 && m[1].length > 0) {\n            // Push block begin pos\n            var blockBegin = curPos + m.index + m[0].indexOf(m[1]);\n            modeInfos.push(\n              {\n                pos: blockBegin,\n                modeExt: modeMatchers[i].modeExt,\n                modeName: modeMatchers[i].modeName\n              });\n            // Push block end pos\n            modeInfos.push(\n              {\n                pos: blockBegin + m[1].length,\n                modeExt: modeInfos[0].modeExt,\n                modeName: modeInfos[0].modeName\n              });\n            curPos += m.index + m[0].length;\n            continue;\n          }\n          else {\n            curPos += m.index + Math.max(m[0].length, 1);\n          }\n        }\n        else { // No more matches\n          break;\n        }\n      }\n    }\n    // Sort mode infos\n    modeInfos.sort(function sortModeInfo(a, b) {\n      return a.pos - b.pos;\n    });\n\n    return modeInfos;\n  },\n\n  autoFormatLineBreaks: function (text, startPos, endPos) {\n    var modeInfos = this.getModeInfos(text);\n    var reBlockStartsWithNewline = new RegExp(\"^\\\\s*?\\n\");\n    var reBlockEndsWithNewline = new RegExp(\"\\n\\\\s*?$\");\n    var res = \"\";\n    // Use modes info to break lines correspondingly\n    if (modeInfos.length > 1) { // Deal with multi-mode text\n      for (var i = 1; i <= modeInfos.length; i++) {\n        var selStart = modeInfos[i - 1].pos;\n        var selEnd = (i < modeInfos.length ? modeInfos[i].pos : endPos);\n\n        if (selStart >= endPos) { // The block starts later than the needed fragment\n          break;\n        }\n        if (selStart < startPos) {\n          if (selEnd <= startPos) { // The block starts earlier than the needed fragment\n            continue;\n          }\n          selStart = startPos;\n        }\n        if (selEnd > endPos) {\n          selEnd = endPos;\n        }\n        var textPortion = text.substring(selStart, selEnd);\n        if (modeInfos[i - 1].modeName != \"xml\") { // Starting a CSS or JavaScript block\n          if (!reBlockStartsWithNewline.test(textPortion)\n              && selStart > 0) { // The block does not start with a line break\n            textPortion = \"\\n\" + textPortion;\n          }\n          if (!reBlockEndsWithNewline.test(textPortion)\n              && selEnd < text.length - 1) { // The block does not end with a line break\n            textPortion += \"\\n\";\n          }\n        }\n        res += modeInfos[i - 1].modeExt.autoFormatLineBreaks(textPortion);\n      }\n    }\n    else { // Single-mode text\n      res = modeInfos[0].modeExt.autoFormatLineBreaks(text.substring(startPos, endPos));\n    }\n\n    return res;\n  }\n};\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/lib/util/javascript-hint.js",
    "content": "(function () {\n  function forEach(arr, f) {\n    for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]);\n  }\n  \n  function arrayContains(arr, item) {\n    if (!Array.prototype.indexOf) {\n      var i = arr.length;\n      while (i--) {\n        if (arr[i] === item) {\n          return true;\n        }\n      }\n      return false;\n    }\n    return arr.indexOf(item) != -1;\n  }\n\n  function scriptHint(editor, keywords, getToken) {\n    // Find the token at the cursor\n    var cur = editor.getCursor(), token = getToken(editor, cur), tprop = token;\n    // If it's not a 'word-style' token, ignore the token.\n\t\tif (!/^[\\w$_]*$/.test(token.string)) {\n      token = tprop = {start: cur.ch, end: cur.ch, string: \"\", state: token.state,\n                       className: token.string == \".\" ? \"property\" : null};\n    }\n    // If it is a property, find out what it is a property of.\n    while (tprop.className == \"property\") {\n      tprop = getToken(editor, {line: cur.line, ch: tprop.start});\n      if (tprop.string != \".\") return;\n      tprop = getToken(editor, {line: cur.line, ch: tprop.start});\n      if (tprop.string == ')') {\n        var level = 1;\n        do {\n          tprop = getToken(editor, {line: cur.line, ch: tprop.start});\n          switch (tprop.string) {\n          case ')': level++; break;\n          case '(': level--; break;\n          default: break;\n          }\n        } while (level > 0)\n        tprop = getToken(editor, {line: cur.line, ch: tprop.start});\n\t\t\t\tif (tprop.className == 'variable')\n\t\t\t\t\ttprop.className = 'function';\n\t\t\t\telse return; // no clue\n      }\n      if (!context) var context = [];\n      context.push(tprop);\n    }\n    return {list: getCompletions(token, context, keywords),\n            from: {line: cur.line, ch: token.start},\n            to: {line: cur.line, ch: token.end}};\n  }\n\n  CodeMirror.javascriptHint = function(editor) {\n    return scriptHint(editor, javascriptKeywords,\n                      function (e, cur) {return e.getTokenAt(cur);});\n  }\n\n  function getCoffeeScriptToken(editor, cur) {\n  // This getToken, it is for coffeescript, imitates the behavior of\n  // getTokenAt method in javascript.js, that is, returning \"property\"\n  // type and treat \".\" as indepenent token.\n    var token = editor.getTokenAt(cur);\n    if (cur.ch == token.start + 1 && token.string.charAt(0) == '.') {\n      token.end = token.start;\n      token.string = '.';\n      token.className = \"property\";\n    }\n    else if (/^\\.[\\w$_]*$/.test(token.string)) {\n      token.className = \"property\";\n      token.start++;\n      token.string = token.string.replace(/\\./, '');\n    }\n    return token;\n  }\n\n  CodeMirror.coffeescriptHint = function(editor) {\n    return scriptHint(editor, coffeescriptKeywords, getCoffeeScriptToken);\n  }\n\n  var stringProps = (\"charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight \" +\n                     \"toUpperCase toLowerCase split concat match replace search\").split(\" \");\n  var arrayProps = (\"length concat join splice push pop shift unshift slice reverse sort indexOf \" +\n                    \"lastIndexOf every some filter forEach map reduce reduceRight \").split(\" \");\n  var funcProps = \"prototype apply call bind\".split(\" \");\n  var javascriptKeywords = (\"break case catch continue debugger default delete do else false finally for function \" +\n                  \"if in instanceof new null return switch throw true try typeof var void while with\").split(\" \");\n  var coffeescriptKeywords = (\"and break catch class continue delete do else extends false finally for \" +\n                  \"if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes\").split(\" \");\n\n  function getCompletions(token, context, keywords) {\n    var found = [], start = token.string;\n    function maybeAdd(str) {\n      if (str.indexOf(start) == 0 && !arrayContains(found, str)) found.push(str);\n    }\n    function gatherCompletions(obj) {\n      if (typeof obj == \"string\") forEach(stringProps, maybeAdd);\n      else if (obj instanceof Array) forEach(arrayProps, maybeAdd);\n      else if (obj instanceof Function) forEach(funcProps, maybeAdd);\n      for (var name in obj) maybeAdd(name);\n    }\n\n    if (context) {\n      // If this is a property, see if it belongs to some object we can\n      // find in the current environment.\n      var obj = context.pop(), base;\n      if (obj.className == \"variable\")\n        base = window[obj.string];\n      else if (obj.className == \"string\")\n        base = \"\";\n      else if (obj.className == \"atom\")\n        base = 1;\n      else if (obj.className == \"function\") {\n        if (window.jQuery != null && (obj.string == '$' || obj.string == 'jQuery') &&\n            (typeof window.jQuery == 'function'))\n          base = window.jQuery();\n        else if (window._ != null && (obj.string == '_') && (typeof window._ == 'function'))\n          base = window._();\n      }\n      while (base != null && context.length)\n        base = base[context.pop().string];\n      if (base != null) gatherCompletions(base);\n    }\n    else {\n      // If not, just look in the window object and any local scope\n      // (reading into JS mode internals to get at the local variables)\n      for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);\n      gatherCompletions(window);\n      forEach(keywords, maybeAdd);\n    }\n    return found;\n  }\n})();\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/lib/util/loadmode.js",
    "content": "(function() {\n  if (!CodeMirror.modeURL) CodeMirror.modeURL = \"../mode/%N/%N.js\";\n\n  var loading = {};\n  function splitCallback(cont, n) {\n    var countDown = n;\n    return function() { if (--countDown == 0) cont(); }\n  }\n  function ensureDeps(mode, cont) {\n    var deps = CodeMirror.modes[mode].dependencies;\n    if (!deps) return cont();\n    var missing = [];\n    for (var i = 0; i < deps.length; ++i) {\n      if (!CodeMirror.modes.hasOwnProperty(deps[i]))\n        missing.push(deps[i]);\n    }\n    if (!missing.length) return cont();\n    var split = splitCallback(cont, missing.length);\n    for (var i = 0; i < missing.length; ++i)\n      CodeMirror.requireMode(missing[i], split);\n  }\n\n  CodeMirror.requireMode = function(mode, cont) {\n    if (typeof mode != \"string\") mode = mode.name;\n    if (CodeMirror.modes.hasOwnProperty(mode)) return ensureDeps(mode, cont);\n    if (loading.hasOwnProperty(mode)) return loading[mode].push(cont);\n\n    var script = document.createElement(\"script\");\n    script.src = CodeMirror.modeURL.replace(/%N/g, mode);\n    var others = document.getElementsByTagName(\"script\")[0];\n    others.parentNode.insertBefore(script, others);\n    var list = loading[mode] = [cont];\n    var count = 0, poll = setInterval(function() {\n      if (++count > 100) return clearInterval(poll);\n      if (CodeMirror.modes.hasOwnProperty(mode)) {\n        clearInterval(poll);\n        loading[mode] = null;\n        ensureDeps(mode, function() {\n          for (var i = 0; i < list.length; ++i) list[i]();\n        });\n      }\n    }, 200);\n  };\n\n  CodeMirror.autoLoadMode = function(instance, mode) {\n    if (!CodeMirror.modes.hasOwnProperty(mode))\n      CodeMirror.requireMode(mode, function() {\n        instance.setOption(\"mode\", instance.getOption(\"mode\"));\n      });\n  };\n}());\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/lib/util/match-highlighter.js",
    "content": "// Define match-highlighter commands. Depends on searchcursor.js\n// Use by attaching the following function call to the onCursorActivity event:\n\t//myCodeMirror.matchHighlight(minChars);\n// And including a special span.CodeMirror-matchhighlight css class (also optionally a separate one for .CodeMirror-focused -- see demo matchhighlighter.html)\n\n(function() {\n  var DEFAULT_MIN_CHARS = 2;\n  \n  function MatchHighlightState() {\n\tthis.marked = [];\n  }\n  function getMatchHighlightState(cm) {\n\treturn cm._matchHighlightState || (cm._matchHighlightState = new MatchHighlightState());\n  }\n  \n  function clearMarks(cm) {\n\tvar state = getMatchHighlightState(cm);\n\tfor (var i = 0; i < state.marked.length; ++i)\n\t\tstate.marked[i].clear();\n\tstate.marked = [];\n  }\n  \n  function markDocument(cm, className, minChars) {\n    clearMarks(cm);\n\tminChars = (typeof minChars !== 'undefined' ? minChars : DEFAULT_MIN_CHARS);\n\tif (cm.somethingSelected() && cm.getSelection().replace(/^\\s+|\\s+$/g, \"\").length >= minChars) {\n\t\tvar state = getMatchHighlightState(cm);\n\t\tvar query = cm.getSelection();\n\t\tcm.operation(function() {\n\t\t\tif (cm.lineCount() < 2000) { // This is too expensive on big documents.\n\t\t\t  for (var cursor = cm.getSearchCursor(query); cursor.findNext();) {\n\t\t\t\t//Only apply matchhighlight to the matches other than the one actually selected\n\t\t\t\tif (!(cursor.from().line === cm.getCursor(true).line && cursor.from().ch === cm.getCursor(true).ch))\n\t\t\t\t\tstate.marked.push(cm.markText(cursor.from(), cursor.to(), className));\n\t\t\t  }\n\t\t\t}\n\t\t  });\n\t}\n  }\n\n  CodeMirror.defineExtension(\"matchHighlight\", function(className, minChars) {\n    markDocument(this, className, minChars);\n  });\n})();\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/lib/util/overlay.js",
    "content": "// Utility function that allows modes to be combined. The mode given\n// as the base argument takes care of most of the normal mode\n// functionality, but a second (typically simple) mode is used, which\n// can override the style of text. Both modes get to parse all of the\n// text, but when both assign a non-null style to a piece of code, the\n// overlay wins, unless the combine argument was true, in which case\n// the styles are combined.\n\nCodeMirror.overlayParser = function(base, overlay, combine) {\n  return {\n    startState: function() {\n      return {\n        base: CodeMirror.startState(base),\n        overlay: CodeMirror.startState(overlay),\n        basePos: 0, baseCur: null,\n        overlayPos: 0, overlayCur: null\n      };\n    },\n    copyState: function(state) {\n      return {\n        base: CodeMirror.copyState(base, state.base),\n        overlay: CodeMirror.copyState(overlay, state.overlay),\n        basePos: state.basePos, baseCur: null,\n        overlayPos: state.overlayPos, overlayCur: null\n      };\n    },\n\n    token: function(stream, state) {\n      if (stream.start == state.basePos) {\n        state.baseCur = base.token(stream, state.base);\n        state.basePos = stream.pos;\n      }\n      if (stream.start == state.overlayPos) {\n        stream.pos = stream.start;\n        state.overlayCur = overlay.token(stream, state.overlay);\n        state.overlayPos = stream.pos;\n      }\n      stream.pos = Math.min(state.basePos, state.overlayPos);\n      if (stream.eol()) state.basePos = state.overlayPos = 0;\n\n      if (state.overlayCur == null) return state.baseCur;\n      if (state.baseCur != null && combine) return state.baseCur + \" \" + state.overlayCur;\n      else return state.overlayCur;\n    },\n    \n    indent: base.indent && function(state, textAfter) {\n      return base.indent(state.base, textAfter);\n    },\n    electricChars: base.electricChars\n  };\n};\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/lib/util/runmode.js",
    "content": "CodeMirror.runMode = function(string, modespec, callback, options) {\n  var mode = CodeMirror.getMode(CodeMirror.defaults, modespec);\n  var isNode = callback.nodeType == 1;\n  var tabSize = (options && options.tabSize) || CodeMirror.defaults.tabSize;\n  if (isNode) {\n    var node = callback, accum = [], col = 0;\n    callback = function(text, style) {\n      if (text == \"\\n\") {\n        accum.push(\"<br>\");\n        col = 0;\n        return;\n      }\n      var escaped = \"\";\n      // HTML-escape and replace tabs\n      for (var pos = 0;;) {\n        var idx = text.indexOf(\"\\t\", pos);\n        if (idx == -1) {\n          escaped += CodeMirror.htmlEscape(text.slice(pos));\n          col += text.length - pos;\n          break;\n        } else {\n          col += idx - pos;\n          escaped += CodeMirror.htmlEscape(text.slice(pos, idx));\n          var size = tabSize - col % tabSize;\n          col += size;\n          for (var i = 0; i < size; ++i) escaped += \" \";\n          pos = idx + 1;\n        }\n      }\n\n      if (style) \n        accum.push(\"<span class=\\\"cm-\" + CodeMirror.htmlEscape(style) + \"\\\">\" + escaped + \"</span>\");\n      else\n        accum.push(escaped);\n    }\n  }\n  var lines = CodeMirror.splitLines(string), state = CodeMirror.startState(mode);\n  for (var i = 0, e = lines.length; i < e; ++i) {\n    if (i) callback(\"\\n\");\n    var stream = new CodeMirror.StringStream(lines[i]);\n    while (!stream.eol()) {\n      var style = mode.token(stream, state);\n      callback(stream.current(), style, i, stream.start);\n      stream.start = stream.pos;\n    }\n  }\n  if (isNode)\n    node.innerHTML = accum.join(\"\");\n};\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/lib/util/search.js",
    "content": "// Define search commands. Depends on dialog.js or another\n// implementation of the openDialog method.\n\n// Replace works a little oddly -- it will do the replace on the next\n// Ctrl-G (or whatever is bound to findNext) press. You prevent a\n// replace by making sure the match is no longer selected when hitting\n// Ctrl-G.\n\n(function() {\n  function SearchState() {\n    this.posFrom = this.posTo = this.query = null;\n    this.marked = [];\n  }\n  function getSearchState(cm) {\n    return cm._searchState || (cm._searchState = new SearchState());\n  }\n  function dialog(cm, text, shortText, f) {\n    if (cm.openDialog) cm.openDialog(text, f);\n    else f(prompt(shortText, \"\"));\n  }\n  function confirmDialog(cm, text, shortText, fs) {\n    if (cm.openConfirm) cm.openConfirm(text, fs);\n    else if (confirm(shortText)) fs[0]();\n  }\n  function parseQuery(query) {\n    var isRE = query.match(/^\\/(.*)\\/$/);\n    return isRE ? new RegExp(isRE[1]) : query;\n  }\n  var queryDialog =\n    'Search: <input type=\"text\" style=\"width: 10em\"/> <span style=\"color: #888\">(Use /re/ syntax for regexp search)</span>';\n  function doSearch(cm, rev) {\n    var state = getSearchState(cm);\n    if (state.query) return findNext(cm, rev);\n    dialog(cm, queryDialog, \"Search for:\", function(query) {\n      cm.operation(function() {\n        if (!query || state.query) return;\n        state.query = parseQuery(query);\n        if (cm.lineCount() < 2000) { // This is too expensive on big documents.\n          for (var cursor = cm.getSearchCursor(query); cursor.findNext();)\n            state.marked.push(cm.markText(cursor.from(), cursor.to(), \"CodeMirror-searching\"));\n        }\n        state.posFrom = state.posTo = cm.getCursor();\n        findNext(cm, rev);\n      });\n    });\n  }\n  function findNext(cm, rev) {cm.operation(function() {\n    var state = getSearchState(cm);\n    var cursor = cm.getSearchCursor(state.query, rev ? state.posFrom : state.posTo);\n    if (!cursor.find(rev)) {\n      cursor = cm.getSearchCursor(state.query, rev ? {line: cm.lineCount() - 1} : {line: 0, ch: 0});\n      if (!cursor.find(rev)) return;\n    }\n    cm.setSelection(cursor.from(), cursor.to());\n    state.posFrom = cursor.from(); state.posTo = cursor.to();\n  })}\n  function clearSearch(cm) {cm.operation(function() {\n    var state = getSearchState(cm);\n    if (!state.query) return;\n    state.query = null;\n    for (var i = 0; i < state.marked.length; ++i) state.marked[i].clear();\n    state.marked.length = 0;\n  })}\n\n  var replaceQueryDialog =\n    'Replace: <input type=\"text\" style=\"width: 10em\"/> <span style=\"color: #888\">(Use /re/ syntax for regexp search)</span>';\n  var replacementQueryDialog = 'With: <input type=\"text\" style=\"width: 10em\"/>';\n  var doReplaceConfirm = \"Replace? <button>Yes</button> <button>No</button> <button>Stop</button>\";\n  function replace(cm, all) {\n    dialog(cm, replaceQueryDialog, \"Replace:\", function(query) {\n      if (!query) return;\n      query = parseQuery(query);\n      dialog(cm, replacementQueryDialog, \"Replace with:\", function(text) {\n        if (all) {\n          cm.compoundChange(function() { cm.operation(function() {\n            for (var cursor = cm.getSearchCursor(query); cursor.findNext();) {\n              if (typeof query != \"string\") {\n                var match = cm.getRange(cursor.from(), cursor.to()).match(query);\n                cursor.replace(text.replace(/\\$(\\d)/, function(w, i) {return match[i];}));\n              } else cursor.replace(text);\n            }\n          })});\n        } else {\n          clearSearch(cm);\n          var cursor = cm.getSearchCursor(query, cm.getCursor());\n          function advance() {\n            var start = cursor.from(), match;\n            if (!(match = cursor.findNext())) {\n              cursor = cm.getSearchCursor(query);\n              if (!(match = cursor.findNext()) ||\n                  (cursor.from().line == start.line && cursor.from().ch == start.ch)) return;\n            }\n            cm.setSelection(cursor.from(), cursor.to());\n            confirmDialog(cm, doReplaceConfirm, \"Replace?\",\n                          [function() {doReplace(match);}, advance]);\n          }\n          function doReplace(match) {\n            cursor.replace(typeof query == \"string\" ? text :\n                           text.replace(/\\$(\\d)/, function(w, i) {return match[i];}));\n            advance();\n          }\n          advance();\n        }\n      });\n    });\n  }\n\n  CodeMirror.commands.find = function(cm) {clearSearch(cm); doSearch(cm);};\n  CodeMirror.commands.findNext = doSearch;\n  CodeMirror.commands.findPrev = function(cm) {doSearch(cm, true);};\n  CodeMirror.commands.clearSearch = clearSearch;\n  CodeMirror.commands.replace = replace;\n  CodeMirror.commands.replaceAll = function(cm) {replace(cm, true);};\n})();\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/lib/util/searchcursor.js",
    "content": "(function(){\n  function SearchCursor(cm, query, pos, caseFold) {\n    this.atOccurrence = false; this.cm = cm;\n    if (caseFold == null && typeof query == \"string\") caseFold = false;\n\n    pos = pos ? cm.clipPos(pos) : {line: 0, ch: 0};\n    this.pos = {from: pos, to: pos};\n\n    // The matches method is filled in based on the type of query.\n    // It takes a position and a direction, and returns an object\n    // describing the next occurrence of the query, or null if no\n    // more matches were found.\n    if (typeof query != \"string\") // Regexp match\n      this.matches = function(reverse, pos) {\n        if (reverse) {\n          var line = cm.getLine(pos.line).slice(0, pos.ch), match = line.match(query), start = 0;\n          while (match) {\n            var ind = line.indexOf(match[0]);\n            start += ind;\n            line = line.slice(ind + 1);\n            var newmatch = line.match(query);\n            if (newmatch) match = newmatch;\n            else break;\n            start++;\n          }\n        }\n        else {\n          var line = cm.getLine(pos.line).slice(pos.ch), match = line.match(query),\n          start = match && pos.ch + line.indexOf(match[0]);\n        }\n        if (match)\n          return {from: {line: pos.line, ch: start},\n                  to: {line: pos.line, ch: start + match[0].length},\n                  match: match};\n      };\n    else { // String query\n      if (caseFold) query = query.toLowerCase();\n      var fold = caseFold ? function(str){return str.toLowerCase();} : function(str){return str;};\n      var target = query.split(\"\\n\");\n      // Different methods for single-line and multi-line queries\n      if (target.length == 1)\n        this.matches = function(reverse, pos) {\n          var line = fold(cm.getLine(pos.line)), len = query.length, match;\n          if (reverse ? (pos.ch >= len && (match = line.lastIndexOf(query, pos.ch - len)) != -1)\n              : (match = line.indexOf(query, pos.ch)) != -1)\n            return {from: {line: pos.line, ch: match},\n                    to: {line: pos.line, ch: match + len}};\n        };\n      else\n        this.matches = function(reverse, pos) {\n          var ln = pos.line, idx = (reverse ? target.length - 1 : 0), match = target[idx], line = fold(cm.getLine(ln));\n          var offsetA = (reverse ? line.indexOf(match) + match.length : line.lastIndexOf(match));\n          if (reverse ? offsetA >= pos.ch || offsetA != match.length\n              : offsetA <= pos.ch || offsetA != line.length - match.length)\n            return;\n          for (;;) {\n            if (reverse ? !ln : ln == cm.lineCount() - 1) return;\n            line = fold(cm.getLine(ln += reverse ? -1 : 1));\n            match = target[reverse ? --idx : ++idx];\n            if (idx > 0 && idx < target.length - 1) {\n              if (line != match) return;\n              else continue;\n            }\n            var offsetB = (reverse ? line.lastIndexOf(match) : line.indexOf(match) + match.length);\n            if (reverse ? offsetB != line.length - match.length : offsetB != match.length)\n              return;\n            var start = {line: pos.line, ch: offsetA}, end = {line: ln, ch: offsetB};\n            return {from: reverse ? end : start, to: reverse ? start : end};\n          }\n        };\n    }\n  }\n\n  SearchCursor.prototype = {\n    findNext: function() {return this.find(false);},\n    findPrevious: function() {return this.find(true);},\n\n    find: function(reverse) {\n      var self = this, pos = this.cm.clipPos(reverse ? this.pos.from : this.pos.to);\n      function savePosAndFail(line) {\n        var pos = {line: line, ch: 0};\n        self.pos = {from: pos, to: pos};\n        self.atOccurrence = false;\n        return false;\n      }\n\n      for (;;) {\n        if (this.pos = this.matches(reverse, pos)) {\n          this.atOccurrence = true;\n          return this.pos.match || true;\n        }\n        if (reverse) {\n          if (!pos.line) return savePosAndFail(0);\n          pos = {line: pos.line-1, ch: this.cm.getLine(pos.line-1).length};\n        }\n        else {\n          var maxLine = this.cm.lineCount();\n          if (pos.line == maxLine - 1) return savePosAndFail(maxLine);\n          pos = {line: pos.line+1, ch: 0};\n        }\n      }\n    },\n\n    from: function() {if (this.atOccurrence) return this.pos.from;},\n    to: function() {if (this.atOccurrence) return this.pos.to;},\n\n    replace: function(newText) {\n      var self = this;\n      if (this.atOccurrence)\n        self.pos.to = this.cm.replaceRange(newText, self.pos.from, self.pos.to);\n    }\n  };\n\n  CodeMirror.defineExtension(\"getSearchCursor\", function(query, pos, caseFold) {\n    return new SearchCursor(this, query, pos, caseFold);\n  });\n})();\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/lib/util/simple-hint.css",
    "content": ".CodeMirror-completions {\n  position: absolute;\n  z-index: 10;\n  overflow: hidden;\n  -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n  -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n  box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n}\n.CodeMirror-completions select {\n  background: #fafafa;\n  outline: none;\n  border: none;\n  padding: 0;\n  margin: 0;\n  font-family: monospace;\n}\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/lib/util/simple-hint.js",
    "content": "(function() {\n  CodeMirror.simpleHint = function(editor, getHints) {\n    // We want a single cursor position.\n    if (editor.somethingSelected()) return;\n    var result = getHints(editor);\n    if (!result || !result.list.length) return;\n    var completions = result.list;\n    function insert(str) {\n      editor.replaceRange(str, result.from, result.to);\n    }\n    // When there is only one completion, use it directly.\n    if (completions.length == 1) {insert(completions[0]); return true;}\n\n    // Build the select widget\n    var complete = document.createElement(\"div\");\n    complete.className = \"CodeMirror-completions\";\n    var sel = complete.appendChild(document.createElement(\"select\"));\n    // Opera doesn't move the selection when pressing up/down in a\n    // multi-select, but it does properly support the size property on\n    // single-selects, so no multi-select is necessary.\n    if (!window.opera) sel.multiple = true;\n    for (var i = 0; i < completions.length; ++i) {\n      var opt = sel.appendChild(document.createElement(\"option\"));\n      opt.appendChild(document.createTextNode(completions[i]));\n    }\n    sel.firstChild.selected = true;\n    sel.size = Math.min(10, completions.length);\n    var pos = editor.cursorCoords();\n    complete.style.left = pos.x + \"px\";\n    complete.style.top = pos.yBot + \"px\";\n    document.body.appendChild(complete);\n    // If we're at the edge of the screen, then we want the menu to appear on the left of the cursor.\n    var winW = window.innerWidth || Math.max(document.body.offsetWidth, document.documentElement.offsetWidth);\n    if(winW - pos.x < sel.clientWidth)\n      complete.style.left = (pos.x - sel.clientWidth) + \"px\";\n    // Hack to hide the scrollbar.\n    if (completions.length <= 10)\n      complete.style.width = (sel.clientWidth - 1) + \"px\";\n\n    var done = false;\n    function close() {\n      if (done) return;\n      done = true;\n      complete.parentNode.removeChild(complete);\n    }\n    function pick() {\n      insert(completions[sel.selectedIndex]);\n      close();\n      setTimeout(function(){editor.focus();}, 50);\n    }\n    CodeMirror.connect(sel, \"blur\", close);\n    CodeMirror.connect(sel, \"keydown\", function(event) {\n      var code = event.keyCode;\n      // Enter\n      if (code == 13) {CodeMirror.e_stop(event); pick();}\n      // Escape\n      else if (code == 27) {CodeMirror.e_stop(event); close(); editor.focus();}\n      else if (code != 38 && code != 40) {\n        close(); editor.focus();\n        // Pass the event to the CodeMirror instance so that it can handle things like backspace properly.\n        editor.triggerOnKeyDown(event);\n        setTimeout(function(){CodeMirror.simpleHint(editor, getHints);}, 50);\n      }\n    });\n    CodeMirror.connect(sel, \"dblclick\", pick);\n\n    sel.focus();\n    // Opera sometimes ignores focusing a freshly created node\n    if (window.opera) setTimeout(function(){if (!done) sel.focus();}, 100);\n    return true;\n  };\n})();\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/clike/clike.js",
    "content": "CodeMirror.defineMode(\"clike\", function(config, parserConfig) {\n  var indentUnit = config.indentUnit,\n      keywords = parserConfig.keywords || {},\n      blockKeywords = parserConfig.blockKeywords || {},\n      atoms = parserConfig.atoms || {},\n      hooks = parserConfig.hooks || {},\n      multiLineStrings = parserConfig.multiLineStrings;\n  var isOperatorChar = /[+\\-*&%=<>!?|\\/]/;\n\n  var curPunc;\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    if (hooks[ch]) {\n      var result = hooks[ch](stream, state);\n      if (result !== false) return result;\n    }\n    if (ch == '\"' || ch == \"'\") {\n      state.tokenize = tokenString(ch);\n      return state.tokenize(stream, state);\n    }\n    if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch)) {\n      curPunc = ch;\n      return null;\n    }\n    if (/\\d/.test(ch)) {\n      stream.eatWhile(/[\\w\\.]/);\n      return \"number\";\n    }\n    if (ch == \"/\") {\n      if (stream.eat(\"*\")) {\n        state.tokenize = tokenComment;\n        return tokenComment(stream, state);\n      }\n      if (stream.eat(\"/\")) {\n        stream.skipToEnd();\n        return \"comment\";\n      }\n    }\n    if (isOperatorChar.test(ch)) {\n      stream.eatWhile(isOperatorChar);\n      return \"operator\";\n    }\n    stream.eatWhile(/[\\w\\$_]/);\n    var cur = stream.current();\n    if (keywords.propertyIsEnumerable(cur)) {\n      if (blockKeywords.propertyIsEnumerable(cur)) curPunc = \"newstatement\";\n      return \"keyword\";\n    }\n    if (atoms.propertyIsEnumerable(cur)) return \"atom\";\n    return \"word\";\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var escaped = false, next, end = false;\n      while ((next = stream.next()) != null) {\n        if (next == quote && !escaped) {end = true; break;}\n        escaped = !escaped && next == \"\\\\\";\n      }\n      if (end || !(escaped || multiLineStrings))\n        state.tokenize = null;\n      return \"string\";\n    };\n  }\n\n  function tokenComment(stream, state) {\n    var maybeEnd = false, ch;\n    while (ch = stream.next()) {\n      if (ch == \"/\" && maybeEnd) {\n        state.tokenize = null;\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return \"comment\";\n  }\n\n  function Context(indented, column, type, align, prev) {\n    this.indented = indented;\n    this.column = column;\n    this.type = type;\n    this.align = align;\n    this.prev = prev;\n  }\n  function pushContext(state, col, type) {\n    return state.context = new Context(state.indented, col, type, null, state.context);\n  }\n  function popContext(state) {\n    var t = state.context.type;\n    if (t == \")\" || t == \"]\" || t == \"}\")\n      state.indented = state.context.indented;\n    return state.context = state.context.prev;\n  }\n\n  // Interface\n\n  return {\n    startState: function(basecolumn) {\n      return {\n        tokenize: null,\n        context: new Context((basecolumn || 0) - indentUnit, 0, \"top\", false),\n        indented: 0,\n        startOfLine: true\n      };\n    },\n\n    token: function(stream, state) {\n      var ctx = state.context;\n      if (stream.sol()) {\n        if (ctx.align == null) ctx.align = false;\n        state.indented = stream.indentation();\n        state.startOfLine = true;\n      }\n      if (stream.eatSpace()) return null;\n      curPunc = null;\n      var style = (state.tokenize || tokenBase)(stream, state);\n      if (style == \"comment\" || style == \"meta\") return style;\n      if (ctx.align == null) ctx.align = true;\n\n      if ((curPunc == \";\" || curPunc == \":\") && ctx.type == \"statement\") popContext(state);\n      else if (curPunc == \"{\") pushContext(state, stream.column(), \"}\");\n      else if (curPunc == \"[\") pushContext(state, stream.column(), \"]\");\n      else if (curPunc == \"(\") pushContext(state, stream.column(), \")\");\n      else if (curPunc == \"}\") {\n        while (ctx.type == \"statement\") ctx = popContext(state);\n        if (ctx.type == \"}\") ctx = popContext(state);\n        while (ctx.type == \"statement\") ctx = popContext(state);\n      }\n      else if (curPunc == ctx.type) popContext(state);\n      else if (ctx.type == \"}\" || ctx.type == \"top\" || (ctx.type == \"statement\" && curPunc == \"newstatement\"))\n        pushContext(state, stream.column(), \"statement\");\n      state.startOfLine = false;\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      if (state.tokenize != tokenBase && state.tokenize != null) return 0;\n      var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);\n      if (ctx.type == \"statement\" && firstChar == \"}\") ctx = ctx.prev;\n      var closing = firstChar == ctx.type;\n      if (ctx.type == \"statement\") return ctx.indented + (firstChar == \"{\" ? 0 : indentUnit);\n      else if (ctx.align) return ctx.column + (closing ? 0 : 1);\n      else return ctx.indented + (closing ? 0 : indentUnit);\n    },\n\n    electricChars: \"{}\"\n  };\n});\n\n(function() {\n  function words(str) {\n    var obj = {}, words = str.split(\" \");\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n    return obj;\n  }\n  var cKeywords = \"auto if break int case long char register continue return default short do sizeof \" +\n    \"double static else struct entry switch extern typedef float union for unsigned \" +\n    \"goto while enum void const signed volatile\";\n\n  function cppHook(stream, state) {\n    if (!state.startOfLine) return false;\n    stream.skipToEnd();\n    return \"meta\";\n  }\n\n  // C#-style strings where \"\" escapes a quote.\n  function tokenAtString(stream, state) {\n    var next;\n    while ((next = stream.next()) != null) {\n      if (next == '\"' && !stream.eat('\"')) {\n        state.tokenize = null;\n        break;\n      }\n    }\n    return \"string\";\n  }\n\n  CodeMirror.defineMIME(\"text/x-csrc\", {\n    name: \"clike\",\n    keywords: words(cKeywords),\n    blockKeywords: words(\"case do else for if switch while struct\"),\n    atoms: words(\"null\"),\n    hooks: {\"#\": cppHook}\n  });\n  CodeMirror.defineMIME(\"text/x-c++src\", {\n    name: \"clike\",\n    keywords: words(cKeywords + \" asm dynamic_cast namespace reinterpret_cast try bool explicit new \" +\n                    \"static_cast typeid catch operator template typename class friend private \" +\n                    \"this using const_cast inline public throw virtual delete mutable protected \" +\n                    \"wchar_t\"),\n    blockKeywords: words(\"catch class do else finally for if struct switch try while\"),\n    atoms: words(\"true false null\"),\n    hooks: {\"#\": cppHook}\n  });\n  CodeMirror.defineMIME(\"text/x-java\", {\n    name: \"clike\",\n    keywords: words(\"abstract assert boolean break byte case catch char class const continue default \" + \n                    \"do double else enum extends final finally float for goto if implements import \" +\n                    \"instanceof int interface long native new package private protected public \" +\n                    \"return short static strictfp super switch synchronized this throw throws transient \" +\n                    \"try void volatile while\"),\n    blockKeywords: words(\"catch class do else finally for if switch try while\"),\n    atoms: words(\"true false null\"),\n    hooks: {\n      \"@\": function(stream, state) {\n        stream.eatWhile(/[\\w\\$_]/);\n        return \"meta\";\n      }\n    }\n  });\n  CodeMirror.defineMIME(\"text/x-csharp\", {\n    name: \"clike\",\n    keywords: words(\"abstract as base bool break byte case catch char checked class const continue decimal\" + \n                    \" default delegate do double else enum event explicit extern finally fixed float for\" + \n                    \" foreach goto if implicit in int interface internal is lock long namespace new object\" + \n                    \" operator out override params private protected public readonly ref return sbyte sealed short\" + \n                    \" sizeof stackalloc static string struct switch this throw try typeof uint ulong unchecked\" + \n                    \" unsafe ushort using virtual void volatile while add alias ascending descending dynamic from get\" + \n                    \" global group into join let orderby partial remove select set value var yield\"),\n    blockKeywords: words(\"catch class do else finally for foreach if struct switch try while\"),\n    atoms: words(\"true false null\"),\n    hooks: {\n      \"@\": function(stream, state) {\n        if (stream.eat('\"')) {\n          state.tokenize = tokenAtString;\n          return tokenAtString(stream, state);\n        }\n        stream.eatWhile(/[\\w\\$_]/);\n        return \"meta\";\n      }\n    }\n  });\n}());\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/clike/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: C-like mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"clike.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n    <style>.CodeMirror {border: 2px inset #dee;}</style>\n  </head>\n  <body>\n    <h1>CodeMirror: C-like mode</h1>\n\n<form><textarea id=\"code\" name=\"code\">\n/* C demo code */\n\n#include <zmq.h>\n#include <pthread.h>\n#include <semaphore.h>\n#include <time.h>\n#include <stdio.h>\n#include <fcntl.h>\n#include <malloc.h>\n\ntypedef struct {\n  void* arg_socket;\n  zmq_msg_t* arg_msg;\n  char* arg_string;\n  unsigned long arg_len;\n  int arg_int, arg_command;\n\n  int signal_fd;\n  int pad;\n  void* context;\n  sem_t sem;\n} acl_zmq_context;\n\n#define p(X) (context->arg_##X)\n\nvoid* zmq_thread(void* context_pointer) {\n  acl_zmq_context* context = (acl_zmq_context*)context_pointer;\n  char ok = 'K', err = 'X';\n  int res;\n\n  while (1) {\n    while ((res = sem_wait(&amp;context->sem)) == EINTR);\n    if (res) {write(context->signal_fd, &amp;err, 1); goto cleanup;}\n    switch(p(command)) {\n    case 0: goto cleanup;\n    case 1: p(socket) = zmq_socket(context->context, p(int)); break;\n    case 2: p(int) = zmq_close(p(socket)); break;\n    case 3: p(int) = zmq_bind(p(socket), p(string)); break;\n    case 4: p(int) = zmq_connect(p(socket), p(string)); break;\n    case 5: p(int) = zmq_getsockopt(p(socket), p(int), (void*)p(string), &amp;p(len)); break;\n    case 6: p(int) = zmq_setsockopt(p(socket), p(int), (void*)p(string), p(len)); break;\n    case 7: p(int) = zmq_send(p(socket), p(msg), p(int)); break;\n    case 8: p(int) = zmq_recv(p(socket), p(msg), p(int)); break;\n    case 9: p(int) = zmq_poll(p(socket), p(int), p(len)); break;\n    }\n    p(command) = errno;\n    write(context->signal_fd, &amp;ok, 1);\n  }\n cleanup:\n  close(context->signal_fd);\n  free(context_pointer);\n  return 0;\n}\n\nvoid* zmq_thread_init(void* zmq_context, int signal_fd) {\n  acl_zmq_context* context = malloc(sizeof(acl_zmq_context));\n  pthread_t thread;\n\n  context->context = zmq_context;\n  context->signal_fd = signal_fd;\n  sem_init(&amp;context->sem, 1, 0);\n  pthread_create(&amp;thread, 0, &amp;zmq_thread, context);\n  pthread_detach(thread);\n  return context;\n}\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        mode: \"text/x-csrc\"\n      });\n    </script>\n\n    <p>Simple mode that tries to handle C-like languages as well as it\n    can. Takes two configuration parameters: <code>keywords</code>, an\n    object whose property names are the keywords in the language,\n    and <code>useCPP</code>, which determines whether C preprocessor\n    directives are recognized.</p>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-csrc</code>\n    (C code), <code>text/x-c++src</code> (C++\n    code), <code>text/x-java</code> (Java\n    code), <code>text/x-csharp</code> (C#).</p>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/clojure/clojure.js",
    "content": "/**\n * Author: Hans Engel\n * Branched from CodeMirror's Scheme mode (by Koh Zi Han, based on implementation by Koh Zi Chun)\n */\nCodeMirror.defineMode(\"clojure\", function (config, mode) {\n    var BUILTIN = \"builtin\", COMMENT = \"comment\", STRING = \"string\", TAG = \"tag\",\n        ATOM = \"atom\", NUMBER = \"number\", BRACKET = \"bracket\", KEYWORD = \"keyword\";\n    var INDENT_WORD_SKIP = 2, KEYWORDS_SKIP = 1;\n\n    function makeKeywords(str) {\n        var obj = {}, words = str.split(\" \");\n        for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n        return obj;\n    }\n\n    var atoms = makeKeywords(\"true false nil\");\n    \n    var keywords = makeKeywords(\n      \"defn defn- def def- defonce defmulti defmethod defmacro defstruct deftype defprotocol defrecord defproject deftest slice defalias defhinted defmacro- defn-memo defnk defnk defonce- defunbound defunbound- defvar defvar- let letfn do case cond condp for loop recur when when-not when-let when-first if if-let if-not . .. -> ->> doto and or dosync doseq dotimes dorun doall load import unimport ns in-ns refer try catch finally throw with-open with-local-vars binding gen-class gen-and-load-class gen-and-save-class handler-case handle\");\n\n    var builtins = makeKeywords(\n        \"* *1 *2 *3 *agent* *allow-unresolved-vars* *assert *clojure-version* *command-line-args* *compile-files* *compile-path* *e *err* *file* *flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *use-context-classloader* *warn-on-reflection* + - / < <= = == > >= accessor aclone 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 case 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? extend extend-protocol extend-type extends? extenders 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 reify 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 repeat repeatedly replace replicate require reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq rsubseq satisfies? 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\");\n\n    var indentKeys = makeKeywords(\n        // Built-ins\n        \"ns fn def defn defmethod bound-fn if if-not case condp when while when-not when-first do future comment doto locking proxy with-open with-precision reify deftype defrecord defprotocol extend extend-protocol extend-type try catch \" +\n\n        // Binding forms\n        \"let letfn binding loop for doseq dotimes when-let if-let \" +\n\n        // Data structures\n        \"defstruct struct-map assoc \" +\n\n        // clojure.test\n        \"testing deftest \" +\n\n        // contrib\n        \"handler-case handle dotrace deftrace\");\n\n    var tests = {\n        digit: /\\d/,\n        digit_or_colon: /[\\d:]/,\n        hex: /[0-9a-fA-F]/,\n        sign: /[+-]/,\n        exponent: /[eE]/,\n        keyword_char: /[^\\s\\(\\[\\;\\)\\]]/,\n        basic: /[\\w\\$_\\-]/,\n        lang_keyword: /[\\w*+!\\-_?:\\/]/\n    };\n\n    function stateStack(indent, type, prev) { // represents a state stack object\n        this.indent = indent;\n        this.type = type;\n        this.prev = prev;\n    }\n\n    function pushStack(state, indent, type) {\n        state.indentStack = new stateStack(indent, type, state.indentStack);\n    }\n\n    function popStack(state) {\n        state.indentStack = state.indentStack.prev;\n    }\n\n    function isNumber(ch, stream){\n        // hex\n        if ( ch === '0' && 'x' == stream.peek().toLowerCase() ) {\n            stream.eat('x');\n            stream.eatWhile(tests.hex);\n            return true;\n        }\n\n        // leading sign\n        if ( ch == '+' || ch == '-' ) {\n          stream.eat(tests.sign);\n          ch = stream.next();\n        }\n\n        if ( tests.digit.test(ch) ) {\n            stream.eat(ch);\n            stream.eatWhile(tests.digit);\n\n            if ( '.' == stream.peek() ) {\n                stream.eat('.');\n                stream.eatWhile(tests.digit);\n            }\n\n            if ( 'e' == stream.peek().toLowerCase() ) {\n                stream.eat(tests.exponent);\n                stream.eat(tests.sign);\n                stream.eatWhile(tests.digit);\n            }\n\n            return true;\n        }\n\n        return false;\n    }\n\n    return {\n        startState: function () {\n            return {\n                indentStack: null,\n                indentation: 0,\n                mode: false\n            };\n        },\n\n        token: function (stream, state) {\n            if (state.indentStack == null && stream.sol()) {\n                // update indentation, but only if indentStack is empty\n                state.indentation = stream.indentation();\n            }\n\n            // skip spaces\n            if (stream.eatSpace()) {\n                return null;\n            }\n            var returnType = null;\n\n            switch(state.mode){\n                case \"string\": // multi-line string parsing mode\n                    var next, escaped = false;\n                    while ((next = stream.next()) != null) {\n                        if (next == \"\\\"\" && !escaped) {\n\n                            state.mode = false;\n                            break;\n                        }\n                        escaped = !escaped && next == \"\\\\\";\n                    }\n                    returnType = STRING; // continue on in string mode\n                    break;\n                default: // default parsing mode\n                    var ch = stream.next();\n\n                    if (ch == \"\\\"\") {\n                        state.mode = \"string\";\n                        returnType = STRING;\n                    } else if (ch == \"'\" && !( tests.digit_or_colon.test(stream.peek()) )) {\n                        returnType = ATOM;\n                    } else if (ch == \";\") { // comment\n                        stream.skipToEnd(); // rest of the line is a comment\n                        returnType = COMMENT;\n                    } else if (isNumber(ch,stream)){\n                        returnType = NUMBER;\n                    } else if (ch == \"(\" || ch == \"[\") {\n                        var keyWord = ''; var indentTemp = stream.column();\n                        /**\n                        Either\n                        (indent-word ..\n                        (non-indent-word ..\n                        (;something else, bracket, etc.\n                        */\n\n                        if (ch == \"(\") while ((letter = stream.eat(tests.keyword_char)) != null) {\n                            keyWord += letter;\n                        }\n\n                        if (keyWord.length > 0 && indentKeys.propertyIsEnumerable(keyWord)) { // indent-word\n                            pushStack(state, indentTemp + INDENT_WORD_SKIP, ch);\n                        } else { // non-indent word\n                            // we continue eating the spaces\n                            stream.eatSpace();\n                            if (stream.eol() || stream.peek() == \";\") {\n                                // nothing significant after\n                                // we restart indentation 1 space after\n                                pushStack(state, indentTemp + 1, ch);\n                            } else {\n                                pushStack(state, indentTemp + stream.current().length, ch); // else we match\n                            }\n                        }\n                        stream.backUp(stream.current().length - 1); // undo all the eating\n\n                        returnType = BRACKET;\n                    } else if (ch == \")\" || ch == \"]\") {\n                        returnType = BRACKET;\n                        if (state.indentStack != null && state.indentStack.type == (ch == \")\" ? \"(\" : \"[\")) {\n                            popStack(state);\n                        }\n                    } else if ( ch == \":\" ) {\n                        stream.eatWhile(tests.lang_keyword);\n                        return ATOM;\n                    } else {\n                        stream.eatWhile(tests.basic);\n\n                        if (keywords && keywords.propertyIsEnumerable(stream.current())) {\n                            returnType = KEYWORD;\n                        } else if (builtins && builtins.propertyIsEnumerable(stream.current())) {\n                            returnType = BUILTIN;\n                        } else if (atoms && atoms.propertyIsEnumerable(stream.current())) {\n                            returnType = ATOM;\n                        } else returnType = null;\n                    }\n            }\n\n            return returnType;\n        },\n\n        indent: function (state, textAfter) {\n            if (state.indentStack == null) return state.indentation;\n            return state.indentStack.indent;\n        }\n    };\n});\n\nCodeMirror.defineMIME(\"text/x-clojure\", \"clojure\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/clojure/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Clojure mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"clojure.js\"></script>\n    <style>.CodeMirror {background: #f8f8f8;}</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: Clojure mode</h1>\n    <form><textarea id=\"code\" name=\"code\">\n; Conway's Game of Life, based on the work of:\n;; Laurent Petit https://gist.github.com/1200343\n;; Christophe Grand http://clj-me.cgrand.net/2011/08/19/conways-game-of-life\n\n(ns ^{:doc \"Conway's Game of Life.\"}\n game-of-life)\n\n;; Core game of life's algorithm functions\n\n(defn neighbours \n  \"Given a cell's coordinates, returns the coordinates of its neighbours.\"\n  [[x y]]\n  (for [dx [-1 0 1] dy (if (zero? dx) [-1 1] [-1 0 1])]\n    [(+ dx x) (+ dy y)]))\n\n(defn step \n  \"Given a set of living cells, computes the new set of living cells.\"\n  [cells]\n  (set (for [[cell n] (frequencies (mapcat neighbours cells))\n             :when (or (= n 3) (and (= n 2) (cells cell)))]\n         cell)))\n\n;; Utility methods for displaying game on a text terminal\n\n(defn print-board \n  \"Prints a board on *out*, representing a step in the game.\"\n  [board w h]\n  (doseq [x (range (inc w)) y (range (inc h))]\n    (if (= y 0) (print \"\\n\")) \n    (print (if (board [x y]) \"[X]\" \" . \"))))\n\n(defn display-grids \n  \"Prints a squence of boards on *out*, representing several steps.\"\n  [grids w h]\n  (doseq [board grids]\n    (print-board board w h)\n    (print \"\\n\")))\n\n;; Launches an example board\n\n(def \n  ^{:doc \"board represents the initial set of living cells\"}\n   board #{[2 1] [2 2] [2 3]})\n\n(display-grids (take 3 (iterate step board)) 5 5) </textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {});\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-clojure</code>.</p>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/coffeescript/LICENSE",
    "content": "The MIT License\n\nCopyright (c) 2011 Jeff Pickhardt\nModified from the Python CodeMirror mode, Copyright (c) 2010 Timothy Farrell\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE."
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/coffeescript/coffeescript.js",
    "content": "/**\n * Link to the project's GitHub page:\n * https://github.com/pickhardt/coffeescript-codemirror-mode\n */\nCodeMirror.defineMode('coffeescript', function(conf) {\n    var ERRORCLASS = 'error';\n\n    function wordRegexp(words) {\n        return new RegExp(\"^((\" + words.join(\")|(\") + \"))\\\\b\");\n    }\n\n    var singleOperators = new RegExp(\"^[\\\\+\\\\-\\\\*/%&|\\\\^~<>!\\?]\");\n    var singleDelimiters = new RegExp('^[\\\\(\\\\)\\\\[\\\\]\\\\{\\\\}@,:`=;\\\\.]');\n    var doubleOperators = new RegExp(\"^((\\->)|(\\=>)|(\\\\+\\\\+)|(\\\\+\\\\=)|(\\\\-\\\\-)|(\\\\-\\\\=)|(\\\\*\\\\*)|(\\\\*\\\\=)|(\\\\/\\\\/)|(\\\\/\\\\=)|(==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//))\");\n    var doubleDelimiters = new RegExp(\"^((\\\\.\\\\.)|(\\\\+=)|(\\\\-=)|(\\\\*=)|(%=)|(/=)|(&=)|(\\\\|=)|(\\\\^=))\");\n    var tripleDelimiters = new RegExp(\"^((\\\\.\\\\.\\\\.)|(//=)|(>>=)|(<<=)|(\\\\*\\\\*=))\");\n    var identifiers = new RegExp(\"^[_A-Za-z$][_A-Za-z$0-9]*\");\n\n    var wordOperators = wordRegexp(['and', 'or', 'not',\n                                    'is', 'isnt', 'in',\n                                    'instanceof', 'typeof']);\n    var indentKeywords = ['for', 'while', 'loop', 'if', 'unless', 'else',\n                          'switch', 'try', 'catch', 'finally', 'class'];\n    var commonKeywords = ['break', 'by', 'continue', 'debugger', 'delete',\n                          'do', 'in', 'of', 'new', 'return', 'then',\n                          'this', 'throw', 'when', 'until'];\n\n    var keywords = wordRegexp(indentKeywords.concat(commonKeywords));\n\n    indentKeywords = wordRegexp(indentKeywords);\n\n\n    var stringPrefixes = new RegExp(\"^('{3}|\\\"{3}|['\\\"])\");\n    var regexPrefixes = new RegExp(\"^(/{3}|/)\");\n    var commonConstants = ['Infinity', 'NaN', 'undefined', 'null', 'true', 'false', 'on', 'off', 'yes', 'no'];\n    var constants = wordRegexp(commonConstants);\n\n    // Tokenizers\n    function tokenBase(stream, state) {\n        // Handle scope changes\n        if (stream.sol()) {\n            var scopeOffset = state.scopes[0].offset;\n            if (stream.eatSpace()) {\n                var lineOffset = stream.indentation();\n                if (lineOffset > scopeOffset) {\n                    return 'indent';\n                } else if (lineOffset < scopeOffset) {\n                    return 'dedent';\n                }\n                return null;\n            } else {\n                if (scopeOffset > 0) {\n                    dedent(stream, state);\n                }\n            }\n        }\n        if (stream.eatSpace()) {\n            return null;\n        }\n\n        var ch = stream.peek();\n\n        // Handle docco title comment (single line)\n        if (stream.match(\"####\")) {\n            stream.skipToEnd();\n            return 'comment';\n        }\n\n        // Handle multi line comments\n        if (stream.match(\"###\")) {\n            state.tokenize = longComment;\n            return state.tokenize(stream, state);\n        }\n\n        // Single line comment\n        if (ch === '#') {\n            stream.skipToEnd();\n            return 'comment';\n        }\n\n        // Handle number literals\n        if (stream.match(/^-?[0-9\\.]/, false)) {\n            var floatLiteral = false;\n            // Floats\n            if (stream.match(/^-?\\d*\\.\\d+(e[\\+\\-]?\\d+)?/i)) {\n              floatLiteral = true;\n            }\n            if (stream.match(/^-?\\d+\\.\\d*/)) {\n              floatLiteral = true;\n            }\n            if (stream.match(/^-?\\.\\d+/)) {\n              floatLiteral = true;\n            }\n\n            if (floatLiteral) {\n                // prevent from getting extra . on 1..\n                if (stream.peek() == \".\"){\n                    stream.backUp(1);\n                }\n                return 'number';\n            }\n            // Integers\n            var intLiteral = false;\n            // Hex\n            if (stream.match(/^-?0x[0-9a-f]+/i)) {\n              intLiteral = true;\n            }\n            // Decimal\n            if (stream.match(/^-?[1-9]\\d*(e[\\+\\-]?\\d+)?/)) {\n                intLiteral = true;\n            }\n            // Zero by itself with no other piece of number.\n            if (stream.match(/^-?0(?![\\dx])/i)) {\n              intLiteral = true;\n            }\n            if (intLiteral) {\n                return 'number';\n            }\n        }\n\n        // Handle strings\n        if (stream.match(stringPrefixes)) {\n            state.tokenize = tokenFactory(stream.current(), 'string');\n            return state.tokenize(stream, state);\n        }\n        // Handle regex literals\n        if (stream.match(regexPrefixes)) {\n            if (stream.current() != '/' || stream.match(/^.*\\//, false)) { // prevent highlight of division\n                state.tokenize = tokenFactory(stream.current(), 'string-2');\n                return state.tokenize(stream, state);\n            } else {\n                stream.backUp(1);\n            }\n        }\n\n        // Handle operators and delimiters\n        if (stream.match(tripleDelimiters) || stream.match(doubleDelimiters)) {\n            return 'punctuation';\n        }\n        if (stream.match(doubleOperators)\n            || stream.match(singleOperators)\n            || stream.match(wordOperators)) {\n            return 'operator';\n        }\n        if (stream.match(singleDelimiters)) {\n            return 'punctuation';\n        }\n\n        if (stream.match(constants)) {\n            return 'atom';\n        }\n\n        if (stream.match(keywords)) {\n            return 'keyword';\n        }\n\n        if (stream.match(identifiers)) {\n            return 'variable';\n        }\n\n        // Handle non-detected items\n        stream.next();\n        return ERRORCLASS;\n    }\n\n    function tokenFactory(delimiter, outclass) {\n        var singleline = delimiter.length == 1;\n        return function tokenString(stream, state) {\n            while (!stream.eol()) {\n                stream.eatWhile(/[^'\"\\/\\\\]/);\n                if (stream.eat('\\\\')) {\n                    stream.next();\n                    if (singleline && stream.eol()) {\n                        return outclass;\n                    }\n                } else if (stream.match(delimiter)) {\n                    state.tokenize = tokenBase;\n                    return outclass;\n                } else {\n                    stream.eat(/['\"\\/]/);\n                }\n            }\n            if (singleline) {\n                if (conf.mode.singleLineStringErrors) {\n                    outclass = ERRORCLASS\n                } else {\n                    state.tokenize = tokenBase;\n                }\n            }\n            return outclass;\n        };\n    }\n\n    function longComment(stream, state) {\n        while (!stream.eol()) {\n            stream.eatWhile(/[^#]/);\n            if (stream.match(\"###\")) {\n                state.tokenize = tokenBase;\n                break;\n            }\n            stream.eatWhile(\"#\");\n        }\n        return \"comment\"\n    }\n\n    function indent(stream, state, type) {\n        type = type || 'coffee';\n        var indentUnit = 0;\n        if (type === 'coffee') {\n            for (var i = 0; i < state.scopes.length; i++) {\n                if (state.scopes[i].type === 'coffee') {\n                    indentUnit = state.scopes[i].offset + conf.indentUnit;\n                    break;\n                }\n            }\n        } else {\n            indentUnit = stream.column() + stream.current().length;\n        }\n        state.scopes.unshift({\n            offset: indentUnit,\n            type: type\n        });\n    }\n\n    function dedent(stream, state) {\n        if (state.scopes.length == 1) return;\n        if (state.scopes[0].type === 'coffee') {\n            var _indent = stream.indentation();\n            var _indent_index = -1;\n            for (var i = 0; i < state.scopes.length; ++i) {\n                if (_indent === state.scopes[i].offset) {\n                    _indent_index = i;\n                    break;\n                }\n            }\n            if (_indent_index === -1) {\n                return true;\n            }\n            while (state.scopes[0].offset !== _indent) {\n                state.scopes.shift();\n            }\n            return false\n        } else {\n            state.scopes.shift();\n            return false;\n        }\n    }\n\n    function tokenLexer(stream, state) {\n        var style = state.tokenize(stream, state);\n        var current = stream.current();\n\n        // Handle '.' connected identifiers\n        if (current === '.') {\n            style = state.tokenize(stream, state);\n            current = stream.current();\n            if (style === 'variable') {\n                return 'variable';\n            } else {\n                return ERRORCLASS;\n            }\n        }\n\n        // Handle properties\n        if (current === '@') {\n            stream.eat('@');\n            return 'keyword';\n        }\n\n        // Handle scope changes.\n        if (current === 'return') {\n            state.dedent += 1;\n        }\n        if (((current === '->' || current === '=>') &&\n                  !state.lambda &&\n                  state.scopes[0].type == 'coffee' &&\n                  stream.peek() === '')\n               || style === 'indent') {\n            indent(stream, state);\n        }\n        var delimiter_index = '[({'.indexOf(current);\n        if (delimiter_index !== -1) {\n            indent(stream, state, '])}'.slice(delimiter_index, delimiter_index+1));\n        }\n        if (indentKeywords.exec(current)){\n            indent(stream, state);\n        }\n        if (current == 'then'){\n            dedent(stream, state);\n        }\n\n\n        if (style === 'dedent') {\n            if (dedent(stream, state)) {\n                return ERRORCLASS;\n            }\n        }\n        delimiter_index = '])}'.indexOf(current);\n        if (delimiter_index !== -1) {\n            if (dedent(stream, state)) {\n                return ERRORCLASS;\n            }\n        }\n        if (state.dedent > 0 && stream.eol() && state.scopes[0].type == 'coffee') {\n            if (state.scopes.length > 1) state.scopes.shift();\n            state.dedent -= 1;\n        }\n\n        return style;\n    }\n\n    var external = {\n        startState: function(basecolumn) {\n            return {\n              tokenize: tokenBase,\n              scopes: [{offset:basecolumn || 0, type:'coffee'}],\n              lastToken: null,\n              lambda: false,\n              dedent: 0\n          };\n        },\n\n        token: function(stream, state) {\n            var style = tokenLexer(stream, state);\n\n            state.lastToken = {style:style, content: stream.current()};\n\n            if (stream.eol() && stream.lambda) {\n                state.lambda = false;\n            }\n\n            return style;\n        },\n\n        indent: function(state, textAfter) {\n            if (state.tokenize != tokenBase) {\n                return 0;\n            }\n\n            return state.scopes[0].offset;\n        }\n\n    };\n    return external;\n});\n\nCodeMirror.defineMIME('text/x-coffeescript', 'coffeescript');\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/coffeescript/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: CoffeeScript mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"coffeescript.js\"></script>\n    <style>.CodeMirror {border-top: 1px solid silver; border-bottom: 1px solid silver;}</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: CoffeeScript mode</h1>\n    <form><textarea id=\"code\" name=\"code\">\n# CoffeeScript mode for CodeMirror\n# Copyright (c) 2011 Jeff Pickhardt, released under\n# the MIT License.\n#\n# Modified from the Python CodeMirror mode, which also is \n# under the MIT License Copyright (c) 2010 Timothy Farrell.\n#\n# The following script, Underscore.coffee, is used to \n# demonstrate CoffeeScript mode for CodeMirror.\n#\n# To download CoffeeScript mode for CodeMirror, go to:\n# https://github.com/pickhardt/coffeescript-codemirror-mode\n\n# **Underscore.coffee\n# (c) 2011 Jeremy Ashkenas, DocumentCloud Inc.**\n# Underscore is freely distributable under the terms of the\n# [MIT license](http://en.wikipedia.org/wiki/MIT_License).\n# Portions of Underscore are inspired by or borrowed from\n# [Prototype.js](http://prototypejs.org/api), Oliver Steele's\n# [Functional](http://osteele.com), and John Resig's\n# [Micro-Templating](http://ejohn.org).\n# For all details and documentation:\n# http://documentcloud.github.com/underscore/\n\n\n# Baseline setup\n# --------------\n\n# Establish the root object, `window` in the browser, or `global` on the server.\nroot = this\n\n\n# Save the previous value of the `_` variable.\npreviousUnderscore = root._\n\n### Multiline\n    comment\n###\n\n# Establish the object that gets thrown to break out of a loop iteration.\n# `StopIteration` is SOP on Mozilla.\nbreaker = if typeof(StopIteration) is 'undefined' then '__break__' else StopIteration\n\n\n#### Docco style single line comment (title)\n\n\n# Helper function to escape **RegExp** contents, because JS doesn't have one.\nescapeRegExp = (string) -> string.replace(/([.*+?^${}()|[\\]\\/\\\\])/g, '\\\\$1')\n\n\n# Save bytes in the minified (but not gzipped) version:\nArrayProto = Array.prototype\nObjProto = Object.prototype\n\n\n# Create quick reference variables for speed access to core prototypes.\nslice = ArrayProto.slice\nunshift = ArrayProto.unshift\ntoString = ObjProto.toString\nhasOwnProperty = ObjProto.hasOwnProperty\npropertyIsEnumerable = ObjProto.propertyIsEnumerable\n\n\n# All **ECMA5** native implementations we hope to use are declared here.\nnativeForEach = ArrayProto.forEach\nnativeMap = ArrayProto.map\nnativeReduce = ArrayProto.reduce\nnativeReduceRight = ArrayProto.reduceRight\nnativeFilter = ArrayProto.filter\nnativeEvery = ArrayProto.every\nnativeSome = ArrayProto.some\nnativeIndexOf = ArrayProto.indexOf\nnativeLastIndexOf = ArrayProto.lastIndexOf\nnativeIsArray = Array.isArray\nnativeKeys = Object.keys\n\n\n# Create a safe reference to the Underscore object for use below.\n_ = (obj) -> new wrapper(obj)\n\n\n# Export the Underscore object for **CommonJS**.\nif typeof(exports) != 'undefined' then exports._ = _\n\n\n# Export Underscore to global scope.\nroot._ = _\n\n\n# Current version.\n_.VERSION = '1.1.0'\n\n\n# Collection Functions\n# --------------------\n\n# The cornerstone, an **each** implementation.\n# Handles objects implementing **forEach**, arrays, and raw objects.\n_.each = (obj, iterator, context) ->\n  try\n    if nativeForEach and obj.forEach is nativeForEach\n      obj.forEach iterator, context\n    else if _.isNumber obj.length\n      iterator.call context, obj[i], i, obj for i in [0...obj.length]\n    else\n      iterator.call context, val, key, obj for own key, val of obj\n  catch e\n    throw e if e isnt breaker\n  obj\n\n\n# Return the results of applying the iterator to each element. Use JavaScript\n# 1.6's version of **map**, if possible.\n_.map = (obj, iterator, context) ->\n  return obj.map(iterator, context) if nativeMap and obj.map is nativeMap\n  results = []\n  _.each obj, (value, index, list) ->\n    results.push iterator.call context, value, index, list\n  results\n\n\n# **Reduce** builds up a single result from a list of values. Also known as\n# **inject**, or **foldl**. Uses JavaScript 1.8's version of **reduce**, if possible.\n_.reduce = (obj, iterator, memo, context) ->\n  if nativeReduce and obj.reduce is nativeReduce\n    iterator = _.bind iterator, context if context\n    return obj.reduce iterator, memo\n  _.each obj, (value, index, list) ->\n    memo = iterator.call context, memo, value, index, list\n  memo\n\n\n# The right-associative version of **reduce**, also known as **foldr**. Uses\n# JavaScript 1.8's version of **reduceRight**, if available.\n_.reduceRight = (obj, iterator, memo, context) ->\n  if nativeReduceRight and obj.reduceRight is nativeReduceRight\n    iterator = _.bind iterator, context if context\n    return obj.reduceRight iterator, memo\n  reversed = _.clone(_.toArray(obj)).reverse()\n  _.reduce reversed, iterator, memo, context\n\n\n# Return the first value which passes a truth test.\n_.detect = (obj, iterator, context) ->\n  result = null\n  _.each obj, (value, index, list) ->\n    if iterator.call context, value, index, list\n      result = value\n      _.breakLoop()\n  result\n\n\n# Return all the elements that pass a truth test. Use JavaScript 1.6's\n# **filter**, if it exists.\n_.filter = (obj, iterator, context) ->\n  return obj.filter iterator, context if nativeFilter and obj.filter is nativeFilter\n  results = []\n  _.each obj, (value, index, list) ->\n    results.push value if iterator.call context, value, index, list\n  results\n\n\n# Return all the elements for which a truth test fails.\n_.reject = (obj, iterator, context) ->\n  results = []\n  _.each obj, (value, index, list) ->\n    results.push value if not iterator.call context, value, index, list\n  results\n\n\n# Determine whether all of the elements match a truth test. Delegate to\n# JavaScript 1.6's **every**, if it is present.\n_.every = (obj, iterator, context) ->\n  iterator ||= _.identity\n  return obj.every iterator, context if nativeEvery and obj.every is nativeEvery\n  result = true\n  _.each obj, (value, index, list) ->\n    _.breakLoop() unless (result = result and iterator.call(context, value, index, list))\n  result\n\n\n# Determine if at least one element in the object matches a truth test. Use\n# JavaScript 1.6's **some**, if it exists.\n_.some = (obj, iterator, context) ->\n  iterator ||= _.identity\n  return obj.some iterator, context if nativeSome and obj.some is nativeSome\n  result = false\n  _.each obj, (value, index, list) ->\n    _.breakLoop() if (result = iterator.call(context, value, index, list))\n  result\n\n\n# Determine if a given value is included in the array or object,\n# based on `===`.\n_.include = (obj, target) ->\n  return _.indexOf(obj, target) isnt -1 if nativeIndexOf and obj.indexOf is nativeIndexOf\n  return true for own key, val of obj when val is target\n  false\n\n\n# Invoke a method with arguments on every item in a collection.\n_.invoke = (obj, method) ->\n  args = _.rest arguments, 2\n  (if method then val[method] else val).apply(val, args) for val in obj\n\n\n# Convenience version of a common use case of **map**: fetching a property.\n_.pluck = (obj, key) ->\n  _.map(obj, (val) -> val[key])\n\n\n# Return the maximum item or (item-based computation).\n_.max = (obj, iterator, context) ->\n  return Math.max.apply(Math, obj) if not iterator and _.isArray(obj)\n  result = computed: -Infinity\n  _.each obj, (value, index, list) ->\n    computed = if iterator then iterator.call(context, value, index, list) else value\n    computed >= result.computed and (result = {value: value, computed: computed})\n  result.value\n\n\n# Return the minimum element (or element-based computation).\n_.min = (obj, iterator, context) ->\n  return Math.min.apply(Math, obj) if not iterator and _.isArray(obj)\n  result = computed: Infinity\n  _.each obj, (value, index, list) ->\n    computed = if iterator then iterator.call(context, value, index, list) else value\n    computed < result.computed and (result = {value: value, computed: computed})\n  result.value\n\n\n# Sort the object's values by a criterion produced by an iterator.\n_.sortBy = (obj, iterator, context) ->\n  _.pluck(((_.map obj, (value, index, list) ->\n    {value: value, criteria: iterator.call(context, value, index, list)}\n  ).sort((left, right) ->\n    a = left.criteria; b = right.criteria\n    if a < b then -1 else if a > b then 1 else 0\n  )), 'value')\n\n\n# Use a comparator function to figure out at what index an object should\n# be inserted so as to maintain order. Uses binary search.\n_.sortedIndex = (array, obj, iterator) ->\n  iterator ||= _.identity\n  low = 0\n  high = array.length\n  while low < high\n    mid = (low + high) >> 1\n    if iterator(array[mid]) < iterator(obj) then low = mid + 1 else high = mid\n  low\n\n\n# Convert anything iterable into a real, live array.\n_.toArray = (iterable) ->\n  return [] if (!iterable)\n  return iterable.toArray() if (iterable.toArray)\n  return iterable if (_.isArray(iterable))\n  return slice.call(iterable) if (_.isArguments(iterable))\n  _.values(iterable)\n\n\n# Return the number of elements in an object.\n_.size = (obj) -> _.toArray(obj).length\n\n\n# Array Functions\n# ---------------\n\n# Get the first element of an array. Passing `n` will return the first N\n# values in the array. Aliased as **head**. The `guard` check allows it to work\n# with **map**.\n_.first = (array, n, guard) ->\n  if n and not guard then slice.call(array, 0, n) else array[0]\n\n\n# Returns everything but the first entry of the array. Aliased as **tail**.\n# Especially useful on the arguments object. Passing an `index` will return\n# the rest of the values in the array from that index onward. The `guard`\n# check allows it to work with **map**.\n_.rest = (array, index, guard) ->\n  slice.call(array, if _.isUndefined(index) or guard then 1 else index)\n\n\n# Get the last element of an array.\n_.last = (array) -> array[array.length - 1]\n\n\n# Trim out all falsy values from an array.\n_.compact = (array) -> item for item in array when item\n\n\n# Return a completely flattened version of an array.\n_.flatten = (array) ->\n  _.reduce array, (memo, value) ->\n    return memo.concat(_.flatten(value)) if _.isArray value\n    memo.push value\n    memo\n  , []\n\n\n# Return a version of the array that does not contain the specified value(s).\n_.without = (array) ->\n  values = _.rest arguments\n  val for val in _.toArray(array) when not _.include values, val\n\n\n# Produce a duplicate-free version of the array. If the array has already\n# been sorted, you have the option of using a faster algorithm.\n_.uniq = (array, isSorted) ->\n  memo = []\n  for el, i in _.toArray array\n    memo.push el if i is 0 || (if isSorted is true then _.last(memo) isnt el else not _.include(memo, el))\n  memo\n\n\n# Produce an array that contains every item shared between all the\n# passed-in arrays.\n_.intersect = (array) ->\n  rest = _.rest arguments\n  _.select _.uniq(array), (item) ->\n    _.all rest, (other) ->\n      _.indexOf(other, item) >= 0\n\n\n# Zip together multiple lists into a single array -- elements that share\n# an index go together.\n_.zip = ->\n  length = _.max _.pluck arguments, 'length'\n  results = new Array length\n  for i in [0...length]\n    results[i] = _.pluck arguments, String i\n  results\n\n\n# If the browser doesn't supply us with **indexOf** (I'm looking at you, MSIE),\n# we need this function. Return the position of the first occurrence of an\n# item in an array, or -1 if the item is not included in the array.\n_.indexOf = (array, item) ->\n  return array.indexOf item if nativeIndexOf and array.indexOf is nativeIndexOf\n  i = 0; l = array.length\n  while l - i\n    if array[i] is item then return i else i++\n  -1\n\n\n# Provide JavaScript 1.6's **lastIndexOf**, delegating to the native function,\n# if possible.\n_.lastIndexOf = (array, item) ->\n  return array.lastIndexOf(item) if nativeLastIndexOf and array.lastIndexOf is nativeLastIndexOf\n  i = array.length\n  while i\n    if array[i] is item then return i else i--\n  -1\n\n\n# Generate an integer Array containing an arithmetic progression. A port of\n# [the native Python **range** function](http://docs.python.org/library/functions.html#range).\n_.range = (start, stop, step) ->\n  a = arguments\n  solo = a.length <= 1\n  i = start = if solo then 0 else a[0]\n  stop = if solo then a[0] else a[1]\n  step = a[2] or 1\n  len = Math.ceil((stop - start) / step)\n  return [] if len <= 0\n  range = new Array len\n  idx = 0\n  loop\n    return range if (if step > 0 then i - stop else stop - i) >= 0\n    range[idx] = i\n    idx++\n    i+= step\n\n\n# Function Functions\n# ------------------\n\n# Create a function bound to a given object (assigning `this`, and arguments,\n# optionally). Binding with arguments is also known as **curry**.\n_.bind = (func, obj) ->\n  args = _.rest arguments, 2\n  -> func.apply obj or root, args.concat arguments\n\n\n# Bind all of an object's methods to that object. Useful for ensuring that\n# all callbacks defined on an object belong to it.\n_.bindAll = (obj) ->\n  funcs = if arguments.length > 1 then _.rest(arguments) else _.functions(obj)\n  _.each funcs, (f) -> obj[f] = _.bind obj[f], obj\n  obj\n\n\n# Delays a function for the given number of milliseconds, and then calls\n# it with the arguments supplied.\n_.delay = (func, wait) ->\n  args = _.rest arguments, 2\n  setTimeout((-> func.apply(func, args)), wait)\n\n\n# Memoize an expensive function by storing its results.\n_.memoize = (func, hasher) ->\n  memo = {}\n  hasher or= _.identity\n  ->\n    key = hasher.apply this, arguments\n    return memo[key] if key of memo\n    memo[key] = func.apply this, arguments\n\n\n# Defers a function, scheduling it to run after the current call stack has\n# cleared.\n_.defer = (func) ->\n  _.delay.apply _, [func, 1].concat _.rest arguments\n\n\n# Returns the first function passed as an argument to the second,\n# allowing you to adjust arguments, run code before and after, and\n# conditionally execute the original function.\n_.wrap = (func, wrapper) ->\n  -> wrapper.apply wrapper, [func].concat arguments\n\n\n# Returns a function that is the composition of a list of functions, each\n# consuming the return value of the function that follows.\n_.compose = ->\n  funcs = arguments\n  ->\n    args = arguments\n    for i in [funcs.length - 1..0] by -1\n      args = [funcs[i].apply(this, args)]\n    args[0]\n\n\n# Object Functions\n# ----------------\n\n# Retrieve the names of an object's properties.\n_.keys = nativeKeys or (obj) ->\n  return _.range 0, obj.length if _.isArray(obj)\n  key for key, val of obj\n\n\n# Retrieve the values of an object's properties.\n_.values = (obj) ->\n  _.map obj, _.identity\n\n\n# Return a sorted list of the function names available in Underscore.\n_.functions = (obj) ->\n  _.filter(_.keys(obj), (key) -> _.isFunction(obj[key])).sort()\n\n\n# Extend a given object with all of the properties in a source object.\n_.extend = (obj) ->\n  for source in _.rest(arguments)\n    obj[key] = val for key, val of source\n  obj\n\n\n# Create a (shallow-cloned) duplicate of an object.\n_.clone = (obj) ->\n  return obj.slice 0 if _.isArray obj\n  _.extend {}, obj\n\n\n# Invokes interceptor with the obj, and then returns obj.\n# The primary purpose of this method is to \"tap into\" a method chain,\n# in order to perform operations on intermediate results within\n the chain.\n_.tap = (obj, interceptor) ->\n  interceptor obj\n  obj\n\n\n# Perform a deep comparison to check if two objects are equal.\n_.isEqual = (a, b) ->\n  # Check object identity.\n  return true if a is b\n  # Different types?\n  atype = typeof(a); btype = typeof(b)\n  return false if atype isnt btype\n  # Basic equality test (watch out for coercions).\n  return true if `a == b`\n  # One is falsy and the other truthy.\n  return false if (!a and b) or (a and !b)\n  # One of them implements an `isEqual()`?\n  return a.isEqual(b) if a.isEqual\n  # Check dates' integer values.\n  return a.getTime() is b.getTime() if _.isDate(a) and _.isDate(b)\n  # Both are NaN?\n  return false if _.isNaN(a) and _.isNaN(b)\n  # Compare regular expressions.\n  if _.isRegExp(a) and _.isRegExp(b)\n    return a.source is b.source and\n           a.global is b.global and\n           a.ignoreCase is b.ignoreCase and\n           a.multiline is b.multiline\n  # If a is not an object by this point, we can't handle it.\n  return false if atype isnt 'object'\n  # Check for different array lengths before comparing contents.\n  return false if a.length and (a.length isnt b.length)\n  # Nothing else worked, deep compare the contents.\n  aKeys = _.keys(a); bKeys = _.keys(b)\n  # Different object sizes?\n  return false if aKeys.length isnt bKeys.length\n  # Recursive comparison of contents.\n  return false for key, val of a when !(key of b) or !_.isEqual(val, b[key])\n  true\n\n\n# Is a given array or object empty?\n_.isEmpty = (obj) ->\n  return obj.length is 0 if _.isArray(obj) or _.isString(obj)\n  return false for own key of obj\n  true\n\n\n# Is a given value a DOM element?\n_.isElement = (obj) -> obj and obj.nodeType is 1\n\n\n# Is a given value an array?\n_.isArray = nativeIsArray or (obj) -> !!(obj and obj.concat and obj.unshift and not obj.callee)\n\n\n# Is a given variable an arguments object?\n_.isArguments = (obj) -> obj and obj.callee\n\n\n# Is the given value a function?\n_.isFunction = (obj) -> !!(obj and obj.constructor and obj.call and obj.apply)\n\n\n# Is the given value a string?\n_.isString = (obj) -> !!(obj is '' or (obj and obj.charCodeAt and obj.substr))\n\n\n# Is a given value a number?\n_.isNumber = (obj) -> (obj is +obj) or toString.call(obj) is '[object Number]'\n\n\n# Is a given value a boolean?\n_.isBoolean = (obj) -> obj is true or obj is false\n\n\n# Is a given value a Date?\n_.isDate = (obj) -> !!(obj and obj.getTimezoneOffset and obj.setUTCFullYear)\n\n\n# Is the given value a regular expression?\n_.isRegExp = (obj) -> !!(obj and obj.exec and (obj.ignoreCase or obj.ignoreCase is false))\n\n\n# Is the given value NaN -- this one is interesting. `NaN != NaN`, and\n# `isNaN(undefined) == true`, so we make sure it's a number first.\n_.isNaN = (obj) -> _.isNumber(obj) and window.isNaN(obj)\n\n\n# Is a given value equal to null?\n_.isNull = (obj) -> obj is null\n\n\n# Is a given variable undefined?\n_.isUndefined = (obj) -> typeof obj is 'undefined'\n\n\n# Utility Functions\n# -----------------\n\n# Run Underscore.js in noConflict mode, returning the `_` variable to its\n# previous owner. Returns a reference to the Underscore object.\n_.noConflict = ->\n  root._ = previousUnderscore\n  this\n\n\n# Keep the identity function around for default iterators.\n_.identity = (value) -> value\n\n\n# Run a function `n` times.\n_.times = (n, iterator, context) ->\n  iterator.call context, i for i in [0...n]\n\n\n# Break out of the middle of an iteration.\n_.breakLoop = -> throw breaker\n\n\n# Add your own custom functions to the Underscore object, ensuring that\n# they're correctly added to the OOP wrapper as well.\n_.mixin = (obj) ->\n  for name in _.functions(obj)\n    addToWrapper name, _[name] = obj[name]\n\n\n# Generate a unique integer id (unique within the entire client session).\n# Useful for temporary DOM ids.\nidCounter = 0\n_.uniqueId = (prefix) ->\n  (prefix or '') + idCounter++\n\n\n# By default, Underscore uses **ERB**-style template delimiters, change the\n# following template settings to use alternative delimiters.\n_.templateSettings = {\n  start: '<%'\n  end: '%>'\n  interpolate: /<%=(.+?)%>/g\n}\n\n\n# JavaScript templating a-la **ERB**, pilfered from John Resig's\n# *Secrets of the JavaScript Ninja*, page 83.\n# Single-quote fix from Rick Strahl.\n# With alterations for arbitrary delimiters, and to preserve whitespace.\n_.template = (str, data) ->\n  c = _.templateSettings\n  endMatch = new RegExp(\"'(?=[^\"+c.end.substr(0, 1)+\"]*\"+escapeRegExp(c.end)+\")\",\"g\")\n  fn = new Function 'obj',\n    'var p=[],print=function(){p.push.apply(p,arguments);};' +\n    'with(obj||{}){p.push(\\'' +\n    str.replace(/\\r/g, '\\\\r')\n       .replace(/\\n/g, '\\\\n')\n       .replace(/\\t/g, '\\\\t')\n       .replace(endMatch,\"���\")\n       .split(\"'\").join(\"\\\\'\")\n       .split(\"���\").join(\"'\")\n       .replace(c.interpolate, \"',$1,'\")\n       .split(c.start).join(\"');\")\n       .split(c.end).join(\"p.push('\") +\n       \"');}return p.join('');\"\n  if data then fn(data) else fn\n\n\n# Aliases\n# -------\n\n_.forEach = _.each\n_.foldl = _.inject = _.reduce\n_.foldr = _.reduceRight\n_.select = _.filter\n_.all = _.every\n_.any = _.some\n_.contains = _.include\n_.head = _.first\n_.tail = _.rest\n_.methods = _.functions\n\n\n# Setup the OOP Wrapper\n# ---------------------\n\n# If Underscore is called as a function, it returns a wrapped object that\n# can be used OO-style. This wrapper holds altered versions of all the\n# underscore functions. Wrapped objects may be chained.\nwrapper = (obj) ->\n  this._wrapped = obj\n  this\n\n\n# Helper function to continue chaining intermediate results.\nresult = (obj, chain) ->\n  if chain then _(obj).chain() else obj\n\n\n# A method to easily add functions to the OOP wrapper.\naddToWrapper = (name, func) ->\n  wrapper.prototype[name] = ->\n    args = _.toArray arguments\n    unshift.call args, this._wrapped\n    result func.apply(_, args), this._chain\n\n\n# Add all ofthe Underscore functions to the wrapper object.\n_.mixin _\n\n\n# Add all mutator Array functions to the wrapper.\n_.each ['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], (name) ->\n  method = Array.prototype[name]\n  wrapper.prototype[name] = ->\n    method.apply(this._wrapped, arguments)\n    result(this._wrapped, this._chain)\n\n\n# Add all accessor Array functions to the wrapper.\n_.each ['concat', 'join', 'slice'], (name) ->\n  method = Array.prototype[name]\n  wrapper.prototype[name] = ->\n    result(method.apply(this._wrapped, arguments), this._chain)\n\n\n# Start chaining a wrapped Underscore object.\nwrapper::chain = ->\n  this._chain = true\n  this\n\n\n# Extracts the result from a wrapped and chained object.\nwrapper::value = -> this._wrapped\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {});\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-coffeescript</code>.</p>\n\n    <p>The CoffeeScript mode was written by Jeff Pickhardt (<a href=\"LICENSE\">license</a>).</p>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/css/css.js",
    "content": "CodeMirror.defineMode(\"css\", function(config) {\n  var indentUnit = config.indentUnit, type;\n  function ret(style, tp) {type = tp; return style;}\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    if (ch == \"@\") {stream.eatWhile(/[\\w\\\\\\-]/); return ret(\"meta\", stream.current());}\n    else if (ch == \"/\" && stream.eat(\"*\")) {\n      state.tokenize = tokenCComment;\n      return tokenCComment(stream, state);\n    }\n    else if (ch == \"<\" && stream.eat(\"!\")) {\n      state.tokenize = tokenSGMLComment;\n      return tokenSGMLComment(stream, state);\n    }\n    else if (ch == \"=\") ret(null, \"compare\");\n    else if ((ch == \"~\" || ch == \"|\") && stream.eat(\"=\")) return ret(null, \"compare\");\n    else if (ch == \"\\\"\" || ch == \"'\") {\n      state.tokenize = tokenString(ch);\n      return state.tokenize(stream, state);\n    }\n    else if (ch == \"#\") {\n      stream.eatWhile(/[\\w\\\\\\-]/);\n      return ret(\"atom\", \"hash\");\n    }\n    else if (ch == \"!\") {\n      stream.match(/^\\s*\\w*/);\n      return ret(\"keyword\", \"important\");\n    }\n    else if (/\\d/.test(ch)) {\n      stream.eatWhile(/[\\w.%]/);\n      return ret(\"number\", \"unit\");\n    }\n    else if (/[,.+>*\\/]/.test(ch)) {\n      return ret(null, \"select-op\");\n    }\n    else if (/[;{}:\\[\\]]/.test(ch)) {\n      return ret(null, ch);\n    }\n    else {\n      stream.eatWhile(/[\\w\\\\\\-]/);\n      return ret(\"variable\", \"variable\");\n    }\n  }\n\n  function tokenCComment(stream, state) {\n    var maybeEnd = false, ch;\n    while ((ch = stream.next()) != null) {\n      if (maybeEnd && ch == \"/\") {\n        state.tokenize = tokenBase;\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return ret(\"comment\", \"comment\");\n  }\n\n  function tokenSGMLComment(stream, state) {\n    var dashes = 0, ch;\n    while ((ch = stream.next()) != null) {\n      if (dashes >= 2 && ch == \">\") {\n        state.tokenize = tokenBase;\n        break;\n      }\n      dashes = (ch == \"-\") ? dashes + 1 : 0;\n    }\n    return ret(\"comment\", \"comment\");\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var escaped = false, ch;\n      while ((ch = stream.next()) != null) {\n        if (ch == quote && !escaped)\n          break;\n        escaped = !escaped && ch == \"\\\\\";\n      }\n      if (!escaped) state.tokenize = tokenBase;\n      return ret(\"string\", \"string\");\n    };\n  }\n\n  return {\n    startState: function(base) {\n      return {tokenize: tokenBase,\n              baseIndent: base || 0,\n              stack: []};\n    },\n\n    token: function(stream, state) {\n      if (stream.eatSpace()) return null;\n      var style = state.tokenize(stream, state);\n\n      var context = state.stack[state.stack.length-1];\n      if (type == \"hash\" && context != \"rule\") style = \"string-2\";\n      else if (style == \"variable\") {\n        if (context == \"rule\") style = \"number\";\n        else if (!context || context == \"@media{\") style = \"tag\";\n      }\n\n      if (context == \"rule\" && /^[\\{\\};]$/.test(type))\n        state.stack.pop();\n      if (type == \"{\") {\n        if (context == \"@media\") state.stack[state.stack.length-1] = \"@media{\";\n        else state.stack.push(\"{\");\n      }\n      else if (type == \"}\") state.stack.pop();\n      else if (type == \"@media\") state.stack.push(\"@media\");\n      else if (context == \"{\" && type != \"comment\") state.stack.push(\"rule\");\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      var n = state.stack.length;\n      if (/^\\}/.test(textAfter))\n        n -= state.stack[state.stack.length-1] == \"rule\" ? 2 : 1;\n      return state.baseIndent + n * indentUnit;\n    },\n\n    electricChars: \"}\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/css\", \"css\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/css/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: CSS mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"css.js\"></script>\n    <style>.CodeMirror {background: #f8f8f8;}</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: CSS mode</h1>\n    <form><textarea id=\"code\" name=\"code\">\n/* Some example CSS */\n\n@import url(\"something.css\");\n\nbody {\n  margin: 0;\n  padding: 3em 6em;\n  font-family: tahoma, arial, sans-serif;\n  color: #000;\n}\n\n#navigation a {\n  font-weight: bold;\n  text-decoration: none !important;\n}\n\nh1 {\n  font-size: 2.5em;\n}\n\nh2 {\n  font-size: 1.7em;\n}\n\nh1:before, h2:before {\n  content: \"::\";\n}\n\ncode {\n  font-family: courier, monospace;\n  font-size: 80%;\n  color: #418A8A;\n}\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {});\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/css</code>.</p>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/diff/diff.js",
    "content": "CodeMirror.defineMode(\"diff\", function() {\n\n  var TOKEN_NAMES = {\n    '+': 'tag',\n    '-': 'string',\n    '@': 'meta'\n  };\n\n  return {\n    token: function(stream) {\n      var tw_pos = stream.string.search(/[\\t ]+?$/);\n\n      if (!stream.sol() || tw_pos === 0) {\n        stream.skipToEnd();\n        return (\"error \" + (\n          TOKEN_NAMES[stream.string.charAt(0)] || '')).replace(/ $/, '');\n      }\n\n      var token_name = TOKEN_NAMES[stream.peek()] || stream.skipToEnd();\n\n      if (tw_pos === -1) {\n        stream.skipToEnd();\n      } else {\n        stream.pos = tw_pos;\n      }\n\n      return token_name;\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-diff\", \"diff\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/diff/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Diff mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"diff.js\"></script>\n    <style>\n      .CodeMirror {border-top: 1px solid #ddd; border-bottom: 1px solid #ddd;}\n      span.cm-meta {color: #a0b !important;}\n      span.cm-error { background-color: black; opacity: 0.4;}\n      span.cm-error.cm-string { background-color: red; }\n      span.cm-error.cm-tag { background-color: #2b2; }\n    </style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: Diff mode</h1>\n    <form><textarea id=\"code\" name=\"code\">\ndiff --git a/index.html b/index.html\nindex c1d9156..7764744 100644\n--- a/index.html\n+++ b/index.html\n@@ -95,7 +95,8 @@ StringStream.prototype = {\n     <script>\n       var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n         lineNumbers: true,\n-        autoMatchBrackets: true\n+        autoMatchBrackets: true,\n+      onGutterClick: function(x){console.log(x);}\n       });\n     </script>\n   </body>\ndiff --git a/lib/codemirror.js b/lib/codemirror.js\nindex 04646a9..9a39cc7 100644\n--- a/lib/codemirror.js\n+++ b/lib/codemirror.js\n@@ -399,10 +399,16 @@ var CodeMirror = (function() {\n     }\n \n     function onMouseDown(e) {\n-      var start = posFromMouse(e), last = start;    \n+      var start = posFromMouse(e), last = start, target = e.target();\n       if (!start) return;\n       setCursor(start.line, start.ch, false);\n       if (e.button() != 1) return;\n+      if (target.parentNode == gutter) {    \n+        if (options.onGutterClick)\n+          options.onGutterClick(indexOf(gutter.childNodes, target) + showingFrom);\n+        return;\n+      }\n+\n       if (!focused) onFocus();\n \n       e.stop();\n@@ -808,7 +814,7 @@ var CodeMirror = (function() {\n       for (var i = showingFrom; i < showingTo; ++i) {\n         var marker = lines[i].gutterMarker;\n         if (marker) html.push('<div class=\"' + marker.style + '\">' + htmlEscape(marker.text) + '</div>');\n-        else html.push(\"<div>\" + (options.lineNumbers ? i + 1 : \"\\u00a0\") + \"</div>\");\n+        else html.push(\"<div>\" + (options.lineNumbers ? i + options.firstLineNumber : \"\\u00a0\") + \"</div>\");\n       }\n       gutter.style.display = \"none\"; // TODO test whether this actually helps\n       gutter.innerHTML = html.join(\"\");\n@@ -1371,10 +1377,8 @@ var CodeMirror = (function() {\n         if (option == \"parser\") setParser(value);\n         else if (option === \"lineNumbers\") setLineNumbers(value);\n         else if (option === \"gutter\") setGutter(value);\n-        else if (option === \"readOnly\") options.readOnly = value;\n-        else if (option === \"indentUnit\") {options.indentUnit = indentUnit = value; setParser(options.parser);}\n-        else if (/^(?:enterMode|tabMode|indentWithTabs|readOnly|autoMatchBrackets|undoDepth)$/.test(option)) options[option] = value;\n-        else throw new Error(\"Can't set option \" + option);\n+        else if (option === \"indentUnit\") {options.indentUnit = value; setParser(options.parser);}\n+        else options[option] = value;\n       },\n       cursorCoords: cursorCoords,\n       undo: operation(undo),\n@@ -1402,7 +1406,8 @@ var CodeMirror = (function() {\n       replaceRange: operation(replaceRange),\n \n       operation: function(f){return operation(f)();},\n-      refresh: function(){updateDisplay([{from: 0, to: lines.length}]);}\n+      refresh: function(){updateDisplay([{from: 0, to: lines.length}]);},\n+      getInputField: function(){return input;}\n     };\n     return instance;\n   }\n@@ -1420,6 +1425,7 @@ var CodeMirror = (function() {\n     readOnly: false,\n     onChange: null,\n     onCursorActivity: null,\n+    onGutterClick: null,\n     autoMatchBrackets: false,\n     workTime: 200,\n     workDelay: 300,\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {});\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-diff</code>.</p>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/ecl/ecl.js",
    "content": "CodeMirror.defineMode(\"ecl\", function(config) {\r\n\r\n  function words(str) {\r\n    var obj = {}, words = str.split(\" \");\r\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\r\n    return obj;\r\n  }\r\n\r\n  function metaHook(stream, state) {\r\n    if (!state.startOfLine) return false;\r\n    stream.skipToEnd();\r\n    return \"meta\";\r\n  }\r\n\r\n  function tokenAtString(stream, state) {\r\n    var next;\r\n    while ((next = stream.next()) != null) {\r\n      if (next == '\"' && !stream.eat('\"')) {\r\n        state.tokenize = null;\r\n        break;\r\n      }\r\n    }\r\n    return \"string\";\r\n  }\r\n\r\n  var indentUnit = config.indentUnit;\r\n  var keyword = words(\"abs acos allnodes ascii asin asstring atan atan2 ave case choose choosen choosesets clustersize combine correlation cos cosh count covariance cron dataset dedup define denormalize distribute distributed distribution ebcdic enth error evaluate event eventextra eventname exists exp failcode failmessage fetch fromunicode getisvalid global graph group hash hash32 hash64 hashcrc hashmd5 having if index intformat isvalid iterate join keyunicode length library limit ln local log loop map matched matchlength matchposition matchtext matchunicode max merge mergejoin min nolocal nonempty normalize parse pipe power preload process project pull random range rank ranked realformat recordof regexfind regexreplace regroup rejected rollup round roundup row rowdiff sample set sin sinh sizeof soapcall sort sorted sqrt stepped stored sum table tan tanh thisnode topn tounicode transfer trim truncate typeof ungroup unicodeorder variance which workunit xmldecode xmlencode xmltext xmlunicode\");\r\n  var variable = words(\"apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait\");\r\n  var variable_2 = words(\"__compressed__ all and any as atmost before beginc++ best between case const counter csv descend encrypt end endc++ endmacro except exclusive expire export extend false few first flat from full function group header heading hole ifblock import in interface joined keep keyed last left limit load local locale lookup macro many maxcount maxlength min skew module named nocase noroot noscan nosort not of only opt or outer overwrite packed partition penalty physicallength pipe quote record relationship repeat return right scan self separator service shared skew skip sql store terminator thor threshold token transform trim true type unicodeorder unsorted validate virtual whole wild within xml xpath\");\r\n  var variable_3 = words(\"ascii big_endian boolean data decimal ebcdic integer pattern qstring real record rule set of string token udecimal unicode unsigned varstring varunicode\");\r\n  var builtin = words(\"checkpoint deprecated failcode failmessage failure global independent onwarning persist priority recovery stored success wait when\");\r\n  var blockKeywords = words(\"catch class do else finally for if switch try while\");\r\n  var atoms = words(\"true false null\");\r\n  var hooks = {\"#\": metaHook};\r\n  var multiLineStrings;\r\n  var isOperatorChar = /[+\\-*&%=<>!?|\\/]/;\r\n\r\n  var curPunc;\r\n\r\n  function tokenBase(stream, state) {\r\n    var ch = stream.next();\r\n    if (hooks[ch]) {\r\n      var result = hooks[ch](stream, state);\r\n      if (result !== false) return result;\r\n    }\r\n    if (ch == '\"' || ch == \"'\") {\r\n      state.tokenize = tokenString(ch);\r\n      return state.tokenize(stream, state);\r\n    }\r\n    if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch)) {\r\n      curPunc = ch;\r\n      return null\r\n    }\r\n    if (/\\d/.test(ch)) {\r\n      stream.eatWhile(/[\\w\\.]/);\r\n      return \"number\";\r\n    }\r\n    if (ch == \"/\") {\r\n      if (stream.eat(\"*\")) {\r\n        state.tokenize = tokenComment;\r\n        return tokenComment(stream, state);\r\n      }\r\n      if (stream.eat(\"/\")) {\r\n        stream.skipToEnd();\r\n        return \"comment\";\r\n      }\r\n    }\r\n    if (isOperatorChar.test(ch)) {\r\n      stream.eatWhile(isOperatorChar);\r\n      return \"operator\";\r\n    }\r\n    stream.eatWhile(/[\\w\\$_]/);\r\n    var cur = stream.current().toLowerCase();\r\n    if (keyword.propertyIsEnumerable(cur)) {\r\n      if (blockKeywords.propertyIsEnumerable(cur)) curPunc = \"newstatement\";\r\n      return \"keyword\";\r\n    } else if (variable.propertyIsEnumerable(cur)) {\r\n      if (blockKeywords.propertyIsEnumerable(cur)) curPunc = \"newstatement\";\r\n      return \"variable\";\r\n    } else if (variable_2.propertyIsEnumerable(cur)) {\r\n      if (blockKeywords.propertyIsEnumerable(cur)) curPunc = \"newstatement\";\r\n      return \"variable-2\";\r\n    } else if (variable_3.propertyIsEnumerable(cur)) {\r\n      if (blockKeywords.propertyIsEnumerable(cur)) curPunc = \"newstatement\";\r\n      return \"variable-3\";\r\n    } else if (builtin.propertyIsEnumerable(cur)) {\r\n      if (blockKeywords.propertyIsEnumerable(cur)) curPunc = \"newstatement\";\r\n      return \"builtin\";\r\n    } else { //Data types are of from KEYWORD## \r\n\t\tvar i = cur.length - 1;\r\n\t\twhile(i >= 0 && (!isNaN(cur[i]) || cur[i] == '_'))\r\n\t\t\t--i;\r\n\t\t\r\n\t\tif (i > 0) {\r\n\t\t\tvar cur2 = cur.substr(0, i + 1);\r\n\t    \tif (variable_3.propertyIsEnumerable(cur2)) {\r\n\t      \t\tif (blockKeywords.propertyIsEnumerable(cur2)) curPunc = \"newstatement\";\r\n\t      \t\treturn \"variable-3\";\r\n\t      \t}\r\n\t    }\r\n    }\r\n    if (atoms.propertyIsEnumerable(cur)) return \"atom\";\r\n    return \"word\";\r\n  }\r\n\r\n  function tokenString(quote) {\r\n    return function(stream, state) {\r\n      var escaped = false, next, end = false;\r\n      while ((next = stream.next()) != null) {\r\n        if (next == quote && !escaped) {end = true; break;}\r\n        escaped = !escaped && next == \"\\\\\";\r\n      }\r\n      if (end || !(escaped || multiLineStrings))\r\n        state.tokenize = tokenBase;\r\n      return \"string\";\r\n    };\r\n  }\r\n\r\n  function tokenComment(stream, state) {\r\n    var maybeEnd = false, ch;\r\n    while (ch = stream.next()) {\r\n      if (ch == \"/\" && maybeEnd) {\r\n        state.tokenize = tokenBase;\r\n        break;\r\n      }\r\n      maybeEnd = (ch == \"*\");\r\n    }\r\n    return \"comment\";\r\n  }\r\n\r\n  function Context(indented, column, type, align, prev) {\r\n    this.indented = indented;\r\n    this.column = column;\r\n    this.type = type;\r\n    this.align = align;\r\n    this.prev = prev;\r\n  }\r\n  function pushContext(state, col, type) {\r\n    return state.context = new Context(state.indented, col, type, null, state.context);\r\n  }\r\n  function popContext(state) {\r\n    var t = state.context.type;\r\n    if (t == \")\" || t == \"]\" || t == \"}\")\r\n      state.indented = state.context.indented;\r\n    return state.context = state.context.prev;\r\n  }\r\n\r\n  // Interface\r\n\r\n  return {\r\n    startState: function(basecolumn) {\r\n      return {\r\n        tokenize: null,\r\n        context: new Context((basecolumn || 0) - indentUnit, 0, \"top\", false),\r\n        indented: 0,\r\n        startOfLine: true\r\n      };\r\n    },\r\n\r\n    token: function(stream, state) {\r\n      var ctx = state.context;\r\n      if (stream.sol()) {\r\n        if (ctx.align == null) ctx.align = false;\r\n        state.indented = stream.indentation();\r\n        state.startOfLine = true;\r\n      }\r\n      if (stream.eatSpace()) return null;\r\n      curPunc = null;\r\n      var style = (state.tokenize || tokenBase)(stream, state);\r\n      if (style == \"comment\" || style == \"meta\") return style;\r\n      if (ctx.align == null) ctx.align = true;\r\n\r\n      if ((curPunc == \";\" || curPunc == \":\") && ctx.type == \"statement\") popContext(state);\r\n      else if (curPunc == \"{\") pushContext(state, stream.column(), \"}\");\r\n      else if (curPunc == \"[\") pushContext(state, stream.column(), \"]\");\r\n      else if (curPunc == \"(\") pushContext(state, stream.column(), \")\");\r\n      else if (curPunc == \"}\") {\r\n        while (ctx.type == \"statement\") ctx = popContext(state);\r\n        if (ctx.type == \"}\") ctx = popContext(state);\r\n        while (ctx.type == \"statement\") ctx = popContext(state);\r\n      }\r\n      else if (curPunc == ctx.type) popContext(state);\r\n      else if (ctx.type == \"}\" || ctx.type == \"top\" || (ctx.type == \"statement\" && curPunc == \"newstatement\"))\r\n        pushContext(state, stream.column(), \"statement\");\r\n      state.startOfLine = false;\r\n      return style;\r\n    },\r\n\r\n    indent: function(state, textAfter) {\r\n      if (state.tokenize != tokenBase && state.tokenize != null) return 0;\r\n      var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);\r\n      if (ctx.type == \"statement\" && firstChar == \"}\") ctx = ctx.prev;\r\n      var closing = firstChar == ctx.type;\r\n      if (ctx.type == \"statement\") return ctx.indented + (firstChar == \"{\" ? 0 : indentUnit);\r\n      else if (ctx.align) return ctx.column + (closing ? 0 : 1);\r\n      else return ctx.indented + (closing ? 0 : indentUnit);\r\n    },\r\n\r\n    electricChars: \"{}\"\r\n  };\r\n});\r\n\r\nCodeMirror.defineMIME(\"text/x-ecl\");\r\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/ecl/index.html",
    "content": "﻿<!doctype html>\r\n<html>\r\n  <head>\r\n    <title>CodeMirror: ECL mode</title>\r\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\r\n    <script src=\"../../lib/codemirror.js\"></script>\r\n    <script src=\"ecl.js\"></script>\r\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\r\n    <style>.CodeMirror {border: 1px solid black;}</style>\r\n  </head>\r\n  <body>\r\n    <h1>CodeMirror: ECL mode</h1>\r\n    <form><textarea id=\"code\" name=\"code\">\r\n/*\r\nsample useless code to demonstrate ecl syntax highlighting\r\nthis is a multiline comment!\r\n*/\r\n\r\n//  this is a singleline comment!\r\n\r\nimport ut;\r\nr := \r\n  record\r\n   string22 s1 := '123';\r\n   integer4 i1 := 123;\r\n  end;\r\n#option('tmp', true);\r\nd := dataset('tmp::qb', r, thor);\r\noutput(d);\r\n</textarea></form>\r\n    <script>\r\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\r\n        tabMode: \"indent\",\r\n        matchBrackets: true,\r\n      });\r\n    </script>\r\n\r\n    <p>Based on CodeMirror's clike mode.  For more information see <a href=\"http://hpccsystems.com\">HPCC Systems</a> web site.</p>\r\n    <p><strong>MIME types defined:</strong> <code>text/x-ecl</code>.</p>\r\n\r\n  </body>\r\n</html>\r\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/erlang/erlang.js",
    "content": "// erlang    -> CodeMirror tag\n//\n// atom      -> atom\n// attribute -> attribute\n// builtin   -> builtin\n// comment   -> comment\n// error     -> error\n// fun       -> meta\n// function  -> tag\n// guard     -> property\n// keyword   -> keyword\n// macro     -> variable-2\n// number    -> number\n// operator  -> operator\n// record    -> bracket\n// string    -> string\n// type      -> def\n// variable  -> variable\n\nCodeMirror.defineMIME(\"text/x-erlang\", \"erlang\");\n\nCodeMirror.defineMode(\"erlang\", function(cmCfg, modeCfg) {\n\n  var typeWords = [\n    \"-type\", \"-spec\", \"-export_type\", \"-opaque\"];\n\n  var keywordWords = [\n    \"after\",\"begin\",\"catch\",\"case\",\"cond\",\"end\",\"fun\",\"if\",\n    \"let\",\"of\",\"query\",\"receive\",\"try\",\"when\"];\n\n  var operatorWords = [\n    \"and\",\"andalso\",\"band\",\"bnot\",\"bor\",\"bsl\",\"bsr\",\"bxor\",\n    \"div\",\"not\",\"or\",\"orelse\",\"rem\",\"xor\"];\n\n  var operatorSymbols = [\n    \"+\",\"-\",\"*\",\"/\",\">\",\">=\",\"<\",\"=<\",\"=:=\",\"==\",\"=/=\",\"/=\",\"||\",\"<-\"];\n\n  var guardWords = [\n    \"is_atom\",\"is_binary\",\"is_bitstring\",\"is_boolean\",\"is_float\",\n    \"is_function\",\"is_integer\",\"is_list\",\"is_number\",\"is_pid\",\n    \"is_port\",\"is_record\",\"is_reference\",\"is_tuple\",\n    \"atom\",\"binary\",\"bitstring\",\"boolean\",\"function\",\"integer\",\"list\",\n    \"number\",\"pid\",\"port\",\"record\",\"reference\",\"tuple\"];\n\n  var bifWords = [\n    \"abs\",\"adler32\",\"adler32_combine\",\"alive\",\"apply\",\"atom_to_binary\",\n    \"atom_to_list\",\"binary_to_atom\",\"binary_to_existing_atom\",\n    \"binary_to_list\",\"binary_to_term\",\"bit_size\",\"bitstring_to_list\",\n    \"byte_size\",\"check_process_code\",\"contact_binary\",\"crc32\",\n    \"crc32_combine\",\"date\",\"decode_packet\",\"delete_module\",\n    \"disconnect_node\",\"element\",\"erase\",\"exit\",\"float\",\"float_to_list\",\n    \"garbage_collect\",\"get\",\"get_keys\",\"group_leader\",\"halt\",\"hd\",\n    \"integer_to_list\",\"internal_bif\",\"iolist_size\",\"iolist_to_binary\",\n    \"is_alive\",\"is_atom\",\"is_binary\",\"is_bitstring\",\"is_boolean\",\n    \"is_float\",\"is_function\",\"is_integer\",\"is_list\",\"is_number\",\"is_pid\",\n    \"is_port\",\"is_process_alive\",\"is_record\",\"is_reference\",\"is_tuple\",\n    \"length\",\"link\",\"list_to_atom\",\"list_to_binary\",\"list_to_bitstring\",\n    \"list_to_existing_atom\",\"list_to_float\",\"list_to_integer\",\n    \"list_to_pid\",\"list_to_tuple\",\"load_module\",\"make_ref\",\"module_loaded\",\n    \"monitor_node\",\"node\",\"node_link\",\"node_unlink\",\"nodes\",\"notalive\",\n    \"now\",\"open_port\",\"pid_to_list\",\"port_close\",\"port_command\",\n    \"port_connect\",\"port_control\",\"pre_loaded\",\"process_flag\",\n    \"process_info\",\"processes\",\"purge_module\",\"put\",\"register\",\n    \"registered\",\"round\",\"self\",\"setelement\",\"size\",\"spawn\",\"spawn_link\",\n    \"spawn_monitor\",\"spawn_opt\",\"split_binary\",\"statistics\",\n    \"term_to_binary\",\"time\",\"throw\",\"tl\",\"trunc\",\"tuple_size\",\n    \"tuple_to_list\",\"unlink\",\"unregister\",\"whereis\"];\n\n  function isMember(element,list) {\n    return (-1 < list.indexOf(element));\n  }\n\n  function isPrev(stream,string) {\n    var start = stream.start;\n    var len = string.length;\n    if (len <= start) {\n      var word = stream.string.slice(start-len,start);\n      return word == string;\n    }else{\n      return false;\n    }\n  }\n\n  var smallRE = /[a-z_]/;\n  var largeRE = /[A-Z_]/;\n  var digitRE = /[0-9]/;\n  var octitRE = /[0-7]/;\n  var idRE = /[a-z_A-Z0-9]/;\n\n  function tokenize(stream, state) {\n    if (stream.eatSpace()) {\n      return null;\n    }\n\n    // attributes and type specs\n    if (stream.sol() && stream.peek() == '-') {\n      stream.next();\n      if (stream.eat(smallRE) && stream.eatWhile(idRE)) {\n        if (stream.peek() == \"(\") {\n          return \"attribute\";\n        }else if (isMember(stream.current(),typeWords)) {\n          return \"def\";\n        }else{\n          return null;\n        }\n      }\n      stream.backUp(1);\n    }\n\n    var ch = stream.next();\n\n    // comment\n    if (ch == '%') {\n      stream.skipToEnd();\n      return \"comment\";\n    }\n\n    // macro\n    if (ch == '?') {\n      stream.eatWhile(idRE);\n      return \"variable-2\";\n    }\n\n    // record\n    if ( ch == \"#\") {\n      stream.eatWhile(idRE);\n      return \"bracket\";\n    }\n\n    // char\n    if ( ch == \"$\") {\n      if (stream.next() == \"\\\\\") {\n        if (!stream.eatWhile(octitRE)) {\n          stream.next();\n        }\n      }\n      return \"string\";\n    }\n\n    // quoted atom\n    if (ch == '\\'') {\n      return singleQuote(stream);\n    }\n\n    // string\n    if (ch == '\"') {\n      return doubleQuote(stream);\n    }\n\n    // variable\n    if (largeRE.test(ch)) {\n      stream.eatWhile(idRE);\n      return \"variable\";\n    }\n\n    // atom/keyword/BIF/function\n    if (smallRE.test(ch)) {\n      stream.eatWhile(idRE);\n\n      if (stream.peek() == \"/\") {\n        stream.next();\n        if (stream.eatWhile(digitRE)) {\n          return \"meta\";      // f/0 style fun\n        }else{\n          stream.backUp(1);\n          return \"atom\";\n        }\n      }\n\n      var w = stream.current();\n\n      if (isMember(w,keywordWords)) {\n        return \"keyword\";           // keyword\n      }\n      if (stream.peek() == \"(\") {\n        if (isMember(w,bifWords) &&\n            (!isPrev(stream,\":\") || isPrev(stream,\"erlang:\"))) {\n          return \"builtin\";         // BIF\n        }else{\n          return \"tag\";             // function\n        }\n      }\n      if (isMember(w,guardWords)) {\n        return \"property\";          // guard\n      }\n      if (isMember(w,operatorWords)) {\n        return \"operator\";          // operator\n      }\n\n\n      if (stream.peek() == \":\") {\n        if (w == \"erlang\") {         // f:now() is highlighted incorrectly\n          return \"builtin\";\n        } else {\n          return \"tag\";              // function application\n        }\n      }\n\n      return \"atom\";\n    }\n\n    // number\n    if (digitRE.test(ch)) {\n      stream.eatWhile(digitRE);\n      if (stream.eat('#')) {\n        stream.eatWhile(digitRE);    // 16#10  style integer\n      } else {\n        if (stream.eat('.')) {       // float\n          stream.eatWhile(digitRE);\n        }\n        if (stream.eat(/[eE]/)) {\n          stream.eat(/[-+]/);        // float with exponent\n          stream.eatWhile(digitRE);\n        }\n      }\n      return \"number\";               // normal integer\n    }\n\n    return null;\n  }\n\n  function doubleQuote(stream) {\n    return Quote(stream, '\"', '\\\\', \"string\");\n  }\n\n  function singleQuote(stream) {\n    return Quote(stream,'\\'','\\\\',\"atom\");\n  }\n\n  function Quote(stream,quoteChar,escapeChar,tag) {\n    while (!stream.eol()) {\n      var ch = stream.next();\n      if (ch == quoteChar) {\n        return tag;\n      }else if (ch == escapeChar) {\n        stream.next();\n      }\n    }\n    return \"error\";\n  }\n\n  return {\n    startState: function() {\n      return {};\n    },\n\n    token: function(stream, state) {\n      return tokenize(stream, state);\n    }\n  };\n});\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/erlang/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Erlang mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"erlang.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../theme/erlang-dark.css\">\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: Erlang mode</h1>\n\n<form><textarea id=\"code\" name=\"code\">\n%% -*- mode: erlang; erlang-indent-level: 2 -*-\n%%% Created :  7 May 2012 by mats cronqvist <masse@klarna.com>\n\n%% @doc\n%% Demonstrates how to print a record.\n%% @end\n\n-module('ex').\n-author('mats cronqvist').\n-export([demo/0,\n         rec_info/1]).\n\n-record(demo,{a=\"One\",b=\"Two\",c=\"Three\",d=\"Four\"}).\n\nrec_info(demo) -> record_info(fields,demo).\n\ndemo() -> expand_recs(?MODULE,#demo{a=\"A\",b=\"BB\"}).\n  \nexpand_recs(M,List) when is_list(List) ->\n  [expand_recs(M,L)||L<-List];\nexpand_recs(M,Tup) when is_tuple(Tup) ->\n  case tuple_size(Tup) of\n    L when L < 1 -> Tup;\n    L ->\n      try Fields = M:rec_info(element(1,Tup)),\n          L = length(Fields)+1,\n          lists:zip(Fields,expand_recs(M,tl(tuple_to_list(Tup))))\n      catch _:_ ->\n          list_to_tuple(expand_recs(M,tuple_to_list(Tup)))\n      end\n  end;\nexpand_recs(_,Term) ->\n  Term.\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        theme: \"erlang-dark\"\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-erlang</code>.</p>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/gfm/gfm.js",
    "content": "CodeMirror.defineMode(\"gfm\", function(config, parserConfig) {\n  var mdMode = CodeMirror.getMode(config, \"markdown\");\n  var aliases = {\n    html: \"htmlmixed\",\n    js: \"javascript\",\n    json: \"application/json\",\n    c: \"text/x-csrc\",\n    \"c++\": \"text/x-c++src\",\n    java: \"text/x-java\",\n    csharp: \"text/x-csharp\",\n    \"c#\": \"text/x-csharp\"\n  };\n\n  // make this lazy so that we don't need to load GFM last\n  var getMode = (function () {\n    var i, modes = {}, mimes = {}, mime;\n\n    var list = CodeMirror.listModes();\n    for (i = 0; i < list.length; i++) {\n      modes[list[i]] = list[i];\n    }\n    var mimesList = CodeMirror.listMIMEs();\n    for (i = 0; i < mimesList.length; i++) {\n      mime = mimesList[i].mime;\n      mimes[mime] = mimesList[i].mime;\n    }\n\n    for (var a in aliases) {\n      if (aliases[a] in modes || aliases[a] in mimes)\n        modes[a] = aliases[a];\n    }\n    \n    return function (lang) {\n      return modes[lang] ? CodeMirror.getMode(config, modes[lang]) : null;\n    }\n  }());\n\n  function markdown(stream, state) {\n    // intercept fenced code blocks\n    if (stream.sol() && stream.match(/^```([\\w+#]*)/)) {\n      // try switching mode\n      state.localMode = getMode(RegExp.$1)\n      if (state.localMode)\n        state.localState = state.localMode.startState();\n\n      state.token = local;\n      return 'code';\n    }\n\n    return mdMode.token(stream, state.mdState);\n  }\n\n  function local(stream, state) {\n    if (stream.sol() && stream.match(/^```/)) {\n      state.localMode = state.localState = null;\n      state.token = markdown;\n      return 'code';\n    }\n    else if (state.localMode) {\n      return state.localMode.token(stream, state.localState);\n    } else {\n      stream.skipToEnd();\n      return 'code';\n    }\n  }\n\n  // custom handleText to prevent emphasis in the middle of a word\n  // and add autolinking\n  function handleText(stream, mdState) {\n    var match;\n    if (stream.match(/^\\w+:\\/\\/\\S+/)) {\n      return 'linkhref';\n    }\n    if (stream.match(/^[^\\[*\\\\<>` _][^\\[*\\\\<>` ]*[^\\[*\\\\<>` _]/)) {\n      return mdMode.getType(mdState);\n    }\n    if (match = stream.match(/^[^\\[*\\\\<>` ]+/)) {\n      var word = match[0];\n      if (word[0] === '_' && word[word.length-1] === '_') {\n        stream.backUp(word.length);\n        return undefined;\n      }\n      return mdMode.getType(mdState);\n    }\n    if (stream.eatSpace()) {\n      return null;\n    }\n  }\n\n  return {\n    startState: function() {\n      var mdState = mdMode.startState();\n      mdState.text = handleText;\n      return {token: markdown, mode: \"markdown\", mdState: mdState,\n              localMode: null, localState: null};\n    },\n\n    copyState: function(state) {\n      return {token: state.token, mode: state.mode, mdState: CodeMirror.copyState(mdMode, state.mdState),\n              localMode: state.localMode,\n              localState: state.localMode ? CodeMirror.copyState(state.localMode, state.localState) : null};\n    },\n\n    token: function(stream, state) {\n      return state.token(stream, state);\n    }\n  }\n}, \"markdown\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/gfm/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: GFM mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"../xml/xml.js\"></script>\n    <script src=\"../markdown/markdown.js\"></script>\n    <script src=\"gfm.js\"></script>\n    <script src=\"../javascript/javascript.js\"></script>\n    <link rel=\"stylesheet\" href=\"../markdown/markdown.css\">\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: GFM mode</h1>\n\n<!-- source: http://daringfireball.net/projects/markdown/basics.text -->\n<form><textarea id=\"code\" name=\"code\">\nGithub Flavored Markdown\n========================\n\nEverything from markdown plus GFM features:\n\n## Fenced code blocks\n\n```javascript\nfor (var i = 0; i &lt; items.length; i++) {\n    console.log(items[i], i); // log them\n}\n```\n\nSee http://github.github.com/github-flavored-markdown/\n\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: 'gfm',\n        lineNumbers: true,\n        matchBrackets: true,\n        theme: \"default\"\n      });\n    </script>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/go/go.js",
    "content": "CodeMirror.defineMode(\"go\", function(config, parserConfig) {\n  var indentUnit = config.indentUnit;\n\n  var keywords = {\n    \"break\":true, \"case\":true, \"chan\":true, \"const\":true, \"continue\":true,\n    \"default\":true, \"defer\":true, \"else\":true, \"fallthrough\":true, \"for\":true,\n    \"func\":true, \"go\":true, \"goto\":true, \"if\":true, \"import\":true,\n    \"interface\":true, \"map\":true, \"package\":true, \"range\":true, \"return\":true,\n    \"select\":true, \"struct\":true, \"switch\":true, \"type\":true, \"var\":true,\n    \"bool\":true, \"byte\":true, \"complex64\":true, \"complex128\":true,\n    \"float32\":true, \"float64\":true, \"int8\":true, \"int16\":true, \"int32\":true,\n    \"int64\":true, \"string\":true, \"uint8\":true, \"uint16\":true, \"uint32\":true,\n    \"uint64\":true, \"int\":true, \"uint\":true, \"uintptr\":true\n  };\n\n  var atoms = {\n    \"true\":true, \"false\":true, \"iota\":true, \"nil\":true, \"append\":true,\n    \"cap\":true, \"close\":true, \"complex\":true, \"copy\":true, \"imag\":true,\n    \"len\":true, \"make\":true, \"new\":true, \"panic\":true, \"print\":true,\n    \"println\":true, \"real\":true, \"recover\":true\n  };\n\n  var blockKeywords = {\n    \"else\":true, \"for\":true, \"func\":true, \"if\":true, \"interface\":true,\n    \"select\":true, \"struct\":true, \"switch\":true\n  };\n\n  var isOperatorChar = /[+\\-*&^%:=<>!|\\/]/;\n\n  var curPunc;\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    if (ch == '\"' || ch == \"'\" || ch == \"`\") {\n      state.tokenize = tokenString(ch);\n      return state.tokenize(stream, state);\n    }\n    if (/[\\d\\.]/.test(ch)) {\n      if (ch == \".\") {\n        stream.match(/^[0-9]+([eE][\\-+]?[0-9]+)?/);\n      } else if (ch == \"0\") {\n        stream.match(/^[xX][0-9a-fA-F]+/) || stream.match(/^0[0-7]+/);\n      } else {\n        stream.match(/^[0-9]*\\.?[0-9]*([eE][\\-+]?[0-9]+)?/);\n      }\n      return \"number\";\n    }\n    if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch)) {\n      curPunc = ch;\n      return null\n    }\n    if (ch == \"/\") {\n      if (stream.eat(\"*\")) {\n        state.tokenize = tokenComment;\n        return tokenComment(stream, state);\n      }\n      if (stream.eat(\"/\")) {\n        stream.skipToEnd();\n        return \"comment\";\n      }\n    }\n    if (isOperatorChar.test(ch)) {\n      stream.eatWhile(isOperatorChar);\n      return \"operator\";\n    }\n    stream.eatWhile(/[\\w\\$_]/);\n    var cur = stream.current();\n    if (keywords.propertyIsEnumerable(cur)) {\n      if (cur == \"case\" || cur == \"default\") curPunc = \"case\";\n      return \"keyword\";\n    }\n    if (atoms.propertyIsEnumerable(cur)) return \"atom\";\n    return \"word\";\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var escaped = false, next, end = false;\n      while ((next = stream.next()) != null) {\n        if (next == quote && !escaped) {end = true; break;}\n        escaped = !escaped && next == \"\\\\\";\n      }\n      if (end || !(escaped || quote == \"`\"))\n        state.tokenize = tokenBase;\n      return \"string\";\n    };\n  }\n\n  function tokenComment(stream, state) {\n    var maybeEnd = false, ch;\n    while (ch = stream.next()) {\n      if (ch == \"/\" && maybeEnd) {\n        state.tokenize = tokenBase;\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return \"comment\";\n  }\n\n  function Context(indented, column, type, align, prev) {\n    this.indented = indented;\n    this.column = column;\n    this.type = type;\n    this.align = align;\n    this.prev = prev;\n  }\n  function pushContext(state, col, type) {\n    return state.context = new Context(state.indented, col, type, null, state.context);\n  }\n  function popContext(state) {\n    var t = state.context.type;\n    if (t == \")\" || t == \"]\" || t == \"}\")\n      state.indented = state.context.indented;\n    return state.context = state.context.prev;\n  }\n\n  // Interface\n\n  return {\n    startState: function(basecolumn) {\n      return {\n        tokenize: null,\n        context: new Context((basecolumn || 0) - indentUnit, 0, \"top\", false),\n        indented: 0,\n        startOfLine: true\n      };\n    },\n\n    token: function(stream, state) {\n      var ctx = state.context;\n      if (stream.sol()) {\n        if (ctx.align == null) ctx.align = false;\n        state.indented = stream.indentation();\n        state.startOfLine = true;\n        if (ctx.type == \"case\") ctx.type = \"}\";\n      }\n      if (stream.eatSpace()) return null;\n      curPunc = null;\n      var style = (state.tokenize || tokenBase)(stream, state);\n      if (style == \"comment\") return style;\n      if (ctx.align == null) ctx.align = true;\n\n      if (curPunc == \"{\") pushContext(state, stream.column(), \"}\");\n      else if (curPunc == \"[\") pushContext(state, stream.column(), \"]\");\n      else if (curPunc == \"(\") pushContext(state, stream.column(), \")\");\n      else if (curPunc == \"case\") ctx.type = \"case\"\n      else if (curPunc == \"}\" && ctx.type == \"}\") ctx = popContext(state);\n      else if (curPunc == ctx.type) popContext(state);\n      state.startOfLine = false;\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      if (state.tokenize != tokenBase && state.tokenize != null) return 0;\n      var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);\n      if (ctx.type == \"case\" && /^(?:case|default)\\b/.test(textAfter)) {\n        state.context.type = \"}\";\n        return ctx.indented;\n      }\n      var closing = firstChar == ctx.type;\n      if (ctx.align) return ctx.column + (closing ? 0 : 1);\n      else return ctx.indented + (closing ? 0 : indentUnit);\n    },\n\n    electricChars: \"{}:\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-go\", \"go\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/go/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Go mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <link rel=\"stylesheet\" href=\"../../theme/elegant.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"go.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n    <style>.CodeMirror {border:1px solid #999; background:#ffc}</style>\n  </head>\n  <body>\n    <h1>CodeMirror: Go mode</h1>\n\n<form><textarea id=\"code\" name=\"code\">\n// Prime Sieve in Go.\n// Taken from the Go specification.\n// Copyright © The Go Authors.\n\npackage main\n\nimport \"fmt\"\n\n// Send the sequence 2, 3, 4, ... to channel 'ch'.\nfunc generate(ch chan&lt;- int) {\n\tfor i := 2; ; i++ {\n\t\tch &lt;- i  // Send 'i' to channel 'ch'\n\t}\n}\n\n// Copy the values from channel 'src' to channel 'dst',\n// removing those divisible by 'prime'.\nfunc filter(src &lt;-chan int, dst chan&lt;- int, prime int) {\n\tfor i := range src {    // Loop over values received from 'src'.\n\t\tif i%prime != 0 {\n\t\t\tdst &lt;- i  // Send 'i' to channel 'dst'.\n\t\t}\n\t}\n}\n\n// The prime sieve: Daisy-chain filter processes together.\nfunc sieve() {\n\tch := make(chan int)  // Create a new channel.\n\tgo generate(ch)       // Start generate() as a subprocess.\n\tfor {\n\t\tprime := &lt;-ch\n\t\tfmt.Print(prime, \"\\n\")\n\t\tch1 := make(chan int)\n\t\tgo filter(ch, ch1, prime)\n\t\tch = ch1\n\t}\n}\n\nfunc main() {\n\tsieve()\n}\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        theme: \"elegant\",\n        matchBrackets: true,\n        indentUnit: 8,\n        tabSize: 8,\n        indentWithTabs: true,\n        mode: \"text/x-go\"\n      });\n    </script>\n\n    <p><strong>MIME type:</strong> <code>text/x-go</code></p>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/groovy/groovy.js",
    "content": "CodeMirror.defineMode(\"groovy\", function(config, parserConfig) {\n  function words(str) {\n    var obj = {}, words = str.split(\" \");\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n    return obj;\n  }\n  var keywords = words(\n    \"abstract as assert boolean break byte case catch char class const continue def default \" +\n    \"do double else enum extends final finally float for goto if implements import in \" +\n    \"instanceof int interface long native new package private protected public return \" +\n    \"short static strictfp super switch synchronized threadsafe throw throws transient \" +\n    \"try void volatile while\");\n  var blockKeywords = words(\"catch class do else finally for if switch try while enum interface def\");\n  var atoms = words(\"null true false this\");\n\n  var curPunc;\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    if (ch == '\"' || ch == \"'\") {\n      return startString(ch, stream, state);\n    }\n    if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch)) {\n      curPunc = ch;\n      return null\n    }\n    if (/\\d/.test(ch)) {\n      stream.eatWhile(/[\\w\\.]/);\n      if (stream.eat(/eE/)) { stream.eat(/\\+\\-/); stream.eatWhile(/\\d/); }\n      return \"number\";\n    }\n    if (ch == \"/\") {\n      if (stream.eat(\"*\")) {\n        state.tokenize.push(tokenComment);\n        return tokenComment(stream, state);\n      }\n      if (stream.eat(\"/\")) {\n        stream.skipToEnd();\n        return \"comment\";\n      }\n      if (expectExpression(state.lastToken)) {\n        return startString(ch, stream, state);\n      }\n    }\n    if (ch == \"-\" && stream.eat(\">\")) {\n      curPunc = \"->\";\n      return null;\n    }\n    if (/[+\\-*&%=<>!?|\\/~]/.test(ch)) {\n      stream.eatWhile(/[+\\-*&%=<>|~]/);\n      return \"operator\";\n    }\n    stream.eatWhile(/[\\w\\$_]/);\n    if (ch == \"@\") { stream.eatWhile(/[\\w\\$_\\.]/); return \"meta\"; }\n    if (state.lastToken == \".\") return \"property\";\n    if (stream.eat(\":\")) { curPunc = \"proplabel\"; return \"property\"; }\n    var cur = stream.current();\n    if (atoms.propertyIsEnumerable(cur)) { return \"atom\"; }\n    if (keywords.propertyIsEnumerable(cur)) {\n      if (blockKeywords.propertyIsEnumerable(cur)) curPunc = \"newstatement\";\n      return \"keyword\";\n    }\n    return \"word\";\n  }\n  tokenBase.isBase = true;\n\n  function startString(quote, stream, state) {\n    var tripleQuoted = false;\n    if (quote != \"/\" && stream.eat(quote)) {\n      if (stream.eat(quote)) tripleQuoted = true;\n      else return \"string\";\n    }\n    function t(stream, state) {\n      var escaped = false, next, end = !tripleQuoted;\n      while ((next = stream.next()) != null) {\n        if (next == quote && !escaped) {\n          if (!tripleQuoted) { break; }\n          if (stream.match(quote + quote)) { end = true; break; }\n        }\n        if (quote == '\"' && next == \"$\" && !escaped && stream.eat(\"{\")) {\n          state.tokenize.push(tokenBaseUntilBrace());\n          return \"string\";\n        }\n        escaped = !escaped && next == \"\\\\\";\n      }\n      if (end) state.tokenize.pop();\n      return \"string\";\n    }\n    state.tokenize.push(t);\n    return t(stream, state);\n  }\n\n  function tokenBaseUntilBrace() {\n    var depth = 1;\n    function t(stream, state) {\n      if (stream.peek() == \"}\") {\n        depth--;\n        if (depth == 0) {\n          state.tokenize.pop();\n          return state.tokenize[state.tokenize.length-1](stream, state);\n        }\n      } else if (stream.peek() == \"{\") {\n        depth++;\n      }\n      return tokenBase(stream, state);\n    }\n    t.isBase = true;\n    return t;\n  }\n\n  function tokenComment(stream, state) {\n    var maybeEnd = false, ch;\n    while (ch = stream.next()) {\n      if (ch == \"/\" && maybeEnd) {\n        state.tokenize.pop();\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return \"comment\";\n  }\n\n  function expectExpression(last) {\n    return !last || last == \"operator\" || last == \"->\" || /[\\.\\[\\{\\(,;:]/.test(last) ||\n      last == \"newstatement\" || last == \"keyword\" || last == \"proplabel\";\n  }\n\n  function Context(indented, column, type, align, prev) {\n    this.indented = indented;\n    this.column = column;\n    this.type = type;\n    this.align = align;\n    this.prev = prev;\n  }\n  function pushContext(state, col, type) {\n    return state.context = new Context(state.indented, col, type, null, state.context);\n  }\n  function popContext(state) {\n    var t = state.context.type;\n    if (t == \")\" || t == \"]\" || t == \"}\")\n      state.indented = state.context.indented;\n    return state.context = state.context.prev;\n  }\n\n  // Interface\n\n  return {\n    startState: function(basecolumn) {\n      return {\n        tokenize: [tokenBase],\n        context: new Context((basecolumn || 0) - config.indentUnit, 0, \"top\", false),\n        indented: 0,\n        startOfLine: true,\n        lastToken: null\n      };\n    },\n\n    token: function(stream, state) {\n      var ctx = state.context;\n      if (stream.sol()) {\n        if (ctx.align == null) ctx.align = false;\n        state.indented = stream.indentation();\n        state.startOfLine = true;\n        // Automatic semicolon insertion\n        if (ctx.type == \"statement\" && !expectExpression(state.lastToken)) {\n          popContext(state); ctx = state.context;\n        }\n      }\n      if (stream.eatSpace()) return null;\n      curPunc = null;\n      var style = state.tokenize[state.tokenize.length-1](stream, state);\n      if (style == \"comment\") return style;\n      if (ctx.align == null) ctx.align = true;\n\n      if ((curPunc == \";\" || curPunc == \":\") && ctx.type == \"statement\") popContext(state);\n      // Handle indentation for {x -> \\n ... }\n      else if (curPunc == \"->\" && ctx.type == \"statement\" && ctx.prev.type == \"}\") {\n        popContext(state);\n        state.context.align = false;\n      }\n      else if (curPunc == \"{\") pushContext(state, stream.column(), \"}\");\n      else if (curPunc == \"[\") pushContext(state, stream.column(), \"]\");\n      else if (curPunc == \"(\") pushContext(state, stream.column(), \")\");\n      else if (curPunc == \"}\") {\n        while (ctx.type == \"statement\") ctx = popContext(state);\n        if (ctx.type == \"}\") ctx = popContext(state);\n        while (ctx.type == \"statement\") ctx = popContext(state);\n      }\n      else if (curPunc == ctx.type) popContext(state);\n      else if (ctx.type == \"}\" || ctx.type == \"top\" || (ctx.type == \"statement\" && curPunc == \"newstatement\"))\n        pushContext(state, stream.column(), \"statement\");\n      state.startOfLine = false;\n      state.lastToken = curPunc || style;\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      if (!state.tokenize[state.tokenize.length-1].isBase) return 0;\n      var firstChar = textAfter && textAfter.charAt(0), ctx = state.context;\n      if (ctx.type == \"statement\" && !expectExpression(state.lastToken)) ctx = ctx.prev;\n      var closing = firstChar == ctx.type;\n      if (ctx.type == \"statement\") return ctx.indented + (firstChar == \"{\" ? 0 : config.indentUnit);\n      else if (ctx.align) return ctx.column + (closing ? 0 : 1);\n      else return ctx.indented + (closing ? 0 : config.indentUnit);\n    },\n\n    electricChars: \"{}\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-groovy\", \"groovy\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/groovy/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Groovy mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"groovy.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n    <style>.CodeMirror {border-top: 1px solid #500; border-bottom: 1px solid #500;}</style>\n  </head>\n  <body>\n    <h1>CodeMirror: Groovy mode</h1>\n\n<form><textarea id=\"code\" name=\"code\">\n//Pattern for groovy script\ndef p = ~/.*\\.groovy/\nnew File( 'd:\\\\scripts' ).eachFileMatch(p) {f ->\n  // imports list\n  def imports = []\n  f.eachLine {\n    // condition to detect an import instruction\n    ln -> if ( ln =~ '^import .*' ) {\n      imports << \"${ln - 'import '}\"\n    }\n  }\n  // print thmen\n  if ( ! imports.empty ) {\n    println f\n    imports.each{ println \"   $it\" }\n  }\n}\n\n/* Coin changer demo code from http://groovy.codehaus.org */\n\nenum UsCoin {\n  quarter(25), dime(10), nickel(5), penny(1)\n  UsCoin(v) { value = v }\n  final value\n}\n\nenum OzzieCoin {\n  fifty(50), twenty(20), ten(10), five(5)\n  OzzieCoin(v) { value = v }\n  final value\n}\n\ndef plural(word, count) {\n  if (count == 1) return word\n  word[-1] == 'y' ? word[0..-2] + \"ies\" : word + \"s\"\n}\n\ndef change(currency, amount) {\n  currency.values().inject([]){ list, coin ->\n     int count = amount / coin.value\n     amount = amount % coin.value\n     list += \"$count ${plural(coin.toString(), count)}\"\n  }\n}\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        mode: \"text/x-groovy\"\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-groovy</code></p>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/haskell/haskell.js",
    "content": "CodeMirror.defineMode(\"haskell\", function(cmCfg, modeCfg) {\n\n  function switchState(source, setState, f) {\n    setState(f);\n    return f(source, setState);\n  }\n  \n  // These should all be Unicode extended, as per the Haskell 2010 report\n  var smallRE = /[a-z_]/;\n  var largeRE = /[A-Z]/;\n  var digitRE = /[0-9]/;\n  var hexitRE = /[0-9A-Fa-f]/;\n  var octitRE = /[0-7]/;\n  var idRE = /[a-z_A-Z0-9']/;\n  var symbolRE = /[-!#$%&*+.\\/<=>?@\\\\^|~:]/;\n  var specialRE = /[(),;[\\]`{}]/;\n  var whiteCharRE = /[ \\t\\v\\f]/; // newlines are handled in tokenizer\n    \n  function normal(source, setState) {\n    if (source.eatWhile(whiteCharRE)) {\n      return null;\n    }\n      \n    var ch = source.next();\n    if (specialRE.test(ch)) {\n      if (ch == '{' && source.eat('-')) {\n        var t = \"comment\";\n        if (source.eat('#')) {\n          t = \"meta\";\n        }\n        return switchState(source, setState, ncomment(t, 1));\n      }\n      return null;\n    }\n    \n    if (ch == '\\'') {\n      if (source.eat('\\\\')) {\n        source.next();  // should handle other escapes here\n      }\n      else {\n        source.next();\n      }\n      if (source.eat('\\'')) {\n        return \"string\";\n      }\n      return \"error\";\n    }\n    \n    if (ch == '\"') {\n      return switchState(source, setState, stringLiteral);\n    }\n      \n    if (largeRE.test(ch)) {\n      source.eatWhile(idRE);\n      if (source.eat('.')) {\n        return \"qualifier\";\n      }\n      return \"variable-2\";\n    }\n      \n    if (smallRE.test(ch)) {\n      source.eatWhile(idRE);\n      return \"variable\";\n    }\n      \n    if (digitRE.test(ch)) {\n      if (ch == '0') {\n        if (source.eat(/[xX]/)) {\n          source.eatWhile(hexitRE); // should require at least 1\n          return \"integer\";\n        }\n        if (source.eat(/[oO]/)) {\n          source.eatWhile(octitRE); // should require at least 1\n          return \"number\";\n        }\n      }\n      source.eatWhile(digitRE);\n      var t = \"number\";\n      if (source.eat('.')) {\n        t = \"number\";\n        source.eatWhile(digitRE); // should require at least 1\n      }\n      if (source.eat(/[eE]/)) {\n        t = \"number\";\n        source.eat(/[-+]/);\n        source.eatWhile(digitRE); // should require at least 1\n      }\n      return t;\n    }\n      \n    if (symbolRE.test(ch)) {\n      if (ch == '-' && source.eat(/-/)) {\n        source.eatWhile(/-/);\n        if (!source.eat(symbolRE)) {\n          source.skipToEnd();\n          return \"comment\";\n        }\n      }\n      var t = \"variable\";\n      if (ch == ':') {\n        t = \"variable-2\";\n      }\n      source.eatWhile(symbolRE);\n      return t;    \n    }\n      \n    return \"error\";\n  }\n    \n  function ncomment(type, nest) {\n    if (nest == 0) {\n      return normal;\n    }\n    return function(source, setState) {\n      var currNest = nest;\n      while (!source.eol()) {\n        var ch = source.next();\n        if (ch == '{' && source.eat('-')) {\n          ++currNest;\n        }\n        else if (ch == '-' && source.eat('}')) {\n          --currNest;\n          if (currNest == 0) {\n            setState(normal);\n            return type;\n          }\n        }\n      }\n      setState(ncomment(type, currNest));\n      return type;\n    }\n  }\n    \n  function stringLiteral(source, setState) {\n    while (!source.eol()) {\n      var ch = source.next();\n      if (ch == '\"') {\n        setState(normal);\n        return \"string\";\n      }\n      if (ch == '\\\\') {\n        if (source.eol() || source.eat(whiteCharRE)) {\n          setState(stringGap);\n          return \"string\";\n        }\n        if (source.eat('&')) {\n        }\n        else {\n          source.next(); // should handle other escapes here\n        }\n      }\n    }\n    setState(normal);\n    return \"error\";\n  }\n  \n  function stringGap(source, setState) {\n    if (source.eat('\\\\')) {\n      return switchState(source, setState, stringLiteral);\n    }\n    source.next();\n    setState(normal);\n    return \"error\";\n  }\n  \n  \n  var wellKnownWords = (function() {\n    var wkw = {};\n    function setType(t) {\n      return function () {\n        for (var i = 0; i < arguments.length; i++)\n          wkw[arguments[i]] = t;\n      }\n    }\n    \n    setType(\"keyword\")(\n      \"case\", \"class\", \"data\", \"default\", \"deriving\", \"do\", \"else\", \"foreign\",\n      \"if\", \"import\", \"in\", \"infix\", \"infixl\", \"infixr\", \"instance\", \"let\",\n      \"module\", \"newtype\", \"of\", \"then\", \"type\", \"where\", \"_\");\n      \n    setType(\"keyword\")(\n      \"\\.\\.\", \":\", \"::\", \"=\", \"\\\\\", \"\\\"\", \"<-\", \"->\", \"@\", \"~\", \"=>\");\n      \n    setType(\"builtin\")(\n      \"!!\", \"$!\", \"$\", \"&&\", \"+\", \"++\", \"-\", \".\", \"/\", \"/=\", \"<\", \"<=\", \"=<<\",\n      \"==\", \">\", \">=\", \">>\", \">>=\", \"^\", \"^^\", \"||\", \"*\", \"**\");\n      \n    setType(\"builtin\")(\n      \"Bool\", \"Bounded\", \"Char\", \"Double\", \"EQ\", \"Either\", \"Enum\", \"Eq\",\n      \"False\", \"FilePath\", \"Float\", \"Floating\", \"Fractional\", \"Functor\", \"GT\",\n      \"IO\", \"IOError\", \"Int\", \"Integer\", \"Integral\", \"Just\", \"LT\", \"Left\",\n      \"Maybe\", \"Monad\", \"Nothing\", \"Num\", \"Ord\", \"Ordering\", \"Rational\", \"Read\",\n      \"ReadS\", \"Real\", \"RealFloat\", \"RealFrac\", \"Right\", \"Show\", \"ShowS\",\n      \"String\", \"True\");\n      \n    setType(\"builtin\")(\n      \"abs\", \"acos\", \"acosh\", \"all\", \"and\", \"any\", \"appendFile\", \"asTypeOf\",\n      \"asin\", \"asinh\", \"atan\", \"atan2\", \"atanh\", \"break\", \"catch\", \"ceiling\",\n      \"compare\", \"concat\", \"concatMap\", \"const\", \"cos\", \"cosh\", \"curry\",\n      \"cycle\", \"decodeFloat\", \"div\", \"divMod\", \"drop\", \"dropWhile\", \"either\",\n      \"elem\", \"encodeFloat\", \"enumFrom\", \"enumFromThen\", \"enumFromThenTo\",\n      \"enumFromTo\", \"error\", \"even\", \"exp\", \"exponent\", \"fail\", \"filter\",\n      \"flip\", \"floatDigits\", \"floatRadix\", \"floatRange\", \"floor\", \"fmap\",\n      \"foldl\", \"foldl1\", \"foldr\", \"foldr1\", \"fromEnum\", \"fromInteger\",\n      \"fromIntegral\", \"fromRational\", \"fst\", \"gcd\", \"getChar\", \"getContents\",\n      \"getLine\", \"head\", \"id\", \"init\", \"interact\", \"ioError\", \"isDenormalized\",\n      \"isIEEE\", \"isInfinite\", \"isNaN\", \"isNegativeZero\", \"iterate\", \"last\",\n      \"lcm\", \"length\", \"lex\", \"lines\", \"log\", \"logBase\", \"lookup\", \"map\",\n      \"mapM\", \"mapM_\", \"max\", \"maxBound\", \"maximum\", \"maybe\", \"min\", \"minBound\",\n      \"minimum\", \"mod\", \"negate\", \"not\", \"notElem\", \"null\", \"odd\", \"or\",\n      \"otherwise\", \"pi\", \"pred\", \"print\", \"product\", \"properFraction\",\n      \"putChar\", \"putStr\", \"putStrLn\", \"quot\", \"quotRem\", \"read\", \"readFile\",\n      \"readIO\", \"readList\", \"readLn\", \"readParen\", \"reads\", \"readsPrec\",\n      \"realToFrac\", \"recip\", \"rem\", \"repeat\", \"replicate\", \"return\", \"reverse\",\n      \"round\", \"scaleFloat\", \"scanl\", \"scanl1\", \"scanr\", \"scanr1\", \"seq\",\n      \"sequence\", \"sequence_\", \"show\", \"showChar\", \"showList\", \"showParen\",\n      \"showString\", \"shows\", \"showsPrec\", \"significand\", \"signum\", \"sin\",\n      \"sinh\", \"snd\", \"span\", \"splitAt\", \"sqrt\", \"subtract\", \"succ\", \"sum\",\n      \"tail\", \"take\", \"takeWhile\", \"tan\", \"tanh\", \"toEnum\", \"toInteger\",\n      \"toRational\", \"truncate\", \"uncurry\", \"undefined\", \"unlines\", \"until\",\n      \"unwords\", \"unzip\", \"unzip3\", \"userError\", \"words\", \"writeFile\", \"zip\",\n      \"zip3\", \"zipWith\", \"zipWith3\");\n      \n    return wkw;\n  })();\n    \n  \n  \n  return {\n    startState: function ()  { return { f: normal }; },\n    copyState:  function (s) { return { f: s.f }; },\n    \n    token: function(stream, state) {\n      var t = state.f(stream, function(s) { state.f = s; });\n      var w = stream.current();\n      return (w in wellKnownWords) ? wellKnownWords[w] : t;\n    }\n  };\n\n});\n\nCodeMirror.defineMIME(\"text/x-haskell\", \"haskell\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/haskell/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Haskell mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"haskell.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../theme/elegant.css\">\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: Haskell mode</h1>\n\n<form><textarea id=\"code\" name=\"code\">\nmodule UniquePerms (\n    uniquePerms\n    )\nwhere\n\n-- | Find all unique permutations of a list where there might be duplicates.\nuniquePerms :: (Eq a) => [a] -> [[a]]\nuniquePerms = permBag . makeBag\n\n-- | An unordered collection where duplicate values are allowed,\n-- but represented with a single value and a count.\ntype Bag a = [(a, Int)]\n\nmakeBag :: (Eq a) => [a] -> Bag a\nmakeBag [] = []\nmakeBag (a:as) = mix a $ makeBag as\n  where\n    mix a []                        = [(a,1)]\n    mix a (bn@(b,n):bs) | a == b    = (b,n+1):bs\n                        | otherwise = bn : mix a bs\n\npermBag :: Bag a -> [[a]]\npermBag [] = [[]]\npermBag bs = concatMap (\\(f,cs) -> map (f:) $ permBag cs) . oneOfEach $ bs\n  where\n    oneOfEach [] = []\n    oneOfEach (an@(a,n):bs) =\n        let bs' = if n == 1 then bs else (a,n-1):bs\n        in (a,bs') : mapSnd (an:) (oneOfEach bs)\n    \n    apSnd f (a,b) = (a, f b)\n    mapSnd = map . apSnd\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        theme: \"elegant\"\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-haskell</code>.</p>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/htmlembedded/htmlembedded.js",
    "content": "CodeMirror.defineMode(\"htmlembedded\", function(config, parserConfig) {\n  \n  //config settings\n  var scriptStartRegex = parserConfig.scriptStartRegex || /^<%/i,\n      scriptEndRegex = parserConfig.scriptEndRegex || /^%>/i;\n  \n  //inner modes\n  var scriptingMode, htmlMixedMode;\n  \n  //tokenizer when in html mode\n  function htmlDispatch(stream, state) {\n      if (stream.match(scriptStartRegex, false)) {\n          state.token=scriptingDispatch;\n          return scriptingMode.token(stream, state.scriptState);\n          }\n      else\n          return htmlMixedMode.token(stream, state.htmlState);\n    }\n\n  //tokenizer when in scripting mode\n  function scriptingDispatch(stream, state) {\n      if (stream.match(scriptEndRegex, false))  {\n          state.token=htmlDispatch;\n          return htmlMixedMode.token(stream, state.htmlState);\n         }\n      else\n          return scriptingMode.token(stream, state.scriptState);\n         }\n\n\n  return {\n    startState: function() {\n      scriptingMode = scriptingMode || CodeMirror.getMode(config, parserConfig.scriptingModeSpec);\n      htmlMixedMode = htmlMixedMode || CodeMirror.getMode(config, \"htmlmixed\");\n      return { \n          token :  parserConfig.startOpen ? scriptingDispatch : htmlDispatch,\n          htmlState : htmlMixedMode.startState(),\n          scriptState : scriptingMode.startState()\n          }\n    },\n\n    token: function(stream, state) {\n      return state.token(stream, state);\n    },\n\n    indent: function(state, textAfter) {\n      if (state.token == htmlDispatch)\n        return htmlMixedMode.indent(state.htmlState, textAfter);\n      else\n        return scriptingMode.indent(state.scriptState, textAfter);\n    },\n    \n    copyState: function(state) {\n      return {\n       token : state.token,\n       htmlState : CodeMirror.copyState(htmlMixedMode, state.htmlState),\n       scriptState : CodeMirror.copyState(scriptingMode, state.scriptState)\n       }\n    },\n    \n\n    electricChars: \"/{}:\"\n  }\n}, \"htmlmixed\");\n\nCodeMirror.defineMIME(\"application/x-ejs\", { name: \"htmlembedded\", scriptingModeSpec:\"javascript\"});\nCodeMirror.defineMIME(\"application/x-aspx\", { name: \"htmlembedded\", scriptingModeSpec:\"text/x-csharp\"});\nCodeMirror.defineMIME(\"application/x-jsp\", { name: \"htmlembedded\", scriptingModeSpec:\"text/x-java\"});\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/htmlembedded/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Html Embedded Scripts mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"../xml/xml.js\"></script>\n    <script src=\"../javascript/javascript.js\"></script>\n    <script src=\"../css/css.js\"></script>\n    <script src=\"../htmlmixed/htmlmixed.js\"></script>\n    <script src=\"htmlembedded.js\"></script>\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: Html Embedded Scripts mode</h1>\n\n<form><textarea id=\"code\" name=\"code\">\n<%\nfunction hello(who) {\n\treturn \"Hello \" + who;\n}\n%>\nThis is an example of EJS (embedded javascript)\n<p>The program says <%= hello(\"world\") %>.</p>\n<script>\n\talert(\"And here is some normal JS code\"); // also colored\n</script>\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        mode: \"application/x-ejs\",\n        indentUnit: 4,\n        indentWithTabs: true,\n        enterMode: \"keep\",\n        tabMode: \"shift\"\n      });\n    </script>\n\n    <p>Mode for html embedded scripts like JSP and ASP.NET. Depends on HtmlMixed which in turn depends on\n    JavaScript, CSS and XML.<br />Other dependancies include those of the scriping language chosen.</p>\n\n    <p><strong>MIME types defined:</strong> <code>application/x-aspx</code> (ASP.NET), \n    <code>application/x-ejs</code> (Embedded Javascript), <code>application/x-jsp</code> (JavaServer Pages)</p>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/htmlmixed/htmlmixed.js",
    "content": "CodeMirror.defineMode(\"htmlmixed\", function(config, parserConfig) {\n  var htmlMode = CodeMirror.getMode(config, {name: \"xml\", htmlMode: true});\n  var jsMode = CodeMirror.getMode(config, \"javascript\");\n  var cssMode = CodeMirror.getMode(config, \"css\");\n\n  function html(stream, state) {\n    var style = htmlMode.token(stream, state.htmlState);\n    if (style == \"tag\" && stream.current() == \">\" && state.htmlState.context) {\n      if (/^script$/i.test(state.htmlState.context.tagName)) {\n        state.token = javascript;\n        state.localState = jsMode.startState(htmlMode.indent(state.htmlState, \"\"));\n        state.mode = \"javascript\";\n      }\n      else if (/^style$/i.test(state.htmlState.context.tagName)) {\n        state.token = css;\n        state.localState = cssMode.startState(htmlMode.indent(state.htmlState, \"\"));\n        state.mode = \"css\";\n      }\n    }\n    return style;\n  }\n  function maybeBackup(stream, pat, style) {\n    var cur = stream.current();\n    var close = cur.search(pat);\n    if (close > -1) stream.backUp(cur.length - close);\n    return style;\n  }\n  function javascript(stream, state) {\n    if (stream.match(/^<\\/\\s*script\\s*>/i, false)) {\n      state.token = html;\n      state.localState = null;\n      state.mode = \"html\";\n      return html(stream, state);\n    }\n    return maybeBackup(stream, /<\\/\\s*script\\s*>/,\n                       jsMode.token(stream, state.localState));\n  }\n  function css(stream, state) {\n    if (stream.match(/^<\\/\\s*style\\s*>/i, false)) {\n      state.token = html;\n      state.localState = null;\n      state.mode = \"html\";\n      return html(stream, state);\n    }\n    return maybeBackup(stream, /<\\/\\s*style\\s*>/,\n                       cssMode.token(stream, state.localState));\n  }\n\n  return {\n    startState: function() {\n      var state = htmlMode.startState();\n      return {token: html, localState: null, mode: \"html\", htmlState: state};\n    },\n\n    copyState: function(state) {\n      if (state.localState)\n        var local = CodeMirror.copyState(state.token == css ? cssMode : jsMode, state.localState);\n      return {token: state.token, localState: local, mode: state.mode,\n              htmlState: CodeMirror.copyState(htmlMode, state.htmlState)};\n    },\n\n    token: function(stream, state) {\n      return state.token(stream, state);\n    },\n\n    indent: function(state, textAfter) {\n      if (state.token == html || /^\\s*<\\//.test(textAfter))\n        return htmlMode.indent(state.htmlState, textAfter);\n      else if (state.token == javascript)\n        return jsMode.indent(state.localState, textAfter);\n      else\n        return cssMode.indent(state.localState, textAfter);\n    },\n\n    compareStates: function(a, b) {\n      if (a.mode != b.mode) return false;\n      if (a.localState) return CodeMirror.Pass;\n      return htmlMode.compareStates(a.htmlState, b.htmlState);\n    },\n\n    electricChars: \"/{}:\"\n  }\n}, \"xml\", \"javascript\", \"css\");\n\nCodeMirror.defineMIME(\"text/html\", \"htmlmixed\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/htmlmixed/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: HTML mixed mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"../xml/xml.js\"></script>\n    <script src=\"../javascript/javascript.js\"></script>\n    <script src=\"../css/css.js\"></script>\n    <script src=\"htmlmixed.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n    <style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n  </head>\n  <body>\n    <h1>CodeMirror: HTML mixed mode</h1>\n    <form><textarea id=\"code\" name=\"code\">\n<html style=\"color: green\">\n  <!-- this is a comment -->\n  <head>\n    <title>Mixed HTML Example</title>\n    <style type=\"text/css\">\n      h1 {font-family: comic sans; color: #f0f;}\n      div {background: yellow !important;}\n      body {\n        max-width: 50em;\n        margin: 1em 2em 1em 5em;\n      }\n    </style>\n  </head>\n  <body>\n    <h1>Mixed HTML Example</h1>\n    <script>\n      function jsFunc(arg1, arg2) {\n        if (arg1 && arg2) document.body.innerHTML = \"achoo\";\n      }\n    </script>\n  </body>\n</html>\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {mode: \"text/html\", tabMode: \"indent\"});\n    </script>\n\n    <p>The HTML mixed mode depends on the XML, JavaScript, and CSS modes.</p>\n\n    <p><strong>MIME types defined:</strong> <code>text/html</code>\n    (redefined, only takes effect if you load this parser after the\n    XML parser).</p>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/javascript/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: JavaScript mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"javascript.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n  </head>\n  <body>\n    <h1>CodeMirror: JavaScript mode</h1>\n\n<div><textarea id=\"code\" name=\"code\">\n// Demo code (the actual new parser character stream implementation)\n\nfunction StringStream(string) {\n  this.pos = 0;\n  this.string = string;\n}\n\nStringStream.prototype = {\n  done: function() {return this.pos >= this.string.length;},\n  peek: function() {return this.string.charAt(this.pos);},\n  next: function() {\n    if (this.pos &lt; this.string.length)\n      return this.string.charAt(this.pos++);\n  },\n  eat: function(match) {\n    var ch = this.string.charAt(this.pos);\n    if (typeof match == \"string\") var ok = ch == match;\n    else var ok = ch &amp;&amp; match.test ? match.test(ch) : match(ch);\n    if (ok) {this.pos++; return ch;}\n  },\n  eatWhile: function(match) {\n    var start = this.pos;\n    while (this.eat(match));\n    if (this.pos > start) return this.string.slice(start, this.pos);\n  },\n  backUp: function(n) {this.pos -= n;},\n  column: function() {return this.pos;},\n  eatSpace: function() {\n    var start = this.pos;\n    while (/\\s/.test(this.string.charAt(this.pos))) this.pos++;\n    return this.pos - start;\n  },\n  match: function(pattern, consume, caseInsensitive) {\n    if (typeof pattern == \"string\") {\n      function cased(str) {return caseInsensitive ? str.toLowerCase() : str;}\n      if (cased(this.string).indexOf(cased(pattern), this.pos) == this.pos) {\n        if (consume !== false) this.pos += str.length;\n        return true;\n      }\n    }\n    else {\n      var match = this.string.slice(this.pos).match(pattern);\n      if (match &amp;&amp; consume !== false) this.pos += match[0].length;\n      return match;\n    }\n  }\n};\n</textarea></div>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true\n      });\n    </script>\n\n    <p>JavaScript mode supports a single configuration\n    option, <code>json</code>, which will set the mode to expect JSON\n    data rather than a JavaScript program.</p>\n\n    <p><strong>MIME types defined:</strong> <code>text/javascript</code>, <code>application/json</code>.</p>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/javascript/javascript.js",
    "content": "CodeMirror.defineMode(\"javascript\", function(config, parserConfig) {\n  var indentUnit = config.indentUnit;\n  var jsonMode = parserConfig.json;\n\n  // Tokenizer\n\n  var keywords = function(){\n    function kw(type) {return {type: type, style: \"keyword\"};}\n    var A = kw(\"keyword a\"), B = kw(\"keyword b\"), C = kw(\"keyword c\");\n    var operator = kw(\"operator\"), atom = {type: \"atom\", style: \"atom\"};\n    return {\n      \"if\": A, \"while\": A, \"with\": A, \"else\": B, \"do\": B, \"try\": B, \"finally\": B,\n      \"return\": C, \"break\": C, \"continue\": C, \"new\": C, \"delete\": C, \"throw\": C,\n      \"var\": kw(\"var\"), \"const\": kw(\"var\"), \"let\": kw(\"var\"),\n      \"function\": kw(\"function\"), \"catch\": kw(\"catch\"),\n      \"for\": kw(\"for\"), \"switch\": kw(\"switch\"), \"case\": kw(\"case\"), \"default\": kw(\"default\"),\n      \"in\": operator, \"typeof\": operator, \"instanceof\": operator,\n      \"true\": atom, \"false\": atom, \"null\": atom, \"undefined\": atom, \"NaN\": atom, \"Infinity\": atom\n    };\n  }();\n\n  var isOperatorChar = /[+\\-*&%=<>!?|]/;\n\n  function chain(stream, state, f) {\n    state.tokenize = f;\n    return f(stream, state);\n  }\n\n  function nextUntilUnescaped(stream, end) {\n    var escaped = false, next;\n    while ((next = stream.next()) != null) {\n      if (next == end && !escaped)\n        return false;\n      escaped = !escaped && next == \"\\\\\";\n    }\n    return escaped;\n  }\n\n  // Used as scratch variables to communicate multiple values without\n  // consing up tons of objects.\n  var type, content;\n  function ret(tp, style, cont) {\n    type = tp; content = cont;\n    return style;\n  }\n\n  function jsTokenBase(stream, state) {\n    var ch = stream.next();\n    if (ch == '\"' || ch == \"'\")\n      return chain(stream, state, jsTokenString(ch));\n    else if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch))\n      return ret(ch);\n    else if (ch == \"0\" && stream.eat(/x/i)) {\n      stream.eatWhile(/[\\da-f]/i);\n      return ret(\"number\", \"number\");\n    }      \n    else if (/\\d/.test(ch) || ch == \"-\" && stream.eat(/\\d/)) {\n      stream.match(/^\\d*(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/);\n      return ret(\"number\", \"number\");\n    }\n    else if (ch == \"/\") {\n      if (stream.eat(\"*\")) {\n        return chain(stream, state, jsTokenComment);\n      }\n      else if (stream.eat(\"/\")) {\n        stream.skipToEnd();\n        return ret(\"comment\", \"comment\");\n      }\n      else if (state.reAllowed) {\n        nextUntilUnescaped(stream, \"/\");\n        stream.eatWhile(/[gimy]/); // 'y' is \"sticky\" option in Mozilla\n        return ret(\"regexp\", \"string-2\");\n      }\n      else {\n        stream.eatWhile(isOperatorChar);\n        return ret(\"operator\", null, stream.current());\n      }\n    }\n    else if (ch == \"#\") {\n        stream.skipToEnd();\n        return ret(\"error\", \"error\");\n    }\n    else if (isOperatorChar.test(ch)) {\n      stream.eatWhile(isOperatorChar);\n      return ret(\"operator\", null, stream.current());\n    }\n    else {\n      stream.eatWhile(/[\\w\\$_]/);\n      var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word];\n      return (known && state.kwAllowed) ? ret(known.type, known.style, word) :\n                     ret(\"variable\", \"variable\", word);\n    }\n  }\n\n  function jsTokenString(quote) {\n    return function(stream, state) {\n      if (!nextUntilUnescaped(stream, quote))\n        state.tokenize = jsTokenBase;\n      return ret(\"string\", \"string\");\n    };\n  }\n\n  function jsTokenComment(stream, state) {\n    var maybeEnd = false, ch;\n    while (ch = stream.next()) {\n      if (ch == \"/\" && maybeEnd) {\n        state.tokenize = jsTokenBase;\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return ret(\"comment\", \"comment\");\n  }\n\n  // Parser\n\n  var atomicTypes = {\"atom\": true, \"number\": true, \"variable\": true, \"string\": true, \"regexp\": true};\n\n  function JSLexical(indented, column, type, align, prev, info) {\n    this.indented = indented;\n    this.column = column;\n    this.type = type;\n    this.prev = prev;\n    this.info = info;\n    if (align != null) this.align = align;\n  }\n\n  function inScope(state, varname) {\n    for (var v = state.localVars; v; v = v.next)\n      if (v.name == varname) return true;\n  }\n\n  function parseJS(state, style, type, content, stream) {\n    var cc = state.cc;\n    // Communicate our context to the combinators.\n    // (Less wasteful than consing up a hundred closures on every call.)\n    cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc;\n  \n    if (!state.lexical.hasOwnProperty(\"align\"))\n      state.lexical.align = true;\n\n    while(true) {\n      var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;\n      if (combinator(type, content)) {\n        while(cc.length && cc[cc.length - 1].lex)\n          cc.pop()();\n        if (cx.marked) return cx.marked;\n        if (type == \"variable\" && inScope(state, content)) return \"variable-2\";\n        return style;\n      }\n    }\n  }\n\n  // Combinator utils\n\n  var cx = {state: null, column: null, marked: null, cc: null};\n  function pass() {\n    for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);\n  }\n  function cont() {\n    pass.apply(null, arguments);\n    return true;\n  }\n  function register(varname) {\n    var state = cx.state;\n    if (state.context) {\n      cx.marked = \"def\";\n      for (var v = state.localVars; v; v = v.next)\n        if (v.name == varname) return;\n      state.localVars = {name: varname, next: state.localVars};\n    }\n  }\n\n  // Combinators\n\n  var defaultVars = {name: \"this\", next: {name: \"arguments\"}};\n  function pushcontext() {\n    if (!cx.state.context) cx.state.localVars = defaultVars;\n    cx.state.context = {prev: cx.state.context, vars: cx.state.localVars};\n  }\n  function popcontext() {\n    cx.state.localVars = cx.state.context.vars;\n    cx.state.context = cx.state.context.prev;\n  }\n  function pushlex(type, info) {\n    var result = function() {\n      var state = cx.state;\n      state.lexical = new JSLexical(state.indented, cx.stream.column(), type, null, state.lexical, info)\n    };\n    result.lex = true;\n    return result;\n  }\n  function poplex() {\n    var state = cx.state;\n    if (state.lexical.prev) {\n      if (state.lexical.type == \")\")\n        state.indented = state.lexical.indented;\n      state.lexical = state.lexical.prev;\n    }\n  }\n  poplex.lex = true;\n\n  function expect(wanted) {\n    return function expecting(type) {\n      if (type == wanted) return cont();\n      else if (wanted == \";\") return pass();\n      else return cont(arguments.callee);\n    };\n  }\n\n  function statement(type) {\n    if (type == \"var\") return cont(pushlex(\"vardef\"), vardef1, expect(\";\"), poplex);\n    if (type == \"keyword a\") return cont(pushlex(\"form\"), expression, statement, poplex);\n    if (type == \"keyword b\") return cont(pushlex(\"form\"), statement, poplex);\n    if (type == \"{\") return cont(pushlex(\"}\"), block, poplex);\n    if (type == \";\") return cont();\n    if (type == \"function\") return cont(functiondef);\n    if (type == \"for\") return cont(pushlex(\"form\"), expect(\"(\"), pushlex(\")\"), forspec1, expect(\")\"),\n                                      poplex, statement, poplex);\n    if (type == \"variable\") return cont(pushlex(\"stat\"), maybelabel);\n    if (type == \"switch\") return cont(pushlex(\"form\"), expression, pushlex(\"}\", \"switch\"), expect(\"{\"),\n                                         block, poplex, poplex);\n    if (type == \"case\") return cont(expression, expect(\":\"));\n    if (type == \"default\") return cont(expect(\":\"));\n    if (type == \"catch\") return cont(pushlex(\"form\"), pushcontext, expect(\"(\"), funarg, expect(\")\"),\n                                        statement, poplex, popcontext);\n    return pass(pushlex(\"stat\"), expression, expect(\";\"), poplex);\n  }\n  function expression(type) {\n    if (atomicTypes.hasOwnProperty(type)) return cont(maybeoperator);\n    if (type == \"function\") return cont(functiondef);\n    if (type == \"keyword c\") return cont(maybeexpression);\n    if (type == \"(\") return cont(pushlex(\")\"), maybeexpression, expect(\")\"), poplex, maybeoperator);\n    if (type == \"operator\") return cont(expression);\n    if (type == \"[\") return cont(pushlex(\"]\"), commasep(expression, \"]\"), poplex, maybeoperator);\n    if (type == \"{\") return cont(pushlex(\"}\"), commasep(objprop, \"}\"), poplex, maybeoperator);\n    return cont();\n  }\n  function maybeexpression(type) {\n    if (type.match(/[;\\}\\)\\],]/)) return pass();\n    return pass(expression);\n  }\n    \n  function maybeoperator(type, value) {\n    if (type == \"operator\" && /\\+\\+|--/.test(value)) return cont(maybeoperator);\n    if (type == \"operator\" || type == \":\") return cont(expression);\n    if (type == \";\") return;\n    if (type == \"(\") return cont(pushlex(\")\"), commasep(expression, \")\"), poplex, maybeoperator);\n    if (type == \".\") return cont(property, maybeoperator);\n    if (type == \"[\") return cont(pushlex(\"]\"), expression, expect(\"]\"), poplex, maybeoperator);\n  }\n  function maybelabel(type) {\n    if (type == \":\") return cont(poplex, statement);\n    return pass(maybeoperator, expect(\";\"), poplex);\n  }\n  function property(type) {\n    if (type == \"variable\") {cx.marked = \"property\"; return cont();}\n  }\n  function objprop(type) {\n    if (type == \"variable\") cx.marked = \"property\";\n    if (atomicTypes.hasOwnProperty(type)) return cont(expect(\":\"), expression);\n  }\n  function commasep(what, end) {\n    function proceed(type) {\n      if (type == \",\") return cont(what, proceed);\n      if (type == end) return cont();\n      return cont(expect(end));\n    }\n    return function commaSeparated(type) {\n      if (type == end) return cont();\n      else return pass(what, proceed);\n    };\n  }\n  function block(type) {\n    if (type == \"}\") return cont();\n    return pass(statement, block);\n  }\n  function vardef1(type, value) {\n    if (type == \"variable\"){register(value); return cont(vardef2);}\n    return cont();\n  }\n  function vardef2(type, value) {\n    if (value == \"=\") return cont(expression, vardef2);\n    if (type == \",\") return cont(vardef1);\n  }\n  function forspec1(type) {\n    if (type == \"var\") return cont(vardef1, forspec2);\n    if (type == \";\") return pass(forspec2);\n    if (type == \"variable\") return cont(formaybein);\n    return pass(forspec2);\n  }\n  function formaybein(type, value) {\n    if (value == \"in\") return cont(expression);\n    return cont(maybeoperator, forspec2);\n  }\n  function forspec2(type, value) {\n    if (type == \";\") return cont(forspec3);\n    if (value == \"in\") return cont(expression);\n    return cont(expression, expect(\";\"), forspec3);\n  }\n  function forspec3(type) {\n    if (type != \")\") cont(expression);\n  }\n  function functiondef(type, value) {\n    if (type == \"variable\") {register(value); return cont(functiondef);}\n    if (type == \"(\") return cont(pushlex(\")\"), pushcontext, commasep(funarg, \")\"), poplex, statement, popcontext);\n  }\n  function funarg(type, value) {\n    if (type == \"variable\") {register(value); return cont();}\n  }\n\n  // Interface\n\n  return {\n    startState: function(basecolumn) {\n      return {\n        tokenize: jsTokenBase,\n        reAllowed: true,\n        kwAllowed: true,\n        cc: [],\n        lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, \"block\", false),\n        localVars: parserConfig.localVars,\n        context: parserConfig.localVars && {vars: parserConfig.localVars},\n        indented: 0\n      };\n    },\n\n    token: function(stream, state) {\n      if (stream.sol()) {\n        if (!state.lexical.hasOwnProperty(\"align\"))\n          state.lexical.align = false;\n        state.indented = stream.indentation();\n      }\n      if (stream.eatSpace()) return null;\n      var style = state.tokenize(stream, state);\n      if (type == \"comment\") return style;\n      state.reAllowed = !!(type == \"operator\" || type == \"keyword c\" || type.match(/^[\\[{}\\(,;:]$/));\n      state.kwAllowed = type != '.';\n      return parseJS(state, style, type, content, stream);\n    },\n\n    indent: function(state, textAfter) {\n      if (state.tokenize != jsTokenBase) return 0;\n      var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical;\n      if (lexical.type == \"stat\" && firstChar == \"}\") lexical = lexical.prev;\n      var type = lexical.type, closing = firstChar == type;\n      if (type == \"vardef\") return lexical.indented + 4;\n      else if (type == \"form\" && firstChar == \"{\") return lexical.indented;\n      else if (type == \"stat\" || type == \"form\") return lexical.indented + indentUnit;\n      else if (lexical.info == \"switch\" && !closing)\n        return lexical.indented + (/^(?:case|default)\\b/.test(textAfter) ? indentUnit : 2 * indentUnit);\n      else if (lexical.align) return lexical.column + (closing ? 0 : 1);\n      else return lexical.indented + (closing ? 0 : indentUnit);\n    },\n\n    electricChars: \":{}\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/javascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/json\", {name: \"javascript\", json: true});\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/jinja2/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Jinja2 mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"jinja2.js\"></script>\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: Jinja2 mode</h1>\n    <form><textarea id=\"code\" name=\"code\">\n&lt;html style=\"color: green\"&gt;\n  &lt;!-- this is a comment --&gt;\n  &lt;head&gt;\n    &lt;title&gt;Jinja2 Example&lt;/title&gt;\n  &lt;/head&gt;\n  &lt;body&gt;\n    &lt;ul&gt;\n    {# this is a comment #}\n    {%- for item in li -%}\n      &lt;li&gt;\n        {{ item.label }}\n      &lt;/li&gt;\n    {% endfor -%}\n    &lt;/ul&gt;\n  &lt;/body&gt;\n&lt;/html&gt;\n</textarea></form>\n    <script>\n      var editor =\n      CodeMirror.fromTextArea(document.getElementById(\"code\"), {mode:\n        {name: \"jinja2\", htmlMode: true}});\n    </script>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/jinja2/jinja2.js",
    "content": "CodeMirror.defineMode(\"jinja2\", function(config, parserConf) {\n    var keywords = [\"block\", \"endblock\", \"for\", \"endfor\", \"in\", \"true\", \"false\", \n                    \"loop\", \"none\", \"self\", \"super\", \"if\", \"as\", \"not\", \"and\",\n                    \"else\", \"import\", \"with\", \"without\", \"context\"];\n    keywords = new RegExp(\"^((\" + keywords.join(\")|(\") + \"))\\\\b\");\n\n    function tokenBase (stream, state) {\n        var ch = stream.next();\n        if (ch == \"{\") {\n            if (ch = stream.eat(/\\{|%|#/)) {\n                stream.eat(\"-\");\n                state.tokenize = inTag(ch);\n                return \"tag\";\n            }\n        }\n    }\n    function inTag (close) {\n        if (close == \"{\") {\n            close = \"}\";\n        }\n        return function (stream, state) {\n            var ch = stream.next();\n            if ((ch == close || (ch == \"-\" && stream.eat(close)))\n                && stream.eat(\"}\")) {\n                state.tokenize = tokenBase;\n                return \"tag\";\n            }\n            if (stream.match(keywords)) {\n                return \"keyword\";\n            }\n            return close == \"#\" ? \"comment\" : \"string\";\n        };\n    }\n    return {\n        startState: function () {\n            return {tokenize: tokenBase};\n        },\n        token: function (stream, state) {\n            return state.tokenize(stream, state);\n        }\n    }; \n});\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/less/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: LESS mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"less.js\"></script>\n    <style>.CodeMirror {background: #f8f8f8; border: 1px solid #ddd;} .CodeMirror-scroll {height: 400px}</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n    <link rel=\"stylesheet\" href=\"../../theme/lesser-dark.css\">\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n  </head>\n  <body>\n    <h1>CodeMirror: LESS mode</h1>\n    <form><textarea id=\"code\" name=\"code\">/* Some LESS code */\n\nbutton {\n    width:  32px;\n    height: 32px;\n    border: 0;\n    margin: 4px;\n    cursor: pointer;\n}\nbutton.icon-plus { background: url(http://dahlström.net/tmp/sharp-icons/svg-icon-target.svg#plus) no-repeat; }\nbutton.icon-chart { background: url(http://dahlström.net/tmp/sharp-icons/svg-icon-target.svg#chart) no-repeat; }\n\nbutton:hover { background-color: #999; }\nbutton:active { background-color: #666; }\n\n@test_a: #eeeQQQ;//this is not a valid hex value and thus parsed as an element id\n@test_b: #eeeFFF //this is a valid hex value but the declaration doesn't end with a semicolon and thus parsed as an element id\n\n#eee aaa .box\n{\n  #test bbb {\n    width: 500px;\n    height: 250px;\n    background-image: url(dir/output/sheep.png), url( betweengrassandsky.png );\n    background-position: center bottom, left top;\n    background-repeat: no-repeat;\n  }\n}\n\n@base: #f938ab;\n\n.box-shadow(@style, @c) when (iscolor(@c)) {\n  box-shadow:         @style @c;\n  -webkit-box-shadow: @style @c;\n  -moz-box-shadow:    @style @c;\n}\n.box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) {\n  .box-shadow(@style, rgba(0, 0, 0, @alpha));\n}\n\n@color: #4D926F;\n\n#header {\n  color: @color;\n  color: #000000;\n}\nh2 {\n  color: @color;\n}\n\n.rounded-corners (@radius: 5px) {\n  border-radius: @radius;\n  -webkit-border-radius: @radius;\n  -moz-border-radius: @radius;\n}\n\n#header {\n  .rounded-corners;\n}\n#footer {\n  .rounded-corners(10px);\n}\n\n.box-shadow (@x: 0, @y: 0, @blur: 1px, @alpha) {\n  @val: @x @y @blur rgba(0, 0, 0, @alpha);\n\n  box-shadow:         @val;\n  -webkit-box-shadow: @val;\n  -moz-box-shadow:    @val;\n}\n.box { @base: #f938ab;\n  color:        saturate(@base, 5%);\n  border-color: lighten(@base, 30%);\n  div { .box-shadow(0, 0, 5px, 0.4) }\n}\n\n@import url(\"something.css\");\n\n@light-blue:   hsl(190, 50%, 65%);\n@light-yellow: desaturate(#fefec8, 10%);\n@dark-yellow:  desaturate(darken(@light-yellow, 10%), 40%);\n@darkest:      hsl(20, 0%, 15%);\n@dark:         hsl(190, 20%, 30%);\n@medium:       hsl(10, 60%, 30%);\n@light:        hsl(90, 40%, 20%);\n@lightest:     hsl(90, 20%, 90%);\n@highlight:    hsl(80, 50%, 90%);\n@blue:         hsl(210, 60%, 20%);\n@alpha-blue:   hsla(210, 60%, 40%, 0.5);\n\n.box-shadow (@x, @y, @blur, @alpha) {\n  @value: @x @y @blur rgba(0, 0, 0, @alpha);\n  box-shadow:         @value;\n  -moz-box-shadow:    @value;\n  -webkit-box-shadow: @value;\n}\n.border-radius (@radius) {\n  border-radius: @radius;\n  -moz-border-radius: @radius;\n  -webkit-border-radius: @radius;\n}\n\n.border-radius (@radius, bottom) {\n  border-top-right-radius: 0;\n  border-top-left-radius: 0;\n  -moz-border-top-right-radius: 0;\n  -moz-border-top-left-radius: 0;\n  -webkit-border-top-left-radius: 0;\n  -webkit-border-top-right-radius: 0;\n}\n.border-radius (@radius, right) {\n  border-bottom-left-radius: 0;\n  border-top-left-radius: 0;\n  -moz-border-bottom-left-radius: 0;\n  -moz-border-top-left-radius: 0;\n  -webkit-border-bottom-left-radius: 0;\n  -webkit-border-top-left-radius: 0;\n}\n.box-shadow-inset (@x, @y, @blur, @color) {\n  box-shadow: @x @y @blur @color inset;\n  -moz-box-shadow: @x @y @blur @color inset;\n  -webkit-box-shadow: @x @y @blur @color inset;\n}\n.code () {\n  font-family: 'Bitstream Vera Sans Mono',\n               'DejaVu Sans Mono',\n               'Monaco',\n               Courier,\n               monospace !important;\n}\n.wrap () {\n  text-wrap: wrap;\n  white-space: pre-wrap;       /* css-3 */\n  white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */\n  white-space: -pre-wrap;      /* Opera 4-6 */\n  white-space: -o-pre-wrap;    /* Opera 7 */\n  word-wrap: break-word;       /* Internet Explorer 5.5+ */\n}\n\nhtml { margin: 0 }\nbody {\n  background-color: @darkest;\n  margin: 0 auto;\n  font-family: Arial, sans-serif;\n  font-size: 100%;\n  overflow-x: hidden;\n}\nnav, header, footer, section, article {\n  display: block;\n}\na {\n  color: #b83000;\n}\nh1 a {\n  color: black;\n  text-decoration: none;\n}\na:hover {\n  text-decoration: underline;\n}\nh1, h2, h3, h4 {\n  margin: 0;\n  font-weight: normal;\n}\nul, li {\n  list-style-type: none;\n}\ncode { .code; }\ncode {\n  .string, .regexp { color: @dark }\n  .keyword { font-weight: bold }\n  .comment { color: rgba(0, 0, 0, 0.5) }\n  .number { color: @blue }\n  .class, .special { color: rgba(0, 50, 100, 0.8) }\n}\npre {\n  padding: 0 30px;\n  .wrap;\n}\nblockquote {\n  font-style: italic;\n}\nbody > footer {\n  text-align: left;\n  margin-left: 10px;\n  font-style: italic;\n  font-size: 18px;\n  color: #888;\n}\n\n#logo {\n  margin-top: 30px;\n  margin-bottom: 30px;\n  display: block;\n  width: 199px;\n  height: 81px;\n  background: url(/images/logo.png) no-repeat;\n}\nnav {\n  margin-left: 15px;\n}\nnav a, #dropdown li {\n  display: inline-block;\n  color: white;\n  line-height: 42px;\n  margin: 0;\n  padding: 0px 15px;\n  text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.5);\n  text-decoration: none;\n  border: 2px solid transparent;\n  border-width: 0 2px;\n  &:hover {\n    .dark-red; \n    text-decoration: none;\n  }\n}\n.dark-red {\n    @red: @medium;\n    border: 2px solid darken(@red, 25%);\n    border-left-color: darken(@red, 15%);\n    border-right-color: darken(@red, 15%);\n    border-bottom: 0;\n    border-top: 0;\n    background-color: darken(@red, 10%);\n}\n\n.content {\n  margin: 0 auto;\n  width: 980px;\n}\n\n#menu {\n  position: absolute;\n  width: 100%;\n  z-index: 3;\n  clear: both;\n  display: block;\n  background-color: @blue;\n  height: 42px;\n  border-top: 2px solid lighten(@alpha-blue, 20%);\n  border-bottom: 2px solid darken(@alpha-blue, 25%);\n  .box-shadow(0, 1px, 8px, 0.6);\n  -moz-box-shadow: 0 0 0 #000; // Because firefox sucks.\n\n  &.docked {\n    background-color: hsla(210, 60%, 40%, 0.4);\n  }\n  &:hover {\n    background-color: @blue;\n  }\n\n  #dropdown {\n    margin: 0 0 0 117px;\n    padding: 0;\n    padding-top: 5px;\n    display: none;\n    width: 190px;\n    border-top: 2px solid @medium;\n    color: @highlight;\n    border: 2px solid darken(@medium, 25%);\n    border-left-color: darken(@medium, 15%);\n    border-right-color: darken(@medium, 15%);\n    border-top-width: 0;\n    background-color: darken(@medium, 10%);\n    ul {\n      padding: 0px;  \n    }\n    li {\n      font-size: 14px;\n      display: block;\n      text-align: left;\n      padding: 0;\n      border: 0;\n      a {\n        display: block;\n        padding: 0px 15px;  \n        text-decoration: none;\n        color: white;  \n        &:hover {\n          background-color: darken(@medium, 15%);\n          text-decoration: none;\n        }\n      }\n    }\n    .border-radius(5px, bottom);\n    .box-shadow(0, 6px, 8px, 0.5);\n  }\n}\n\n#main {\n  margin: 0 auto;\n  width: 100%;\n  background-color: @light-blue;\n  border-top: 8px solid darken(@light-blue, 5%);\n\n  #intro {\n    background-color: lighten(@light-blue, 25%);\n    float: left;\n    margin-top: -8px;\n    margin-right: 5px;\n\n    height: 380px;\n    position: relative;\n    z-index: 2;\n    font-family: 'Droid Serif', 'Georgia';\n    width: 395px;\n    padding: 45px 20px 23px 30px;\n    border: 2px dashed darken(@light-blue, 10%);\n    .box-shadow(1px, 0px, 6px, 0.5);\n    border-bottom: 0;\n    border-top: 0;\n    #download { color: transparent; border: 0; float: left; display: inline-block; margin: 15px 0 15px -5px; }\n    #download img { display: inline-block}\n    #download-info {\n      code {\n        font-size: 13px;  \n      }\n      color: @blue + #333; display: inline; float: left; margin: 36px 0 0 15px }\n  }\n  h2 {\n    span {\n      color: @medium;  \n    }\n    color: @blue;\n    margin: 20px 0;\n    font-size: 24px;\n    line-height: 1.2em;\n  }\n  h3 {\n    color: @blue;\n    line-height: 1.4em;\n    margin: 30px 0 15px 0;\n    font-size: 1em;\n    text-shadow: 0px 0px 0px @lightest;\n    span { color: @medium }\n  }\n  #example {\n    p {\n      font-size: 18px;\n      color: @blue;\n      font-weight: bold;\n      text-shadow: 0px 1px 1px @lightest;\n    }\n    pre {\n      margin: 0;\n      text-shadow: 0 -1px 1px @darkest;\n      margin-top: 20px;\n      background-color: desaturate(@darkest, 8%);\n      border: 0;\n      width: 450px;\n      color: lighten(@lightest, 2%);\n      background-repeat: repeat;\n      padding: 15px;\n      border: 1px dashed @lightest;\n      line-height: 15px;\n      .box-shadow(0, 0px, 15px, 0.5);\n      .code;\n      .border-radius(2px);\n      code .attribute { color: hsl(40, 50%, 70%) }\n      code .variable  { color: hsl(120, 10%, 50%) }\n      code .element   { color: hsl(170, 20%, 50%) }\n\n      code .string, .regexp { color: hsl(75, 50%, 65%) }\n      code .class { color: hsl(40, 40%, 60%); font-weight: normal }\n      code .id { color: hsl(50, 40%, 60%); font-weight: normal }\n      code .comment { color: rgba(255, 255, 255, 0.2) }\n      code .number, .color { color: hsl(10, 40%, 50%) }\n      code .class, code .mixin, .special { color: hsl(190, 20%, 50%) }\n      #time { color: #aaa }\n    }\n    float: right;\n    font-size: 12px;\n    margin: 0;\n    margin-top: 15px;\n    padding: 0;\n    width: 500px;\n  }\n}\n\n\n.page {\n  .content {\n    width: 870px;\n    padding: 45px;\n  }\n  margin: 0 auto;\n  font-family: 'Georgia', serif;\n  font-size: 18px;\n  line-height: 26px;\n  padding: 0 60px;\n  code {\n    font-size: 16px;  \n  }\n  pre {\n    border-width: 1px;\n    border-style: dashed;\n    padding: 15px;\n    margin: 15px 0;\n  }\n  h1 {\n    text-align: left;\n    font-size: 40px;\n    margin-top: 15px;\n    margin-bottom: 35px;\n  }\n  p + h1 { margin-top: 60px }\n  h2, h3 {\n    margin: 30px 0 15px 0;\n  }\n  p + h2, pre + h2, code + h2 {\n    border-top: 6px solid rgba(255, 255, 255, 0.1);\n    padding-top: 30px;\n  }\n  h3 {\n    margin: 15px 0;\n  }\n}\n\n\n#docs {\n  @bg: lighten(@light-blue, 5%);\n  border-top: 2px solid lighten(@bg, 5%);\n  color: @blue;\n  background-color: @light-blue;\n  .box-shadow(0, -2px, 5px, 0.2);\n\n  h1 {\n    font-family: 'Droid Serif', 'Georgia', serif;\n    padding-top: 30px;\n    padding-left: 45px;\n    font-size: 44px;\n    text-align: left;\n    margin: 30px 0 !important;\n    text-shadow: 0px 1px 1px @lightest;\n    font-weight: bold;\n  }\n  .content {\n    clear: both;\n    border-color: transparent;\n    background-color: lighten(@light-blue, 25%);\n    .box-shadow(0, 5px, 5px, 0.4);\n  }\n  pre {\n    @background: lighten(@bg, 30%);\n    color: lighten(@blue, 10%);\n    background-color: @background;\n    border-color: lighten(@light-blue, 25%);\n    border-width: 2px;\n    code .attribute { color: hsl(40, 50%, 30%) }\n    code .variable  { color: hsl(120, 10%, 30%) }\n    code .element   { color: hsl(170, 20%, 30%) }\n\n    code .string, .regexp { color: hsl(75, 50%, 35%) }\n    code .class { color: hsl(40, 40%, 30%); font-weight: normal }\n    code .id { color: hsl(50, 40%, 30%); font-weight: normal }\n    code .comment { color: rgba(0, 0, 0, 0.4) }\n    code .number, .color { color: hsl(10, 40%, 30%) }\n    code .class, code .mixin, .special { color: hsl(190, 20%, 30%) }\n  }\n  pre code                    { font-size: 15px  }\n  p + h2, pre + h2, code + h2 { border-top-color: rgba(0, 0, 0, 0.1) }\n}\n\ntd {\n  padding-right: 30px;  \n}\n#synopsis {\n  .box-shadow(0, 5px, 5px, 0.2);\n}\n#synopsis, #about {\n  h2 {\n    font-size: 30px;  \n    padding: 10px 0;\n  }\n  h1 + h2 {\n      margin-top: 15px;  \n  }\n  h3 { font-size: 22px }\n\n  .code-example {\n    border-spacing: 0;\n    border-width: 1px;\n    border-style: dashed;\n    padding: 0;\n    pre { border: 0; margin: 0 }\n    td {\n      border: 0;\n      margin: 0;\n      background-color: desaturate(darken(@darkest, 5%), 20%);\n      vertical-align: top;\n      padding: 0;\n    }\n    tr { padding: 0 }\n  }\n  .css-output {\n    td {\n      border-left: 0;  \n    }\n  }\n  .less-example {\n    //border-right: 1px dotted rgba(255, 255, 255, 0.5) !important;\n  }\n  .css-output, .less-example {\n    width: 390px;\n  }\n  pre {\n    padding: 20px;\n    line-height: 20px;\n    font-size: 14px;\n  }\n}\n#about, #synopsis, #guide {\n  a {\n    text-decoration: none;\n    color: @light-yellow;\n    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);\n    &:hover {\n      text-decoration: none;\n      border-bottom: 1px dashed @light-yellow;\n    }\n  }\n  @bg: desaturate(darken(@darkest, 5%), 20%);\n  text-shadow: 0 -1px 1px lighten(@bg, 5%);\n  color: @highlight;\n  background-color: @bg;\n  .content {\n    background-color: desaturate(@darkest, 20%);\n    clear: both;\n    .box-shadow(0, 5px, 5px, 0.4);\n  }\n  h1, h2, h3 {\n    color: @dark-yellow;\n  }\n  pre {\n      code .attribute { color: hsl(40, 50%, 70%) }\n      code .variable  { color: hsl(120, 10%, 50%) }\n      code .element   { color: hsl(170, 20%, 50%) }\n\n      code .string, .regexp { color: hsl(75, 50%, 65%) }\n      code .class { color: hsl(40, 40%, 60%); font-weight: normal }\n      code .id { color: hsl(50, 40%, 60%); font-weight: normal }\n      code .comment { color: rgba(255, 255, 255, 0.2) }\n      code .number, .color { color: hsl(10, 40%, 50%) }\n      code .class, code .mixin, .special { color: hsl(190, 20%, 50%) }\n    background-color: @bg;\n    border-color: darken(@light-yellow, 5%);\n  }\n  code {\n    color: darken(@dark-yellow, 5%);\n    .string, .regexp { color: desaturate(@light-blue, 15%) }\n    .keyword { color: hsl(40, 40%, 60%); font-weight: normal }\n    .comment { color: rgba(255, 255, 255, 0.2) }\n    .number { color: lighten(@blue, 10%) }\n    .class, .special { color: hsl(190, 20%, 50%) }\n  }\n}\n#guide {\n  background-color: @darkest;\n  .content {\n    background-color: transparent;\n  }\n\n}\n\n#about {\n  background-color: @darkest !important;\n  .content {\n    background-color: desaturate(lighten(@darkest, 3%), 5%);\n  }\n}\n#synopsis {\n  background-color: desaturate(lighten(@darkest, 3%), 5%) !important;\n  .content {\n    background-color: desaturate(lighten(@darkest, 3%), 5%);\n  }\n  pre {}\n}\n#synopsis, #guide {\n  .content {\n    .box-shadow(0, 0px, 0px, 0.0);\n  }\n}\n#about footer {\n  margin-top: 30px;\n  padding-top: 30px;\n  border-top: 6px solid rgba(0, 0, 0, 0.1);\n  text-align: center;\n  font-size: 16px;\n  color: rgba(255, 255, 255, 0.35);\n  #copy { font-size: 12px }\n  text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.02);\n}\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        theme: \"lesser-dark\",\n        lineNumbers : true,\n        matchBrackets : true\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-less</code>, <code>text/css</code> (if not previously defined).</p>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/less/less.js",
    "content": "/*\nLESS mode - http://www.lesscss.org/\nPorted to CodeMirror by Peter Kroon\n*/\n\nCodeMirror.defineMode(\"less\", function(config) {\n  var indentUnit = config.indentUnit, type;\n  function ret(style, tp) {type = tp; return style;}\n  //html5 tags\n  var tags = [\"a\",\"abbr\",\"acronym\",\"address\",\"applet\",\"area\",\"article\",\"aside\",\"audio\",\"b\",\"base\",\"basefont\",\"bdi\",\"bdo\",\"big\",\"blockquote\",\"body\",\"br\",\"button\",\"canvas\",\"caption\",\"cite\",\"code\",\"col\",\"colgroup\",\"command\",\"datalist\",\"dd\",\"del\",\"details\",\"dfn\",\"dir\",\"div\",\"dl\",\"dt\",\"em\",\"embed\",\"fieldset\",\"figcaption\",\"figure\",\"font\",\"footer\",\"form\",\"frame\",\"frameset\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"head\",\"header\",\"hgroup\",\"hr\",\"html\",\"i\",\"iframe\",\"img\",\"input\",\"ins\",\"keygen\",\"kbd\",\"label\",\"legend\",\"li\",\"link\",\"map\",\"mark\",\"menu\",\"meta\",\"meter\",\"nav\",\"noframes\",\"noscript\",\"object\",\"ol\",\"optgroup\",\"option\",\"output\",\"p\",\"param\",\"pre\",\"progress\",\"q\",\"rp\",\"rt\",\"ruby\",\"s\",\"samp\",\"script\",\"section\",\"select\",\"small\",\"source\",\"span\",\"strike\",\"strong\",\"style\",\"sub\",\"summary\",\"sup\",\"table\",\"tbody\",\"td\",\"textarea\",\"tfoot\",\"th\",\"thead\",\"time\",\"title\",\"tr\",\"track\",\"tt\",\"u\",\"ul\",\"var\",\"video\",\"wbr\"];\n  \n  function inTagsArray(val){\n\t  for(var i=0; i<tags.length; i++){\n\t\t  if(val === tags[i]){\n\t\t\t  return true;\n\t\t  }\n\t  }\n  }\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n\n\tif (ch == \"@\") {stream.eatWhile(/[\\w\\-]/); return ret(\"meta\", stream.current());}\n    else if (ch == \"/\" && stream.eat(\"*\")) {\n      state.tokenize = tokenCComment;\n      return tokenCComment(stream, state);\n    }\n    else if (ch == \"<\" && stream.eat(\"!\")) {\n      state.tokenize = tokenSGMLComment;\n      return tokenSGMLComment(stream, state);\n    }\n    else if (ch == \"=\") ret(null, \"compare\");\n    else if ((ch == \"~\" || ch == \"|\") && stream.eat(\"=\")) return ret(null, \"compare\");\n    else if (ch == \"\\\"\" || ch == \"'\") {\n      state.tokenize = tokenString(ch);\n      return state.tokenize(stream, state);\n    }\n\telse if (ch == \"/\") { // lesscss e.g.: .png will not be parsed as a class\n\t  if(stream.eat(\"/\")){\n\t\tstate.tokenize = tokenSComment\n      \treturn tokenSComment(stream, state);\n\t  }else{\n\t    stream.eatWhile(/[\\a-zA-Z0-9\\-_.\\s]/);\n\t\tif(/\\/|\\)|#/.test(stream.peek() || stream.eol() || (stream.eatSpace() && stream.peek() == \")\")))return ret(\"string\", \"string\");//let url(/images/logo.png) without quotes return as string\n        return ret(\"number\", \"unit\");\n\t  }\n    }\n    else if (ch == \"!\") {\n      stream.match(/^\\s*\\w*/);\n      return ret(\"keyword\", \"important\");\n    }\n    else if (/\\d/.test(ch)) {\n      stream.eatWhile(/[\\w.%]/);\n      return ret(\"number\", \"unit\");\n    }\n    else if (/[,+<>*\\/]/.test(ch)) {//removed . dot character original was [,.+>*\\/]\n      return ret(null, \"select-op\");\n    }\n    else if (/[;{}:\\[\\]()]/.test(ch)) { //added () char for lesscss original was [;{}:\\[\\]]\n      if(ch == \":\"){\n\t\tstream.eatWhile(/[active|hover|link|visited]/);\n\t\tif( stream.current().match(/active|hover|link|visited/)){\n\t\t  return ret(\"tag\", \"tag\");\n\t\t}else{\n\t\t  return ret(null, ch);\t\n\t\t}\n\t  }else{\n  \t    return ret(null, ch);\n\t  }\n    }\n\telse if (ch == \".\") { // lesscss\n\t  stream.eatWhile(/[\\a-zA-Z0-9\\-_]/);\n      return ret(\"tag\", \"tag\");\n    }\n\telse if (ch == \"#\") { // lesscss\n\t  //we don't eat white-space, we want the hex color and or id only\n\t  stream.eatWhile(/[A-Za-z0-9]/);\n\t  //check if there is a proper hex color length e.g. #eee || #eeeEEE\n\t  if(stream.current().length ===4 || stream.current().length ===7){\n\t\t  if(stream.current().match(/[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}/,false) != null){//is there a valid hex color value present in the current stream\n\t\t  \t//when not a valid hex value, parse as id\n\t\t\tif(stream.current().substring(1) != stream.current().match(/[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}/,false))return ret(\"atom\", \"tag\");\n\t\t\t//eat white-space\n\t\t\tstream.eatSpace();\n\t\t\t//when hex value declaration doesn't end with [;,] but is does with a slash/cc comment treat it as an id, just like the other hex values that don't end with[;,]\n\t\t\tif( /[\\/<>.(){!$%^&*_\\-\\\\?=+\\|#'~`]/.test(stream.peek()) )return ret(\"atom\", \"tag\");\n\t\t\t//#time { color: #aaa }\n\t\t\telse if(stream.peek() == \"}\" )return ret(\"number\", \"unit\");\n\t\t\t//we have a valid hex color value, parse as id whenever an element/class is defined after the hex(id) value e.g. #eee aaa || #eee .aaa\n\t\t\telse if( /[a-zA-Z\\\\]/.test(stream.peek()) )return ret(\"atom\", \"tag\");\n\t\t\t//when a hex value is on the end of a line, parse as id\n\t\t\telse if(stream.eol())return ret(\"atom\", \"tag\");\n\t\t\t//default\n\t\t\telse return ret(\"number\", \"unit\");\n\t\t  }else{//when not a valid hexvalue in the current stream e.g. #footer\n\t\t\tstream.eatWhile(/[\\w\\\\\\-]/);\n\t\t\treturn ret(\"atom\", \"tag\"); \n\t\t  }\n\t  }else{\n\t\tstream.eatWhile(/[\\w\\\\\\-]/);\t\t\n\t\treturn ret(\"atom\", \"tag\");\n\t  }\n    }\n\telse if (ch == \"&\") {\n\t  stream.eatWhile(/[\\w\\-]/);\n\t  return ret(null, ch);\n\t}\n    else {\n      stream.eatWhile(/[\\w\\\\\\-_%.{]/);\n\t  if(stream.current().match(/http|https/) != null){\n\t\tstream.eatWhile(/[\\w\\\\\\-_%.{:\\/]/);\n\t\treturn ret(\"string\", \"string\");\n\t  }else if(stream.peek() == \"<\" || stream.peek() == \">\"){\n\t\treturn ret(\"tag\", \"tag\");\n\t  }else if( stream.peek().match(/\\(/) != null ){// lessc\n\t\treturn ret(null, ch);\n\t  }else if (stream.peek() == \"/\" && state.stack[state.stack.length-1] != undefined){ // url(dir/center/image.png)\n\t  \treturn ret(\"string\", \"string\");\n\t  }else if( stream.current().match(/\\-\\d|\\-.\\d/) ){ // lesscss match e.g.: -5px -0.4 etc... only colorize the minus sign\n\t\t//stream.backUp(stream.current().length-1); //commment out these 2 comment if you want the minus sign to be parsed as null -500px\n\t  \t//return ret(null, ch);\n\t\treturn ret(\"number\", \"unit\");\n\t  }else if( inTagsArray(stream.current()) ){ // lesscss match html tags\n\t  \treturn ret(\"tag\", \"tag\");\n\t  }else if( /\\/|[\\s\\)]/.test(stream.peek() || stream.eol() || (stream.eatSpace() && stream.peek() == \"/\")) && stream.current().indexOf(\".\") !== -1){\n\t\tif(stream.current().substring(stream.current().length-1,stream.current().length) == \"{\"){\n\t\t\tstream.backUp(1);\n\t\t\treturn ret(\"tag\", \"tag\");\n\t\t}//end if\n\t\tif( (stream.eatSpace() && stream.peek().match(/[{<>.a-zA-Z]/) != null)  || stream.eol() )return ret(\"tag\", \"tag\");//e.g. button.icon-plus\n\t\treturn ret(\"string\", \"string\");//let url(/images/logo.png) without quotes return as string\n\t  }else if( stream.eol() ){\n\t\t  if(stream.current().substring(stream.current().length-1,stream.current().length) == \"{\")stream.backUp(1);\n\t\t  return ret(\"tag\", \"tag\");\n\t  }else{\n      \treturn ret(\"variable\", \"variable\");\n\t  }\n    }\n    \n  }\n\n  function tokenSComment(stream, state) {// SComment = Slash comment\n    stream.skipToEnd();\n\tstate.tokenize = tokenBase;\n    return ret(\"comment\", \"comment\");\n  }\n    \n  function tokenCComment(stream, state) {\n    var maybeEnd = false, ch;\n    while ((ch = stream.next()) != null) {\n      if (maybeEnd && ch == \"/\") {\n        state.tokenize = tokenBase;\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return ret(\"comment\", \"comment\");\n  }\n\n  function tokenSGMLComment(stream, state) {\n    var dashes = 0, ch;\n    while ((ch = stream.next()) != null) {\n      if (dashes >= 2 && ch == \">\") {\n        state.tokenize = tokenBase;\n        break;\n      }\n      dashes = (ch == \"-\") ? dashes + 1 : 0;\n    }\n    return ret(\"comment\", \"comment\");\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var escaped = false, ch;\n      while ((ch = stream.next()) != null) {\n        if (ch == quote && !escaped)\n          break;\n        escaped = !escaped && ch == \"\\\\\";\n      }\n      if (!escaped) state.tokenize = tokenBase;\n      return ret(\"string\", \"string\");\n    };\n  }\n\n  return {\n    startState: function(base) { \n      return {tokenize: tokenBase,\n              baseIndent: base || 0,\n              stack: []};\n    },\n\n    token: function(stream, state) {\n      if (stream.eatSpace()) return null;\n      var style = state.tokenize(stream, state);\n\n      var context = state.stack[state.stack.length-1];\n      if (type == \"hash\" && context == \"rule\") style = \"atom\";\n      else if (style == \"variable\") {\n        if (context == \"rule\") style = null; //\"tag\"\n        else if (!context || context == \"@media{\"){ \n\t\t\tstyle = stream.current() \t== \"when\" \t? \"variable\" \t: \n\t\t\tstream.string.match(/#/g) \t!= undefined \t? null \t\t: \n\t\t\t/[\\s,|\\s\\)]/.test(stream.peek()) \t\t? \"tag\" \t: null;\n\t\t}\n      }\n\n      if (context == \"rule\" && /^[\\{\\};]$/.test(type))\n        state.stack.pop();\n      if (type == \"{\") {\n        if (context == \"@media\") state.stack[state.stack.length-1] = \"@media{\";\n        else state.stack.push(\"{\");\n      }\n      else if (type == \"}\") state.stack.pop();\n      else if (type == \"@media\") state.stack.push(\"@media\");\n      else if (context == \"{\" && type != \"comment\") state.stack.push(\"rule\");\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      var n = state.stack.length;\n      if (/^\\}/.test(textAfter))\n        n -= state.stack[state.stack.length-1] == \"rule\" ? 2 : 1;\n      return state.baseIndent + n * indentUnit;\n    },\n\n    electricChars: \"}\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-less\", \"less\");\nif (!CodeMirror.mimeModes.hasOwnProperty(\"text/css\"))\n  CodeMirror.defineMIME(\"text/css\", \"less\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/lua/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Lua mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"lua.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../theme/neat.css\">\n    <style>.CodeMirror {border: 1px solid black;}</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: Lua mode</h1>\n    <form><textarea id=\"code\" name=\"code\">\n--[[\nexample useless code to show lua syntax highlighting\nthis is multiline comment\n]]\n\nfunction blahblahblah(x)\n\n  local table = {\n    \"asd\" = 123,\n    \"x\" = 0.34,  \n  }\n  if x ~= 3 then\n    print( x )\n  elseif x == \"string\"\n    my_custom_function( 0x34 )\n  else\n    unknown_function( \"some string\" )\n  end\n\n  --single line comment\n  \nend\n\nfunction blablabla3()\n\n  for k,v in ipairs( table ) do\n    --abcde..\n    y=[=[\n  x=[[\n      x is a multi line string\n   ]]\n  but its definition is iside a highest level string!\n  ]=]\n    print(\" \\\"\\\" \")\n\n    s = math.sin( x )\n  end\n\nend\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        tabMode: \"indent\",\n        matchBrackets: true,\n        theme: \"neat\"\n      });\n    </script>\n\n    <p>Loosely based on Franciszek\n    Wawrzak's <a href=\"http://codemirror.net/1/contrib/lua\">CodeMirror\n    1 mode</a>. One configuration parameter is\n    supported, <code>specials</code>, to which you can provide an\n    array of strings to have those identifiers highlighted with\n    the <code>lua-special</code> style.</p>\n    <p><strong>MIME types defined:</strong> <code>text/x-lua</code>.</p>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/lua/lua.js",
    "content": "// LUA mode. Ported to CodeMirror 2 from Franciszek Wawrzak's\n// CodeMirror 1 mode.\n// highlights keywords, strings, comments (no leveling supported! (\"[==[\")), tokens, basic indenting\n \nCodeMirror.defineMode(\"lua\", function(config, parserConfig) {\n  var indentUnit = config.indentUnit;\n\n  function prefixRE(words) {\n    return new RegExp(\"^(?:\" + words.join(\"|\") + \")\", \"i\");\n  }\n  function wordRE(words) {\n    return new RegExp(\"^(?:\" + words.join(\"|\") + \")$\", \"i\");\n  }\n  var specials = wordRE(parserConfig.specials || []);\n \n  // long list of standard functions from lua manual\n  var builtins = wordRE([\n    \"_G\",\"_VERSION\",\"assert\",\"collectgarbage\",\"dofile\",\"error\",\"getfenv\",\"getmetatable\",\"ipairs\",\"load\",\n    \"loadfile\",\"loadstring\",\"module\",\"next\",\"pairs\",\"pcall\",\"print\",\"rawequal\",\"rawget\",\"rawset\",\"require\",\n    \"select\",\"setfenv\",\"setmetatable\",\"tonumber\",\"tostring\",\"type\",\"unpack\",\"xpcall\",\n\n    \"coroutine.create\",\"coroutine.resume\",\"coroutine.running\",\"coroutine.status\",\"coroutine.wrap\",\"coroutine.yield\",\n\n    \"debug.debug\",\"debug.getfenv\",\"debug.gethook\",\"debug.getinfo\",\"debug.getlocal\",\"debug.getmetatable\",\n    \"debug.getregistry\",\"debug.getupvalue\",\"debug.setfenv\",\"debug.sethook\",\"debug.setlocal\",\"debug.setmetatable\",\n    \"debug.setupvalue\",\"debug.traceback\",\n\n    \"close\",\"flush\",\"lines\",\"read\",\"seek\",\"setvbuf\",\"write\",\n\n    \"io.close\",\"io.flush\",\"io.input\",\"io.lines\",\"io.open\",\"io.output\",\"io.popen\",\"io.read\",\"io.stderr\",\"io.stdin\",\n    \"io.stdout\",\"io.tmpfile\",\"io.type\",\"io.write\",\n\n    \"math.abs\",\"math.acos\",\"math.asin\",\"math.atan\",\"math.atan2\",\"math.ceil\",\"math.cos\",\"math.cosh\",\"math.deg\",\n    \"math.exp\",\"math.floor\",\"math.fmod\",\"math.frexp\",\"math.huge\",\"math.ldexp\",\"math.log\",\"math.log10\",\"math.max\",\n    \"math.min\",\"math.modf\",\"math.pi\",\"math.pow\",\"math.rad\",\"math.random\",\"math.randomseed\",\"math.sin\",\"math.sinh\",\n    \"math.sqrt\",\"math.tan\",\"math.tanh\",\n\n    \"os.clock\",\"os.date\",\"os.difftime\",\"os.execute\",\"os.exit\",\"os.getenv\",\"os.remove\",\"os.rename\",\"os.setlocale\",\n    \"os.time\",\"os.tmpname\",\n\n    \"package.cpath\",\"package.loaded\",\"package.loaders\",\"package.loadlib\",\"package.path\",\"package.preload\",\n    \"package.seeall\",\n\n    \"string.byte\",\"string.char\",\"string.dump\",\"string.find\",\"string.format\",\"string.gmatch\",\"string.gsub\",\n    \"string.len\",\"string.lower\",\"string.match\",\"string.rep\",\"string.reverse\",\"string.sub\",\"string.upper\",\n\n    \"table.concat\",\"table.insert\",\"table.maxn\",\"table.remove\",\"table.sort\"\n  ]);\n  var keywords = wordRE([\"and\",\"break\",\"elseif\",\"false\",\"nil\",\"not\",\"or\",\"return\",\n\t\t\t \"true\",\"function\", \"end\", \"if\", \"then\", \"else\", \"do\", \n\t\t\t \"while\", \"repeat\", \"until\", \"for\", \"in\", \"local\" ]);\n\n  var indentTokens = wordRE([\"function\", \"if\",\"repeat\",\"do\", \"\\\\(\", \"{\"]);\n  var dedentTokens = wordRE([\"end\", \"until\", \"\\\\)\", \"}\"]);\n  var dedentPartial = prefixRE([\"end\", \"until\", \"\\\\)\", \"}\", \"else\", \"elseif\"]);\n\n  function readBracket(stream) {\n    var level = 0;\n    while (stream.eat(\"=\")) ++level;\n    stream.eat(\"[\");\n    return level;\n  }\n\n  function normal(stream, state) {\n    var ch = stream.next();\n    if (ch == \"-\" && stream.eat(\"-\")) {\n      if (stream.eat(\"[\"))\n        return (state.cur = bracketed(readBracket(stream), \"comment\"))(stream, state);\n      stream.skipToEnd();\n      return \"comment\";\n    } \n    if (ch == \"\\\"\" || ch == \"'\")\n      return (state.cur = string(ch))(stream, state);\n    if (ch == \"[\" && /[\\[=]/.test(stream.peek()))\n      return (state.cur = bracketed(readBracket(stream), \"string\"))(stream, state);\n    if (/\\d/.test(ch)) {\n      stream.eatWhile(/[\\w.%]/);\n      return \"number\";\n    }\n    if (/[\\w_]/.test(ch)) {\n      stream.eatWhile(/[\\w\\\\\\-_.]/);\n      return \"variable\";\n    }\n    return null;\n  }\n\n  function bracketed(level, style) {\n    return function(stream, state) {\n      var curlev = null, ch;\n      while ((ch = stream.next()) != null) {\n        if (curlev == null) {if (ch == \"]\") curlev = 0;}\n        else if (ch == \"=\") ++curlev;\n        else if (ch == \"]\" && curlev == level) { state.cur = normal; break; }\n        else curlev = null;\n      }\n      return style;\n    };\n  }\n\n  function string(quote) {\n    return function(stream, state) {\n      var escaped = false, ch;\n      while ((ch = stream.next()) != null) {\n        if (ch == quote && !escaped) break;\n        escaped = !escaped && ch == \"\\\\\";\n      }\n      if (!escaped) state.cur = normal;\n      return \"string\";\n    };\n  }\n    \n  return {\n    startState: function(basecol) {\n      return {basecol: basecol || 0, indentDepth: 0, cur: normal};\n    },\n\n    token: function(stream, state) {\n      if (stream.eatSpace()) return null;\n      var style = state.cur(stream, state);\n      var word = stream.current();\n      if (style == \"variable\") {\n        if (keywords.test(word)) style = \"keyword\";\n        else if (builtins.test(word)) style = \"builtin\";\n\telse if (specials.test(word)) style = \"variable-2\";\n      }\n      if ((style != \"comment\") && (style != \"string\")){\n        if (indentTokens.test(word)) ++state.indentDepth;\n        else if (dedentTokens.test(word)) --state.indentDepth;\n      }\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      var closing = dedentPartial.test(textAfter);\n      return state.basecol + indentUnit * (state.indentDepth - (closing ? 1 : 0));\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-lua\", \"lua\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/markdown/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Markdown mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"../xml/xml.js\"></script>\n    <script src=\"markdown.js\"></script>\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: Markdown mode</h1>\n\n<!-- source: http://daringfireball.net/projects/markdown/basics.text -->\n<form><textarea id=\"code\" name=\"code\">\nMarkdown: Basics\n================\n\n&lt;ul id=\"ProjectSubmenu\"&gt;\n    &lt;li&gt;&lt;a href=\"/projects/markdown/\" title=\"Markdown Project Page\"&gt;Main&lt;/a&gt;&lt;/li&gt;\n    &lt;li&gt;&lt;a class=\"selected\" title=\"Markdown Basics\"&gt;Basics&lt;/a&gt;&lt;/li&gt;\n    &lt;li&gt;&lt;a href=\"/projects/markdown/syntax\" title=\"Markdown Syntax Documentation\"&gt;Syntax&lt;/a&gt;&lt;/li&gt;\n    &lt;li&gt;&lt;a href=\"/projects/markdown/license\" title=\"Pricing and License Information\"&gt;License&lt;/a&gt;&lt;/li&gt;\n    &lt;li&gt;&lt;a href=\"/projects/markdown/dingus\" title=\"Online Markdown Web Form\"&gt;Dingus&lt;/a&gt;&lt;/li&gt;\n&lt;/ul&gt;\n\n\nGetting the Gist of Markdown's Formatting Syntax\n------------------------------------------------\n\nThis page offers a brief overview of what it's like to use Markdown.\nThe [syntax page] [s] provides complete, detailed documentation for\nevery feature, but Markdown should be very easy to pick up simply by\nlooking at a few examples of it in action. The examples on this page\nare written in a before/after style, showing example syntax and the\nHTML output produced by Markdown.\n\nIt's also helpful to simply try Markdown out; the [Dingus] [d] is a\nweb application that allows you type your own Markdown-formatted text\nand translate it to XHTML.\n\n**Note:** This document is itself written using Markdown; you\ncan [see the source for it by adding '.text' to the URL] [src].\n\n  [s]: /projects/markdown/syntax  \"Markdown Syntax\"\n  [d]: /projects/markdown/dingus  \"Markdown Dingus\"\n  [src]: /projects/markdown/basics.text\n\n\n## Paragraphs, Headers, Blockquotes ##\n\nA paragraph is simply one or more consecutive lines of text, separated\nby one or more blank lines. (A blank line is any line that looks like\na blank line -- a line containing nothing but spaces or tabs is\nconsidered blank.) Normal paragraphs should not be indented with\nspaces or tabs.\n\nMarkdown offers two styles of headers: *Setext* and *atx*.\nSetext-style headers for `&lt;h1&gt;` and `&lt;h2&gt;` are created by\n\"underlining\" with equal signs (`=`) and hyphens (`-`), respectively.\nTo create an atx-style header, you put 1-6 hash marks (`#`) at the\nbeginning of the line -- the number of hashes equals the resulting\nHTML header level.\n\nBlockquotes are indicated using email-style '`&gt;`' angle brackets.\n\nMarkdown:\n\n    A First Level Header\n    ====================\n    \n    A Second Level Header\n    ---------------------\n\n    Now is the time for all good men to come to\n    the aid of their country. This is just a\n    regular paragraph.\n\n    The quick brown fox jumped over the lazy\n    dog's back.\n    \n    ### Header 3\n\n    &gt; This is a blockquote.\n    &gt; \n    &gt; This is the second paragraph in the blockquote.\n    &gt;\n    &gt; ## This is an H2 in a blockquote\n\n\nOutput:\n\n    &lt;h1&gt;A First Level Header&lt;/h1&gt;\n    \n    &lt;h2&gt;A Second Level Header&lt;/h2&gt;\n    \n    &lt;p&gt;Now is the time for all good men to come to\n    the aid of their country. This is just a\n    regular paragraph.&lt;/p&gt;\n    \n    &lt;p&gt;The quick brown fox jumped over the lazy\n    dog's back.&lt;/p&gt;\n    \n    &lt;h3&gt;Header 3&lt;/h3&gt;\n    \n    &lt;blockquote&gt;\n        &lt;p&gt;This is a blockquote.&lt;/p&gt;\n        \n        &lt;p&gt;This is the second paragraph in the blockquote.&lt;/p&gt;\n        \n        &lt;h2&gt;This is an H2 in a blockquote&lt;/h2&gt;\n    &lt;/blockquote&gt;\n\n\n\n### Phrase Emphasis ###\n\nMarkdown uses asterisks and underscores to indicate spans of emphasis.\n\nMarkdown:\n\n    Some of these words *are emphasized*.\n    Some of these words _are emphasized also_.\n    \n    Use two asterisks for **strong emphasis**.\n    Or, if you prefer, __use two underscores instead__.\n\nOutput:\n\n    &lt;p&gt;Some of these words &lt;em&gt;are emphasized&lt;/em&gt;.\n    Some of these words &lt;em&gt;are emphasized also&lt;/em&gt;.&lt;/p&gt;\n    \n    &lt;p&gt;Use two asterisks for &lt;strong&gt;strong emphasis&lt;/strong&gt;.\n    Or, if you prefer, &lt;strong&gt;use two underscores instead&lt;/strong&gt;.&lt;/p&gt;\n   \n\n\n## Lists ##\n\nUnordered (bulleted) lists use asterisks, pluses, and hyphens (`*`,\n`+`, and `-`) as list markers. These three markers are\ninterchangable; this:\n\n    *   Candy.\n    *   Gum.\n    *   Booze.\n\nthis:\n\n    +   Candy.\n    +   Gum.\n    +   Booze.\n\nand this:\n\n    -   Candy.\n    -   Gum.\n    -   Booze.\n\nall produce the same output:\n\n    &lt;ul&gt;\n    &lt;li&gt;Candy.&lt;/li&gt;\n    &lt;li&gt;Gum.&lt;/li&gt;\n    &lt;li&gt;Booze.&lt;/li&gt;\n    &lt;/ul&gt;\n\nOrdered (numbered) lists use regular numbers, followed by periods, as\nlist markers:\n\n    1.  Red\n    2.  Green\n    3.  Blue\n\nOutput:\n\n    &lt;ol&gt;\n    &lt;li&gt;Red&lt;/li&gt;\n    &lt;li&gt;Green&lt;/li&gt;\n    &lt;li&gt;Blue&lt;/li&gt;\n    &lt;/ol&gt;\n\nIf you put blank lines between items, you'll get `&lt;p&gt;` tags for the\nlist item text. You can create multi-paragraph list items by indenting\nthe paragraphs by 4 spaces or 1 tab:\n\n    *   A list item.\n    \n        With multiple paragraphs.\n\n    *   Another item in the list.\n\nOutput:\n\n    &lt;ul&gt;\n    &lt;li&gt;&lt;p&gt;A list item.&lt;/p&gt;\n    &lt;p&gt;With multiple paragraphs.&lt;/p&gt;&lt;/li&gt;\n    &lt;li&gt;&lt;p&gt;Another item in the list.&lt;/p&gt;&lt;/li&gt;\n    &lt;/ul&gt;\n    \n\n\n### Links ###\n\nMarkdown supports two styles for creating links: *inline* and\n*reference*. With both styles, you use square brackets to delimit the\ntext you want to turn into a link.\n\nInline-style links use parentheses immediately after the link text.\nFor example:\n\n    This is an [example link](http://example.com/).\n\nOutput:\n\n    &lt;p&gt;This is an &lt;a href=\"http://example.com/\"&gt;\n    example link&lt;/a&gt;.&lt;/p&gt;\n\nOptionally, you may include a title attribute in the parentheses:\n\n    This is an [example link](http://example.com/ \"With a Title\").\n\nOutput:\n\n    &lt;p&gt;This is an &lt;a href=\"http://example.com/\" title=\"With a Title\"&gt;\n    example link&lt;/a&gt;.&lt;/p&gt;\n\nReference-style links allow you to refer to your links by names, which\nyou define elsewhere in your document:\n\n    I get 10 times more traffic from [Google][1] than from\n    [Yahoo][2] or [MSN][3].\n\n    [1]: http://google.com/        \"Google\"\n    [2]: http://search.yahoo.com/  \"Yahoo Search\"\n    [3]: http://search.msn.com/    \"MSN Search\"\n\nOutput:\n\n    &lt;p&gt;I get 10 times more traffic from &lt;a href=\"http://google.com/\"\n    title=\"Google\"&gt;Google&lt;/a&gt; than from &lt;a href=\"http://search.yahoo.com/\"\n    title=\"Yahoo Search\"&gt;Yahoo&lt;/a&gt; or &lt;a href=\"http://search.msn.com/\"\n    title=\"MSN Search\"&gt;MSN&lt;/a&gt;.&lt;/p&gt;\n\nThe title attribute is optional. Link names may contain letters,\nnumbers and spaces, but are *not* case sensitive:\n\n    I start my morning with a cup of coffee and\n    [The New York Times][NY Times].\n\n    [ny times]: http://www.nytimes.com/\n\nOutput:\n\n    &lt;p&gt;I start my morning with a cup of coffee and\n    &lt;a href=\"http://www.nytimes.com/\"&gt;The New York Times&lt;/a&gt;.&lt;/p&gt;\n\n\n### Images ###\n\nImage syntax is very much like link syntax.\n\nInline (titles are optional):\n\n    ![alt text](/path/to/img.jpg \"Title\")\n\nReference-style:\n\n    ![alt text][id]\n\n    [id]: /path/to/img.jpg \"Title\"\n\nBoth of the above examples produce the same output:\n\n    &lt;img src=\"/path/to/img.jpg\" alt=\"alt text\" title=\"Title\" /&gt;\n\n\n\n### Code ###\n\nIn a regular paragraph, you can create code span by wrapping text in\nbacktick quotes. Any ampersands (`&amp;`) and angle brackets (`&lt;` or\n`&gt;`) will automatically be translated into HTML entities. This makes\nit easy to use Markdown to write about HTML example code:\n\n    I strongly recommend against using any `&lt;blink&gt;` tags.\n\n    I wish SmartyPants used named entities like `&amp;mdash;`\n    instead of decimal-encoded entites like `&amp;#8212;`.\n\nOutput:\n\n    &lt;p&gt;I strongly recommend against using any\n    &lt;code&gt;&amp;lt;blink&amp;gt;&lt;/code&gt; tags.&lt;/p&gt;\n    \n    &lt;p&gt;I wish SmartyPants used named entities like\n    &lt;code&gt;&amp;amp;mdash;&lt;/code&gt; instead of decimal-encoded\n    entites like &lt;code&gt;&amp;amp;#8212;&lt;/code&gt;.&lt;/p&gt;\n\n\nTo specify an entire block of pre-formatted code, indent every line of\nthe block by 4 spaces or 1 tab. Just like with code spans, `&amp;`, `&lt;`,\nand `&gt;` characters will be escaped automatically.\n\nMarkdown:\n\n    If you want your page to validate under XHTML 1.0 Strict,\n    you've got to put paragraph tags in your blockquotes:\n\n        &lt;blockquote&gt;\n            &lt;p&gt;For example.&lt;/p&gt;\n        &lt;/blockquote&gt;\n\nOutput:\n\n    &lt;p&gt;If you want your page to validate under XHTML 1.0 Strict,\n    you've got to put paragraph tags in your blockquotes:&lt;/p&gt;\n    \n    &lt;pre&gt;&lt;code&gt;&amp;lt;blockquote&amp;gt;\n        &amp;lt;p&amp;gt;For example.&amp;lt;/p&amp;gt;\n    &amp;lt;/blockquote&amp;gt;\n    &lt;/code&gt;&lt;/pre&gt;\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: 'markdown',\n        lineNumbers: true,\n        matchBrackets: true,\n        theme: \"default\"\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-markdown</code>.</p>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/markdown/markdown.js",
    "content": "CodeMirror.defineMode(\"markdown\", function(cmCfg, modeCfg) {\n\n  var htmlMode = CodeMirror.getMode(cmCfg, { name: 'xml', htmlMode: true });\n\n  var header   = 'header'\n  ,   code     = 'comment'\n  ,   quote    = 'quote'\n  ,   list     = 'string'\n  ,   hr       = 'hr'\n  ,   linktext = 'link'\n  ,   linkhref = 'string'\n  ,   em       = 'em'\n  ,   strong   = 'strong'\n  ,   emstrong = 'emstrong';\n\n  var hrRE = /^([*\\-=_])(?:\\s*\\1){2,}\\s*$/\n  ,   ulRE = /^[*\\-+]\\s+/\n  ,   olRE = /^[0-9]+\\.\\s+/\n  ,   headerRE = /^(?:\\={3,}|-{3,})$/\n  ,   textRE = /^[^\\[*_\\\\<>`]+/;\n\n  function switchInline(stream, state, f) {\n    state.f = state.inline = f;\n    return f(stream, state);\n  }\n\n  function switchBlock(stream, state, f) {\n    state.f = state.block = f;\n    return f(stream, state);\n  }\n\n\n  // Blocks\n\n  function blankLine(state) {\n    // Reset EM state\n    state.em = false;\n    // Reset STRONG state\n    state.strong = false;\n    return null;\n  }\n\n  function blockNormal(stream, state) {\n    var match;\n    if (state.indentationDiff >= 4) {\n      state.indentation -= state.indentationDiff;\n      stream.skipToEnd();\n      return code;\n    } else if (stream.eatSpace()) {\n      return null;\n    } else if (stream.peek() === '#' || stream.match(headerRE)) {\n      state.header = true;\n    } else if (stream.eat('>')) {\n      state.indentation++;\n      state.quote = true;\n    } else if (stream.peek() === '[') {\n      return switchInline(stream, state, footnoteLink);\n    } else if (stream.match(hrRE, true)) {\n      return hr;\n    } else if (match = stream.match(ulRE, true) || stream.match(olRE, true)) {\n      state.indentation += match[0].length;\n      return list;\n    }\n    \n    return switchInline(stream, state, state.inline);\n  }\n\n  function htmlBlock(stream, state) {\n    var style = htmlMode.token(stream, state.htmlState);\n    if (style === 'tag' && state.htmlState.type !== 'openTag' && !state.htmlState.context) {\n      state.f = inlineNormal;\n      state.block = blockNormal;\n    }\n    return style;\n  }\n\n\n  // Inline\n  function getType(state) {\n    var styles = [];\n    \n    if (state.strong) { styles.push(state.em ? emstrong : strong); }\n    else if (state.em) { styles.push(em); }\n    \n    if (state.header) { styles.push(header); }\n    if (state.quote) { styles.push(quote); }\n\n    return styles.length ? styles.join(' ') : null;\n  }\n\n  function handleText(stream, state) {\n    if (stream.match(textRE, true)) {\n      return getType(state);\n    }\n    return undefined;        \n  }\n\n  function inlineNormal(stream, state) {\n    var style = state.text(stream, state)\n    if (typeof style !== 'undefined')\n      return style;\n    \n    var ch = stream.next();\n    \n    if (ch === '\\\\') {\n      stream.next();\n      return getType(state);\n    }\n    if (ch === '`') {\n      return switchInline(stream, state, inlineElement(code, '`'));\n    }\n    if (ch === '[') {\n      return switchInline(stream, state, linkText);\n    }\n    if (ch === '<' && stream.match(/^\\w/, false)) {\n      stream.backUp(1);\n      return switchBlock(stream, state, htmlBlock);\n    }\n\n    var t = getType(state);\n    if (ch === '*' || ch === '_') {\n      if (stream.eat(ch)) {\n        return (state.strong = !state.strong) ? getType(state) : t;\n      }\n      return (state.em = !state.em) ? getType(state) : t;\n    }\n    \n    return getType(state);\n  }\n\n  function linkText(stream, state) {\n    while (!stream.eol()) {\n      var ch = stream.next();\n      if (ch === '\\\\') stream.next();\n      if (ch === ']') {\n        state.inline = state.f = linkHref;\n        return linktext;\n      }\n    }\n    return linktext;\n  }\n\n  function linkHref(stream, state) {\n    stream.eatSpace();\n    var ch = stream.next();\n    if (ch === '(' || ch === '[') {\n      return switchInline(stream, state, inlineElement(linkhref, ch === '(' ? ')' : ']'));\n    }\n    return 'error';\n  }\n\n  function footnoteLink(stream, state) {\n    if (stream.match(/^[^\\]]*\\]:/, true)) {\n      state.f = footnoteUrl;\n      return linktext;\n    }\n    return switchInline(stream, state, inlineNormal);\n  }\n\n  function footnoteUrl(stream, state) {\n    stream.eatSpace();\n    stream.match(/^[^\\s]+/, true);\n    state.f = state.inline = inlineNormal;\n    return linkhref;\n  }\n\n  function inlineRE(endChar) {\n    if (!inlineRE[endChar]) {\n      // match any not-escaped-non-endChar and any escaped char\n      // then match endChar or eol\n      inlineRE[endChar] = new RegExp('^(?:[^\\\\\\\\\\\\' + endChar + ']|\\\\\\\\.)*(?:\\\\' + endChar + '|$)');\n    }\n    return inlineRE[endChar];\n  }\n\n  function inlineElement(type, endChar, next) {\n    next = next || inlineNormal;\n    return function(stream, state) {\n      stream.match(inlineRE(endChar));\n      state.inline = state.f = next;\n      return type;\n    };\n  }\n\n  return {\n    startState: function() {\n      return {\n        f: blockNormal,\n        \n        block: blockNormal,\n        htmlState: htmlMode.startState(),\n        indentation: 0,\n        \n        inline: inlineNormal,\n        text: handleText,\n        em: false,\n        strong: false,\n        header: false,\n        quote: false\n      };\n    },\n\n    copyState: function(s) {\n      return {\n        f: s.f,\n        \n        block: s.block,\n        htmlState: CodeMirror.copyState(htmlMode, s.htmlState),\n        indentation: s.indentation,\n        \n        inline: s.inline,\n        text: s.text,\n        em: s.em,\n        strong: s.strong,\n        header: s.header,\n        quote: s.quote\n      };\n    },\n\n    token: function(stream, state) {\n      if (stream.sol()) {\n        if (stream.match(/^\\s*$/, true)) { return blankLine(state); }\n\n        // Reset state.header\n        state.header = false;\n        // Reset state.quote\n        state.quote = false;\n\n        state.f = state.block;\n        var indentation = stream.match(/^\\s*/, true)[0].replace(/\\t/g, '    ').length;\n        state.indentationDiff = indentation - state.indentation;\n        state.indentation = indentation;\n        if (indentation > 0) { return null; }\n      }\n      return state.f(stream, state);\n    },\n\n    blankLine: blankLine,\n\n    getType: getType\n  };\n\n}, \"xml\");\n\nCodeMirror.defineMIME(\"text/x-markdown\", \"markdown\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/mysql/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: MySQL mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"mysql.js\"></script>\n    <style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: MySQL mode</h1>\n    <form><textarea id=\"code\" name=\"code\">\n-- Comment for the code\n-- MySQL Mode for CodeMirror2 by MySQLTools http://github.com/partydroid/MySQL-Tools\nSELECT  UNIQUE `var1` as `variable`,\n        MAX(`var5`) as `max`,\n        MIN(`var5`) as `min`,\n        STDEV(`var5`) as `dev`\nFROM `table`\n\nLEFT JOIN `table2` ON `var2` = `variable`\n\nORDER BY `var3` DESC\nGROUP BY `groupvar`\n\nLIMIT 0,30;\n\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: \"text/x-mysql\",\n        tabMode: \"indent\",\n        matchBrackets: true\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-mysql</code>.</p>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/mysql/mysql.js",
    "content": "/*\n *\tMySQL Mode for CodeMirror 2 by MySQL-Tools\n *\t@author James Thorne (partydroid)\n *\t@link \thttp://github.com/partydroid/MySQL-Tools\n * \t@link \thttp://mysqltools.org\n *\t@version 02/Jan/2012\n*/\nCodeMirror.defineMode(\"mysql\", function(config) {\n  var indentUnit = config.indentUnit;\n  var curPunc;\n\n  function wordRegexp(words) {\n    return new RegExp(\"^(?:\" + words.join(\"|\") + \")$\", \"i\");\n  }\n  var ops = wordRegexp([\"str\", \"lang\", \"langmatches\", \"datatype\", \"bound\", \"sameterm\", \"isiri\", \"isuri\",\n                        \"isblank\", \"isliteral\", \"union\", \"a\"]);\n  var keywords = wordRegexp([\n  \t('ACCESSIBLE'),('ALTER'),('AS'),('BEFORE'),('BINARY'),('BY'),('CASE'),('CHARACTER'),('COLUMN'),('CONTINUE'),('CROSS'),('CURRENT_TIMESTAMP'),('DATABASE'),('DAY_MICROSECOND'),('DEC'),('DEFAULT'),\n\t('DESC'),('DISTINCT'),('DOUBLE'),('EACH'),('ENCLOSED'),('EXIT'),('FETCH'),('FLOAT8'),('FOREIGN'),('GRANT'),('HIGH_PRIORITY'),('HOUR_SECOND'),('IN'),('INNER'),('INSERT'),('INT2'),('INT8'),\n\t('INTO'),('JOIN'),('KILL'),('LEFT'),('LINEAR'),('LOCALTIME'),('LONG'),('LOOP'),('MATCH'),('MEDIUMTEXT'),('MINUTE_SECOND'),('NATURAL'),('NULL'),('OPTIMIZE'),('OR'),('OUTER'),('PRIMARY'),\n\t('RANGE'),('READ_WRITE'),('REGEXP'),('REPEAT'),('RESTRICT'),('RIGHT'),('SCHEMAS'),('SENSITIVE'),('SHOW'),('SPECIFIC'),('SQLSTATE'),('SQL_CALC_FOUND_ROWS'),('STARTING'),('TERMINATED'),\n\t('TINYINT'),('TRAILING'),('UNDO'),('UNLOCK'),('USAGE'),('UTC_DATE'),('VALUES'),('VARCHARACTER'),('WHERE'),('WRITE'),('ZEROFILL'),('ALL'),('AND'),('ASENSITIVE'),('BIGINT'),('BOTH'),('CASCADE'),\n\t('CHAR'),('COLLATE'),('CONSTRAINT'),('CREATE'),('CURRENT_TIME'),('CURSOR'),('DAY_HOUR'),('DAY_SECOND'),('DECLARE'),('DELETE'),('DETERMINISTIC'),('DIV'),('DUAL'),('ELSEIF'),('EXISTS'),('FALSE'),\n\t('FLOAT4'),('FORCE'),('FULLTEXT'),('HAVING'),('HOUR_MINUTE'),('IGNORE'),('INFILE'),('INSENSITIVE'),('INT1'),('INT4'),('INTERVAL'),('ITERATE'),('KEYS'),('LEAVE'),('LIMIT'),('LOAD'),('LOCK'),\n\t('LONGTEXT'),('MASTER_SSL_VERIFY_SERVER_CERT'),('MEDIUMINT'),('MINUTE_MICROSECOND'),('MODIFIES'),('NO_WRITE_TO_BINLOG'),('ON'),('OPTIONALLY'),('OUT'),('PRECISION'),('PURGE'),('READS'),\n\t('REFERENCES'),('RENAME'),('REQUIRE'),('REVOKE'),('SCHEMA'),('SELECT'),('SET'),('SPATIAL'),('SQLEXCEPTION'),('SQL_BIG_RESULT'),('SSL'),('TABLE'),('TINYBLOB'),('TO'),('TRUE'),('UNIQUE'),\n\t('UPDATE'),('USING'),('UTC_TIMESTAMP'),('VARCHAR'),('WHEN'),('WITH'),('YEAR_MONTH'),('ADD'),('ANALYZE'),('ASC'),('BETWEEN'),('BLOB'),('CALL'),('CHANGE'),('CHECK'),('CONDITION'),('CONVERT'),\n\t('CURRENT_DATE'),('CURRENT_USER'),('DATABASES'),('DAY_MINUTE'),('DECIMAL'),('DELAYED'),('DESCRIBE'),('DISTINCTROW'),('DROP'),('ELSE'),('ESCAPED'),('EXPLAIN'),('FLOAT'),('FOR'),('FROM'),\n\t('GROUP'),('HOUR_MICROSECOND'),('IF'),('INDEX'),('INOUT'),('INT'),('INT3'),('INTEGER'),('IS'),('KEY'),('LEADING'),('LIKE'),('LINES'),('LOCALTIMESTAMP'),('LONGBLOB'),('LOW_PRIORITY'),\n\t('MEDIUMBLOB'),('MIDDLEINT'),('MOD'),('NOT'),('NUMERIC'),('OPTION'),('ORDER'),('OUTFILE'),('PROCEDURE'),('READ'),('REAL'),('RELEASE'),('REPLACE'),('RETURN'),('RLIKE'),('SECOND_MICROSECOND'),\n\t('SEPARATOR'),('SMALLINT'),('SQL'),('SQLWARNING'),('SQL_SMALL_RESULT'),('STRAIGHT_JOIN'),('THEN'),('TINYTEXT'),('TRIGGER'),('UNION'),('UNSIGNED'),('USE'),('UTC_TIME'),('VARBINARY'),('VARYING'),\n\t('WHILE'),('XOR'),('FULL'),('COLUMNS'),('MIN'),('MAX'),('STDEV'),('COUNT')\n  ]);\n  var operatorChars = /[*+\\-<>=&|]/;\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    curPunc = null;\n    if (ch == \"$\" || ch == \"?\") {\n      stream.match(/^[\\w\\d]*/);\n      return \"variable-2\";\n    }\n    else if (ch == \"<\" && !stream.match(/^[\\s\\u00a0=]/, false)) {\n      stream.match(/^[^\\s\\u00a0>]*>?/);\n      return \"atom\";\n    }\n    else if (ch == \"\\\"\" || ch == \"'\") {\n      state.tokenize = tokenLiteral(ch);\n      return state.tokenize(stream, state);\n    }\n    else if (ch == \"`\") {\n      state.tokenize = tokenOpLiteral(ch);\n      return state.tokenize(stream, state);\n    }\n    else if (/[{}\\(\\),\\.;\\[\\]]/.test(ch)) {\n      curPunc = ch;\n      return null;\n    }\n    else if (ch == \"-\") {\n\t\tch2 = stream.next();\n\t\tif(ch2==\"-\")\n\t\t{\n\t\t\tstream.skipToEnd();\n\t\t\treturn \"comment\";\n\t\t}\n\n    }\n    else if (operatorChars.test(ch)) {\n      stream.eatWhile(operatorChars);\n      return null;\n    }\n    else if (ch == \":\") {\n      stream.eatWhile(/[\\w\\d\\._\\-]/);\n      return \"atom\";\n    }\n    else {\n      stream.eatWhile(/[_\\w\\d]/);\n      if (stream.eat(\":\")) {\n        stream.eatWhile(/[\\w\\d_\\-]/);\n        return \"atom\";\n      }\n      var word = stream.current(), type;\n      if (ops.test(word))\n        return null;\n      else if (keywords.test(word))\n        return \"keyword\";\n      else\n        return \"variable\";\n    }\n  }\n\n  function tokenLiteral(quote) {\n    return function(stream, state) {\n      var escaped = false, ch;\n      while ((ch = stream.next()) != null) {\n        if (ch == quote && !escaped) {\n          state.tokenize = tokenBase;\n          break;\n        }\n        escaped = !escaped && ch == \"\\\\\";\n      }\n      return \"string\";\n    };\n  }\n\n  function tokenOpLiteral(quote) {\n    return function(stream, state) {\n      var escaped = false, ch;\n      while ((ch = stream.next()) != null) {\n        if (ch == quote && !escaped) {\n          state.tokenize = tokenBase;\n          break;\n        }\n        escaped = !escaped && ch == \"\\\\\";\n      }\n      return \"variable-2\";\n    };\n  }\n\n\n  function pushContext(state, type, col) {\n    state.context = {prev: state.context, indent: state.indent, col: col, type: type};\n  }\n  function popContext(state) {\n    state.indent = state.context.indent;\n    state.context = state.context.prev;\n  }\n\n  return {\n    startState: function(base) {\n      return {tokenize: tokenBase,\n              context: null,\n              indent: 0,\n              col: 0};\n    },\n\n    token: function(stream, state) {\n      if (stream.sol()) {\n        if (state.context && state.context.align == null) state.context.align = false;\n        state.indent = stream.indentation();\n      }\n      if (stream.eatSpace()) return null;\n      var style = state.tokenize(stream, state);\n\n      if (style != \"comment\" && state.context && state.context.align == null && state.context.type != \"pattern\") {\n        state.context.align = true;\n      }\n\n      if (curPunc == \"(\") pushContext(state, \")\", stream.column());\n      else if (curPunc == \"[\") pushContext(state, \"]\", stream.column());\n      else if (curPunc == \"{\") pushContext(state, \"}\", stream.column());\n      else if (/[\\]\\}\\)]/.test(curPunc)) {\n        while (state.context && state.context.type == \"pattern\") popContext(state);\n        if (state.context && curPunc == state.context.type) popContext(state);\n      }\n      else if (curPunc == \".\" && state.context && state.context.type == \"pattern\") popContext(state);\n      else if (/atom|string|variable/.test(style) && state.context) {\n        if (/[\\}\\]]/.test(state.context.type))\n          pushContext(state, \"pattern\", stream.column());\n        else if (state.context.type == \"pattern\" && !state.context.align) {\n          state.context.align = true;\n          state.context.col = stream.column();\n        }\n      }\n\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      var firstChar = textAfter && textAfter.charAt(0);\n      var context = state.context;\n      if (/[\\]\\}]/.test(firstChar))\n        while (context && context.type == \"pattern\") context = context.prev;\n\n      var closing = context && firstChar == context.type;\n      if (!context)\n        return 0;\n      else if (context.type == \"pattern\")\n        return context.col;\n      else if (context.align)\n        return context.col + (closing ? 0 : 1);\n      else\n        return context.indent + (closing ? 0 : indentUnit);\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-mysql\", \"mysql\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/ntriples/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: NTriples mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"ntriples.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n    <style type=\"text/css\">\n      .CodeMirror {\n        border: 1px solid #eee;\n      }\n    </style>   \n  </head>\n  <body>\n    <h1>CodeMirror: NTriples mode</h1>\n<form>\n<textarea id=\"ntriples\" name=\"ntriples\">    \n<http://Sub1>     <http://pred1>     <http://obj> .\n<http://Sub2>     <http://pred2#an2> \"literal 1\" .\n<http://Sub3#an3> <http://pred3>     _:bnode3 .\n_:bnode4          <http://pred4>     \"literal 2\"@lang .\n_:bnode5          <http://pred5>     \"literal 3\"^^<http://type> .\n</textarea>\n</form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"ntriples\"), {});\n    </script>\n    <p><strong>MIME types defined:</strong> <code>text/n-triples</code>.</p>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/ntriples/ntriples.js",
    "content": "/**********************************************************\n* This script provides syntax highlighting support for \n* the Ntriples format.\n* Ntriples format specification: \n*     http://www.w3.org/TR/rdf-testcases/#ntriples\n***********************************************************/\n\n/* \n    The following expression defines the defined ASF grammar transitions.\n\n    pre_subject ->\n        {\n        ( writing_subject_uri | writing_bnode_uri )\n            -> pre_predicate \n                -> writing_predicate_uri \n                    -> pre_object \n                        -> writing_object_uri | writing_object_bnode | \n                          ( \n                            writing_object_literal \n                                -> writing_literal_lang | writing_literal_type\n                          )\n                            -> post_object\n                                -> BEGIN\n         } otherwise {\n             -> ERROR\n         }\n*/\nCodeMirror.defineMode(\"ntriples\", function() {  \n\n  Location = {\n    PRE_SUBJECT         : 0,\n    WRITING_SUB_URI     : 1,\n    WRITING_BNODE_URI   : 2,\n    PRE_PRED            : 3,\n    WRITING_PRED_URI    : 4,\n    PRE_OBJ             : 5,\n    WRITING_OBJ_URI     : 6,\n    WRITING_OBJ_BNODE   : 7,\n    WRITING_OBJ_LITERAL : 8,\n    WRITING_LIT_LANG    : 9,\n    WRITING_LIT_TYPE    : 10,\n    POST_OBJ            : 11,\n    ERROR               : 12\n  };\n  function transitState(currState, c) {\n    var currLocation = currState.location;\n    var ret;\n    \n    // Opening.\n    if     (currLocation == Location.PRE_SUBJECT && c == '<') ret = Location.WRITING_SUB_URI;\n    else if(currLocation == Location.PRE_SUBJECT && c == '_') ret = Location.WRITING_BNODE_URI;\n    else if(currLocation == Location.PRE_PRED    && c == '<') ret = Location.WRITING_PRED_URI;\n    else if(currLocation == Location.PRE_OBJ     && c == '<') ret = Location.WRITING_OBJ_URI;\n    else if(currLocation == Location.PRE_OBJ     && c == '_') ret = Location.WRITING_OBJ_BNODE;\n    else if(currLocation == Location.PRE_OBJ     && c == '\"') ret = Location.WRITING_OBJ_LITERAL;\n    \n    // Closing.\n    else if(currLocation == Location.WRITING_SUB_URI     && c == '>') ret = Location.PRE_PRED;\n    else if(currLocation == Location.WRITING_BNODE_URI   && c == ' ') ret = Location.PRE_PRED;\n    else if(currLocation == Location.WRITING_PRED_URI    && c == '>') ret = Location.PRE_OBJ;\n    else if(currLocation == Location.WRITING_OBJ_URI     && c == '>') ret = Location.POST_OBJ;\n    else if(currLocation == Location.WRITING_OBJ_BNODE   && c == ' ') ret = Location.POST_OBJ;\n    else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '\"') ret = Location.POST_OBJ;\n    else if(currLocation == Location.WRITING_LIT_LANG && c == ' ') ret = Location.POST_OBJ;\n    else if(currLocation == Location.WRITING_LIT_TYPE && c == '>') ret = Location.POST_OBJ;\n    \n    // Closing typed and language literal.\n    else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '@') ret = Location.WRITING_LIT_LANG;\n    else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '^') ret = Location.WRITING_LIT_TYPE;\n\n    // Spaces.\n    else if( c == ' ' &&                             \n             (\n               currLocation == Location.PRE_SUBJECT || \n               currLocation == Location.PRE_PRED    || \n               currLocation == Location.PRE_OBJ     || \n               currLocation == Location.POST_OBJ\n             )\n           ) ret = currLocation;\n    \n    // Reset.\n    else if(currLocation == Location.POST_OBJ && c == '.') ret = Location.PRE_SUBJECT;    \n    \n    // Error\n    else ret = Location.ERROR;\n    \n    currState.location=ret;\n  }\n\n  untilSpace  = function(c) { return c != ' '; };\n  untilEndURI = function(c) { return c != '>'; };\n  return {\n    startState: function() {\n       return { \n           location : Location.PRE_SUBJECT,\n           uris     : [],\n           anchors  : [],\n           bnodes   : [],\n           langs    : [],\n           types    : []\n       };\n    },\n    token: function(stream, state) {\n      var ch = stream.next();\n      if(ch == '<') {\n         transitState(state, ch);\n         var parsedURI = '';\n         stream.eatWhile( function(c) { if( c != '#' && c != '>' ) { parsedURI += c; return true; } return false;} );\n         state.uris.push(parsedURI);\n         if( stream.match('#', false) ) return 'variable';\n         stream.next();\n         transitState(state, '>');\n         return 'variable';\n      }\n      if(ch == '#') {\n        var parsedAnchor = '';\n        stream.eatWhile(function(c) { if(c != '>' && c != ' ') { parsedAnchor+= c; return true; } return false});\n        state.anchors.push(parsedAnchor);\n        return 'variable-2';\n      }\n      if(ch == '>') {\n          transitState(state, '>');\n          return 'variable';\n      }\n      if(ch == '_') {\n          transitState(state, ch);\n          var parsedBNode = '';\n          stream.eatWhile(function(c) { if( c != ' ' ) { parsedBNode += c; return true; } return false;});\n          state.bnodes.push(parsedBNode);\n          stream.next();\n          transitState(state, ' ');\n          return 'builtin';\n      }\n      if(ch == '\"') {\n          transitState(state, ch);\n          stream.eatWhile( function(c) { return c != '\"'; } );\n          stream.next();\n          if( stream.peek() != '@' && stream.peek() != '^' ) {\n              transitState(state, '\"');\n          }\n          return 'string';\n      }\n      if( ch == '@' ) {\n          transitState(state, '@');\n          var parsedLang = '';\n          stream.eatWhile(function(c) { if( c != ' ' ) { parsedLang += c; return true; } return false;});\n          state.langs.push(parsedLang);\n          stream.next();\n          transitState(state, ' ');\n          return 'string-2';\n      }\n      if( ch == '^' ) {\n          stream.next();\n          transitState(state, '^');\n          var parsedType = '';\n          stream.eatWhile(function(c) { if( c != '>' ) { parsedType += c; return true; } return false;} );\n          state.types.push(parsedType);\n          stream.next();\n          transitState(state, '>');\n          return 'variable';\n      }\n      if( ch == ' ' ) {\n          transitState(state, ch);\n      }\n      if( ch == '.' ) {\n          transitState(state, ch);\n      }\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/n-triples\", \"ntriples\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/pascal/LICENSE",
    "content": "Copyright (c) 2011 souceLair <support@sourcelair.com>\n\nPermission 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:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE 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.\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/pascal/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Pascal mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"pascal.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n  </head>\n  <body>\n    <h1>CodeMirror: Pascal mode</h1>\n\n<div><textarea id=\"code\" name=\"code\">\n(* Example Pascal code *)\n\nwhile a <> b do writeln('Waiting');\n \nif a > b then \n  writeln('Condition met')\nelse \n  writeln('Condition not met');\n \nfor i := 1 to 10 do \n  writeln('Iteration: ', i:1);\n \nrepeat\n  a := a + 1\nuntil a = 10;\n \ncase i of\n  0: write('zero');\n  1: write('one');\n  2: write('two')\nend;\n</textarea></div>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        mode: \"text/x-pascal\"\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-pascal</code>.</p>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/pascal/pascal.js",
    "content": "CodeMirror.defineMode(\"pascal\", function(config) {\n  function words(str) {\n    var obj = {}, words = str.split(\" \");\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n    return obj;\n  }\n  var keywords = words(\"and array begin case const div do downto else end file for forward integer \" +\n                       \"boolean char function goto if in label mod nil not of or packed procedure \" +\n                       \"program record repeat set string then to type until var while with\");\n  var atoms = {\"null\": true};\n\n  var isOperatorChar = /[+\\-*&%=<>!?|\\/]/;\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    if (ch == \"#\" && state.startOfLine) {\n      stream.skipToEnd();\n      return \"meta\";\n    }\n    if (ch == '\"' || ch == \"'\") {\n      state.tokenize = tokenString(ch);\n      return state.tokenize(stream, state);\n    }\n    if (ch == \"(\" && stream.eat(\"*\")) {\n      state.tokenize = tokenComment;\n      return tokenComment(stream, state);\n    }\n    if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch)) {\n      return null\n    }\n    if (/\\d/.test(ch)) {\n      stream.eatWhile(/[\\w\\.]/);\n      return \"number\";\n    }\n    if (ch == \"/\") {\n      if (stream.eat(\"/\")) {\n        stream.skipToEnd();\n        return \"comment\";\n      }\n    }\n    if (isOperatorChar.test(ch)) {\n      stream.eatWhile(isOperatorChar);\n      return \"operator\";\n    }\n    stream.eatWhile(/[\\w\\$_]/);\n    var cur = stream.current();\n    if (keywords.propertyIsEnumerable(cur)) return \"keyword\";\n    if (atoms.propertyIsEnumerable(cur)) return \"atom\";\n    return \"word\";\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var escaped = false, next, end = false;\n      while ((next = stream.next()) != null) {\n        if (next == quote && !escaped) {end = true; break;}\n        escaped = !escaped && next == \"\\\\\";\n      }\n      if (end || !escaped) state.tokenize = null;\n      return \"string\";\n    };\n  }\n\n  function tokenComment(stream, state) {\n    var maybeEnd = false, ch;\n    while (ch = stream.next()) {\n      if (ch == \")\" && maybeEnd) {\n        state.tokenize = null;\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return \"comment\";\n  }\n\n  // Interface\n\n  return {\n    startState: function(basecolumn) {\n      return {tokenize: null};\n    },\n\n    token: function(stream, state) {\n      if (stream.eatSpace()) return null;\n      var style = (state.tokenize || tokenBase)(stream, state);\n      if (style == \"comment\" || style == \"meta\") return style;\n      return style;\n    },\n\n    electricChars: \"{}\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-pascal\", \"pascal\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/perl/LICENSE",
    "content": "Copyright (C) 2011 by Sabaca <mail@sabaca.com> under the MIT license.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/perl/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Perl mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"perl.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n  </head>\n  <body>\n    <h1>CodeMirror: Perl mode</h1>\n\n<div><textarea id=\"code\" name=\"code\">\n#!/usr/bin/perl\n\nuse Something qw(func1 func2);\n\n# strings\nmy $s1 = qq'single line';\nour $s2 = q(multi-\n              line);\n\n=item Something\n\tExample.\n=cut\n\nmy $html=<<'HTML'\n<html>\n<title>hi!</title>\n</html>\nHTML\n\nprint \"first,\".join(',', 'second', qq~third~);\n\nif($s1 =~ m[(?<!\\s)(l.ne)\\z]o) {\n\t$h->{$1}=$$.' predefined variables';\n\t$s2 =~ s/\\-line//ox;\n\t$s1 =~ s[\n\t\t  line ]\n\t\t[\n\t\t  block\n\t\t]ox;\n}\n\n1; # numbers and comments\n\n__END__\nsomething...\n\n</textarea></div>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-perl</code>.</p>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/perl/perl.js",
    "content": "// CodeMirror2 mode/perl/perl.js (text/x-perl) beta 0.10 (2011-11-08)\n// This is a part of CodeMirror from https://github.com/sabaca/CodeMirror_mode_perl (mail@sabaca.com)\nCodeMirror.defineMode(\"perl\",function(config,parserConfig){\n\t// http://perldoc.perl.org\n\tvar PERL={\t\t\t\t    \t//   null - magic touch\n\t\t\t\t\t\t\t//   1 - keyword\n\t\t\t\t\t\t\t//   2 - def\n\t\t\t\t\t\t\t//   3 - atom\n\t\t\t\t\t\t\t//   4 - operator\n\t\t\t\t\t\t\t//   5 - variable-2 (predefined)\n\t\t\t\t\t\t\t//   [x,y] - x=1,2,3; y=must be defined if x{...}\n\t\t\t\t\t\t//\tPERL operators\n\t\t'->'\t\t\t\t:   4,\n\t\t'++'\t\t\t\t:   4,\n\t\t'--'\t\t\t\t:   4,\n\t\t'**'\t\t\t\t:   4,\n\t\t\t\t\t\t\t//   ! ~ \\ and unary + and -\n\t\t'=~'\t\t\t\t:   4,\n\t\t'!~'\t\t\t\t:   4,\n\t\t'*'\t\t\t\t:   4,\n\t\t'/'\t\t\t\t:   4,\n\t\t'%'\t\t\t\t:   4,\n\t\t'x'\t\t\t\t:   4,\n\t\t'+'\t\t\t\t:   4,\n\t\t'-'\t\t\t\t:   4,\n\t\t'.'\t\t\t\t:   4,\n\t\t'<<'\t\t\t\t:   4,\n\t\t'>>'\t\t\t\t:   4,\n\t\t\t\t\t\t\t//   named unary operators\n\t\t'<'\t\t\t\t:   4,\n\t\t'>'\t\t\t\t:   4,\n\t\t'<='\t\t\t\t:   4,\n\t\t'>='\t\t\t\t:   4,\n\t\t'lt'\t\t\t\t:   4,\n\t\t'gt'\t\t\t\t:   4,\n\t\t'le'\t\t\t\t:   4,\n\t\t'ge'\t\t\t\t:   4,\n\t\t'=='\t\t\t\t:   4,\n\t\t'!='\t\t\t\t:   4,\n\t\t'<=>'\t\t\t\t:   4,\n\t\t'eq'\t\t\t\t:   4,\n\t\t'ne'\t\t\t\t:   4,\n\t\t'cmp'\t\t\t\t:   4,\n\t\t'~~'\t\t\t\t:   4,\n\t\t'&'\t\t\t\t:   4,\n\t\t'|'\t\t\t\t:   4,\n\t\t'^'\t\t\t\t:   4,\n\t\t'&&'\t\t\t\t:   4,\n\t\t'||'\t\t\t\t:   4,\n\t\t'//'\t\t\t\t:   4,\n\t\t'..'\t\t\t\t:   4,\n\t\t'...'\t\t\t\t:   4,\n\t\t'?'\t\t\t\t:   4,\n\t\t':'\t\t\t\t:   4,\n\t\t'='\t\t\t\t:   4,\n\t\t'+='\t\t\t\t:   4,\n\t\t'-='\t\t\t\t:   4,\n\t\t'*='\t\t\t\t:   4,\t//   etc. ???\n\t\t','\t\t\t\t:   4,\n\t\t'=>'\t\t\t\t:   4,\n\t\t'::'\t\t\t\t:   4,\n\t\t\t\t   \t\t\t//   list operators (rightward)\n\t\t'not'\t\t\t\t:   4,\n\t\t'and'\t\t\t\t:   4,\n\t\t'or'\t\t\t\t:   4,\n\t\t'xor'\t\t\t\t:   4,\n\t\t\t\t\t\t//\tPERL predefined variables (I know, what this is a paranoid idea, but may be needed for people, who learn PERL, and for me as well, ...and may be for you?;)\n\t\t'BEGIN'\t\t\t\t:   [5,1],\n\t\t'END'\t\t\t\t:   [5,1],\n\t\t'PRINT'\t\t\t\t:   [5,1],\n\t\t'PRINTF'\t\t\t:   [5,1],\n\t\t'GETC'\t\t\t\t:   [5,1],\n\t\t'READ'\t\t\t\t:   [5,1],\n\t\t'READLINE'\t\t\t:   [5,1],\n\t\t'DESTROY'\t\t\t:   [5,1],\n\t\t'TIE'\t\t\t\t:   [5,1],\n\t\t'TIEHANDLE'\t\t\t:   [5,1],\n\t\t'UNTIE'\t\t\t\t:   [5,1],\n\t\t'STDIN'\t\t\t\t:    5,\n\t\t'STDIN_TOP'\t\t\t:    5,\n\t\t'STDOUT'\t\t\t:    5,\n\t\t'STDOUT_TOP'\t\t\t:    5,\n\t\t'STDERR'\t\t\t:    5,\n\t\t'STDERR_TOP'\t\t\t:    5,\n\t\t'$ARG'\t\t\t\t:    5,\n\t\t'$_'\t\t\t\t:    5,\n\t\t'@ARG'\t\t\t\t:    5,\n\t\t'@_'\t\t\t\t:    5,\n\t\t'$LIST_SEPARATOR'\t\t:    5,\n\t\t'$\"'\t\t\t\t:    5,\n\t\t'$PROCESS_ID'\t\t\t:    5,\n\t\t'$PID'\t\t\t\t:    5,\n\t\t'$$'\t\t\t\t:    5,\n\t\t'$REAL_GROUP_ID'\t\t:    5,\n\t\t'$GID'\t\t\t\t:    5,\n\t\t'$('\t\t\t\t:    5,\n\t\t'$EFFECTIVE_GROUP_ID'\t\t:    5,\n\t\t'$EGID'\t\t\t\t:    5,\n\t\t'$)'\t\t\t\t:    5,\n\t\t'$PROGRAM_NAME'\t\t\t:    5,\n\t\t'$0'\t\t\t\t:    5,\n\t\t'$SUBSCRIPT_SEPARATOR'\t\t:    5,\n\t\t'$SUBSEP'\t\t\t:    5,\n\t\t'$;'\t\t\t\t:    5,\n\t\t'$REAL_USER_ID'\t\t\t:    5,\n\t\t'$UID'\t\t\t\t:    5,\n\t\t'$<'\t\t\t\t:    5,\n\t\t'$EFFECTIVE_USER_ID'\t\t:    5,\n\t\t'$EUID'\t\t\t\t:    5,\n\t\t'$>'\t\t\t\t:    5,\n\t\t'$a'\t\t\t\t:    5,\n\t\t'$b'\t\t\t\t:    5,\n\t\t'$COMPILING'\t\t\t:    5,\n\t\t'$^C'\t\t\t\t:    5,\n\t\t'$DEBUGGING'\t\t\t:    5,\n\t\t'$^D'\t\t\t\t:    5,\n\t\t'${^ENCODING}'\t\t\t:    5,\n\t\t'$ENV'\t\t\t\t:    5,\n\t\t'%ENV'\t\t\t\t:    5,\n\t\t'$SYSTEM_FD_MAX'\t\t:    5,\n\t\t'$^F'\t\t\t\t:    5,\n\t\t'@F'\t\t\t\t:    5,\n\t\t'${^GLOBAL_PHASE}'\t\t:    5,\n\t\t'$^H'\t\t\t\t:    5,\n\t\t'%^H'\t\t\t\t:    5,\n\t\t'@INC'\t\t\t\t:    5,\n\t\t'%INC'\t\t\t\t:    5,\n\t\t'$INPLACE_EDIT'\t\t\t:    5,\n\t\t'$^I'\t\t\t\t:    5,\n\t\t'$^M'\t\t\t\t:    5,\n\t\t'$OSNAME'\t\t\t:    5,\n\t\t'$^O'\t\t\t\t:    5,\n\t\t'${^OPEN}'\t\t\t:    5,\n\t\t'$PERLDB'\t\t\t:    5,\n\t\t'$^P'\t\t\t\t:    5,\n\t\t'$SIG'\t\t\t\t:    5,\n\t\t'%SIG'\t\t\t\t:    5,\n\t\t'$BASETIME'\t\t\t:    5,\n\t\t'$^T'\t\t\t\t:    5,\n\t\t'${^TAINT}'\t\t\t:    5,\n\t\t'${^UNICODE}'\t\t\t:    5,\n\t\t'${^UTF8CACHE}'\t\t\t:    5,\n\t\t'${^UTF8LOCALE}'\t\t:    5,\n\t\t'$PERL_VERSION'\t\t\t:    5,\n\t\t'$^V'\t\t\t\t:    5,\n\t\t'${^WIN32_SLOPPY_STAT}'\t\t:    5,\n\t\t'$EXECUTABLE_NAME'\t\t:    5,\n\t\t'$^X'\t\t\t\t:    5,\n\t\t'$1'\t\t\t\t:    5,\t// - regexp $1, $2...\n\t\t'$MATCH'\t\t\t:    5,\n\t\t'$&'\t\t\t\t:    5,\n\t\t'${^MATCH}'\t\t\t:    5,\n\t\t'$PREMATCH'\t\t\t:    5,\n\t\t'$`'\t\t\t\t:    5,\n\t\t'${^PREMATCH}'\t\t\t:    5,\n\t\t'$POSTMATCH'\t\t\t:    5,\n\t\t\"$'\"\t\t\t\t:    5,\n\t\t'${^POSTMATCH}'\t\t\t:    5,\n\t\t'$LAST_PAREN_MATCH'\t\t:    5,\n\t\t'$+'\t\t\t\t:    5,\n\t\t'$LAST_SUBMATCH_RESULT'\t\t:    5,\n\t\t'$^N'\t\t\t\t:    5,\n\t\t'@LAST_MATCH_END'\t\t:    5,\n\t\t'@+'\t\t\t\t:    5,\n\t\t'%LAST_PAREN_MATCH'\t\t:    5,\n\t\t'%+'\t\t\t\t:    5,\n\t\t'@LAST_MATCH_START'\t\t:    5,\n\t\t'@-'\t\t\t\t:    5,\n\t\t'%LAST_MATCH_START'\t\t:    5,\n\t\t'%-'\t\t\t\t:    5,\n\t\t'$LAST_REGEXP_CODE_RESULT'\t:    5,\n\t\t'$^R'\t\t\t\t:    5,\n\t\t'${^RE_DEBUG_FLAGS}'\t\t:    5,\n\t\t'${^RE_TRIE_MAXBUF}'\t\t:    5,\n\t\t'$ARGV'\t\t\t\t:    5,\n\t\t'@ARGV'\t\t\t\t:    5,\n\t\t'ARGV'\t\t\t\t:    5,\n\t\t'ARGVOUT'\t\t\t:    5,\n\t\t'$OUTPUT_FIELD_SEPARATOR'\t:    5,\n\t\t'$OFS'\t\t\t\t:    5,\n\t\t'$,'\t\t\t\t:    5,\n\t\t'$INPUT_LINE_NUMBER'\t\t:    5,\n\t\t'$NR'\t\t\t\t:    5,\n\t\t'$.'\t\t\t\t:    5,\n\t\t'$INPUT_RECORD_SEPARATOR'\t:    5,\n\t\t'$RS'\t\t\t\t:    5,\n\t\t'$/'\t\t\t\t:    5,\n\t\t'$OUTPUT_RECORD_SEPARATOR'\t:    5,\n\t\t'$ORS'\t\t\t\t:    5,\n\t\t'$\\\\'\t\t\t\t:    5,\n\t\t'$OUTPUT_AUTOFLUSH'\t\t:    5,\n\t\t'$|'\t\t\t\t:    5,\n\t\t'$ACCUMULATOR'\t\t\t:    5,\n\t\t'$^A'\t\t\t\t:    5,\n\t\t'$FORMAT_FORMFEED'\t\t:    5,\n\t\t'$^L'\t\t\t\t:    5,\n\t\t'$FORMAT_PAGE_NUMBER'\t\t:    5,\n\t\t'$%'\t\t\t\t:    5,\n\t\t'$FORMAT_LINES_LEFT'\t\t:    5,\n\t\t'$-'\t\t\t\t:    5,\n\t\t'$FORMAT_LINE_BREAK_CHARACTERS'\t:    5,\n\t\t'$:'\t\t\t\t:    5,\n\t\t'$FORMAT_LINES_PER_PAGE'\t:    5,\n\t\t'$='\t\t\t\t:    5,\n\t\t'$FORMAT_TOP_NAME'\t\t:    5,\n\t\t'$^'\t\t\t\t:    5,\n\t\t'$FORMAT_NAME'\t\t\t:    5,\n\t\t'$~'\t\t\t\t:    5,\n\t\t'${^CHILD_ERROR_NATIVE}'\t:    5,\n\t\t'$EXTENDED_OS_ERROR'\t\t:    5,\n\t\t'$^E'\t\t\t\t:    5,\n\t\t'$EXCEPTIONS_BEING_CAUGHT'\t:    5,\n\t\t'$^S'\t\t\t\t:    5,\n\t\t'$WARNING'\t\t\t:    5,\n\t\t'$^W'\t\t\t\t:    5,\n\t\t'${^WARNING_BITS}'\t\t:    5,\n\t\t'$OS_ERROR'\t\t\t:    5,\n\t\t'$ERRNO'\t\t\t:    5,\n\t\t'$!'\t\t\t\t:    5,\n\t\t'%OS_ERROR'\t\t\t:    5,\n\t\t'%ERRNO'\t\t\t:    5,\n\t\t'%!'\t\t\t\t:    5,\n\t\t'$CHILD_ERROR'\t\t\t:    5,\n\t\t'$?'\t\t\t\t:    5,\n\t\t'$EVAL_ERROR'\t\t\t:    5,\n\t\t'$@'\t\t\t\t:    5,\n\t\t'$OFMT'\t\t\t\t:    5,\n\t\t'$#'\t\t\t\t:    5,\n\t\t'$*'\t\t\t\t:    5,\n\t\t'$ARRAY_BASE'\t\t\t:    5,\n\t\t'$['\t\t\t\t:    5,\n\t\t'$OLD_PERL_VERSION'\t\t:    5,\n\t\t'$]'\t\t\t\t:    5,\n\t\t\t\t\t\t//\tPERL blocks\n\t\t'if'\t\t\t\t:[1,1],\n\t\telsif\t\t\t\t:[1,1],\n\t\t'else'\t\t\t\t:[1,1],\n\t\t'while'\t\t\t\t:[1,1],\n\t\tunless\t\t\t\t:[1,1],\n\t\t'for'\t\t\t\t:[1,1],\n\t\tforeach\t\t\t\t:[1,1],\n\t\t\t\t\t\t//\tPERL functions\n\t\t'abs'\t\t\t\t:1,\t// - absolute value function\n\t\taccept\t\t\t\t:1,\t// - accept an incoming socket connect\n\t\talarm\t\t\t\t:1,\t// - schedule a SIGALRM\n\t\t'atan2'\t\t\t\t:1,\t// - arctangent of Y/X in the range -PI to PI\n\t\tbind\t\t\t\t:1,\t// - binds an address to a socket\n\t\tbinmode\t\t\t\t:1,\t// - prepare binary files for I/O\n\t\tbless\t\t\t\t:1,\t// - create an object\n\t\tbootstrap\t\t\t:1,\t//\n\t\t'break'\t\t\t\t:1,\t// - break out of a \"given\" block\n\t\tcaller\t\t\t\t:1,\t// - get context of the current subroutine call\n\t\tchdir\t\t\t\t:1,\t// - change your current working directory\n\t\tchmod\t\t\t\t:1,\t// - changes the permissions on a list of files\n\t\tchomp\t\t\t\t:1,\t// - remove a trailing record separator from a string\n\t\tchop\t\t\t\t:1,\t// - remove the last character from a string\n\t\tchown\t\t\t\t:1,\t// - change the owership on a list of files\n\t\tchr\t\t\t\t:1,\t// - get character this number represents\n\t\tchroot\t\t\t\t:1,\t// - make directory new root for path lookups\n\t\tclose\t\t\t\t:1,\t// - close file (or pipe or socket) handle\n\t\tclosedir\t\t\t:1,\t// - close directory handle\n\t\tconnect\t\t\t\t:1,\t// - connect to a remote socket\n\t\t'continue'\t\t\t:[1,1],\t// - optional trailing block in a while or foreach\n\t\t'cos'\t\t\t\t:1,\t// - cosine function\n\t\tcrypt\t\t\t\t:1,\t// - one-way passwd-style encryption\n\t\tdbmclose\t\t\t:1,\t// - breaks binding on a tied dbm file\n\t\tdbmopen\t\t\t\t:1,\t// - create binding on a tied dbm file\n\t\t'default'\t\t\t:1,\t//\n\t\tdefined\t\t\t\t:1,\t// - test whether a value, variable, or function is defined\n\t\t'delete'\t\t\t:1,\t// - deletes a value from a hash\n\t\tdie\t\t\t\t:1,\t// - raise an exception or bail out\n\t\t'do'\t\t\t\t:1,\t// - turn a BLOCK into a TERM\n\t\tdump\t\t\t\t:1,\t// - create an immediate core dump\n\t\teach\t\t\t\t:1,\t// - retrieve the next key/value pair from a hash\n\t\tendgrent\t\t\t:1,\t// - be done using group file\n\t\tendhostent\t\t\t:1,\t// - be done using hosts file\n\t\tendnetent\t\t\t:1,\t// - be done using networks file\n\t\tendprotoent\t\t\t:1,\t// - be done using protocols file\n\t\tendpwent\t\t\t:1,\t// - be done using passwd file\n\t\tendservent\t\t\t:1,\t// - be done using services file\n\t\teof\t\t\t\t:1,\t// - test a filehandle for its end\n\t\t'eval'\t\t\t\t:1,\t// - catch exceptions or compile and run code\n\t\t'exec'\t\t\t\t:1,\t// - abandon this program to run another\n\t\texists\t\t\t\t:1,\t// - test whether a hash key is present\n\t\texit\t\t\t\t:1,\t// - terminate this program\n\t\t'exp'\t\t\t\t:1,\t// - raise I to a power\n\t\tfcntl\t\t\t\t:1,\t// - file control system call\n\t\tfileno\t\t\t\t:1,\t// - return file descriptor from filehandle\n\t\tflock\t\t\t\t:1,\t// - lock an entire file with an advisory lock\n\t\tfork\t\t\t\t:1,\t// - create a new process just like this one\n\t\tformat\t\t\t\t:1,\t// - declare a picture format with use by the write() function\n\t\tformline\t\t\t:1,\t// - internal function used for formats\n\t\tgetc\t\t\t\t:1,\t// - get the next character from the filehandle\n\t\tgetgrent\t\t\t:1,\t// - get next group record\n\t\tgetgrgid\t\t\t:1,\t// - get group record given group user ID\n\t\tgetgrnam\t\t\t:1,\t// - get group record given group name\n\t\tgethostbyaddr\t\t\t:1,\t// - get host record given its address\n\t\tgethostbyname\t\t\t:1,\t// - get host record given name\n\t\tgethostent\t\t\t:1,\t// - get next hosts record\n\t\tgetlogin\t\t\t:1,\t// - return who logged in at this tty\n\t\tgetnetbyaddr\t\t\t:1,\t// - get network record given its address\n\t\tgetnetbyname\t\t\t:1,\t// - get networks record given name\n\t\tgetnetent\t\t\t:1,\t// - get next networks record\n\t\tgetpeername\t\t\t:1,\t// - find the other end of a socket connection\n\t\tgetpgrp\t\t\t\t:1,\t// - get process group\n\t\tgetppid\t\t\t\t:1,\t// - get parent process ID\n\t\tgetpriority\t\t\t:1,\t// - get current nice value\n\t\tgetprotobyname\t\t\t:1,\t// - get protocol record given name\n\t\tgetprotobynumber\t\t:1,\t// - get protocol record numeric protocol\n\t\tgetprotoent\t\t\t:1,\t// - get next protocols record\n\t\tgetpwent\t\t\t:1,\t// - get next passwd record\n\t\tgetpwnam\t\t\t:1,\t// - get passwd record given user login name\n\t\tgetpwuid\t\t\t:1,\t// - get passwd record given user ID\n\t\tgetservbyname\t\t\t:1,\t// - get services record given its name\n\t\tgetservbyport\t\t\t:1,\t// - get services record given numeric port\n\t\tgetservent\t\t\t:1,\t// - get next services record\n\t\tgetsockname\t\t\t:1,\t// - retrieve the sockaddr for a given socket\n\t\tgetsockopt\t\t\t:1,\t// - get socket options on a given socket\n\t\tgiven\t\t\t\t:1,\t//\n\t\tglob\t\t\t\t:1,\t// - expand filenames using wildcards\n\t\tgmtime\t\t\t\t:1,\t// - convert UNIX time into record or string using Greenwich time\n\t\t'goto'\t\t\t\t:1,\t// - create spaghetti code\n\t\tgrep\t\t\t\t:1,\t// - locate elements in a list test true against a given criterion\n\t\thex\t\t\t\t:1,\t// - convert a string to a hexadecimal number\n\t\t'import'\t\t\t:1,\t// - patch a module's namespace into your own\n\t\tindex\t\t\t\t:1,\t// - find a substring within a string\n\t\t'int'\t\t\t\t:1,\t// - get the integer portion of a number\n\t\tioctl\t\t\t\t:1,\t// - system-dependent device control system call\n\t\t'join'\t\t\t\t:1,\t// - join a list into a string using a separator\n\t\tkeys\t\t\t\t:1,\t// - retrieve list of indices from a hash\n\t\tkill\t\t\t\t:1,\t// - send a signal to a process or process group\n\t\tlast\t\t\t\t:1,\t// - exit a block prematurely\n\t\tlc\t\t\t\t:1,\t// - return lower-case version of a string\n\t\tlcfirst\t\t\t\t:1,\t// - return a string with just the next letter in lower case\n\t\tlength\t\t\t\t:1,\t// - return the number of bytes in a string\n\t\t'link'\t\t\t\t:1,\t// - create a hard link in the filesytem\n\t\tlisten\t\t\t\t:1,\t// - register your socket as a server\n\t\tlocal\t\t\t\t: 2,\t// - create a temporary value for a global variable (dynamic scoping)\n\t\tlocaltime\t\t\t:1,\t// - convert UNIX time into record or string using local time\n\t\tlock\t\t\t\t:1,\t// - get a thread lock on a variable, subroutine, or method\n\t\t'log'\t\t\t\t:1,\t// - retrieve the natural logarithm for a number\n\t\tlstat\t\t\t\t:1,\t// - stat a symbolic link\n\t\tm\t\t\t\t:null,\t// - match a string with a regular expression pattern\n\t\tmap\t\t\t\t:1,\t// - apply a change to a list to get back a new list with the changes\n\t\tmkdir\t\t\t\t:1,\t// - create a directory\n\t\tmsgctl\t\t\t\t:1,\t// - SysV IPC message control operations\n\t\tmsgget\t\t\t\t:1,\t// - get SysV IPC message queue\n\t\tmsgrcv\t\t\t\t:1,\t// - receive a SysV IPC message from a message queue\n\t\tmsgsnd\t\t\t\t:1,\t// - send a SysV IPC message to a message queue\n\t\tmy\t\t\t\t: 2,\t// - declare and assign a local variable (lexical scoping)\n\t\t'new'\t\t\t\t:1,\t//\n\t\tnext\t\t\t\t:1,\t// - iterate a block prematurely\n\t\tno\t\t\t\t:1,\t// - unimport some module symbols or semantics at compile time\n\t\toct\t\t\t\t:1,\t// - convert a string to an octal number\n\t\topen\t\t\t\t:1,\t// - open a file, pipe, or descriptor\n\t\topendir\t\t\t\t:1,\t// - open a directory\n\t\tord\t\t\t\t:1,\t// - find a character's numeric representation\n\t\tour\t\t\t\t: 2,\t// - declare and assign a package variable (lexical scoping)\n\t\tpack\t\t\t\t:1,\t// - convert a list into a binary representation\n\t\t'package'\t\t\t:1,\t// - declare a separate global namespace\n\t\tpipe\t\t\t\t:1,\t// - open a pair of connected filehandles\n\t\tpop\t\t\t\t:1,\t// - remove the last element from an array and return it\n\t\tpos\t\t\t\t:1,\t// - find or set the offset for the last/next m//g search\n\t\tprint\t\t\t\t:1,\t// - output a list to a filehandle\n\t\tprintf\t\t\t\t:1,\t// - output a formatted list to a filehandle\n\t\tprototype\t\t\t:1,\t// - get the prototype (if any) of a subroutine\n\t\tpush\t\t\t\t:1,\t// - append one or more elements to an array\n\t\tq\t\t\t\t:null,\t// - singly quote a string\n\t\tqq\t\t\t\t:null,\t// - doubly quote a string\n\t\tqr\t\t\t\t:null,\t// - Compile pattern\n\t\tquotemeta\t\t\t:null,\t// - quote regular expression magic characters\n\t\tqw\t\t\t\t:null,\t// - quote a list of words\n\t\tqx\t\t\t\t:null,\t// - backquote quote a string\n\t\trand\t\t\t\t:1,\t// - retrieve the next pseudorandom number\n\t\tread\t\t\t\t:1,\t// - fixed-length buffered input from a filehandle\n\t\treaddir\t\t\t\t:1,\t// - get a directory from a directory handle\n\t\treadline\t\t\t:1,\t// - fetch a record from a file\n\t\treadlink\t\t\t:1,\t// - determine where a symbolic link is pointing\n\t\treadpipe\t\t\t:1,\t// - execute a system command and collect standard output\n\t\trecv\t\t\t\t:1,\t// - receive a message over a Socket\n\t\tredo\t\t\t\t:1,\t// - start this loop iteration over again\n\t\tref\t\t\t\t:1,\t// - find out the type of thing being referenced\n\t\trename\t\t\t\t:1,\t// - change a filename\n\t\trequire\t\t\t\t:1,\t// - load in external functions from a library at runtime\n\t\treset\t\t\t\t:1,\t// - clear all variables of a given name\n\t\t'return'\t\t\t:1,\t// - get out of a function early\n\t\treverse\t\t\t\t:1,\t// - flip a string or a list\n\t\trewinddir\t\t\t:1,\t// - reset directory handle\n\t\trindex\t\t\t\t:1,\t// - right-to-left substring search\n\t\trmdir\t\t\t\t:1,\t// - remove a directory\n\t\ts\t\t\t\t:null,\t// - replace a pattern with a string\n\t\tsay\t\t\t\t:1,\t// - print with newline\n\t\tscalar\t\t\t\t:1,\t// - force a scalar context\n\t\tseek\t\t\t\t:1,\t// - reposition file pointer for random-access I/O\n\t\tseekdir\t\t\t\t:1,\t// - reposition directory pointer\n\t\tselect\t\t\t\t:1,\t// - reset default output or do I/O multiplexing\n\t\tsemctl\t\t\t\t:1,\t// - SysV semaphore control operations\n\t\tsemget\t\t\t\t:1,\t// - get set of SysV semaphores\n\t\tsemop\t\t\t\t:1,\t// - SysV semaphore operations\n\t\tsend\t\t\t\t:1,\t// - send a message over a socket\n\t\tsetgrent\t\t\t:1,\t// - prepare group file for use\n\t\tsethostent\t\t\t:1,\t// - prepare hosts file for use\n\t\tsetnetent\t\t\t:1,\t// - prepare networks file for use\n\t\tsetpgrp\t\t\t\t:1,\t// - set the process group of a process\n\t\tsetpriority\t\t\t:1,\t// - set a process's nice value\n\t\tsetprotoent\t\t\t:1,\t// - prepare protocols file for use\n\t\tsetpwent\t\t\t:1,\t// - prepare passwd file for use\n\t\tsetservent\t\t\t:1,\t// - prepare services file for use\n\t\tsetsockopt\t\t\t:1,\t// - set some socket options\n\t\tshift\t\t\t\t:1,\t// - remove the first element of an array, and return it\n\t\tshmctl\t\t\t\t:1,\t// - SysV shared memory operations\n\t\tshmget\t\t\t\t:1,\t// - get SysV shared memory segment identifier\n\t\tshmread\t\t\t\t:1,\t// - read SysV shared memory\n\t\tshmwrite\t\t\t:1,\t// - write SysV shared memory\n\t\tshutdown\t\t\t:1,\t// - close down just half of a socket connection\n\t\t'sin'\t\t\t\t:1,\t// - return the sine of a number\n\t\tsleep\t\t\t\t:1,\t// - block for some number of seconds\n\t\tsocket\t\t\t\t:1,\t// - create a socket\n\t\tsocketpair\t\t\t:1,\t// - create a pair of sockets\n\t\t'sort'\t\t\t\t:1,\t// - sort a list of values\n\t\tsplice\t\t\t\t:1,\t// - add or remove elements anywhere in an array\n\t\t'split'\t\t\t\t:1,\t// - split up a string using a regexp delimiter\n\t\tsprintf\t\t\t\t:1,\t// - formatted print into a string\n\t\t'sqrt'\t\t\t\t:1,\t// - square root function\n\t\tsrand\t\t\t\t:1,\t// - seed the random number generator\n\t\tstat\t\t\t\t:1,\t// - get a file's status information\n\t\tstate\t\t\t\t:1,\t// - declare and assign a state variable (persistent lexical scoping)\n\t\tstudy\t\t\t\t:1,\t// - optimize input data for repeated searches\n\t\t'sub'\t\t\t\t:1,\t// - declare a subroutine, possibly anonymously\n\t\t'substr'\t\t\t:1,\t// - get or alter a portion of a stirng\n\t\tsymlink\t\t\t\t:1,\t// - create a symbolic link to a file\n\t\tsyscall\t\t\t\t:1,\t// - execute an arbitrary system call\n\t\tsysopen\t\t\t\t:1,\t// - open a file, pipe, or descriptor\n\t\tsysread\t\t\t\t:1,\t// - fixed-length unbuffered input from a filehandle\n\t\tsysseek\t\t\t\t:1,\t// - position I/O pointer on handle used with sysread and syswrite\n\t\tsystem\t\t\t\t:1,\t// - run a separate program\n\t\tsyswrite\t\t\t:1,\t// - fixed-length unbuffered output to a filehandle\n\t\ttell\t\t\t\t:1,\t// - get current seekpointer on a filehandle\n\t\ttelldir\t\t\t\t:1,\t// - get current seekpointer on a directory handle\n\t\ttie\t\t\t\t:1,\t// - bind a variable to an object class\n\t\ttied\t\t\t\t:1,\t// - get a reference to the object underlying a tied variable\n\t\ttime\t\t\t\t:1,\t// - return number of seconds since 1970\n\t\ttimes\t\t\t\t:1,\t// - return elapsed time for self and child processes\n\t\ttr\t\t\t\t:null,\t// - transliterate a string\n\t\ttruncate\t\t\t:1,\t// - shorten a file\n\t\tuc\t\t\t\t:1,\t// - return upper-case version of a string\n\t\tucfirst\t\t\t\t:1,\t// - return a string with just the next letter in upper case\n\t\tumask\t\t\t\t:1,\t// - set file creation mode mask\n\t\tundef\t\t\t\t:1,\t// - remove a variable or function definition\n\t\tunlink\t\t\t\t:1,\t// - remove one link to a file\n\t\tunpack\t\t\t\t:1,\t// - convert binary structure into normal perl variables\n\t\tunshift\t\t\t\t:1,\t// - prepend more elements to the beginning of a list\n\t\tuntie\t\t\t\t:1,\t// - break a tie binding to a variable\n\t\tuse\t\t\t\t:1,\t// - load in a module at compile time\n\t\tutime\t\t\t\t:1,\t// - set a file's last access and modify times\n\t\tvalues\t\t\t\t:1,\t// - return a list of the values in a hash\n\t\tvec\t\t\t\t:1,\t// - test or set particular bits in a string\n\t\twait\t\t\t\t:1,\t// - wait for any child process to die\n\t\twaitpid\t\t\t\t:1,\t// - wait for a particular child process to die\n\t\twantarray\t\t\t:1,\t// - get void vs scalar vs list context of current subroutine call\n\t\twarn\t\t\t\t:1,\t// - print debugging info\n\t\twhen\t\t\t\t:1,\t//\n\t\twrite\t\t\t\t:1,\t// - print a picture record\n\t\ty\t\t\t\t:null};\t// - transliterate a string\n\n\tvar RXstyle=\"string-2\";\n\tvar RXmodifiers=/[goseximacplud]/;\t\t// NOTE: \"m\", \"s\", \"y\" and \"tr\" need to correct real modifiers for each regexp type\n\n\tfunction tokenChain(stream,state,chain,style,tail){\t// NOTE: chain.length > 2 is not working now (it's for s[...][...]geos;)\n\t\tstate.chain=null;                               //                                                          12   3tail\n\t\tstate.style=null;\n\t\tstate.tail=null;\n\t\tstate.tokenize=function(stream,state){\n\t\t\tvar e=false,c,i=0;\n\t\t\twhile(c=stream.next()){\n\t\t\t\tif(c===chain[i]&&!e){\n\t\t\t\t\tif(chain[++i]!==undefined){\n\t\t\t\t\t\tstate.chain=chain[i];\n\t\t\t\t\t\tstate.style=style;\n\t\t\t\t\t\tstate.tail=tail}\n\t\t\t\t\telse if(tail)\n\t\t\t\t\t\tstream.eatWhile(tail);\n\t\t\t\t\tstate.tokenize=tokenPerl;\n\t\t\t\t\treturn style}\n\t\t\t\te=!e&&c==\"\\\\\"}\n\t\t\treturn style};\n\t\treturn state.tokenize(stream,state)}\n\n\tfunction tokenSOMETHING(stream,state,string){\n\t\tstate.tokenize=function(stream,state){\n\t\t\tif(stream.string==string)\n\t\t\t\tstate.tokenize=tokenPerl;\n\t\t\tstream.skipToEnd();\n\t\t\treturn \"string\"};\n\t\treturn state.tokenize(stream,state)}\n\n\tfunction tokenPerl(stream,state){\n\t\tif(stream.eatSpace())\n\t\t\treturn null;\n\t\tif(state.chain)\n\t\t\treturn tokenChain(stream,state,state.chain,state.style,state.tail);\n\t\tif(stream.match(/^\\-?[\\d\\.]/,false))\n\t\t\tif(stream.match(/^(\\-?(\\d*\\.\\d+(e[+-]?\\d+)?|\\d+\\.\\d*)|0x[\\da-fA-F]+|0b[01]+|\\d+(e[+-]?\\d+)?)/))\n\t\t\t\treturn 'number';\n\t\tif(stream.match(/^<<(?=\\w)/)){\t\t\t// NOTE: <<SOMETHING\\n...\\nSOMETHING\\n\n\t\t\tstream.eatWhile(/\\w/);\n\t\t\treturn tokenSOMETHING(stream,state,stream.current().substr(2))}\n\t\tif(stream.sol()&&stream.match(/^\\=item(?!\\w)/)){// NOTE: \\n=item...\\n=cut\\n\n\t\t\treturn tokenSOMETHING(stream,state,'=cut')}\n\t\tvar ch=stream.next();\n\t\tif(ch=='\"'||ch==\"'\"){\t\t\t\t// NOTE: ' or \" or <<'SOMETHING'\\n...\\nSOMETHING\\n or <<\"SOMETHING\"\\n...\\nSOMETHING\\n\n\t\t\tif(stream.prefix(3)==\"<<\"+ch){\n\t\t\t\tvar p=stream.pos;\n\t\t\t\tstream.eatWhile(/\\w/);\n\t\t\t\tvar n=stream.current().substr(1);\n\t\t\t\tif(n&&stream.eat(ch))\n\t\t\t\t\treturn tokenSOMETHING(stream,state,n);\n\t\t\t\tstream.pos=p}\n\t\t\treturn tokenChain(stream,state,[ch],\"string\")}\n\t\tif(ch==\"q\"){\n\t\t\tvar c=stream.look(-2);\n\t\t\tif(!(c&&/\\w/.test(c))){\n\t\t\t\tc=stream.look(0);\n\t\t\t\tif(c==\"x\"){\n\t\t\t\t\tc=stream.look(1);\n\t\t\t\t\tif(c==\"(\"){\n\t\t\t\t\t\tstream.eatSuffix(2);\n\t\t\t\t\t\treturn tokenChain(stream,state,[\")\"],RXstyle,RXmodifiers)}\n\t\t\t\t\tif(c==\"[\"){\n\t\t\t\t\t\tstream.eatSuffix(2);\n\t\t\t\t\t\treturn tokenChain(stream,state,[\"]\"],RXstyle,RXmodifiers)}\n\t\t\t\t\tif(c==\"{\"){\n\t\t\t\t\t\tstream.eatSuffix(2);\n\t\t\t\t\t\treturn tokenChain(stream,state,[\"}\"],RXstyle,RXmodifiers)}\n\t\t\t\t\tif(c==\"<\"){\n\t\t\t\t\t\tstream.eatSuffix(2);\n\t\t\t\t\t\treturn tokenChain(stream,state,[\">\"],RXstyle,RXmodifiers)}\n\t\t\t\t\tif(/[\\^'\"!~\\/]/.test(c)){\n\t\t\t\t\t\tstream.eatSuffix(1);\n\t\t\t\t\t\treturn tokenChain(stream,state,[stream.eat(c)],RXstyle,RXmodifiers)}}\n\t\t\t\telse if(c==\"q\"){\n\t\t\t\t\tc=stream.look(1);\n\t\t\t\t\tif(c==\"(\"){\n\t\t\t\t\t\tstream.eatSuffix(2);\n\t\t\t\t\t\treturn tokenChain(stream,state,[\")\"],\"string\")}\n\t\t\t\t\tif(c==\"[\"){\n\t\t\t\t\t\tstream.eatSuffix(2);\n\t\t\t\t\t\treturn tokenChain(stream,state,[\"]\"],\"string\")}\n\t\t\t\t\tif(c==\"{\"){\n\t\t\t\t\t\tstream.eatSuffix(2);\n\t\t\t\t\t\treturn tokenChain(stream,state,[\"}\"],\"string\")}\n\t\t\t\t\tif(c==\"<\"){\n\t\t\t\t\t\tstream.eatSuffix(2);\n\t\t\t\t\t\treturn tokenChain(stream,state,[\">\"],\"string\")}\n\t\t\t\t\tif(/[\\^'\"!~\\/]/.test(c)){\n\t\t\t\t\t\tstream.eatSuffix(1);\n\t\t\t\t\t\treturn tokenChain(stream,state,[stream.eat(c)],\"string\")}}\n\t\t\t\telse if(c==\"w\"){\n\t\t\t\t\tc=stream.look(1);\n\t\t\t\t\tif(c==\"(\"){\n\t\t\t\t\t\tstream.eatSuffix(2);\n\t\t\t\t\t\treturn tokenChain(stream,state,[\")\"],\"bracket\")}\n\t\t\t\t\tif(c==\"[\"){\n\t\t\t\t\t\tstream.eatSuffix(2);\n\t\t\t\t\t\treturn tokenChain(stream,state,[\"]\"],\"bracket\")}\n\t\t\t\t\tif(c==\"{\"){\n\t\t\t\t\t\tstream.eatSuffix(2);\n\t\t\t\t\t\treturn tokenChain(stream,state,[\"}\"],\"bracket\")}\n\t\t\t\t\tif(c==\"<\"){\n\t\t\t\t\t\tstream.eatSuffix(2);\n\t\t\t\t\t\treturn tokenChain(stream,state,[\">\"],\"bracket\")}\n\t\t\t\t\tif(/[\\^'\"!~\\/]/.test(c)){\n\t\t\t\t\t\tstream.eatSuffix(1);\n\t\t\t\t\t\treturn tokenChain(stream,state,[stream.eat(c)],\"bracket\")}}\n\t\t\t\telse if(c==\"r\"){\n\t\t\t\t\tc=stream.look(1);\n\t\t\t\t\tif(c==\"(\"){\n\t\t\t\t\t\tstream.eatSuffix(2);\n\t\t\t\t\t\treturn tokenChain(stream,state,[\")\"],RXstyle,RXmodifiers)}\n\t\t\t\t\tif(c==\"[\"){\n\t\t\t\t\t\tstream.eatSuffix(2);\n\t\t\t\t\t\treturn tokenChain(stream,state,[\"]\"],RXstyle,RXmodifiers)}\n\t\t\t\t\tif(c==\"{\"){\n\t\t\t\t\t\tstream.eatSuffix(2);\n\t\t\t\t\t\treturn tokenChain(stream,state,[\"}\"],RXstyle,RXmodifiers)}\n\t\t\t\t\tif(c==\"<\"){\n\t\t\t\t\t\tstream.eatSuffix(2);\n\t\t\t\t\t\treturn tokenChain(stream,state,[\">\"],RXstyle,RXmodifiers)}\n\t\t\t\t\tif(/[\\^'\"!~\\/]/.test(c)){\n\t\t\t\t\t\tstream.eatSuffix(1);\n\t\t\t\t\t\treturn tokenChain(stream,state,[stream.eat(c)],RXstyle,RXmodifiers)}}\n\t\t\t\telse if(/[\\^'\"!~\\/(\\[{<]/.test(c)){\n\t\t\t\t\tif(c==\"(\"){\n\t\t\t\t\t\tstream.eatSuffix(1);\n\t\t\t\t\t\treturn tokenChain(stream,state,[\")\"],\"string\")}\n\t\t\t\t\tif(c==\"[\"){\n\t\t\t\t\t\tstream.eatSuffix(1);\n\t\t\t\t\t\treturn tokenChain(stream,state,[\"]\"],\"string\")}\n\t\t\t\t\tif(c==\"{\"){\n\t\t\t\t\t\tstream.eatSuffix(1);\n\t\t\t\t\t\treturn tokenChain(stream,state,[\"}\"],\"string\")}\n\t\t\t\t\tif(c==\"<\"){\n\t\t\t\t\t\tstream.eatSuffix(1);\n\t\t\t\t\t\treturn tokenChain(stream,state,[\">\"],\"string\")}\n\t\t\t\t\tif(/[\\^'\"!~\\/]/.test(c)){\n\t\t\t\t\t\treturn tokenChain(stream,state,[stream.eat(c)],\"string\")}}}}\n\t\tif(ch==\"m\"){\n\t\t\tvar c=stream.look(-2);\n\t\t\tif(!(c&&/\\w/.test(c))){\n\t\t\t\tc=stream.eat(/[(\\[{<\\^'\"!~\\/]/);\n\t\t\t\tif(c){\n\t\t\t\t\tif(/[\\^'\"!~\\/]/.test(c)){\n\t\t\t\t\t\treturn tokenChain(stream,state,[c],RXstyle,RXmodifiers)}\n\t\t\t\t\tif(c==\"(\"){\n\t\t\t\t\t\treturn tokenChain(stream,state,[\")\"],RXstyle,RXmodifiers)}\n\t\t\t\t\tif(c==\"[\"){\n\t\t\t\t\t\treturn tokenChain(stream,state,[\"]\"],RXstyle,RXmodifiers)}\n\t\t\t\t\tif(c==\"{\"){\n\t\t\t\t\t\treturn tokenChain(stream,state,[\"}\"],RXstyle,RXmodifiers)}\n\t\t\t\t\tif(c==\"<\"){\n\t\t\t\t\t\treturn tokenChain(stream,state,[\">\"],RXstyle,RXmodifiers)}}}}\n\t\tif(ch==\"s\"){\n\t\t\tvar c=/[\\/>\\]})\\w]/.test(stream.look(-2));\n\t\t\tif(!c){\n\t\t\t\tc=stream.eat(/[(\\[{<\\^'\"!~\\/]/);\n\t\t\t\tif(c){\n\t\t\t\t\tif(c==\"[\")\n\t\t\t\t\t\treturn tokenChain(stream,state,[\"]\",\"]\"],RXstyle,RXmodifiers);\n\t\t\t\t\tif(c==\"{\")\n\t\t\t\t\t\treturn tokenChain(stream,state,[\"}\",\"}\"],RXstyle,RXmodifiers);\n\t\t\t\t\tif(c==\"<\")\n\t\t\t\t\t\treturn tokenChain(stream,state,[\">\",\">\"],RXstyle,RXmodifiers);\n\t\t\t\t\tif(c==\"(\")\n\t\t\t\t\t\treturn tokenChain(stream,state,[\")\",\")\"],RXstyle,RXmodifiers);\n\t\t\t\t\treturn tokenChain(stream,state,[c,c],RXstyle,RXmodifiers)}}}\n\t\tif(ch==\"y\"){\n\t\t\tvar c=/[\\/>\\]})\\w]/.test(stream.look(-2));\n\t\t\tif(!c){\n\t\t\t\tc=stream.eat(/[(\\[{<\\^'\"!~\\/]/);\n\t\t\t\tif(c){\n\t\t\t\t\tif(c==\"[\")\n\t\t\t\t\t\treturn tokenChain(stream,state,[\"]\",\"]\"],RXstyle,RXmodifiers);\n\t\t\t\t\tif(c==\"{\")\n\t\t\t\t\t\treturn tokenChain(stream,state,[\"}\",\"}\"],RXstyle,RXmodifiers);\n\t\t\t\t\tif(c==\"<\")\n\t\t\t\t\t\treturn tokenChain(stream,state,[\">\",\">\"],RXstyle,RXmodifiers);\n\t\t\t\t\tif(c==\"(\")\n\t\t\t\t\t\treturn tokenChain(stream,state,[\")\",\")\"],RXstyle,RXmodifiers);\n\t\t\t\t\treturn tokenChain(stream,state,[c,c],RXstyle,RXmodifiers)}}}\n\t\tif(ch==\"t\"){\n\t\t\tvar c=/[\\/>\\]})\\w]/.test(stream.look(-2));\n\t\t\tif(!c){\n\t\t\t\tc=stream.eat(\"r\");if(c){\n\t\t\t\tc=stream.eat(/[(\\[{<\\^'\"!~\\/]/);\n\t\t\t\tif(c){\n\t\t\t\t\tif(c==\"[\")\n\t\t\t\t\t\treturn tokenChain(stream,state,[\"]\",\"]\"],RXstyle,RXmodifiers);\n\t\t\t\t\tif(c==\"{\")\n\t\t\t\t\t\treturn tokenChain(stream,state,[\"}\",\"}\"],RXstyle,RXmodifiers);\n\t\t\t\t\tif(c==\"<\")\n\t\t\t\t\t\treturn tokenChain(stream,state,[\">\",\">\"],RXstyle,RXmodifiers);\n\t\t\t\t\tif(c==\"(\")\n\t\t\t\t\t\treturn tokenChain(stream,state,[\")\",\")\"],RXstyle,RXmodifiers);\n\t\t\t\t\treturn tokenChain(stream,state,[c,c],RXstyle,RXmodifiers)}}}}\n\t\tif(ch==\"`\"){\n\t\t\treturn tokenChain(stream,state,[ch],\"variable-2\")}\n\t\tif(ch==\"/\"){\n\t\t\tif(!/~\\s*$/.test(stream.prefix()))\n\t\t\t\treturn \"operator\";\n\t\t\telse\n\t\t\t\treturn tokenChain(stream,state,[ch],RXstyle,RXmodifiers)}\n\t\tif(ch==\"$\"){\n\t\t\tvar p=stream.pos;\n\t\t\tif(stream.eatWhile(/\\d/)||stream.eat(\"{\")&&stream.eatWhile(/\\d/)&&stream.eat(\"}\"))\n\t\t\t\treturn \"variable-2\";\n\t\t\telse\n\t\t\t\tstream.pos=p}\n\t\tif(/[$@%]/.test(ch)){\n\t\t\tvar p=stream.pos;\n\t\t\tif(stream.eat(\"^\")&&stream.eat(/[A-Z]/)||!/[@$%&]/.test(stream.look(-2))&&stream.eat(/[=|\\\\\\-#?@;:&`~\\^!\\[\\]*'\"$+.,\\/<>()]/)){\n\t\t\t\tvar c=stream.current();\n\t\t\t\tif(PERL[c])\n\t\t\t\t\treturn \"variable-2\"}\n\t\t\tstream.pos=p}\n\t\tif(/[$@%&]/.test(ch)){\n\t\t\tif(stream.eatWhile(/[\\w$\\[\\]]/)||stream.eat(\"{\")&&stream.eatWhile(/[\\w$\\[\\]]/)&&stream.eat(\"}\")){\n\t\t\t\tvar c=stream.current();\n\t\t\t\tif(PERL[c])\n\t\t\t\t\treturn \"variable-2\";\n\t\t\t\telse\n\t\t\t\t\treturn \"variable\"}}\n\t\tif(ch==\"#\"){\n\t\t\tif(stream.look(-2)!=\"$\"){\n\t\t\t\tstream.skipToEnd();\n\t\t\t\treturn \"comment\"}}\n\t\tif(/[:+\\-\\^*$&%@=<>!?|\\/~\\.]/.test(ch)){\n\t\t\tvar p=stream.pos;\n\t\t\tstream.eatWhile(/[:+\\-\\^*$&%@=<>!?|\\/~\\.]/);\n\t\t\tif(PERL[stream.current()])\n\t\t\t\treturn \"operator\";\n\t\t\telse\n\t\t\t\tstream.pos=p}\n\t\tif(ch==\"_\"){\n\t\t\tif(stream.pos==1){\n\t\t\t\tif(stream.suffix(6)==\"_END__\"){\n\t\t\t\t\treturn tokenChain(stream,state,['\\0'],\"comment\")}\n\t\t\t\telse if(stream.suffix(7)==\"_DATA__\"){\n\t\t\t\t\treturn tokenChain(stream,state,['\\0'],\"variable-2\")}\n\t\t\t\telse if(stream.suffix(7)==\"_C__\"){\n\t\t\t\t\treturn tokenChain(stream,state,['\\0'],\"string\")}}}\n\t\tif(/\\w/.test(ch)){\n\t\t\tvar p=stream.pos;\n\t\t\tif(stream.look(-2)==\"{\"&&(stream.look(0)==\"}\"||stream.eatWhile(/\\w/)&&stream.look(0)==\"}\"))\n\t\t\t\treturn \"string\";\n\t\t\telse\n\t\t\t\tstream.pos=p}\n\t\tif(/[A-Z]/.test(ch)){\n\t\t\tvar l=stream.look(-2);\n\t\t\tvar p=stream.pos;\n\t\t\tstream.eatWhile(/[A-Z_]/);\n\t\t\tif(/[\\da-z]/.test(stream.look(0))){\n\t\t\t\tstream.pos=p}\n\t\t\telse{\n\t\t\t\tvar c=PERL[stream.current()];\n\t\t\t\tif(!c)\n\t\t\t\t\treturn \"meta\";\n\t\t\t\tif(c[1])\n\t\t\t\t\tc=c[0];\n\t\t\t\tif(l!=\":\"){\n\t\t\t\t\tif(c==1)\n\t\t\t\t\t\treturn \"keyword\";\n\t\t\t\t\telse if(c==2)\n\t\t\t\t\t\treturn \"def\";\n\t\t\t\t\telse if(c==3)\n\t\t\t\t\t\treturn \"atom\";\n\t\t\t\t\telse if(c==4)\n\t\t\t\t\t\treturn \"operator\";\n\t\t\t\t\telse if(c==5)\n\t\t\t\t\t\treturn \"variable-2\";\n\t\t\t\t\telse\n\t\t\t\t\t\treturn \"meta\"}\n\t\t\t\telse\n\t\t\t\t\treturn \"meta\"}}\n\t\tif(/[a-zA-Z_]/.test(ch)){\n\t\t\tvar l=stream.look(-2);\n\t\t\tstream.eatWhile(/\\w/);\n\t\t\tvar c=PERL[stream.current()];\n\t\t\tif(!c)\n\t\t\t\treturn \"meta\";\n\t\t\tif(c[1])\n\t\t\t\tc=c[0];\n\t\t\tif(l!=\":\"){\n\t\t\t\tif(c==1)\n\t\t\t\t\treturn \"keyword\";\n\t\t\t\telse if(c==2)\n\t\t\t\t\treturn \"def\";\n\t\t\t\telse if(c==3)\n\t\t\t\t\treturn \"atom\";\n\t\t\t\telse if(c==4)\n\t\t\t\t\treturn \"operator\";\n\t\t\t\telse if(c==5)\n\t\t\t\t\treturn \"variable-2\";\n\t\t\t\telse\n\t\t\t\t\treturn \"meta\"}\n\t\t\telse\n\t\t\t\treturn \"meta\"}\n\t\treturn null}\n\n\treturn{\n\t\tstartState:function(){\n\t\t\treturn{\n\t\t\t\ttokenize:tokenPerl,\n\t\t\t\tchain:null,\n\t\t\t\tstyle:null,\n\t\t\t\ttail:null}},\n\t\ttoken:function(stream,state){\n\t\t\treturn (state.tokenize||tokenPerl)(stream,state)},\n\t\telectricChars:\"{}\"}});\n\nCodeMirror.defineMIME(\"text/x-perl\", \"perl\");\n\n// it's like \"peek\", but need for look-ahead or look-behind if index < 0\nCodeMirror.StringStream.prototype.look=function(c){\n\treturn this.string.charAt(this.pos+(c||0))};\n\n// return a part of prefix of current stream from current position\nCodeMirror.StringStream.prototype.prefix=function(c){\n\tif(c){\n\t\tvar x=this.pos-c;\n\t\treturn this.string.substr((x>=0?x:0),c)}\n\telse{\n\t\treturn this.string.substr(0,this.pos-1)}};\n\n// return a part of suffix of current stream from current position\nCodeMirror.StringStream.prototype.suffix=function(c){\n\tvar y=this.string.length;\n\tvar x=y-this.pos+1;\n\treturn this.string.substr(this.pos,(c&&c<y?c:x))};\n\n// return a part of suffix of current stream from current position and change current position\nCodeMirror.StringStream.prototype.nsuffix=function(c){\n\tvar p=this.pos;\n\tvar l=c||(this.string.length-this.pos+1);\n\tthis.pos+=l;\n\treturn this.string.substr(p,l)};\n\n// eating and vomiting a part of stream from current position\nCodeMirror.StringStream.prototype.eatSuffix=function(c){\n\tvar x=this.pos+c;\n\tvar y;\n\tif(x<=0)\n\t\tthis.pos=0;\n\telse if(x>=(y=this.string.length-1))\n\t\tthis.pos=y;\n\telse\n\t\tthis.pos=x};\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/php/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: PHP mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"../xml/xml.js\"></script>\n    <script src=\"../javascript/javascript.js\"></script>\n    <script src=\"../css/css.js\"></script>\n    <script src=\"../clike/clike.js\"></script>\n    <script src=\"php.js\"></script>\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: PHP mode</h1>\n\n<form><textarea id=\"code\" name=\"code\">\n<?php\nfunction hello($who) {\n\treturn \"Hello \" . $who;\n}\n?>\n<p>The program says <?= hello(\"World\") ?>.</p>\n<script>\n\talert(\"And here is some JS code\"); // also colored\n</script>\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        mode: \"application/x-httpd-php\",\n        indentUnit: 4,\n        indentWithTabs: true,\n        enterMode: \"keep\",\n        tabMode: \"shift\"\n      });\n    </script>\n\n    <p>Simple HTML/PHP mode based on\n    the <a href=\"../clike/\">C-like</a> mode. Depends on XML,\n    JavaScript, CSS, and C-like modes.</p>\n\n    <p><strong>MIME types defined:</strong> <code>application/x-httpd-php</code> (HTML with PHP code), <code>text/x-php</code> (plain, non-wrapped PHP code).</p>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/php/php.js",
    "content": "(function() {\n  function keywords(str) {\n    var obj = {}, words = str.split(\" \");\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n    return obj;\n  }\n  function heredoc(delim) {\n    return function(stream, state) {\n      if (stream.match(delim)) state.tokenize = null;\n      else stream.skipToEnd();\n      return \"string\";\n    }\n  }\n  var phpConfig = {\n    name: \"clike\",\n    keywords: keywords(\"abstract and array as break case catch class clone const continue declare default \" +\n                       \"do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final \" +\n                       \"for foreach function global goto if implements interface instanceof namespace \" +\n                       \"new or private protected public static switch throw trait try use var while xor \" +\n                       \"die echo empty exit eval include include_once isset list require require_once return \" +\n                       \"print unset __halt_compiler self static parent\"),\n    blockKeywords: keywords(\"catch do else elseif for foreach if switch try while\"),\n    atoms: keywords(\"true false null TRUE FALSE NULL\"),\n    multiLineStrings: true,\n    hooks: {\n      \"$\": function(stream, state) {\n        stream.eatWhile(/[\\w\\$_]/);\n        return \"variable-2\";\n      },\n      \"<\": function(stream, state) {\n        if (stream.match(/<</)) {\n          stream.eatWhile(/[\\w\\.]/);\n          state.tokenize = heredoc(stream.current().slice(3));\n          return state.tokenize(stream, state);\n        }\n        return false;\n      },\n      \"#\": function(stream, state) {\n        while (!stream.eol() && !stream.match(\"?>\", false)) stream.next();\n        return \"comment\";\n      },\n      \"/\": function(stream, state) {\n        if (stream.eat(\"/\")) {\n          while (!stream.eol() && !stream.match(\"?>\", false)) stream.next();\n          return \"comment\";\n        }\n        return false;\n      }\n    }\n  };\n\n  CodeMirror.defineMode(\"php\", function(config, parserConfig) {\n    var htmlMode = CodeMirror.getMode(config, {name: \"xml\", htmlMode: true});\n    var jsMode = CodeMirror.getMode(config, \"javascript\");\n    var cssMode = CodeMirror.getMode(config, \"css\");\n    var phpMode = CodeMirror.getMode(config, phpConfig);\n\n    function dispatch(stream, state) { // TODO open PHP inside text/css\n      var isPHP = state.mode == \"php\";\n      if (stream.sol() && state.pending != '\"') state.pending = null;\n      if (state.curMode == htmlMode) {\n        if (stream.match(/^<\\?\\w*/)) {\n          state.curMode = phpMode;\n          state.curState = state.php;\n          state.curClose = \"?>\";\n\t  state.mode = \"php\";\n          return \"meta\";\n        }\n        if (state.pending == '\"') {\n          while (!stream.eol() && stream.next() != '\"') {}\n          var style = \"string\";\n        } else if (state.pending && stream.pos < state.pending.end) {\n          stream.pos = state.pending.end;\n          var style = state.pending.style;\n        } else {\n          var style = htmlMode.token(stream, state.curState);\n        }\n        state.pending = null;\n        var cur = stream.current(), openPHP = cur.search(/<\\?/);\n        if (openPHP != -1) {\n          if (style == \"string\" && /\\\"$/.test(cur) && !/\\?>/.test(cur)) state.pending = '\"';\n          else state.pending = {end: stream.pos, style: style};\n          stream.backUp(cur.length - openPHP);\n        } else if (style == \"tag\" && stream.current() == \">\" && state.curState.context) {\n          if (/^script$/i.test(state.curState.context.tagName)) {\n            state.curMode = jsMode;\n            state.curState = jsMode.startState(htmlMode.indent(state.curState, \"\"));\n            state.curClose = /^<\\/\\s*script\\s*>/i;\n\t    state.mode = \"javascript\";\n          }\n          else if (/^style$/i.test(state.curState.context.tagName)) {\n            state.curMode = cssMode;\n            state.curState = cssMode.startState(htmlMode.indent(state.curState, \"\"));\n            state.curClose = /^<\\/\\s*style\\s*>/i;\n            state.mode = \"css\";\n          }\n        }\n        return style;\n      } else if ((!isPHP || state.php.tokenize == null) &&\n                 stream.match(state.curClose, isPHP)) {\n        state.curMode = htmlMode;\n        state.curState = state.html;\n        state.curClose = null;\n\tstate.mode = \"html\";\n        if (isPHP) return \"meta\";\n        else return dispatch(stream, state);\n      } else {\n        return state.curMode.token(stream, state.curState);\n      }\n    }\n\n    return {\n      startState: function() {\n        var html = htmlMode.startState();\n        return {html: html,\n                php: phpMode.startState(),\n                curMode: parserConfig.startOpen ? phpMode : htmlMode,\n                curState: parserConfig.startOpen ? phpMode.startState() : html,\n                curClose: parserConfig.startOpen ? /^\\?>/ : null,\n\t\tmode: parserConfig.startOpen ? \"php\" : \"html\",\n                pending: null}\n      },\n\n      copyState: function(state) {\n        var html = state.html, htmlNew = CodeMirror.copyState(htmlMode, html),\n            php = state.php, phpNew = CodeMirror.copyState(phpMode, php), cur;\n        if (state.curState == html) cur = htmlNew;\n        else if (state.curState == php) cur = phpNew;\n        else cur = CodeMirror.copyState(state.curMode, state.curState);\n        return {html: htmlNew, php: phpNew, curMode: state.curMode, curState: cur,\n                curClose: state.curClose, mode: state.mode,\n                pending: state.pending};\n      },\n\n      token: dispatch,\n\n      indent: function(state, textAfter) {\n        if ((state.curMode != phpMode && /^\\s*<\\//.test(textAfter)) ||\n            (state.curMode == phpMode && /^\\?>/.test(textAfter)))\n          return htmlMode.indent(state.html, textAfter);\n        return state.curMode.indent(state.curState, textAfter);\n      },\n\n      electricChars: \"/{}:\"\n    }\n  }, \"xml\", \"clike\", \"javascript\", \"css\");\n  CodeMirror.defineMIME(\"application/x-httpd-php\", \"php\");\n  CodeMirror.defineMIME(\"application/x-httpd-php-open\", {name: \"php\", startOpen: true});\n  CodeMirror.defineMIME(\"text/x-php\", phpConfig);\n})();\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/pig/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Pig Latin mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"pig.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n    <style>.CodeMirror {border: 2px inset #dee;}</style>\n  </head>\n  <body>\n    <h1>CodeMirror: Pig Latin mode</h1>\n\n<form><textarea id=\"code\" name=\"code\">\n-- Apache Pig (Pig Latin Language) Demo\n/* \nThis is a multiline comment.\n*/\na = LOAD \"\\path\\to\\input\" USING PigStorage('\\t') AS (x:long, y:chararray, z:bytearray);\nb = GROUP a BY (x,y,3+4);\nc = FOREACH b GENERATE flatten(group) as (x,y), SUM(group.$2) as z;\nSTORE c INTO \"\\path\\to\\output\";\n\n--\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        indentUnit: 4,\n        mode: \"text/x-pig\"\n      });\n    </script>\n\n    <p>\n        Simple mode that handles Pig Latin language.\n    </p>\n\n    <p><strong>MIME type defined:</strong> <code>text/x-pig</code>\n    (PIG code)\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/pig/pig.js",
    "content": "/*\n *\tPig Latin Mode for CodeMirror 2 \n *\t@author Prasanth Jayachandran\n *\t@link \thttps://github.com/prasanthj/pig-codemirror-2\n *  This implementation is adapted from PL/SQL mode in CodeMirror 2.\n*/\nCodeMirror.defineMode(\"pig\", function(config, parserConfig) {\n\tvar indentUnit = config.indentUnit,\n\t\tkeywords = parserConfig.keywords,\n\t\tbuiltins = parserConfig.builtins,\n\t\ttypes = parserConfig.types,\n\t\tmultiLineStrings = parserConfig.multiLineStrings;\n\t\n\tvar isOperatorChar = /[*+\\-%<>=&?:\\/!|]/;\n\t\n\tfunction chain(stream, state, f) {\n\t\tstate.tokenize = f;\n\t\treturn f(stream, state);\n\t}\n\t\n\tvar type;\n\tfunction ret(tp, style) {\n\t\ttype = tp;\n\t\treturn style;\n\t}\n\t\n\tfunction tokenComment(stream, state) {\n\t\tvar isEnd = false;\n\t\tvar ch;\n\t\twhile(ch = stream.next()) {\n\t\t\tif(ch == \"/\" && isEnd) {\n\t\t\t\tstate.tokenize = tokenBase;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tisEnd = (ch == \"*\");\n\t\t}\n\t\treturn ret(\"comment\", \"comment\");\n\t}\n\t\n\tfunction tokenString(quote) {\n\t\treturn function(stream, state) {\n\t\t\tvar escaped = false, next, end = false;\n\t\t\twhile((next = stream.next()) != null) {\n\t\t\t\tif (next == quote && !escaped) {\n\t\t\t\t\tend = true; break;\n\t\t\t\t}\n\t\t\t\tescaped = !escaped && next == \"\\\\\";\n\t\t\t}\n\t\t\tif (end || !(escaped || multiLineStrings))\n\t\t\t\tstate.tokenize = tokenBase;\n\t\t\treturn ret(\"string\", \"error\");\n\t\t};\n\t}\n\t\n\tfunction tokenBase(stream, state) {\n\t\tvar ch = stream.next();\n\t\t\n\t\t// is a start of string?\n\t\tif (ch == '\"' || ch == \"'\")\n\t\t\treturn chain(stream, state, tokenString(ch));\n\t\t// is it one of the special chars\n\t\telse if(/[\\[\\]{}\\(\\),;\\.]/.test(ch))\n\t\t\treturn ret(ch);\n\t\t// is it a number?\n\t\telse if(/\\d/.test(ch)) {\n\t\t\tstream.eatWhile(/[\\w\\.]/);\n\t\t\treturn ret(\"number\", \"number\");\n\t\t}\n\t\t// multi line comment or operator\n\t\telse if (ch == \"/\") {\n\t\t\tif (stream.eat(\"*\")) {\n\t\t\t\treturn chain(stream, state, tokenComment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tstream.eatWhile(isOperatorChar);\n\t\t\t\treturn ret(\"operator\", \"operator\");\n\t\t\t}\n\t\t}\n\t\t// single line comment or operator\n\t\telse if (ch==\"-\") {\n\t\t\tif(stream.eat(\"-\")){\n\t\t\t\tstream.skipToEnd();\n\t\t\t\treturn ret(\"comment\", \"comment\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tstream.eatWhile(isOperatorChar);\n\t\t\t\treturn ret(\"operator\", \"operator\");\n\t\t\t}\n\t\t}\n\t\t// is it an operator\n\t\telse if (isOperatorChar.test(ch)) {\n\t\t\tstream.eatWhile(isOperatorChar);\n\t\t\treturn ret(\"operator\", \"operator\");\n\t\t}\n\t\telse {\n\t\t\t// get the while word\n\t\t\tstream.eatWhile(/[\\w\\$_]/);\n\t\t\t// is it one of the listed keywords?\n\t\t\tif (keywords && keywords.propertyIsEnumerable(stream.current().toUpperCase())) {\n\t\t\t\tif (stream.eat(\")\") || stream.eat(\".\")) {\n\t\t\t\t\t//keywords can be used as variables like flatten(group), group.$0 etc..\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn (\"keyword\", \"keyword\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t// is it one of the builtin functions?\n\t\t\tif (builtins && builtins.propertyIsEnumerable(stream.current().toUpperCase()))\n\t\t\t{\n\t\t\t\treturn (\"keyword\", \"variable-2\")\n\t\t\t}\n\t\t\t// is it one of the listed types?\n\t\t\tif (types && types.propertyIsEnumerable(stream.current().toUpperCase()))\n\t\t\t\treturn (\"keyword\", \"variable-3\")\n\t\t\t// default is a 'word'\n\t\t\treturn ret(\"word\", \"pig-word\");\n\t\t}\n\t}\n\t\n\t// Interface\n\treturn {\n\t\tstartState: function(basecolumn) {\n\t\t\treturn {\n\t\t\t\ttokenize: tokenBase,\n\t\t\t\tstartOfLine: true\n\t\t\t};\n\t\t},\n\t\t\n\t\ttoken: function(stream, state) {\n\t\t\tif(stream.eatSpace()) return null;\n\t\t\tvar style = state.tokenize(stream, state);\n\t\t\treturn style;\n\t\t}\n\t};\n});\n\n(function() {\n\tfunction keywords(str) {\n\t\tvar obj = {}, words = str.split(\" \");\n\t\tfor (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n \t\treturn obj;\n \t}\n\n\t// builtin funcs taken from trunk revision 1303237\n\tvar pBuiltins = \"ABS ACOS ARITY ASIN ATAN AVG BAGSIZE BINSTORAGE BLOOM BUILDBLOOM CBRT CEIL \" \n\t+ \"CONCAT COR COS COSH COUNT COUNT_STAR COV CONSTANTSIZE CUBEDIMENSIONS DIFF DISTINCT DOUBLEABS \"\n\t+ \"DOUBLEAVG DOUBLEBASE DOUBLEMAX DOUBLEMIN DOUBLEROUND DOUBLESUM EXP FLOOR FLOATABS FLOATAVG \"\n\t+ \"FLOATMAX FLOATMIN FLOATROUND FLOATSUM GENERICINVOKER INDEXOF INTABS INTAVG INTMAX INTMIN \"\n\t+ \"INTSUM INVOKEFORDOUBLE INVOKEFORFLOAT INVOKEFORINT INVOKEFORLONG INVOKEFORSTRING INVOKER \"\n\t+ \"ISEMPTY JSONLOADER JSONMETADATA JSONSTORAGE LAST_INDEX_OF LCFIRST LOG LOG10 LOWER LONGABS \"\n\t+ \"LONGAVG LONGMAX LONGMIN LONGSUM MAX MIN MAPSIZE MONITOREDUDF NONDETERMINISTIC OUTPUTSCHEMA  \"\n\t+ \"PIGSTORAGE PIGSTREAMING RANDOM REGEX_EXTRACT REGEX_EXTRACT_ALL REPLACE ROUND SIN SINH SIZE \"\n\t+ \"SQRT STRSPLIT SUBSTRING SUM STRINGCONCAT STRINGMAX STRINGMIN STRINGSIZE TAN TANH TOBAG \"\n\t+ \"TOKENIZE TOMAP TOP TOTUPLE TRIM TEXTLOADER TUPLESIZE UCFIRST UPPER UTF8STORAGECONVERTER \"; \n\t\n\t// taken from QueryLexer.g\n\tvar pKeywords = \"VOID IMPORT RETURNS DEFINE LOAD FILTER FOREACH ORDER CUBE DISTINCT COGROUP \"\n\t+ \"JOIN CROSS UNION SPLIT INTO IF OTHERWISE ALL AS BY USING INNER OUTER ONSCHEMA PARALLEL \"\n\t+ \"PARTITION GROUP AND OR NOT GENERATE FLATTEN ASC DESC IS STREAM THROUGH STORE MAPREDUCE \"\n\t+ \"SHIP CACHE INPUT OUTPUT STDERROR STDIN STDOUT LIMIT SAMPLE LEFT RIGHT FULL EQ GT LT GTE LTE \" \n\t+ \"NEQ MATCHES TRUE FALSE \"; \n\t\n\t// data types\n\tvar pTypes = \"BOOLEAN INT LONG FLOAT DOUBLE CHARARRAY BYTEARRAY BAG TUPLE MAP \"\n\t\n\tCodeMirror.defineMIME(\"text/x-pig\", {\n\t name: \"pig\",\n\t builtins: keywords(pBuiltins),\n\t keywords: keywords(pKeywords),\n\t types: keywords(pTypes)\n\t });\n}());\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/plsql/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Oracle PL/SQL mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"plsql.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n    <style>.CodeMirror {border: 2px inset #dee;}</style>\n  </head>\n  <body>\n    <h1>CodeMirror: Oracle PL/SQL mode</h1>\n\n<form><textarea id=\"code\" name=\"code\">\n-- Oracle PL/SQL Code Demo\n/*\n   based on c-like mode, adapted to PL/SQL by Peter Raganitsch ( http://www.oracle-and-apex.com/ )\n   April 2011\n*/\nDECLARE\n    vIdx    NUMBER;\n    vString VARCHAR2(100);\n    cText   CONSTANT VARCHAR2(100) := 'That''s it! Have fun with CodeMirror 2';\nBEGIN\n    vIdx := 0;\n    --\n    FOR rDATA IN\n      ( SELECT *\n          FROM EMP\n         ORDER BY EMPNO\n      )\n    LOOP\n        vIdx    := vIdx + 1;\n        vString := rDATA.EMPNO || ' - ' || rDATA.ENAME;\n        --\n        UPDATE EMP\n           SET SAL   = SAL * 101/100\n         WHERE EMPNO = rDATA.EMPNO\n        ;\n    END LOOP;\n    --\n    SYS.DBMS_OUTPUT.Put_Line (cText);\nEND;\n--\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        indentUnit: 4,\n        mode: \"text/x-plsql\"\n      });\n    </script>\n\n    <p>\n        Simple mode that handles Oracle PL/SQL language (and Oracle SQL, of course).\n    </p>\n\n    <p><strong>MIME type defined:</strong> <code>text/x-plsql</code>\n    (PLSQL code)\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/plsql/plsql.js",
    "content": "CodeMirror.defineMode(\"plsql\", function(config, parserConfig) {\n  var indentUnit       = config.indentUnit,\n      keywords         = parserConfig.keywords,\n      functions        = parserConfig.functions,\n      types            = parserConfig.types,\n      sqlplus          = parserConfig.sqlplus,\n      multiLineStrings = parserConfig.multiLineStrings;\n  var isOperatorChar   = /[+\\-*&%=<>!?:\\/|]/;\n  function chain(stream, state, f) {\n    state.tokenize = f;\n    return f(stream, state);\n  }\n\n  var type;\n  function ret(tp, style) {\n    type = tp;\n    return style;\n  }\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    // start of string?\n    if (ch == '\"' || ch == \"'\")\n      return chain(stream, state, tokenString(ch));\n    // is it one of the special signs []{}().,;? Seperator?\n    else if (/[\\[\\]{}\\(\\),;\\.]/.test(ch))\n      return ret(ch);\n    // start of a number value?\n    else if (/\\d/.test(ch)) {\n      stream.eatWhile(/[\\w\\.]/);\n      return ret(\"number\", \"number\");\n    }\n    // multi line comment or simple operator?\n    else if (ch == \"/\") {\n      if (stream.eat(\"*\")) {\n        return chain(stream, state, tokenComment);\n      }\n      else {\n        stream.eatWhile(isOperatorChar);\n        return ret(\"operator\", \"operator\");\n      }\n    }\n    // single line comment or simple operator?\n    else if (ch == \"-\") {\n      if (stream.eat(\"-\")) {\n        stream.skipToEnd();\n        return ret(\"comment\", \"comment\");\n      }\n      else {\n        stream.eatWhile(isOperatorChar);\n        return ret(\"operator\", \"operator\");\n      }\n    }\n    // pl/sql variable?\n    else if (ch == \"@\" || ch == \"$\") {\n      stream.eatWhile(/[\\w\\d\\$_]/);\n      return ret(\"word\", \"variable\");\n    }\n    // is it a operator?\n    else if (isOperatorChar.test(ch)) {\n      stream.eatWhile(isOperatorChar);\n      return ret(\"operator\", \"operator\");\n    }\n    else {\n      // get the whole word\n      stream.eatWhile(/[\\w\\$_]/);\n      // is it one of the listed keywords?\n      if (keywords && keywords.propertyIsEnumerable(stream.current().toLowerCase())) return ret(\"keyword\", \"keyword\");\n      // is it one of the listed functions?\n      if (functions && functions.propertyIsEnumerable(stream.current().toLowerCase())) return ret(\"keyword\", \"builtin\");\n      // is it one of the listed types?\n      if (types && types.propertyIsEnumerable(stream.current().toLowerCase())) return ret(\"keyword\", \"variable-2\");\n      // is it one of the listed sqlplus keywords?\n      if (sqlplus && sqlplus.propertyIsEnumerable(stream.current().toLowerCase())) return ret(\"keyword\", \"variable-3\");\n      // default: just a \"word\"\n      return ret(\"word\", \"plsql-word\");\n    }\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var escaped = false, next, end = false;\n      while ((next = stream.next()) != null) {\n        if (next == quote && !escaped) {end = true; break;}\n        escaped = !escaped && next == \"\\\\\";\n      }\n      if (end || !(escaped || multiLineStrings))\n        state.tokenize = tokenBase;\n      return ret(\"string\", \"plsql-string\");\n    };\n  }\n\n  function tokenComment(stream, state) {\n    var maybeEnd = false, ch;\n    while (ch = stream.next()) {\n      if (ch == \"/\" && maybeEnd) {\n        state.tokenize = tokenBase;\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return ret(\"comment\", \"plsql-comment\");\n  }\n\n  // Interface\n\n  return {\n    startState: function(basecolumn) {\n      return {\n        tokenize: tokenBase,\n        startOfLine: true\n      };\n    },\n\n    token: function(stream, state) {\n      if (stream.eatSpace()) return null;\n      var style = state.tokenize(stream, state);\n      return style;\n    }\n  };\n});\n\n(function() {\n  function keywords(str) {\n    var obj = {}, words = str.split(\" \");\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n    return obj;\n  }\n  var cKeywords = \"abort accept access add all alter and any array arraylen as asc assert assign at attributes audit \" +\n        \"authorization avg \" +\n        \"base_table begin between binary_integer body boolean by \" +\n        \"case cast char char_base check close cluster clusters colauth column comment commit compress connect \" +\n        \"connected constant constraint crash create current currval cursor \" +\n        \"data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete \" +\n        \"desc digits dispose distinct do drop \" +\n        \"else elsif enable end entry escape exception exception_init exchange exclusive exists exit external \" +\n        \"fast fetch file for force form from function \" +\n        \"generic goto grant group \" +\n        \"having \" +\n        \"identified if immediate in increment index indexes indicator initial initrans insert interface intersect \" +\n        \"into is \" +\n        \"key \" +\n        \"level library like limited local lock log logging long loop \" +\n        \"master maxextents maxtrans member minextents minus mislabel mode modify multiset \" +\n        \"new next no noaudit nocompress nologging noparallel not nowait number_base \" +\n        \"object of off offline on online only open option or order out \" +\n        \"package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior \" +\n        \"private privileges procedure public \" +\n        \"raise range raw read rebuild record ref references refresh release rename replace resource restrict return \" +\n        \"returning reverse revoke rollback row rowid rowlabel rownum rows run \" +\n        \"savepoint schema segment select separate session set share snapshot some space split sql start statement \" +\n        \"storage subtype successful synonym \" +\n        \"tabauth table tables tablespace task terminate then to trigger truncate type \" +\n        \"union unique unlimited unrecoverable unusable update use using \" +\n        \"validate value values variable view views \" +\n        \"when whenever where while with work\";\n\n  var cFunctions = \"abs acos add_months ascii asin atan atan2 average \" +\n        \"bfilename \" +\n        \"ceil chartorowid chr concat convert cos cosh count \" +\n        \"decode deref dual dump dup_val_on_index \" +\n        \"empty error exp \" +\n        \"false floor found \" +\n        \"glb greatest \" +\n        \"hextoraw \" +\n        \"initcap instr instrb isopen \" +\n        \"last_day least lenght lenghtb ln lower lpad ltrim lub \" +\n        \"make_ref max min mod months_between \" +\n        \"new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower \" +\n        \"nls_sort nls_upper nlssort no_data_found notfound null nvl \" +\n        \"others \" +\n        \"power \" +\n        \"rawtohex reftohex round rowcount rowidtochar rpad rtrim \" +\n        \"sign sin sinh soundex sqlcode sqlerrm sqrt stddev substr substrb sum sysdate \" +\n        \"tan tanh to_char to_date to_label to_multi_byte to_number to_single_byte translate true trunc \" +\n        \"uid upper user userenv \" +\n        \"variance vsize\";\n\n  var cTypes = \"bfile blob \" +\n        \"character clob \" +\n        \"dec \" +\n        \"float \" +\n        \"int integer \" +\n        \"mlslabel \" +\n        \"natural naturaln nchar nclob number numeric nvarchar2 \" +\n        \"real rowtype \" +\n        \"signtype smallint string \" +\n        \"varchar varchar2\";\n\n  var cSqlplus = \"appinfo arraysize autocommit autoprint autorecovery autotrace \" +\n        \"blockterminator break btitle \" +\n        \"cmdsep colsep compatibility compute concat copycommit copytypecheck \" +\n        \"define describe \" +\n        \"echo editfile embedded escape exec execute \" +\n        \"feedback flagger flush \" +\n        \"heading headsep \" +\n        \"instance \" +\n        \"linesize lno loboffset logsource long longchunksize \" +\n        \"markup \" +\n        \"native newpage numformat numwidth \" +\n        \"pagesize pause pno \" +\n        \"recsep recsepchar release repfooter repheader \" +\n        \"serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber \" +\n        \"sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix \" +\n        \"tab term termout time timing trimout trimspool ttitle \" +\n        \"underline \" +\n        \"verify version \" +\n        \"wrap\";\n\n  CodeMirror.defineMIME(\"text/x-plsql\", {\n    name: \"plsql\",\n    keywords: keywords(cKeywords),\n    functions: keywords(cFunctions),\n    types: keywords(cTypes),\n    sqlplus: keywords(cSqlplus)\n  });\n}());\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/properties/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Properties files mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"properties.js\"></script>\n    <style>.CodeMirror {border-top: 1px solid #ddd; border-bottom: 1px solid #ddd;}</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: Properties files mode</h1>\n    <form><textarea id=\"code\" name=\"code\">\n# This is a properties file\na.key = A value\nanother.key = http://example.com\n! Exclamation mark as comment\nbut.not=Within ! A value # indeed\n   # Spaces at the beginning of a line\n   spaces.before.key=value\nbackslash=Used for multi\\\n          line entries,\\\n          that's convenient.\n# Unicode sequences\nunicode.key=This is \\u0020 Unicode\nno.multiline=here\n# Colons\ncolons : can be used too\n# Spaces\nspaces\\ in\\ keys=Not very common...\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {});\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-properties</code>,\n    <code>text/x-ini</code>.</p>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/properties/properties.js",
    "content": "CodeMirror.defineMode(\"properties\", function() {\n  return {\n    token: function(stream, state) {\n      var sol = stream.sol() || state.afterSection;\n      var eol = stream.eol();\n\n      state.afterSection = false;\n\n      if (sol) {\n        if (state.nextMultiline) {\n          state.inMultiline = true;\n          state.nextMultiline = false;\n        } else {\n          state.position = \"def\";\n        }\n      }\n\n      if (eol && ! state.nextMultiline) {\n        state.inMultiline = false;\n        state.position = \"def\";\n      }\n\n      if (sol) {\n        while(stream.eatSpace());\n      }\n\n      var ch = stream.next();\n\n      if (sol && (ch === \"#\" || ch === \"!\" || ch === \";\")) {\n        state.position = \"comment\";\n        stream.skipToEnd();\n        return \"comment\";\n      } else if (sol && ch === \"[\") {\n        state.afterSection = true;\n        stream.skipTo(\"]\"); stream.eat(\"]\");\n        return \"header\";\n      } else if (ch === \"=\" || ch === \":\") {\n        state.position = \"quote\";\n        return null;\n      } else if (ch === \"\\\\\" && state.position === \"quote\") {\n        if (stream.next() !== \"u\") {    // u = Unicode sequence \\u1234\n          // Multiline value\n          state.nextMultiline = true;\n        }\n      }\n\n      return state.position;\n    },\n\n    startState: function() {\n      return {\n        position : \"def\",       // Current position, \"def\", \"quote\" or \"comment\"\n        nextMultiline : false,  // Is the next line multiline value\n        inMultiline : false,    // Is the current line a multiline value\n        afterSection : false    // Did we just open a section\n      };\n    }\n\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-properties\", \"properties\");\nCodeMirror.defineMIME(\"text/x-ini\", \"properties\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/python/LICENSE.txt",
    "content": "The MIT License\n\nCopyright (c) 2010 Timothy Farrell\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE."
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/python/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Python mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"python.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n  </head>\n  <body>\n    <h1>CodeMirror: Python mode</h1>\n    \n    <div><textarea id=\"code\" name=\"code\">\n# Literals\n1234\n0.0e101\n.123\n0b01010011100\n0o01234567\n0x0987654321abcdef\n7\n2147483647\n3L\n79228162514264337593543950336L\n0x100000000L\n79228162514264337593543950336\n0xdeadbeef\n3.14j\n10.j\n10j\n.001j\n1e100j\n3.14e-10j\n\n\n# String Literals\n'For\\''\n\"God\\\"\"\n\"\"\"so loved\nthe world\"\"\"\n'''that he gave\nhis only begotten\\' '''\n'that whosoever believeth \\\nin him'\n''\n\n# Identifiers\n__a__\na.b\na.b.c\n\n# Operators\n+ - * / % & | ^ ~ < >\n== != <= >= <> << >> // **\nand or not in is\n\n# Delimiters\n() [] {} , : ` = ; @ .  # Note that @ and . require the proper context.\n+= -= *= /= %= &= |= ^=\n//= >>= <<= **=\n\n# Keywords\nas assert break class continue def del elif else except\nfinally for from global if import lambda pass raise\nreturn try while with yield\n\n# Python 2 Keywords (otherwise Identifiers)\nexec print\n\n# Python 3 Keywords (otherwise Identifiers)\nnonlocal\n\n# Types\nbool classmethod complex dict enumerate float frozenset int list object\nproperty reversed set slice staticmethod str super tuple type\n\n# Python 2 Types (otherwise Identifiers)\nbasestring buffer file long unicode xrange\n\n# Python 3 Types (otherwise Identifiers)\nbytearray bytes filter map memoryview open range zip\n\n# Some Example code\nimport os\nfrom package import ParentClass\n\n@nonsenseDecorator\ndef doesNothing():\n    pass\n\nclass ExampleClass(ParentClass):\n    @staticmethod\n    def example(inputStr):\n        a = list(inputStr)\n        a.reverse()\n        return ''.join(a)\n\n    def __init__(self, mixin = 'Hello'):\n        self.mixin = mixin\n\n</textarea></div>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: {name: \"python\",\n               version: 2,\n               singleLineStringErrors: false},\n        lineNumbers: true,\n        indentUnit: 4,\n        tabMode: \"shift\",\n        matchBrackets: true\n      });\n    </script>\n    <h2>Configuration Options:</h2>\n    <ul>\n      <li>version - 2/3 - The version of Python to recognize.  Default is 2.</li>\n      <li>singleLineStringErrors - true/false - If you have a single-line string that is not terminated at the end of the line, this will show subsequent lines as errors if true, otherwise it will consider the newline as the end of the string. Default is false.</li>\n    </ul>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-python</code>.</p>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/python/python.js",
    "content": "CodeMirror.defineMode(\"python\", function(conf, parserConf) {\n    var ERRORCLASS = 'error';\n    \n    function wordRegexp(words) {\n        return new RegExp(\"^((\" + words.join(\")|(\") + \"))\\\\b\");\n    }\n    \n    var singleOperators = new RegExp(\"^[\\\\+\\\\-\\\\*/%&|\\\\^~<>!]\");\n    var singleDelimiters = new RegExp('^[\\\\(\\\\)\\\\[\\\\]\\\\{\\\\}@,:`=;\\\\.]');\n    var doubleOperators = new RegExp(\"^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\\\*\\\\*))\");\n    var doubleDelimiters = new RegExp(\"^((\\\\+=)|(\\\\-=)|(\\\\*=)|(%=)|(/=)|(&=)|(\\\\|=)|(\\\\^=))\");\n    var tripleDelimiters = new RegExp(\"^((//=)|(>>=)|(<<=)|(\\\\*\\\\*=))\");\n    var identifiers = new RegExp(\"^[_A-Za-z][_A-Za-z0-9]*\");\n\n    var wordOperators = wordRegexp(['and', 'or', 'not', 'is', 'in']);\n    var commonkeywords = ['as', 'assert', 'break', 'class', 'continue',\n                          'def', 'del', 'elif', 'else', 'except', 'finally',\n                          'for', 'from', 'global', 'if', 'import',\n                          'lambda', 'pass', 'raise', 'return',\n                          'try', 'while', 'with', 'yield'];\n    var commonBuiltins = ['abs', 'all', 'any', 'bin', 'bool', 'bytearray', 'callable', 'chr',\n                          'classmethod', 'compile', 'complex', 'delattr', 'dict', 'dir', 'divmod',\n                          'enumerate', 'eval', 'filter', 'float', 'format', 'frozenset',\n                          'getattr', 'globals', 'hasattr', 'hash', 'help', 'hex', 'id',\n                          'input', 'int', 'isinstance', 'issubclass', 'iter', 'len',\n                          'list', 'locals', 'map', 'max', 'memoryview', 'min', 'next',\n                          'object', 'oct', 'open', 'ord', 'pow', 'property', 'range',\n                          'repr', 'reversed', 'round', 'set', 'setattr', 'slice',\n                          'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple',\n                          'type', 'vars', 'zip', '__import__', 'NotImplemented',\n                          'Ellipsis', '__debug__'];\n    var py2 = {'builtins': ['apply', 'basestring', 'buffer', 'cmp', 'coerce', 'execfile',\n                            'file', 'intern', 'long', 'raw_input', 'reduce', 'reload',\n                            'unichr', 'unicode', 'xrange', 'False', 'True', 'None'],\n               'keywords': ['exec', 'print']};\n    var py3 = {'builtins': ['ascii', 'bytes', 'exec', 'print'],\n               'keywords': ['nonlocal', 'False', 'True', 'None']};\n\n    if (!!parserConf.version && parseInt(parserConf.version, 10) === 3) {\n        commonkeywords = commonkeywords.concat(py3.keywords);\n        commonBuiltins = commonBuiltins.concat(py3.builtins);\n        var stringPrefixes = new RegExp(\"^(([rb]|(br))?('{3}|\\\"{3}|['\\\"]))\", \"i\");\n    } else {\n        commonkeywords = commonkeywords.concat(py2.keywords);\n        commonBuiltins = commonBuiltins.concat(py2.builtins);\n        var stringPrefixes = new RegExp(\"^(([rub]|(ur)|(br))?('{3}|\\\"{3}|['\\\"]))\", \"i\");\n    }\n    var keywords = wordRegexp(commonkeywords);\n    var builtins = wordRegexp(commonBuiltins);\n\n    var indentInfo = null;\n\n    // tokenizers\n    function tokenBase(stream, state) {\n        // Handle scope changes\n        if (stream.sol()) {\n            var scopeOffset = state.scopes[0].offset;\n            if (stream.eatSpace()) {\n                var lineOffset = stream.indentation();\n                if (lineOffset > scopeOffset) {\n                    indentInfo = 'indent';\n                } else if (lineOffset < scopeOffset) {\n                    indentInfo = 'dedent';\n                }\n                return null;\n            } else {\n                if (scopeOffset > 0) {\n                    dedent(stream, state);\n                }\n            }\n        }\n        if (stream.eatSpace()) {\n            return null;\n        }\n        \n        var ch = stream.peek();\n        \n        // Handle Comments\n        if (ch === '#') {\n            stream.skipToEnd();\n            return 'comment';\n        }\n        \n        // Handle Number Literals\n        if (stream.match(/^[0-9\\.]/, false)) {\n            var floatLiteral = false;\n            // Floats\n            if (stream.match(/^\\d*\\.\\d+(e[\\+\\-]?\\d+)?/i)) { floatLiteral = true; }\n            if (stream.match(/^\\d+\\.\\d*/)) { floatLiteral = true; }\n            if (stream.match(/^\\.\\d+/)) { floatLiteral = true; }\n            if (floatLiteral) {\n                // Float literals may be \"imaginary\"\n                stream.eat(/J/i);\n                return 'number';\n            }\n            // Integers\n            var intLiteral = false;\n            // Hex\n            if (stream.match(/^0x[0-9a-f]+/i)) { intLiteral = true; }\n            // Binary\n            if (stream.match(/^0b[01]+/i)) { intLiteral = true; }\n            // Octal\n            if (stream.match(/^0o[0-7]+/i)) { intLiteral = true; }\n            // Decimal\n            if (stream.match(/^[1-9]\\d*(e[\\+\\-]?\\d+)?/)) {\n                // Decimal literals may be \"imaginary\"\n                stream.eat(/J/i);\n                // TODO - Can you have imaginary longs?\n                intLiteral = true;\n            }\n            // Zero by itself with no other piece of number.\n            if (stream.match(/^0(?![\\dx])/i)) { intLiteral = true; }\n            if (intLiteral) {\n                // Integer literals may be \"long\"\n                stream.eat(/L/i);\n                return 'number';\n            }\n        }\n        \n        // Handle Strings\n        if (stream.match(stringPrefixes)) {\n            state.tokenize = tokenStringFactory(stream.current());\n            return state.tokenize(stream, state);\n        }\n        \n        // Handle operators and Delimiters\n        if (stream.match(tripleDelimiters) || stream.match(doubleDelimiters)) {\n            return null;\n        }\n        if (stream.match(doubleOperators)\n            || stream.match(singleOperators)\n            || stream.match(wordOperators)) {\n            return 'operator';\n        }\n        if (stream.match(singleDelimiters)) {\n            return null;\n        }\n        \n        if (stream.match(keywords)) {\n            return 'keyword';\n        }\n        \n        if (stream.match(builtins)) {\n            return 'builtin';\n        }\n        \n        if (stream.match(identifiers)) {\n            return 'variable';\n        }\n        \n        // Handle non-detected items\n        stream.next();\n        return ERRORCLASS;\n    }\n    \n    function tokenStringFactory(delimiter) {\n        while ('rub'.indexOf(delimiter.charAt(0).toLowerCase()) >= 0) {\n            delimiter = delimiter.substr(1);\n        }\n        var singleline = delimiter.length == 1;\n        var OUTCLASS = 'string';\n        \n        return function tokenString(stream, state) {\n            while (!stream.eol()) {\n                stream.eatWhile(/[^'\"\\\\]/);\n                if (stream.eat('\\\\')) {\n                    stream.next();\n                    if (singleline && stream.eol()) {\n                        return OUTCLASS;\n                    }\n                } else if (stream.match(delimiter)) {\n                    state.tokenize = tokenBase;\n                    return OUTCLASS;\n                } else {\n                    stream.eat(/['\"]/);\n                }\n            }\n            if (singleline) {\n                if (parserConf.singleLineStringErrors) {\n                    return ERRORCLASS;\n                } else {\n                    state.tokenize = tokenBase;\n                }\n            }\n            return OUTCLASS;\n        };\n    }\n    \n    function indent(stream, state, type) {\n        type = type || 'py';\n        var indentUnit = 0;\n        if (type === 'py') {\n            if (state.scopes[0].type !== 'py') {\n                state.scopes[0].offset = stream.indentation();\n                return;\n            }\n            for (var i = 0; i < state.scopes.length; ++i) {\n                if (state.scopes[i].type === 'py') {\n                    indentUnit = state.scopes[i].offset + conf.indentUnit;\n                    break;\n                }\n            }\n        } else {\n            indentUnit = stream.column() + stream.current().length;\n        }\n        state.scopes.unshift({\n            offset: indentUnit,\n            type: type\n        });\n    }\n    \n    function dedent(stream, state, type) {\n        type = type || 'py';\n        if (state.scopes.length == 1) return;\n        if (state.scopes[0].type === 'py') {\n            var _indent = stream.indentation();\n            var _indent_index = -1;\n            for (var i = 0; i < state.scopes.length; ++i) {\n                if (_indent === state.scopes[i].offset) {\n                    _indent_index = i;\n                    break;\n                }\n            }\n            if (_indent_index === -1) {\n                return true;\n            }\n            while (state.scopes[0].offset !== _indent) {\n                state.scopes.shift();\n            }\n            return false\n        } else {\n            if (type === 'py') {\n                state.scopes[0].offset = stream.indentation();\n                return false;\n            } else {\n                if (state.scopes[0].type != type) {\n                    return true;\n                }\n                state.scopes.shift();\n                return false;\n            }\n        }\n    }\n\n    function tokenLexer(stream, state) {\n        indentInfo = null;\n        var style = state.tokenize(stream, state);\n        var current = stream.current();\n\n        // Handle '.' connected identifiers\n        if (current === '.') {\n            style = stream.match(identifiers, false) ? null : ERRORCLASS;\n            if (style === null && state.lastToken === 'meta') {\n                // Apply 'meta' style to '.' connected identifiers when\n                // appropriate.\n                style = 'meta';\n            }\n            return style;\n        }\n        \n        // Handle decorators\n        if (current === '@') {\n            return stream.match(identifiers, false) ? 'meta' : ERRORCLASS;\n        }\n\n        if ((style === 'variable' || style === 'builtin')\n            && state.lastToken === 'meta') {\n            style = 'meta';\n        }\n        \n        // Handle scope changes.\n        if (current === 'pass' || current === 'return') {\n            state.dedent += 1;\n        }\n        if (current === 'lambda') state.lambda = true;\n        if ((current === ':' && !state.lambda && state.scopes[0].type == 'py')\n            || indentInfo === 'indent') {\n            indent(stream, state);\n        }\n        var delimiter_index = '[({'.indexOf(current);\n        if (delimiter_index !== -1) {\n            indent(stream, state, '])}'.slice(delimiter_index, delimiter_index+1));\n        }\n        if (indentInfo === 'dedent') {\n            if (dedent(stream, state)) {\n                return ERRORCLASS;\n            }\n        }\n        delimiter_index = '])}'.indexOf(current);\n        if (delimiter_index !== -1) {\n            if (dedent(stream, state, current)) {\n                return ERRORCLASS;\n            }\n        }\n        if (state.dedent > 0 && stream.eol() && state.scopes[0].type == 'py') {\n            if (state.scopes.length > 1) state.scopes.shift();\n            state.dedent -= 1;\n        }\n        \n        return style;\n    }\n\n    var external = {\n        startState: function(basecolumn) {\n            return {\n              tokenize: tokenBase,\n              scopes: [{offset:basecolumn || 0, type:'py'}],\n              lastToken: null,\n              lambda: false,\n              dedent: 0\n          };\n        },\n        \n        token: function(stream, state) {\n            var style = tokenLexer(stream, state);\n            \n            state.lastToken = style;\n            \n            if (stream.eol() && stream.lambda) {\n                state.lambda = false;\n            }\n            \n            return style;\n        },\n        \n        indent: function(state, textAfter) {\n            if (state.tokenize != tokenBase) {\n                return 0;\n            }\n            \n            return state.scopes[0].offset;\n        }\n        \n    };\n    return external;\n});\n\nCodeMirror.defineMIME(\"text/x-python\", \"python\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/r/LICENSE",
    "content": "Copyright (c) 2011, Ubalo, Inc.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n    * Redistributions of source code must retain the above copyright\n      notice, this list of conditions and the following disclaimer.\n    * Redistributions in binary form must reproduce the above copyright\n      notice, this list of conditions and the following disclaimer in the\n      documentation and/or other materials provided with the distribution.\n    * Neither the name of the Ubalo, Inc nor the names of its\n      contributors may be used to endorse or promote products derived\n      from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL UBALO, INC BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/r/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: R mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"r.js\"></script>\n    <style>\n      .CodeMirror { border-top: 1px solid silver; border-bottom: 1px solid silver; }\n      .cm-s-default span.cm-semi { color: blue; font-weight: bold; }\n      .cm-s-default span.cm-dollar { color: orange; font-weight: bold; }\n      .cm-s-default span.cm-arrow { color: brown; }\n      .cm-s-default span.cm-arg-is { color: brown; }\n    </style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: R mode</h1>\n    <form><textarea id=\"code\" name=\"code\">\n# Code from http://www.mayin.org/ajayshah/KB/R/\n\n# FIRST LEARN ABOUT LISTS --\nX = list(height=5.4, weight=54)\nprint(\"Use default printing --\")\nprint(X)\nprint(\"Accessing individual elements --\")\ncat(\"Your height is \", X$height, \" and your weight is \", X$weight, \"\\n\")\n\n# FUNCTIONS --\nsquare <- function(x) {\n  return(x*x)\n}\ncat(\"The square of 3 is \", square(3), \"\\n\")\n\n                 # default value of the arg is set to 5.\ncube <- function(x=5) {\n  return(x*x*x);\n}\ncat(\"Calling cube with 2 : \", cube(2), \"\\n\")    # will give 2^3\ncat(\"Calling cube        : \", cube(), \"\\n\")     # will default to 5^3.\n\n# LEARN ABOUT FUNCTIONS THAT RETURN MULTIPLE OBJECTS --\npowers <- function(x) {\n  parcel = list(x2=x*x, x3=x*x*x, x4=x*x*x*x);\n  return(parcel);\n}\n\nX = powers(3);\nprint(\"Showing powers of 3 --\"); print(X);\n\n# WRITING THIS COMPACTLY (4 lines instead of 7)\n\npowerful <- function(x) {\n  return(list(x2=x*x, x3=x*x*x, x4=x*x*x*x));\n}\nprint(\"Showing powers of 3 --\"); print(powerful(3));\n\n# In R, the last expression in a function is, by default, what is\n# returned. So you could equally just say:\npowerful <- function(x) {list(x2=x*x, x3=x*x*x, x4=x*x*x*x)}\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {});\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-rsrc</code>.</p>\n\n    <p>Development of the CodeMirror R mode was kindly sponsored\n    by <a href=\"http://ubalo.com/\">Ubalo</a>, who hold\n    the <a href=\"LICENSE\">license</a>.</p>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/r/r.js",
    "content": "CodeMirror.defineMode(\"r\", function(config) {\n  function wordObj(str) {\n    var words = str.split(\" \"), res = {};\n    for (var i = 0; i < words.length; ++i) res[words[i]] = true;\n    return res;\n  }\n  var atoms = wordObj(\"NULL NA Inf NaN NA_integer_ NA_real_ NA_complex_ NA_character_\");\n  var builtins = wordObj(\"list quote bquote eval return call parse deparse\");\n  var keywords = wordObj(\"if else repeat while function for in next break\");\n  var blockkeywords = wordObj(\"if else repeat while function for\");\n  var opChars = /[+\\-*\\/^<>=!&|~$:]/;\n  var curPunc;\n\n  function tokenBase(stream, state) {\n    curPunc = null;\n    var ch = stream.next();\n    if (ch == \"#\") {\n      stream.skipToEnd();\n      return \"comment\";\n    } else if (ch == \"0\" && stream.eat(\"x\")) {\n      stream.eatWhile(/[\\da-f]/i);\n      return \"number\";\n    } else if (ch == \".\" && stream.eat(/\\d/)) {\n      stream.match(/\\d*(?:e[+\\-]?\\d+)?/);\n      return \"number\";\n    } else if (/\\d/.test(ch)) {\n      stream.match(/\\d*(?:\\.\\d+)?(?:e[+\\-]\\d+)?L?/);\n      return \"number\";\n    } else if (ch == \"'\" || ch == '\"') {\n      state.tokenize = tokenString(ch);\n      return \"string\";\n    } else if (ch == \".\" && stream.match(/.[.\\d]+/)) {\n      return \"keyword\";\n    } else if (/[\\w\\.]/.test(ch) && ch != \"_\") {\n      stream.eatWhile(/[\\w\\.]/);\n      var word = stream.current();\n      if (atoms.propertyIsEnumerable(word)) return \"atom\";\n      if (keywords.propertyIsEnumerable(word)) {\n        if (blockkeywords.propertyIsEnumerable(word)) curPunc = \"block\";\n        return \"keyword\";\n      }\n      if (builtins.propertyIsEnumerable(word)) return \"builtin\";\n      return \"variable\";\n    } else if (ch == \"%\") {\n      if (stream.skipTo(\"%\")) stream.next();\n      return \"variable-2\";\n    } else if (ch == \"<\" && stream.eat(\"-\")) {\n      return \"arrow\";\n    } else if (ch == \"=\" && state.ctx.argList) {\n      return \"arg-is\";\n    } else if (opChars.test(ch)) {\n      if (ch == \"$\") return \"dollar\";\n      stream.eatWhile(opChars);\n      return \"operator\";\n    } else if (/[\\(\\){}\\[\\];]/.test(ch)) {\n      curPunc = ch;\n      if (ch == \";\") return \"semi\";\n      return null;\n    } else {\n      return null;\n    }\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      if (stream.eat(\"\\\\\")) {\n        var ch = stream.next();\n        if (ch == \"x\") stream.match(/^[a-f0-9]{2}/i);\n        else if ((ch == \"u\" || ch == \"U\") && stream.eat(\"{\") && stream.skipTo(\"}\")) stream.next();\n        else if (ch == \"u\") stream.match(/^[a-f0-9]{4}/i);\n        else if (ch == \"U\") stream.match(/^[a-f0-9]{8}/i);\n        else if (/[0-7]/.test(ch)) stream.match(/^[0-7]{1,2}/);\n        return \"string-2\";\n      } else {\n        var next;\n        while ((next = stream.next()) != null) {\n          if (next == quote) { state.tokenize = tokenBase; break; }\n          if (next == \"\\\\\") { stream.backUp(1); break; }\n        }\n        return \"string\";\n      }\n    };\n  }\n\n  function push(state, type, stream) {\n    state.ctx = {type: type,\n                 indent: state.indent,\n                 align: null,\n                 column: stream.column(),\n                 prev: state.ctx};\n  }\n  function pop(state) {\n    state.indent = state.ctx.indent;\n    state.ctx = state.ctx.prev;\n  }\n\n  return {\n    startState: function(base) {\n      return {tokenize: tokenBase,\n              ctx: {type: \"top\",\n                    indent: -config.indentUnit,\n                    align: false},\n              indent: 0,\n              afterIdent: false};\n    },\n\n    token: function(stream, state) {\n      if (stream.sol()) {\n        if (state.ctx.align == null) state.ctx.align = false;\n        state.indent = stream.indentation();\n      }\n      if (stream.eatSpace()) return null;\n      var style = state.tokenize(stream, state);\n      if (style != \"comment\" && state.ctx.align == null) state.ctx.align = true;\n\n      var ctype = state.ctx.type;\n      if ((curPunc == \";\" || curPunc == \"{\" || curPunc == \"}\") && ctype == \"block\") pop(state);\n      if (curPunc == \"{\") push(state, \"}\", stream);\n      else if (curPunc == \"(\") {\n        push(state, \")\", stream);\n        if (state.afterIdent) state.ctx.argList = true;\n      }\n      else if (curPunc == \"[\") push(state, \"]\", stream);\n      else if (curPunc == \"block\") push(state, \"block\", stream);\n      else if (curPunc == ctype) pop(state);\n      state.afterIdent = style == \"variable\" || style == \"keyword\";\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      if (state.tokenize != tokenBase) return 0;\n      var firstChar = textAfter && textAfter.charAt(0), ctx = state.ctx,\n          closing = firstChar == ctx.type;\n      if (ctx.type == \"block\") return ctx.indent + (firstChar == \"{\" ? 0 : config.indentUnit);\n      else if (ctx.align) return ctx.column + (closing ? 0 : 1);\n      else return ctx.indent + (closing ? 0 : config.indentUnit);\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-rsrc\", \"r\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/rpm/changes/changes.js",
    "content": "CodeMirror.defineMode(\"changes\", function(config, modeConfig) {\n  var headerSeperator = /^-+$/;\n  var headerLine = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)  ?\\d{1,2} \\d{2}:\\d{2}(:\\d{2})? [A-Z]{3,4} \\d{4} - /;\n  var simpleEmail = /^[\\w+.-]+@[\\w.-]+/;\n\n  return {\n    token: function(stream) {\n      if (stream.sol()) {\n        if (stream.match(headerSeperator)) { return 'tag'; }\n        if (stream.match(headerLine)) { return 'tag'; }\n      }\n      if (stream.match(simpleEmail)) { return 'string'; }\n      stream.next();\n      return null;\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-rpm-changes\", \"changes\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/rpm/changes/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: RPM changes mode</title>\n    <link rel=\"stylesheet\" href=\"../../../lib/codemirror.css\">\n    <script src=\"../../../lib/codemirror.js\"></script>\n    <script src=\"changes.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../../doc/docs.css\">\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n  </head>\n  <body>\n    <h1>CodeMirror: RPM changes mode</h1>\n    \n    <div><textarea id=\"code\" name=\"code\">\n-------------------------------------------------------------------\nTue Oct 18 13:58:40 UTC 2011 - misterx@example.com\n\n- Update to r60.3\n- Fixes bug in the reflect package\n  * disallow Interface method on Value obtained via unexported name\n\n-------------------------------------------------------------------\nThu Oct  6 08:14:24 UTC 2011 - misterx@example.com\n\n- Update to r60.2\n- Fixes memory leak in certain map types\n\n-------------------------------------------------------------------\nWed Oct  5 14:34:10 UTC 2011 - misterx@example.com\n\n- Tweaks for gdb debugging\n- go.spec changes:\n  - move %go_arch definition to %prep section\n  - pass correct location of go specific gdb pretty printer and\n    functions to cpp as HOST_EXTRA_CFLAGS macro\n  - install go gdb functions & printer\n- gdb-printer.patch\n  - patch linker (src/cmd/ld/dwarf.c) to emit correct location of go\n    gdb functions and pretty printer\n</textarea></div>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: {name: \"changes\"},\n        lineNumbers: true,\n        indentUnit: 4,\n        tabMode: \"shift\",\n        matchBrackets: true\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-rpm-changes</code>.</p>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/rpm/spec/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: RPM spec mode</title>\n    <link rel=\"stylesheet\" href=\"../../../lib/codemirror.css\">\n    <script src=\"../../../lib/codemirror.js\"></script>\n    <script src=\"spec.js\"></script>\n    <link rel=\"stylesheet\" href=\"spec.css\">\n    <link rel=\"stylesheet\" href=\"../../../doc/docs.css\">\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n  </head>\n  <body>\n    <h1>CodeMirror: RPM spec mode</h1>\n    \n    <div><textarea id=\"code\" name=\"code\">\n#\n# spec file for package minidlna\n#\n# Copyright (c) 2011, Sascha Peilicke <saschpe@gmx.de>\n#\n# All modifications and additions to the file contributed by third parties\n# remain the property of their copyright owners, unless otherwise agreed\n# upon. The license for this file, and modifications and additions to the\n# file, is the same license as for the pristine package itself (unless the\n# license for the pristine package is not an Open Source License, in which\n# case the license is the MIT License). An \"Open Source License\" is a\n# license that conforms to the Open Source Definition (Version 1.9)\n# published by the Open Source Initiative.\n\n\nName:           libupnp6\nVersion:        1.6.13\nRelease:        0\nSummary:        Portable Universal Plug and Play (UPnP) SDK\nGroup:          System/Libraries\nLicense:        BSD-3-Clause\nUrl:            http://sourceforge.net/projects/pupnp/\nSource0:        http://downloads.sourceforge.net/pupnp/libupnp-%{version}.tar.bz2\nBuildRoot:      %{_tmppath}/%{name}-%{version}-build\n\n%description\nThe portable Universal Plug and Play (UPnP) SDK provides support for building\nUPnP-compliant control points, devices, and bridges on several operating\nsystems.\n\n%package -n libupnp-devel\nSummary:        Portable Universal Plug and Play (UPnP) SDK\nGroup:          Development/Libraries/C and C++\nProvides:       pkgconfig(libupnp)\nRequires:       %{name} = %{version}\n\n%description -n libupnp-devel\nThe portable Universal Plug and Play (UPnP) SDK provides support for building\nUPnP-compliant control points, devices, and bridges on several operating\nsystems.\n\n%prep\n%setup -n libupnp-%{version}\n\n%build\n%configure --disable-static\nmake %{?_smp_mflags}\n\n%install\n%makeinstall\nfind %{buildroot} -type f -name '*.la' -exec rm -f {} ';'\n\n%post -p /sbin/ldconfig\n\n%postun -p /sbin/ldconfig\n\n%files\n%defattr(-,root,root,-)\n%doc ChangeLog NEWS README TODO\n%{_libdir}/libixml.so.*\n%{_libdir}/libthreadutil.so.*\n%{_libdir}/libupnp.so.*\n\n%files -n libupnp-devel\n%defattr(-,root,root,-)\n%{_libdir}/pkgconfig/libupnp.pc\n%{_libdir}/libixml.so\n%{_libdir}/libthreadutil.so\n%{_libdir}/libupnp.so\n%{_includedir}/upnp/\n\n%changelog</textarea></div>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: {name: \"spec\"},\n        lineNumbers: true,\n        indentUnit: 4,\n        matchBrackets: true\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-rpm-spec</code>.</p>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/rpm/spec/spec.css",
    "content": ".cm-s-default span.cm-preamble {color: #b26818; font-weight: bold;}\n.cm-s-default span.cm-macro {color: #b218b2;}\n.cm-s-default span.cm-section {color: green; font-weight: bold;}\n.cm-s-default span.cm-script {color: red;}\n.cm-s-default span.cm-issue {color: yellow;}\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/rpm/spec/spec.js",
    "content": "// Quick and dirty spec file highlighting\n\nCodeMirror.defineMode(\"spec\", function(config, modeConfig) {\n  var arch = /^(i386|i586|i686|x86_64|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/;\n\n  var preamble = /^(Name|Version|Release|License|Summary|Url|Group|Source|BuildArch|BuildRequires|BuildRoot|AutoReqProv|Provides|Requires(\\(\\w+\\))?|Obsoletes|Conflicts|Recommends|Source\\d*|Patch\\d*|ExclusiveArch|NoSource|Supplements):/;\n  var section = /^%(debug_package|package|description|prep|build|install|files|clean|changelog|preun|postun|pre|post|triggerin|triggerun|pretrans|posttrans|verifyscript|check|triggerpostun|triggerprein|trigger)/;\n  var control_flow_complex = /^%(ifnarch|ifarch|if)/; // rpm control flow macros\n  var control_flow_simple = /^%(else|endif)/; // rpm control flow macros\n  var operators = /^(\\!|\\?|\\<\\=|\\<|\\>\\=|\\>|\\=\\=|\\&\\&|\\|\\|)/; // operators in control flow macros\n\n  return {\n    startState: function () {\n        return {\n          controlFlow: false,\n          macroParameters: false,\n          section: false\n        };\n    },\n    token: function (stream, state) {\n      var ch = stream.peek();\n      if (ch == \"#\") { stream.skipToEnd(); return \"comment\"; }\n\n      if (stream.sol()) {\n        if (stream.match(preamble)) { return \"preamble\"; }\n        if (stream.match(section)) { return \"section\"; }\n      }\n\n      if (stream.match(/^\\$\\w+/)) { return \"def\"; } // Variables like '$RPM_BUILD_ROOT'\n      if (stream.match(/^\\$\\{\\w+\\}/)) { return \"def\"; } // Variables like '${RPM_BUILD_ROOT}'\n\n      if (stream.match(control_flow_simple)) { return \"keyword\"; }\n      if (stream.match(control_flow_complex)) {\n        state.controlFlow = true;\n        return \"keyword\";\n      }\n      if (state.controlFlow) {\n        if (stream.match(operators)) { return \"operator\"; }\n        if (stream.match(/^(\\d+)/)) { return \"number\"; }\n        if (stream.eol()) { state.controlFlow = false; }\n      }\n\n      if (stream.match(arch)) { return \"number\"; }\n\n      // Macros like '%make_install' or '%attr(0775,root,root)'\n      if (stream.match(/^%[\\w]+/)) {\n        if (stream.match(/^\\(/)) { state.macroParameters = true; }\n        return \"macro\";\n      }\n      if (state.macroParameters) {\n        if (stream.match(/^\\d+/)) { return \"number\";}\n        if (stream.match(/^\\)/)) {\n          state.macroParameters = false;\n          return \"macro\";\n        }\n      }\n      if (stream.match(/^%\\{\\??[\\w \\-]+\\}/)) { return \"macro\"; } // Macros like '%{defined fedora}'\n\n      //TODO: Include bash script sub-parser (CodeMirror supports that)\n      stream.next();\n      return null;\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-rpm-spec\", \"spec\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/rst/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: reStructuredText mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"rst.js\"></script>\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: reStructuredText mode</h1>\n\n<form><textarea id=\"code\" name=\"code\">\n.. This is an excerpt from Sphinx documentation: http://sphinx.pocoo.org/_sources/rest.txt\n\n.. highlightlang:: rest\n\n.. _rst-primer:\n\nreStructuredText Primer\n=======================\n\nThis section is a brief introduction to reStructuredText (reST) concepts and\nsyntax, intended to provide authors with enough information to author documents\nproductively.  Since reST was designed to be a simple, unobtrusive markup\nlanguage, this will not take too long.\n\n.. seealso::\n\n   The authoritative `reStructuredText User Documentation\n   &lt;http://docutils.sourceforge.net/rst.html&gt;`_.  The \"ref\" links in this\n   document link to the description of the individual constructs in the reST\n   reference.\n\n\nParagraphs\n----------\n\nThe paragraph (:duref:`ref &lt;paragraphs&gt;`) is the most basic block in a reST\ndocument.  Paragraphs are simply chunks of text separated by one or more blank\nlines.  As in Python, indentation is significant in reST, so all lines of the\nsame paragraph must be left-aligned to the same level of indentation.\n\n\n.. _inlinemarkup:\n\nInline markup\n-------------\n\nThe standard reST inline markup is quite simple: use\n\n* one asterisk: ``*text*`` for emphasis (italics),\n* two asterisks: ``**text**`` for strong emphasis (boldface), and\n* backquotes: ````text```` for code samples.\n\nIf asterisks or backquotes appear in running text and could be confused with\ninline markup delimiters, they have to be escaped with a backslash.\n\nBe aware of some restrictions of this markup:\n\n* it may not be nested,\n* content may not start or end with whitespace: ``* text*`` is wrong,\n* it must be separated from surrounding text by non-word characters.  Use a\n  backslash escaped space to work around that: ``thisis\\ *one*\\ word``.\n\nThese restrictions may be lifted in future versions of the docutils.\n\nreST also allows for custom \"interpreted text roles\"', which signify that the\nenclosed text should be interpreted in a specific way.  Sphinx uses this to\nprovide semantic markup and cross-referencing of identifiers, as described in\nthe appropriate section.  The general syntax is ``:rolename:`content```.\n\nStandard reST provides the following roles:\n\n* :durole:`emphasis` -- alternate spelling for ``*emphasis*``\n* :durole:`strong` -- alternate spelling for ``**strong**``\n* :durole:`literal` -- alternate spelling for ````literal````\n* :durole:`subscript` -- subscript text\n* :durole:`superscript` -- superscript text\n* :durole:`title-reference` -- for titles of books, periodicals, and other\n  materials\n\nSee :ref:`inline-markup` for roles added by Sphinx.\n\n\nLists and Quote-like blocks\n---------------------------\n\nList markup (:duref:`ref &lt;bullet-lists&gt;`) is natural: just place an asterisk at\nthe start of a paragraph and indent properly.  The same goes for numbered lists;\nthey can also be autonumbered using a ``#`` sign::\n\n   * This is a bulleted list.\n   * It has two items, the second\n     item uses two lines.\n\n   1. This is a numbered list.\n   2. It has two items too.\n\n   #. This is a numbered list.\n   #. It has two items too.\n\n\nNested lists are possible, but be aware that they must be separated from the\nparent list items by blank lines::\n\n   * this is\n   * a list\n\n     * with a nested list\n     * and some subitems\n\n   * and here the parent list continues\n\nDefinition lists (:duref:`ref &lt;definition-lists&gt;`) are created as follows::\n\n   term (up to a line of text)\n      Definition of the term, which must be indented\n\n      and can even consist of multiple paragraphs\n\n   next term\n      Description.\n\nNote that the term cannot have more than one line of text.\n\nQuoted paragraphs (:duref:`ref &lt;block-quotes&gt;`) are created by just indenting\nthem more than the surrounding paragraphs.\n\nLine blocks (:duref:`ref &lt;line-blocks&gt;`) are a way of preserving line breaks::\n\n   | These lines are\n   | broken exactly like in\n   | the source file.\n\nThere are also several more special blocks available:\n\n* field lists (:duref:`ref &lt;field-lists&gt;`)\n* option lists (:duref:`ref &lt;option-lists&gt;`)\n* quoted literal blocks (:duref:`ref &lt;quoted-literal-blocks&gt;`)\n* doctest blocks (:duref:`ref &lt;doctest-blocks&gt;`)\n\n\nSource Code\n-----------\n\nLiteral code blocks (:duref:`ref &lt;literal-blocks&gt;`) are introduced by ending a\nparagraph with the special marker ``::``.  The literal block must be indented\n(and, like all paragraphs, separated from the surrounding ones by blank lines)::\n\n   This is a normal text paragraph. The next paragraph is a code sample::\n\n      It is not processed in any way, except\n      that the indentation is removed.\n\n      It can span multiple lines.\n\n   This is a normal text paragraph again.\n\nThe handling of the ``::`` marker is smart:\n\n* If it occurs as a paragraph of its own, that paragraph is completely left\n  out of the document.\n* If it is preceded by whitespace, the marker is removed.\n* If it is preceded by non-whitespace, the marker is replaced by a single\n  colon.\n\nThat way, the second sentence in the above example's first paragraph would be\nrendered as \"The next paragraph is a code sample:\".\n\n\n.. _rst-tables:\n\nTables\n------\n\nTwo forms of tables are supported.  For *grid tables* (:duref:`ref\n&lt;grid-tables&gt;`), you have to \"paint\" the cell grid yourself.  They look like\nthis::\n\n   +------------------------+------------+----------+----------+\n   | Header row, column 1   | Header 2   | Header 3 | Header 4 |\n   | (header rows optional) |            |          |          |\n   +========================+============+==========+==========+\n   | body row 1, column 1   | column 2   | column 3 | column 4 |\n   +------------------------+------------+----------+----------+\n   | body row 2             | ...        | ...      |          |\n   +------------------------+------------+----------+----------+\n\n*Simple tables* (:duref:`ref &lt;simple-tables&gt;`) are easier to write, but\nlimited: they must contain more than one row, and the first column cannot\ncontain multiple lines.  They look like this::\n\n   =====  =====  =======\n   A      B      A and B\n   =====  =====  =======\n   False  False  False\n   True   False  False\n   False  True   False\n   True   True   True\n   =====  =====  =======\n\n\nHyperlinks\n----------\n\nExternal links\n^^^^^^^^^^^^^^\n\nUse ```Link text &lt;http://example.com/&gt;`_`` for inline web links.  If the link\ntext should be the web address, you don't need special markup at all, the parser\nfinds links and mail addresses in ordinary text.\n\nYou can also separate the link and the target definition (:duref:`ref\n&lt;hyperlink-targets&gt;`), like this::\n\n   This is a paragraph that contains `a link`_.\n\n   .. _a link: http://example.com/\n\n\nInternal links\n^^^^^^^^^^^^^^\n\nInternal linking is done via a special reST role provided by Sphinx, see the\nsection on specific markup, :ref:`ref-role`.\n\n\nSections\n--------\n\nSection headers (:duref:`ref &lt;sections&gt;`) are created by underlining (and\noptionally overlining) the section title with a punctuation character, at least\nas long as the text::\n\n   =================\n   This is a heading\n   =================\n\nNormally, there are no heading levels assigned to certain characters as the\nstructure is determined from the succession of headings.  However, for the\nPython documentation, this convention is used which you may follow:\n\n* ``#`` with overline, for parts\n* ``*`` with overline, for chapters\n* ``=``, for sections\n* ``-``, for subsections\n* ``^``, for subsubsections\n* ``\"``, for paragraphs\n\nOf course, you are free to use your own marker characters (see the reST\ndocumentation), and use a deeper nesting level, but keep in mind that most\ntarget formats (HTML, LaTeX) have a limited supported nesting depth.\n\n\nExplicit Markup\n---------------\n\n\"Explicit markup\" (:duref:`ref &lt;explicit-markup-blocks&gt;`) is used in reST for\nmost constructs that need special handling, such as footnotes,\nspecially-highlighted paragraphs, comments, and generic directives.\n\nAn explicit markup block begins with a line starting with ``..`` followed by\nwhitespace and is terminated by the next paragraph at the same level of\nindentation.  (There needs to be a blank line between explicit markup and normal\nparagraphs.  This may all sound a bit complicated, but it is intuitive enough\nwhen you write it.)\n\n\n.. _directives:\n\nDirectives\n----------\n\nA directive (:duref:`ref &lt;directives&gt;`) is a generic block of explicit markup.\nBesides roles, it is one of the extension mechanisms of reST, and Sphinx makes\nheavy use of it.\n\nDocutils supports the following directives:\n\n* Admonitions: :dudir:`attention`, :dudir:`caution`, :dudir:`danger`,\n  :dudir:`error`, :dudir:`hint`, :dudir:`important`, :dudir:`note`,\n  :dudir:`tip`, :dudir:`warning` and the generic :dudir:`admonition`.\n  (Most themes style only \"note\" and \"warning\" specially.)\n\n* Images:\n\n  - :dudir:`image` (see also Images_ below)\n  - :dudir:`figure` (an image with caption and optional legend)\n\n* Additional body elements:\n\n  - :dudir:`contents` (a local, i.e. for the current file only, table of\n    contents)\n  - :dudir:`container` (a container with a custom class, useful to generate an\n    outer ``&lt;div&gt;`` in HTML)\n  - :dudir:`rubric` (a heading without relation to the document sectioning)\n  - :dudir:`topic`, :dudir:`sidebar` (special highlighted body elements)\n  - :dudir:`parsed-literal` (literal block that supports inline markup)\n  - :dudir:`epigraph` (a block quote with optional attribution line)\n  - :dudir:`highlights`, :dudir:`pull-quote` (block quotes with their own\n    class attribute)\n  - :dudir:`compound` (a compound paragraph)\n\n* Special tables:\n\n  - :dudir:`table` (a table with title)\n  - :dudir:`csv-table` (a table generated from comma-separated values)\n  - :dudir:`list-table` (a table generated from a list of lists)\n\n* Special directives:\n\n  - :dudir:`raw` (include raw target-format markup)\n  - :dudir:`include` (include reStructuredText from another file)\n    -- in Sphinx, when given an absolute include file path, this directive takes\n    it as relative to the source directory\n  - :dudir:`class` (assign a class attribute to the next element) [1]_\n\n* HTML specifics:\n\n  - :dudir:`meta` (generation of HTML ``&lt;meta&gt;`` tags)\n  - :dudir:`title` (override document title)\n\n* Influencing markup:\n\n  - :dudir:`default-role` (set a new default role)\n  - :dudir:`role` (create a new role)\n\n  Since these are only per-file, better use Sphinx' facilities for setting the\n  :confval:`default_role`.\n\nDo *not* use the directives :dudir:`sectnum`, :dudir:`header` and\n:dudir:`footer`.\n\nDirectives added by Sphinx are described in :ref:`sphinxmarkup`.\n\nBasically, a directive consists of a name, arguments, options and content. (Keep\nthis terminology in mind, it is used in the next chapter describing custom\ndirectives.)  Looking at this example, ::\n\n   .. function:: foo(x)\n                 foo(y, z)\n      :module: some.module.name\n\n      Return a line of text input from the user.\n\n``function`` is the directive name.  It is given two arguments here, the\nremainder of the first line and the second line, as well as one option\n``module`` (as you can see, options are given in the lines immediately following\nthe arguments and indicated by the colons).  Options must be indented to the\nsame level as the directive content.\n\nThe directive content follows after a blank line and is indented relative to the\ndirective start.\n\n\nImages\n------\n\nreST supports an image directive (:dudir:`ref &lt;image&gt;`), used like so::\n\n   .. image:: gnu.png\n      (options)\n\nWhen used within Sphinx, the file name given (here ``gnu.png``) must either be\nrelative to the source file, or absolute which means that they are relative to\nthe top source directory.  For example, the file ``sketch/spam.rst`` could refer\nto the image ``images/spam.png`` as ``../images/spam.png`` or\n``/images/spam.png``.\n\nSphinx will automatically copy image files over to a subdirectory of the output\ndirectory on building (e.g. the ``_static`` directory for HTML output.)\n\nInterpretation of image size options (``width`` and ``height``) is as follows:\nif the size has no unit or the unit is pixels, the given size will only be\nrespected for output channels that support pixels (i.e. not in LaTeX output).\nOther units (like ``pt`` for points) will be used for HTML and LaTeX output.\n\nSphinx extends the standard docutils behavior by allowing an asterisk for the\nextension::\n\n   .. image:: gnu.*\n\nSphinx then searches for all images matching the provided pattern and determines\ntheir type.  Each builder then chooses the best image out of these candidates.\nFor instance, if the file name ``gnu.*`` was given and two files :file:`gnu.pdf`\nand :file:`gnu.png` existed in the source tree, the LaTeX builder would choose\nthe former, while the HTML builder would prefer the latter.\n\n.. versionchanged:: 0.4\n   Added the support for file names ending in an asterisk.\n\n.. versionchanged:: 0.6\n   Image paths can now be absolute.\n\n\nFootnotes\n---------\n\nFor footnotes (:duref:`ref &lt;footnotes&gt;`), use ``[#name]_`` to mark the footnote\nlocation, and add the footnote body at the bottom of the document after a\n\"Footnotes\" rubric heading, like so::\n\n   Lorem ipsum [#f1]_ dolor sit amet ... [#f2]_\n\n   .. rubric:: Footnotes\n\n   .. [#f1] Text of the first footnote.\n   .. [#f2] Text of the second footnote.\n\nYou can also explicitly number the footnotes (``[1]_``) or use auto-numbered\nfootnotes without names (``[#]_``).\n\n\nCitations\n---------\n\nStandard reST citations (:duref:`ref &lt;citations&gt;`) are supported, with the\nadditional feature that they are \"global\", i.e. all citations can be referenced\nfrom all files.  Use them like so::\n\n   Lorem ipsum [Ref]_ dolor sit amet.\n\n   .. [Ref] Book or article reference, URL or whatever.\n\nCitation usage is similar to footnote usage, but with a label that is not\nnumeric or begins with ``#``.\n\n\nSubstitutions\n-------------\n\nreST supports \"substitutions\" (:duref:`ref &lt;substitution-definitions&gt;`), which\nare pieces of text and/or markup referred to in the text by ``|name|``.  They\nare defined like footnotes with explicit markup blocks, like this::\n\n   .. |name| replace:: replacement *text*\n\nor this::\n\n   .. |caution| image:: warning.png\n                :alt: Warning!\n\nSee the :duref:`reST reference for substitutions &lt;substitution-definitions&gt;`\nfor details.\n\nIf you want to use some substitutions for all documents, put them into\n:confval:`rst_prolog` or put them into a separate file and include it into all\ndocuments you want to use them in, using the :rst:dir:`include` directive.  (Be\nsure to give the include file a file name extension differing from that of other\nsource files, to avoid Sphinx finding it as a standalone document.)\n\nSphinx defines some default substitutions, see :ref:`default-substitutions`.\n\n\nComments\n--------\n\nEvery explicit markup block which isn't a valid markup construct (like the\nfootnotes above) is regarded as a comment (:duref:`ref &lt;comments&gt;`).  For\nexample::\n\n   .. This is a comment.\n\nYou can indent text after a comment start to form multiline comments::\n\n   ..\n      This whole indented block\n      is a comment.\n\n      Still in the comment.\n\n\nSource encoding\n---------------\n\nSince the easiest way to include special characters like em dashes or copyright\nsigns in reST is to directly write them as Unicode characters, one has to\nspecify an encoding.  Sphinx assumes source files to be encoded in UTF-8 by\ndefault; you can change this with the :confval:`source_encoding` config value.\n\n\nGotchas\n-------\n\nThere are some problems one commonly runs into while authoring reST documents:\n\n* **Separation of inline markup:** As said above, inline markup spans must be\n  separated from the surrounding text by non-word characters, you have to use a\n  backslash-escaped space to get around that.  See `the reference\n  &lt;http://docutils.sf.net/docs/ref/rst/restructuredtext.html#inline-markup&gt;`_\n  for the details.\n\n* **No nested inline markup:** Something like ``*see :func:`foo`*`` is not\n  possible.\n\n\n.. rubric:: Footnotes\n\n.. [1] When the default domain contains a :rst:dir:`class` directive, this directive\n       will be shadowed.  Therefore, Sphinx re-exports it as :rst:dir:`rst-class`.\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n      });\n    </script>\n    <p>The reStructuredText mode supports one configuration parameter:</p>\n    <dl>\n      <dt><code>verbatim (string)</code></dt>\n      <dd>A name or MIME type of a mode that will be used for highlighting\n      verbatim blocks. By default, reStructuredText mode uses uniform color\n      for whole block of verbatim text if no mode is given.</dd>\n    </dl>\n    <p>If <code>python</code> mode is available,\n    it will be used for highlighting blocks containing Python/IPython terminal\n    sessions (blocks starting with <code>&gt;&gt;&gt;</code> (for Python) or\n    <code>In [num]:</code> (for IPython).\n\n    <p><strong>MIME types defined:</strong> <code>text/x-rst</code>.</p>\n  </body>\n</html>\n\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/rst/rst.js",
    "content": "CodeMirror.defineMode('rst', function(config, options) {\n    function setState(state, fn, ctx) {\n        state.fn = fn;\n        setCtx(state, ctx);\n    }\n\n    function setCtx(state, ctx) {\n        state.ctx = ctx || {};\n    }\n\n    function setNormal(state, ch) {\n        if (ch && (typeof ch !== 'string')) {\n            var str = ch.current();\n            ch = str[str.length-1];\n        }\n\n        setState(state, normal, {back: ch});\n    }\n\n    function hasMode(mode) {\n        if (mode) {\n            var modes = CodeMirror.listModes();\n\n            for (var i in modes) {\n                if (modes[i] == mode) {\n                    return true;\n                }\n            }\n        }\n\n        return false;\n    }\n\n    function getMode(mode) {\n        if (hasMode(mode)) {\n            return CodeMirror.getMode(config, mode);\n        } else {\n            return null;\n        }\n    }\n\n    var verbatimMode = getMode(options.verbatim);\n    var pythonMode = getMode('python');\n\n    var reSection = /^[!\"#$%&'()*+,-./:;<=>?@[\\\\\\]^_`{|}~]/;\n    var reDirective = /^\\s*\\w([-:.\\w]*\\w)?::(\\s|$)/;\n    var reHyperlink = /^\\s*_[\\w-]+:(\\s|$)/;\n    var reFootnote = /^\\s*\\[(\\d+|#)\\](\\s|$)/;\n    var reCitation = /^\\s*\\[[A-Za-z][\\w-]*\\](\\s|$)/;\n    var reFootnoteRef = /^\\[(\\d+|#)\\]_/;\n    var reCitationRef = /^\\[[A-Za-z][\\w-]*\\]_/;\n    var reDirectiveMarker = /^\\.\\.(\\s|$)/;\n    var reVerbatimMarker = /^::\\s*$/;\n    var rePreInline = /^[-\\s\"([{</:]/;\n    var rePostInline = /^[-\\s`'\")\\]}>/:.,;!?\\\\_]/;\n    var reEnumeratedList = /^\\s*((\\d+|[A-Za-z#])[.)]|\\((\\d+|[A-Z-a-z#])\\))\\s/;\n    var reBulletedList = /^\\s*[-\\+\\*]\\s/;\n    var reExamples = /^\\s+(>>>|In \\[\\d+\\]:)\\s/;\n\n    function normal(stream, state) {\n        var ch, sol, i;\n\n        if (stream.eat(/\\\\/)) {\n            ch = stream.next();\n            setNormal(state, ch);\n            return null;\n        }\n\n        sol = stream.sol();\n\n        if (sol && (ch = stream.eat(reSection))) {\n            for (i = 0; stream.eat(ch); i++);\n\n            if (i >= 3 && stream.match(/^\\s*$/)) {\n                setNormal(state, null);\n                return 'header';\n            } else {\n                stream.backUp(i + 1);\n            }\n        }\n\n        if (sol && stream.match(reDirectiveMarker)) {\n            if (!stream.eol()) {\n                setState(state, directive);\n            }\n            return 'meta';\n        }\n\n        if (stream.match(reVerbatimMarker)) {\n            if (!verbatimMode) {\n                setState(state, verbatim);\n            } else {\n                var mode = verbatimMode;\n\n                setState(state, verbatim, {\n                    mode: mode,\n                    local: mode.startState()\n                });\n            }\n            return 'meta';\n        }\n\n        if (sol && stream.match(reExamples, false)) {\n            if (!pythonMode) {\n                setState(state, verbatim);\n                return 'meta';\n            } else {\n                var mode = pythonMode;\n\n                setState(state, verbatim, {\n                    mode: mode,\n                    local: mode.startState()\n                });\n\n                return null;\n            }\n        }\n\n        function testBackward(re) {\n            return sol || !state.ctx.back || re.test(state.ctx.back);\n        }\n\n        function testForward(re) {\n            return stream.eol() || stream.match(re, false);\n        }\n\n        function testInline(re) {\n            return stream.match(re) && testBackward(/\\W/) && testForward(/\\W/);\n        }\n\n        if (testInline(reFootnoteRef)) {\n            setNormal(state, stream);\n            return 'footnote';\n        }\n\n        if (testInline(reCitationRef)) {\n            setNormal(state, stream);\n            return 'citation';\n        }\n\n        ch = stream.next();\n\n        if (testBackward(rePreInline)) {\n            if ((ch === ':' || ch === '|') && stream.eat(/\\S/)) {\n                var token;\n\n                if (ch === ':') {\n                    token = 'builtin';\n                } else {\n                    token = 'atom';\n                }\n\n                setState(state, inline, {\n                    ch: ch,\n                    wide: false,\n                    prev: null,\n                    token: token\n                });\n\n                return token;\n            }\n\n            if (ch === '*' || ch === '`') {\n                var orig = ch,\n                    wide = false;\n\n                ch = stream.next();\n\n                if (ch == orig) {\n                    wide = true;\n                    ch = stream.next();\n                }\n\n                if (ch && !/\\s/.test(ch)) {\n                    var token;\n\n                    if (orig === '*') {\n                        token = wide ? 'strong' : 'em';\n                    } else {\n                        token = wide ? 'string' : 'string-2';\n                    }\n\n                    setState(state, inline, {\n                        ch: orig,               // inline() has to know what to search for\n                        wide: wide,             // are we looking for `ch` or `chch`\n                        prev: null,             // terminator must not be preceeded with whitespace\n                        token: token            // I don't want to recompute this all the time\n                    });\n\n                    return token;\n                }\n            }\n        }\n\n        setNormal(state, ch);\n        return null;\n    }\n\n    function inline(stream, state) {\n        var ch = stream.next(),\n            token = state.ctx.token;\n\n        function finish(ch) {\n            state.ctx.prev = ch;\n            return token;\n        }\n\n        if (ch != state.ctx.ch) {\n            return finish(ch);\n        }\n\n        if (/\\s/.test(state.ctx.prev)) {\n            return finish(ch);\n        }\n\n        if (state.ctx.wide) {\n            ch = stream.next();\n\n            if (ch != state.ctx.ch) {\n                return finish(ch);\n            }\n        }\n\n        if (!stream.eol() && !rePostInline.test(stream.peek())) {\n            if (state.ctx.wide) {\n                stream.backUp(1);\n            }\n\n            return finish(ch);\n        }\n\n        setState(state, normal);\n        setNormal(state, ch);\n\n        return token;\n    }\n\n    function directive(stream, state) {\n        var token = null;\n\n        if (stream.match(reDirective)) {\n            token = 'attribute';\n        } else if (stream.match(reHyperlink)) {\n            token = 'link';\n        } else if (stream.match(reFootnote)) {\n            token = 'quote';\n        } else if (stream.match(reCitation)) {\n            token = 'quote';\n        } else {\n            stream.eatSpace();\n\n            if (stream.eol()) {\n                setNormal(state, stream);\n                return null;\n            } else {\n                stream.skipToEnd();\n                setState(state, comment);\n                return 'comment';\n            }\n        }\n\n        // FIXME this is unreachable\n        setState(state, body, {start: true});\n        return token;\n    }\n\n    function body(stream, state) {\n        var token = 'body';\n\n        if (!state.ctx.start || stream.sol()) {\n            return block(stream, state, token);\n        }\n\n        stream.skipToEnd();\n        setCtx(state);\n\n        return token;\n    }\n\n    function comment(stream, state) {\n        return block(stream, state, 'comment');\n    }\n\n    function verbatim(stream, state) {\n        if (!verbatimMode) {\n            return block(stream, state, 'meta');\n        } else {\n            if (stream.sol()) {\n                if (!stream.eatSpace()) {\n                    setNormal(state, stream);\n                }\n\n                return null;\n            }\n\n            return verbatimMode.token(stream, state.ctx.local);\n        }\n    }\n\n    function block(stream, state, token) {\n        if (stream.eol() || stream.eatSpace()) {\n            stream.skipToEnd();\n            return token;\n        } else {\n            setNormal(state, stream);\n            return null;\n        }\n    }\n\n    return {\n        startState: function() {\n            return {fn: normal, ctx: {}};\n        },\n\n        copyState: function(state) {\n            return {fn: state.fn, ctx: state.ctx};\n        },\n\n        token: function(stream, state) {\n            var token = state.fn(stream, state);\n            return token;\n        }\n    };\n}, \"python\");\n\nCodeMirror.defineMIME(\"text/x-rst\", \"rst\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/ruby/LICENSE",
    "content": "Copyright (c) 2011, Ubalo, Inc.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n    * Redistributions of source code must retain the above copyright\n      notice, this list of conditions and the following disclaimer.\n    * Redistributions in binary form must reproduce the above copyright\n      notice, this list of conditions and the following disclaimer in the\n      documentation and/or other materials provided with the distribution.\n    * Neither the name of the Ubalo, Inc. nor the names of its\n      contributors may be used to endorse or promote products derived\n      from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL UBALO, INC BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/ruby/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Ruby mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"ruby.js\"></script>\n    <style>\n      .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}\n      .cm-s-default span.cm-arrow { color: red; }\n    </style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: Ruby mode</h1>\n    <form><textarea id=\"code\" name=\"code\">\n# Code from http://sandbox.mc.edu/~bennet/ruby/code/poly_rb.html\n#\n# This program evaluates polynomials.  It first asks for the coefficients\n# of a polynomial, which must be entered on one line, highest-order first.\n# It then requests values of x and will compute the value of the poly for\n# each x.  It will repeatly ask for x values, unless you the user enters\n# a blank line.  It that case, it will ask for another polynomial.  If the\n# user types quit for either input, the program immediately exits.\n#\n\n#\n# Function to evaluate a polynomial at x.  The polynomial is given\n# as a list of coefficients, from the greatest to the least.\ndef polyval(x, coef)\n    sum = 0\n    coef = coef.clone           # Don't want to destroy the original\n    while true\n        sum += coef.shift       # Add and remove the next coef\n        break if coef.empty?    # If no more, done entirely.\n        sum *= x                # This happens the right number of times.\n    end\n    return sum\nend\n\n#\n# Function to read a line containing a list of integers and return\n# them as an array of integers.  If the string conversion fails, it\n# throws TypeError.  If the input line is the word 'quit', then it\n# converts it to an end-of-file exception\ndef readints(prompt)\n    # Read a line\n    print prompt\n    line = readline.chomp\n    raise EOFError.new if line == 'quit' # You can also use a real EOF.\n            \n    # Go through each item on the line, converting each one and adding it\n    # to retval.\n    retval = [ ]\n    for str in line.split(/\\s+/)\n        if str =~ /^\\-?\\d+$/\n            retval.push(str.to_i)\n        else\n            raise TypeError.new\n        end\n    end\n\n    return retval\nend\n\n#\n# Take a coeff and an exponent and return the string representation, ignoring\n# the sign of the coefficient.\ndef term_to_str(coef, exp)\n    ret = \"\"\n\n    # Show coeff, unless it's 1 or at the right\n    coef = coef.abs\n    ret = coef.to_s     unless coef == 1 && exp > 0\n    ret += \"x\" if exp > 0                               # x if exponent not 0\n    ret += \"^\" + exp.to_s if exp > 1                    # ^exponent, if > 1.\n\n    return ret\nend\n\n#\n# Create a string of the polynomial in sort-of-readable form.\ndef polystr(p)\n    # Get the exponent of first coefficient, plus 1.\n    exp = p.length\n\n    # Assign exponents to each term, making pairs of coeff and exponent,\n    # Then get rid of the zero terms.\n    p = (p.map { |c| exp -= 1; [ c, exp ] }).select { |p| p[0] != 0 }\n\n    # If there's nothing left, it's a zero\n    return \"0\" if p.empty?\n\n    # *** Now p is a non-empty list of [ coef, exponent ] pairs. ***\n\n    # Convert the first term, preceded by a \"-\" if it's negative.\n    result = (if p[0][0] < 0 then \"-\" else \"\" end) + term_to_str(*p[0])\n\n    # Convert the rest of the terms, in each case adding the appropriate\n    # + or - separating them.  \n    for term in p[1...p.length]\n        # Add the separator then the rep. of the term.\n        result += (if term[0] < 0 then \" - \" else \" + \" end) + \n                term_to_str(*term)\n    end\n\n    return result\nend\n        \n#\n# Run until some kind of endfile.\nbegin\n    # Repeat until an exception or quit gets us out.\n    while true\n        # Read a poly until it works.  An EOF will except out of the\n        # program.\n        print \"\\n\"\n        begin\n            poly = readints(\"Enter a polynomial coefficients: \")\n        rescue TypeError\n            print \"Try again.\\n\"\n            retry\n        end\n        break if poly.empty?\n\n        # Read and evaluate x values until the user types a blank line.\n        # Again, an EOF will except out of the pgm.\n        while true\n            # Request an integer.\n            print \"Enter x value or blank line: \"\n            x = readline.chomp\n            break if x == ''\n            raise EOFError.new if x == 'quit'\n\n            # If it looks bad, let's try again.\n            if x !~ /^\\-?\\d+$/\n                print \"That doesn't look like an integer.  Please try again.\\n\"\n                next\n            end\n\n            # Convert to an integer and print the result.\n            x = x.to_i\n            print \"p(x) = \", polystr(poly), \"\\n\"\n            print \"p(\", x, \") = \", polyval(x, poly), \"\\n\"\n        end\n    end\nrescue EOFError\n    print \"\\n=== EOF ===\\n\"\nrescue Interrupt, SignalException\n    print \"\\n=== Interrupted ===\\n\"\nelse\n    print \"--- Bye ---\\n\"\nend\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: \"text/x-ruby\",\n        tabMode: \"indent\",\n        matchBrackets: true,\n        indentUnit: 4\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-ruby</code>.</p>\n\n    <p>Development of the CodeMirror Ruby mode was kindly sponsored\n    by <a href=\"http://ubalo.com/\">Ubalo</a>, who hold\n    the <a href=\"LICENSE\">license</a>.</p>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/ruby/ruby.js",
    "content": "CodeMirror.defineMode(\"ruby\", function(config, parserConfig) {\n  function wordObj(words) {\n    var o = {};\n    for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true;\n    return o;\n  }\n  var keywords = wordObj([\n    \"alias\", \"and\", \"BEGIN\", \"begin\", \"break\", \"case\", \"class\", \"def\", \"defined?\", \"do\", \"else\",\n    \"elsif\", \"END\", \"end\", \"ensure\", \"false\", \"for\", \"if\", \"in\", \"module\", \"next\", \"not\", \"or\",\n    \"redo\", \"rescue\", \"retry\", \"return\", \"self\", \"super\", \"then\", \"true\", \"undef\", \"unless\",\n    \"until\", \"when\", \"while\", \"yield\", \"nil\", \"raise\", \"throw\", \"catch\", \"fail\", \"loop\", \"callcc\",\n    \"caller\", \"lambda\", \"proc\", \"public\", \"protected\", \"private\", \"require\", \"load\",\n    \"require_relative\", \"extend\", \"autoload\"\n  ]);\n  var indentWords = wordObj([\"def\", \"class\", \"case\", \"for\", \"while\", \"do\", \"module\", \"then\",\n                             \"catch\", \"loop\", \"proc\", \"begin\"]);\n  var dedentWords = wordObj([\"end\", \"until\"]);\n  var matching = {\"[\": \"]\", \"{\": \"}\", \"(\": \")\"};\n  var curPunc;\n\n  function chain(newtok, stream, state) {\n    state.tokenize.push(newtok);\n    return newtok(stream, state);\n  }\n\n  function tokenBase(stream, state) {\n    curPunc = null;\n    if (stream.sol() && stream.match(\"=begin\") && stream.eol()) {\n      state.tokenize.push(readBlockComment);\n      return \"comment\";\n    }\n    if (stream.eatSpace()) return null;\n    var ch = stream.next();\n    if (ch == \"`\" || ch == \"'\" || ch == '\"' ||\n        (ch == \"/\" && !stream.eol() && stream.peek() != \" \")) {\n      return chain(readQuoted(ch, \"string\", ch == '\"' || ch == \"`\"), stream, state);\n    } else if (ch == \"%\") {\n      var style, embed = false;\n      if (stream.eat(\"s\")) style = \"atom\";\n      else if (stream.eat(/[WQ]/)) { style = \"string\"; embed = true; }\n      else if (stream.eat(/[wxqr]/)) style = \"string\";\n      var delim = stream.eat(/[^\\w\\s]/);\n      if (!delim) return \"operator\";\n      if (matching.propertyIsEnumerable(delim)) delim = matching[delim];\n      return chain(readQuoted(delim, style, embed, true), stream, state);\n    } else if (ch == \"#\") {\n      stream.skipToEnd();\n      return \"comment\";\n    } else if (ch == \"<\" && stream.eat(\"<\")) {\n      stream.eat(\"-\");\n      stream.eat(/[\\'\\\"\\`]/);\n      var match = stream.match(/^\\w+/);\n      stream.eat(/[\\'\\\"\\`]/);\n      if (match) return chain(readHereDoc(match[0]), stream, state);\n      return null;\n    } else if (ch == \"0\") {\n      if (stream.eat(\"x\")) stream.eatWhile(/[\\da-fA-F]/);\n      else if (stream.eat(\"b\")) stream.eatWhile(/[01]/);\n      else stream.eatWhile(/[0-7]/);\n      return \"number\";\n    } else if (/\\d/.test(ch)) {\n      stream.match(/^[\\d_]*(?:\\.[\\d_]+)?(?:[eE][+\\-]?[\\d_]+)?/);\n      return \"number\";\n    } else if (ch == \"?\") {\n      while (stream.match(/^\\\\[CM]-/)) {}\n      if (stream.eat(\"\\\\\")) stream.eatWhile(/\\w/);\n      else stream.next();\n      return \"string\";\n    } else if (ch == \":\") {\n      if (stream.eat(\"'\")) return chain(readQuoted(\"'\", \"atom\", false), stream, state);\n      if (stream.eat('\"')) return chain(readQuoted('\"', \"atom\", true), stream, state);\n      stream.eatWhile(/[\\w\\?]/);\n      return \"atom\";\n    } else if (ch == \"@\") {\n      stream.eat(\"@\");\n      stream.eatWhile(/[\\w\\?]/);\n      return \"variable-2\";\n    } else if (ch == \"$\") {\n      stream.next();\n      stream.eatWhile(/[\\w\\?]/);\n      return \"variable-3\";\n    } else if (/\\w/.test(ch)) {\n      stream.eatWhile(/[\\w\\?]/);\n      if (stream.eat(\":\")) return \"atom\";\n      return \"ident\";\n    } else if (ch == \"|\" && (state.varList || state.lastTok == \"{\" || state.lastTok == \"do\")) {\n      curPunc = \"|\";\n      return null;\n    } else if (/[\\(\\)\\[\\]{}\\\\;]/.test(ch)) {\n      curPunc = ch;\n      return null;\n    } else if (ch == \"-\" && stream.eat(\">\")) {\n      return \"arrow\";\n    } else if (/[=+\\-\\/*:\\.^%<>~|]/.test(ch)) {\n      stream.eatWhile(/[=+\\-\\/*:\\.^%<>~|]/);\n      return \"operator\";\n    } else {\n      return null;\n    }\n  }\n\n  function tokenBaseUntilBrace() {\n    var depth = 1;\n    return function(stream, state) {\n      if (stream.peek() == \"}\") {\n        depth--;\n        if (depth == 0) {\n          state.tokenize.pop();\n          return state.tokenize[state.tokenize.length-1](stream, state);\n        }\n      } else if (stream.peek() == \"{\") {\n        depth++;\n      }\n      return tokenBase(stream, state);\n    };\n  }\n  function readQuoted(quote, style, embed, unescaped) {\n    return function(stream, state) {\n      var escaped = false, ch;\n      while ((ch = stream.next()) != null) {\n        if (ch == quote && (unescaped || !escaped)) {\n          state.tokenize.pop();\n          break;\n        }\n        if (embed && ch == \"#\" && !escaped && stream.eat(\"{\")) {\n          state.tokenize.push(tokenBaseUntilBrace(arguments.callee));\n          break;\n        }\n        escaped = !escaped && ch == \"\\\\\";\n      }\n      return style;\n    };\n  }\n  function readHereDoc(phrase) {\n    return function(stream, state) {\n      if (stream.match(phrase)) state.tokenize.pop();\n      else stream.skipToEnd();\n      return \"string\";\n    };\n  }\n  function readBlockComment(stream, state) {\n    if (stream.sol() && stream.match(\"=end\") && stream.eol())\n      state.tokenize.pop();\n    stream.skipToEnd();\n    return \"comment\";\n  }\n\n  return {\n    startState: function() {\n      return {tokenize: [tokenBase],\n              indented: 0,\n              context: {type: \"top\", indented: -config.indentUnit},\n              continuedLine: false,\n              lastTok: null,\n              varList: false};\n    },\n\n    token: function(stream, state) {\n      if (stream.sol()) state.indented = stream.indentation();\n      var style = state.tokenize[state.tokenize.length-1](stream, state), kwtype;\n      if (style == \"ident\") {\n        var word = stream.current();\n        style = keywords.propertyIsEnumerable(stream.current()) ? \"keyword\"\n          : /^[A-Z]/.test(word) ? \"tag\"\n          : (state.lastTok == \"def\" || state.lastTok == \"class\" || state.varList) ? \"def\"\n          : \"variable\";\n        if (indentWords.propertyIsEnumerable(word)) kwtype = \"indent\";\n        else if (dedentWords.propertyIsEnumerable(word)) kwtype = \"dedent\";\n        else if ((word == \"if\" || word == \"unless\") && stream.column() == stream.indentation())\n          kwtype = \"indent\";\n      }\n      if (curPunc || (style && style != \"comment\")) state.lastTok = word || curPunc || style;\n      if (curPunc == \"|\") state.varList = !state.varList;\n\n      if (kwtype == \"indent\" || /[\\(\\[\\{]/.test(curPunc))\n        state.context = {prev: state.context, type: curPunc || style, indented: state.indented};\n      else if ((kwtype == \"dedent\" || /[\\)\\]\\}]/.test(curPunc)) && state.context.prev)\n        state.context = state.context.prev;\n\n      if (stream.eol())\n        state.continuedLine = (curPunc == \"\\\\\" || style == \"operator\");\n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      if (state.tokenize[state.tokenize.length-1] != tokenBase) return 0;\n      var firstChar = textAfter && textAfter.charAt(0);\n      var ct = state.context;\n      var closing = ct.type == matching[firstChar] ||\n        ct.type == \"keyword\" && /^(?:end|until|else|elsif|when|rescue)\\b/.test(textAfter);\n      return ct.indented + (closing ? 0 : config.indentUnit) +\n        (state.continuedLine ? config.indentUnit : 0);\n    },\n     electricChars: \"}de\" // enD and rescuE\n\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-ruby\", \"ruby\");\n\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/rust/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Rust mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"rust.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n  </head>\n  <body>\n    <h1>CodeMirror: Rust mode</h1>\n\n<div><textarea id=\"code\" name=\"code\">\n// Demo code.\n\ntype foo<T> = int;\nenum bar {\n    some(int, foo<float>),\n    none\n}\n\nfn check_crate(x: int) {\n    let v = 10;\n    alt foo {\n      1 to 3 {\n        print_foo();\n        if x {\n            blah() + 10;\n        }\n      }\n      (x, y) { \"bye\" }\n      _ { \"hi\" }\n    }\n}\n</textarea></div>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        tabMode: \"indent\"\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-rustsrc</code>.</p>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/rust/rust.js",
    "content": "CodeMirror.defineMode(\"rust\", function() {\n  var indentUnit = 4, altIndentUnit = 2;\n  var valKeywords = {\n    \"if\": \"if-style\", \"while\": \"if-style\", \"else\": \"else-style\",\n    \"do\": \"else-style\", \"ret\": \"else-style\", \"fail\": \"else-style\",\n    \"break\": \"atom\", \"cont\": \"atom\", \"const\": \"let\", \"resource\": \"fn\",\n    \"let\": \"let\", \"fn\": \"fn\", \"for\": \"for\", \"alt\": \"alt\", \"iface\": \"iface\",\n    \"impl\": \"impl\", \"type\": \"type\", \"enum\": \"enum\", \"mod\": \"mod\",\n    \"as\": \"op\", \"true\": \"atom\", \"false\": \"atom\", \"assert\": \"op\", \"check\": \"op\",\n    \"claim\": \"op\", \"native\": \"ignore\", \"unsafe\": \"ignore\", \"import\": \"else-style\",\n    \"export\": \"else-style\", \"copy\": \"op\", \"log\": \"op\", \"log_err\": \"op\",\n    \"use\": \"op\", \"bind\": \"op\", \"self\": \"atom\"\n  };\n  var typeKeywords = function() {\n    var keywords = {\"fn\": \"fn\", \"block\": \"fn\", \"obj\": \"obj\"};\n    var atoms = \"bool uint int i8 i16 i32 i64 u8 u16 u32 u64 float f32 f64 str char\".split(\" \");\n    for (var i = 0, e = atoms.length; i < e; ++i) keywords[atoms[i]] = \"atom\";\n    return keywords;\n  }();\n  var operatorChar = /[+\\-*&%=<>!?|\\.@]/;\n\n  // Tokenizer\n\n  // Used as scratch variable to communicate multiple values without\n  // consing up tons of objects.\n  var tcat, content;\n  function r(tc, style) {\n    tcat = tc;\n    return style;\n  }\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    if (ch == '\"') {\n      state.tokenize = tokenString;\n      return state.tokenize(stream, state);\n    }\n    if (ch == \"'\") {\n      tcat = \"atom\";\n      if (stream.eat(\"\\\\\")) {\n        if (stream.skipTo(\"'\")) { stream.next(); return \"string\"; }\n        else { return \"error\"; }\n      } else {\n        stream.next();\n        return stream.eat(\"'\") ? \"string\" : \"error\";\n      }\n    }\n    if (ch == \"/\") {\n      if (stream.eat(\"/\")) { stream.skipToEnd(); return \"comment\"; }\n      if (stream.eat(\"*\")) {\n        state.tokenize = tokenComment(1);\n        return state.tokenize(stream, state);\n      }\n    }\n    if (ch == \"#\") {\n      if (stream.eat(\"[\")) { tcat = \"open-attr\"; return null; }\n      stream.eatWhile(/\\w/);\n      return r(\"macro\", \"meta\");\n    }\n    if (ch == \":\" && stream.match(\":<\")) {\n      return r(\"op\", null);\n    }\n    if (ch.match(/\\d/) || (ch == \".\" && stream.eat(/\\d/))) {\n      var flp = false;\n      if (!stream.match(/^x[\\da-f]+/i) && !stream.match(/^b[01]+/)) {\n        stream.eatWhile(/\\d/);\n        if (stream.eat(\".\")) { flp = true; stream.eatWhile(/\\d/); }\n        if (stream.match(/^e[+\\-]?\\d+/i)) { flp = true; }\n      }\n      if (flp) stream.match(/^f(?:32|64)/);\n      else stream.match(/^[ui](?:8|16|32|64)/);\n      return r(\"atom\", \"number\");\n    }\n    if (ch.match(/[()\\[\\]{}:;,]/)) return r(ch, null);\n    if (ch == \"-\" && stream.eat(\">\")) return r(\"->\", null);\n    if (ch.match(operatorChar)) {\n      stream.eatWhile(operatorChar);\n      return r(\"op\", null);\n    }\n    stream.eatWhile(/\\w/);\n    content = stream.current();\n    if (stream.match(/^::\\w/)) {\n      stream.backUp(1);\n      return r(\"prefix\", \"variable-2\");\n    }\n    if (state.keywords.propertyIsEnumerable(content))\n      return r(state.keywords[content], content.match(/true|false/) ? \"atom\" : \"keyword\");\n    return r(\"name\", \"variable\");\n  }\n\n  function tokenString(stream, state) {\n    var ch, escaped = false;\n    while (ch = stream.next()) {\n      if (ch == '\"' && !escaped) {\n        state.tokenize = tokenBase;\n        return r(\"atom\", \"string\");\n      }\n      escaped = !escaped && ch == \"\\\\\";\n    }\n    // Hack to not confuse the parser when a string is split in\n    // pieces.\n    return r(\"op\", \"string\");\n  }\n\n  function tokenComment(depth) {\n    return function(stream, state) {\n      var lastCh = null, ch;\n      while (ch = stream.next()) {\n        if (ch == \"/\" && lastCh == \"*\") {\n          if (depth == 1) {\n            state.tokenize = tokenBase;\n            break;\n          } else {\n            state.tokenize = tokenComment(depth - 1);\n            return state.tokenize(stream, state);\n          }\n        }\n        if (ch == \"*\" && lastCh == \"/\") {\n          state.tokenize = tokenComment(depth + 1);\n          return state.tokenize(stream, state);\n        }\n        lastCh = ch;\n      }\n      return \"comment\";\n    };\n  }\n\n  // Parser\n\n  var cx = {state: null, stream: null, marked: null, cc: null};\n  function pass() {\n    for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);\n  }\n  function cont() {\n    pass.apply(null, arguments);\n    return true;\n  }\n\n  function pushlex(type, info) {\n    var result = function() {\n      var state = cx.state;\n      state.lexical = {indented: state.indented, column: cx.stream.column(),\n                       type: type, prev: state.lexical, info: info};\n    };\n    result.lex = true;\n    return result;\n  }\n  function poplex() {\n    var state = cx.state;\n    if (state.lexical.prev) {\n      if (state.lexical.type == \")\")\n        state.indented = state.lexical.indented;\n      state.lexical = state.lexical.prev;\n    }\n  }\n  function typecx() { cx.state.keywords = typeKeywords; }\n  function valcx() { cx.state.keywords = valKeywords; }\n  poplex.lex = typecx.lex = valcx.lex = true;\n\n  function commasep(comb, end) {\n    function more(type) {\n      if (type == \",\") return cont(comb, more);\n      if (type == end) return cont();\n      return cont(more);\n    }\n    return function(type) {\n      if (type == end) return cont();\n      return pass(comb, more);\n    };\n  }\n\n  function stat_of(comb, tag) {\n    return cont(pushlex(\"stat\", tag), comb, poplex, block);\n  }\n  function block(type) {\n    if (type == \"}\") return cont();\n    if (type == \"let\") return stat_of(letdef1, \"let\");\n    if (type == \"fn\") return stat_of(fndef);\n    if (type == \"type\") return cont(pushlex(\"stat\"), tydef, endstatement, poplex, block);\n    if (type == \"enum\") return stat_of(enumdef);\n    if (type == \"mod\") return stat_of(mod);\n    if (type == \"iface\") return stat_of(iface);\n    if (type == \"impl\") return stat_of(impl);\n    if (type == \"open-attr\") return cont(pushlex(\"]\"), commasep(expression, \"]\"), poplex);\n    if (type == \"ignore\" || type.match(/[\\]\\);,]/)) return cont(block);\n    return pass(pushlex(\"stat\"), expression, poplex, endstatement, block);\n  }\n  function endstatement(type) {\n    if (type == \";\") return cont();\n    return pass();\n  }\n  function expression(type) {\n    if (type == \"atom\" || type == \"name\") return cont(maybeop);\n    if (type == \"{\") return cont(pushlex(\"}\"), exprbrace, poplex);\n    if (type.match(/[\\[\\(]/)) return matchBrackets(type, expression);\n    if (type.match(/[\\]\\)\\};,]/)) return pass();\n    if (type == \"if-style\") return cont(expression, expression);\n    if (type == \"else-style\" || type == \"op\") return cont(expression);\n    if (type == \"for\") return cont(pattern, maybetype, inop, expression, expression);\n    if (type == \"alt\") return cont(expression, altbody);\n    if (type == \"fn\") return cont(fndef);\n    if (type == \"macro\") return cont(macro);\n    return cont();\n  }\n  function maybeop(type) {\n    if (content == \".\") return cont(maybeprop);\n    if (content == \"::<\"){return cont(typarams, maybeop);}\n    if (type == \"op\" || content == \":\") return cont(expression);\n    if (type == \"(\" || type == \"[\") return matchBrackets(type, expression);\n    return pass();\n  }\n  function maybeprop(type) {\n    if (content.match(/^\\w+$/)) {cx.marked = \"variable\"; return cont(maybeop);}\n    return pass(expression);\n  }\n  function exprbrace(type) {\n    if (type == \"op\") {\n      if (content == \"|\") return cont(blockvars, poplex, pushlex(\"}\", \"block\"), block);\n      if (content == \"||\") return cont(poplex, pushlex(\"}\", \"block\"), block);\n    }\n    if (content == \"mutable\" || (content.match(/^\\w+$/) && cx.stream.peek() == \":\"\n                                 && !cx.stream.match(\"::\", false)))\n      return pass(record_of(expression));\n    return pass(block);\n  }\n  function record_of(comb) {\n    function ro(type) {\n      if (content == \"mutable\" || content == \"with\") {cx.marked = \"keyword\"; return cont(ro);}\n      if (content.match(/^\\w*$/)) {cx.marked = \"variable\"; return cont(ro);}\n      if (type == \":\") return cont(comb, ro);\n      if (type == \"}\") return cont();\n      return cont(ro);\n    }\n    return ro;\n  }\n  function blockvars(type) {\n    if (type == \"name\") {cx.marked = \"def\"; return cont(blockvars);}\n    if (type == \"op\" && content == \"|\") return cont();\n    return cont(blockvars);\n  }\n\n  function letdef1(type) {\n    if (type.match(/[\\]\\)\\};]/)) return cont();\n    if (content == \"=\") return cont(expression, letdef2);\n    if (type == \",\") return cont(letdef1);\n    return pass(pattern, maybetype, letdef1);\n  }\n  function letdef2(type) {\n    if (type.match(/[\\]\\)\\};,]/)) return pass(letdef1);\n    else return pass(expression, letdef2);\n  }\n  function maybetype(type) {\n    if (type == \":\") return cont(typecx, rtype, valcx);\n    return pass();\n  }\n  function inop(type) {\n    if (type == \"name\" && content == \"in\") {cx.marked = \"keyword\"; return cont();}\n    return pass();\n  }\n  function fndef(type) {\n    if (content == \"@\" || content == \"~\") {cx.marked = \"keyword\"; return cont(fndef);}\n    if (type == \"name\") {cx.marked = \"def\"; return cont(fndef);}\n    if (content == \"<\") return cont(typarams, fndef);\n    if (type == \"{\") return pass(expression);\n    if (type == \"(\") return cont(pushlex(\")\"), commasep(argdef, \")\"), poplex, fndef);\n    if (type == \"->\") return cont(typecx, rtype, valcx, fndef);\n    if (type == \";\") return cont();\n    return cont(fndef);\n  }\n  function tydef(type) {\n    if (type == \"name\") {cx.marked = \"def\"; return cont(tydef);}\n    if (content == \"<\") return cont(typarams, tydef);\n    if (content == \"=\") return cont(typecx, rtype, valcx);\n    return cont(tydef);\n  }\n  function enumdef(type) {\n    if (type == \"name\") {cx.marked = \"def\"; return cont(enumdef);}\n    if (content == \"<\") return cont(typarams, enumdef);\n    if (content == \"=\") return cont(typecx, rtype, valcx, endstatement);\n    if (type == \"{\") return cont(pushlex(\"}\"), typecx, enumblock, valcx, poplex);\n    return cont(enumdef);\n  }\n  function enumblock(type) {\n    if (type == \"}\") return cont();\n    if (type == \"(\") return cont(pushlex(\")\"), commasep(rtype, \")\"), poplex, enumblock);\n    if (content.match(/^\\w+$/)) cx.marked = \"def\";\n    return cont(enumblock);\n  }\n  function mod(type) {\n    if (type == \"name\") {cx.marked = \"def\"; return cont(mod);}\n    if (type == \"{\") return cont(pushlex(\"}\"), block, poplex);\n    return pass();\n  }\n  function iface(type) {\n    if (type == \"name\") {cx.marked = \"def\"; return cont(iface);}\n    if (content == \"<\") return cont(typarams, iface);\n    if (type == \"{\") return cont(pushlex(\"}\"), block, poplex);\n    return pass();\n  }\n  function impl(type) {\n    if (content == \"<\") return cont(typarams, impl);\n    if (content == \"of\" || content == \"for\") {cx.marked = \"keyword\"; return cont(rtype, impl);}\n    if (type == \"name\") {cx.marked = \"def\"; return cont(impl);}\n    if (type == \"{\") return cont(pushlex(\"}\"), block, poplex);\n    return pass();\n  }\n  function typarams(type) {\n    if (content == \">\") return cont();\n    if (content == \",\") return cont(typarams);\n    if (content == \":\") return cont(rtype, typarams);\n    return pass(rtype, typarams);\n  }\n  function argdef(type) {\n    if (type == \"name\") {cx.marked = \"def\"; return cont(argdef);}\n    if (type == \":\") return cont(typecx, rtype, valcx);\n    return pass();\n  }\n  function rtype(type) {\n    if (type == \"name\") {cx.marked = \"variable-3\"; return cont(rtypemaybeparam); }\n    if (content == \"mutable\") {cx.marked = \"keyword\"; return cont(rtype);}\n    if (type == \"atom\") return cont(rtypemaybeparam);\n    if (type == \"op\" || type == \"obj\") return cont(rtype);\n    if (type == \"fn\") return cont(fntype);\n    if (type == \"{\") return cont(pushlex(\"{\"), record_of(rtype), poplex);\n    return matchBrackets(type, rtype);\n  }\n  function rtypemaybeparam(type) {\n    if (content == \"<\") return cont(typarams);\n    return pass();\n  }\n  function fntype(type) {\n    if (type == \"(\") return cont(pushlex(\"(\"), commasep(rtype, \")\"), poplex, fntype);\n    if (type == \"->\") return cont(rtype);\n    return pass();\n  }\n  function pattern(type) {\n    if (type == \"name\") {cx.marked = \"def\"; return cont(patternmaybeop);}\n    if (type == \"atom\") return cont(patternmaybeop);\n    if (type == \"op\") return cont(pattern);\n    if (type.match(/[\\]\\)\\};,]/)) return pass();\n    return matchBrackets(type, pattern);\n  }\n  function patternmaybeop(type) {\n    if (type == \"op\" && content == \".\") return cont();\n    if (content == \"to\") {cx.marked = \"keyword\"; return cont(pattern);}\n    else return pass();\n  }\n  function altbody(type) {\n    if (type == \"{\") return cont(pushlex(\"}\", \"alt\"), altblock1, poplex);\n    return pass();\n  }\n  function altblock1(type) {\n    if (type == \"}\") return cont();\n    if (type == \"|\") return cont(altblock1);\n    if (content == \"when\") {cx.marked = \"keyword\"; return cont(expression, altblock2);}\n    if (type.match(/[\\]\\);,]/)) return cont(altblock1);\n    return pass(pattern, altblock2);\n  }\n  function altblock2(type) {\n    if (type == \"{\") return cont(pushlex(\"}\", \"alt\"), block, poplex, altblock1);\n    else return pass(altblock1);\n  }\n\n  function macro(type) {\n    if (type.match(/[\\[\\(\\{]/)) return matchBrackets(type, expression);\n    return pass();\n  }\n  function matchBrackets(type, comb) {\n    if (type == \"[\") return cont(pushlex(\"]\"), commasep(comb, \"]\"), poplex);\n    if (type == \"(\") return cont(pushlex(\")\"), commasep(comb, \")\"), poplex);\n    if (type == \"{\") return cont(pushlex(\"}\"), commasep(comb, \"}\"), poplex);\n    return cont();\n  }\n\n  function parse(state, stream, style) {\n    var cc = state.cc;\n    // Communicate our context to the combinators.\n    // (Less wasteful than consing up a hundred closures on every call.)\n    cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc;\n\n    while (true) {\n      var combinator = cc.length ? cc.pop() : block;\n      if (combinator(tcat)) {\n        while(cc.length && cc[cc.length - 1].lex)\n          cc.pop()();\n        return cx.marked || style;\n      }\n    }\n  }\n\n  return {\n    startState: function() {\n      return {\n        tokenize: tokenBase,\n        cc: [],\n        lexical: {indented: -indentUnit, column: 0, type: \"top\", align: false},\n        keywords: valKeywords,\n        indented: 0\n      };\n    },\n\n    token: function(stream, state) {\n      if (stream.sol()) {\n        if (!state.lexical.hasOwnProperty(\"align\"))\n          state.lexical.align = false;\n        state.indented = stream.indentation();\n      }\n      if (stream.eatSpace()) return null;\n      tcat = content = null;\n      var style = state.tokenize(stream, state);\n      if (style == \"comment\") return style;\n      if (!state.lexical.hasOwnProperty(\"align\"))\n        state.lexical.align = true;\n      if (tcat == \"prefix\") return style;\n      if (!content) content = stream.current();\n      return parse(state, stream, style);\n    },\n\n    indent: function(state, textAfter) {\n      if (state.tokenize != tokenBase) return 0;\n      var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical,\n          type = lexical.type, closing = firstChar == type;\n      if (type == \"stat\") return lexical.indented + indentUnit;\n      if (lexical.align) return lexical.column + (closing ? 0 : 1);\n      return lexical.indented + (closing ? 0 : (lexical.info == \"alt\" ? altIndentUnit : indentUnit));\n    },\n\n    electricChars: \"{}\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/x-rustsrc\", \"rust\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/scheme/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Scheme mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"scheme.js\"></script>\n    <style>.CodeMirror {background: #f8f8f8;}</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: Scheme mode</h1>\n    <form><textarea id=\"code\" name=\"code\">\n; See if the input starts with a given symbol.\n(define (match-symbol input pattern)\n  (cond ((null? (remain input)) #f)\n\t((eqv? (car (remain input)) pattern) (r-cdr input))\n\t(else #f)))\n\n; Allow the input to start with one of a list of patterns.\n(define (match-or input pattern)\n  (cond ((null? pattern) #f)\n\t((match-pattern input (car pattern)))\n\t(else (match-or input (cdr pattern)))))\n\n; Allow a sequence of patterns.\n(define (match-seq input pattern)\n  (if (null? pattern)\n      input\n      (let ((match (match-pattern input (car pattern))))\n\t(if match (match-seq match (cdr pattern)) #f))))\n\n; Match with the pattern but no problem if it does not match.\n(define (match-opt input pattern)\n  (let ((match (match-pattern input (car pattern))))\n    (if match match input)))\n\n; Match anything (other than '()), until pattern is found. The rather\n; clumsy form of requiring an ending pattern is needed to decide where\n; the end of the match is. If none is given, this will match the rest\n; of the sentence.\n(define (match-any input pattern)\n  (cond ((null? (remain input)) #f)\n\t((null? pattern) (f-cons (remain input) (clear-remain input)))\n\t(else\n\t (let ((accum-any (collector)))\n\t   (define (match-pattern-any input pattern)\n\t     (cond ((null? (remain input)) #f)\n\t\t   (else (accum-any (car (remain input)))\n\t\t\t (cond ((match-pattern (r-cdr input) pattern))\n\t\t\t       (else (match-pattern-any (r-cdr input) pattern))))))\n\t   (let ((retval (match-pattern-any input (car pattern))))\n\t     (if retval\n\t\t (f-cons (accum-any) retval)\n\t\t #f))))))\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {});\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-scheme</code>.</p>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/scheme/scheme.js",
    "content": "/**\n * Author: Koh Zi Han, based on implementation by Koh Zi Chun\n */\nCodeMirror.defineMode(\"scheme\", function (config, mode) {\n    var BUILTIN = \"builtin\", COMMENT = \"comment\", STRING = \"string\",\n        ATOM = \"atom\", NUMBER = \"number\", BRACKET = \"bracket\", KEYWORD=\"keyword\";\n    var INDENT_WORD_SKIP = 2, KEYWORDS_SKIP = 1;\n\n    function makeKeywords(str) {\n        var obj = {}, words = str.split(\" \");\n        for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n        return obj;\n    }\n\n    var keywords = makeKeywords(\"λ case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?\");\n    var indentKeys = makeKeywords(\"define let letrec let* lambda\");\n\n    function stateStack(indent, type, prev) { // represents a state stack object\n        this.indent = indent;\n        this.type = type;\n        this.prev = prev;\n    }\n\n    function pushStack(state, indent, type) {\n        state.indentStack = new stateStack(indent, type, state.indentStack);\n    }\n\n    function popStack(state) {\n        state.indentStack = state.indentStack.prev;\n    }\n\n    /**\n     * Scheme numbers are complicated unfortunately.\n     * Checks if we're looking at a number, which might be possibly a fraction.\n     * Also checks that it is not part of a longer identifier. Returns true/false accordingly.\n     */\n    function isNumber(ch, stream){\n        if (!stream.eatWhile(/[0-9]/)) {\n            if (stream.eat(/\\//)) stream.eatWhile(/[0-9]/);\n            if (stream.eol() || !(/[a-zA-Z\\-\\_\\/]/.test(stream.peek()))) return true;\n            stream.backUp(stream.current().length - 1); // undo all the eating\n        }\n        return false;\n    }\n\n    return {\n        startState: function () {\n            return {\n                indentStack: null,\n                indentation: 0,\n                mode: false,\n                sExprComment: false\n            };\n        },\n\n        token: function (stream, state) {\n            if (state.indentStack == null && stream.sol()) {\n                // update indentation, but only if indentStack is empty\n                state.indentation = stream.indentation();\n            }\n\n            // skip spaces\n            if (stream.eatSpace()) {\n                return null;\n            }\n            var returnType = null;\n\n            switch(state.mode){\n                case \"string\": // multi-line string parsing mode\n                    var next, escaped = false;\n                    while ((next = stream.next()) != null) {\n                        if (next == \"\\\"\" && !escaped) {\n\n                            state.mode = false;\n                            break;\n                        }\n                        escaped = !escaped && next == \"\\\\\";\n                    }\n                    returnType = STRING; // continue on in scheme-string mode\n                    break;\n                case \"comment\": // comment parsing mode\n                    var next, maybeEnd = false;\n                    while ((next = stream.next()) != null) {\n                        if (next == \"#\" && maybeEnd) {\n\n                            state.mode = false;\n                            break;\n                        }\n                        maybeEnd = (next == \"|\");\n                    }\n                    returnType = COMMENT;\n                    break;\n                case \"s-expr-comment\": // s-expr commenting mode\n                    state.mode = false;\n                    if(stream.peek() == \"(\" || stream.peek() == \"[\"){\n                        // actually start scheme s-expr commenting mode\n                        state.sExprComment = 0;\n                    }else{\n                        // if not we just comment the entire of the next token\n                        stream.eatWhile(/[^/s]/); // eat non spaces\n                        returnType = COMMENT;\n                        break;\n                    }\n                default: // default parsing mode\n                    var ch = stream.next();\n\n                    if (ch == \"\\\"\") {\n                        state.mode = \"string\";\n                        returnType = STRING;\n\n                    } else if (ch == \"'\") {\n                        returnType = ATOM;\n                    } else if (ch == '#') {\n                        if (stream.eat(\"|\")) {\t\t\t\t\t// Multi-line comment\n                            state.mode = \"comment\"; // toggle to comment mode\n                            returnType = COMMENT;\n                        } else if (stream.eat(/[tf]/)) {\t\t\t// #t/#f (atom)\n                            returnType = ATOM;\n                        } else if (stream.eat(';')) {\t\t\t\t// S-Expr comment\n                            state.mode = \"s-expr-comment\";\n                            returnType = COMMENT;\n                        }\n\n                    } else if (ch == \";\") { // comment\n                        stream.skipToEnd(); // rest of the line is a comment\n                        returnType = COMMENT;\n                    } else if (ch == \"-\"){\n\n                        if(!isNaN(parseInt(stream.peek()))){\n                            stream.eatWhile(/[\\/0-9]/);\n                            returnType = NUMBER;\n                        }else{\n                            returnType = null;\n                        }\n                    } else if (isNumber(ch,stream)){\n                        returnType = NUMBER;\n                    } else if (ch == \"(\" || ch == \"[\") {\n                        var keyWord = ''; var indentTemp = stream.column();\n                        /**\n                        Either\n                        (indent-word ..\n                        (non-indent-word ..\n                        (;something else, bracket, etc.\n                        */\n\n                        while ((letter = stream.eat(/[^\\s\\(\\[\\;\\)\\]]/)) != null) {\n                            keyWord += letter;\n                        }\n\n                        if (keyWord.length > 0 && indentKeys.propertyIsEnumerable(keyWord)) { // indent-word\n\n                            pushStack(state, indentTemp + INDENT_WORD_SKIP, ch);\n                        } else { // non-indent word\n                            // we continue eating the spaces\n                            stream.eatSpace();\n                            if (stream.eol() || stream.peek() == \";\") {\n                                // nothing significant after\n                                // we restart indentation 1 space after\n                                pushStack(state, indentTemp + 1, ch);\n                            } else {\n                                pushStack(state, indentTemp + stream.current().length, ch); // else we match\n                            }\n                        }\n                        stream.backUp(stream.current().length - 1); // undo all the eating\n\n                        if(typeof state.sExprComment == \"number\") state.sExprComment++;\n\n                        returnType = BRACKET;\n                    } else if (ch == \")\" || ch == \"]\") {\n                        returnType = BRACKET;\n                        if (state.indentStack != null && state.indentStack.type == (ch == \")\" ? \"(\" : \"[\")) {\n                            popStack(state);\n\n                            if(typeof state.sExprComment == \"number\"){\n                                if(--state.sExprComment == 0){\n                                    returnType = COMMENT; // final closing bracket\n                                    state.sExprComment = false; // turn off s-expr commenting mode\n                                }\n                            }\n                        }\n                    } else {\n                        stream.eatWhile(/[\\w\\$_\\-!$%&*+\\.\\/:<=>?@\\^~]/);\n\n                        if (keywords && keywords.propertyIsEnumerable(stream.current())) {\n                            returnType = BUILTIN;\n                        } else returnType = \"variable\";\n                    }\n            }\n            return (typeof state.sExprComment == \"number\") ? COMMENT : returnType;\n        },\n\n        indent: function (state, textAfter) {\n            if (state.indentStack == null) return state.indentation;\n            return state.indentStack.indent;\n        }\n    };\n});\n\nCodeMirror.defineMIME(\"text/x-scheme\", \"scheme\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/shell/index.html",
    "content": "<!doctype html>\n<meta charset=utf-8>\n<title>CodeMirror: Shell mode</title>\n\n<link rel=stylesheet href=../../lib/codemirror.css>\n<link rel=stylesheet href=../../doc/docs.css>\n\n<style type=text/css>\n  .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}\n</style>\n\n<script src=../../lib/codemirror.js></script>\n<script src=shell.js></script>\n\n<h1>CodeMirror: Shell mode</h1>\n\n<textarea id=code>\n#!/bin/bash\n\n# clone the repository\ngit clone http://github.com/garden/tree\n\n# generate HTTPS credentials\ncd tree\nopenssl genrsa -aes256 -out https.key 1024\nopenssl req -new -nodes -key https.key -out https.csr\nopenssl x509 -req -days 365 -in https.csr -signkey https.key -out https.crt\ncp https.key{,.orig}\nopenssl rsa -in https.key.orig -out https.key\n\n# start the server in HTTPS mode\ncd web\nsudo node ../server.js 443 'yes' &gt;&gt; ../node.log &amp;\n\n# here is how to stop the server\nfor pid in `ps aux | grep 'node ../server.js' | awk '{print $2}'` ; do\n  sudo kill -9 $pid 2&gt; /dev/null\ndone\n\nexit 0</textarea>\n\n<script>\n  var editor = CodeMirror.fromTextArea(document.getElementById('code'), {\n    mode: 'shell',\n    lineNumbers: true,\n    matchBrackets: true\n  });\n</script>\n\n<p><strong>MIME types defined:</strong> <code>text/x-sh</code>.</p>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/shell/shell.js",
    "content": "CodeMirror.defineMode('shell', function(config) {\n\n  var atoms = ['true','false'],\n      keywords = ['if','then','do','else','elif','while','until','for','in','esac','fi','fin','fil','done','exit','set','unset','export','function'],\n      commands = ['ab','awk','bash','beep','cat','cc','cd','chown','chmod','chroot','clear','cp','curl','cut','diff','echo','find','gawk','gcc','get','git','grep','kill','killall','ls','make','mkdir','openssl','mv','nc','node','npm','ping','ps','restart','rm','rmdir','sed','service','sh','shopt','shred','source','sort','sleep','ssh','start','stop','su','sudo','tee','telnet','top','touch','vi','vim','wall','wc','wget','who','write','yes','zsh'];\n\n  function tokenBase(stream, state) {\n\n    var sol = stream.sol();\n    var ch = stream.next();\n\n    if (ch === '\\'' || ch === '\"' || ch === '`') {\n      state.tokens.unshift(tokenString(ch));\n      return tokenize(stream, state);\n    }\n    if (ch === '#') {\n      if (sol && stream.eat('!')) {\n        stream.skipToEnd();\n        return 'meta'; // 'comment'?\n      }\n      stream.skipToEnd();\n      return 'comment';\n    }\n    if (ch === '$') {\n      state.tokens.unshift(tokenDollar);\n      return tokenize(stream, state);\n    }\n    if (ch === '+' || ch === '=') {\n      return 'operator';\n    }\n    if (ch === '-') {\n      stream.eat('-');\n      stream.eatWhile(/\\w/);\n      return 'attribute';\n    }\n    if (/\\d/.test(ch)) {\n      stream.eatWhile(/\\d/);\n      if(!/\\w/.test(stream.peek())) {\n        return 'number';\n      }\n    }\n    stream.eatWhile(/\\w/);\n    var cur = stream.current();\n    if (stream.peek() === '=' && /\\w+/.test(cur)) return 'def';\n    if (atoms.indexOf(cur) !== -1) return 'atom';\n    if (commands.indexOf(cur) !== -1) return 'builtin';\n    if (keywords.indexOf(cur) !== -1) return 'keyword';\n    return 'word';\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var next, end = false, escaped = false;\n      while ((next = stream.next()) != null) {\n        if (next === quote && !escaped) {\n          end = true;\n          break;\n        }\n        if (next === '$' && !escaped && quote !== '\\'') {\n          escaped = true;\n          stream.backUp(1);\n          state.tokens.unshift(tokenDollar);\n          break;\n        }\n        escaped = !escaped && next === '\\\\';\n      }\n      if (end || !escaped) {\n        state.tokens.shift();\n      }\n      return (quote === '`' || quote === ')' ? 'quote' : 'string');\n    };\n  };\n\n  var tokenDollar = function(stream, state) {\n    if (state.tokens.length > 1) stream.eat('$');\n    var ch = stream.next(), hungry = /\\w/;\n    if (ch === '{') hungry = /[^}]/;\n    if (ch === '(') {\n      state.tokens[0] = tokenString(')');\n      return tokenize(stream, state);\n    }\n    if (!/\\d/.test(ch)) {\n      stream.eatWhile(hungry);\n      stream.eat('}');\n    }\n    state.tokens.shift();\n    return 'def';\n  };\n\n  function tokenize(stream, state) {\n    return (state.tokens[0] || tokenBase) (stream, state);\n  };\n\n  return {\n    startState: function() {return {tokens:[]}},\n    token: function(stream, state) {\n      if (stream.eatSpace()) return null;\n      return tokenize(stream, state);\n    }\n  };\n});\n  \nCodeMirror.defineMIME('text/x-sh', 'shell');\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/smalltalk/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Smalltalk mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"smalltalk.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n    <style>\n      .CodeMirror {border: 2px solid #dee; border-right-width: 10px;}\n      .CodeMirror-gutter {border: none; background: #dee;}\n      .CodeMirror-gutter pre {color: white; font-weight: bold;}\n    </style>\n  </head>\n  <body>\n    <h1>CodeMirror: Smalltalk mode</h1>\n\n<form><textarea id=\"code\" name=\"code\">\n\" \n    This is a test of the Smalltalk code\n\"\nSeaside.WAComponent subclass: #MyCounter [\n    | count |\n    MyCounter class &gt;&gt; canBeRoot [ ^true ]\n\n    initialize [\n        super initialize.\n        count := 0.\n    ]\n    states [ ^{ self } ]\n    renderContentOn: html [\n        html heading: count.\n        html anchor callback: [ count := count + 1 ]; with: '++'.\n        html space.\n        html anchor callback: [ count := count - 1 ]; with: '--'.\n    ]\n]\n\nMyCounter registerAsApplication: 'mycounter'\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        mode: \"text/x-stsrc\",\n        indentUnit: 4\n      });\n    </script>\n\n    <p>Simple Smalltalk mode.</p>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-stsrc</code>.</p>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/smalltalk/smalltalk.js",
    "content": "CodeMirror.defineMode('smalltalk', function(config, modeConfig) {\n\n\tvar specialChars = /[+\\-/\\\\*~<>=@%|&?!.:;^]/;\n\tvar keywords = /true|false|nil|self|super|thisContext/;\n\n\tvar Context = function(tokenizer, parent) {\n\t\tthis.next = tokenizer;\n\t\tthis.parent = parent;\n\t};\n\n\tvar Token = function(name, context, eos) {\n\t\tthis.name = name;\n\t\tthis.context = context;\n\t\tthis.eos = eos;\n\t};\n\n\tvar State = function() {\n\t\tthis.context = new Context(next, null);\n\t\tthis.expectVariable = true;\n\t\tthis.indentation = 0;\n\t\tthis.userIndentationDelta = 0;\n\t};\n\n\tState.prototype.userIndent = function(indentation) {\n\t\tthis.userIndentationDelta = indentation > 0 ? (indentation / config.indentUnit - this.indentation) : 0;\n\t};\n\n\tvar next = function(stream, context, state) {\n\t\tvar token = new Token(null, context, false);\n\t\tvar aChar = stream.next();\n\n\t\tif (aChar === '\"') {\n\t\t\ttoken = nextComment(stream, new Context(nextComment, context));\n\n\t\t} else if (aChar === '\\'') {\n\t\t\ttoken = nextString(stream, new Context(nextString, context));\n\n\t\t} else if (aChar === '#') {\n\t\t\tstream.eatWhile(/[^ .]/);\n\t\t\ttoken.name = 'string-2';\n\n\t\t} else if (aChar === '$') {\n\t\t\tstream.eatWhile(/[^ ]/);\n\t\t\ttoken.name = 'string-2';\n\n\t\t} else if (aChar === '|' && state.expectVariable) {\n\t\t\ttoken.context = new Context(nextTemporaries, context);\n\n\t\t} else if (/[\\[\\]{}()]/.test(aChar)) {\n\t\t\ttoken.name = 'bracket';\n\t\t\ttoken.eos = /[\\[{(]/.test(aChar);\n\n\t\t\tif (aChar === '[') {\n\t\t\t\tstate.indentation++;\n\t\t\t} else if (aChar === ']') {\n\t\t\t\tstate.indentation = Math.max(0, state.indentation - 1);\n\t\t\t}\n\n\t\t} else if (specialChars.test(aChar)) {\n\t\t\tstream.eatWhile(specialChars);\n\t\t\ttoken.name = 'operator';\n\t\t\ttoken.eos = aChar !== ';'; // ; cascaded message expression\n\n\t\t} else if (/\\d/.test(aChar)) {\n\t\t\tstream.eatWhile(/[\\w\\d]/);\n\t\t\ttoken.name = 'number'\n\n\t\t} else if (/[\\w_]/.test(aChar)) {\n\t\t\tstream.eatWhile(/[\\w\\d_]/);\n\t\t\ttoken.name = state.expectVariable ? (keywords.test(stream.current()) ? 'keyword' : 'variable') : null;\n\n\t\t} else {\n\t\t\ttoken.eos = state.expectVariable;\n\t\t}\n\n\t\treturn token;\n\t};\n\n\tvar nextComment = function(stream, context) {\n\t\tstream.eatWhile(/[^\"]/);\n\t\treturn new Token('comment', stream.eat('\"') ? context.parent : context, true);\n\t};\n\n\tvar nextString = function(stream, context) {\n\t\tstream.eatWhile(/[^']/);\n\t\treturn new Token('string', stream.eat('\\'') ? context.parent : context, false);\n\t};\n\n\tvar nextTemporaries = function(stream, context, state) {\n\t\tvar token = new Token(null, context, false);\n\t\tvar aChar = stream.next();\n\n\t\tif (aChar === '|') {\n\t\t\ttoken.context = context.parent;\n\t\t\ttoken.eos = true;\n\n\t\t} else {\n\t\t\tstream.eatWhile(/[^|]/);\n\t\t\ttoken.name = 'variable';\n\t\t}\n\n\t\treturn token;\n\t}\n\n\treturn {\n\t\tstartState: function() {\n\t\t\treturn new State;\n\t\t},\n\n\t\ttoken: function(stream, state) {\n\t\t\tstate.userIndent(stream.indentation());\n\n\t\t\tif (stream.eatSpace()) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tvar token = state.context.next(stream, state.context, state);\n\t\t\tstate.context = token.context;\n\t\t\tstate.expectVariable = token.eos;\n\n\t\t\tstate.lastToken = token;\n\t\t\treturn token.name;\n\t\t},\n\n\t\tblankLine: function(state) {\n\t\t\tstate.userIndent(0);\n\t\t},\n\n\t\tindent: function(state, textAfter) {\n\t\t\tvar i = state.context.next === next && textAfter && textAfter.charAt(0) === ']' ? -1 : state.userIndentationDelta;\n\t\t\treturn (state.indentation + i) * config.indentUnit;\n\t\t},\n\n\t\telectricChars: ']'\n\t};\n\n});\n\nCodeMirror.defineMIME('text/x-stsrc', {name: 'smalltalk'});"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/smarty/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Smarty mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"smarty.js\"></script>\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: Smarty mode</h1>\n\n    <form><textarea id=\"code\" name=\"code\">\n{extends file=\"parent.tpl\"}\n{include file=\"template.tpl\"}\n\n{* some example Smarty content *}\n{if isset($name) && $name == 'Blog'}\n  This is a {$var}.\n  {$integer = 451}, {$array[] = \"a\"}, {$stringvar = \"string\"}\n  {assign var='bob' value=$var.prop}\n{elseif $name == $foo}\n  {function name=menu level=0}\n    {foreach $data as $entry}\n      {if is_array($entry)}\n        - {$entry@key}\n        {menu data=$entry level=$level+1}\n      {else}\n        {$entry}\n      {/if}\n    {/foreach}\n  {/function}\n{/if}</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        mode: \"smarty\"\n      });\n    </script>\n\n    <br />\n\n    <form><textarea id=\"code2\" name=\"code2\">\n{--extends file=\"parent.tpl\"--}\n{--include file=\"template.tpl\"--}\n\n{--* some example Smarty content *--}\n{--if isset($name) && $name == 'Blog'--}\n  This is a {--$var--}.\n  {--$integer = 451--}, {--$array[] = \"a\"--}, {--$stringvar = \"string\"--}\n  {--assign var='bob' value=$var.prop--}\n{--elseif $name == $foo--}\n  {--function name=menu level=0--}\n    {--foreach $data as $entry--}\n      {--if is_array($entry)--}\n        - {--$entry@key--}\n        {--menu data=$entry level=$level+1--}\n      {--else--}\n        {--$entry--}\n      {--/if--}\n    {--/foreach--}\n  {--/function--}\n{--/if--}</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code2\"), {\n        lineNumbers: true,\n        mode: {\n          name: \"smarty\",\n          leftDelimiter: \"{--\",\n          rightDelimiter: \"--}\"\n        }\n      });\n    </script>\n\n    <p>A plain text/Smarty mode which allows for custom delimiter tags (defaults to <b>{</b> and <b>}</b>).</p>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-smarty</code></p>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/smarty/smarty.js",
    "content": "CodeMirror.defineMode(\"smarty\", function(config, parserConfig) {\n  var keyFuncs = [\"debug\", \"extends\", \"function\", \"include\", \"literal\"];\n  var last;\n  var regs = {\n    operatorChars: /[+\\-*&%=<>!?]/,\n    validIdentifier: /[a-zA-Z0-9\\_]/,\n    stringChar: /[\\'\\\"]/\n  }\n  var leftDelim = (typeof config.mode.leftDelimiter != 'undefined') ? config.mode.leftDelimiter : \"{\";\n  var rightDelim = (typeof config.mode.rightDelimiter != 'undefined') ? config.mode.rightDelimiter : \"}\";\n  function ret(style, lst) { last = lst; return style; }\n\n\n  function tokenizer(stream, state) {\n    function chain(parser) {\n      state.tokenize = parser;\n      return parser(stream, state);\n    }\n\n    if (stream.match(leftDelim, true)) {\n      if (stream.eat(\"*\")) {\n        return chain(inBlock(\"comment\", \"*\" + rightDelim));\n      }\n      else {\n        state.tokenize = inSmarty;\n        return \"tag\";\n      }\n    }\n    else {\n      // I'd like to do an eatWhile() here, but I can't get it to eat only up to the rightDelim string/char\n      stream.next();\n      return null;\n    }\n  }\n\n  function inSmarty(stream, state) {\n    if (stream.match(rightDelim, true)) {\n      state.tokenize = tokenizer;\n      return ret(\"tag\", null);\n    }\n\n    var ch = stream.next();\n    if (ch == \"$\") {\n      stream.eatWhile(regs.validIdentifier);\n      return ret(\"variable-2\", \"variable\");\n    }\n    else if (ch == \".\") {\n      return ret(\"operator\", \"property\");\n    }\n    else if (regs.stringChar.test(ch)) {\n      state.tokenize = inAttribute(ch);\n      return ret(\"string\", \"string\");\n    }\n    else if (regs.operatorChars.test(ch)) {\n      stream.eatWhile(regs.operatorChars);\n      return ret(\"operator\", \"operator\");\n    }\n    else if (ch == \"[\" || ch == \"]\") {\n      return ret(\"bracket\", \"bracket\");\n    }\n    else if (/\\d/.test(ch)) {\n      stream.eatWhile(/\\d/);\n      return ret(\"number\", \"number\");\n    }\n    else {\n      if (state.last == \"variable\") {\n        if (ch == \"@\") {\n          stream.eatWhile(regs.validIdentifier);\n          return ret(\"property\", \"property\");\n        }\n        else if (ch == \"|\") {\n          stream.eatWhile(regs.validIdentifier);\n          return ret(\"qualifier\", \"modifier\");\n        }\n      }\n      else if (state.last == \"whitespace\") {\n        stream.eatWhile(regs.validIdentifier);\n        return ret(\"attribute\", \"modifier\");\n      }\n      else if (state.last == \"property\") {\n        stream.eatWhile(regs.validIdentifier);\n        return ret(\"property\", null);\n      }\n      else if (/\\s/.test(ch)) {\n        last = \"whitespace\";\n        return null;\n      }\n\n      var str = \"\";\n      if (ch != \"/\") {\n    \tstr += ch;\n      }\n      var c = \"\";\n      while ((c = stream.eat(regs.validIdentifier))) {\n        str += c;\n      }\n      var i, j;\n      for (i=0, j=keyFuncs.length; i<j; i++) {\n        if (keyFuncs[i] == str) {\n          return ret(\"keyword\", \"keyword\");\n        }\n      }\n      if (/\\s/.test(ch)) {\n    \treturn null;\n      }\n      return ret(\"tag\", \"tag\");\n    }\n  }\n\n  function inAttribute(quote) {\n    return function(stream, state) {\n      while (!stream.eol()) {\n        if (stream.next() == quote) {\n          state.tokenize = inSmarty;\n          break;\n        }\n      }\n      return \"string\";\n    };\n  }\n\n  function inBlock(style, terminator) {\n    return function(stream, state) {\n      while (!stream.eol()) {\n        if (stream.match(terminator)) {\n          state.tokenize = tokenizer;\n          break;\n        }\n        stream.next();\n      }\n      return style;\n    };\n  }\n\n  return {\n    startState: function() {\n      return { tokenize: tokenizer, mode: \"smarty\", last: null };\n    },\n    token: function(stream, state) {\n      var style = state.tokenize(stream, state);\n      state.last = last;\n      return style;\n    },\n    electricChars: \"\"\n  }\n});\n\nCodeMirror.defineMIME(\"text/x-smarty\", \"smarty\");"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/sparql/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: SPARQL mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"sparql.js\"></script>\n    <style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: SPARQL mode</h1>\n    <form><textarea id=\"code\" name=\"code\">\nPREFIX a: &lt;http://www.w3.org/2000/10/annotation-ns#>\nPREFIX dc: &lt;http://purl.org/dc/elements/1.1/>\nPREFIX foaf: &lt;http://xmlns.com/foaf/0.1/>\n\n# Comment!\n\nSELECT ?given ?family\nWHERE {\n  ?annot a:annotates &lt;http://www.w3.org/TR/rdf-sparql-query/> .\n  ?annot dc:creator ?c .\n  OPTIONAL {?c foaf:given ?given ;\n               foaf:family ?family } .\n  FILTER isBlank(?c)\n}\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: \"application/x-sparql-query\",\n        tabMode: \"indent\",\n        matchBrackets: true\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>application/x-sparql-query</code>.</p>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/sparql/sparql.js",
    "content": "CodeMirror.defineMode(\"sparql\", function(config) {\n  var indentUnit = config.indentUnit;\n  var curPunc;\n\n  function wordRegexp(words) {\n    return new RegExp(\"^(?:\" + words.join(\"|\") + \")$\", \"i\");\n  }\n  var ops = wordRegexp([\"str\", \"lang\", \"langmatches\", \"datatype\", \"bound\", \"sameterm\", \"isiri\", \"isuri\",\n                        \"isblank\", \"isliteral\", \"union\", \"a\"]);\n  var keywords = wordRegexp([\"base\", \"prefix\", \"select\", \"distinct\", \"reduced\", \"construct\", \"describe\",\n                             \"ask\", \"from\", \"named\", \"where\", \"order\", \"limit\", \"offset\", \"filter\", \"optional\",\n                             \"graph\", \"by\", \"asc\", \"desc\"]);\n  var operatorChars = /[*+\\-<>=&|]/;\n\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    curPunc = null;\n    if (ch == \"$\" || ch == \"?\") {\n      stream.match(/^[\\w\\d]*/);\n      return \"variable-2\";\n    }\n    else if (ch == \"<\" && !stream.match(/^[\\s\\u00a0=]/, false)) {\n      stream.match(/^[^\\s\\u00a0>]*>?/);\n      return \"atom\";\n    }\n    else if (ch == \"\\\"\" || ch == \"'\") {\n      state.tokenize = tokenLiteral(ch);\n      return state.tokenize(stream, state);\n    }\n    else if (/[{}\\(\\),\\.;\\[\\]]/.test(ch)) {\n      curPunc = ch;\n      return null;\n    }\n    else if (ch == \"#\") {\n      stream.skipToEnd();\n      return \"comment\";\n    }\n    else if (operatorChars.test(ch)) {\n      stream.eatWhile(operatorChars);\n      return null;\n    }\n    else if (ch == \":\") {\n      stream.eatWhile(/[\\w\\d\\._\\-]/);\n      return \"atom\";\n    }\n    else {\n      stream.eatWhile(/[_\\w\\d]/);\n      if (stream.eat(\":\")) {\n        stream.eatWhile(/[\\w\\d_\\-]/);\n        return \"atom\";\n      }\n      var word = stream.current(), type;\n      if (ops.test(word))\n        return null;\n      else if (keywords.test(word))\n        return \"keyword\";\n      else\n        return \"variable\";\n    }\n  }\n\n  function tokenLiteral(quote) {\n    return function(stream, state) {\n      var escaped = false, ch;\n      while ((ch = stream.next()) != null) {\n        if (ch == quote && !escaped) {\n          state.tokenize = tokenBase;\n          break;\n        }\n        escaped = !escaped && ch == \"\\\\\";\n      }\n      return \"string\";\n    };\n  }\n\n  function pushContext(state, type, col) {\n    state.context = {prev: state.context, indent: state.indent, col: col, type: type};\n  }\n  function popContext(state) {\n    state.indent = state.context.indent;\n    state.context = state.context.prev;\n  }\n\n  return {\n    startState: function(base) {\n      return {tokenize: tokenBase,\n              context: null,\n              indent: 0,\n              col: 0};\n    },\n\n    token: function(stream, state) {\n      if (stream.sol()) {\n        if (state.context && state.context.align == null) state.context.align = false;\n        state.indent = stream.indentation();\n      }\n      if (stream.eatSpace()) return null;\n      var style = state.tokenize(stream, state);\n\n      if (style != \"comment\" && state.context && state.context.align == null && state.context.type != \"pattern\") {\n        state.context.align = true;\n      }\n\n      if (curPunc == \"(\") pushContext(state, \")\", stream.column());\n      else if (curPunc == \"[\") pushContext(state, \"]\", stream.column());\n      else if (curPunc == \"{\") pushContext(state, \"}\", stream.column());\n      else if (/[\\]\\}\\)]/.test(curPunc)) {\n        while (state.context && state.context.type == \"pattern\") popContext(state);\n        if (state.context && curPunc == state.context.type) popContext(state);\n      }\n      else if (curPunc == \".\" && state.context && state.context.type == \"pattern\") popContext(state);\n      else if (/atom|string|variable/.test(style) && state.context) {\n        if (/[\\}\\]]/.test(state.context.type))\n          pushContext(state, \"pattern\", stream.column());\n        else if (state.context.type == \"pattern\" && !state.context.align) {\n          state.context.align = true;\n          state.context.col = stream.column();\n        }\n      }\n      \n      return style;\n    },\n\n    indent: function(state, textAfter) {\n      var firstChar = textAfter && textAfter.charAt(0);\n      var context = state.context;\n      if (/[\\]\\}]/.test(firstChar))\n        while (context && context.type == \"pattern\") context = context.prev;\n\n      var closing = context && firstChar == context.type;\n      if (!context)\n        return 0;\n      else if (context.type == \"pattern\")\n        return context.col;\n      else if (context.align)\n        return context.col + (closing ? 0 : 1);\n      else\n        return context.indent + (closing ? 0 : indentUnit);\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"application/x-sparql-query\", \"sparql\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/stex/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: sTeX mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"stex.js\"></script>\n    <style>.CodeMirror {background: #f8f8f8;}</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: sTeX mode</h1>\n     <form><textarea id=\"code\" name=\"code\">\n\\begin{module}[id=bbt-size]\n\\importmodule[balanced-binary-trees]{balanced-binary-trees}\n\\importmodule[\\KWARCslides{dmath/en/cardinality}]{cardinality}\n\n\\begin{frame}\n  \\frametitle{Size Lemma for Balanced Trees}\n  \\begin{itemize}\n  \\item\n    \\begin{assertion}[id=size-lemma,type=lemma] \n    Let $G=\\tup{V,E}$ be a \\termref[cd=binary-trees]{balanced binary tree} \n    of \\termref[cd=graph-depth,name=vertex-depth]{depth}$n>i$, then the set\n     $\\defeq{\\livar{V}i}{\\setst{\\inset{v}{V}}{\\gdepth{v} = i}}$ of\n    \\termref[cd=graphs-intro,name=node]{nodes} at \n    \\termref[cd=graph-depth,name=vertex-depth]{depth} $i$ has\n    \\termref[cd=cardinality,name=cardinality]{cardinality} $\\power2i$.\n   \\end{assertion}\n  \\item\n    \\begin{sproof}[id=size-lemma-pf,proofend=,for=size-lemma]{via induction over the depth $i$.}\n      \\begin{spfcases}{We have to consider two cases}\n        \\begin{spfcase}{$i=0$}\n          \\begin{spfstep}[display=flow]\n            then $\\livar{V}i=\\set{\\livar{v}r}$, where $\\livar{v}r$ is the root, so\n            $\\eq{\\card{\\livar{V}0},\\card{\\set{\\livar{v}r}},1,\\power20}$.\n          \\end{spfstep}\n        \\end{spfcase}\n        \\begin{spfcase}{$i>0$}\n          \\begin{spfstep}[display=flow]\n           then $\\livar{V}{i-1}$ contains $\\power2{i-1}$ vertexes \n           \\begin{justification}[method=byIH](IH)\\end{justification}\n          \\end{spfstep}\n          \\begin{spfstep}\n           By the \\begin{justification}[method=byDef]definition of a binary\n              tree\\end{justification}, each $\\inset{v}{\\livar{V}{i-1}}$ is a leaf or has\n            two children that are at depth $i$.\n          \\end{spfstep}\n          \\begin{spfstep}\n           As $G$ is \\termref[cd=balanced-binary-trees,name=balanced-binary-tree]{balanced} and $\\gdepth{G}=n>i$, $\\livar{V}{i-1}$ cannot contain\n            leaves.\n          \\end{spfstep}\n          \\begin{spfstep}[type=conclusion]\n           Thus $\\eq{\\card{\\livar{V}i},{\\atimes[cdot]{2,\\card{\\livar{V}{i-1}}}},{\\atimes[cdot]{2,\\power2{i-1}}},\\power2i}$.\n          \\end{spfstep}\n        \\end{spfcase}\n      \\end{spfcases}\n    \\end{sproof}\n  \\item \n    \\begin{assertion}[id=fbbt,type=corollary]\t\n      A fully balanced tree of depth $d$ has $\\power2{d+1}-1$ nodes.\n    \\end{assertion}\n  \\item\n      \\begin{sproof}[for=fbbt,id=fbbt-pf]{}\n        \\begin{spfstep}\n          Let $\\defeq{G}{\\tup{V,E}}$ be a fully balanced tree\n        \\end{spfstep}\n        \\begin{spfstep}\n          Then $\\card{V}=\\Sumfromto{i}1d{\\power2i}= \\power2{d+1}-1$.\n        \\end{spfstep}\n      \\end{sproof}\n    \\end{itemize}\n  \\end{frame}\n\\begin{note}\n  \\begin{omtext}[type=conclusion,for=binary-tree]\n    This shows that balanced binary trees grow in breadth very quickly, a consequence of\n    this is that they are very shallow (and this compute very fast), which is the essence of\n    the next result.\n  \\end{omtext}\n\\end{note}\n\\end{module}\n\n%%% Local Variables: \n%%% mode: LaTeX\n%%% TeX-master: \"all\"\n%%% End: \\end{document}\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {});\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-stex</code>.</p>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/stex/stex.js",
    "content": "/*\n * Author: Constantin Jucovschi (c.jucovschi@jacobs-university.de)\n * Licence: MIT\n */\n\nCodeMirror.defineMode(\"stex\", function(cmCfg, modeCfg) \n{    \n    function pushCommand(state, command) {\n\tstate.cmdState.push(command);\n    }\n\n    function peekCommand(state) { \n\tif (state.cmdState.length>0)\n\t    return state.cmdState[state.cmdState.length-1];\n\telse\n\t    return null;\n    }\n\n    function popCommand(state) {\n\tif (state.cmdState.length>0) {\n\t    var plug = state.cmdState.pop();\n\t    plug.closeBracket();\n\t}\t    \n    }\n\n    function applyMostPowerful(state) {\n      var context = state.cmdState;\n      for (var i = context.length - 1; i >= 0; i--) {\n\t  var plug = context[i];\n\t  if (plug.name==\"DEFAULT\")\n\t      continue;\n\t  return plug.styleIdentifier();\n      }\n      return null;\n    }\n\n    function addPluginPattern(pluginName, cmdStyle, brackets, styles) {\n\treturn function () {\n\t    this.name=pluginName;\n\t    this.bracketNo = 0;\n\t    this.style=cmdStyle;\n\t    this.styles = styles;\n\t    this.brackets = brackets;\n\n\t    this.styleIdentifier = function(content) {\n\t\tif (this.bracketNo<=this.styles.length)\n\t\t    return this.styles[this.bracketNo-1];\n\t\telse\n\t\t    return null;\n\t    };\n\t    this.openBracket = function(content) {\n\t\tthis.bracketNo++;\n\t\treturn \"bracket\";\n\t    };\n\t    this.closeBracket = function(content) {\n\t    };\n\t}\n    }\n\n    var plugins = new Array();\n   \n    plugins[\"importmodule\"] = addPluginPattern(\"importmodule\", \"tag\", \"{[\", [\"string\", \"builtin\"]);\n    plugins[\"documentclass\"] = addPluginPattern(\"documentclass\", \"tag\", \"{[\", [\"\", \"atom\"]);\n    plugins[\"usepackage\"] = addPluginPattern(\"documentclass\", \"tag\", \"[\", [\"atom\"]);\n    plugins[\"begin\"] = addPluginPattern(\"documentclass\", \"tag\", \"[\", [\"atom\"]);\n    plugins[\"end\"] = addPluginPattern(\"documentclass\", \"tag\", \"[\", [\"atom\"]);\n\n    plugins[\"DEFAULT\"] = function () {\n\tthis.name=\"DEFAULT\";\n\tthis.style=\"tag\";\n\n\tthis.styleIdentifier = function(content) {\n\t};\n\tthis.openBracket = function(content) {\n\t};\n\tthis.closeBracket = function(content) {\n\t};\n    };\n\n    function setState(state, f) {\n\tstate.f = f;\n    }\n\n    function normal(source, state) {\n\tif (source.match(/^\\\\[a-zA-Z@]+/)) {\n\t    var cmdName = source.current();\n\t    cmdName = cmdName.substr(1, cmdName.length-1);\n\t    var plug = plugins[cmdName];\n\t    if (typeof(plug) == 'undefined') {\n\t\tplug = plugins[\"DEFAULT\"];\n\t    }\n\t    plug = new plug();\n\t    pushCommand(state, plug);\n\t    setState(state, beginParams);\n\t    return plug.style;\n\t}\n\n        // escape characters \n        if (source.match(/^\\\\[$&%#{}_]/)) {\n          return \"tag\";\n        }\n\n        // white space control characters\n        if (source.match(/^\\\\[,;!\\/]/)) {\n          return \"tag\";\n        }\n\n\tvar ch = source.next();\n\tif (ch == \"%\") {\n            // special case: % at end of its own line; stay in same state\n            if (!source.eol()) {\n              setState(state, inCComment);\n            }\n\t    return \"comment\";\n\t} \n\telse if (ch=='}' || ch==']') {\n\t    plug = peekCommand(state);\n\t    if (plug) {\n\t\tplug.closeBracket(ch);\n\t\tsetState(state, beginParams);\n\t    } else\n\t\treturn \"error\";\n\t    return \"bracket\";\n\t} else if (ch=='{' || ch=='[') {\n\t    plug = plugins[\"DEFAULT\"];\t    \n\t    plug = new plug();\n\t    pushCommand(state, plug);\n\t    return \"bracket\";\t    \n\t}\n\telse if (/\\d/.test(ch)) {\n\t    source.eatWhile(/[\\w.%]/);\n\t    return \"atom\";\n\t}\n\telse {\n\t    source.eatWhile(/[\\w-_]/);\n\t    return applyMostPowerful(state);\n\t}\n    }\n\n    function inCComment(source, state) {\n\tsource.skipToEnd();\n\tsetState(state, normal);\n\treturn \"comment\";\n    }\n\n    function beginParams(source, state) {\n\tvar ch = source.peek();\n\tif (ch == '{' || ch == '[') {\n\t   var lastPlug = peekCommand(state);\n\t   var style = lastPlug.openBracket(ch);\n\t   source.eat(ch);\n\t   setState(state, normal);\n\t   return \"bracket\";\n\t}\n\tif (/[ \\t\\r]/.test(ch)) {\n\t    source.eat(ch);\n\t    return null;\n\t}\n\tsetState(state, normal);\n\tlastPlug = peekCommand(state);\n\tif (lastPlug) {\n\t    popCommand(state);\n\t}\n        return normal(source, state);\n    }\n\n    return {\n     startState: function() { return { f:normal, cmdState:[] }; },\n\t copyState: function(s) { return { f: s.f, cmdState: s.cmdState.slice(0, s.cmdState.length) }; },\n\t \n\t token: function(stream, state) {\n\t var t = state.f(stream, state);\n\t var w = stream.current();\n\t return t;\n     }\n };\n});\n\n\nCodeMirror.defineMIME(\"text/x-stex\", \"stex\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/stex/test.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: sTeX mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"stex.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../test/mode_test.css\">\n    <script src=\"../../test/mode_test.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>Tests for the sTeX Mode</h1>\n    <h2>Basics</h2>\n    <script language=\"javascript\">\n      MT = ModeTest;\n\n      MT.test('foo',\n        null, 'foo');\n\n      MT.test('foo bar',\n        null, 'foo',\n        null, ' bar');\n    </script>\n\n    <h2>Tags</h2>\n    <script language=\"javascript\">\n      MT.test('\\\\begin{document}\\n\\\\end{document}',\n        'tag',     '\\\\begin',\n        'bracket', '{',\n        'atom',    'document',\n        'bracket', '}',\n        'tag',     '\\\\end',\n        'bracket', '{',\n        'atom',    'document',\n        'bracket', '}');\n\n      MT.test('\\\\begin{equation}\\n  E=mc^2\\n\\\\end{equation}',\n        'tag',     '\\\\begin',\n        'bracket', '{',\n        'atom',    'equation',\n        'bracket', '}',\n        null,      ' ',\n        null,      ' ',\n        null,      'E',\n        null,      '=mc',\n        null,      '^2',\n        'tag',     '\\\\end',\n        'bracket', '{',\n        'atom',    'equation',\n        'bracket', '}');\n\n      MT.test('\\\\begin{module}[]',\n        'tag',     '\\\\begin',\n        'bracket', '{',\n        'atom',    'module',\n        'bracket', '}',\n        'bracket', '[',\n        'bracket', ']');\n\n      MT.test('\\\\begin{module}[id=bbt-size]',\n        'tag',     '\\\\begin',\n        'bracket', '{',\n        'atom',    'module',\n        'bracket', '}',\n        'bracket', '[',\n        null,      'id',\n        null,      '=bbt-size',\n        'bracket', ']');\n\n      MT.test('\\\\importmodule[b-b-t]{b-b-t}',\n        'tag',     '\\\\importmodule',\n        'bracket', '[',\n        'string',   'b-b-t',\n        'bracket', ']',\n        'bracket', '{',\n        'builtin', 'b-b-t',\n        'bracket', '}');\n\n      MT.test('\\\\importmodule[\\\\KWARCslides{dmath/en/cardinality}]{card}',\n        'tag',     '\\\\importmodule',\n        'bracket', '[',\n        'tag',     '\\\\KWARCslides',\n        'bracket', '{',\n        'string',   'dmath',\n        'string',   '/en',\n        'string',   '/cardinality',\n        'bracket', '}',\n        'bracket', ']',\n        'bracket', '{',\n        'builtin', 'card',\n        'bracket', '}');\n\n      MT.test('\\\\PSforPDF[1]{#1}', // could treat #1 specially\n        'tag',     '\\\\PSforPDF',\n        'bracket', '[',\n        'atom',    '1',\n        'bracket', ']',\n        'bracket', '{',\n        null,      '#1',\n        'bracket', '}');\n    </script>\n\n    <h2>Comments</h2>\n    <script language=\"javascript\">\n      MT.test('% foo',\n        'comment', '%',\n        'comment', ' foo');\n\n      MT.test('\\\\item% bar',\n        'tag',     '\\\\item',\n        'comment', '%',\n        'comment', ' bar');\n\n      MT.test(' % \\\\item',\n        null,      ' ',\n        'comment', '%',\n        'comment', ' \\\\item');\n\n      MT.test('%\\nfoo',\n        'comment', '%',\n        null, 'foo');\n    </script>\n\n    <h2>Errors</h2>\n    <script language=\"javascript\">\n      MT.test('\\\\begin}{',\n        'tag',     '\\\\begin',\n        'error',   '}',\n        'bracket', '{');\n\n      MT.test('\\\\item]{',\n        'tag',     '\\\\item',\n        'error',   ']',\n        'bracket', '{');\n\n      MT.test('% }',\n        'comment', '%',\n        'comment', ' }');\n    </script>\n\n    <h2>Character Escapes</h2>\n    <script language=\"javascript\">\n      MT.test('the \\\\# key',\n        null,  'the',\n        null,  ' ',\n        'tag', '\\\\#',\n        null,  ' key');\n\n      MT.test('a \\\\$5 stetson',\n        null, 'a',\n        null, ' ',\n        'tag', '\\\\$',\n        'atom', 5,\n        null, ' stetson');\n\n      MT.test('100\\\\% beef',\n        'atom', '100',\n        'tag', '\\\\%',\n        null, ' beef');\n\n      MT.test('L \\\\& N',\n        null, 'L',\n        null, ' ',\n        'tag', '\\\\&',\n        null, ' N');\n\n      MT.test('foo\\\\_bar',\n        null, 'foo',\n        'tag', '\\\\_',\n        null, 'bar');\n\n      MT.test('\\\\emph{\\\\{}',\n        'tag',    '\\\\emph',\n        'bracket','{',\n        'tag',    '\\\\{',\n        'bracket','}');\n\n      MT.test('\\\\emph{\\\\}}',\n        'tag',    '\\\\emph',\n        'bracket','{',\n        'tag',    '\\\\}',\n        'bracket','}');\n\n      MT.test('section \\\\S1',\n        null,  'section',\n        null,  ' ',\n        'tag', '\\\\S',\n        'atom',  '1');\n\n      MT.test('para \\\\P2',\n        null,  'para',\n        null,  ' ',\n        'tag', '\\\\P',\n        'atom',  '2');\n\n    </script>\n\n    <h2>Spacing control</h2>\n\n    <script language=\"javascript\">\n      MT.test('x\\\\,y', // thinspace\n        null,  'x',\n        'tag', '\\\\,',\n        null,  'y');\n\n      MT.test('x\\\\;y', // thickspace\n        null,  'x',\n        'tag', '\\\\;',\n        null,  'y');\n\n      MT.test('x\\\\!y', // negative thinspace\n        null,  'x',\n        'tag', '\\\\!',\n        null,  'y');\n\n      MT.test('J.\\\\ L.\\\\ is', // period not ending a sentence\n        null, 'J',\n        null, '.',\n        null, '\\\\',\n        null, ' L',\n        null, '.',\n        null, '\\\\',\n        null, ' is'); // maybe could be better\n\n      MT.test('X\\\\@. The', // period ending a sentence\n        null,  'X',\n        'tag', '\\\\@',\n        null,  '.',\n        null,  ' The');\n\n      MT.test('{\\\\em If\\\\/} I', // italic correction\n        'bracket', '{',\n        'tag',     '\\\\em',\n        null,      ' ',\n        null,      'If',\n        'tag',     '\\\\/',\n        'bracket', '}',\n        null,      ' ',\n        null,      'I');\n\n    </script>\n\n    <h2>Summary</h2>\n    <script language=\"javascript\">\n      MT.printSummary();\n    </script>\n\n  </body>\n</html>\n\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/tiddlywiki/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: TiddlyWiki mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"tiddlywiki.js\"></script>\n    <link rel=\"stylesheet\" href=\"tiddlywiki.css\">\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n  </head>\n  <body>\n    <h1>CodeMirror: TiddlyWiki mode</h1>\n\n<div><textarea id=\"code\" name=\"code\">\n!TiddlyWiki Formatting\n* Rendered versions can be found at: http://www.tiddlywiki.com/#Reference\n\n|!Option            | !Syntax            |\n|bold font          | ''bold''           |\n|italic type        | //italic//         |\n|underlined text    | __underlined__     |\n|strikethrough text | --strikethrough--  |\n|superscript text   | super^^script^^    |\n|subscript text     | sub~~script~~      |\n|highlighted text   | @@highlighted@@    |\n|preformatted text  | {{{preformatted}}} |\n\n!Block Elements\n<<<\n!Heading 1\n\n!!Heading 2\n\n!!!Heading 3\n\n!!!!Heading 4\n\n!!!!!Heading 5\n<<<\n\n!!Lists\n<<<\n* unordered list, level 1\n** unordered list, level 2\n*** unordered list, level 3\n\n# ordered list, level 1\n## ordered list, level 2\n### unordered list, level 3\n\n; definition list, term\n: definition list, description\n<<<\n\n!!Blockquotes\n<<<\n> blockquote, level 1\n>> blockquote, level 2\n>>> blockquote, level 3\n\n> blockquote\n<<<\n\n!!Preformatted Text\n<<<\n{{{\npreformatted (e.g. code)\n}}}\n<<<\n\n!!Code Sections\n<<<\n{{{\nText style code\n}}}\n\n//{{{\nJS styled code. TiddlyWiki mixed mode should support highlighter switching in the future.\n//}}}\n\n<!--{{{-->\nXML styled code. TiddlyWiki mixed mode should support highlighter switching in the future.\n<!--}}}-->\n<<<\n\n!!Tables\n<<<\n|CssClass|k\n|!heading column 1|!heading column 2|\n|row 1, column 1|row 1, column 2|\n|row 2, column 1|row 2, column 2|\n|>|COLSPAN|\n|ROWSPAN| ... |\n|~| ... |\n|CssProperty:value;...| ... |\n|caption|c\n\n''Annotation:''\n* The {{{>}}} marker creates a \"colspan\", causing the current cell to merge with the one to the right.\n* The {{{~}}} marker creates a \"rowspan\", causing the current cell to merge with the one above.\n<<<\n!!Images /% TODO %/\ncf. [[TiddlyWiki.com|http://www.tiddlywiki.com/#EmbeddedImages]]\n\n!Hyperlinks\n* [[WikiWords|WikiWord]] are automatically transformed to hyperlinks to the respective tiddler\n** the automatic transformation can be suppressed by preceding the respective WikiWord with a tilde ({{{~}}}): {{{~WikiWord}}}\n* [[PrettyLinks]] are enclosed in square brackets and contain the desired tiddler name: {{{[[tiddler name]]}}}\n** optionally, a custom title or description can be added, separated by a pipe character ({{{|}}}): {{{[[title|target]]}}}<br>'''N.B.:''' In this case, the target can also be any website (i.e. URL).\n\n!Custom Styling\n* {{{@@CssProperty:value;CssProperty:value;...@@}}}<br>''N.B.:'' CSS color definitions should use lowercase letters to prevent the inadvertent creation of WikiWords.\n* <html><code>{{customCssClass{...}}}</code></html>\n* raw HTML can be inserted by enclosing the respective code in HTML tags: {{{<html> ... </html>}}}\n\n!Special Markers\n* {{{<br>}}} forces a manual line break\n* {{{----}}} creates a horizontal ruler\n* [[HTML entities|http://www.tiddlywiki.com/#HtmlEntities]]\n* [[HTML entities local|HtmlEntities]]\n* {{{<<macroName>>}}} calls the respective [[macro|Macros]]\n* To hide text within a tiddler so that it is not displayed, it can be wrapped in {{{/%}}} and {{{%/}}}.<br/>This can be a useful trick for hiding drafts or annotating complex markup.\n* To prevent wiki markup from taking effect for a particular section, that section can be enclosed in three double quotes: e.g. {{{\"\"\"WikiWord\"\"\"}}}.\n</textarea></div>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: 'tiddlywiki',      \n        lineNumbers: true,\n        enterMode: 'keep',\n        matchBrackets: true\n      });\n    </script>\n\n    <p>TiddlyWiki mode supports a single configuration.</p>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-tiddlywiki</code>.</p>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/tiddlywiki/tiddlywiki.css",
    "content": "span.cm-underlined {\n  text-decoration: underline;\n}\nspan.cm-strikethrough {\n  text-decoration: line-through;\n}\nspan.cm-brace {\n  color: #170;\n  font-weight: bold;\n}\nspan.cm-table {\n  color: blue;\n  font-weight: bold;\n}\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/tiddlywiki/tiddlywiki.js",
    "content": "/***\n|''Name''|tiddlywiki.js|\n|''Description''|Enables TiddlyWikiy syntax highlighting using CodeMirror|\n|''Author''|PMario|\n|''Version''|0.1.7|\n|''Status''|''stable''|\n|''Source''|[[GitHub|https://github.com/pmario/CodeMirror2/blob/tw-syntax/mode/tiddlywiki]]|\n|''Documentation''|http://codemirror.tiddlyspace.com/|\n|''License''|[[MIT License|http://www.opensource.org/licenses/mit-license.php]]|\n|''CoreVersion''|2.5.0|\n|''Requires''|codemirror.js|\n|''Keywords''|syntax highlighting color code mirror codemirror|\n! Info\nCoreVersion parameter is needed for TiddlyWiki only!\n***/\n//{{{\nCodeMirror.defineMode(\"tiddlywiki\", function (config, parserConfig) {\n\tvar indentUnit = config.indentUnit;\n\n\t// Tokenizer\n\tvar textwords = function () {\n\t\tfunction kw(type) {\n\t\t\treturn {\n\t\t\t\ttype: type,\n\t\t\t\tstyle: \"text\"\n\t\t\t};\n\t\t}\n\t\treturn {};\n\t}();\n\n\tvar keywords = function () {\n\t\tfunction kw(type) {\n\t\t\treturn { type: type, style: \"macro\"};\n\t\t}\n\t\treturn {\n\t\t\t\"allTags\": kw('allTags'), \"closeAll\": kw('closeAll'), \"list\": kw('list'),\n\t\t\t\"newJournal\": kw('newJournal'), \"newTiddler\": kw('newTiddler'),\n\t\t\t\"permaview\": kw('permaview'), \"saveChanges\": kw('saveChanges'),\n\t\t\t\"search\": kw('search'), \"slider\": kw('slider'),\t\"tabs\": kw('tabs'),\n\t\t\t\"tag\": kw('tag'), \"tagging\": kw('tagging'),\t\"tags\": kw('tags'),\n\t\t\t\"tiddler\": kw('tiddler'), \"timeline\": kw('timeline'),\n\t\t\t\"today\": kw('today'), \"version\": kw('version'),\t\"option\": kw('option'),\n\n\t\t\t\"with\": kw('with'),\n\t\t\t\"filter\": kw('filter')\n\t\t};\n\t}();\n\n\tvar isSpaceName = /[\\w_\\-]/i,\n\t\treHR = /^\\-\\-\\-\\-+$/,\t\t\t\t\t// <hr>\n\t\treWikiCommentStart = /^\\/\\*\\*\\*$/,\t\t// /***\n\t\treWikiCommentStop = /^\\*\\*\\*\\/$/,\t\t// ***/\n\t\treBlockQuote = /^<<<$/,\n\n\t\treJsCodeStart = /^\\/\\/\\{\\{\\{$/,\t\t\t// //{{{ js block start\n\t\treJsCodeStop = /^\\/\\/\\}\\}\\}$/,\t\t\t// //}}} js stop\n\t\treXmlCodeStart = /^<!--\\{\\{\\{-->$/,\t\t// xml block start\n\t\treXmlCodeStop = /^<!--\\}\\}\\}-->$/,\t\t// xml stop\n\n\t\treCodeBlockStart = /^\\{\\{\\{$/,\t\t\t// {{{ TW text div block start\n\t\treCodeBlockStop = /^\\}\\}\\}$/,\t\t\t// }}} TW text stop\n\n\t\treCodeStart = /\\{\\{\\{/,\t\t\t\t\t// {{{ code span start\n\t\treUntilCodeStop = /.*?\\}\\}\\}/;\n\n\tfunction chain(stream, state, f) {\n\t\tstate.tokenize = f;\n\t\treturn f(stream, state);\n\t}\n\n\t// used for strings\n\tfunction nextUntilUnescaped(stream, end) {\n\t\tvar escaped = false,\n\t\t\tnext;\n\t\twhile ((next = stream.next()) != null) {\n\t\t\tif (next == end && !escaped) return false;\n\t\t\tescaped = !escaped && next == \"\\\\\";\n\t\t}\n\t\treturn escaped;\n\t}\n\n\t// Used as scratch variables to communicate multiple values without\n\t// consing up tons of objects.\n\tvar type, content;\n\n\tfunction ret(tp, style, cont) {\n\t\ttype = tp;\n\t\tcontent = cont;\n\t\treturn style;\n\t}\n\n\tfunction jsTokenBase(stream, state) {\n\t\tvar sol = stream.sol(), \n\t\t\tch, tch;\n\t\t\t\n\t\tstate.block = false;\t// indicates the start of a code block.\n\n\t\tch = stream.peek(); \t// don't eat, to make matching simpler\n\t\t\n\t\t// check start of  blocks\n\t\tif (sol && /[<\\/\\*{}\\-]/.test(ch)) {\n\t\t\tif (stream.match(reCodeBlockStart)) {\n\t\t\t\tstate.block = true;\n\t\t\t\treturn chain(stream, state, twTokenCode);\n\t\t\t}\n\t\t\tif (stream.match(reBlockQuote)) {\n\t\t\t\treturn ret('quote', 'quote');\n\t\t\t}\n\t\t\tif (stream.match(reWikiCommentStart) || stream.match(reWikiCommentStop)) {\n\t\t\t\treturn ret('code', 'comment');\n\t\t\t}\n\t\t\tif (stream.match(reJsCodeStart) || stream.match(reJsCodeStop) || stream.match(reXmlCodeStart) || stream.match(reXmlCodeStop)) {\n\t\t\t\treturn ret('code', 'comment');\n\t\t\t}\n\t\t\tif (stream.match(reHR)) {\n\t\t\t\treturn ret('hr', 'hr');\n\t\t\t}\n\t\t} // sol\n\t\tch = stream.next();\n\n\t\tif (sol && /[\\/\\*!#;:>|]/.test(ch)) {\n\t\t\tif (ch == \"!\") { // tw header\n\t\t\t\tstream.skipToEnd();\n\t\t\t\treturn ret(\"header\", \"header\");\n\t\t\t}\n\t\t\tif (ch == \"*\") { // tw list\n\t\t\t\tstream.eatWhile('*');\n\t\t\t\treturn ret(\"list\", \"comment\");\n\t\t\t}\n\t\t\tif (ch == \"#\") { // tw numbered list\n\t\t\t\tstream.eatWhile('#');\n\t\t\t\treturn ret(\"list\", \"comment\");\n\t\t\t}\n\t\t\tif (ch == \";\") { // definition list, term\n\t\t\t\tstream.eatWhile(';');\n\t\t\t\treturn ret(\"list\", \"comment\");\n\t\t\t}\n\t\t\tif (ch == \":\") { // definition list, description\n\t\t\t\tstream.eatWhile(':');\n\t\t\t\treturn ret(\"list\", \"comment\");\n\t\t\t}\n\t\t\tif (ch == \">\") { // single line quote\n\t\t\t\tstream.eatWhile(\">\");\n\t\t\t\treturn ret(\"quote\", \"quote\");\n\t\t\t}\n\t\t\tif (ch == '|') {\n\t\t\t\treturn ret('table', 'header');\n\t\t\t}\n\t\t}\n\n\t\tif (ch == '{' && stream.match(/\\{\\{/)) {\n\t\t\treturn chain(stream, state, twTokenCode);\n\t\t}\n\n\t\t// rudimentary html:// file:// link matching. TW knows much more ...\n\t\tif (/[hf]/i.test(ch)) {\n\t\t\tif (/[ti]/i.test(stream.peek()) && stream.match(/\\b(ttps?|tp|ile):\\/\\/[\\-A-Z0-9+&@#\\/%?=~_|$!:,.;]*[A-Z0-9+&@#\\/%=~_|$]/i)) {\n\t\t\t\treturn ret(\"link\", \"link\");\n\t\t\t}\n\t\t}\n\t\t// just a little string indicator, don't want to have the whole string covered\n\t\tif (ch == '\"') {\n\t\t\treturn ret('string', 'string');\n\t\t}\n\t\tif (ch == '~') {\t// _no_ CamelCase indicator should be bold\n\t\t\treturn ret('text', 'brace');\n\t\t}\n\t\tif (/[\\[\\]]/.test(ch)) { // check for [[..]]\n\t\t\tif (stream.peek() == ch) {\n\t\t\t\tstream.next();\n\t\t\t\treturn ret('brace', 'brace');\n\t\t\t}\n\t\t}\n\t\tif (ch == \"@\") {\t// check for space link. TODO fix @@...@@ highlighting\n\t\t\tstream.eatWhile(isSpaceName);\n\t\t\treturn ret(\"link\", \"link\");\n\t\t}\n\t\tif (/\\d/.test(ch)) {\t// numbers\n\t\t\tstream.eatWhile(/\\d/);\n\t\t\treturn ret(\"number\", \"number\");\n\t\t}\n\t\tif (ch == \"/\") { // tw invisible comment\n\t\t\tif (stream.eat(\"%\")) {\n\t\t\t\treturn chain(stream, state, twTokenComment);\n\t\t\t}\n\t\t\telse if (stream.eat(\"/\")) { // \n\t\t\t\treturn chain(stream, state, twTokenEm);\n\t\t\t}\n\t\t}\n\t\tif (ch == \"_\") { // tw underline\n\t\t\tif (stream.eat(\"_\")) {\n\t\t\t\treturn chain(stream, state, twTokenUnderline);\n\t\t\t}\n\t\t}\n\t\t// strikethrough and mdash handling\n\t\tif (ch == \"-\") {\n\t\t\tif (stream.eat(\"-\")) {\n\t\t\t\t// if strikethrough looks ugly, change CSS.\n\t\t\t\tif (stream.peek() != ' ')\n\t\t\t\t\treturn chain(stream, state, twTokenStrike);\n\t\t\t\t// mdash\n\t\t\t\tif (stream.peek() == ' ')\n\t\t\t\t\treturn ret('text', 'brace');\n\t\t\t}\n\t\t}\n\t\tif (ch == \"'\") { // tw bold\n\t\t\tif (stream.eat(\"'\")) {\n\t\t\t\treturn chain(stream, state, twTokenStrong);\n\t\t\t}\n\t\t}\n\t\tif (ch == \"<\") { // tw macro\n\t\t\tif (stream.eat(\"<\")) {\n\t\t\t\treturn chain(stream, state, twTokenMacro);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn ret(ch);\n\t\t}\n\n\t\t// core macro handling\n\t\tstream.eatWhile(/[\\w\\$_]/);\n\t\tvar word = stream.current(),\n\t\t\tknown = textwords.propertyIsEnumerable(word) && textwords[word];\n\n\t\treturn known ? ret(known.type, known.style, word) : ret(\"text\", null, word);\n\n\t} // jsTokenBase()\n\n\tfunction twTokenString(quote) {\n\t\treturn function (stream, state) {\n\t\t\tif (!nextUntilUnescaped(stream, quote)) state.tokenize = jsTokenBase;\n\t\t\treturn ret(\"string\", \"string\");\n\t\t};\n\t}\n\n\t// tw invisible comment\n\tfunction twTokenComment(stream, state) {\n\t\tvar maybeEnd = false,\n\t\t\tch;\n\t\twhile (ch = stream.next()) {\n\t\t\tif (ch == \"/\" && maybeEnd) {\n\t\t\t\tstate.tokenize = jsTokenBase;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmaybeEnd = (ch == \"%\");\n\t\t}\n\t\treturn ret(\"comment\", \"comment\");\n\t}\n\n\t// tw strong / bold\n\tfunction twTokenStrong(stream, state) {\n\t\tvar maybeEnd = false,\n\t\t\tch;\n\t\twhile (ch = stream.next()) {\n\t\t\tif (ch == \"'\" && maybeEnd) {\n\t\t\t\tstate.tokenize = jsTokenBase;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmaybeEnd = (ch == \"'\");\n\t\t}\n\t\treturn ret(\"text\", \"strong\");\n\t}\n\n\t// tw code\n\tfunction twTokenCode(stream, state) {\n\t\tvar ch, sb = state.block;\n\t\t\n\t\tif (sb && stream.current()) {\n\t\t\treturn ret(\"code\", \"comment\");\n\t\t}\n\n\t\tif (!sb && stream.match(reUntilCodeStop)) {\n\t\t\tstate.tokenize = jsTokenBase;\n\t\t\treturn ret(\"code\", \"comment\");\n\t\t}\n\n\t\tif (sb && stream.sol() && stream.match(reCodeBlockStop)) {\n\t\t\tstate.tokenize = jsTokenBase;\n\t\t\treturn ret(\"code\", \"comment\");\n\t\t}\n\n\t\tch = stream.next();\n\t\treturn (sb) ? ret(\"code\", \"comment\") : ret(\"code\", \"comment\");\n\t}\n\n\t// tw em / italic\n\tfunction twTokenEm(stream, state) {\n\t\tvar maybeEnd = false,\n\t\t\tch;\n\t\twhile (ch = stream.next()) {\n\t\t\tif (ch == \"/\" && maybeEnd) {\n\t\t\t\tstate.tokenize = jsTokenBase;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmaybeEnd = (ch == \"/\");\n\t\t}\n\t\treturn ret(\"text\", \"em\");\n\t}\n\n\t// tw underlined text\n\tfunction twTokenUnderline(stream, state) {\n\t\tvar maybeEnd = false,\n\t\t\tch;\n\t\twhile (ch = stream.next()) {\n\t\t\tif (ch == \"_\" && maybeEnd) {\n\t\t\t\tstate.tokenize = jsTokenBase;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmaybeEnd = (ch == \"_\");\n\t\t}\n\t\treturn ret(\"text\", \"underlined\");\n\t}\n\n\t// tw strike through text looks ugly\n\t// change CSS if needed\n\tfunction twTokenStrike(stream, state) {\n\t\tvar maybeEnd = false,\n\t\t\tch, nr;\n\t\t\t\n\t\twhile (ch = stream.next()) {\n\t\t\tif (ch == \"-\" && maybeEnd) {\n\t\t\t\tstate.tokenize = jsTokenBase;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmaybeEnd = (ch == \"-\");\n\t\t}\n\t\treturn ret(\"text\", \"strikethrough\");\n\t}\n\n\t// macro\n\tfunction twTokenMacro(stream, state) {\n\t\tvar ch, tmp, word, known;\n\n\t\tif (stream.current() == '<<') {\n\t\t\treturn ret('brace', 'macro');\n\t\t}\n\n\t\tch = stream.next();\n\t\tif (!ch) {\n\t\t\tstate.tokenize = jsTokenBase;\n\t\t\treturn ret(ch);\n\t\t}\n\t\tif (ch == \">\") {\n\t\t\tif (stream.peek() == '>') {\n\t\t\t\tstream.next();\n\t\t\t\tstate.tokenize = jsTokenBase;\n\t\t\t\treturn ret(\"brace\", \"macro\");\n\t\t\t}\n\t\t}\n\n\t\tstream.eatWhile(/[\\w\\$_]/);\n\t\tword = stream.current();\n\t\tknown = keywords.propertyIsEnumerable(word) && keywords[word];\n\n\t\tif (known) {\n\t\t\treturn ret(known.type, known.style, word);\n\t\t}\n\t\telse {\n\t\t\treturn ret(\"macro\", null, word);\n\t\t}\n\t}\n\n\t// Interface\n\treturn {\n\t\tstartState: function (basecolumn) {\n\t\t\treturn {\n\t\t\t\ttokenize: jsTokenBase,\n\t\t\t\tindented: 0,\n\t\t\t\tlevel: 0\n\t\t\t};\n\t\t},\n\n\t\ttoken: function (stream, state) {\n\t\t\tif (stream.eatSpace()) return null;\n\t\t\tvar style = state.tokenize(stream, state);\n\t\t\treturn style;\n\t\t},\n\n\t\telectricChars: \"\"\n\t};\n});\n\nCodeMirror.defineMIME(\"text/x-tiddlywiki\", \"tiddlywiki\");\n//}}}\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/tiki/index.html",
    "content": "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <title>CodeMirror: Tiki wiki mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"tiki.js\"></script>\n    <link rel=\"stylesheet\" href=\"tiki.css\">\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n  </head>\n  <body style=\"padding: 20px;\">\n    <h1>CodeMirror: Tiki wiki mode</h1>\n\n<div><textarea id=\"code\" name=\"code\">\nHeadings\n!Header 1\n!!Header 2\n!!!Header 3\n!!!!Header 4\n!!!!!Header 5\n!!!!!!Header 6\n\nStyling\n-=titlebar=-\n^^ Box on multi\nlines\nof content^^\n__bold__\n''italic''\n===underline===\n::center::\n--Line Through--\n\nOperators\n~np~No parse~/np~\n\nLink\n[link|desc|nocache]\n\nWiki\n((Wiki))\n((Wiki|desc))\n((Wiki|desc|timeout))\n\nTable\n||row1 col1|row1 col2|row1 col3\nrow2 col1|row2 col2|row2 col3\nrow3 col1|row3 col2|row3 col3||\n\nLists:\n*bla\n**bla-1\n++continue-bla-1\n***bla-2\n++continue-bla-1\n*bla\n+continue-bla\n#bla\n** tra-la-la\n+continue-bla\n#bla\n\nPlugin (standard):\n{PLUGIN(attr=\"my attr\")}\nPlugin Body\n{PLUGIN}\n\nPlugin (inline):\n{plugin attr=\"my attr\"}\n</textarea></div>\n\n<script type=\"text/javascript\">\n\tvar editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: 'tiki',      \n        lineNumbers: true,\n        enterMode: 'keep',\n        matchBrackets: true\n    });\n</script>\n\n</body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/tiki/tiki.css",
    "content": ".cm-tw-syntaxerror {\n\tcolor: #FFFFFF;\n\tbackground-color: #990000;\n}\n\n.cm-tw-deleted {\n\ttext-decoration: line-through;\n}\n\n.cm-tw-header5 {\n\tfont-weight: bold;\n}\n.cm-tw-listitem:first-child { /*Added first child to fix duplicate padding when highlighting*/\n\tpadding-left: 10px;\n}\n\n.cm-tw-box {\n\tborder-top-width: 0px ! important;\n\tborder-style: solid;\n\tborder-width: 1px;\n\tborder-color: inherit;\n}\n\n.cm-tw-underline {\n\ttext-decoration: underline;\n}"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/tiki/tiki.js",
    "content": "CodeMirror.defineMode('tiki', function(config, parserConfig) {\n\tfunction inBlock(style, terminator, returnTokenizer) {\n\t\treturn function(stream, state) {\n\t\t\twhile (!stream.eol()) {\n\t\t\t\tif (stream.match(terminator)) {\n\t\t\t\t\tstate.tokenize = inText;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tstream.next();\n\t\t\t}\n\t\t\t\n\t\t\tif (returnTokenizer) state.tokenize = returnTokenizer;\n\t\t\t\n\t\t\treturn style;\n\t\t};\n\t}\n\t\n\tfunction inLine(style, terminator) {\n\t\treturn function(stream, state) {\n\t\t\twhile(!stream.eol()) {\n\t\t\t\tstream.next()\n\t\t\t}\n\t\t\tstate.tokenize = inText;\n\t\t\treturn style;\n\t\t};\n\t}\n\t\n\tfunction inText(stream, state) {\n\t\tfunction chain(parser) {\n\t\t\tstate.tokenize = parser;\n\t\t\treturn parser(stream, state);\n\t\t}\n\t\t\n\t\tvar sol = stream.sol();\n\t\tvar ch = stream.next();\n\t\t\n\t\t//non start of line\n\t\tswitch (ch) { //switch is generally much faster than if, so it is used here\n\t\t\tcase \"{\": //plugin\n\t\t\t\ttype = stream.eat(\"/\") ? \"closeTag\" : \"openTag\";\n\t\t\t\tstream.eatSpace();\n\t\t\t\ttagName = \"\";\n\t\t\t\tvar c;\n\t\t\t\twhile ((c = stream.eat(/[^\\s\\u00a0=\\\"\\'\\/?(}]/))) tagName += c;\n\t\t\t\tstate.tokenize = inPlugin;\n\t\t\t\treturn \"tag\";\n\t\t\t\tbreak;\n\t\t\tcase \"_\": //bold\n\t\t\t\tif (stream.eat(\"_\")) {\n\t\t\t\t\treturn chain(inBlock(\"strong\", \"__\", inText));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"'\": //italics\n\t\t\t\tif (stream.eat(\"'\")) {\n\t\t\t\t\t// Italic text\n\t\t\t\t\treturn chain(inBlock(\"em\", \"''\", inText));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"(\":// Wiki Link\n\t\t\t\tif (stream.eat(\"(\")) {\n\t\t\t\t\treturn chain(inBlock(\"variable-2\", \"))\", inText));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"[\":// Weblink\n\t\t\t\treturn chain(inBlock(\"variable-3\", \"]\", inText));\n\t\t\t\tbreak;\n\t\t\tcase \"|\": //table\n\t\t\t\tif (stream.eat(\"|\")) {\n\t\t\t\t\treturn chain(inBlock(\"comment\", \"||\"));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"-\": \n\t\t\t\tif (stream.eat(\"=\")) {//titleBar\n\t\t\t\t\treturn chain(inBlock(\"header string\", \"=-\", inText));\n\t\t\t\t} else if (stream.eat(\"-\")) {//deleted\n\t\t\t\t\treturn chain(inBlock(\"error tw-deleted\", \"--\", inText));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"=\": //underline\n\t\t\t\tif (stream.match(\"==\")) {\n\t\t\t\t\treturn chain(inBlock(\"tw-underline\", \"===\", inText));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \":\":\n\t\t\t\tif (stream.eat(\":\")) {\n\t\t\t\t\treturn chain(inBlock(\"comment\", \"::\"));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"^\": //box\n\t\t\t\treturn chain(inBlock(\"tw-box\", \"^\"));\n\t\t\t\tbreak;\n\t\t\tcase \"~\": //np\n\t\t\t\tif (stream.match(\"np~\")) {\n\t\t\t\t\treturn chain(inBlock(\"meta\", \"~/np~\"));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t//start of line types\n\t\tif (sol) {\n\t\t\tswitch (ch) {\n\t\t\t\tcase \"!\": //header at start of line\n\t\t\t\t\tif (stream.match('!!!!!')) {\n\t\t\t\t\t\treturn chain(inLine(\"header string\"));\n\t\t\t\t\t} else if (stream.match('!!!!')) {\n\t\t\t\t\t\treturn chain(inLine(\"header string\"));\n\t\t\t\t\t} else if (stream.match('!!!')) {\n\t\t\t\t\t\treturn chain(inLine(\"header string\"));\n\t\t\t\t\t} else if (stream.match('!!')) {\n\t\t\t\t\t\treturn chain(inLine(\"header string\"));\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn chain(inLine(\"header string\"));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\": //unordered list line item, or <li /> at start of line\n\t\t\t\tcase \"#\": //ordered list line item, or <li /> at start of line\n\t\t\t\tcase \"+\": //ordered list line item, or <li /> at start of line\n\t\t\t\t\treturn chain(inLine(\"tw-listitem bracket\"));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//stream.eatWhile(/[&{]/); was eating up plugins, turned off to act less like html and more like tiki\n\t\treturn null;\n\t}\n\t\n\tvar indentUnit = config.indentUnit;\n\n\t// Return variables for tokenizers\n\tvar pluginName, type;\n\tfunction inPlugin(stream, state) {\n\t\tvar ch = stream.next();\n\t\tvar peek = stream.peek();\n\t\t\n\t\tif (ch == \"}\") {\n\t\t\tstate.tokenize = inText;\n\t\t\t//type = ch == \")\" ? \"endPlugin\" : \"selfclosePlugin\"; inPlugin\n\t\t\treturn \"tag\";\n\t\t} else if (ch == \"(\" || ch == \")\") {\n\t\t\treturn \"bracket\";\n\t\t} else if (ch == \"=\") {\n\t\t\ttype = \"equals\";\n\t\t\t\n\t\t\tif (peek == \">\") {\n\t\t\t\tch = stream.next();\n\t\t\t\tpeek = stream.peek();\n\t\t\t}\n\t\t\t\n\t\t\t//here we detect values directly after equal character with no quotes\n\t\t\tif (!/[\\'\\\"]/.test(peek)) {\n\t\t\t\tstate.tokenize = inAttributeNoQuote();\n\t\t\t}\n\t\t\t//end detect values\n\t\t\t\n\t\t\treturn \"operator\";\n\t\t} else if (/[\\'\\\"]/.test(ch)) {\n\t\t\tstate.tokenize = inAttribute(ch);\n\t\t\treturn state.tokenize(stream, state);\n\t\t} else {\n\t\t\tstream.eatWhile(/[^\\s\\u00a0=\\\"\\'\\/?]/);\n\t\t\treturn \"keyword\";\n\t\t}\n\t}\n\n\tfunction inAttribute(quote) {\n\t\treturn function(stream, state) {\n\t\t\twhile (!stream.eol()) {\n\t\t\t\tif (stream.next() == quote) {\n\t\t\t\t\tstate.tokenize = inPlugin;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn \"string\";\n\t\t};\n\t}\n\t\n\tfunction inAttributeNoQuote() {\n\t\treturn function(stream, state) {\n\t\t\twhile (!stream.eol()) {\n\t\t\t\tvar ch = stream.next();\n\t\t\t\tvar peek = stream.peek();\n\t\t\t\tif (ch == \" \" || ch == \",\" || /[ )}]/.test(peek)) {\n\t\t\t\t\tstate.tokenize = inPlugin;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn \"string\";\n\t\t};\n\t}\n\n\tvar curState, setStyle;\n\tfunction pass() {\n\t\tfor (var i = arguments.length - 1; i >= 0; i--) curState.cc.push(arguments[i]);\n\t}\n\t\n\tfunction cont() {\n\t\tpass.apply(null, arguments);\n\t\treturn true;\n\t}\n\n\tfunction pushContext(pluginName, startOfLine) {\n\t\tvar noIndent = curState.context && curState.context.noIndent;\n\t\tcurState.context = {\n\t\t\tprev: curState.context,\n\t\t\tpluginName: pluginName,\n\t\t\tindent: curState.indented,\n\t\t\tstartOfLine: startOfLine,\n\t\t\tnoIndent: noIndent\n\t\t};\n\t}\n\t\n\tfunction popContext() {\n\t\tif (curState.context) curState.context = curState.context.prev;\n\t}\n\n\tfunction element(type) {\n\t\tif (type == \"openPlugin\") {curState.pluginName = pluginName; return cont(attributes, endplugin(curState.startOfLine));}\n\t\telse if (type == \"closePlugin\") {\n\t\t\tvar err = false;\n\t\t\tif (curState.context) {\n\t\t\t\terr = curState.context.pluginName != pluginName;\n\t\t\t\tpopContext();\n\t\t\t} else {\n\t\t\t\terr = true;\n\t\t\t}\n\t\t\tif (err) setStyle = \"error\";\n\t\t\treturn cont(endcloseplugin(err));\n\t\t}\n\t\telse if (type == \"string\") {\n\t\t\tif (!curState.context || curState.context.name != \"!cdata\") pushContext(\"!cdata\");\n\t\t\tif (curState.tokenize == inText) popContext();\n\t\t\treturn cont();\n\t\t}\n\t\telse return cont();\n\t}\n\t\n\tfunction endplugin(startOfLine) {\n\t\treturn function(type) {\n\t\t\tif (\n\t\t\ttype == \"selfclosePlugin\" ||\n\t\t\ttype == \"endPlugin\"\n\t\t)\n\t\t\t\treturn cont();\n\t\t\tif (type == \"endPlugin\") {pushContext(curState.pluginName, startOfLine); return cont();}\n\t\t\treturn cont();\n\t\t};\n\t}\n\t\n\tfunction endcloseplugin(err) {\n\t\treturn function(type) {\n\t\t\tif (err) setStyle = \"error\";\n\t\t\tif (type == \"endPlugin\") return cont();\n\t\t\treturn pass();\n\t\t}\n\t}\n\n\tfunction attributes(type) {\n\t\tif (type == \"keyword\") {setStyle = \"attribute\"; return cont(attributes);}\n\t\tif (type == \"equals\") return cont(attvalue, attributes);\n\t\treturn pass();\n\t}\n\tfunction attvalue(type) {\n\t\tif (type == \"keyword\") {setStyle = \"string\"; return cont();}\n\t\tif (type == \"string\") return cont(attvaluemaybe);\n\t\t\treturn pass();\n\t}\n\tfunction attvaluemaybe(type) {\n\t\tif (type == \"string\") return cont(attvaluemaybe);\n\t\telse return pass();\n\t}\n\treturn {\n\t\tstartState: function() {\n\t\t\treturn {tokenize: inText, cc: [], indented: 0, startOfLine: true, pluginName: null, context: null};\n\t\t},\n\t\ttoken: function(stream, state) {\n\t\t\tif (stream.sol()) {\n\t\t\t\tstate.startOfLine = true;\n\t\t\t\tstate.indented = stream.indentation();\n\t\t\t}\n\t\t\tif (stream.eatSpace()) return null;\n\n\t\t\tsetStyle = type = pluginName = null;\n\t\t\tvar style = state.tokenize(stream, state);\n\t\t\t\tif ((style || type) && style != \"comment\") {\n\t\t\t\tcurState = state;\n\t\t\t\twhile (true) {\n\t\t\t\t\tvar comb = state.cc.pop() || element;\n\t\t\t\t\tif (comb(type || style)) break;\n\t\t\t\t}\n\t\t\t}\n\t\t\tstate.startOfLine = false;\n\t\t\treturn setStyle || style;\n\t\t\t\t},\n\t\tindent: function(state, textAfter) {\n\t\t\tvar context = state.context;\n\t\t\tif (context && context.noIndent) return 0;\n\t\t\tif (context && /^{\\//.test(textAfter))\n\t\t\t\tcontext = context.prev;\n\t\t\twhile (context && !context.startOfLine)\n\t\t\t\tcontext = context.prev;\n\t\t\tif (context) return context.indent + indentUnit;\n\t\t\telse return 0;\n\t\t},\n\t\tcompareStates: function(a, b) {\n\t\t\tif (a.indented != b.indented || a.pluginName != b.pluginName) return false;\n\t\t\tfor (var ca = a.context, cb = b.context; ; ca = ca.prev, cb = cb.prev) {\n\t\t\t\tif (!ca || !cb) return ca == cb;\n\t\t\t\tif (ca.pluginName != cb.pluginName) return false;\n\t\t\t}\n\t\t},\n\t\telectricChars: \"/\"\n\t};\n});\n\n//I figure, why not\nCodeMirror.defineMIME(\"text/tiki\", \"tiki\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/vbscript/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: VBScript mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"vbscript.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n  </head>\n  <body>\n    <h1>CodeMirror: VBScript mode</h1>\n\n<div><textarea id=\"code\" name=\"code\">\n' Pete Guhl\n' 03-04-2012\n'\n' Basic VBScript support for codemirror2\n\nConst ForReading = 1, ForWriting = 2, ForAppending = 8\n\nCall Sub020_PostBroadcastToUrbanAirship(strUserName, strPassword, intTransmitID, strResponse)\n\nIf Not IsNull(strResponse) AND Len(strResponse) = 0 Then\n\tboolTransmitOkYN = False\nElse\n\t' WScript.Echo \"Oh Happy Day! Oh Happy DAY!\"\n\tboolTransmitOkYN = True\nEnd If\n</textarea></div>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/vbscript</code>.</p>\n  </body>\n</html>\n\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/vbscript/vbscript.js",
    "content": "CodeMirror.defineMode(\"vbscript\", function() {\n  var regexVBScriptKeyword = /^(?:Call|Case|CDate|Clear|CInt|CLng|Const|CStr|Description|Dim|Do|Each|Else|ElseIf|End|Err|Error|Exit|False|For|Function|If|LCase|Loop|LTrim|Next|Nothing|Now|Number|On|Preserve|Quit|ReDim|Resume|RTrim|Select|Set|Sub|Then|To|Trim|True|UBound|UCase|Until|VbCr|VbCrLf|VbLf|VbTab)$/im;\n\n  return {\n    token: function(stream) {\n      if (stream.eatSpace()) return null;\n      var ch = stream.next();\n      if (ch == \"'\") {\n      \tstream.skipToEnd();\n      \treturn \"comment\";\n      }\n      if (ch == '\"') {\n      \tstream.skipTo('\"');\n      \treturn \"string\";\n      }\n\n      if (/\\w/.test(ch)) {\n        stream.eatWhile(/\\w/);\n        if (regexVBScriptKeyword.test(stream.current())) return \"keyword\";\n      }\n      return null;\n    }\n  };\n});\n\nCodeMirror.defineMIME(\"text/vbscript\", \"vbscript\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/velocity/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Velocity mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"velocity.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../theme/night.css\">\n    <style>.CodeMirror {border: 1px solid black;}</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: Velocity mode</h1>\n    <form><textarea id=\"code\" name=\"code\">\n## Velocity Code Demo\n#*\n   based on PL/SQL mode by Peter Raganitsch, adapted to Velocity by Steve O'Hara ( http://www.pivotal-solutions.co.uk )\n   August 2011\n*#\n\n#*\n   This is a multiline comment.\n   This is the second line\n*#\n\n#[[ hello steve\n   This has invalid syntax that would normally need \"poor man's escaping\" like:\n\n   #define()\n\n   ${blah\n]]#\n\n#include( \"disclaimer.txt\" \"opinion.txt\" )\n#include( $foo $bar )\n\n#parse( \"lecorbusier.vm\" )\n#parse( $foo )\n\n#evaluate( 'string with VTL #if(true)will be displayed#end' )\n\n#define( $hello ) Hello $who #end #set( $who = \"World!\") $hello ## displays Hello World!\n\n#foreach( $customer in $customerList )\n\n    $foreach.count $customer.Name\n\n    #if( $foo == ${bar})\n        it's true!\n        #break\n    #{else}\n        it's not!\n        #stop\n    #end\n\n    #if ($foreach.parent.hasNext)\n        $velocityCount\n    #end\n#end\n\n$someObject.getValues(\"this is a string split\n        across lines\")\n\n#macro( tablerows $color $somelist )\n    #foreach( $something in $somelist )\n        <tr><td bgcolor=$color>$something</td></tr>\n    #end\n#end\n\n#tablerows(\"red\" [\"dadsdf\",\"dsa\"])\n\n   Variable reference: #set( $monkey = $bill )\n   String literal: #set( $monkey.Friend = 'monica' )\n   Property reference: #set( $monkey.Blame = $whitehouse.Leak )\n   Method reference: #set( $monkey.Plan = $spindoctor.weave($web) )\n   Number literal: #set( $monkey.Number = 123 )\n   Range operator: #set( $monkey.Numbers = [1..3] )\n   Object list: #set( $monkey.Say = [\"Not\", $my, \"fault\"] )\n   Object map: #set( $monkey.Map = {\"banana\" : \"good\", \"roast beef\" : \"bad\"})\n\nThe RHS can also be a simple arithmetic expression, such as:\nAddition: #set( $value = $foo + 1 )\n   Subtraction: #set( $value = $bar - 1 )\n   Multiplication: #set( $value = $foo * $bar )\n   Division: #set( $value = $foo / $bar )\n   Remainder: #set( $value = $foo % $bar )\n\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        tabMode: \"indent\",\n        matchBrackets: true,\n        theme: \"night\",\n        lineNumbers: true,\n        indentUnit: 4,\n        mode: \"text/velocity\"\n      });\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/velocity</code>.</p>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/velocity/velocity.js",
    "content": "CodeMirror.defineMode(\"velocity\", function(config) {\n    function parseWords(str) {\n        var obj = {}, words = str.split(\" \");\n        for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n        return obj;\n    }\n\n    var indentUnit = config.indentUnit\n    var keywords = parseWords(\"#end #else #break #stop #[[ #]] \" +\n                              \"#{end} #{else} #{break} #{stop}\");\n    var functions = parseWords(\"#if #elseif #foreach #set #include #parse #macro #define #evaluate \" +\n                               \"#{if} #{elseif} #{foreach} #{set} #{include} #{parse} #{macro} #{define} #{evaluate}\");\n    var specials = parseWords(\"$foreach.count $foreach.hasNext $foreach.first $foreach.last $foreach.topmost $foreach.parent $velocityCount\");\n    var isOperatorChar = /[+\\-*&%=<>!?:\\/|]/;\n    var multiLineStrings =true;\n\n    function chain(stream, state, f) {\n        state.tokenize = f;\n        return f(stream, state);\n    }\n    function tokenBase(stream, state) {\n        var beforeParams = state.beforeParams;\n        state.beforeParams = false;\n        var ch = stream.next();\n        // start of string?\n        if ((ch == '\"' || ch == \"'\") && state.inParams)\n            return chain(stream, state, tokenString(ch));\n        // is it one of the special signs []{}().,;? Seperator?\n        else if (/[\\[\\]{}\\(\\),;\\.]/.test(ch)) {\n            if (ch == \"(\" && beforeParams) state.inParams = true;\n            else if (ch == \")\") state.inParams = false;\n            return null;\n        }\n        // start of a number value?\n        else if (/\\d/.test(ch)) {\n            stream.eatWhile(/[\\w\\.]/);\n            return \"number\";\n        }\n        // multi line comment?\n        else if (ch == \"#\" && stream.eat(\"*\")) {\n            return chain(stream, state, tokenComment);\n        }\n        // unparsed content?\n        else if (ch == \"#\" && stream.match(/ *\\[ *\\[/)) {\n            return chain(stream, state, tokenUnparsed);\n        }\n        // single line comment?\n        else if (ch == \"#\" && stream.eat(\"#\")) {\n            stream.skipToEnd();\n            return \"comment\";\n        }\n        // variable?\n        else if (ch == \"$\") {\n            stream.eatWhile(/[\\w\\d\\$_\\.{}]/);\n            // is it one of the specials?\n            if (specials && specials.propertyIsEnumerable(stream.current().toLowerCase())) {\n                return \"keyword\";\n            }\n            else {\n                state.beforeParams = true;\n                return \"builtin\";\n            }\n        }\n        // is it a operator?\n        else if (isOperatorChar.test(ch)) {\n            stream.eatWhile(isOperatorChar);\n            return \"operator\";\n        }\n        else {\n            // get the whole word\n            stream.eatWhile(/[\\w\\$_{}]/);\n            var word = stream.current().toLowerCase();\n            // is it one of the listed keywords?\n            if (keywords && keywords.propertyIsEnumerable(word))\n                return \"keyword\";\n            // is it one of the listed functions?\n            if (functions && functions.propertyIsEnumerable(word) ||\n                stream.current().match(/^#[a-z0-9_]+ *$/i) && stream.peek()==\"(\") {\n                state.beforeParams = true;\n                return \"keyword\";\n            }\n            // default: just a \"word\"\n            return null;\n        }\n    }\n\n    function tokenString(quote) {\n        return function(stream, state) {\n            var escaped = false, next, end = false;\n            while ((next = stream.next()) != null) {\n                if (next == quote && !escaped) {\n                    end = true;\n                    break;\n                }\n                escaped = !escaped && next == \"\\\\\";\n            }\n            if (end) state.tokenize = tokenBase;\n            return \"string\";\n        };\n    }\n\n    function tokenComment(stream, state) {\n        var maybeEnd = false, ch;\n        while (ch = stream.next()) {\n            if (ch == \"#\" && maybeEnd) {\n                state.tokenize = tokenBase;\n                break;\n            }\n            maybeEnd = (ch == \"*\");\n        }\n        return \"comment\";\n    }\n\n    function tokenUnparsed(stream, state) {\n        var maybeEnd = 0, ch;\n        while (ch = stream.next()) {\n            if (ch == \"#\" && maybeEnd == 2) {\n                state.tokenize = tokenBase;\n                break;\n            }\n            if (ch == \"]\")\n                maybeEnd++;\n            else if (ch != \" \")\n                maybeEnd = 0;\n        }\n        return \"meta\";\n    }\n    // Interface\n\n    return {\n        startState: function(basecolumn) {\n            return {\n                tokenize: tokenBase,\n                beforeParams: false,\n                inParams: false\n            };\n        },\n\n        token: function(stream, state) {\n            if (stream.eatSpace()) return null;\n            return state.tokenize(stream, state);\n        }\n    };\n});\n\nCodeMirror.defineMIME(\"text/velocity\", \"velocity\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/verilog/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Verilog mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"verilog.js\"></script>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n    <style>.CodeMirror {border: 2px inset #dee;}</style>\n  </head>\n  <body>\n    <h1>CodeMirror: Verilog mode</h1>\n\n<form><textarea id=\"code\" name=\"code\">\n/* Verilog demo code */\n\n//////////////////////////////////////////////////////////////////////\n////                                                              ////\n////  wb_master_model.v                                           ////\n////                                                              ////\n////  This file is part of the SPI IP core project                ////\n////  http://www.opencores.org/projects/spi/                      ////\n////                                                              ////\n////  Author(s):                                                  ////\n////      - Simon Srot (simons@opencores.org)                     ////\n////                                                              ////\n////  Based on:                                                   ////\n////      - i2c/bench/verilog/wb_master_model.v                   ////\n////        Copyright (C) 2001 Richard Herveille                  ////\n////                                                              ////\n////  All additional information is avaliable in the Readme.txt   ////\n////  file.                                                       ////\n////                                                              ////\n//////////////////////////////////////////////////////////////////////\n////                                                              ////\n//// Copyright (C) 2002 Authors                                   ////\n////                                                              ////\n//// This source file may be used and distributed without         ////\n//// restriction provided that this copyright statement is not    ////\n//// removed from the file and that any derivative work contains  ////\n//// the original copyright notice and the associated disclaimer. ////\n////                                                              ////\n//// This source file is free software; you can redistribute it   ////\n//// and/or modify it under the terms of the GNU Lesser General   ////\n//// Public License as published by the Free Software Foundation; ////\n//// either version 2.1 of the License, or (at your option) any   ////\n//// later version.                                               ////\n////                                                              ////\n//// This source is distributed in the hope that it will be       ////\n//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////\n//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////\n//// PURPOSE.  See the GNU Lesser General Public License for more ////\n//// details.                                                     ////\n////                                                              ////\n//// You should have received a copy of the GNU Lesser General    ////\n//// Public License along with this source; if not, download it   ////\n//// from http://www.opencores.org/lgpl.shtml                     ////\n////                                                              ////\n//////////////////////////////////////////////////////////////////////\n\n`include \"timescale.v\"\n\nmodule wb_master_model(clk, rst, adr, din, dout, cyc, stb, we, sel, ack, err, rty);\n\n  parameter dwidth = 32;\n  parameter awidth = 32;\n  \n  input                  clk, rst;\n  output [awidth   -1:0] adr;\n  input  [dwidth   -1:0] din;\n  output [dwidth   -1:0] dout;\n  output                 cyc, stb;\n  output                 we;\n  output [dwidth/8 -1:0] sel;\n  input                  ack, err, rty;\n  \n  // Internal signals\n  reg    [awidth   -1:0] adr;\n  reg    [dwidth   -1:0] dout;\n  reg                    cyc, stb;\n  reg                    we;\n  reg    [dwidth/8 -1:0] sel;\n         \n  reg    [dwidth   -1:0] q;\n  \n  // Memory Logic\n  initial\n    begin\n      adr  = {awidth{1'bx}};\n      dout = {dwidth{1'bx}};\n      cyc  = 1'b0;\n      stb  = 1'bx;\n      we   = 1'hx;\n      sel  = {dwidth/8{1'bx}};\n      #1;\n    end\n  \n  // Wishbone write cycle\n  task wb_write;\n    input   delay;\n    integer delay;\n  \n    input [awidth -1:0] a;\n    input [dwidth -1:0] d;\n  \n    begin\n  \n      // wait initial delay\n      repeat(delay) @(posedge clk);\n  \n      // assert wishbone signal\n      #1;\n      adr  = a;\n      dout = d;\n      cyc  = 1'b1;\n      stb  = 1'b1;\n      we   = 1'b1;\n      sel  = {dwidth/8{1'b1}};\n      @(posedge clk);\n  \n      // wait for acknowledge from slave\n      while(~ack) @(posedge clk);\n  \n      // negate wishbone signals\n      #1;\n      cyc  = 1'b0;\n      stb  = 1'bx;\n      adr  = {awidth{1'bx}};\n      dout = {dwidth{1'bx}};\n      we   = 1'hx;\n      sel  = {dwidth/8{1'bx}};\n  \n    end\n  endtask\n  \n  // Wishbone read cycle\n  task wb_read;\n    input   delay;\n    integer delay;\n  \n    input  [awidth -1:0]  a;\n    output  [dwidth -1:0] d;\n  \n    begin\n  \n      // wait initial delay\n      repeat(delay) @(posedge clk);\n  \n      // assert wishbone signals\n      #1;\n      adr  = a;\n      dout = {dwidth{1'bx}};\n      cyc  = 1'b1;\n      stb  = 1'b1;\n      we   = 1'b0;\n      sel  = {dwidth/8{1'b1}};\n      @(posedge clk);\n  \n      // wait for acknowledge from slave\n      while(~ack) @(posedge clk);\n  \n      // negate wishbone signals\n      #1;\n      cyc  = 1'b0;\n      stb  = 1'bx;\n      adr  = {awidth{1'bx}};\n      dout = {dwidth{1'bx}};\n      we   = 1'hx;\n      sel  = {dwidth/8{1'bx}};\n      d    = din;\n  \n    end\n  endtask\n  \n  // Wishbone compare cycle (read data from location and compare with expected data)\n  task wb_cmp;\n    input   delay;\n    integer delay;\n  \n    input [awidth -1:0] a;\n    input [dwidth -1:0] d_exp;\n  \n    begin\n      wb_read (delay, a, q);\n\n      if (d_exp !== q) begin\n        $display(\"\\n--- ERROR: At address 0x%0x, got 0x%0x, expected 0x%0x at time %t\", a, q, d_exp, $time);\n        $stop;\n      end\n    end\n  endtask\n  \nendmodule\n</textarea></form>\n\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        mode: \"text/x-verilog\"\n      });\n    </script>\n\n    <p>Simple mode that tries to handle Verilog-like languages as well as it\n    can. Takes one configuration parameters: <code>keywords</code>, an\n    object whose property names are the keywords in the language.</p>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-verilog</code> (Verilog code).</p>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/verilog/verilog.js",
    "content": "CodeMirror.defineMode(\"verilog\", function(config, parserConfig) {\r\n  var indentUnit = config.indentUnit,\r\n      keywords = parserConfig.keywords || {},\r\n      blockKeywords = parserConfig.blockKeywords || {},\r\n      atoms = parserConfig.atoms || {},\r\n      hooks = parserConfig.hooks || {},\r\n      multiLineStrings = parserConfig.multiLineStrings;\r\n  var isOperatorChar = /[&|~><!\\)\\(*#%@+\\/=?\\:;}{,\\.\\^\\-\\[\\]]/;\r\n\r\n  var curPunc;\r\n\r\n  function tokenBase(stream, state) {\r\n    var ch = stream.next();\r\n    if (hooks[ch]) {\r\n      var result = hooks[ch](stream, state);\r\n      if (result !== false) return result;\r\n    }\r\n    if (ch == '\"') {\r\n      state.tokenize = tokenString(ch);\r\n      return state.tokenize(stream, state);\r\n    }\r\n    if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch)) {\r\n      curPunc = ch;\r\n      return null\r\n    }\r\n    if (/[\\d']/.test(ch)) {\r\n      stream.eatWhile(/[\\w\\.']/);\r\n      return \"number\";\r\n    }\r\n    if (ch == \"/\") {\r\n      if (stream.eat(\"*\")) {\r\n        state.tokenize = tokenComment;\r\n        return tokenComment(stream, state);\r\n      }\r\n      if (stream.eat(\"/\")) {\r\n        stream.skipToEnd();\r\n        return \"comment\";\r\n      }\r\n    }\r\n    if (isOperatorChar.test(ch)) {\r\n      stream.eatWhile(isOperatorChar);\r\n      return \"operator\";\r\n    }\r\n    stream.eatWhile(/[\\w\\$_]/);\r\n    var cur = stream.current();\r\n    if (keywords.propertyIsEnumerable(cur)) {\r\n      if (blockKeywords.propertyIsEnumerable(cur)) curPunc = \"newstatement\";\r\n      return \"keyword\";\r\n    }\r\n    if (atoms.propertyIsEnumerable(cur)) return \"atom\";\r\n    return \"word\";\r\n  }\r\n\r\n  function tokenString(quote) {\r\n    return function(stream, state) {\r\n      var escaped = false, next, end = false;\r\n      while ((next = stream.next()) != null) {\r\n        if (next == quote && !escaped) {end = true; break;}\r\n        escaped = !escaped && next == \"\\\\\";\r\n      }\r\n      if (end || !(escaped || multiLineStrings))\r\n        state.tokenize = tokenBase;\r\n      return \"string\";\r\n    };\r\n  }\r\n\r\n  function tokenComment(stream, state) {\r\n    var maybeEnd = false, ch;\r\n    while (ch = stream.next()) {\r\n      if (ch == \"/\" && maybeEnd) {\r\n        state.tokenize = tokenBase;\r\n        break;\r\n      }\r\n      maybeEnd = (ch == \"*\");\r\n    }\r\n    return \"comment\";\r\n  }\r\n\r\n  function Context(indented, column, type, align, prev) {\r\n    this.indented = indented;\r\n    this.column = column;\r\n    this.type = type;\r\n    this.align = align;\r\n    this.prev = prev;\r\n  }\r\n  function pushContext(state, col, type) {\r\n    return state.context = new Context(state.indented, col, type, null, state.context);\r\n  }\r\n  function popContext(state) {\r\n    var t = state.context.type;\r\n    if (t == \")\" || t == \"]\" || t == \"}\")\r\n      state.indented = state.context.indented;\r\n    return state.context = state.context.prev;\r\n  }\r\n\r\n  // Interface\r\n\r\n  return {\r\n    startState: function(basecolumn) {\r\n      return {\r\n        tokenize: null,\r\n        context: new Context((basecolumn || 0) - indentUnit, 0, \"top\", false),\r\n        indented: 0,\r\n        startOfLine: true\r\n      };\r\n    },\r\n\r\n    token: function(stream, state) {\r\n      var ctx = state.context;\r\n      if (stream.sol()) {\r\n        if (ctx.align == null) ctx.align = false;\r\n        state.indented = stream.indentation();\r\n        state.startOfLine = true;\r\n      }\r\n      if (stream.eatSpace()) return null;\r\n      curPunc = null;\r\n      var style = (state.tokenize || tokenBase)(stream, state);\r\n      if (style == \"comment\" || style == \"meta\") return style;\r\n      if (ctx.align == null) ctx.align = true;\r\n\r\n      if ((curPunc == \";\" || curPunc == \":\") && ctx.type == \"statement\") popContext(state);\r\n      else if (curPunc == \"{\") pushContext(state, stream.column(), \"}\");\r\n      else if (curPunc == \"[\") pushContext(state, stream.column(), \"]\");\r\n      else if (curPunc == \"(\") pushContext(state, stream.column(), \")\");\r\n      else if (curPunc == \"}\") {\r\n        while (ctx.type == \"statement\") ctx = popContext(state);\r\n        if (ctx.type == \"}\") ctx = popContext(state);\r\n        while (ctx.type == \"statement\") ctx = popContext(state);\r\n      }\r\n      else if (curPunc == ctx.type) popContext(state);\r\n      else if (ctx.type == \"}\" || ctx.type == \"top\" || (ctx.type == \"statement\" && curPunc == \"newstatement\"))\r\n        pushContext(state, stream.column(), \"statement\");\r\n      state.startOfLine = false;\r\n      return style;\r\n    },\r\n\r\n    indent: function(state, textAfter) {\r\n      if (state.tokenize != tokenBase && state.tokenize != null) return 0;\r\n      var firstChar = textAfter && textAfter.charAt(0), ctx = state.context, closing = firstChar == ctx.type;\r\n      if (ctx.type == \"statement\") return ctx.indented + (firstChar == \"{\" ? 0 : indentUnit);\r\n      else if (ctx.align) return ctx.column + (closing ? 0 : 1);\r\n      else return ctx.indented + (closing ? 0 : indentUnit);\r\n    },\r\n\r\n    electricChars: \"{}\"\r\n  };\r\n});\r\n\r\n(function() {\r\n  function words(str) {\r\n    var obj = {}, words = str.split(\" \");\r\n    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\r\n    return obj;\r\n  }\r\n\r\n  var verilogKeywords = \"always and assign automatic begin buf bufif0 bufif1 case casex casez cell cmos config \" +\r\n    \"deassign default defparam design disable edge else end endcase endconfig endfunction endgenerate endmodule \" +\r\n    \"endprimitive endspecify endtable endtask event for force forever fork function generate genvar highz0 \" +\r\n    \"highz1 if ifnone incdir include initial inout input instance integer join large liblist library localparam \" +\r\n    \"macromodule medium module nand negedge nmos nor noshowcancelled not notif0 notif1 or output parameter pmos \" +\r\n    \"posedge primitive pull0 pull1 pulldown pullup pulsestyle_onevent pulsestyle_ondetect rcmos real realtime \" +\r\n    \"reg release repeat rnmos rpmos rtran rtranif0 rtranif1 scalared showcancelled signed small specify specparam \" +\r\n    \"strong0 strong1 supply0 supply1 table task time tran tranif0 tranif1 tri tri0 tri1 triand trior trireg \" +\r\n    \"unsigned use vectored wait wand weak0 weak1 while wire wor xnor xor\";\r\n\r\n  var verilogBlockKeywords = \"begin bufif0 bufif1 case casex casez config else end endcase endconfig endfunction \" +\r\n    \"endgenerate endmodule endprimitive endspecify endtable endtask for forever function generate if ifnone \" +\r\n    \"macromodule module primitive repeat specify table task while\";\r\n\r\n  function metaHook(stream, state) {\r\n    stream.eatWhile(/[\\w\\$_]/);\r\n    return \"meta\";\r\n  }\r\n\r\n  // C#-style strings where \"\" escapes a quote.\r\n  function tokenAtString(stream, state) {\r\n    var next;\r\n    while ((next = stream.next()) != null) {\r\n      if (next == '\"' && !stream.eat('\"')) {\r\n        state.tokenize = null;\r\n        break;\r\n      }\r\n    }\r\n    return \"string\";\r\n  }\r\n\r\n  CodeMirror.defineMIME(\"text/x-verilog\", {\r\n    name: \"verilog\",\r\n    keywords: words(verilogKeywords),\r\n    blockKeywords: words(verilogBlockKeywords),\r\n    atoms: words(\"null\"),\r\n    hooks: {\"`\": metaHook, \"$\": metaHook}\r\n  });\r\n}());\r\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/xml/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: XML mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"xml.js\"></script>\n    <style type=\"text/css\">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: XML mode</h1>\n    <form><textarea id=\"code\" name=\"code\">\n&lt;html style=\"color: green\"&gt;\n  &lt;!-- this is a comment --&gt;\n  &lt;head&gt;\n    &lt;title&gt;HTML Example&lt;/title&gt;\n  &lt;/head&gt;\n  &lt;body&gt;\n    The indentation tries to be &lt;em&gt;somewhat &amp;quot;do what\n    I mean&amp;quot;&lt;/em&gt;... but might not match your style.\n  &lt;/body&gt;\n&lt;/html&gt;\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        mode: {name: \"xml\", alignCDATA: true},\n        lineNumbers: true\n      });\n    </script>\n    <p>The XML mode supports two configuration parameters:</p>\n    <dl>\n      <dt><code>htmlMode (boolean)</code></dt>\n      <dd>This switches the mode to parse HTML instead of XML. This\n      means attributes do not have to be quoted, and some elements\n      (such as <code>br</code>) do not require a closing tag.</dd>\n      <dt><code>alignCDATA (boolean)</code></dt>\n      <dd>Setting this to true will force the opening tag of CDATA\n      blocks to not be indented.</dd>\n    </dl>\n\n    <p><strong>MIME types defined:</strong> <code>application/xml</code>, <code>text/html</code>.</p>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/xml/xml.js",
    "content": "CodeMirror.defineMode(\"xml\", function(config, parserConfig) {\n  var indentUnit = config.indentUnit;\n  var Kludges = parserConfig.htmlMode ? {\n    autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,\n                      'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,\n                      'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,\n                      'track': true, 'wbr': true},\n    implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,\n                       'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,\n                       'th': true, 'tr': true},\n    contextGrabbers: {\n      'dd': {'dd': true, 'dt': true},\n      'dt': {'dd': true, 'dt': true},\n      'li': {'li': true},\n      'option': {'option': true, 'optgroup': true},\n      'optgroup': {'optgroup': true},\n      'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,\n            'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,\n            'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,\n            'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,\n            'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},\n      'rp': {'rp': true, 'rt': true},\n      'rt': {'rp': true, 'rt': true},\n      'tbody': {'tbody': true, 'tfoot': true},\n      'td': {'td': true, 'th': true},\n      'tfoot': {'tbody': true},\n      'th': {'td': true, 'th': true},\n      'thead': {'tbody': true, 'tfoot': true},\n      'tr': {'tr': true}\n    },\n    doNotIndent: {\"pre\": true},\n    allowUnquoted: true,\n    allowMissing: false\n  } : {\n    autoSelfClosers: {},\n    implicitlyClosed: {},\n    contextGrabbers: {},\n    doNotIndent: {},\n    allowUnquoted: false,\n    allowMissing: false\n  };\n  var alignCDATA = parserConfig.alignCDATA;\n\n  // Return variables for tokenizers\n  var tagName, type;\n\n  function inText(stream, state) {\n    function chain(parser) {\n      state.tokenize = parser;\n      return parser(stream, state);\n    }\n\n    var ch = stream.next();\n    if (ch == \"<\") {\n      if (stream.eat(\"!\")) {\n        if (stream.eat(\"[\")) {\n          if (stream.match(\"CDATA[\")) return chain(inBlock(\"atom\", \"]]>\"));\n          else return null;\n        }\n        else if (stream.match(\"--\")) return chain(inBlock(\"comment\", \"-->\"));\n        else if (stream.match(\"DOCTYPE\", true, true)) {\n          stream.eatWhile(/[\\w\\._\\-]/);\n          return chain(doctype(1));\n        }\n        else return null;\n      }\n      else if (stream.eat(\"?\")) {\n        stream.eatWhile(/[\\w\\._\\-]/);\n        state.tokenize = inBlock(\"meta\", \"?>\");\n        return \"meta\";\n      }\n      else {\n        type = stream.eat(\"/\") ? \"closeTag\" : \"openTag\";\n        stream.eatSpace();\n        tagName = \"\";\n        var c;\n        while ((c = stream.eat(/[^\\s\\u00a0=<>\\\"\\'\\/?]/))) tagName += c;\n        state.tokenize = inTag;\n        return \"tag\";\n      }\n    }\n    else if (ch == \"&\") {\n      var ok;\n      if (stream.eat(\"#\")) {\n        if (stream.eat(\"x\")) {\n          ok = stream.eatWhile(/[a-fA-F\\d]/) && stream.eat(\";\");          \n        } else {\n          ok = stream.eatWhile(/[\\d]/) && stream.eat(\";\");\n        }\n      } else {\n        ok = stream.eatWhile(/[\\w\\.\\-:]/) && stream.eat(\";\");\n      }\n      return ok ? \"atom\" : \"error\";\n    }\n    else {\n      stream.eatWhile(/[^&<]/);\n      return null;\n    }\n  }\n\n  function inTag(stream, state) {\n    var ch = stream.next();\n    if (ch == \">\" || (ch == \"/\" && stream.eat(\">\"))) {\n      state.tokenize = inText;\n      type = ch == \">\" ? \"endTag\" : \"selfcloseTag\";\n      return \"tag\";\n    }\n    else if (ch == \"=\") {\n      type = \"equals\";\n      return null;\n    }\n    else if (/[\\'\\\"]/.test(ch)) {\n      state.tokenize = inAttribute(ch);\n      return state.tokenize(stream, state);\n    }\n    else {\n      stream.eatWhile(/[^\\s\\u00a0=<>\\\"\\'\\/?]/);\n      return \"word\";\n    }\n  }\n\n  function inAttribute(quote) {\n    return function(stream, state) {\n      while (!stream.eol()) {\n        if (stream.next() == quote) {\n          state.tokenize = inTag;\n          break;\n        }\n      }\n      return \"string\";\n    };\n  }\n\n  function inBlock(style, terminator) {\n    return function(stream, state) {\n      while (!stream.eol()) {\n        if (stream.match(terminator)) {\n          state.tokenize = inText;\n          break;\n        }\n        stream.next();\n      }\n      return style;\n    };\n  }\n  function doctype(depth) {\n    return function(stream, state) {\n      var ch;\n      while ((ch = stream.next()) != null) {\n        if (ch == \"<\") {\n          state.tokenize = doctype(depth + 1);\n          return state.tokenize(stream, state);\n        } else if (ch == \">\") {\n          if (depth == 1) {\n            state.tokenize = inText;\n            break;\n          } else {\n            state.tokenize = doctype(depth - 1);\n            return state.tokenize(stream, state);\n          }\n        }\n      }\n      return \"meta\";\n    };\n  }\n\n  var curState, setStyle;\n  function pass() {\n    for (var i = arguments.length - 1; i >= 0; i--) curState.cc.push(arguments[i]);\n  }\n  function cont() {\n    pass.apply(null, arguments);\n    return true;\n  }\n\n  function pushContext(tagName, startOfLine) {\n    var noIndent = Kludges.doNotIndent.hasOwnProperty(tagName) || (curState.context && curState.context.noIndent);\n    curState.context = {\n      prev: curState.context,\n      tagName: tagName,\n      indent: curState.indented,\n      startOfLine: startOfLine,\n      noIndent: noIndent\n    };\n  }\n  function popContext() {\n    if (curState.context) curState.context = curState.context.prev;\n  }\n\n  function element(type) {\n    if (type == \"openTag\") {\n      curState.tagName = tagName;\n      return cont(attributes, endtag(curState.startOfLine));\n    } else if (type == \"closeTag\") {\n      var err = false;\n      if (curState.context) {\n        if (curState.context.tagName != tagName) {\n          if (Kludges.implicitlyClosed.hasOwnProperty(curState.context.tagName.toLowerCase())) {\n            popContext();\n          }\n          err = !curState.context || curState.context.tagName != tagName;\n        }\n      } else {\n        err = true;\n      }\n      if (err) setStyle = \"error\";\n      return cont(endclosetag(err));\n    }\n    return cont();\n  }\n  function endtag(startOfLine) {\n    return function(type) {\n      if (type == \"selfcloseTag\" ||\n          (type == \"endTag\" && Kludges.autoSelfClosers.hasOwnProperty(curState.tagName.toLowerCase()))) {\n        maybePopContext(curState.tagName.toLowerCase());\n        return cont();\n      }\n      if (type == \"endTag\") {\n        maybePopContext(curState.tagName.toLowerCase());\n        pushContext(curState.tagName, startOfLine);\n        return cont();\n      }\n      return cont();\n    };\n  }\n  function endclosetag(err) {\n    return function(type) {\n      if (err) setStyle = \"error\";\n      if (type == \"endTag\") { popContext(); return cont(); }\n      setStyle = \"error\";\n      return cont(arguments.callee);\n    }\n  }\n  function maybePopContext(nextTagName) {\n    var parentTagName;\n    while (true) {\n      if (!curState.context) {\n        return;\n      }\n      parentTagName = curState.context.tagName.toLowerCase();\n      if (!Kludges.contextGrabbers.hasOwnProperty(parentTagName) ||\n          !Kludges.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {\n        return;\n      }\n      popContext();\n    }\n  }\n\n  function attributes(type) {\n    if (type == \"word\") {setStyle = \"attribute\"; return cont(attribute, attributes);}\n    if (type == \"endTag\" || type == \"selfcloseTag\") return pass();\n    setStyle = \"error\";\n    return cont(attributes);\n  }\n  function attribute(type) {\n    if (type == \"equals\") return cont(attvalue, attributes);\n    if (!Kludges.allowMissing) setStyle = \"error\";\n    return (type == \"endTag\" || type == \"selfcloseTag\") ? pass() : cont();\n  }\n  function attvalue(type) {\n    if (type == \"string\") return cont(attvaluemaybe);\n    if (type == \"word\" && Kludges.allowUnquoted) {setStyle = \"string\"; return cont();}\n    setStyle = \"error\";\n    return (type == \"endTag\" || type == \"selfCloseTag\") ? pass() : cont();\n  }\n  function attvaluemaybe(type) {\n    if (type == \"string\") return cont(attvaluemaybe);\n    else return pass();\n  }\n\n  return {\n    startState: function() {\n      return {tokenize: inText, cc: [], indented: 0, startOfLine: true, tagName: null, context: null};\n    },\n\n    token: function(stream, state) {\n      if (stream.sol()) {\n        state.startOfLine = true;\n        state.indented = stream.indentation();\n      }\n      if (stream.eatSpace()) return null;\n\n      setStyle = type = tagName = null;\n      var style = state.tokenize(stream, state);\n      state.type = type;\n      if ((style || type) && style != \"comment\") {\n        curState = state;\n        while (true) {\n          var comb = state.cc.pop() || element;\n          if (comb(type || style)) break;\n        }\n      }\n      state.startOfLine = false;\n      return setStyle || style;\n    },\n\n    indent: function(state, textAfter, fullLine) {\n      var context = state.context;\n      if ((state.tokenize != inTag && state.tokenize != inText) ||\n          context && context.noIndent)\n        return fullLine ? fullLine.match(/^(\\s*)/)[0].length : 0;\n      if (alignCDATA && /<!\\[CDATA\\[/.test(textAfter)) return 0;\n      if (context && /^<\\//.test(textAfter))\n        context = context.prev;\n      while (context && !context.startOfLine)\n        context = context.prev;\n      if (context) return context.indent + indentUnit;\n      else return 0;\n    },\n\n    compareStates: function(a, b) {\n      if (a.indented != b.indented || a.tokenize != b.tokenize) return false;\n      for (var ca = a.context, cb = b.context; ; ca = ca.prev, cb = cb.prev) {\n        if (!ca || !cb) return ca == cb;\n        if (ca.tagName != cb.tagName) return false;\n      }\n    },\n\n    electricChars: \"/\"\n  };\n});\n\nCodeMirror.defineMIME(\"application/xml\", \"xml\");\nif (!CodeMirror.mimeModes.hasOwnProperty(\"text/html\"))\n  CodeMirror.defineMIME(\"text/html\", {name: \"xml\", htmlMode: true});\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/xquery/LICENSE",
    "content": "Copyright (C) 2011 by MarkLogic Corporation\nAuthor: Mike Brevoort <mike@brevoort.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE."
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/xquery/index.html",
    "content": "<!doctype html> \n<html> \n<!--\n/*\nCopyright (C) 2011 by MarkLogic Corporation\nAuthor: Mike Brevoort <mike@brevoort.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\n-->\n  <head> \n    <title>CodeMirror 2: JavaScript mode</title> \n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\"> \n    <script src=\"http://codemirror.net/lib/codemirror.js\"></script> \n    <script src=\"xquery.js\"></script> \n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\"> \n    <link rel=\"stylesheet\" href=\"../../theme/xq-dark.css\"> \n    <style type=\"text/css\">\n\t\t\t.CodeMirror {\n\t\t\t\tborder-top: 1px solid black; border-bottom: 1px solid black;\n\t\t\t}\n\t\t\t.CodeMirror-scroll {\n\t\t\t\theight:400px;\n\t\t\t}\n\t\t</style> \n  </head> \n  <body> \n    <h1>CodeMirror 2: XQuery mode</h1> \n \n<div class=\"cm-s-default\"> \n\t<textarea id=\"code\" name=\"code\"> \nxquery version &quot;1.0-ml&quot;;\n(: this is\n : a \n   \"comment\" :)\nlet $let := &lt;x attr=&quot;value&quot;&gt;&quot;test&quot;&lt;func&gt;function() $var {function()} {$var}&lt;/func&gt;&lt;/x&gt;\nlet $joe:=1\nreturn element element {\n\tattribute attribute { 1 },\n\telement test { &#39;a&#39; }, \n\tattribute foo { &quot;bar&quot; },\n\tfn:doc()[ foo/@bar eq $let ],\n\t//x }    \n \n(: a more 'evil' test :)\n(: Modified Blakeley example (: with nested comment :) ... :)\ndeclare private function local:declare() {()};\ndeclare private function local:private() {()};\ndeclare private function local:function() {()};\ndeclare private function local:local() {()};\nlet $let := &lt;let&gt;let $let := &quot;let&quot;&lt;/let&gt;\nreturn element element {\n\tattribute attribute { try { xdmp:version() } catch($e) { xdmp:log($e) } },\n\tattribute fn:doc { &quot;bar&quot; castable as xs:string },\n\telement text { text { &quot;text&quot; } },\n\tfn:doc()[ child::eq/(@bar | attribute::attribute) eq $let ],\n\t//fn:doc\n}\n\n\n\nxquery version &quot;1.0-ml&quot;;\n\n(: Copyright 2006-2010 Mark Logic Corporation. :)\n\n(:\n : Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\n : you may not use this file except in compliance with the License.\n : You may obtain a copy of the License at\n :\n :     http://www.apache.org/licenses/LICENSE-2.0\n :\n : Unless required by applicable law or agreed to in writing, software\n : distributed under the License is distributed on an &quot;AS IS&quot; BASIS,\n : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n : See the License for the specific language governing permissions and\n : limitations under the License.\n :)\n\nmodule namespace json = &quot;http://marklogic.com/json&quot;;\ndeclare default function namespace &quot;http://www.w3.org/2005/xpath-functions&quot;;\n\n(: Need to backslash escape any double quotes, backslashes, and newlines :)\ndeclare function json:escape($s as xs:string) as xs:string {\n  let $s := replace($s, &quot;\\\\&quot;, &quot;\\\\\\\\&quot;)\n  let $s := replace($s, &quot;&quot;&quot;&quot;, &quot;\\\\&quot;&quot;&quot;)\n  let $s := replace($s, codepoints-to-string((13, 10)), &quot;\\\\n&quot;)\n  let $s := replace($s, codepoints-to-string(13), &quot;\\\\n&quot;)\n  let $s := replace($s, codepoints-to-string(10), &quot;\\\\n&quot;)\n  return $s\n};\n\ndeclare function json:atomize($x as element()) as xs:string {\n  if (count($x/node()) = 0) then 'null'\n  else if ($x/@type = &quot;number&quot;) then\n    let $castable := $x castable as xs:float or\n                     $x castable as xs:double or\n                     $x castable as xs:decimal\n    return\n    if ($castable) then xs:string($x)\n    else error(concat(&quot;Not a number: &quot;, xdmp:describe($x)))\n  else if ($x/@type = &quot;boolean&quot;) then\n    let $castable := $x castable as xs:boolean\n    return\n    if ($castable) then xs:string(xs:boolean($x))\n    else error(concat(&quot;Not a boolean: &quot;, xdmp:describe($x)))\n  else concat('&quot;', json:escape($x), '&quot;')\n};\n\n(: Print the thing that comes after the colon :)\ndeclare function json:print-value($x as element()) as xs:string {\n  if (count($x/*) = 0) then\n    json:atomize($x)\n  else if ($x/@quote = &quot;true&quot;) then\n    concat('&quot;', json:escape(xdmp:quote($x/node())), '&quot;')\n  else\n    string-join(('{',\n      string-join(for $i in $x/* return json:print-name-value($i), &quot;,&quot;),\n    '}'), &quot;&quot;)\n};\n\n(: Print the name and value both :)\ndeclare function json:print-name-value($x as element()) as xs:string? {\n  let $name := name($x)\n  let $first-in-array :=\n    count($x/preceding-sibling::*[name(.) = $name]) = 0 and\n    (count($x/following-sibling::*[name(.) = $name]) &gt; 0 or $x/@array = &quot;true&quot;)\n  let $later-in-array := count($x/preceding-sibling::*[name(.) = $name]) &gt; 0\n  return\n\n  if ($later-in-array) then\n    ()  (: I was handled previously :)\n  else if ($first-in-array) then\n    string-join(('&quot;', json:escape($name), '&quot;:[',\n      string-join((for $i in ($x, $x/following-sibling::*[name(.) = $name]) return json:print-value($i)), &quot;,&quot;),\n    ']'), &quot;&quot;)\n   else\n     string-join(('&quot;', json:escape($name), '&quot;:', json:print-value($x)), &quot;&quot;)\n};\n\n(:~\n  Transforms an XML element into a JSON string representation.  See http://json.org.\n  &lt;p/&gt;\n  Sample usage:\n  &lt;pre&gt;\n    xquery version &quot;1.0-ml&quot;;\n    import module namespace json=&quot;http://marklogic.com/json&quot; at &quot;json.xqy&quot;;\n    json:serialize(&amp;lt;foo&amp;gt;&amp;lt;bar&amp;gt;kid&amp;lt;/bar&amp;gt;&amp;lt;/foo&amp;gt;)\n  &lt;/pre&gt;\n  Sample transformations:\n  &lt;pre&gt;\n  &amp;lt;e/&amp;gt; becomes {&quot;e&quot;:null}\n  &amp;lt;e&amp;gt;text&amp;lt;/e&amp;gt; becomes {&quot;e&quot;:&quot;text&quot;}\n  &amp;lt;e&amp;gt;quote &quot; escaping&amp;lt;/e&amp;gt; becomes {&quot;e&quot;:&quot;quote \\&quot; escaping&quot;}\n  &amp;lt;e&amp;gt;backslash \\ escaping&amp;lt;/e&amp;gt; becomes {&quot;e&quot;:&quot;backslash \\\\ escaping&quot;}\n  &amp;lt;e&amp;gt;&amp;lt;a&amp;gt;text1&amp;lt;/a&amp;gt;&amp;lt;b&amp;gt;text2&amp;lt;/b&amp;gt;&amp;lt;/e&amp;gt; becomes {&quot;e&quot;:{&quot;a&quot;:&quot;text1&quot;,&quot;b&quot;:&quot;text2&quot;}}\n  &amp;lt;e&amp;gt;&amp;lt;a&amp;gt;text1&amp;lt;/a&amp;gt;&amp;lt;a&amp;gt;text2&amp;lt;/a&amp;gt;&amp;lt;/e&amp;gt; becomes {&quot;e&quot;:{&quot;a&quot;:[&quot;text1&quot;,&quot;text2&quot;]}}\n  &amp;lt;e&amp;gt;&amp;lt;a array=&quot;true&quot;&amp;gt;text1&amp;lt;/a&amp;gt;&amp;lt;/e&amp;gt; becomes {&quot;e&quot;:{&quot;a&quot;:[&quot;text1&quot;]}}\n  &amp;lt;e&amp;gt;&amp;lt;a type=&quot;boolean&quot;&amp;gt;false&amp;lt;/a&amp;gt;&amp;lt;/e&amp;gt; becomes {&quot;e&quot;:{&quot;a&quot;:false}}\n  &amp;lt;e&amp;gt;&amp;lt;a type=&quot;number&quot;&amp;gt;123.5&amp;lt;/a&amp;gt;&amp;lt;/e&amp;gt; becomes {&quot;e&quot;:{&quot;a&quot;:123.5}}\n  &amp;lt;e quote=&quot;true&quot;&amp;gt;&amp;lt;div attrib=&quot;value&quot;/&amp;gt;&amp;lt;/e&amp;gt; becomes {&quot;e&quot;:&quot;&amp;lt;div attrib=\\&quot;value\\&quot;/&amp;gt;&quot;}\n  &lt;/pre&gt;\n  &lt;p/&gt;\n  Namespace URIs are ignored.  Namespace prefixes are included in the JSON name.\n  &lt;p/&gt;\n  Attributes are ignored, except for the special attribute @array=&quot;true&quot; that\n  indicates the JSON serialization should write the node, even if single, as an\n  array, and the attribute @type that can be set to &quot;boolean&quot; or &quot;number&quot; to\n  dictate the value should be written as that type (unquoted).  There's also\n  an @quote attribute that when set to true writes the inner content as text\n  rather than as structured JSON, useful for sending some XHTML over the\n  wire.\n  &lt;p/&gt;\n  Text nodes within mixed content are ignored.\n\n  @param $x Element node to convert\n  @return String holding JSON serialized representation of $x\n\n  @author Jason Hunter\n  @version 1.0.1\n  \n  Ported to xquery 1.0-ml; double escaped backslashes in json:escape\n:)\ndeclare function json:serialize($x as element())  as xs:string {\n  string-join(('{', json:print-name-value($x), '}'), &quot;&quot;)\n};\n  </textarea> \n</div> \n \n    <script> \n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers: true,\n        matchBrackets: true,\n        theme: \"xq-dark\"\n      });\n    </script> \n \n    <p><strong>MIME types defined:</strong> <code>application/xquery</code>.</p> \n \n    <p>Development of the CodeMirror XQuery mode was sponsored by \n      <a href=\"http://marklogic.com\">MarkLogic</a> and developed by \n      <a href=\"https://twitter.com/mbrevoort\">Mike Brevoort</a>.\n    </p>\n \n  </body> \n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/xquery/test/index.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n      \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n  <head>\n    <link rel=\"stylesheet\" href=\"http://code.jquery.com/qunit/qunit-git.css\" type=\"text/css\"/>\n    <script src=\"http://code.jquery.com/jquery-latest.js\"> </script>\n    <script type=\"text/javascript\" src=\"http://code.jquery.com/qunit/qunit-git.js\"></script>\n\n    <script src=\"../../../lib/codemirror.js\"></script> \n    <script src=\"../xquery.js\"></script>\n\n    <script type=\"text/javascript\" src=\"testBase.js\"></script>\n    <script type=\"text/javascript\" src=\"testMultiAttr.js\"></script>\n    <script type=\"text/javascript\" src=\"testQuotes.js\"></script>\n    <script type=\"text/javascript\" src=\"testEmptySequenceKeyword.js\"></script>\n    <script type=\"text/javascript\" src=\"testProcessingInstructions.js\"></script>\n    <script type=\"text/javascript\" src=\"testNamespaces.js\"></script>\n  </head>\n  <body>\n    <h1 id=\"qunit-header\">XQuery CodeMirror Mode</h1>\n    <h2 id=\"qunit-banner\"></h2>\n    <h2 id=\"qunit-userAgent\"></h2>\n    <ol id=\"qunit-tests\">\n    </ol>\n    <div id=\"sandbox\" style=\"right:5000px; position:absolute; \"></div>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/xquery/test/testBase.js",
    "content": "  $(document).ready(function(){\n    module(\"testBase\");\n    test(\"eviltest\", function() {\n      expect(1);\n\n      var input = 'xquery version &quot;1.0-ml&quot;;\\\n      (: this is\\\n       : a \\\n         \"comment\" :)\\\n      let $let := &lt;x attr=&quot;value&quot;&gt;&quot;test&quot;&lt;func&gt;function() $var {function()} {$var}&lt;/func&gt;&lt;/x&gt;\\\n      let $joe:=1\\\n      return element element {\\\n          attribute attribute { 1 },\\\n          element test { &#39;a&#39; }, \\\n          attribute foo { &quot;bar&quot; },\\\n          fn:doc()[ foo/@bar eq $let ],\\\n          //x }    \\\n       \\\n      (: a more \\'evil\\' test :)\\\n      (: Modified Blakeley example (: with nested comment :) ... :)\\\n      declare private function local:declare() {()};\\\n      declare private function local:private() {()};\\\n      declare private function local:function() {()};\\\n      declare private function local:local() {()};\\\n      let $let := &lt;let&gt;let $let := &quot;let&quot;&lt;/let&gt;\\\n      return element element {\\\n          attribute attribute { try { xdmp:version() } catch($e) { xdmp:log($e) } },\\\n          attribute fn:doc { &quot;bar&quot; castable as xs:string },\\\n          element text { text { &quot;text&quot; } },\\\n          fn:doc()[ child::eq/(@bar | attribute::attribute) eq $let ],\\\n          //fn:doc\\\n      }';\n      var expected = '<span class=\"cm-keyword\">xquery</span> <span class=\"cm-keyword\">version</span> <span class=\"cm-string\">\"1.0-ml\"</span><span class=\"cm-variable cm-def\">;</span>      <span class=\"cm-comment\">(: this is       : a          \"comment\" :)</span>      <span class=\"cm-keyword\">let</span> <span class=\"cm-variable\">$let</span> <span class=\"cm-keyword\">:=</span> <span class=\"cm-tag\">&lt;x </span><span class=\"cm-attribute\">attr</span>=<span class=\"cm-string\">\"value\"</span><span class=\"cm-tag\">&gt;</span><span class=\"cm-word\">\"test\"</span><span class=\"cm-tag\">&lt;func&gt;</span><span class=\"cm-word\">function()</span> <span class=\"cm-word\">$var</span> {<span class=\"cm-keyword\">function</span>()} {<span class=\"cm-variable\">$var</span>}<span class=\"cm-tag\">&lt;/func&gt;&lt;/x&gt;</span>      <span class=\"cm-keyword\">let</span> <span class=\"cm-variable\">$joe</span><span class=\"cm-keyword\">:=</span><span class=\"cm-atom\">1</span>      <span class=\"cm-keyword\">return</span> <span class=\"cm-keyword\">element</span> <span class=\"cm-word\">element</span> {          <span class=\"cm-keyword\">attribute</span> <span class=\"cm-word\">attribute</span> { <span class=\"cm-atom\">1</span> },          <span class=\"cm-keyword\">element</span> <span class=\"cm-word\">test</span> { <span class=\"cm-string\">\\'a\\'</span> },           <span class=\"cm-keyword\">attribute</span> <span class=\"cm-word\">foo</span> { <span class=\"cm-string\">\"bar\"</span> },          <span class=\"cm-variable cm-def\">fn:doc</span>()[ <span class=\"cm-word\">foo</span><span class=\"cm-keyword\">/</span><span class=\"cm-word\">@bar</span> <span class=\"cm-keyword\">eq</span> <span class=\"cm-variable\">$let</span> ],          <span class=\"cm-keyword\">//</span><span class=\"cm-word\">x</span> }                 <span class=\"cm-comment\">(: a more \\'evil\\' test :)</span>      <span class=\"cm-comment\">(: Modified Blakeley example (: with nested comment :) ... :)</span>      <span class=\"cm-keyword\">declare</span> <span class=\"cm-keyword\">private</span> <span class=\"cm-keyword\">function</span> <span class=\"cm-variable cm-def\">local:declare</span>() {()}<span class=\"cm-word\">;</span>      <span class=\"cm-keyword\">declare</span> <span class=\"cm-keyword\">private</span> <span class=\"cm-keyword\">function</span> <span class=\"cm-variable cm-def\">local:private</span>() {()}<span class=\"cm-word\">;</span>      <span class=\"cm-keyword\">declare</span> <span class=\"cm-keyword\">private</span> <span class=\"cm-keyword\">function</span> <span class=\"cm-variable cm-def\">local:function</span>() {()}<span class=\"cm-word\">;</span>      <span class=\"cm-keyword\">declare</span> <span class=\"cm-keyword\">private</span> <span class=\"cm-keyword\">function</span> <span class=\"cm-variable cm-def\">local:local</span>() {()}<span class=\"cm-word\">;</span>      <span class=\"cm-keyword\">let</span> <span class=\"cm-variable\">$let</span> <span class=\"cm-keyword\">:=</span> <span class=\"cm-tag\">&lt;let&gt;</span><span class=\"cm-word\">let</span> <span class=\"cm-word\">$let</span> <span class=\"cm-word\">:=</span> <span class=\"cm-word\">\"let\"</span><span class=\"cm-tag\">&lt;/let&gt;</span>      <span class=\"cm-keyword\">return</span> <span class=\"cm-keyword\">element</span> <span class=\"cm-word\">element</span> {          <span class=\"cm-keyword\">attribute</span> <span class=\"cm-word\">attribute</span> { <span class=\"cm-keyword\">try</span> { <span class=\"cm-variable cm-def\">xdmp:version</span>() } <span class=\"cm-keyword\">catch</span>(<span class=\"cm-variable\">$e</span>) { <span class=\"cm-variable cm-def\">xdmp:log</span>(<span class=\"cm-variable\">$e</span>) } },          <span class=\"cm-keyword\">attribute</span> <span class=\"cm-word\">fn:doc</span> { <span class=\"cm-string\">\"bar\"</span> <span class=\"cm-word\">castable</span> <span class=\"cm-keyword\">as</span> <span class=\"cm-atom\">xs:string</span> },          <span class=\"cm-keyword\">element</span> <span class=\"cm-word\">text</span> { <span class=\"cm-keyword\">text</span> { <span class=\"cm-string\">\"text\"</span> } },          <span class=\"cm-variable cm-def\">fn:doc</span>()[ <span class=\"cm-qualifier\">child::</span><span class=\"cm-word\">eq</span><span class=\"cm-keyword\">/</span>(<span class=\"cm-word\">@bar</span> <span class=\"cm-keyword\">|</span> <span class=\"cm-qualifier\">attribute::</span><span class=\"cm-word\">attribute</span>) <span class=\"cm-keyword\">eq</span> <span class=\"cm-variable\">$let</span> ],          <span class=\"cm-keyword\">//</span><span class=\"cm-word\">fn:doc</span>      }';\n\n      $(\"#sandbox\").html('<textarea id=\"editor\">' + input + '</textarea>');\n      var editor = CodeMirror.fromTextArea($(\"#editor\")[0]);\n      var result = $(\".CodeMirror-lines div div pre\")[0].innerHTML;\n\n       equal(result, expected);\n       $(\"#editor\").html(\"\");\n    });\n  });\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/xquery/test/testEmptySequenceKeyword.js",
    "content": "$(document).ready(function(){\n  module(\"testEmptySequenceKeyword\");\n  test(\"testEmptySequenceKeyword\", function() {\n    expect(1);\n\n    var input = '\"foo\" instance of empty-sequence()';\n    var expected = '<span class=\"cm-string\">\"foo\"</span> <span class=\"cm-keyword\">instance</span> <span class=\"cm-keyword\">of</span> <span class=\"cm-keyword\">empty-sequence</span>()';\n\n    $(\"#sandbox\").html('<textarea id=\"editor\">' + input + '</textarea>');\n    var editor = CodeMirror.fromTextArea($(\"#editor\")[0]);\n    var result = $(\".CodeMirror-lines div div pre\")[0].innerHTML;\n\n     equal(result, expected);\n     $(\"#editor\").html(\"\");\n  });\n});\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/xquery/test/testMultiAttr.js",
    "content": "  $(document).ready(function(){\n    module(\"testMultiAttr\");\n    test(\"test1\", function() {\n      expect(1);\n\n      var expected = '<span class=\"cm-tag\">&lt;p </span><span class=\"cm-attribute\">a1</span>=<span class=\"cm-string\">\"foo\"</span> <span class=\"cm-attribute\">a2</span>=<span class=\"cm-string\">\"bar\"</span><span class=\"cm-tag\">&gt;</span><span class=\"cm-word\">hello</span> <span class=\"cm-word\">world</span><span class=\"cm-tag\">&lt;/p&gt;</span>';\n\n      $(\"#sandbox\").html('<textarea id=\"editor\"></textarea>');\n      $(\"#editor\").html('<p a1=\"foo\" a2=\"bar\">hello world</p>');\n      var editor = CodeMirror.fromTextArea($(\"#editor\")[0]);\n      var result = $(\".CodeMirror-lines div div pre\")[0].innerHTML;\n\n       equal(result, expected);\n       $(\"#editor\").html(\"\");\n    });\n  });"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/xquery/test/testNamespaces.js",
    "content": "$(document).ready(function(){\n  module(\"test namespaces\");\n\n// --------------------------------------------------------------------------------\n// this test is based on this:\n//http://mbrevoort.github.com/CodeMirror2/#!exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/K2-ExternalVariablesWith-10.xq\n// --------------------------------------------------------------------------------\n  test(\"test namespaced variable\", function() {\n    expect(1);\n\n    var input = 'declare namespace e = \"http://example.com/ANamespace\";\\\ndeclare variable $e:exampleComThisVarIsNotRecognized as element(*) external;';\n\n    var expected = '<span class=\"cm-keyword\">declare</span> <span class=\"cm-keyword\">namespace</span> <span class=\"cm-word\">e</span> <span class=\"cm-keyword\">=</span> <span class=\"cm-string\">\"http://example.com/ANamespace\"</span><span class=\"cm-word\">;declare</span> <span class=\"cm-keyword\">variable</span> <span class=\"cm-variable\">$e:exampleComThisVarIsNotRecognized</span> <span class=\"cm-keyword\">as</span> <span class=\"cm-keyword\">element</span>(<span class=\"cm-keyword\">*</span>) <span class=\"cm-word\">external;</span>';\n\n    $(\"#sandbox\").html('<textarea id=\"editor\">' + input + '</textarea>');\n    var editor = CodeMirror.fromTextArea($(\"#editor\")[0]);\n    var result = $(\".CodeMirror-lines div div pre\")[0].innerHTML;\n\n     equal(result, expected);\n     $(\"#editor\").html(\"\");\n  });\n\n\n// --------------------------------------------------------------------------------\n// this test is based on:\n// http://mbrevoort.github.com/CodeMirror2/#!Basics/EQNames/eqname-002.xq  \n// --------------------------------------------------------------------------------\n  test(\"test EQName variable\", function() {\n    expect(1);\n\n    var input = 'declare variable $\"http://www.example.com/ns/my\":var := 12;\\\n<out>{$\"http://www.example.com/ns/my\":var}</out>';\n\n    var expected = '<span class=\"cm-keyword\">declare</span> <span class=\"cm-keyword\">variable</span> <span class=\"cm-variable\">$\"http://www.example.com/ns/my\":var</span> <span class=\"cm-keyword\">:=</span> <span class=\"cm-atom\">12</span><span class=\"cm-word\">;</span><span class=\"cm-tag\">&lt;out&gt;</span>{<span class=\"cm-variable\">$\"http://www.example.com/ns/my\":var</span>}<span class=\"cm-tag\">&lt;/out&gt;</span>';\n\n    $(\"#sandbox\").html('<textarea id=\"editor\">' + input + '</textarea>');\n    var editor = CodeMirror.fromTextArea($(\"#editor\")[0]);\n    var result = $(\".CodeMirror-lines div div pre\")[0].innerHTML;\n\n     equal(result, expected);\n     $(\"#editor\").html(\"\");\n  });\n\n// --------------------------------------------------------------------------------\n// this test is based on:\n// http://mbrevoort.github.com/CodeMirror2/#!Basics/EQNames/eqname-003.xq\n// --------------------------------------------------------------------------------\n  test(\"test EQName function\", function() {\n    expect(1);\n\n    var input = 'declare function \"http://www.example.com/ns/my\":fn ($a as xs:integer) as xs:integer {\\\n   $a + 2\\\n};\\\n<out>{\"http://www.example.com/ns/my\":fn(12)}</out>';\n\n    var expected = '<span class=\"cm-keyword\">declare</span> <span class=\"cm-keyword\">function</span> <span class=\"cm-variable cm-def\">\"http://www.example.com/ns/my\":fn</span> (<span class=\"cm-variable\">$a</span> <span class=\"cm-keyword\">as</span> <span class=\"cm-atom\">xs:integer</span>) <span class=\"cm-keyword\">as</span> <span class=\"cm-atom\">xs:integer</span> {   <span class=\"cm-variable\">$a</span> <span class=\"cm-keyword\">+</span> <span class=\"cm-atom\">2</span>}<span class=\"cm-word\">;</span><span class=\"cm-tag\">&lt;out&gt;</span>{<span class=\"cm-variable cm-def\">\"http://www.example.com/ns/my\":fn</span>(<span class=\"cm-atom\">12</span>)}<span class=\"cm-tag\">&lt;/out&gt;</span>';\n\n    $(\"#sandbox\").html('<textarea id=\"editor\">' + input + '</textarea>');\n    var editor = CodeMirror.fromTextArea($(\"#editor\")[0]);\n    var result = $(\".CodeMirror-lines div div pre\")[0].innerHTML;\n\n     equal(result, expected);\n     $(\"#editor\").html(\"\");\n  });\n\n// --------------------------------------------------------------------------------\n// this test is based on:\n// http://mbrevoort.github.com/CodeMirror2/#!Basics/EQNames/eqname-003.xq\n// --------------------------------------------------------------------------------\n  test(\"test EQName function with single quotes\", function() {\n    expect(1);\n\n    var input = 'declare function \\'http://www.example.com/ns/my\\':fn ($a as xs:integer) as xs:integer {\\\n   $a + 2\\\n};\\\n<out>{\\'http://www.example.com/ns/my\\':fn(12)}</out>';\n\n    var expected = '<span class=\"cm-keyword\">declare</span> <span class=\"cm-keyword\">function</span> <span class=\"cm-variable cm-def\">\\'http://www.example.com/ns/my\\':fn</span> (<span class=\"cm-variable\">$a</span> <span class=\"cm-keyword\">as</span> <span class=\"cm-atom\">xs:integer</span>) <span class=\"cm-keyword\">as</span> <span class=\"cm-atom\">xs:integer</span> {   <span class=\"cm-variable\">$a</span> <span class=\"cm-keyword\">+</span> <span class=\"cm-atom\">2</span>}<span class=\"cm-word\">;</span><span class=\"cm-tag\">&lt;out&gt;</span>{<span class=\"cm-variable cm-def\">\\'http://www.example.com/ns/my\\':fn</span>(<span class=\"cm-atom\">12</span>)}<span class=\"cm-tag\">&lt;/out&gt;</span>';\n\n    $(\"#sandbox\").html('<textarea id=\"editor\">' + input + '</textarea>');\n    var editor = CodeMirror.fromTextArea($(\"#editor\")[0]);\n    var result = $(\".CodeMirror-lines div div pre\")[0].innerHTML;\n\n     equal(result, expected);\n     $(\"#editor\").html(\"\");\n  });\n\n});\n\n\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/xquery/test/testProcessingInstructions.js",
    "content": "$(document).ready(function(){\n  module(\"testProcessingInstructions\");\n  test(\"testProcessingInstructions\", function() {\n    expect(1);\n\n    var input = 'data(<?target content?>) instance of xs:string';\n    var expected = '<span class=\"cm-variable cm-def\">data</span>(<span class=\"cm-comment cm-meta\">&lt;?target content?&gt;</span>) <span class=\"cm-keyword\">instance</span> <span class=\"cm-keyword\">of</span> <span class=\"cm-atom\">xs:string</span>';\n\n    $(\"#sandbox\").html('<textarea id=\"editor\">' + input + '</textarea>');\n    var editor = CodeMirror.fromTextArea($(\"#editor\")[0]);\n    var result = $(\".CodeMirror-lines div div pre\")[0].innerHTML;\n\n     equal(result, expected);\n     $(\"#editor\").html(\"\");\n  });\n});\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/xquery/test/testQuotes.js",
    "content": "  $(document).ready(function(){\n    module(\"testQuoteEscape\");\n    test(\"testQuoteEscapeDouble\", function() {\n      expect(1);\n\n      var input = 'let $rootfolder := \"c:\\\\builds\\\\winnt\\\\HEAD\\\\qa\\\\scripts\\\\\"\\\nlet $keysfolder := concat($rootfolder, \"keys\\\\\")\\\nreturn\\\n$keysfolder';\n      var expected = '<span class=\"cm-keyword\">let</span> <span class=\"cm-variable\">$rootfolder</span> <span class=\"cm-keyword\">:=</span> <span class=\"cm-string\">\"c:\\\\builds\\\\winnt\\\\HEAD\\\\qa\\\\scripts\\\\\"</span><span class=\"cm-keyword\">let</span> <span class=\"cm-variable\">$keysfolder</span> <span class=\"cm-keyword\">:=</span> <span class=\"cm-variable cm-def\">concat</span>(<span class=\"cm-variable\">$rootfolder</span>, <span class=\"cm-string\">\"keys\\\\\"</span>)<span class=\"cm-word\">return$keysfolder</span>';\n\n      $(\"#sandbox\").html('<textarea id=\"editor\">' + input + '</textarea>');\n      var editor = CodeMirror.fromTextArea($(\"#editor\")[0]);\n      var result = $(\".CodeMirror-lines div div pre\")[0].innerHTML;\n\n       equal(result, expected);\n       $(\"#editor\").html(\"\");\n    });\n  });\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/xquery/xquery.js",
    "content": "/*\nCopyright (C) 2011 by MarkLogic Corporation\nAuthor: Mike Brevoort <mike@brevoort.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\nCodeMirror.defineMode(\"xquery\", function(config, parserConfig) {\n\n  // The keywords object is set to the result of this self executing\n  // function. Each keyword is a property of the keywords object whose\n  // value is {type: atype, style: astyle}\n  var keywords = function(){\n    // conveinence functions used to build keywords object\n    function kw(type) {return {type: type, style: \"keyword\"};}\n    var A = kw(\"keyword a\")\n      , B = kw(\"keyword b\")\n      , C = kw(\"keyword c\")\n      , operator = kw(\"operator\")\n      , atom = {type: \"atom\", style: \"atom\"}\n      , punctuation = {type: \"punctuation\", style: \"\"}\n      , qualifier = {type: \"axis_specifier\", style: \"qualifier\"};\n    \n    // kwObj is what is return from this function at the end\n    var kwObj = {\n      'if': A, 'switch': A, 'while': A, 'for': A,\n      'else': B, 'then': B, 'try': B, 'finally': B, 'catch': B,\n      'element': C, 'attribute': C, 'let': C, 'implements': C, 'import': C, 'module': C, 'namespace': C, \n      'return': C, 'super': C, 'this': C, 'throws': C, 'where': C, 'private': C,      \n      ',': punctuation,\n      'null': atom, 'fn:false()': atom, 'fn:true()': atom\n    };\n    \n    // a list of 'basic' keywords. For each add a property to kwObj with the value of \n    // {type: basic[i], style: \"keyword\"} e.g. 'after' --> {type: \"after\", style: \"keyword\"}\n    var basic = ['after','ancestor','ancestor-or-self','and','as','ascending','assert','attribute','before',\n    'by','case','cast','child','comment','declare','default','define','descendant','descendant-or-self',\n    'descending','document','document-node','element','else','eq','every','except','external','following',\n    'following-sibling','follows','for','function','if','import','in','instance','intersect','item',\n    'let','module','namespace','node','node','of','only','or','order','parent','precedes','preceding',\n    'preceding-sibling','processing-instruction','ref','return','returns','satisfies','schema','schema-element',\n    'self','some','sortby','stable','text','then','to','treat','typeswitch','union','variable','version','where',\n    'xquery', 'empty-sequence'];\n    for(var i=0, l=basic.length; i < l; i++) { kwObj[basic[i]] = kw(basic[i])};\n    \n    // a list of types. For each add a property to kwObj with the value of \n    // {type: \"atom\", style: \"atom\"}\n    var types = ['xs:string', 'xs:float', 'xs:decimal', 'xs:double', 'xs:integer', 'xs:boolean', 'xs:date', 'xs:dateTime', \n    'xs:time', 'xs:duration', 'xs:dayTimeDuration', 'xs:time', 'xs:yearMonthDuration', 'numeric', 'xs:hexBinary', \n    'xs:base64Binary', 'xs:anyURI', 'xs:QName', 'xs:byte','xs:boolean','xs:anyURI','xf:yearMonthDuration'];\n    for(var i=0, l=types.length; i < l; i++) { kwObj[types[i]] = atom;};\n    \n    // each operator will add a property to kwObj with value of {type: \"operator\", style: \"keyword\"}\n    var operators = ['eq', 'ne', 'lt', 'le', 'gt', 'ge', ':=', '=', '>', '>=', '<', '<=', '.', '|', '?', 'and', 'or', 'div', 'idiv', 'mod', '*', '/', '+', '-'];\n    for(var i=0, l=operators.length; i < l; i++) { kwObj[operators[i]] = operator;};\n    \n    // each axis_specifiers will add a property to kwObj with value of {type: \"axis_specifier\", style: \"qualifier\"}\n    var axis_specifiers = [\"self::\", \"attribute::\", \"child::\", \"descendant::\", \"descendant-or-self::\", \"parent::\", \n    \"ancestor::\", \"ancestor-or-self::\", \"following::\", \"preceding::\", \"following-sibling::\", \"preceding-sibling::\"];\n    for(var i=0, l=axis_specifiers.length; i < l; i++) { kwObj[axis_specifiers[i]] = qualifier; };\n\n    return kwObj;\n  }();\n\n  // Used as scratch variables to communicate multiple values without\n  // consing up tons of objects.\n  var type, content;\n  \n  function ret(tp, style, cont) {\n    type = tp; content = cont;\n    return style;\n  }\n  \n  function chain(stream, state, f) {\n    state.tokenize = f;\n    return f(stream, state);\n  }\n  \n  // the primary mode tokenizer\n  function tokenBase(stream, state) {\n    var ch = stream.next(), \n        mightBeFunction = false,\n        isEQName = isEQNameAhead(stream);\n    \n    // an XML tag (if not in some sub, chained tokenizer)\n    if (ch == \"<\") {\n      if(stream.match(\"!--\", true))\n        return chain(stream, state, tokenXMLComment);\n        \n      if(stream.match(\"![CDATA\", false)) {\n        state.tokenize = tokenCDATA;\n        return ret(\"tag\", \"tag\");\n      }\n      \n      if(stream.match(\"?\", false)) {\n        return chain(stream, state, tokenPreProcessing);\n      }\n      \n      var isclose = stream.eat(\"/\");\n      stream.eatSpace();\n      var tagName = \"\", c;\n      while ((c = stream.eat(/[^\\s\\u00a0=<>\\\"\\'\\/?]/))) tagName += c;\n      \n      return chain(stream, state, tokenTag(tagName, isclose));\n    }\n    // start code block\n    else if(ch == \"{\") {\n      pushStateStack(state,{ type: \"codeblock\"});\n      return ret(\"\", \"\");\n    }\n    // end code block\n    else if(ch == \"}\") {\n      popStateStack(state);\n      return ret(\"\", \"\");\n    }\n    // if we're in an XML block\n    else if(isInXmlBlock(state)) {\n      if(ch == \">\")\n        return ret(\"tag\", \"tag\");\n      else if(ch == \"/\" && stream.eat(\">\")) {\n        popStateStack(state);\n        return ret(\"tag\", \"tag\");\n      }\n      else  \n        return ret(\"word\", \"word\");\n    }\n    // if a number\n    else if (/\\d/.test(ch)) {\n      stream.match(/^\\d*(?:\\.\\d*)?(?:E[+\\-]?\\d+)?/);\n      return ret(\"number\", \"atom\");\n    }\n    // comment start\n    else if (ch === \"(\" && stream.eat(\":\")) {\n      pushStateStack(state, { type: \"comment\"});\n      return chain(stream, state, tokenComment);\n    }\n    // quoted string\n    else if (  !isEQName && (ch === '\"' || ch === \"'\"))\n      return chain(stream, state, tokenString(ch));\n    // variable\n    else if(ch === \"$\") {\n      return chain(stream, state, tokenVariable);\n    }\n    // assignment\n    else if(ch ===\":\" && stream.eat(\"=\")) {\n      return ret(\"operator\", \"keyword\");\n    }\n    // open paren\n    else if(ch === \"(\") {\n      pushStateStack(state, { type: \"paren\"});\n      return ret(\"\", \"\");\n    }\n    // close paren\n    else if(ch === \")\") {\n      popStateStack(state);\n      return ret(\"\", \"\");\n    }\n    // open paren\n    else if(ch === \"[\") {\n      pushStateStack(state, { type: \"bracket\"});\n      return ret(\"\", \"\");\n    }\n    // close paren\n    else if(ch === \"]\") {\n      popStateStack(state);\n      return ret(\"\", \"\");\n    }\n    else {\n      var known = keywords.propertyIsEnumerable(ch) && keywords[ch];\n\n      // if there's a EQName ahead, consume the rest of the string portion, it's likely a function\n      if(isEQName && ch === '\\\"') while(stream.next() !== '\"'){}\n      if(isEQName && ch === '\\'') while(stream.next() !== '\\''){}\n      \n      // gobble up a word if the character is not known\n      if(!known) stream.eatWhile(/[\\w\\$_-]/);\n      \n      // gobble a colon in the case that is a lib func type call fn:doc\n      var foundColon = stream.eat(\":\")\n      \n      // if there's not a second colon, gobble another word. Otherwise, it's probably an axis specifier\n      // which should get matched as a keyword\n      if(!stream.eat(\":\") && foundColon) {\n        stream.eatWhile(/[\\w\\$_-]/);\n      }\n      // if the next non whitespace character is an open paren, this is probably a function (if not a keyword of other sort)\n      if(stream.match(/^[ \\t]*\\(/, false)) {\n        mightBeFunction = true;\n      }\n      // is the word a keyword?\n      var word = stream.current();\n      known = keywords.propertyIsEnumerable(word) && keywords[word];\n      \n      // if we think it's a function call but not yet known, \n      // set style to variable for now for lack of something better\n      if(mightBeFunction && !known) known = {type: \"function_call\", style: \"variable def\"};\n      \n      // if the previous word was element, attribute, axis specifier, this word should be the name of that\n      if(isInXmlConstructor(state)) {\n        popStateStack(state);\n        return ret(\"word\", \"word\", word);\n      }\n      // as previously checked, if the word is element,attribute, axis specifier, call it an \"xmlconstructor\" and \n      // push the stack so we know to look for it on the next word\n      if(word == \"element\" || word == \"attribute\" || known.type == \"axis_specifier\") pushStateStack(state, {type: \"xmlconstructor\"});\n      \n      // if the word is known, return the details of that else just call this a generic 'word'\n      return known ? ret(known.type, known.style, word) :\n                     ret(\"word\", \"word\", word);\n    }\n  }\n\n  // handle comments, including nested \n  function tokenComment(stream, state) {\n    var maybeEnd = false, maybeNested = false, nestedCount = 0, ch;\n    while (ch = stream.next()) {\n      if (ch == \")\" && maybeEnd) {\n        if(nestedCount > 0)\n          nestedCount--;\n        else {\n          popStateStack(state);\n          break;\n        }\n      }\n      else if(ch == \":\" && maybeNested) {\n        nestedCount++;\n      }\n      maybeEnd = (ch == \":\");\n      maybeNested = (ch == \"(\");\n    }\n    \n    return ret(\"comment\", \"comment\");\n  }\n\n  // tokenizer for string literals\n  // optionally pass a tokenizer function to set state.tokenize back to when finished\n  function tokenString(quote, f) {\n    return function(stream, state) {\n      var ch;\n\n      if(isInString(state) && stream.current() == quote) {\n        popStateStack(state);\n        if(f) state.tokenize = f;\n        return ret(\"string\", \"string\");\n      }\n\n      pushStateStack(state, { type: \"string\", name: quote, tokenize: tokenString(quote, f) });\n\n      // if we're in a string and in an XML block, allow an embedded code block\n      if(stream.match(\"{\", false) && isInXmlAttributeBlock(state)) {\n        state.tokenize = tokenBase;\n        return ret(\"string\", \"string\"); \n      }\n\n      \n      while (ch = stream.next()) {\n        if (ch ==  quote) {\n          popStateStack(state);\n          if(f) state.tokenize = f;\n          break;\n        }\n        else {\n          // if we're in a string and in an XML block, allow an embedded code block in an attribute\n          if(stream.match(\"{\", false) && isInXmlAttributeBlock(state)) {\n            state.tokenize = tokenBase;\n            return ret(\"string\", \"string\"); \n          }\n\n        }\n      }\n      \n      return ret(\"string\", \"string\");\n    };\n  }\n  \n  // tokenizer for variables\n  function tokenVariable(stream, state) {\n    var isVariableChar = /[\\w\\$_-]/;\n\n    // a variable may start with a quoted EQName so if the next character is quote, consume to the next quote\n    if(stream.eat(\"\\\"\")) {\n      while(stream.next() !== '\\\"'){};\n      stream.eat(\":\");\n    } else {\n      stream.eatWhile(isVariableChar);\n      if(!stream.match(\":=\", false)) stream.eat(\":\");\n    }\n    stream.eatWhile(isVariableChar);\n    state.tokenize = tokenBase;\n    return ret(\"variable\", \"variable\");\n  }\n  \n  // tokenizer for XML tags\n  function tokenTag(name, isclose) {\n    return function(stream, state) {\n      stream.eatSpace();\n      if(isclose && stream.eat(\">\")) {\n        popStateStack(state);\n        state.tokenize = tokenBase;\n        return ret(\"tag\", \"tag\");\n      }\n      // self closing tag without attributes?\n      if(!stream.eat(\"/\"))\n        pushStateStack(state, { type: \"tag\", name: name, tokenize: tokenBase});\n      if(!stream.eat(\">\")) {\n        state.tokenize = tokenAttribute;\n        return ret(\"tag\", \"tag\");\n      }\n      else {\n        state.tokenize = tokenBase;        \n      }\n      return ret(\"tag\", \"tag\");\n    }\n  }\n\n  // tokenizer for XML attributes\n  function tokenAttribute(stream, state) {\n    var ch = stream.next();\n    \n    if(ch == \"/\" && stream.eat(\">\")) {\n      if(isInXmlAttributeBlock(state)) popStateStack(state);\n      if(isInXmlBlock(state)) popStateStack(state);\n      return ret(\"tag\", \"tag\");\n    }\n    if(ch == \">\") {\n      if(isInXmlAttributeBlock(state)) popStateStack(state);\n      return ret(\"tag\", \"tag\");\n    }\n    if(ch == \"=\")\n      return ret(\"\", \"\");\n    // quoted string\n    if (ch == '\"' || ch == \"'\")\n      return chain(stream, state, tokenString(ch, tokenAttribute));\n\n    if(!isInXmlAttributeBlock(state)) \n      pushStateStack(state, { type: \"attribute\", name: name, tokenize: tokenAttribute});\n\n    stream.eat(/[a-zA-Z_:]/);\n    stream.eatWhile(/[-a-zA-Z0-9_:.]/);\n    stream.eatSpace();\n\n    // the case where the attribute has not value and the tag was closed\n    if(stream.match(\">\", false) || stream.match(\"/\", false)) {\n      popStateStack(state);\n      state.tokenize = tokenBase;      \n    }\n\n    return ret(\"attribute\", \"attribute\");\n  }\n  \n  // handle comments, including nested \n  function tokenXMLComment(stream, state) {\n    while (ch = stream.next()) {\n      if (ch == \"-\" && stream.match(\"->\", true)) {\n        state.tokenize = tokenBase;        \n        return ret(\"comment\", \"comment\");\n      }\n    }\n  }\n\n\n  // handle CDATA\n  function tokenCDATA(stream, state) {\n    while (ch = stream.next()) {\n      if (ch == \"]\" && stream.match(\"]\", true)) {\n        state.tokenize = tokenBase;        \n        return ret(\"comment\", \"comment\");\n      }\n    }\n  }\n\n  // handle preprocessing instructions\n  function tokenPreProcessing(stream, state) {\n    while (ch = stream.next()) {\n      if (ch == \"?\" && stream.match(\">\", true)) {\n        state.tokenize = tokenBase;        \n        return ret(\"comment\", \"comment meta\");\n      }\n    }\n  }\n  \n  \n  // functions to test the current context of the state\n  function isInXmlBlock(state) { return isIn(state, \"tag\"); }\n  function isInXmlAttributeBlock(state) { return isIn(state, \"attribute\"); }\n  function isInCodeBlock(state) { return isIn(state, \"codeblock\"); }\n  function isInXmlConstructor(state) { return isIn(state, \"xmlconstructor\"); }\n  function isInString(state) { return isIn(state, \"string\"); }\n\n  function isEQNameAhead(stream) { \n    // assume we've already eaten a quote (\")\n    if(stream.current() === '\"')\n      return stream.match(/^[^\\\"]+\\\"\\:/, false);\n    else if(stream.current() === '\\'')\n      return stream.match(/^[^\\\"]+\\'\\:/, false);\n    else\n      return false;\n  }\n  \n  function isIn(state, type) {\n    return (state.stack.length && state.stack[state.stack.length - 1].type == type);    \n  }\n  \n  function pushStateStack(state, newState) {\n    state.stack.push(newState);\n  }\n  \n  function popStateStack(state) {\n    var popped = state.stack.pop();\n    var reinstateTokenize = state.stack.length && state.stack[state.stack.length-1].tokenize\n    state.tokenize = reinstateTokenize || tokenBase;\n  }\n  \n  // the interface for the mode API\n  return {\n    startState: function(basecolumn) {\n      return {\n        tokenize: tokenBase,\n        cc: [],\n        stack: []\n      };\n    },\n\n    token: function(stream, state) {\n      if (stream.eatSpace()) return null;\n      var style = state.tokenize(stream, state);\n      return style;\n    }\n  };\n\n});\n\nCodeMirror.defineMIME(\"application/xquery\", \"xquery\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/yaml/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: YAML mode</title>\n    <link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n    <script src=\"../../lib/codemirror.js\"></script>\n    <script src=\"yaml.js\"></script>\n    <style>.CodeMirror { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; }</style>\n    <link rel=\"stylesheet\" href=\"../../doc/docs.css\">\n  </head>\n  <body>\n    <h1>CodeMirror: YAML mode</h1>\n    <form><textarea id=\"code\" name=\"code\">\n--- # Favorite movies\n- Casablanca\n- North by Northwest\n- The Man Who Wasn't There\n--- # Shopping list\n[milk, pumpkin pie, eggs, juice]\n--- # Indented Blocks, common in YAML data files, use indentation and new lines to separate the key: value pairs\n  name: John Smith\n  age: 33\n--- # Inline Blocks, common in YAML data streams, use commas to separate the key: value pairs between braces\n{name: John Smith, age: 33}\n---\nreceipt:     Oz-Ware Purchase Invoice\ndate:        2007-08-06\ncustomer:\n    given:   Dorothy\n    family:  Gale\n\nitems:\n    - part_no:   A4786\n      descrip:   Water Bucket (Filled)\n      price:     1.47\n      quantity:  4\n\n    - part_no:   E1628\n      descrip:   High Heeled \"Ruby\" Slippers\n      size:       8\n      price:     100.27\n      quantity:  1\n\nbill-to:  &id001\n    street: |\n            123 Tornado Alley\n            Suite 16\n    city:   East Centerville\n    state:  KS\n\nship-to:  *id001\n\nspecialDelivery:  >\n    Follow the Yellow Brick\n    Road to the Emerald City.\n    Pay no attention to the\n    man behind the curtain.\n...\n</textarea></form>\n    <script>\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {});\n    </script>\n\n    <p><strong>MIME types defined:</strong> <code>text/x-yaml</code>.</p>\n\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/mode/yaml/yaml.js",
    "content": "CodeMirror.defineMode(\"yaml\", function() {\n\t\n\tvar cons = ['true', 'false', 'on', 'off', 'yes', 'no'];\n\tvar keywordRegex = new RegExp(\"\\\\b((\"+cons.join(\")|(\")+\"))$\", 'i');\n\t\n\treturn {\n\t\ttoken: function(stream, state) {\n\t\t\tvar ch = stream.peek();\n\t\t\tvar esc = state.escaped;\n\t\t\tstate.escaped = false;\n\t\t\t/* comments */\n\t\t\tif (ch == \"#\") { stream.skipToEnd(); return \"comment\"; }\n\t\t\tif (state.literal && stream.indentation() > state.keyCol) {\n\t\t\t\tstream.skipToEnd(); return \"string\";\n\t\t\t} else if (state.literal) { state.literal = false; }\n\t\t\tif (stream.sol()) {\n\t\t\t\tstate.keyCol = 0;\n\t\t\t\tstate.pair = false;\n\t\t\t\tstate.pairStart = false;\n\t\t\t\t/* document start */\n\t\t\t\tif(stream.match(/---/)) { return \"def\"; }\n\t\t\t\t/* document end */\n\t\t\t\tif (stream.match(/\\.\\.\\./)) { return \"def\"; }\n\t\t\t\t/* array list item */\n\t\t\t\tif (stream.match(/\\s*-\\s+/)) { return 'meta'; }\n\t\t\t}\n\t\t\t/* pairs (associative arrays) -> key */\n\t\t\tif (!state.pair && stream.match(/^\\s*([a-z0-9\\._-])+(?=\\s*:)/i)) {\n\t\t\t\tstate.pair = true;\n\t\t\t\tstate.keyCol = stream.indentation();\n\t\t\t\treturn \"atom\";\n\t\t\t}\n\t\t\tif (state.pair && stream.match(/^:\\s*/)) { state.pairStart = true; return 'meta'; }\n\t\t\t\n\t\t\t/* inline pairs/lists */\n\t\t\tif (stream.match(/^(\\{|\\}|\\[|\\])/)) {\n\t\t\t\tif (ch == '{')\n\t\t\t\t\tstate.inlinePairs++;\n\t\t\t\telse if (ch == '}')\n\t\t\t\t\tstate.inlinePairs--;\n\t\t\t\telse if (ch == '[')\n\t\t\t\t\tstate.inlineList++;\n\t\t\t\telse\n\t\t\t\t\tstate.inlineList--;\n\t\t\t\treturn 'meta';\n\t\t\t}\n\t\t\t\n\t\t\t/* list seperator */\n\t\t\tif (state.inlineList > 0 && !esc && ch == ',') {\n\t\t\t\tstream.next();\n\t\t\t\treturn 'meta';\n\t\t\t}\n\t\t\t/* pairs seperator */\n\t\t\tif (state.inlinePairs > 0 && !esc && ch == ',') {\n\t\t\t\tstate.keyCol = 0;\n\t\t\t\tstate.pair = false;\n\t\t\t\tstate.pairStart = false;\n\t\t\t\tstream.next();\n\t\t\t\treturn 'meta';\n\t\t\t}\n\t\t\t\n\t\t\t/* start of value of a pair */\n\t\t\tif (state.pairStart) {\n\t\t\t\t/* block literals */\n\t\t\t\tif (stream.match(/^\\s*(\\||\\>)\\s*/)) { state.literal = true; return 'meta'; };\n\t\t\t\t/* references */\n\t\t\t\tif (stream.match(/^\\s*(\\&|\\*)[a-z0-9\\._-]+\\b/i)) { return 'variable-2'; }\n\t\t\t\t/* numbers */\n\t\t\t\tif (state.inlinePairs == 0 && stream.match(/^\\s*-?[0-9\\.\\,]+\\s?$/)) { return 'number'; }\n\t\t\t\tif (state.inlinePairs > 0 && stream.match(/^\\s*-?[0-9\\.\\,]+\\s?(?=(,|}))/)) { return 'number'; }\n\t\t\t\t/* keywords */\n\t\t\t\tif (stream.match(keywordRegex)) { return 'keyword'; }\n\t\t\t}\n\n\t\t\t/* nothing found, continue */\n\t\t\tstate.pairStart = false;\n\t\t\tstate.escaped = (ch == '\\\\');\n\t\t\tstream.next();\n\t\t\treturn null;\n\t\t},\n\t\tstartState: function() {\n\t\t\treturn {\n\t\t\t\tpair: false,\n\t\t\t\tpairStart: false,\n\t\t\t\tkeyCol: 0,\n\t\t\t\tinlinePairs: 0,\n\t\t\t\tinlineList: 0,\n\t\t\t\tliteral: false,\n\t\t\t\tescaped: false\n\t\t\t};\n\t\t}\n\t};\n});\n\nCodeMirror.defineMIME(\"text/x-yaml\", \"yaml\");\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/test/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <title>CodeMirror: Test Suite</title>\n    <link rel=\"stylesheet\" href=\"../lib/codemirror.css\">\n    <script src=\"../lib/codemirror.js\"></script>\n    <script src=\"../mode/javascript/javascript.js\"></script>\n\n    <style type=\"text/css\">\n      .ok {color: #0e0;}\n      .failure {color: #e00;}\n      .error {color: #c90;}\n    </style>\n  </head>\n  <body>\n    <h1>CodeMirror: Test Suite</h1>\n\n    <p>A limited set of programmatic sanity tests for CodeMirror.</p>\n\n    <pre id=output></pre>\n\n    <div style=\"visibility: hidden\" id=testground>\n      <form><textarea id=\"code\" name=\"code\"></textarea><input type=submit value=ok name=submit></form>\n    </div>\n\n    <script src=\"test.js\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/test/mode_test.css",
    "content": ".mt-output .mt-token {\n  border: 1px solid #ddd;\n  white-space: pre;\n  font-family: \"Consolas\", monospace;\n  text-align: center;\n}\n\n.mt-output .mt-style {\n  font-size: x-small;\n}\n\n.mt-test {\n  border-left: 10px solid #fff;\n}\n\n.mt-pass {\n  border-left: 10px solid #cfc;\n}\n\n.mt-fail {\n  border-left: 10px solid #fcc;\n}\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/test/mode_test.js",
    "content": "/**\n * Helper to test CodeMirror highlighting modes. It pretty prints output of the\n * highlighter and can check against expected styles.\n *\n * See test.html in the stex mode for examples.\n */\nModeTest = {};\n\nModeTest.modeOptions = {};\nModeTest.modeName = CodeMirror.defaults.mode;\n\n/* keep track of results for printSummary */\nModeTest.tests = 0;\nModeTest.passes = 0;\n\n/**\n * Run a test; prettyprints the results using document.write().\n *\n * @param string to highlight\n *\n * @param style[i] expected style of the i'th token in string\n *\n * @param token[i] expected value for the i'th token in string\n */\nModeTest.test = function() {\n  ModeTest.tests += 1;\n\n  var mode = CodeMirror.getMode(ModeTest.modeOptions, ModeTest.modeName);\n\n  if (arguments.length < 1) {\n    throw \"must have text for test\";\n  }\n  if (arguments.length % 2 != 1) {\n    throw \"must have text for test plus expected (style, token) pairs\";\n  }\n\n  var text = arguments[0];\n  var expectedOutput = [];\n  for (var i = 1; i < arguments.length; i += 2) {\n    expectedOutput.push([arguments[i],arguments[i + 1]]);\n  }\n\n  var observedOutput = ModeTest.highlight(text, mode)\n\n  var pass, passStyle = \"\";\n  if (expectedOutput.length > 0) {\n    pass = ModeTest.highlightOutputsEqual(expectedOutput, observedOutput);\n    passStyle = pass ? 'mt-pass' : 'mt-fail';\n    ModeTest.passes += pass ? 1 : 0;\n  }\n\n  var s = '';\n  s += '<div class=\"mt-test ' + passStyle + '\">';\n  s +=   '<pre>' + ModeTest.htmlEscape(text) + '</pre>';\n  s +=   '<div class=\"cm-s-default\">';\n  if (pass || expectedOutput.length == 0) {\n    s +=   ModeTest.prettyPrintOutputTable(observedOutput);\n  } else {\n    s += 'expected:';\n    s +=   ModeTest.prettyPrintOutputTable(expectedOutput);\n    s += 'observed:';\n    s +=   ModeTest.prettyPrintOutputTable(observedOutput);\n  }\n  s +=   '</div>';\n  s += '</div>';\n  document.write(s);\n}\n\n/**\n * Emulation of CodeMirror's internal highlight routine for testing. Multi-line\n * input is supported.\n *\n * @param string to highlight\n *\n * @param mode the mode that will do the actual highlighting\n *\n * @return array of [style, token] pairs\n */\nModeTest.highlight = function(string, mode) {\n  var state = mode.startState()\n\n  var lines = string.replace(/\\r\\n/g,'\\n').split('\\n');\n  var output = [];\n  for (var i = 0; i < lines.length; ++i) {\n    var line = lines[i];\n    var stream = new CodeMirror.StringStream(line);\n    if (line == \"\" && mode.blankLine) mode.blankLine(state);\n    while (!stream.eol()) {\n      var style = mode.token(stream, state);\n      var substr = line.slice(stream.start, stream.pos);\n      output.push([style, substr]);\n      stream.start = stream.pos;\n    }\n  }\n\n  return output;\n}\n\n/**\n * Compare two arrays of output from ModeTest.highlight.\n *\n * @param o1 array of [style, token] pairs\n *\n * @param o2 array of [style, token] pairs\n *\n * @return boolean; true iff outputs equal\n */\nModeTest.highlightOutputsEqual = function(o1, o2) {\n  var eq = (o1.length == o2.length);\n  if (eq) {\n    for (var j in o1) {\n      eq = eq &&\n        o1[j].length == 2 && o1[j][0] == o2[j][0] && o1[j][1] == o2[j][1];\n    }\n  }\n  return eq;\n}\n\n/**\n * Print tokens and corresponding styles in a table. Spaces in the token are\n * replaced with 'interpunct' dots (&middot;).\n *\n * @param output array of [style, token] pairs\n *\n * @return html string\n */\nModeTest.prettyPrintOutputTable = function(output) {\n  var s = '<table class=\"mt-output\">';\n  s += '<tr>';\n  for (var i = 0; i < output.length; ++i) {\n    var token = output[i];\n    s +=\n      '<td class=\"mt-token\">' +\n        '<span class=\"cm-' + token[0] + '\">' +\n          ModeTest.htmlEscape(token[1]).replace(/ /g,'&middot;') +\n        '</span>' +\n      '</td>';\n  }\n  s += '</tr><tr>';\n  for (var i = 0; i < output.length; ++i) {\n    var token = output[i];\n    s +=\n      '<td class=\"mt-style\"><span>' + token[0] + '</span></td>';\n  }\n  s += '</table>';\n  return s;\n}\n\n/**\n * Print how many tests have run so far and how many of those passed.\n */\nModeTest.printSummary = function() {\n  document.write(ModeTest.passes + ' passes for ' + ModeTest.tests + ' tests');\n}\n\n/**\n * Basic HTML escaping.\n */\nModeTest.htmlEscape = function(str) {\n  str = str.toString();\n  return str.replace(/[<&]/g,\n      function(str) {return str == \"&\" ? \"&amp;\" : \"&lt;\";});\n}\n\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/test/test.js",
    "content": "var tests = [];\n\ntest(\"fromTextArea\", function() {\n  var te = document.getElementById(\"code\");\n  te.value = \"CONTENT\";\n  var cm = CodeMirror.fromTextArea(te);\n  is(!te.offsetHeight);\n  eq(cm.getValue(), \"CONTENT\");\n  cm.setValue(\"foo\\nbar\");\n  eq(cm.getValue(), \"foo\\nbar\");\n  cm.save();\n  is(/^foo\\r?\\nbar$/.test(te.value));\n  cm.setValue(\"xxx\");\n  cm.toTextArea();\n  is(te.offsetHeight);\n  eq(te.value, \"xxx\");\n});\n\ntestCM(\"getRange\", function(cm) {\n  eq(cm.getLine(0), \"1234\");\n  eq(cm.getLine(1), \"5678\");\n  eq(cm.getLine(2), null);\n  eq(cm.getLine(-1), null);\n  eq(cm.getRange({line: 0, ch: 0}, {line: 0, ch: 3}), \"123\");\n  eq(cm.getRange({line: 0, ch: -1}, {line: 0, ch: 200}), \"1234\");\n  eq(cm.getRange({line: 0, ch: 2}, {line: 1, ch: 2}), \"34\\n56\");\n  eq(cm.getRange({line: 1, ch: 2}, {line: 100, ch: 0}), \"78\");\n}, {value: \"1234\\n5678\"});\n\ntestCM(\"replaceRange\", function(cm) {\n  eq(cm.getValue(), \"\");\n  cm.replaceRange(\"foo\\n\", {line: 0, ch: 0});\n  eq(cm.getValue(), \"foo\\n\");\n  cm.replaceRange(\"a\\nb\", {line: 0, ch: 1});\n  eq(cm.getValue(), \"fa\\nboo\\n\");\n  eq(cm.lineCount(), 3);\n  cm.replaceRange(\"xyzzy\", {line: 0, ch: 0}, {line: 1, ch: 1});\n  eq(cm.getValue(), \"xyzzyoo\\n\");\n  cm.replaceRange(\"abc\", {line: 0, ch: 0}, {line: 10, ch: 0});\n  eq(cm.getValue(), \"abc\");\n  eq(cm.lineCount(), 1);\n});\n\ntestCM(\"selection\", function(cm) {\n  cm.setSelection({line: 0, ch: 4}, {line: 2, ch: 2});\n  is(cm.somethingSelected());\n  eq(cm.getSelection(), \"11\\n222222\\n33\");\n  eqPos(cm.getCursor(false), {line: 2, ch: 2});\n  eqPos(cm.getCursor(true), {line: 0, ch: 4});\n  cm.setSelection({line: 1, ch: 0});\n  is(!cm.somethingSelected());\n  eq(cm.getSelection(), \"\");\n  eqPos(cm.getCursor(true), {line: 1, ch: 0});\n  cm.replaceSelection(\"abc\");\n  eq(cm.getSelection(), \"abc\");\n  eq(cm.getValue(), \"111111\\nabc222222\\n333333\");\n  cm.replaceSelection(\"def\", \"end\");\n  eq(cm.getSelection(), \"\");\n  eqPos(cm.getCursor(true), {line: 1, ch: 3});\n  cm.setCursor({line: 2, ch: 1});\n  eqPos(cm.getCursor(true), {line: 2, ch: 1});\n  cm.setCursor(1, 2);\n  eqPos(cm.getCursor(true), {line: 1, ch: 2});\n}, {value: \"111111\\n222222\\n333333\"});\n\ntestCM(\"lines\", function(cm) {\n  eq(cm.getLine(0), \"111111\");\n  eq(cm.getLine(1), \"222222\");\n  eq(cm.getLine(-1), null);\n  cm.removeLine(1);\n  cm.setLine(1, \"abc\");\n  eq(cm.getValue(), \"111111\\nabc\");\n}, {value: \"111111\\n222222\\n333333\"});\n\ntestCM(\"indent\", function(cm) {\n  cm.indentLine(1);\n  eq(cm.getLine(1), \"   blah();\");\n  cm.setOption(\"indentUnit\", 8);\n  cm.indentLine(1);\n  eq(cm.getLine(1), \"\\tblah();\");\n}, {value: \"if (x) {\\nblah();\\n}\", indentUnit: 3, indentWithTabs: true, tabSize: 8});\n\ntest(\"defaults\", function() {\n  var olddefaults = CodeMirror.defaults, defs = CodeMirror.defaults = {};\n  for (var opt in olddefaults) defs[opt] = olddefaults[opt];\n  defs.indentUnit = 5;\n  defs.value = \"uu\";\n  defs.enterMode = \"keep\";\n  defs.tabindex = 55;\n  var place = document.getElementById(\"testground\"), cm = CodeMirror(place);\n  try {\n    eq(cm.getOption(\"indentUnit\"), 5);\n    cm.setOption(\"indentUnit\", 10);\n    eq(defs.indentUnit, 5);\n    eq(cm.getValue(), \"uu\");\n    eq(cm.getOption(\"enterMode\"), \"keep\");\n    eq(cm.getInputField().tabIndex, 55);\n  }\n  finally {\n    CodeMirror.defaults = olddefaults;\n    place.removeChild(cm.getWrapperElement());\n  }\n});\n\ntestCM(\"lineInfo\", function(cm) {\n  eq(cm.lineInfo(-1), null);\n  var lh = cm.setMarker(1, \"FOO\", \"bar\");\n  var info = cm.lineInfo(1);\n  eq(info.text, \"222222\");\n  eq(info.markerText, \"FOO\");\n  eq(info.markerClass, \"bar\");\n  eq(info.line, 1);\n  eq(cm.lineInfo(2).markerText, null);\n  cm.clearMarker(lh);\n  eq(cm.lineInfo(1).markerText, null);\n}, {value: \"111111\\n222222\\n333333\"});\n\ntestCM(\"coords\", function(cm) {\n  var scroller = cm.getScrollerElement();\n  scroller.style.height = \"100px\";\n  var content = [];\n  for (var i = 0; i < 200; ++i) content.push(\"------------------------------\" + i);\n  cm.setValue(content.join(\"\\n\"));\n  var top = cm.charCoords({line: 0, ch: 0});\n  var bot = cm.charCoords({line: 200, ch: 30});\n  is(top.x < bot.x);\n  is(top.y < bot.y);\n  is(top.y < top.yBot);\n  cm.scrollTo(null, 100);\n  var top2 = cm.charCoords({line: 0, ch: 0});\n  is(top.y > top2.y);\n  eq(top.x, top2.x);\n});\n\ntestCM(\"coordsChar\", function(cm) {\n  var content = [];\n  for (var i = 0; i < 70; ++i) content.push(\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\");\n  cm.setValue(content.join(\"\\n\"));\n  for (var ch = 0; ch < 35; ch += 2) {\n    for (var line = 0; line < 70; line += 5) {\n      cm.setCursor(line, ch);\n      var coords = cm.charCoords({line: line, ch: ch});\n      var pos = cm.coordsChar({x: coords.x, y: coords.y + 1});\n      eq(pos.line, line);\n      eq(pos.ch, ch);\n    }\n  }\n});\n\ntestCM(\"posFromIndex\", function(cm) {\n  cm.setValue(\n    \"This function should\\n\" +\n    \"convert a zero based index\\n\" +\n    \"to line and ch.\"\n  );\n\n  var examples = [\n    { index: -1, line: 0, ch: 0  }, // <- Tests clipping\n    { index: 0,  line: 0, ch: 0  },\n    { index: 10, line: 0, ch: 10 },\n    { index: 39, line: 1, ch: 18 },\n    { index: 55, line: 2, ch: 7  },\n    { index: 63, line: 2, ch: 15 },\n    { index: 64, line: 2, ch: 15 }  // <- Tests clipping\n  ];\n\n  for (var i = 0; i < examples.length; i++) {\n    var example = examples[i];\n    var pos = cm.posFromIndex(example.index);\n    eq(pos.line, example.line);\n    eq(pos.ch, example.ch);\n    if (example.index >= 0 && example.index < 64)\n      eq(cm.indexFromPos(pos), example.index);\n  }  \n});\n\ntestCM(\"undo\", function(cm) {\n  cm.setLine(0, \"def\");\n  eq(cm.historySize().undo, 1);\n  cm.undo();\n  eq(cm.getValue(), \"abc\");\n  eq(cm.historySize().undo, 0);\n  eq(cm.historySize().redo, 1);\n  cm.redo();\n  eq(cm.getValue(), \"def\");\n  eq(cm.historySize().undo, 1);\n  eq(cm.historySize().redo, 0);\n  cm.setValue(\"1\\n\\n\\n2\");\n  cm.clearHistory();\n  eq(cm.historySize().undo, 0);\n  for (var i = 0; i < 20; ++i) {\n    cm.replaceRange(\"a\", {line: 0, ch: 0});\n    cm.replaceRange(\"b\", {line: 3, ch: 0});\n  }\n  eq(cm.historySize().undo, 40);\n  for (var i = 0; i < 40; ++i)\n    cm.undo();\n  eq(cm.historySize().redo, 40);\n  eq(cm.getValue(), \"1\\n\\n\\n2\");\n}, {value: \"abc\"});\n\ntestCM(\"undoMultiLine\", function(cm) {\n  cm.replaceRange(\"x\", {line:0, ch: 0});\n  cm.replaceRange(\"y\", {line:1, ch: 0});\n  cm.undo();\n  eq(cm.getValue(), \"abc\\ndef\\nghi\");\n  cm.replaceRange(\"y\", {line:1, ch: 0});\n  cm.replaceRange(\"x\", {line:0, ch: 0});\n  cm.undo();\n  eq(cm.getValue(), \"abc\\ndef\\nghi\");\n  cm.replaceRange(\"y\", {line:2, ch: 0});\n  cm.replaceRange(\"x\", {line:1, ch: 0});\n  cm.replaceRange(\"z\", {line:2, ch: 0});\n  cm.undo();\n  eq(cm.getValue(), \"abc\\ndef\\nghi\");\n}, {value: \"abc\\ndef\\nghi\"});\n\ntestCM(\"markTextSingleLine\", function(cm) {\n  forEach([{a: 0, b: 1, c: \"\", f: 2, t: 5},\n           {a: 0, b: 4, c: \"\", f: 0, t: 2},\n           {a: 1, b: 2, c: \"x\", f: 3, t: 6},\n           {a: 4, b: 5, c: \"\", f: 3, t: 5},\n           {a: 4, b: 5, c: \"xx\", f: 3, t: 7},\n           {a: 2, b: 5, c: \"\", f: 2, t: 3},\n           {a: 2, b: 5, c: \"abcd\", f: 6, t: 7},\n           {a: 2, b: 6, c: \"x\", f: null, t: null},\n           {a: 3, b: 6, c: \"\", f: null, t: null},\n           {a: 0, b: 9, c: \"hallo\", f: null, t: null},\n           {a: 4, b: 6, c: \"x\", f: 3, t: 4},\n           {a: 4, b: 8, c: \"\", f: 3, t: 4},\n           {a: 6, b: 6, c: \"a\", f: 3, t: 6},\n           {a: 8, b: 9, c: \"\", f: 3, t: 6}], function(test) {\n    cm.setValue(\"1234567890\");\n    var r = cm.markText({line: 0, ch: 3}, {line: 0, ch: 6}, \"foo\");\n    cm.replaceRange(test.c, {line: 0, ch: test.a}, {line: 0, ch: test.b});\n    var f = r.find();\n    eq(f.from && f.from.ch, test.f); eq(f.to && f.to.ch, test.t);\n  });\n});\n\ntestCM(\"markTextMultiLine\", function(cm) {\n  function p(v) { return v && {line: v[0], ch: v[1]}; }\n  forEach([{a: [0, 0], b: [0, 5], c: \"\", f: [0, 0], t: [2, 5]},\n           {a: [0, 1], b: [0, 10], c: \"\", f: [0, 1], t: [2, 5]},\n           {a: [0, 5], b: [0, 6], c: \"x\", f: [0, 6], t: [2, 5]},\n           {a: [0, 0], b: [1, 0], c: \"\", f: [0, 0], t: [1, 5]},\n           {a: [0, 6], b: [2, 4], c: \"\", f: [0, 5], t: [0, 7]},\n           {a: [0, 6], b: [2, 4], c: \"aa\", f: [0, 5], t: [0, 9]},\n           {a: [1, 2], b: [1, 8], c: \"\", f: [0, 5], t: [2, 5]},\n           {a: [0, 5], b: [2, 5], c: \"xx\", f: null, t: null},\n           {a: [0, 0], b: [2, 10], c: \"x\", f: null, t: null},\n           {a: [1, 5], b: [2, 5], c: \"\", f: [0, 5], t: [1, 5]},\n           {a: [2, 0], b: [2, 3], c: \"\", f: [0, 5], t: [2, 2]},\n           {a: [2, 5], b: [3, 0], c: \"a\\nb\", f: [0, 5], t: [2, 5]},\n           {a: [2, 3], b: [3, 0], c: \"x\", f: [0, 5], t: [2, 4]},\n           {a: [1, 1], b: [1, 9], c: \"1\\n2\\n3\", f: [0, 5], t: [4, 5]}], function(test) {\n    cm.setValue(\"aaaaaaaaaa\\nbbbbbbbbbb\\ncccccccccc\\ndddddddd\\n\");\n    var r = cm.markText({line: 0, ch: 5}, {line: 2, ch: 5}, \"foo\");\n    cm.replaceRange(test.c, p(test.a), p(test.b));\n    var f = r.find();\n    eqPos(f.from, p(test.f)); eqPos(f.to, p(test.t));\n  });\n});\n\ntestCM(\"bookmark\", function(cm) {\n  function p(v) { return v && {line: v[0], ch: v[1]}; }\n  forEach([{a: [1, 0], b: [1, 1], c: \"\", d: [1, 4]},\n           {a: [1, 1], b: [1, 1], c: \"xx\", d: [1, 7]},\n           {a: [1, 4], b: [1, 5], c: \"ab\", d: [1, 6]},\n           {a: [1, 4], b: [1, 6], c: \"\", d: null},\n           {a: [1, 5], b: [1, 6], c: \"abc\", d: [1, 5]},\n           {a: [1, 6], b: [1, 8], c: \"\", d: [1, 5]},\n           {a: [1, 4], b: [1, 4], c: \"\\n\\n\", d: [3, 1]},\n           {bm: [1, 9], a: [1, 1], b: [1, 1], c: \"\\n\", d: [2, 8]}], function(test) {\n    cm.setValue(\"1234567890\\n1234567890\\n1234567890\");\n    var b = cm.setBookmark(p(test.bm) || {line: 1, ch: 5});\n    cm.replaceRange(test.c, p(test.a), p(test.b));\n    eqPos(b.find(), p(test.d));\n  });\n});\n\n// Scaffolding\n\nfunction htmlEscape(str) {\n  return str.replace(/[<&]/g, function(str) {return str == \"&\" ? \"&amp;\" : \"&lt;\";});\n}\nfunction forEach(arr, f) {\n  for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]);\n}\n\nfunction Failure(why) {this.message = why;}\n\nfunction test(name, run) {tests.push({name: name, func: run});}\nfunction testCM(name, run, opts) {\n  test(name, function() {\n    var place = document.getElementById(\"testground\"), cm = CodeMirror(place, opts);\n    try {run(cm);}\n    finally {place.removeChild(cm.getWrapperElement());}\n  });\n}\n\nfunction runTests() {\n  var failures = [], run = 0;\n  for (var i = 0; i < tests.length; ++i) {\n    var test = tests[i];\n    try {test.func();}\n    catch(e) {\n      if (e instanceof Failure)\n        failures.push({type: \"failure\", test: test.name, text: e.message});\n      else\n        failures.push({type: \"error\", test: test.name, text: e.toString()});\n    }\n    run++;\n  }\n  var html = [run + \" tests run.\"];\n  if (failures.length)\n    forEach(failures, function(fail) {\n      html.push(fail.test + ': <span class=\"' + fail.type + '\">' + htmlEscape(fail.text) + \"</span>\");\n    });\n  else html.push('<span class=\"ok\">All passed.</span>');\n  document.getElementById(\"output\").innerHTML = html.join(\"\\n\");\n}\n\nfunction eq(a, b, msg) {\n  if (a != b) throw new Failure(a + \" != \" + b + (msg ? \" (\" + msg + \")\" : \"\"));\n}\nfunction eqPos(a, b, msg) {\n  if (a == b) return;\n  if (a == null || b == null) throw new Failure(\"comparing point to null\");\n  eq(a.line, b.line, msg);\n  eq(a.ch, b.ch, msg);\n}\nfunction is(a, msg) {\n  if (!a) throw new Failure(\"assertion failed\" + (msg ? \" (\" + msg + \")\" : \"\"));\n}\n\nwindow.onload = runTests;\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/theme/ambiance.css",
    "content": "/* ambiance theme for code-mirror */\n\n/* Color scheme */\n\n.cm-s-ambiance .cm-keyword { color: #cda869; }\n.cm-s-ambiance .cm-atom { color: #CF7EA9; }\n.cm-s-ambiance .cm-number { color: #78CF8A; }\n.cm-s-ambiance .cm-def { color: #aac6e3; }\n.cm-s-ambiance .cm-variable { color: #ffb795; }\n.cm-s-ambiance .cm-variable-2 { color: #eed1b3; }\n.cm-s-ambiance .cm-variable-3 { color: #faded3; }\n.cm-s-ambiance .cm-property { color: #eed1b3; }\n.cm-s-ambiance .cm-operator {color: #fa8d6a;}\n.cm-s-ambiance .cm-comment { color: #555; font-style:italic; }\n.cm-s-ambiance .cm-string { color: #8f9d6a; }\n.cm-s-ambiance .cm-string-2 { color: #9d937c; }\n.cm-s-ambiance .cm-meta { color: #D2A8A1; }\n.cm-s-ambiance .cm-error { color: #AF2018; }\n.cm-s-ambiance .cm-qualifier { color: yellow; }\n.cm-s-ambiance .cm-builtin { color: #9999cc; }\n.cm-s-ambiance .cm-bracket { color: #24C2C7; }\n.cm-s-ambiance .cm-tag { color: #fee4ff }\n.cm-s-ambiance .cm-attribute {  color: #9B859D; }\n.cm-s-ambiance .cm-header {color: #blue;}\n.cm-s-ambiance .cm-quote { color: #24C2C7; }\n.cm-s-ambiance .cm-hr { color: pink; }\n.cm-s-ambiance .cm-link { color: #F4C20B; }\n.cm-s-ambiance .cm-special { color: #FF9D00; }\n\n.cm-s-ambiance .CodeMirror-matchingbracket { color: #0f0; }\n.cm-s-ambiance .CodeMirror-nonmatchingbracket { color: #f22; }\n\n.cm-s-ambiance .CodeMirror-selected {\n  background: rgba(255, 255, 255, 0.15);\n}\n.CodeMirror-focused .cm-s-ambiance .CodeMirror-selected {\n  background: rgba(255, 255, 255, 0.10);\n}\n\n/* Editor styling */\n\n.cm-s-ambiance {\n  line-height: 1.40em;\n  font-family: Monaco, Menlo,\"Andale Mono\",\"lucida console\",\"Courier New\",monospace !important;\n  font-size: 12px;\n  color: #E6E1DC;\n  background-color: #202020;\n  -webkit-box-shadow: inset 0 0 10px black;\n  -moz-box-shadow: inset 0 0 10px black;\n  -o-box-shadow: inset 0 0 10px black;\n  box-shadow: inset 0 0 10px black;\n}\n\n.cm-s-ambiance .CodeMirror-gutter {\n  background: #3D3D3D;\n  padding: 0 5px;\n  text-shadow: #333 1px 1px;\n  border-right: 1px solid #4D4D4D;\n  box-shadow: 0 10px 20px black;\n}\n\n.cm-s-ambiance .CodeMirror-gutter .CodeMirror-gutter-text {\n  text-shadow: 0px 1px 1px #4d4d4d;\n  color: #222;\n}\n\n.cm-s-ambiance .CodeMirror-lines {\n  \n}\n\n.cm-s-ambiance .CodeMirror-lines .CodeMirror-cursor {\n  border-left: 1px solid #7991E8;\n}\n\n.cm-s-ambiance .activeline {\n  background: none repeat scroll 0% 0% rgba(255, 255, 255, 0.031);\n}\n\n.cm-s-ambiance,\n.cm-s-ambiance .CodeMirror-gutter {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAQAAAAHUWYVAABFFUlEQVQYGbzBCeDVU/74/6fj9HIcx/FRHx9JCFmzMyGRURhLZIkUsoeRfUjS2FNDtr6WkMhO9sm+S8maJfu+Jcsg+/o/c+Z4z/t97/vezy3z+z8ekGlnYICG/o7gdk+wmSHZ1z4pJItqapjoKXWahm8NmV6eOTbWUOp6/6a/XIg6GQqmenJ2lDHyvCFZ2cBDbmtHA043VFhHwXxClWmeYAdLhV00Bd85go8VmaFCkbVkzlQENzfBDZ5gtN7HwF0KDrTwJ0dypSOzpaKCMwQHKTIreYIxlmhXTzTWkVm+LTynZhiSBT3RZQ7aGfjGEd3qyXQ1FDymqbKxpspERQN2MiRjNZlFFQXfCNFm9nM1zpAsoYjmtRTc5ajwuaXc5xrWskT97RaKzAGe5ARHhVUsDbjKklziiX5WROcJwSNCNI+9w1Jwv4Zb2r7lCMZ4oq5C0EdTx+2GzNuKpJ+iFf38JEWkHJn9DNF7mmBDITrWEg0VWL3pHU20tSZnuqWu+R3BtYa8XxV1HO7GyD32UkOpL/yDloINFTmvtId+nmAjxRw40VMwVKiwrKLE4bK5UOVntYwhOcSSXKrJHKPJedocpGjVz/ZMIbnYUPB10/eKCrs5apqpgVmWzBYWpmtKHecJPjaUuEgRDDaU0oZghCJ6zNMQ5ZhDYx05r5v2muQdM0EILtXUsaKiQX9WMEUotagQzFbUNN6NUPC2nm5pxEWGCjMc3GdJHjSU2kORLK/JGSrkfGEIjncU/CYUnOipoYemwj8tST9NsJmB7TUVXtbUtXATJVZXBMvYeTXJfobgJUPmGMP/yFaWonaa6BcFO3nqcIqCozSZoZoSr1g4zJOzuyGnxTEX3lUEJ7WcZgme8ddaWvWJo2AJR9DZU3CUIbhCSG6ybSwN6qtJVnCU2svDTP2ZInOw2cBTrqtQahtNZn9NcJ4l2NaSmSkkP1noZWnVwkLmdUPOwLZEwy2Z3S3R+4rIG9hcbpPXHFVWcQdZkn2FOta3cKWQnNRC5g1LsJah4GCzSVsKnCOY5OAFRTBekyyryeyilhFKva75r4Mc0aWanGEaThcy31s439KKxTzJYY5WTHPU1FtIHjQU3Oip4xlNzj/lBw23dYZVliQa7WAXf4shetcQfatI+jWRDBPmyNeW6A1P5kdDgyYJlba0BIM8BZu1JfrFwItyjcAMR3K0BWOIrtMEXyhyrlVEx3ui5dUBjmB/Q3CXW85R4mBD0s7B+4q5tKUjOlb9qqmhi5AZ6GFIC5HXtOobdYGlVdMVbNJ8toNTFcHxnoL+muBagcctjWnbNMuR00uI7nQESwg5q2qqrKWIfrNUmeQocY6HuyxJV02wj36w00yhpmUFenv4p6fUkZYqLyuinx2RGOjhCXYyJF84oiU00YMOOhhquNdfbOB7gU88pY4xJO8LVdp6/q2voeB4R04vIdhSE40xZObx1HGGJ/ja0LBthFInKaLPPFzuCaYaoj8JjPME8yoyxo6zlBqkiUZYgq00OYMswbWO5NGmq+xhipxHLRW29ARjNKXO0wRnear8XSg4XFPLKEPUS1GqvyLwiuBUoa7zpZ0l5xxFwWmWZC1H5h5FwU8eQ7K+g8UcVY6TMQreVQT/8uQ8Z+ALIXnSEa2pYZQneE9RZbSBNYXfWYJzW/h/4j4Dp1tYVcFIC5019Vyi4ThPqSFCzjGWaHQTBU8q6vrVwgxP9Lkm840imWKpcLCjYTtrKuwvsKSnrvHCXGkSMk9p6lhckfRpIeis+N2PiszT+mFLspyGleUhDwcLrZqmyeylxwjBcKHEapqkmyangyLZRVOijwOtCY5SsG5zL0OwlCJ4y5KznF3EUNDDrinwiyLZRzOXtlBbK5ITHFGLp8Q0R6ab6mS7enI2cFrxOyHvOCFaT1HThS1krjCwqWeurCkk+willhCC+RSZnRXBiZaC5RXRIZYKp2lyfrHwiKPKR0JDzrdU2EFgpidawlFDR6FgXUMNa+g1FY3bUQh2cLCwosRdnuQTS/S+JVrGLeWIvtQUvONJxlqSQYYKpwoN2kaocLjdVsis4Mk80ESF2YpSkzwldjHkjFCUutI/r+EHDU8oCs6yzL3PhWiEooZdFMkymlas4AcI3KmoMMNSQ3tHzjGWCrcJJdYyZC7QFGwjRL9p+MrRkAGWzIaWCn9W0F3TsK01c2ZvQw0byvxuQU0r1lM0qJO7wW0kRIMdDTtXEdzi4VIh+EoIHm0mWtAtpCixlabgn83fKTI7anJe9ST7WIK1DMGpQmYeA58ImV6ezOGOzK2Kgq01pd60cKWiUi9Lievb/0vIDPHQ05Kzt4ddPckQBQtoaurjyHnek/nKzpQLrVgKPjIkh2v4uyezpv+Xoo7fPFXaGFp1vaLKxQ4uUpQQS5VuQs7BCq4xRJv7fwpVvvFEB3j+620haOuocqMhWd6TTPAEx+mdFNGHdranFe95WrWmIvlY4F1Dle2ECgc6cto7SryuqGGGha0tFQ5V53migUKmg6XKAo4qS3mik+0OZpAhOLeZKicacgaYcyx5hypYQE02ZA4xi/pNhOQxR4klNKyqacj+mpxnLTnnGSo85++3ZCZq6lrZkXlGEX3o+C9FieccJbZWVFjC0Yo1FZnJhoYMFoI1hEZ9r6hwg75HwzBNhbZCdJEfJwTPGzJvaKImw1yYX1HDAmpXR+ZJQ/SmgqMNVQb5vgamGwLtt7VwvP7Qk1xpiM5x5Cyv93E06MZmgs0Nya2azIKOYKCGBQQW97RmhKNKF02JZqHEJ4o58qp7X5EcZmc56trXEqzjCBZ1MFGR87Ql2tSTs6CGxS05PTzRQorkbw7aKoKXFDXsYW42VJih/q+FP2BdTzDTwVqOYB13liM50vG7wy28qagyuIXMeQI/Oqq8bcn5wJI50xH00CRntyfpL1T4hydYpoXgNiFzoIUTDZnLNRzh4TBHwbYGDvZkxmlyJloyr6tRihpeUG94GnKtIznREF0tzJG/OOr73JBcrSh1k6WuTprgLU+mnSGnv6Zge0NNz+kTDdH8nuAuTdJDCNb21LCiIuqlYbqGzT3RAoZofQfjFazkqeNWdYaGvYTM001EW2oKPvVk1ldUGSgUtHFwjKM1h9jnFcmy5lChoLNaQMGGDsYbKixlaMBmmsx1QjCfflwTfO/gckW0ruZ3jugKR3R5W9hGUWqCgxuFgsuaCHorotGKzGaeZB9DMsaTnKCpMtwTvOzhYk0rdrArKCqcaWmVk1+F372ur1YkKxgatI8Qfe1gIX9wE9FgS8ESmuABIXnRUbCapcKe+nO7slClSZFzpV/LkLncEb1qiO42fS3R855Su2mCLh62t1SYZZYVmKwIHjREF2uihTzB20JOkz7dkxzYQnK0UOU494wh+VWRc6Un2kpTaVgLDFEkJ/uhzRcI0YKGgpGWOlocBU/a4fKoJ/pEaNV6jip3+Es9VXY078rGnmAdf7t9ylPXS34RBSuYPs1UecZTU78WanhBCHpZ5sAoTz0LGZKjPf9TRypqWEiTvOFglL1fCEY3wY/++rbk7C8bWebA6p6om6PgOL2kp44TFJlVNBXae2rqqdZztOJpT87GQsE9jqCPIe9VReZuQ/CIgacsyZdCpIScSYqcZk8r+nsyCzhyfhOqHGOIvrLknC8wTpFcaYiGC/RU1NRbUeUpocQOnkRpGOrIOcNRx+1uA0UrzhSSt+VyS3SJpnFWkzNDqOFGIWcfR86DnmARTQ1HKIL33ExPiemeOhYSSjzlSUZZuE4TveoJLnBUOFof6KiysCbnAEcZgcUNTDOwkqWu3RWtmGpZwlHhJENdZ3miGz0lJlsKnjbwqSHQjpxnFDlTLLwqJPMZMjd7KrzkSG7VsxXBZE+F8YZkb01Oe00yyRK9psh5SYh29ySPKBo2ylNht7ZkZnsKenjKNJu9PNEyZpaCHv4Kt6RQsLvAVp7M9kIimmCUwGeWqLMmGuIotYMmWNpSahkhZw9FqZsVnKJhsjAHvtHMsTM9fCI06Dx/u3vfUXCqfsKRc4oFY2jMsoo/7DJDwZ1CsIKnJu+J9ldkpmiCxQx1rWjI+T9FwcWWzOuaYH0Hj7klNRVWEQpmaqosakiGNTFHdjS/qnUdmf0NJW5xsL0HhimCCZZSRzmSPTXJQ4aaztAwtZnoabebJ+htCaZ7Cm535ByoqXKbX1WRc4Eh2MkRXWzImVc96Cj4VdOKVxR84VdQsIUM8Psoou2byVHyZFuq7O8otbSQ2UAoeEWTudATLGSpZzVLlXVkPU2Jc+27lsw2jmg5T5VhbeE3BT083K9WsTTkFU/Osi0rC5lRlpwRHUiesNS0sOvmqGML1aRbPAxTJD9ZKtxuob+hhl8cwYGWpJ8nub7t5p6coYbMovZ1BTdaKn1jYD6h4GFDNFyT/Kqe1XCXphXHOKLZmuRSRdBPEfVUXQzJm5YGPGGJdvAEr7hHNdGZnuBvrpciGmopOLf5N0uVMy0FfYToJk90uUCbJupaVpO53UJXR2bVpoU00V2KOo4zMFrBd0Jtz2pa0clT5Q5L8IpQ177mWQejPMEJhuQjS10ref6HHjdEhy1P1EYR7GtO0uSsKJQYLiTnG1rVScj5lyazpqWGl5uBbRWl7m6ixGOOnEsMJR7z8J0n6KMnCdxhiNYQCoZ6CmYLnO8omC3MkW3bktlPmEt/VQQHejL3+dOE5FlPdK/Mq8hZxxJtLyRrepLThYKbLZxkSb5W52vYxNOaOxUF0yxMUPwBTYqCzy01XayYK0sJyWBLqX0MwU5CzoymRzV0EjjeUeLgDpTo6ij42ZAzvD01dHUUTPLU96MdLbBME8nFBn7zJCMtJcZokn8YoqU0FS5WFKyniHobguMcmW8N0XkWZjkyN3hqOMtS08r+/xTBwpZSZ3qiVRX8SzMHHjfUNFjgHEPmY9PL3ykEzxkSre/1ZD6z/NuznuB0RcE1TWTm9zRgfUWVJiG6yrzgmWPXC8EAR4Wxhlad0ZbgQyEz3pG5RVEwwDJH2mgKpjcTiCOzn1lfUWANFbZ2BA8balnEweJC9J0iuaeZoI+ippFCztEKVvckR2iice1JvhVytrQwUAZpgsubCPaU7xUe9vWnaOpaSBEspalykhC9bUlOMpT42ZHca6hyrqKmw/wMR8H5ZmdFoBVJb03O4UL0tSNnvIeRmkrLWqrs78gcrEn2tpcboh0UPOW3UUR9PMk4T4nnNKWmCjlrefhCwxRNztfmIQVdDElvS4m1/WuOujoZCs5XVOjtKPGokJzsYCtFYoWonSPT21DheU/wWhM19FcElwqNGOsp9Q8N/cwXaiND1MmeL1Q5XROtYYgGeFq1aTMsoMmcrKjQrOFQTQ1fmBYhmW6o8Jkjc7iDJRTBIo5kgJD5yMEYA3srCg7VFKwiVJkmRCc5ohGOKhsYMn/XBLdo5taZjlb9YAlGWRimqbCsoY7HFAXLa5I1HPRxMMsQDHFkWtRNniqT9UEeNjcE7RUlrCJ4R2CSJuqlKHWvJXjAUNcITYkenuBRB84TbeepcqTj3zZyFJzgYQdHnqfgI0ddUwS6GqWpsKWhjq9cV0vBAEMN2znq+EBfIWT+pClYw5xsTlJU6GeIBsjGmmANTzJZiIYpgrM0Oa8ZMjd7NP87jxhqGOhJlnQtjuQpB+8aEE00wZFznSJPyHxgH3HkPOsJFvYk8zqCHzTs1BYOa4J3PFU+UVRZxlHDM4YavlNUuMoRveiZA2d7grMNc2g+RbSCEKzmgYsUmWmazFJyoiOZ4KnyhKOGRzWJa0+moyV4TVHDzn51Awtqaphfk/lRQ08FX1iiqxTB/kLwd0VynKfEvI6cd4XMV5bMhZ7gZUWVzYQ6Nm2BYzxJbw3bGthEUUMfgbGeorae6DxHtJoZ6alhZ0+ytiVoK1R4z5PTrOECT/SugseEOlb1MMNR4VRNcJy+V1Hg9ONClSZFZjdHlc6W6FBLdJja2MC5hhpu0DBYEY1TFGwiFAxRRCsYkiM9JRb0JNMVkW6CZYT/2EiTGWmo8k+h4FhDNE7BvppoTSFnmCV5xZKzvcCdDo7VVPnIU+I+Rc68juApC90MwcFCsJ5hDqxgScYKreruyQwTqrzoqDCmhWi4IbhB0Yrt3RGa6GfDv52rKXWhh28dyZaWUvcZeMTBaZoSGyiCtRU5J8iviioHaErs7Jkj61syVzTTgOcUOQ8buFBTYWdL5g3T4qlpe0+wvD63heAXRfCCIed9RbCsp2CiI7raUOYOTU13N8PNHvpaGvayo4a3LLT1lDrVEPT2zLUlheB1R+ZTRfKWJ+dcocLJfi11vyJ51lLqJ0WD7tRwryezjiV5W28uJO9qykzX8JDe2lHl/9oyBwa2UMfOngpXCixvKdXTk3wrsKmiVYdZIqsoWEERjbcUNDuiaQomGoIbFdEHmsyWnuR+IeriKDVLnlawlyNHKwKlSU631PKep8J4Q+ayjkSLKYLhalNHlYvttb6fHm0p6OApsZ4l2VfdqZkjuysy6ysKLlckf1KUutCTs39bmCgEyyoasIWlVaMF7mgmWtBT8Kol5xpH9IGllo8cJdopcvZ2sImlDmMIbtDk3KIpeNiS08lQw11NFPTwVFlPP6pJ2gvRfI7gQUfmNAtf6Gs0wQxDsKGlVBdF8rCa3jzdwMaGHOsItrZk7hAyOzpK9VS06j5F49b0VNGOOfKs3lDToMsMBe9ZWtHFEgxTJLs7qrygKZjUnmCYoeAqeU6jqWuLJup4WghOdvCYJnrSkSzoyRkm5M2StQwVltPkfCAk58tET/CSg+8MUecmotMEnhBKfWBIZsg2ihruMJQaoIm+tkTLKEqspMh00w95gvFCQRtDwTT1gVDDSEVdlwqZfxoQRbK0g+tbiBZxzKlpnpypejdDwTaeOvorMk/IJE10h9CqRe28hhLbe0pMsdSwv4ZbhKivo2BjDWfL8UKJgeavwlwb5KlwhyE4u4XkGE2ytZCznKLCDZZq42VzT8HLCrpruFbIfOIINmh/qCdZ1ZBc65kLHR1Bkyf5zn6pN3SvGKIlFNGplhrO9QSXanLOMQTLCa0YJCRrCZm/CZmrLTm7WzCK4GJDiWUdFeYx1LCFg3NMd0XmCuF3Y5rITLDUsYS9zoHVzwnJoYpSTQoObyEzr4cFBNqYTopoaU/wkyLZ2lPhX/5Y95ulxGTV7KjhWrOZgl8MyUUafjYraNjNU1N3IWcjT5WzWqjwtoarHSUObGYO3GCJZpsBlnJGPd6ZYLyl1GdCA2625IwwJDP8GUKymbzuyPlZlvTUsaUh5zFDhRWFzPKKZLAlWdcQbObgF9tOqOsmB1dqcqYJmWstFbZRRI9poolmqiLnU0POvxScpah2iSL5UJNzgScY5+AuIbpO0YD3NCW+dLMszFSdFCWGqG6eVq2uYVNDdICGD6W7EPRWZEY5gpsE9rUkS3mijzzJnm6UpUFXG1hCUeVoS5WfNcFpblELL2qqrCvMvRfd45oalvKU2tiQ6ePJOVMRXase9iTtLJztPxJKLWpo2CRDcJwn2sWSLKIO1WQWNTCvpVUvOZhgSC40JD0dOctaSqzkCRbXsKlb11Oip6PCJ0IwSJM31j3akRxlP7Rwn6aGaUL0qiLnJkvB3xWZ2+Q1TfCwpQH3G0o92UzmX4o/oJNQMMSQc547wVHhdk+VCw01DFYEnTxzZKAm74QmeNNR1w6WzEhNK15VJzuCdxQ53dRUDws5KvwgBMOEgpcVNe0hZI6RXT1Jd0cyj5nsaEAHgVmGaJIlWdsc5Ui2ElrRR6jrRAttNMEAIWrTDFubkZaok7/AkzfIwfuWVq0jHzuCK4QabtLUMVPB3kJ0oyHTSVFlqMALilJf2Rf8k5aaHtMfayocLBS8L89oKoxpJvnAkDPa0qp5DAUTHKWmCcnthlou8iCKaFFLHWcINd1nyIwXqrSxMNmSs6KmoL2QrKuWtlQ5V0120xQ5vRyZS1rgFkWwhiOwiuQbR0OOVhQM9iS3tiXp4RawRPMp5tDletOOBL95MpM01dZTBM9pkn5qF010rIeHFcFZhmSGpYpTsI6nwhqe5C9ynhlpp5ophuRb6WcJFldkVnVEwwxVfrVkvnWUuNLCg5bgboFHPDlDPDmnK7hUrWiIbjadDclujlZcaokOFup4Ri1kacV6jmrrK1hN9bGwpKEBQ4Q6DvIUXOmo6U5LqQM6EPyiKNjVkPnJkDPNEaxhiFay5ExW1NXVUGqcpYYdPcGiCq7z/TSlbhL4pplWXKd7NZO5QQFrefhRQW/NHOsqcIglc4UhWklR8K0QzbAw08CBDnpbgqXdeD/QUsM4RZXDFBW6WJKe/mFPdH0LtBgiq57wFLzlyQzz82qYx5D5WJP5yVJDW01BfyHnS6HKO/reZqId1WGa4Hkh2kWodJ8i6KoIPlAj2hPt76CzXsVR6koPRzWTfKqIentatYpQw2me4AA3y1Kind3SwoOKZDcFXTwl9tWU6mfgRk9d71sKtlNwrjnYw5tC5n5LdKiGry3JKNlHEd3oaMCFHrazBPMp/uNJ+V7IudcSbeOIdjUEdwl0VHCOZo5t6YluEuaC9mQeMgSfOyKnYGFHcIeQ84yQWbuJYJpZw5CzglDH7gKnWqqM9ZTaXcN0TeYhR84eQtJT76JJ1lREe7WnnvsMmRc9FQ7SBBM9mV3lCUdmHk/S2RAMt0QjFNFqQpWjDPQ01DXWUdDBkXziKPjGEP3VP+zIWU2t7im41FOloyWzn/L6dkUy3VLDaZ6appgDLHPjJEsyvJngWEPUyVBiAaHCTEXwrLvSEbV1e1gKJniicWorC1MUrVjB3uDhJE/wgSOzk1DXpk0k73qCM8xw2UvD5kJmDUfOomqMpWCkJRlvKXGmoeBm18USjVIk04SClxTB6YrgLAPLWYK9HLUt5cmc0vYES8GnTeRc6skZbQkWdxRsIcyBRzx1DbTk9FbU0caTPOgJHhJKnOGIVhQqvKmo0llRw9sabrZkDtdg3PqaKi9oatjY8B+G371paMg6+mZFNNtQ04mWBq3rYLOmtWWQp8KJnpy9DdFensyjdqZ+yY40VJlH8wcdLzC8PZnvHMFUTZUrDTkLyQaGus5X5LzpYAf3i+e/ZlhqGqWhh6Ou6xTR9Z6oi5AZZtp7Mj2EEm8oSpxiYZCHU/1fbGdNNNRRoZMhmilEb2gqHOEJDtXkHK/JnG6IrvbPCwV3NhONVdS1thBMs1T4QOBcTWa2IzhMk2nW5Kyn9tXUtpv9RsG2msxk+ZsQzRQacJncpgke0+T8y5Fzj8BiGo7XlJjaTIlpQs7KFjpqGnKuoyEPeIKnFMkZHvopgh81ySxNFWvJWcKRs70j2FOT012IllEEO1n4pD1513Yg2ssQPOThOkvyrqHUdEXOSEsihmBbTbKX1kLBPWqWkLOqJbjB3GBIZmoa8qWl4CG/iZ7oiA72ZL7TJNeZUY7kFQftDcHHluBzRbCegzMtrRjVQpX2lgoPKKLJAkcbMl01XK2p7yhL8pCBbQ3BN2avJgKvttcrWDK3CiUOVxQ8ZP+pqXKyIxnmBymCg5vJjNfkPK4+c8cIfK8ocVt7kmfd/I5SR1hKvCzUtb+lhgc00ZaO6CyhIQP1Uv4yIZjload72PXX0OIJvnFU+0Zf6MhsJwTfW0r0UwQfW4LNLZl5HK261JCZ4qnBaAreVAS3WrjV0LBnNDUNNDToCEeFfwgcb4gOEqLRhirWkexrCEYKVV711DLYEE1XBEsp5tpTGjorkomKYF9FDXv7fR3BGwbettSxnyL53MBPjsxDZjMh+VUW9NRxq1DhVk+FSxQcaGjV9Pawv6eGByw5qzoy7xk4RsOShqjJwWKe/1pEEfzkobeD/dQJmpqedcyBTy2sr4nGNRH0c0SPWTLrqAc0OQcb/gemKgqucQT7ySWKCn2EUotoCvpZct7RO2sy/QW0IWcXd7pQRQyZVwT2USRO87uhjioTLKV2brpMUcMQRbKH/N2T+UlTpaMls6cmc6CCNy3JdYYSUzzJQ4oSD3oKLncULOiJvjBEC2oqnCJkJluCYy2ZQ5so9YYlZ1VLlQU1mXEW1jZERwj/MUSRc24TdexlqLKfQBtDTScJUV8FszXBEY5ktpD5Ur9hYB4Nb1iikw3JoYpkKX+RodRKFt53MMuRnKSpY31PwYaGaILh3wxJGz9TkTPEETxoCWZrgvOlmyMzxFEwVJE5xZKzvyJ4WxEc16Gd4Xe3Weq4XH2jKRikqOkGQ87hQnC7wBmGYLAnesX3M+S87eFATauuN+Qcrh7xIxXJbUIdMw3JGE3ylCWzrieaqCn4zhGM19TQ3z1oH1AX+pWEqIc7wNGAkULBo/ZxRaV9NNyh4Br3rCHZzbzmSfawBL0dNRwpW1kK9mxPXR9povcdrGSZK9c2k0xwFGzjuniCtRSZCZ6ccZ7gaktmgAOtKbG/JnOkJrjcQTdFMsxRQ2cLY3WTIrlCw1eWKn8R6pvt4GFDso3QoL4a3nLk3G6JrtME3dSenpx7PNFTmga0EaJTLQ061sEeQoWXhSo9LTXsaSjoJQRXeZLtDclbCrYzfzHHeaKjHCVOUkQHO3JeEepr56mhiyaYYKjjNU+Fed1wS5VlhWSqI/hYUdDOkaxiKehoyOnrCV5yBHtbWFqTHCCwtpDcYolesVR5yUzTZBb3RNMd0d6WP+SvhuBmRcGxnuQzT95IC285cr41cLGQ6aJJhmi4TMGempxeimBRQw1tFKV+8jd6KuzoSTqqDxzRtpZkurvKEHxlqXKRIjjfUNNXQsNOsRScoWFLT+YeRZVD3GRN0MdQcKqQjHDMrdGGVu3iYJpQx3WGUvfbmxwFfR20WBq0oYY7LMFhhgYtr8jpaEnaOzjawWWaTP8mMr0t/EPDPoqcnxTBI5o58L7uoWnMrpoqPwgVrlAUWE+V+TQl9rawoyP6QGAlQw2TPRX+YSkxyBC8Z6jhHkXBgQL7WII3DVFnRfCrBfxewv9D6xsyjys4VkhWb9pUU627JllV0YDNHMku/ldNMMXDEo4aFnAkk4U6frNEU4XgZUPmEKHUl44KrzmYamjAbh0JFvGnaTLPu1s9jPCwjFpYiN7z1DTOk/nc07CfDFzmCf7i+bfNHXhDtLeBXzTBT5rkMvWOIxpl4EMh2LGJBu2syDnAEx2naEhHDWMMzPZEhygyS1mS5RTJr5ZkoKbEUoYqr2kqdDUE8ztK7OaIntJkFrIECwv8LJTaVx5XJE86go8dFeZ3FN3rjabCAYpoYEeC9zzJVULBbmZhDyd7ko09ydpNZ3nm2Kee4FPPXHnYEF1nqOFEC08LUVcDvYXkJHW8gTaKCk9YGOeIJhqiE4ToPEepdp7IWFjdwnWaufGMwJJCMtUTTBBK9BGCOy2tGGrJTHIwyEOzp6aPzNMOtlZkDvcEWpP5SVNhfkvDxhmSazTJXYrM9U1E0xwFVwqZQwzJxw6+kGGGUj2FglGGmnb1/G51udRSMNlTw6GGnCcUwVcOpmsqTHa06o72sw1RL02p9z0VbnMLOaIX3QKaYKSCFQzBKEUNHTSc48k53RH9wxGMtpQa5KjjW0W0n6XCCCG4yxNNdhQ4R4l1Ff+2sSd6UFHiIEOyqqFgT01mEUMD+joy75jPhOA+oVVLm309FR4yVOlp4RhLiScNmSmaYF5Pw0STrOIoWMSR2UkRXOMp+M4SHW8o8Zoi6OZgjKOaFar8zZDzkWzvKOjkKBjmCXby8JahhjXULY4KlzgKLvAwxVGhvyd4zxB1d9T0piazmKLCVZY5sKiD0y2ZSYrkUEPUbIk+dlQ4SJHTR50k1DPaUWIdTZW9NJwnJMOECgd7ou/MnppMJ02O1VT4Wsh85MnZzcFTngpXGKo84qmwgKbCL/orR/SzJ2crA+t6Mp94KvxJUeIbT3CQu1uIdlQEOzlKfS3UMcrTiFmOuroocrZrT2AcmamOKg8YomeEKm/rlT2sociMaybaUlFhuqHCM2qIJ+rg4EcDFymiDSxzaHdPcpE62pD5kyM5SBMoA1PaUtfIthS85ig1VPiPPYXgYEMNk4Qq7TXBgo7oT57gPUdwgCHzhIVFPFU6OYJzHAX9m5oNrVjeE61miDrqQ4VSa1oiURTsKHC0IfjNwU2WzK6eqK8jWln4g15TVBnqmDteCJ501PGAocJhhqjZdtBEB6lnhLreFJKxmlKbeGrqLiSThVIbCdGzloasa6lpMQXHCME2boLpJgT7yWaemu6wBONbqGNVRS0PKIL7LckbjmQtR7K8I5qtqel+T/ChJTNIKLjdUMNIRyvOEko9YYl2cwQveBikCNawJKcLBbc7+JM92mysNvd/Fqp8a0k6CNEe7cnZrxlW0wQXaXjaktnRwNOGZKYiONwS7a1JVheq3WgJHlQUGKHKmp4KAxXR/ULURcNgoa4zhKSLpZR3kxRRb0NmD0OFn+UCS7CzI1nbP6+o4x47QZE5xRCt3ZagnYcvmpYQktXdk5YKXTzBC57kKEe0VVuiSYqapssMS3C9p2CKkHOg8B8Pa8p5atrIw3qezIWanMGa5HRDNF6RM9wcacl0N+Q8Z8hsIkSnaIIdHRUOEebAPy1zbCkhM062FCJtif7PU+UtoVXzWKqM1PxXO8cfdruhFQ/a6x3JKYagvVDhQEtNiyiiSQ7OsuRsZUku0CRNDs4Sog6KKjsZgk2bYJqijgsEenoKeniinRXBn/U3lgpPdyDZynQx8IiioMnCep5Ky8mjGs6Wty0l1hUQTcNWswS3WRp2kCNZwJG8omG8JphPUaFbC8lEfabwP7VtM9yoaNCAjpR41VNhrD9LkbN722v0CoZMByFzhaW+MyzRYEWFDQwN2M4/JiT76PuljT3VU/A36eaIThb+R9oZGOAJ9tewkgGvqOMNRWYjT/Cwu99Q8LqDE4TgbLWxJ1jaDDAERsFOFrobgjUsBScaguXU8kKm2RL19tRypSHnHNlHiIZqgufs4opgQdVdwxBNNFBR6kVFqb8ogimOzB6a6HTzrlDHEpYaxjiiA4TMQobkDg2vejjfwJGWmnbVFAw3H3hq2NyQfG7hz4aC+w3BbwbesG0swYayvpAs6++Ri1Vfzx93mFChvyN5xVHTS+0p9aqCAxyZ6ZacZyw5+7uuQkFPR9DDk9NOiE7X1PCYJVjVUqq7JlrHwWALF5nfHNGjApdpqgzx5OwilDhCiDYTgnc9waGW4BdLNNUQvOtpzDOWHDH8D7TR/A/85KljEQu3NREc4Pl/6B1Hhc8Umb5CsKMmGC9EPcxoT2amwHNCmeOEnOPbklnMkbOgIvO5UMOpQrS9UGVdt6iH/fURjhI/WOpaW9OKLYRod6HCUEdOX000wpDZQ6hwg6LgZfOqo1RfT/CrJzjekXOGhpc1VW71ZLbXyyp+93ILbC1kPtIEYx0FIx1VDrLoVzXRKRYWk809yYlC9ImcrinxtabKnzRJk3lAU1OLEN1j2zrYzr2myHRXJFf4h4QKT1qSTzTB5+ZNTzTRkAxX8FcLV2uS8eoQQ2aAkFzvCM72sJIcJET3WPjRk5wi32uSS9rfZajpWEvj9hW42F4o5NytSXYy8IKHay10VYdrcl4SkqscrXpMwyGOgtkajheSxdQqmpxP1L3t4R5PqasFnrQEjytq6qgp9Y09Qx9o4S1FzhUCn1kyHSzBWLemoSGvOqLNhZyBjmCaAUYpMgt4Ck7wBBMMwWKWgjsUwTaGVsxWC1mYoKiyqqeGKYqonSIRQ3KIkHO0pmAxTdBHkbOvfllfr+AA+7gnc50huVKYK393FOyg7rbPO/izI7hE4CnHHHnJ0ogNPRUGeUpsrZZTBJcrovUcJe51BPsr6GkJdhCCsZ6aTtMEb2pqWkqeVtDXE/QVggsU/Nl86d9RMF3DxvZTA58agu810RWawCiSzzXBeU3MMW9oyJUedvNEvQyNu1f10BSMddR1vaLCYpYa/mGocLSiYDcLbQz8aMn5iyF4xBNMs1P0QEOV7o5gaWGuzSeLue4tt3ro7y4Tgm4G/mopdZgl6q0o6KzJWE3mMksNr3r+a6CbT8g5wZNzT9O7fi/zpaOmnz3BRoqos+tv9zMbdpxsqDBOEewtJLt7cg5wtKKbvldpSzRRCD43VFheCI7yZLppggMVBS/KMAdHODJvOwq2NQSbKKKPLdFWQs7Fqo+mpl01JXYRgq8dnGLhTiFzqmWsUMdpllZdbKlyvSdYxhI9YghOtxR8LgSLWHK62mGGVoxzBE8LNWzqH9CUesQzFy5RQzTc56mhi6fgXEWwpKfE5Z7M05ZgZUPmo6auiv8YKzDYwWBLMErIbKHJvOwIrvEdhOBcQ9JdU1NHQ7CXn2XIDFBKU2WAgcX9UAUzDXWd5alwuyJ41Z9rjKLCL4aCp4WarhPm2rH+SaHUYE001JDZ2ZAzXPjdMpZWvC9wmqIB2lLhQ01D5jO06hghWMndbM7yRJMsoCj1vYbnFQVrW9jak3OlEJ3s/96+p33dEPRV5GxiqaGjIthUU6FFEZyqCa5qJrpBdzSw95IUnOPIrCUUjRZQFrbw5PR0R1qiYx3cb6nrWUMrBmmiBQxVHtTew5ICP/ip6g4hed/Akob/32wvBHsIOX83cI8hGeNeNPCIkPmXe8fPKx84OMSRM1MTdXSwjCZ4S30jVGhvqTRak/OVhgGazHuOCud5onEO1lJr6ecVyaOK6H7zqlBlIaHE0oroCgfvGJIdPcmfLNGLjpz7hZwZQpUbFME0A1cIJa7VNORkgfsMBatbKgwwJM9bSvQXeNOvbIjelg6WWvo5kvbKaJJNHexkKNHL9xRyFlH8Ti2riB5wVPhUk7nGkJnoCe428LR/wRGdYIlmWebCyxou1rCk4g/ShugBDX0V0ZQWkh0dOVsagkM0yV6OoLd5ye+pRlsCr0n+KiQrGuq5yJDzrTAXHtLUMduTDBVKrSm3eHL+6ijxhFDX9Z5gVU/wliHYTMiMFpKLNMEywu80wd3meoFmt6VbRMPenhrOc6DVe4pgXU8DnnHakLOIIrlF4FZPIw6R+zxBP0dyq6OOZ4Q5sLKCcz084ok+VsMMyQhNZmmBgX5xIXOEJTmi7VsGTvMTNdHHhpzdbE8Du2oKxgvBqQKdDDnTFOylCFaxR1syz2iqrOI/FEpNc3C6f11/7+ASS6l2inq2ciTrCCzgyemrCL5SVPjQkdPZUmGy2c9Sw9FtR1sS30RmsKPCS4rkIC/2U0MduwucYolGaPjKEyhzmiPYXagyWbYz8LWBDdzRimAXzxx4z8K9hpzlhLq+NiQ97HuKorMUfK/OVvC2JfiHUPCQI/q7J2gjK+tTDNxkCc4TMssqCs4TGtLVwQihyoAWgj9bosU80XGW6Ac9TJGziaUh5+hnFcHOnlaM1iRn29NaqGENTTTSUHCH2tWTeV0osUhH6psuVLjRUmGWhm6OZEshGeNowABHcJ2Bpy2ZszRcKkRXd2QuKVEeXnbfaEq825FguqfgfE2whlChSRMdron+LATTPQ2Z369t4B9C5gs/ylzv+CMmepIDPclFQl13W0rspPd1JOcbghGOEutqCv5qacURQl3dDKyvyJlqKXGPgcM9FfawJAMVmdcspcYKOZc4GjDYkFlK05olNMHyHn4zFNykyOxt99RkHlfwmiHo60l2EKI+mhreEKp080Tbug08BVPcgoqC5zWt+NLDTZ7oNSF51N1qie7Va3uCCwyZbkINf/NED6jzOsBdZjFN8oqG3wxVunqCSYYKf3EdhJyf9YWGf7tRU2oH3VHgPr1fe5J9hOgHd7xQ0y7qBwXr23aGErP0cm64JVjZwsOGqL+mhNgZmhJLW2oY4UhedsyBgzrCKrq7BmcpNVhR6jBPq64Vgi+kn6XE68pp8J5/+0wRHGOpsKenQn9DZntPzjRLZpDAdD2fnSgkG9tmIXnUwQ6WVighs7Yi2MxQ0N3CqYaCXkJ0oyOztMDJjmSSpcpvlrk0RMMOjmArQ04PRV1DO1FwhCVaUVPpKUM03JK5SxPsIWRu8/CGHi8UHChiqGFDTbSRJWeYUDDcH6vJWUxR4k1FXbMUwV6e4AJFXS8oMqsZKqzvYQ9DDQdZckY4aGsIhtlubbd2r3j4QBMoTamdPZk7O/Bf62lacZwneNjQoGcdVU7zJOd7ghsUHOkosagic6cnWc8+4gg285R6zZP5s1/LUbCKIznTwK36PkdwlOrl4U1LwfdCCa+IrvFkmgw1PCAUXKWo0sURXWcI2muKJlgyFzhynCY4RBOsqCjoI1R5zREco0n2Vt09BQtYSizgKNHfUmUrQ5UOCh51BFcLmY7umhYqXKQomOop8bUnWNNQcIiBcYaC6xzMNOS8JQQfeqKBmmglB+97ok/lfk3ygaHSyZaCRTzRxQo6GzLfa2jWBPepw+UmT7SQEJyiyRkhBLMVOfcoMjcK0eZChfUNzFAUzCsEN5vP/X1uP/n/aoMX+K+nw/Hjr/9xOo7j7Pju61tLcgvJpTWXNbfN5jLpi6VfCOviTktKlFusQixdEKWmEBUKNaIpjZRSSOXSgzaaKLdabrm1/9nZ+/f+vd/vz/v9+Xy+zZ7PRorYoZqyLrCwQdEAixxVOEXNNnjX2nUSRlkqGmWowk8lxR50JPy9Bo6qJXaXwNvREBvnThPEPrewryLhcAnj5WE15Fqi8W7R1sAuEu86S4ENikItFN4xkv9Af4nXSnUVcLiA9xzesFpivRRVeFKtsMRaKBhuSbjOELnAUtlSQUpXgdfB4Z1oSbnFEetbQ0IrAe+Y+pqnDcEJFj6S8LDZzZHwY4e3XONNlARraomNEt2bkvGsosA3ioyHm+6jCMbI59wqt4eeara28IzEmyPgoRaUOEDhTVdEJhmCoTWfC0p8aNkCp0oYqih2iqGi4yXeMkOsn4LdLLnmKfh/YogjNsPebeFGR4m9BJHLzB61XQ3BtpISfS2FugsK9FAtLWX1dCRcrCnUp44CNzuCowUZmxSRgYaE6Za0W2u/E7CVXCiI/UOR8aAm1+OSyE3mOUcwyc1zBBeoX1kiKy0Zfxck1Gsyulti11i83QTBF5Kg3pDQThFMVHiPSlK+0cSedng/VaS8bOZbtsBcTcZAR8JP5KeqQ1OYKAi20njdNNRpgnsU//K+JnaXJaGTomr7aYIphoRn9aeShJWKEq9LcozSF7QleEfDI5LYm5bgVkFkRwVDBCVu0DDIkGupo8TZBq+/pMQURYErJQmPKGKjNDkWOLx7Jd5QizdUweIaKrlP7SwJDhZvONjLkOsBBX9UpGxnydhXkfBLQ8IxgojQbLFnJf81JytSljclYYyEFyx0kVBvKWOFJmONpshGAcsduQY5giVNCV51eOdJYo/pLhbvM0uDHSevNKRcrKZIqnCtJeEsO95RoqcgGK4ocZcho1tTYtcZvH41pNQ7vA0WrhIfOSraIIntIAi+NXWCErdbkvrWwjRLrt0NKUdL6KSOscTOdMSOUtBHwL6OLA0vNSdynaWQEnCpIvKaIrJJEbvHkmuNhn6OjM8VkSGSqn1uYJCGHnq9I3aLhNME3t6GjIkO7xrNFumpyTNX/NrwX7CrIRiqqWijI9JO4d1iieykyfiposQIQ8YjjsjlBh6oHWbwRjgYJQn2NgSnNycmJAk3NiXhx44Sxykihxm8ybUwT1OVKySc7vi3OXVkdBJ4AyXBeksDXG0IhgtYY0lY5ahCD0ehborIk5aUWRJviMA7Xt5kyRjonrXENkm8yYqgs8VzgrJmClK20uMM3jRJ0FiQICQF9hdETlLQWRIb5ki6WDfWRPobvO6a4GP5mcOrNzDFELtTkONLh9dXE8xypEg7z8A9jkhrQ6Fhjlg/QVktJXxt4WXzT/03Q8IaQWSqIuEvloQ2mqC9Jfi7wRul4RX3pSPlzpoVlmCtI2jvKHCFhjcM3sN6lqF6HxnKelLjXWbwrpR4xzuCrTUZx2qq9oAh8p6ixCUGr78g8oyjRAtB5CZFwi80VerVpI0h+IeBxa6Zg6kWvpDHaioYYuEsRbDC3eOmC2JvGYLeioxGknL2UATNJN6hmtj1DlpLvDVmocYbrGCVJKOrg4X6DgddLA203BKMFngdJJFtFd7vJLm6KEpc5yjQrkk7M80SGe34X24nSex1Ra5Omgb71JKyg8SrU3i/kARKwWpH0kOGhKkObyfd0ZGjvyXlAkVZ4xRbYJ2irFMkFY1SwyWxr2oo4zlNiV+7zmaweFpT4kR3kaDAFW6xpSqzJay05FtYR4HmZhc9UxKbbfF2V8RG1MBmSaE+kmC6JnaRXK9gsiXhJHl/U0qM0WTcbyhwkYIvFGwjSbjfwhiJt8ZSQU+Bd5+marPMOkVkD0muxYLIfEuhh60x/J92itguihJSEMySVPQnTewnEm+620rTQEMsOfo4/kP/0ARvWjitlpSX7GxBgcMEsd3EEeYWvdytd+Saawi6aCIj1CkGb6Aj9rwhx16Cf3vAwFy5pyLhVonXzy51FDpdEblbkdJbUcEPDEFzQ8qNmhzzLTmmKWKbFCXeEuRabp6rxbvAtLF442QjQ+wEA9eL1xSR7Q0JXzlSHjJ4exq89yR0laScJ/FW6z4a73pFMEfDiRZvuvijIt86RaSFOl01riV2mD1UEvxGk/Geg5aWwGki1zgKPG9J2U8PEg8qYvMsZeytiTRXBMslCU8JSlxi8EabjwUldlDNLfzTUmCgxWsjqWCOHavYAqsknKFIO0yQ61VL5AVFxk6WhEaCAkdJgt9aSkzXlKNX2jEa79waYuc7gq0N3GDJGCBhoiTXUEPsdknCUE1CK0fwsiaylSF2uiDyO4XX3pFhNd7R4itFGc0k/ElBZwWvq+GC6szVeEoS/MZ+qylwpKNKv9Z469UOjqCjwlusicyTxG6VpNxcQ8IncoR4RhLbR+NdpGGmJWOcIzJGUuKPGpQg8rrG21dOMqQssJQ4RxH5jaUqnZuQ0F4Q+cjxLwPtpZbIAk3QTJHQWBE5S1BokoVtDd6lhqr9UpHSUxMcIYl9pojsb8h4SBOsMQcqvOWC2E8EVehqiJ1hrrAEbQxeK0NGZ0Gkq+guSRgniM23bIHVkqwx4hiHd7smaOyglyIyQuM978j4VS08J/A2G1KeMBRo4fBaSNhKUEZfQewVQ/C1I+MgfbEleEzCUw7mKXI0M3hd1EESVji8x5uQ41nxs1q4RMJCCXs7Iq9acpxn22oSDnQ/sJTxsCbHIYZiLyhY05TY0ZLIOQrGaSJDDN4t8pVaIrsqqFdEegtizc1iTew5Q4ayBDMUsQMkXocaYkc0hZua412siZ1rSXlR460zRJ5SlHGe5j801RLMlJTxtaOM3Q1pvxJ45zUlWFD7rsAbpfEm1JHxG0eh8w2R7QQVzBUw28FhFp5QZzq8t2rx2joqulYTWSuJdTYfWwqMFMcovFmSyJPNyLhE4E10pHzYjOC3huArRa571ZsGajQpQx38SBP5pyZB6lMU3khDnp0MBV51BE9o2E+TY5Ml2E8S7C0o6w1xvCZjf0HkVEHCzFoyNmqC+9wdcqN+Tp7jSDheE9ws8Y5V0NJCn2bk2tqSY4okdrEhx1iDN8cSudwepWmAGXKcJXK65H9to8jYQRH7SBF01ESUJdd0TayVInaWhLkOjlXE5irKGOnI6GSWGCJa482zBI9rCr0jyTVcEuzriC1vcr6mwFGSiqy5zMwxBH/TJHwjSPhL8+01kaaSUuMFKTcLEvaUePcrSmwn8DZrgikWb7CGPxkSjhQwrRk57tctmxLsb9sZvL9LSlyuSLlWkqOjwduo8b6Uv1DkmudIeFF2dHCgxVtk8dpIvHpBxhEOdhKk7OLIUSdJ+cSRY57B+0DgGUUlNfpthTfGkauzxrvTsUUaCVhlKeteTXCoJDCa2NOKhOmC4G1H8JBd4OBZReSRGkqcb/CO1PyLJTLB4j1q8JYaIutEjSLX8YKM+a6phdMsdLFUoV5RTm9JSkuDN8WcIon0NZMNZWh1q8C7SJEwV5HxrmnnTrf3KoJBlmCYI2ilSLlfEvlE4011NNgjgthzEua0oKK7JLE7HZHlEl60BLMVFewg4EWNt0ThrVNEVkkiTwpKXSWJzdRENgvKGq4IhjsiezgSFtsfCUq8qki5S1LRQeYQQ4nemmCkImWMw3tFUoUBZk4NOeZYEp4XRKTGa6wJjrWNHBVJR4m3FCnbuD6aak2WsMTh3SZImGCIPKNgsDpVwnsa70K31lCFJZYcwwSMFcQulGTsZuEaSdBXkPGZhu0FsdUO73RHjq8MPGGIfaGIbVTk6iuI3GFgucHrIQkmWSJdBd7BBu+uOryWAhY7+Lki9rK5wtEQzWwvtbqGhIMFwWRJsElsY4m9IIg9L6lCX0VklaPAYkfkZEGDnOWowlBJjtMUkcGK4Lg6EtoZInMUBVYLgn0UsdmCyCz7gIGHFfk+k1QwTh5We7A9x+IdJ6CvIkEagms0hR50eH9UnTQJ+2oiKyVlLFUE+8gBGu8MQ3CppUHesnjTHN4QB/UGPhCTHLFPHMFrCqa73gqObUJGa03wgbhHkrCfpEpzNLE7JDS25FMKhlhKKWKfCgqstLCPu1zBXy0J2ztwjtixBu8UTRn9LVtkmCN2iyFhtME70JHRQ1KVZXqKI/KNIKYMCYs1GUMEKbM1bKOI9LDXC7zbHS+bt+1MTWS9odA9DtrYtpbImQJ2VHh/lisEwaHqUk1kjKTAKknkBEXkbkdMGwq0dnhzLJF3NJH3JVwrqOB4Sca2hti75nmJN0WzxS6UxDYoEpxpa4htVlRjkYE7DZGzJVU72uC9IyhQL4i8YfGWSYLLNcHXloyz7QhNifmKSE9JgfGmuyLhc403Xm9vqcp6gXe3xuuv8F6VJNxkyTHEkHG2g0aKXL0MsXc1bGfgas2//dCONXiNLCX+5mB7eZIl1kHh7ajwpikyzlUUWOVOsjSQlsS+M0R+pPje/dzBXRZGO0rMtgQrLLG9VSu9n6CMXS3BhwYmSoIBhsjNBmZbgusE9BCPCP5triU4VhNbJfE+swSP27aayE8tuTpYYjtrYjMVGZdp2NpS1s6aBnKSHDsbKuplKbHM4a0wMFd/5/DmGyKrJSUaW4IBrqUhx0vyfzTBBLPIUcnZdrAkNsKR0sWRspumSns6Ch0v/qqIbBYUWKvPU/CFoyrDJGwSNFhbA/MlzKqjrO80hRbpKx0Jewsi/STftwGSlKc1JZyAzx05dhLEdnfQvhZOqiHWWEAHC7+30FuRcZUgaO5gpaIK+xsiHRUsqaPElTV40xQZQ107Q9BZE1nryDVGU9ZSQ47bmhBpLcYpUt7S+xuK/FiT8qKjwXYw5ypS2iuCv7q1gtgjhuBuB8LCFY5cUuCNtsQOFcT+4Ih9JX+k8Ea6v0iCIRZOtCT0Et00JW5UeC85Cg0ScK0k411HcG1zKtre3SeITBRk7WfwDhEvaYLTHP9le0m8By0JDwn4TlLW/aJOvGHxdjYUes+ScZigCkYQdNdEOhkiezgShqkx8ueKjI8lDfK2oNiOFvrZH1hS+tk7NV7nOmLHicGWEgubkXKdwdtZknCLJXaCpkrjZBtLZFsDP9CdxWsSr05Sxl6CMmoFbCOgryX40uDtamB7SVmXW4Ihlgpmq+00tBKUUa83WbjLUNkzDmY7cow1JDygyPGlhgGKYKz4vcV7QBNbJIgM11TUqZaMdwTeSguH6rOaw1JRKzaaGyxVm2EJ/uCIrVWUcZUkcp2grMsEjK+DMwS59jQk3Kd6SEq1d0S6uVmO4Bc1lDXTUcHjluCXEq+1OlBDj1pi9zgiXxnKuE0SqTXwhqbETW6RggMEnGl/q49UT2iCzgJvRwVXS2K/d6+ZkyUl7jawSVLit46EwxVljDZwoSQ20sDBihztHfk2yA8NVZghiXwrYHQdfKAOtzsayjhY9bY0yE2CWEeJ9xfzO423xhL5syS2TFJofO2pboHob0nY4GiAgRrvGQEDa/FWSsoaaYl0syRsEt3kWoH3B01shCXhTUWe9w3Bt44SC9QCh3eShQctwbaK2ApLroGCMlZrYqvlY3qYhM0aXpFkPOuoqJ3Dm6fxXrGwVF9gCWZagjPqznfkuMKQ8DPTQRO8ZqG1hPGKEm9IgpGW4DZDgTNriTxvFiq+Lz+0cKfp4wj6OCK9JSnzNSn9LFU7UhKZZMnYwcJ8s8yRsECScK4j5UOB95HFO0CzhY4xJxuCix0lDlEUeMdS6EZBkTsUkZ4K74dugyTXS7aNgL8aqjDfkCE0ZbwkCXpaWCKhl8P7VD5jxykivSyxyZrYERbe168LYu9ZYh86IkscgVLE7tWPKmJv11CgoyJltMEbrohtVAQfO4ImltiHEroYEs7RxAarVpY8AwXMcMReFOTYWe5iiLRQxJ5Q8DtJ8LQhWOhIeFESPGsILhbNDRljNbHzNRlTFbk2S3L0NOS6V1KFJYKUbSTcIIhM0wQ/s2TM0SRMNcQmSap3jCH4yhJZKSkwyRHpYYgsFeQ4U7xoCB7VVOExhXepo9ABBsYbvGWKXPME3lyH95YioZ0gssQRWWbI+FaSMkXijZXwgiTlYdPdkNLaETxlyDVIwqeaEus0aTcYcg0RVOkpR3CSJqIddK+90JCxzsDVloyrFd5ZAr4TBKfaWa6boEA7C7s6EpYaeFPjveooY72mjIccLHJ9HUwVlDhKkmutJDJBwnp1rvulJZggKDRfbXAkvC/4l3ozQOG9a8lxjx0i7nV4jSXc7vhe3OwIxjgSHjdEhhsif9YkPGlus3iLFDnWOFhtCZbJg0UbQcIaR67JjthoCyMEZRwhiXWyxO5QxI6w5NhT4U1WsJvDO60J34fW9hwzwlKij6ZAW9ne4L0s8C6XeBMEkd/LQy1VucBRot6QMlbivaBhoBgjqGiCJNhsqVp/S2SsG6DIONCR0dXhvWbJ+MRRZJkkuEjgDXJjFQW6SSL7GXK8Z2CZg7cVsbWGoKmEpzQ5elpiy8Ryg7dMkLLUEauzeO86CuwlSOlgYLojZWeJ9xM3S1PWfEfKl5ISLQ0MEKR8YOB2QfCxJBjrKPCN4f9MkaSsqoVXJBmP7EpFZ9UQfOoOFwSzBN4MQ8LsGrymlipcJQhmy0GaQjPqCHaXRwuCZwRbqK2Fg9wlClZqYicrIgMdZfxTQ0c7TBIbrChxmuzoKG8XRaSrIhhiyNFJkrC7oIAWMEOQa5aBekPCRknCo4IKPrYkvCDI8aYmY7WFtprgekcJZ3oLIqssCSMtFbQTJKwXYy3BY5oCh2iKPCpJOE+zRdpYgi6O2KmOAgvVCYaU4ySRek1sgyFhJ403QFHiVEmJHwtybO1gs8Hr5+BETQX3War0qZngYGgtVZtoqd6vFSk/UwdZElYqyjrF4HXUeFspIi9IGKf4j92pKGAdCYMVsbcV3kRF0N+R8LUd5PCsIGWoxDtBkCI0nKofdJQxT+LtZflvuc8Q3CjwWkq8KwUpHzkK/NmSsclCL0nseQdj5FRH5CNHSgtLiW80Of5HU9Hhlsga9bnBq3fEVltKfO5IaSTmGjjc4J0otcP7QsJUSQM8pEj5/wCuUuC2DWz8AAAAAElFTkSuQmCC\");\n}\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/theme/blackboard.css",
    "content": "/* Port of TextMate's Blackboard theme */\n\n.cm-s-blackboard { background: #0C1021; color: #F8F8F8; }\n.cm-s-blackboard .CodeMirror-selected { background: #253B76 !important; }\n.cm-s-blackboard .CodeMirror-gutter { background: #0C1021; border-right: 0; }\n.cm-s-blackboard .CodeMirror-gutter-text { color: #888; }\n.cm-s-blackboard .CodeMirror-cursor { border-left: 1px solid #A7A7A7 !important; }\n\n.cm-s-blackboard .cm-keyword { color: #FBDE2D; }\n.cm-s-blackboard .cm-atom { color: #D8FA3C; }\n.cm-s-blackboard .cm-number { color: #D8FA3C; }\n.cm-s-blackboard .cm-def { color: #8DA6CE; }\n.cm-s-blackboard .cm-variable { color: #FF6400; }\n.cm-s-blackboard .cm-operator { color: #FBDE2D;}\n.cm-s-blackboard .cm-comment { color: #AEAEAE; }\n.cm-s-blackboard .cm-string { color: #61CE3C; }\n.cm-s-blackboard .cm-string-2 { color: #61CE3C; }\n.cm-s-blackboard .cm-meta { color: #D8FA3C; }\n.cm-s-blackboard .cm-error { background: #9D1E15; color: #F8F8F8; }\n.cm-s-blackboard .cm-builtin { color: #8DA6CE; }\n.cm-s-blackboard .cm-tag { color: #8DA6CE; }\n.cm-s-blackboard .cm-attribute { color: #8DA6CE; }\n.cm-s-blackboard .cm-header { color: #FF6400; }\n.cm-s-blackboard .cm-hr { color: #AEAEAE; }\n.cm-s-blackboard .cm-link { color: #8DA6CE; }\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/theme/cobalt.css",
    "content": ".cm-s-cobalt { background: #002240; color: white; }\n.cm-s-cobalt div.CodeMirror-selected { background: #b36539 !important; }\n.cm-s-cobalt .CodeMirror-gutter { background: #002240; border-right: 1px solid #aaa; }\n.cm-s-cobalt .CodeMirror-gutter-text { color: #d0d0d0; }\n.cm-s-cobalt .CodeMirror-cursor { border-left: 1px solid white !important; }\n\n.cm-s-cobalt span.cm-comment { color: #08f; }\n.cm-s-cobalt span.cm-atom { color: #845dc4; }\n.cm-s-cobalt span.cm-number, .cm-s-cobalt span.cm-attribute { color: #ff80e1; }\n.cm-s-cobalt span.cm-keyword { color: #ffee80; }\n.cm-s-cobalt span.cm-string { color: #3ad900; }\n.cm-s-cobalt span.cm-meta { color: #ff9d00; }\n.cm-s-cobalt span.cm-variable-2, .cm-s-cobalt span.cm-tag { color: #9effff; }\n.cm-s-cobalt span.cm-variable-3, .cm-s-cobalt span.cm-def { color: white; }\n.cm-s-cobalt span.cm-error { color: #9d1e15; }\n.cm-s-cobalt span.cm-bracket { color: #d8d8d8; }\n.cm-s-cobalt span.cm-builtin, .cm-s-cobalt span.cm-special { color: #ff9e59; }\n.cm-s-cobalt span.cm-link { color: #845dc4; }\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/theme/eclipse.css",
    "content": ".cm-s-eclipse span.cm-meta {color: #FF1717;}\n.cm-s-eclipse span.cm-keyword { line-height: 1em; font-weight: bold; color: #7F0055; }\n.cm-s-eclipse span.cm-atom {color: #219;}\n.cm-s-eclipse span.cm-number {color: #164;}\n.cm-s-eclipse span.cm-def {color: #00f;}\n.cm-s-eclipse span.cm-variable {color: black;}\n.cm-s-eclipse span.cm-variable-2 {color: #0000C0;}\n.cm-s-eclipse span.cm-variable-3 {color: #0000C0;}\n.cm-s-eclipse span.cm-property {color: black;}\n.cm-s-eclipse span.cm-operator {color: black;}\n.cm-s-eclipse span.cm-comment {color: #3F7F5F;}\n.cm-s-eclipse span.cm-string {color: #2A00FF;}\n.cm-s-eclipse span.cm-string-2 {color: #f50;}\n.cm-s-eclipse span.cm-error {color: #f00;}\n.cm-s-eclipse span.cm-qualifier {color: #555;}\n.cm-s-eclipse span.cm-builtin {color: #30a;}\n.cm-s-eclipse span.cm-bracket {color: #cc7;}\n.cm-s-eclipse span.cm-tag {color: #170;}\n.cm-s-eclipse span.cm-attribute {color: #00c;}\n.cm-s-eclipse span.cm-link {color: #219;}\n\n.cm-s-eclipse .CodeMirror-matchingbracket {\n\tborder:1px solid grey;\n\tcolor:black !important;;\n}\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/theme/elegant.css",
    "content": ".cm-s-elegant span.cm-number, .cm-s-elegant span.cm-string, .cm-s-elegant span.cm-atom {color: #762;}\n.cm-s-elegant span.cm-comment {color: #262; font-style: italic; line-height: 1em;}\n.cm-s-elegant span.cm-meta {color: #555; font-style: italic; line-height: 1em;}\n.cm-s-elegant span.cm-variable {color: black;}\n.cm-s-elegant span.cm-variable-2 {color: #b11;}\n.cm-s-elegant span.cm-qualifier {color: #555;}\n.cm-s-elegant span.cm-keyword {color: #730;}\n.cm-s-elegant span.cm-builtin {color: #30a;}\n.cm-s-elegant span.cm-error {background-color: #fdd;}\n.cm-s-elegant span.cm-link {color: #762;}\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/theme/erlang-dark.css",
    "content": ".cm-s-erlang-dark { background: #002240; color: white; }\n.cm-s-erlang-dark div.CodeMirror-selected { background: #b36539 !important; }\n.cm-s-erlang-dark .CodeMirror-gutter { background: #002240; border-right: 1px solid #aaa; }\n.cm-s-erlang-dark .CodeMirror-gutter-text { color: #d0d0d0; }\n.cm-s-erlang-dark .CodeMirror-cursor { border-left: 1px solid white !important; }\n\n.cm-s-erlang-dark span.cm-atom       { color: #845dc4; }\n.cm-s-erlang-dark span.cm-attribute  { color: #ff80e1; }\n.cm-s-erlang-dark span.cm-bracket    { color: #ff9d00; }\n.cm-s-erlang-dark span.cm-builtin    { color: #eeaaaa; }\n.cm-s-erlang-dark span.cm-comment    { color: #7777ff; }\n.cm-s-erlang-dark span.cm-def        { color: #ee77aa; }\n.cm-s-erlang-dark span.cm-error      { color: #9d1e15; }\n.cm-s-erlang-dark span.cm-keyword    { color: #ffee80; }\n.cm-s-erlang-dark span.cm-meta       { color: #50fefe; }\n.cm-s-erlang-dark span.cm-number     { color: #ffd0d0; }\n.cm-s-erlang-dark span.cm-operator   { color: #dd1111; }\n.cm-s-erlang-dark span.cm-string     { color: #3ad900; }\n.cm-s-erlang-dark span.cm-tag        { color: #9effff; }\n.cm-s-erlang-dark span.cm-variable   { color: #50fe50; }\n.cm-s-erlang-dark span.cm-variable-2 { color: #ee00ee; }\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/theme/lesser-dark.css",
    "content": "/*\nhttp://lesscss.org/ dark theme\nPorted to CodeMirror by Peter Kroon\n*/\n.CodeMirror{\n  line-height: 15px;\n}\n.cm-s-lesser-dark {\n  font-family: 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', 'Monaco', Courier, monospace !important;\n  font-size:12px;\n}\n\n.cm-s-lesser-dark { background: #262626; color: #EBEFE7; text-shadow: 0 -1px 1px #262626; }\n.cm-s-lesser-dark div.CodeMirror-selected {background: #45443B !important;} /* 33322B*/\n.cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white !important; }\n.cm-s-lesser-dark .CodeMirror-lines { margin-left:3px; margin-right:3px; }/*editable code holder*/\n\ndiv.CodeMirror span.CodeMirror-matchingbracket { color: #7EFC7E; }/*65FC65*/\n\n.cm-s-lesser-dark .CodeMirror-gutter { background: #262626; border-right:1px solid #aaa; padding-right:3px; min-width:2.5em; }\n.cm-s-lesser-dark .CodeMirror-gutter-text { color: #777; }\n\n.cm-s-lesser-dark span.cm-keyword { color: #599eff; }\n.cm-s-lesser-dark span.cm-atom { color: #C2B470; }\n.cm-s-lesser-dark span.cm-number { color: #B35E4D; }\n.cm-s-lesser-dark span.cm-def {color: white;}\n.cm-s-lesser-dark span.cm-variable { color:#D9BF8C; }\n.cm-s-lesser-dark span.cm-variable-2 { color: #669199; }\n.cm-s-lesser-dark span.cm-variable-3 { color: white; }\n.cm-s-lesser-dark span.cm-property {color: #92A75C;}\n.cm-s-lesser-dark span.cm-operator {color: #92A75C;}\n.cm-s-lesser-dark span.cm-comment { color: #666; }\n.cm-s-lesser-dark span.cm-string { color: #BCD279; }\n.cm-s-lesser-dark span.cm-string-2 {color: #f50;}\n.cm-s-lesser-dark span.cm-meta { color: #738C73; }\n.cm-s-lesser-dark span.cm-error { color: #9d1e15; }\n.cm-s-lesser-dark span.cm-qualifier {color: #555;}\n.cm-s-lesser-dark span.cm-builtin { color: #ff9e59; }\n.cm-s-lesser-dark span.cm-bracket { color: #EBEFE7; }\n.cm-s-lesser-dark span.cm-tag { color: #669199; }\n.cm-s-lesser-dark span.cm-attribute {color: #00c;}\n.cm-s-lesser-dark span.cm-header {color: #a0a;}\n.cm-s-lesser-dark span.cm-quote {color: #090;}\n.cm-s-lesser-dark span.cm-hr {color: #999;}\n.cm-s-lesser-dark span.cm-link {color: #00c;}\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/theme/monokai.css",
    "content": "/* Based on Sublime Text's Monokai theme */\n\n.cm-s-monokai {background: #272822; color: #f8f8f2;}\n.cm-s-monokai div.CodeMirror-selected {background: #49483E !important;}\n.cm-s-monokai .CodeMirror-gutter {background: #272822; border-right: 0px;}\n.cm-s-monokai .CodeMirror-gutter-text {color: #d0d0d0;}\n.cm-s-monokai .CodeMirror-cursor {border-left: 1px solid #f8f8f0 !important;}\n\n.cm-s-monokai span.cm-comment {color: #75715e;}\n.cm-s-monokai span.cm-atom {color: #ae81ff;}\n.cm-s-monokai span.cm-number {color: #ae81ff;}\n\n.cm-s-monokai span.cm-property, .cm-s-monokai span.cm-attribute {color: #a6e22e;}\n.cm-s-monokai span.cm-keyword {color: #f92672;}\n.cm-s-monokai span.cm-string {color: #e6db74;}\n\n.cm-s-monokai span.cm-variable {color: #a6e22e;}\n.cm-s-monokai span.cm-variable-2 {color: #9effff;}\n.cm-s-monokai span.cm-def {color: #fd971f;}\n.cm-s-monokai span.cm-error {background: #f92672; color: #f8f8f0;}\n.cm-s-monokai span.cm-bracket {color: #f8f8f2;}\n.cm-s-monokai span.cm-tag {color: #f92672;}\n.cm-s-monokai span.cm-link {color: #ae81ff;}\n\n.cm-s-monokai .CodeMirror-matchingbracket {\n  text-decoration: underline;\n  color: white !important;\n}\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/theme/neat.css",
    "content": ".cm-s-neat span.cm-comment { color: #a86; }\n.cm-s-neat span.cm-keyword { line-height: 1em; font-weight: bold; color: blue; }\n.cm-s-neat span.cm-string { color: #a22; }\n.cm-s-neat span.cm-builtin { line-height: 1em; font-weight: bold; color: #077; }\n.cm-s-neat span.cm-special { line-height: 1em; font-weight: bold; color: #0aa; }\n.cm-s-neat span.cm-variable { color: black; }\n.cm-s-neat span.cm-number, .cm-s-neat span.cm-atom { color: #3a3; }\n.cm-s-neat span.cm-meta {color: #555;}\n.cm-s-neat span.cm-link { color: #3a3; }\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/theme/night.css",
    "content": "/* Loosely based on the Midnight Textmate theme */\n\n.cm-s-night { background: #0a001f; color: #f8f8f8; }\n.cm-s-night div.CodeMirror-selected { background: #a8f !important; }\n.cm-s-night .CodeMirror-gutter { background: #0a001f; border-right: 1px solid #aaa; }\n.cm-s-night .CodeMirror-gutter-text { color: #f8f8f8; }\n.cm-s-night .CodeMirror-cursor { border-left: 1px solid white !important; }\n\n.cm-s-night span.cm-comment { color: #6900a1; }\n.cm-s-night span.cm-atom { color: #845dc4; }\n.cm-s-night span.cm-number, .cm-s-night span.cm-attribute { color: #ffd500; }\n.cm-s-night span.cm-keyword { color: #599eff; }\n.cm-s-night span.cm-string { color: #37f14a; }\n.cm-s-night span.cm-meta { color: #7678e2; }\n.cm-s-night span.cm-variable-2, .cm-s-night span.cm-tag { color: #99b2ff; }\n.cm-s-night span.cm-variable-3, .cm-s-night span.cm-def { color: white; }\n.cm-s-night span.cm-error { color: #9d1e15; }\n.cm-s-night span.cm-bracket { color: #8da6ce; }\n.cm-s-night span.cm-comment { color: #6900a1; }\n.cm-s-night span.cm-builtin, .cm-s-night span.cm-special { color: #ff9e59; }\n.cm-s-night span.cm-link { color: #845dc4; }\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/theme/rubyblue.css",
    "content": ".cm-s-rubyblue { font:13px/1.4em Trebuchet, Verdana, sans-serif; }\t/* - customized editor font - */\n\n.cm-s-rubyblue { background: #112435; color: white; }\n.cm-s-rubyblue div.CodeMirror-selected { background: #38566F !important; }\n.cm-s-rubyblue .CodeMirror-gutter { background: #1F4661; border-right: 7px solid #3E7087; min-width:2.5em; }\n.cm-s-rubyblue .CodeMirror-gutter-text { color: white; }\n.cm-s-rubyblue .CodeMirror-cursor { border-left: 1px solid white !important; }\n\n.cm-s-rubyblue span.cm-comment { color: #999; font-style:italic; line-height: 1em; }\n.cm-s-rubyblue span.cm-atom { color: #F4C20B; }\n.cm-s-rubyblue span.cm-number, .cm-s-rubyblue span.cm-attribute { color: #82C6E0; }\n.cm-s-rubyblue span.cm-keyword { color: #F0F; }\n.cm-s-rubyblue span.cm-string { color: #F08047; }\n.cm-s-rubyblue span.cm-meta { color: #F0F; }\n.cm-s-rubyblue span.cm-variable-2, .cm-s-rubyblue span.cm-tag { color: #7BD827; }\n.cm-s-rubyblue span.cm-variable-3, .cm-s-rubyblue span.cm-def { color: white; }\n.cm-s-rubyblue span.cm-error { color: #AF2018; }\n.cm-s-rubyblue span.cm-bracket { color: #F0F; }\n.cm-s-rubyblue span.cm-link { color: #F4C20B; }\n.cm-s-rubyblue span.CodeMirror-matchingbracket { color:#F0F !important; }\n.cm-s-rubyblue span.cm-builtin, .cm-s-rubyblue span.cm-special { color: #FF9D00; }\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/theme/solarized.css",
    "content": "html * {\n  color-profile: sRGB;\n  rendering-intent: auto;\n}\n.cm-s-solarized-light {\n  background-color: #fdf6e3;\n  color: #657b83;\n}\n.cm-s-solarized-light .emphasis {\n  font-weight: bold;\n}\n.cm-s-solarized-light .dotted {\n  border-bottom: 1px dotted #cb4b16;\n}\n.cm-s-solarized-light .CodeMirror-gutter {\n  background-color: #eee8d5;\n  border-right: 3px solid #eee8d5;\n}\n.cm-s-solarized-light .CodeMirror-gutter .CodeMirror-gutter-text {\n  color: #93a1a1;\n}\n.cm-s-solarized-light .CodeMirror-cursor {\n  border-left-color: #002b36 !important;\n}\n.cm-s-solarized-light .CodeMirror-matchingbracket {\n  color: #002b36;\n  background-color: #eee8d5;\n  box-shadow: 0 0 10px #eee8d5;\n  font-weight: bold;\n}\n.cm-s-solarized-light .CodeMirror-nonmatchingbracket {\n  color: #002b36;\n  background-color: #eee8d5;\n  box-shadow: 0 0 10px #eee8d5;\n  font-weight: bold;\n  color: #dc322f;\n  border-bottom: 1px dotted #cb4b16;\n}\n.cm-s-solarized-light span.cm-keyword {\n  color: #657b83;\n  font-weight: bold;\n}\n.cm-s-solarized-light span.cm-atom {\n  color: #2aa198;\n}\n.cm-s-solarized-light span.cm-number {\n  color: #586e75;\n}\n.cm-s-solarized-light span.cm-def {\n  color: #268bd2;\n}\n.cm-s-solarized-light span.cm-variable {\n  color: #cb4b16;\n}\n.cm-s-solarized-light span.cm-variable-2 {\n  color: #cb4b16;\n}\n.cm-s-solarized-light span.cm-variable-3 {\n  color: #cb4b16;\n}\n.cm-s-solarized-light span.cm-comment {\n  color: #93a1a1;\n}\n.cm-s-solarized-light span.cm-property {\n  color: #b58900;\n}\n.cm-s-solarized-light span.cm-operator {\n  color: #657b83;\n}\n.cm-s-solarized-light span.cm-string {\n  color: #6c71c4;\n}\n.cm-s-solarized-light span.cm-error {\n  font-weight: bold;\n  border-bottom: 1px dotted #cb4b16;\n}\n.cm-s-solarized-light span.cm-bracket {\n  color: #cb4b16;\n}\n.cm-s-solarized-light span.cm-tag {\n  color: #657b83;\n}\n.cm-s-solarized-light span.cm-attribute {\n  color: #586e75;\n  font-weight: bold;\n}\n.cm-s-solarized-light span.cm-meta {\n  color: #268bd2;\n}\n.cm-s-solarized-dark {\n  background-color: #002b36;\n  color: #839496;\n}\n.cm-s-solarized-dark .emphasis {\n  font-weight: bold;\n}\n.cm-s-solarized-dark .dotted {\n  border-bottom: 1px dotted #cb4b16;\n}\n.cm-s-solarized-dark .CodeMirror-gutter {\n  background-color: #073642;\n  border-right: 3px solid #073642;\n}\n.cm-s-solarized-dark .CodeMirror-gutter .CodeMirror-gutter-text {\n  color: #586e75;\n}\n.cm-s-solarized-dark .CodeMirror-cursor {\n  border-left-color: #fdf6e3 !important;\n}\n.cm-s-solarized-dark .CodeMirror-matchingbracket {\n  color: #fdf6e3;\n  background-color: #073642;\n  box-shadow: 0 0 10px #073642;\n  font-weight: bold;\n}\n.cm-s-solarized-dark .CodeMirror-nonmatchingbracket {\n  color: #fdf6e3;\n  background-color: #073642;\n  box-shadow: 0 0 10px #073642;\n  font-weight: bold;\n  color: #dc322f;\n  border-bottom: 1px dotted #cb4b16;\n}\n.cm-s-solarized-dark span.cm-keyword {\n  color: #839496;\n  font-weight: bold;\n}\n.cm-s-solarized-dark span.cm-atom {\n  color: #2aa198;\n}\n.cm-s-solarized-dark span.cm-number {\n  color: #93a1a1;\n}\n.cm-s-solarized-dark span.cm-def {\n  color: #268bd2;\n}\n.cm-s-solarized-dark span.cm-variable {\n  color: #cb4b16;\n}\n.cm-s-solarized-dark span.cm-variable-2 {\n  color: #cb4b16;\n}\n.cm-s-solarized-dark span.cm-variable-3 {\n  color: #cb4b16;\n}\n.cm-s-solarized-dark span.cm-comment {\n  color: #586e75;\n}\n.cm-s-solarized-dark span.cm-property {\n  color: #b58900;\n}\n.cm-s-solarized-dark span.cm-operator {\n  color: #839496;\n}\n.cm-s-solarized-dark span.cm-string {\n  color: #6c71c4;\n}\n.cm-s-solarized-dark span.cm-error {\n  font-weight: bold;\n  border-bottom: 1px dotted #cb4b16;\n}\n.cm-s-solarized-dark span.cm-bracket {\n  color: #cb4b16;\n}\n.cm-s-solarized-dark span.cm-tag {\n  color: #839496;\n}\n.cm-s-solarized-dark span.cm-attribute {\n  color: #93a1a1;\n  font-weight: bold;\n}\n.cm-s-solarized-dark span.cm-meta {\n  color: #268bd2;\n}\n"
  },
  {
    "path": "assets/vendor/CodeMirror-2.25/theme/xq-dark.css",
    "content": "/*\nCopyright (C) 2011 by MarkLogic Corporation\nAuthor: Mike Brevoort <mike@brevoort.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\n.cm-s-xq-dark { background: #0a001f; color: #f8f8f8; }\n.cm-s-xq-dark span.CodeMirror-selected { background: #a8f !important; }\n.cm-s-xq-dark .CodeMirror-gutter { background: #0a001f; border-right: 1px solid #aaa; }\n.cm-s-xq-dark .CodeMirror-gutter-text { color: #f8f8f8; }\n.cm-s-xq-dark .CodeMirror-cursor { border-left: 1px solid white !important; }\n\n.cm-s-xq-dark span.cm-keyword {color: #FFBD40;}\n.cm-s-xq-dark span.cm-atom {color: #6C8CD5;}\n.cm-s-xq-dark span.cm-number {color: #164;}\n.cm-s-xq-dark span.cm-def {color: #FFF; text-decoration:underline;}\n.cm-s-xq-dark span.cm-variable {color: #FFF;}\n.cm-s-xq-dark span.cm-variable-2 {color: #EEE;}\n.cm-s-xq-dark span.cm-variable-3 {color: #DDD;}\n.cm-s-xq-dark span.cm-property {}\n.cm-s-xq-dark span.cm-operator {}\n.cm-s-xq-dark span.cm-comment {color: gray;}\n.cm-s-xq-dark span.cm-string {color: #9FEE00;}\n.cm-s-xq-dark span.cm-meta {color: yellow;}\n.cm-s-xq-dark span.cm-error {color: #f00;}\n.cm-s-xq-dark span.cm-qualifier {color: #FFF700;}\n.cm-s-xq-dark span.cm-builtin {color: #30a;}\n.cm-s-xq-dark span.cm-bracket {color: #cc7;}\n.cm-s-xq-dark span.cm-tag {color: #FFBD40;}\n.cm-s-xq-dark span.cm-attribute {color: #FFF700;}\n"
  },
  {
    "path": "assets/vendor/bootstrap/css/bootstrap.css",
    "content": "/*!\n * Bootstrap v2.1.0\n *\n * Copyright 2012 Twitter, Inc\n * Licensed under the Apache License v2.0\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Designed and built with all the love in the world @twitter by @mdo and @fat.\n */\n.clearfix {\n  *zoom: 1;\n}\n.clearfix:before,\n.clearfix:after {\n  display: table;\n  content: \"\";\n  line-height: 0;\n}\n.clearfix:after {\n  clear: both;\n}\n.hide-text {\n  font: 0/0 a;\n  color: transparent;\n  text-shadow: none;\n  background-color: transparent;\n  border: 0;\n}\n.input-block-level {\n  display: block;\n  width: 100%;\n  min-height: 30px;\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nnav,\nsection {\n  display: block;\n}\naudio,\ncanvas,\nvideo {\n  display: inline-block;\n  *display: inline;\n  *zoom: 1;\n}\naudio:not([controls]) {\n  display: none;\n}\nhtml {\n  font-size: 100%;\n  -webkit-text-size-adjust: 100%;\n  -ms-text-size-adjust: 100%;\n}\na:focus {\n  outline: thin dotted #333;\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\na:hover,\na:active {\n  outline: 0;\n}\nsub,\nsup {\n  position: relative;\n  font-size: 75%;\n  line-height: 0;\n  vertical-align: baseline;\n}\nsup {\n  top: -0.5em;\n}\nsub {\n  bottom: -0.25em;\n}\nimg {\n  max-width: 100%;\n  height: auto;\n  vertical-align: middle;\n  border: 0;\n  -ms-interpolation-mode: bicubic;\n}\n#map_canvas img {\n  max-width: none;\n}\nbutton,\ninput,\nselect,\ntextarea {\n  margin: 0;\n  font-size: 100%;\n  vertical-align: middle;\n}\nbutton,\ninput {\n  *overflow: visible;\n  line-height: normal;\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n  padding: 0;\n  border: 0;\n}\nbutton,\ninput[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n  cursor: pointer;\n  -webkit-appearance: button;\n}\ninput[type=\"search\"] {\n  -webkit-box-sizing: content-box;\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n  -webkit-appearance: textfield;\n}\ninput[type=\"search\"]::-webkit-search-decoration,\ninput[type=\"search\"]::-webkit-search-cancel-button {\n  -webkit-appearance: none;\n}\ntextarea {\n  overflow: auto;\n  vertical-align: top;\n}\nbody {\n  margin: 0;\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-size: 14px;\n  line-height: 20px;\n  color: #333333;\n  background-color: #ffffff;\n}\na {\n  color: #0088cc;\n  text-decoration: none;\n}\na:hover {\n  color: #005580;\n  text-decoration: underline;\n}\n.img-rounded {\n  -webkit-border-radius: 6px;\n  -moz-border-radius: 6px;\n  border-radius: 6px;\n}\n.img-polaroid {\n  padding: 4px;\n  background-color: #fff;\n  border: 1px solid #ccc;\n  border: 1px solid rgba(0, 0, 0, 0.2);\n  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n  -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n}\n.img-circle {\n  -webkit-border-radius: 500px;\n  -moz-border-radius: 500px;\n  border-radius: 500px;\n}\n.row {\n  margin-left: -20px;\n  *zoom: 1;\n}\n.row:before,\n.row:after {\n  display: table;\n  content: \"\";\n  line-height: 0;\n}\n.row:after {\n  clear: both;\n}\n[class*=\"span\"] {\n  float: left;\n  margin-left: 20px;\n}\n.container,\n.navbar-static-top .container,\n.navbar-fixed-top .container,\n.navbar-fixed-bottom .container {\n  width: 940px;\n}\n.span12 {\n  width: 940px;\n}\n.span11 {\n  width: 860px;\n}\n.span10 {\n  width: 780px;\n}\n.span9 {\n  width: 700px;\n}\n.span8 {\n  width: 620px;\n}\n.span7 {\n  width: 540px;\n}\n.span6 {\n  width: 460px;\n}\n.span5 {\n  width: 380px;\n}\n.span4 {\n  width: 300px;\n}\n.span3 {\n  width: 220px;\n}\n.span2 {\n  width: 140px;\n}\n.span1 {\n  width: 60px;\n}\n.offset12 {\n  margin-left: 980px;\n}\n.offset11 {\n  margin-left: 900px;\n}\n.offset10 {\n  margin-left: 820px;\n}\n.offset9 {\n  margin-left: 740px;\n}\n.offset8 {\n  margin-left: 660px;\n}\n.offset7 {\n  margin-left: 580px;\n}\n.offset6 {\n  margin-left: 500px;\n}\n.offset5 {\n  margin-left: 420px;\n}\n.offset4 {\n  margin-left: 340px;\n}\n.offset3 {\n  margin-left: 260px;\n}\n.offset2 {\n  margin-left: 180px;\n}\n.offset1 {\n  margin-left: 100px;\n}\n.row-fluid {\n  width: 100%;\n  *zoom: 1;\n}\n.row-fluid:before,\n.row-fluid:after {\n  display: table;\n  content: \"\";\n  line-height: 0;\n}\n.row-fluid:after {\n  clear: both;\n}\n.row-fluid [class*=\"span\"] {\n  display: block;\n  width: 100%;\n  min-height: 30px;\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n  float: left;\n  margin-left: 2.127659574468085%;\n  *margin-left: 2.074468085106383%;\n}\n.row-fluid [class*=\"span\"]:first-child {\n  margin-left: 0;\n}\n.row-fluid .span12 {\n  width: 100%;\n  *width: 99.94680851063829%;\n}\n.row-fluid .span11 {\n  width: 91.48936170212765%;\n  *width: 91.43617021276594%;\n}\n.row-fluid .span10 {\n  width: 82.97872340425532%;\n  *width: 82.92553191489361%;\n}\n.row-fluid .span9 {\n  width: 74.46808510638297%;\n  *width: 74.41489361702126%;\n}\n.row-fluid .span8 {\n  width: 65.95744680851064%;\n  *width: 65.90425531914893%;\n}\n.row-fluid .span7 {\n  width: 57.44680851063829%;\n  *width: 57.39361702127659%;\n}\n.row-fluid .span6 {\n  width: 48.93617021276595%;\n  *width: 48.88297872340425%;\n}\n.row-fluid .span5 {\n  width: 40.42553191489362%;\n  *width: 40.37234042553192%;\n}\n.row-fluid .span4 {\n  width: 31.914893617021278%;\n  *width: 31.861702127659576%;\n}\n.row-fluid .span3 {\n  width: 23.404255319148934%;\n  *width: 23.351063829787233%;\n}\n.row-fluid .span2 {\n  width: 14.893617021276595%;\n  *width: 14.840425531914894%;\n}\n.row-fluid .span1 {\n  width: 6.382978723404255%;\n  *width: 6.329787234042553%;\n}\n.row-fluid .offset12 {\n  margin-left: 104.25531914893617%;\n  *margin-left: 104.14893617021275%;\n}\n.row-fluid .offset12:first-child {\n  margin-left: 102.12765957446808%;\n  *margin-left: 102.02127659574467%;\n}\n.row-fluid .offset11 {\n  margin-left: 95.74468085106382%;\n  *margin-left: 95.6382978723404%;\n}\n.row-fluid .offset11:first-child {\n  margin-left: 93.61702127659574%;\n  *margin-left: 93.51063829787232%;\n}\n.row-fluid .offset10 {\n  margin-left: 87.23404255319149%;\n  *margin-left: 87.12765957446807%;\n}\n.row-fluid .offset10:first-child {\n  margin-left: 85.1063829787234%;\n  *margin-left: 84.99999999999999%;\n}\n.row-fluid .offset9 {\n  margin-left: 78.72340425531914%;\n  *margin-left: 78.61702127659572%;\n}\n.row-fluid .offset9:first-child {\n  margin-left: 76.59574468085106%;\n  *margin-left: 76.48936170212764%;\n}\n.row-fluid .offset8 {\n  margin-left: 70.2127659574468%;\n  *margin-left: 70.10638297872339%;\n}\n.row-fluid .offset8:first-child {\n  margin-left: 68.08510638297872%;\n  *margin-left: 67.9787234042553%;\n}\n.row-fluid .offset7 {\n  margin-left: 61.70212765957446%;\n  *margin-left: 61.59574468085106%;\n}\n.row-fluid .offset7:first-child {\n  margin-left: 59.574468085106375%;\n  *margin-left: 59.46808510638297%;\n}\n.row-fluid .offset6 {\n  margin-left: 53.191489361702125%;\n  *margin-left: 53.085106382978715%;\n}\n.row-fluid .offset6:first-child {\n  margin-left: 51.063829787234035%;\n  *margin-left: 50.95744680851063%;\n}\n.row-fluid .offset5 {\n  margin-left: 44.68085106382979%;\n  *margin-left: 44.57446808510638%;\n}\n.row-fluid .offset5:first-child {\n  margin-left: 42.5531914893617%;\n  *margin-left: 42.4468085106383%;\n}\n.row-fluid .offset4 {\n  margin-left: 36.170212765957444%;\n  *margin-left: 36.06382978723405%;\n}\n.row-fluid .offset4:first-child {\n  margin-left: 34.04255319148936%;\n  *margin-left: 33.93617021276596%;\n}\n.row-fluid .offset3 {\n  margin-left: 27.659574468085104%;\n  *margin-left: 27.5531914893617%;\n}\n.row-fluid .offset3:first-child {\n  margin-left: 25.53191489361702%;\n  *margin-left: 25.425531914893618%;\n}\n.row-fluid .offset2 {\n  margin-left: 19.148936170212764%;\n  *margin-left: 19.04255319148936%;\n}\n.row-fluid .offset2:first-child {\n  margin-left: 17.02127659574468%;\n  *margin-left: 16.914893617021278%;\n}\n.row-fluid .offset1 {\n  margin-left: 10.638297872340425%;\n  *margin-left: 10.53191489361702%;\n}\n.row-fluid .offset1:first-child {\n  margin-left: 8.51063829787234%;\n  *margin-left: 8.404255319148938%;\n}\n[class*=\"span\"].hide,\n.row-fluid [class*=\"span\"].hide {\n  display: none;\n}\n[class*=\"span\"].pull-right,\n.row-fluid [class*=\"span\"].pull-right {\n  float: right;\n}\n.container {\n  margin-right: auto;\n  margin-left: auto;\n  *zoom: 1;\n}\n.container:before,\n.container:after {\n  display: table;\n  content: \"\";\n  line-height: 0;\n}\n.container:after {\n  clear: both;\n}\n.container-fluid {\n  padding-right: 20px;\n  padding-left: 20px;\n  *zoom: 1;\n}\n.container-fluid:before,\n.container-fluid:after {\n  display: table;\n  content: \"\";\n  line-height: 0;\n}\n.container-fluid:after {\n  clear: both;\n}\np {\n  margin: 0 0 10px;\n}\n.lead {\n  margin-bottom: 20px;\n  font-size: 20px;\n  font-weight: 200;\n  line-height: 30px;\n}\nsmall {\n  font-size: 85%;\n}\nstrong {\n  font-weight: bold;\n}\nem {\n  font-style: italic;\n}\ncite {\n  font-style: normal;\n}\n.muted {\n  color: #999999;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n  margin: 10px 0;\n  font-family: inherit;\n  font-weight: bold;\n  line-height: 1;\n  color: inherit;\n  text-rendering: optimizelegibility;\n}\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small {\n  font-weight: normal;\n  line-height: 1;\n  color: #999999;\n}\nh1 {\n  font-size: 36px;\n  line-height: 40px;\n}\nh2 {\n  font-size: 30px;\n  line-height: 40px;\n}\nh3 {\n  font-size: 24px;\n  line-height: 40px;\n}\nh4 {\n  font-size: 18px;\n  line-height: 20px;\n}\nh5 {\n  font-size: 14px;\n  line-height: 20px;\n}\nh6 {\n  font-size: 12px;\n  line-height: 20px;\n}\nh1 small {\n  font-size: 24px;\n}\nh2 small {\n  font-size: 18px;\n}\nh3 small {\n  font-size: 14px;\n}\nh4 small {\n  font-size: 14px;\n}\n.page-header {\n  padding-bottom: 9px;\n  margin: 20px 0 30px;\n  border-bottom: 1px solid #eeeeee;\n}\nul,\nol {\n  padding: 0;\n  margin: 0 0 10px 25px;\n}\nul ul,\nul ol,\nol ol,\nol ul {\n  margin-bottom: 0;\n}\nli {\n  line-height: 20px;\n}\nul.unstyled,\nol.unstyled {\n  margin-left: 0;\n  list-style: none;\n}\ndl {\n  margin-bottom: 20px;\n}\ndt,\ndd {\n  line-height: 20px;\n}\ndt {\n  font-weight: bold;\n}\ndd {\n  margin-left: 10px;\n}\n.dl-horizontal dt {\n  float: left;\n  width: 120px;\n  clear: left;\n  text-align: right;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n.dl-horizontal dd {\n  margin-left: 130px;\n}\nhr {\n  margin: 20px 0;\n  border: 0;\n  border-top: 1px solid #eeeeee;\n  border-bottom: 1px solid #ffffff;\n}\nabbr[title] {\n  cursor: help;\n  border-bottom: 1px dotted #999999;\n}\nabbr.initialism {\n  font-size: 90%;\n  text-transform: uppercase;\n}\nblockquote {\n  padding: 0 0 0 15px;\n  margin: 0 0 20px;\n  border-left: 5px solid #eeeeee;\n}\nblockquote p {\n  margin-bottom: 0;\n  font-size: 16px;\n  font-weight: 300;\n  line-height: 25px;\n}\nblockquote small {\n  display: block;\n  line-height: 20px;\n  color: #999999;\n}\nblockquote small:before {\n  content: '\\2014 \\00A0';\n}\nblockquote.pull-right {\n  float: right;\n  padding-right: 15px;\n  padding-left: 0;\n  border-right: 5px solid #eeeeee;\n  border-left: 0;\n}\nblockquote.pull-right p,\nblockquote.pull-right small {\n  text-align: right;\n}\nblockquote.pull-right small:before {\n  content: '';\n}\nblockquote.pull-right small:after {\n  content: '\\00A0 \\2014';\n}\nq:before,\nq:after,\nblockquote:before,\nblockquote:after {\n  content: \"\";\n}\naddress {\n  display: block;\n  margin-bottom: 20px;\n  font-style: normal;\n  line-height: 20px;\n}\ncode,\npre {\n  padding: 0 3px 2px;\n  font-family: Monaco, Menlo, Consolas, \"Courier New\", monospace;\n  font-size: 12px;\n  color: #333333;\n  -webkit-border-radius: 3px;\n  -moz-border-radius: 3px;\n  border-radius: 3px;\n}\ncode {\n  padding: 2px 4px;\n  color: #d14;\n  background-color: #f7f7f9;\n  border: 1px solid #e1e1e8;\n}\npre {\n  display: block;\n  padding: 9.5px;\n  margin: 0 0 10px;\n  font-size: 13px;\n  line-height: 20px;\n  word-break: break-all;\n  word-wrap: break-word;\n  white-space: pre;\n  white-space: pre-wrap;\n  background-color: #f5f5f5;\n  border: 1px solid #ccc;\n  border: 1px solid rgba(0, 0, 0, 0.15);\n  -webkit-border-radius: 4px;\n  -moz-border-radius: 4px;\n  border-radius: 4px;\n}\npre.prettyprint {\n  margin-bottom: 20px;\n}\npre code {\n  padding: 0;\n  color: inherit;\n  background-color: transparent;\n  border: 0;\n}\n.pre-scrollable {\n  max-height: 340px;\n  overflow-y: scroll;\n}\n.label,\n.badge {\n  font-size: 11.844px;\n  font-weight: bold;\n  line-height: 14px;\n  color: #ffffff;\n  vertical-align: baseline;\n  white-space: nowrap;\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n  background-color: #999999;\n}\n.label {\n  padding: 1px 4px 2px;\n  -webkit-border-radius: 3px;\n  -moz-border-radius: 3px;\n  border-radius: 3px;\n}\n.badge {\n  padding: 1px 9px 2px;\n  -webkit-border-radius: 9px;\n  -moz-border-radius: 9px;\n  border-radius: 9px;\n}\na.label:hover,\na.badge:hover {\n  color: #ffffff;\n  text-decoration: none;\n  cursor: pointer;\n}\n.label-important,\n.badge-important {\n  background-color: #b94a48;\n}\n.label-important[href],\n.badge-important[href] {\n  background-color: #953b39;\n}\n.label-warning,\n.badge-warning {\n  background-color: #f89406;\n}\n.label-warning[href],\n.badge-warning[href] {\n  background-color: #c67605;\n}\n.label-success,\n.badge-success {\n  background-color: #468847;\n}\n.label-success[href],\n.badge-success[href] {\n  background-color: #356635;\n}\n.label-info,\n.badge-info {\n  background-color: #3a87ad;\n}\n.label-info[href],\n.badge-info[href] {\n  background-color: #2d6987;\n}\n.label-inverse,\n.badge-inverse {\n  background-color: #333333;\n}\n.label-inverse[href],\n.badge-inverse[href] {\n  background-color: #1a1a1a;\n}\n.btn .label,\n.btn .badge {\n  position: relative;\n  top: -1px;\n}\n.btn-mini .label,\n.btn-mini .badge {\n  top: 0;\n}\ntable {\n  max-width: 100%;\n  background-color: transparent;\n  border-collapse: collapse;\n  border-spacing: 0;\n}\n.table {\n  width: 100%;\n  margin-bottom: 20px;\n}\n.table th,\n.table td {\n  padding: 8px;\n  line-height: 20px;\n  text-align: left;\n  vertical-align: top;\n  border-top: 1px solid #dddddd;\n}\n.table th {\n  font-weight: bold;\n}\n.table thead th {\n  vertical-align: bottom;\n}\n.table caption + thead tr:first-child th,\n.table caption + thead tr:first-child td,\n.table colgroup + thead tr:first-child th,\n.table colgroup + thead tr:first-child td,\n.table thead:first-child tr:first-child th,\n.table thead:first-child tr:first-child td {\n  border-top: 0;\n}\n.table tbody + tbody {\n  border-top: 2px solid #dddddd;\n}\n.table-condensed th,\n.table-condensed td {\n  padding: 4px 5px;\n}\n.table-bordered {\n  border: 1px solid #dddddd;\n  border-collapse: separate;\n  *border-collapse: collapse;\n  border-left: 0;\n  -webkit-border-radius: 4px;\n  -moz-border-radius: 4px;\n  border-radius: 4px;\n}\n.table-bordered th,\n.table-bordered td {\n  border-left: 1px solid #dddddd;\n}\n.table-bordered caption + thead tr:first-child th,\n.table-bordered caption + tbody tr:first-child th,\n.table-bordered caption + tbody tr:first-child td,\n.table-bordered colgroup + thead tr:first-child th,\n.table-bordered colgroup + tbody tr:first-child th,\n.table-bordered colgroup + tbody tr:first-child td,\n.table-bordered thead:first-child tr:first-child th,\n.table-bordered tbody:first-child tr:first-child th,\n.table-bordered tbody:first-child tr:first-child td {\n  border-top: 0;\n}\n.table-bordered thead:first-child tr:first-child th:first-child,\n.table-bordered tbody:first-child tr:first-child td:first-child {\n  -webkit-border-top-left-radius: 4px;\n  border-top-left-radius: 4px;\n  -moz-border-radius-topleft: 4px;\n}\n.table-bordered thead:first-child tr:first-child th:last-child,\n.table-bordered tbody:first-child tr:first-child td:last-child {\n  -webkit-border-top-right-radius: 4px;\n  border-top-right-radius: 4px;\n  -moz-border-radius-topright: 4px;\n}\n.table-bordered thead:last-child tr:last-child th:first-child,\n.table-bordered tbody:last-child tr:last-child td:first-child,\n.table-bordered tfoot:last-child tr:last-child td:first-child {\n  -webkit-border-radius: 0 0 0 4px;\n  -moz-border-radius: 0 0 0 4px;\n  border-radius: 0 0 0 4px;\n  -webkit-border-bottom-left-radius: 4px;\n  border-bottom-left-radius: 4px;\n  -moz-border-radius-bottomleft: 4px;\n}\n.table-bordered thead:last-child tr:last-child th:last-child,\n.table-bordered tbody:last-child tr:last-child td:last-child,\n.table-bordered tfoot:last-child tr:last-child td:last-child {\n  -webkit-border-bottom-right-radius: 4px;\n  border-bottom-right-radius: 4px;\n  -moz-border-radius-bottomright: 4px;\n}\n.table-bordered caption + thead tr:first-child th:first-child,\n.table-bordered caption + tbody tr:first-child td:first-child,\n.table-bordered colgroup + thead tr:first-child th:first-child,\n.table-bordered colgroup + tbody tr:first-child td:first-child {\n  -webkit-border-top-left-radius: 4px;\n  border-top-left-radius: 4px;\n  -moz-border-radius-topleft: 4px;\n}\n.table-bordered caption + thead tr:first-child th:last-child,\n.table-bordered caption + tbody tr:first-child td:last-child,\n.table-bordered colgroup + thead tr:first-child th:last-child,\n.table-bordered colgroup + tbody tr:first-child td:last-child {\n  -webkit-border-top-right-radius: 4px;\n  border-top-right-radius: 4px;\n  -moz-border-right-topleft: 4px;\n}\n.table-striped tbody tr:nth-child(odd) td,\n.table-striped tbody tr:nth-child(odd) th {\n  background-color: #f9f9f9;\n}\n.table-hover tbody tr:hover td,\n.table-hover tbody tr:hover th {\n  background-color: #f5f5f5;\n}\ntable [class*=span],\n.row-fluid table [class*=span] {\n  display: table-cell;\n  float: none;\n  margin-left: 0;\n}\ntable .span1 {\n  float: none;\n  width: 44px;\n  margin-left: 0;\n}\ntable .span2 {\n  float: none;\n  width: 124px;\n  margin-left: 0;\n}\ntable .span3 {\n  float: none;\n  width: 204px;\n  margin-left: 0;\n}\ntable .span4 {\n  float: none;\n  width: 284px;\n  margin-left: 0;\n}\ntable .span5 {\n  float: none;\n  width: 364px;\n  margin-left: 0;\n}\ntable .span6 {\n  float: none;\n  width: 444px;\n  margin-left: 0;\n}\ntable .span7 {\n  float: none;\n  width: 524px;\n  margin-left: 0;\n}\ntable .span8 {\n  float: none;\n  width: 604px;\n  margin-left: 0;\n}\ntable .span9 {\n  float: none;\n  width: 684px;\n  margin-left: 0;\n}\ntable .span10 {\n  float: none;\n  width: 764px;\n  margin-left: 0;\n}\ntable .span11 {\n  float: none;\n  width: 844px;\n  margin-left: 0;\n}\ntable .span12 {\n  float: none;\n  width: 924px;\n  margin-left: 0;\n}\ntable .span13 {\n  float: none;\n  width: 1004px;\n  margin-left: 0;\n}\ntable .span14 {\n  float: none;\n  width: 1084px;\n  margin-left: 0;\n}\ntable .span15 {\n  float: none;\n  width: 1164px;\n  margin-left: 0;\n}\ntable .span16 {\n  float: none;\n  width: 1244px;\n  margin-left: 0;\n}\ntable .span17 {\n  float: none;\n  width: 1324px;\n  margin-left: 0;\n}\ntable .span18 {\n  float: none;\n  width: 1404px;\n  margin-left: 0;\n}\ntable .span19 {\n  float: none;\n  width: 1484px;\n  margin-left: 0;\n}\ntable .span20 {\n  float: none;\n  width: 1564px;\n  margin-left: 0;\n}\ntable .span21 {\n  float: none;\n  width: 1644px;\n  margin-left: 0;\n}\ntable .span22 {\n  float: none;\n  width: 1724px;\n  margin-left: 0;\n}\ntable .span23 {\n  float: none;\n  width: 1804px;\n  margin-left: 0;\n}\ntable .span24 {\n  float: none;\n  width: 1884px;\n  margin-left: 0;\n}\n.table tbody tr.success td {\n  background-color: #dff0d8;\n}\n.table tbody tr.error td {\n  background-color: #f2dede;\n}\n.table tbody tr.info td {\n  background-color: #d9edf7;\n}\nform {\n  margin: 0 0 20px;\n}\nfieldset {\n  padding: 0;\n  margin: 0;\n  border: 0;\n}\nlegend {\n  display: block;\n  width: 100%;\n  padding: 0;\n  margin-bottom: 20px;\n  font-size: 21px;\n  line-height: 40px;\n  color: #333333;\n  border: 0;\n  border-bottom: 1px solid #e5e5e5;\n}\nlegend small {\n  font-size: 15px;\n  color: #999999;\n}\nlabel,\ninput,\nbutton,\nselect,\ntextarea {\n  font-size: 14px;\n  font-weight: normal;\n  line-height: 20px;\n}\ninput,\nbutton,\nselect,\ntextarea {\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n}\nlabel {\n  display: block;\n  margin-bottom: 5px;\n}\nselect,\ntextarea,\ninput[type=\"text\"],\ninput[type=\"password\"],\ninput[type=\"datetime\"],\ninput[type=\"datetime-local\"],\ninput[type=\"date\"],\ninput[type=\"month\"],\ninput[type=\"time\"],\ninput[type=\"week\"],\ninput[type=\"number\"],\ninput[type=\"email\"],\ninput[type=\"url\"],\ninput[type=\"search\"],\ninput[type=\"tel\"],\ninput[type=\"color\"],\n.uneditable-input {\n  display: inline-block;\n  height: 20px;\n  padding: 4px 6px;\n  margin-bottom: 9px;\n  font-size: 14px;\n  line-height: 20px;\n  color: #555555;\n  -webkit-border-radius: 3px;\n  -moz-border-radius: 3px;\n  border-radius: 3px;\n}\ninput,\ntextarea {\n  width: 210px;\n}\ntextarea {\n  height: auto;\n}\ntextarea,\ninput[type=\"text\"],\ninput[type=\"password\"],\ninput[type=\"datetime\"],\ninput[type=\"datetime-local\"],\ninput[type=\"date\"],\ninput[type=\"month\"],\ninput[type=\"time\"],\ninput[type=\"week\"],\ninput[type=\"number\"],\ninput[type=\"email\"],\ninput[type=\"url\"],\ninput[type=\"search\"],\ninput[type=\"tel\"],\ninput[type=\"color\"],\n.uneditable-input {\n  background-color: #ffffff;\n  border: 1px solid #cccccc;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  -webkit-transition: border linear .2s, box-shadow linear .2s;\n  -moz-transition: border linear .2s, box-shadow linear .2s;\n  -o-transition: border linear .2s, box-shadow linear .2s;\n  transition: border linear .2s, box-shadow linear .2s;\n}\ntextarea:focus,\ninput[type=\"text\"]:focus,\ninput[type=\"password\"]:focus,\ninput[type=\"datetime\"]:focus,\ninput[type=\"datetime-local\"]:focus,\ninput[type=\"date\"]:focus,\ninput[type=\"month\"]:focus,\ninput[type=\"time\"]:focus,\ninput[type=\"week\"]:focus,\ninput[type=\"number\"]:focus,\ninput[type=\"email\"]:focus,\ninput[type=\"url\"]:focus,\ninput[type=\"search\"]:focus,\ninput[type=\"tel\"]:focus,\ninput[type=\"color\"]:focus,\n.uneditable-input:focus {\n  border-color: rgba(82, 168, 236, 0.8);\n  outline: 0;\n  outline: thin dotted \\9;\n  /* IE6-9 */\n\n  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);\n  -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);\n  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);\n}\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n  margin: 4px 0 0;\n  *margin-top: 0;\n  /* IE7 */\n\n  margin-top: 1px \\9;\n  /* IE8-9 */\n\n  line-height: normal;\n  cursor: pointer;\n}\ninput[type=\"file\"],\ninput[type=\"image\"],\ninput[type=\"submit\"],\ninput[type=\"reset\"],\ninput[type=\"button\"],\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n  width: auto;\n}\nselect,\ninput[type=\"file\"] {\n  height: 30px;\n  /* In IE7, the height of the select element cannot be changed by height, only font-size */\n\n  *margin-top: 4px;\n  /* For IE7, add top margin to align select with labels */\n\n  line-height: 30px;\n}\nselect {\n  width: 220px;\n  border: 1px solid #bbb;\n  background-color: #ffffff;\n}\nselect[multiple],\nselect[size] {\n  height: auto;\n}\nselect:focus,\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n  outline: thin dotted #333;\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\n.uneditable-input,\n.uneditable-textarea {\n  color: #999999;\n  background-color: #fcfcfc;\n  border-color: #cccccc;\n  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);\n  -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);\n  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);\n  cursor: not-allowed;\n}\n.uneditable-input {\n  overflow: hidden;\n  white-space: nowrap;\n}\n.uneditable-textarea {\n  width: auto;\n  height: auto;\n}\ninput:-moz-placeholder,\ntextarea:-moz-placeholder {\n  color: #999999;\n}\ninput:-ms-input-placeholder,\ntextarea:-ms-input-placeholder {\n  color: #999999;\n}\ninput::-webkit-input-placeholder,\ntextarea::-webkit-input-placeholder {\n  color: #999999;\n}\n.radio,\n.checkbox {\n  min-height: 18px;\n  padding-left: 18px;\n}\n.radio input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"] {\n  float: left;\n  margin-left: -18px;\n}\n.controls > .radio:first-child,\n.controls > .checkbox:first-child {\n  padding-top: 5px;\n}\n.radio.inline,\n.checkbox.inline {\n  display: inline-block;\n  padding-top: 5px;\n  margin-bottom: 0;\n  vertical-align: middle;\n}\n.radio.inline + .radio.inline,\n.checkbox.inline + .checkbox.inline {\n  margin-left: 10px;\n}\n.input-mini {\n  width: 60px;\n}\n.input-small {\n  width: 90px;\n}\n.input-medium {\n  width: 150px;\n}\n.input-large {\n  width: 210px;\n}\n.input-xlarge {\n  width: 270px;\n}\n.input-xxlarge {\n  width: 530px;\n}\ninput[class*=\"span\"],\nselect[class*=\"span\"],\ntextarea[class*=\"span\"],\n.uneditable-input[class*=\"span\"],\n.row-fluid input[class*=\"span\"],\n.row-fluid select[class*=\"span\"],\n.row-fluid textarea[class*=\"span\"],\n.row-fluid .uneditable-input[class*=\"span\"] {\n  float: none;\n  margin-left: 0;\n}\n.input-append input[class*=\"span\"],\n.input-append .uneditable-input[class*=\"span\"],\n.input-prepend input[class*=\"span\"],\n.input-prepend .uneditable-input[class*=\"span\"],\n.row-fluid input[class*=\"span\"],\n.row-fluid select[class*=\"span\"],\n.row-fluid textarea[class*=\"span\"],\n.row-fluid .uneditable-input[class*=\"span\"],\n.row-fluid .input-prepend [class*=\"span\"],\n.row-fluid .input-append [class*=\"span\"] {\n  display: inline-block;\n}\ninput,\ntextarea,\n.uneditable-input {\n  margin-left: 0;\n}\n.controls-row [class*=\"span\"] + [class*=\"span\"] {\n  margin-left: 20px;\n}\ninput.span12, textarea.span12, .uneditable-input.span12 {\n  width: 926px;\n}\ninput.span11, textarea.span11, .uneditable-input.span11 {\n  width: 846px;\n}\ninput.span10, textarea.span10, .uneditable-input.span10 {\n  width: 766px;\n}\ninput.span9, textarea.span9, .uneditable-input.span9 {\n  width: 686px;\n}\ninput.span8, textarea.span8, .uneditable-input.span8 {\n  width: 606px;\n}\ninput.span7, textarea.span7, .uneditable-input.span7 {\n  width: 526px;\n}\ninput.span6, textarea.span6, .uneditable-input.span6 {\n  width: 446px;\n}\ninput.span5, textarea.span5, .uneditable-input.span5 {\n  width: 366px;\n}\ninput.span4, textarea.span4, .uneditable-input.span4 {\n  width: 286px;\n}\ninput.span3, textarea.span3, .uneditable-input.span3 {\n  width: 206px;\n}\ninput.span2, textarea.span2, .uneditable-input.span2 {\n  width: 126px;\n}\ninput.span1, textarea.span1, .uneditable-input.span1 {\n  width: 46px;\n}\n.controls-row {\n  *zoom: 1;\n}\n.controls-row:before,\n.controls-row:after {\n  display: table;\n  content: \"\";\n  line-height: 0;\n}\n.controls-row:after {\n  clear: both;\n}\n.controls-row [class*=\"span\"] {\n  float: left;\n}\ninput[disabled],\nselect[disabled],\ntextarea[disabled],\ninput[readonly],\nselect[readonly],\ntextarea[readonly] {\n  cursor: not-allowed;\n  background-color: #eeeeee;\n}\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"][readonly],\ninput[type=\"checkbox\"][readonly] {\n  background-color: transparent;\n}\n.control-group.warning > label,\n.control-group.warning .help-block,\n.control-group.warning .help-inline {\n  color: #c09853;\n}\n.control-group.warning .checkbox,\n.control-group.warning .radio,\n.control-group.warning input,\n.control-group.warning select,\n.control-group.warning textarea {\n  color: #c09853;\n  border-color: #c09853;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.control-group.warning .checkbox:focus,\n.control-group.warning .radio:focus,\n.control-group.warning input:focus,\n.control-group.warning select:focus,\n.control-group.warning textarea:focus {\n  border-color: #a47e3c;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;\n  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;\n}\n.control-group.warning .input-prepend .add-on,\n.control-group.warning .input-append .add-on {\n  color: #c09853;\n  background-color: #fcf8e3;\n  border-color: #c09853;\n}\n.control-group.error > label,\n.control-group.error .help-block,\n.control-group.error .help-inline {\n  color: #b94a48;\n}\n.control-group.error .checkbox,\n.control-group.error .radio,\n.control-group.error input,\n.control-group.error select,\n.control-group.error textarea {\n  color: #b94a48;\n  border-color: #b94a48;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.control-group.error .checkbox:focus,\n.control-group.error .radio:focus,\n.control-group.error input:focus,\n.control-group.error select:focus,\n.control-group.error textarea:focus {\n  border-color: #953b39;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;\n  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;\n}\n.control-group.error .input-prepend .add-on,\n.control-group.error .input-append .add-on {\n  color: #b94a48;\n  background-color: #f2dede;\n  border-color: #b94a48;\n}\n.control-group.success > label,\n.control-group.success .help-block,\n.control-group.success .help-inline {\n  color: #468847;\n}\n.control-group.success .checkbox,\n.control-group.success .radio,\n.control-group.success input,\n.control-group.success select,\n.control-group.success textarea {\n  color: #468847;\n  border-color: #468847;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.control-group.success .checkbox:focus,\n.control-group.success .radio:focus,\n.control-group.success input:focus,\n.control-group.success select:focus,\n.control-group.success textarea:focus {\n  border-color: #356635;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;\n  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;\n}\n.control-group.success .input-prepend .add-on,\n.control-group.success .input-append .add-on {\n  color: #468847;\n  background-color: #dff0d8;\n  border-color: #468847;\n}\ninput:focus:required:invalid,\ntextarea:focus:required:invalid,\nselect:focus:required:invalid {\n  color: #b94a48;\n  border-color: #ee5f5b;\n}\ninput:focus:required:invalid:focus,\ntextarea:focus:required:invalid:focus,\nselect:focus:required:invalid:focus {\n  border-color: #e9322d;\n  -webkit-box-shadow: 0 0 6px #f8b9b7;\n  -moz-box-shadow: 0 0 6px #f8b9b7;\n  box-shadow: 0 0 6px #f8b9b7;\n}\n.form-actions {\n  padding: 19px 20px 20px;\n  margin-top: 20px;\n  margin-bottom: 20px;\n  background-color: #f5f5f5;\n  border-top: 1px solid #e5e5e5;\n  *zoom: 1;\n}\n.form-actions:before,\n.form-actions:after {\n  display: table;\n  content: \"\";\n  line-height: 0;\n}\n.form-actions:after {\n  clear: both;\n}\n.help-block,\n.help-inline {\n  color: #595959;\n}\n.help-block {\n  display: block;\n  margin-bottom: 10px;\n}\n.help-inline {\n  display: inline-block;\n  *display: inline;\n  /* IE7 inline-block hack */\n\n  *zoom: 1;\n  vertical-align: middle;\n  padding-left: 5px;\n}\n.input-append,\n.input-prepend {\n  margin-bottom: 5px;\n  font-size: 0;\n  white-space: nowrap;\n}\n.input-append input,\n.input-prepend input,\n.input-append select,\n.input-prepend select,\n.input-append .uneditable-input,\n.input-prepend .uneditable-input {\n  position: relative;\n  margin-bottom: 0;\n  *margin-left: 0;\n  font-size: 14px;\n  vertical-align: top;\n  -webkit-border-radius: 0 3px 3px 0;\n  -moz-border-radius: 0 3px 3px 0;\n  border-radius: 0 3px 3px 0;\n}\n.input-append input:focus,\n.input-prepend input:focus,\n.input-append select:focus,\n.input-prepend select:focus,\n.input-append .uneditable-input:focus,\n.input-prepend .uneditable-input:focus {\n  z-index: 2;\n}\n.input-append .add-on,\n.input-prepend .add-on {\n  display: inline-block;\n  width: auto;\n  height: 20px;\n  min-width: 16px;\n  padding: 4px 5px;\n  font-size: 14px;\n  font-weight: normal;\n  line-height: 20px;\n  text-align: center;\n  text-shadow: 0 1px 0 #ffffff;\n  background-color: #eeeeee;\n  border: 1px solid #ccc;\n}\n.input-append .add-on,\n.input-prepend .add-on,\n.input-append .btn,\n.input-prepend .btn {\n  margin-left: -1px;\n  vertical-align: top;\n  -webkit-border-radius: 0;\n  -moz-border-radius: 0;\n  border-radius: 0;\n}\n.input-append .active,\n.input-prepend .active {\n  background-color: #a9dba9;\n  border-color: #46a546;\n}\n.input-prepend .add-on,\n.input-prepend .btn {\n  margin-right: -1px;\n}\n.input-prepend .add-on:first-child,\n.input-prepend .btn:first-child {\n  -webkit-border-radius: 3px 0 0 3px;\n  -moz-border-radius: 3px 0 0 3px;\n  border-radius: 3px 0 0 3px;\n}\n.input-append input,\n.input-append select,\n.input-append .uneditable-input {\n  -webkit-border-radius: 3px 0 0 3px;\n  -moz-border-radius: 3px 0 0 3px;\n  border-radius: 3px 0 0 3px;\n}\n.input-append .add-on:last-child,\n.input-append .btn:last-child {\n  -webkit-border-radius: 0 3px 3px 0;\n  -moz-border-radius: 0 3px 3px 0;\n  border-radius: 0 3px 3px 0;\n}\n.input-prepend.input-append input,\n.input-prepend.input-append select,\n.input-prepend.input-append .uneditable-input {\n  -webkit-border-radius: 0;\n  -moz-border-radius: 0;\n  border-radius: 0;\n}\n.input-prepend.input-append .add-on:first-child,\n.input-prepend.input-append .btn:first-child {\n  margin-right: -1px;\n  -webkit-border-radius: 3px 0 0 3px;\n  -moz-border-radius: 3px 0 0 3px;\n  border-radius: 3px 0 0 3px;\n}\n.input-prepend.input-append .add-on:last-child,\n.input-prepend.input-append .btn:last-child {\n  margin-left: -1px;\n  -webkit-border-radius: 0 3px 3px 0;\n  -moz-border-radius: 0 3px 3px 0;\n  border-radius: 0 3px 3px 0;\n}\ninput.search-query {\n  padding-right: 14px;\n  padding-right: 4px \\9;\n  padding-left: 14px;\n  padding-left: 4px \\9;\n  /* IE7-8 doesn't have border-radius, so don't indent the padding */\n\n  margin-bottom: 0;\n  -webkit-border-radius: 15px;\n  -moz-border-radius: 15px;\n  border-radius: 15px;\n}\n/* Allow for input prepend/append in search forms */\n.form-search .input-append .search-query,\n.form-search .input-prepend .search-query {\n  -webkit-border-radius: 0;\n  -moz-border-radius: 0;\n  border-radius: 0;\n}\n.form-search .input-append .search-query {\n  -webkit-border-radius: 14px 0 0 14px;\n  -moz-border-radius: 14px 0 0 14px;\n  border-radius: 14px 0 0 14px;\n}\n.form-search .input-append .btn {\n  -webkit-border-radius: 0 14px 14px 0;\n  -moz-border-radius: 0 14px 14px 0;\n  border-radius: 0 14px 14px 0;\n}\n.form-search .input-prepend .search-query {\n  -webkit-border-radius: 0 14px 14px 0;\n  -moz-border-radius: 0 14px 14px 0;\n  border-radius: 0 14px 14px 0;\n}\n.form-search .input-prepend .btn {\n  -webkit-border-radius: 14px 0 0 14px;\n  -moz-border-radius: 14px 0 0 14px;\n  border-radius: 14px 0 0 14px;\n}\n.form-search input,\n.form-inline input,\n.form-horizontal input,\n.form-search textarea,\n.form-inline textarea,\n.form-horizontal textarea,\n.form-search select,\n.form-inline select,\n.form-horizontal select,\n.form-search .help-inline,\n.form-inline .help-inline,\n.form-horizontal .help-inline,\n.form-search .uneditable-input,\n.form-inline .uneditable-input,\n.form-horizontal .uneditable-input,\n.form-search .input-prepend,\n.form-inline .input-prepend,\n.form-horizontal .input-prepend,\n.form-search .input-append,\n.form-inline .input-append,\n.form-horizontal .input-append {\n  display: inline-block;\n  *display: inline;\n  /* IE7 inline-block hack */\n\n  *zoom: 1;\n  margin-bottom: 0;\n  vertical-align: middle;\n}\n.form-search .hide,\n.form-inline .hide,\n.form-horizontal .hide {\n  display: none;\n}\n.form-search label,\n.form-inline label,\n.form-search .btn-group,\n.form-inline .btn-group {\n  display: inline-block;\n}\n.form-search .input-append,\n.form-inline .input-append,\n.form-search .input-prepend,\n.form-inline .input-prepend {\n  margin-bottom: 0;\n}\n.form-search .radio,\n.form-search .checkbox,\n.form-inline .radio,\n.form-inline .checkbox {\n  padding-left: 0;\n  margin-bottom: 0;\n  vertical-align: middle;\n}\n.form-search .radio input[type=\"radio\"],\n.form-search .checkbox input[type=\"checkbox\"],\n.form-inline .radio input[type=\"radio\"],\n.form-inline .checkbox input[type=\"checkbox\"] {\n  float: left;\n  margin-right: 3px;\n  margin-left: 0;\n}\n.control-group {\n  margin-bottom: 10px;\n}\nlegend + .control-group {\n  margin-top: 20px;\n  -webkit-margin-top-collapse: separate;\n}\n.form-horizontal .control-group {\n  margin-bottom: 20px;\n  *zoom: 1;\n}\n.form-horizontal .control-group:before,\n.form-horizontal .control-group:after {\n  display: table;\n  content: \"\";\n  line-height: 0;\n}\n.form-horizontal .control-group:after {\n  clear: both;\n}\n.form-horizontal .control-label {\n  float: left;\n  width: 140px;\n  padding-top: 5px;\n  text-align: right;\n}\n.form-horizontal .controls {\n  *display: inline-block;\n  *padding-left: 20px;\n  margin-left: 160px;\n  *margin-left: 0;\n}\n.form-horizontal .controls:first-child {\n  *padding-left: 160px;\n}\n.form-horizontal .help-block {\n  margin-top: 10px;\n  margin-bottom: 0;\n}\n.form-horizontal .form-actions {\n  padding-left: 160px;\n}\n.btn {\n  display: inline-block;\n  *display: inline;\n  /* IE7 inline-block hack */\n\n  *zoom: 1;\n  padding: 4px 14px;\n  margin-bottom: 0;\n  font-size: 14px;\n  line-height: 20px;\n  *line-height: 20px;\n  text-align: center;\n  vertical-align: middle;\n  cursor: pointer;\n  color: #333333;\n  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);\n  background-color: #f5f5f5;\n  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));\n  background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);\n  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);\n  background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);\n  border-color: #e6e6e6 #e6e6e6 #bfbfbf;\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n  *background-color: #e6e6e6;\n  /* Darken IE7 buttons by default so they stand out more given they won't have borders */\n\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  border: 1px solid #bbbbbb;\n  *border: 0;\n  border-bottom-color: #a2a2a2;\n  -webkit-border-radius: 4px;\n  -moz-border-radius: 4px;\n  border-radius: 4px;\n  *margin-left: .3em;\n  -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);\n  -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);\n  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);\n}\n.btn:hover,\n.btn:active,\n.btn.active,\n.btn.disabled,\n.btn[disabled] {\n  color: #333333;\n  background-color: #e6e6e6;\n  *background-color: #d9d9d9;\n}\n.btn:active,\n.btn.active {\n  background-color: #cccccc \\9;\n}\n.btn:first-child {\n  *margin-left: 0;\n}\n.btn:hover {\n  color: #333333;\n  text-decoration: none;\n  background-color: #e6e6e6;\n  *background-color: #d9d9d9;\n  /* Buttons in IE7 don't get borders, so darken on hover */\n\n  background-position: 0 -15px;\n  -webkit-transition: background-position 0.1s linear;\n  -moz-transition: background-position 0.1s linear;\n  -o-transition: background-position 0.1s linear;\n  transition: background-position 0.1s linear;\n}\n.btn:focus {\n  outline: thin dotted #333;\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\n.btn.active,\n.btn:active {\n  background-color: #e6e6e6;\n  background-color: #d9d9d9 \\9;\n  background-image: none;\n  outline: 0;\n  -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);\n  -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);\n  box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);\n}\n.btn.disabled,\n.btn[disabled] {\n  cursor: default;\n  background-color: #e6e6e6;\n  background-image: none;\n  opacity: 0.65;\n  filter: alpha(opacity=65);\n  -webkit-box-shadow: none;\n  -moz-box-shadow: none;\n  box-shadow: none;\n}\n.btn-large {\n  padding: 9px 14px;\n  font-size: 16px;\n  line-height: normal;\n  -webkit-border-radius: 5px;\n  -moz-border-radius: 5px;\n  border-radius: 5px;\n}\n.btn-large [class^=\"icon-\"] {\n  margin-top: 2px;\n}\n.btn-small {\n  padding: 3px 9px;\n  font-size: 12px;\n  line-height: 18px;\n}\n.btn-small [class^=\"icon-\"] {\n  margin-top: 0;\n}\n.btn-mini {\n  padding: 2px 6px;\n  font-size: 11px;\n  line-height: 16px;\n}\n.btn-block {\n  display: block;\n  width: 100%;\n  padding-left: 0;\n  padding-right: 0;\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n}\n.btn-block + .btn-block {\n  margin-top: 5px;\n}\n.btn-primary.active,\n.btn-warning.active,\n.btn-danger.active,\n.btn-success.active,\n.btn-info.active,\n.btn-inverse.active {\n  color: rgba(255, 255, 255, 0.75);\n}\n.btn {\n  border-color: #c5c5c5;\n  border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);\n}\n.btn-primary {\n  color: #ffffff;\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n  background-color: #006dcc;\n  background-image: -moz-linear-gradient(top, #0088cc, #0044cc);\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));\n  background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);\n  background-image: -o-linear-gradient(top, #0088cc, #0044cc);\n  background-image: linear-gradient(to bottom, #0088cc, #0044cc);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);\n  border-color: #0044cc #0044cc #002a80;\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n  *background-color: #0044cc;\n  /* Darken IE7 buttons by default so they stand out more given they won't have borders */\n\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.btn-primary:hover,\n.btn-primary:active,\n.btn-primary.active,\n.btn-primary.disabled,\n.btn-primary[disabled] {\n  color: #ffffff;\n  background-color: #0044cc;\n  *background-color: #003bb3;\n}\n.btn-primary:active,\n.btn-primary.active {\n  background-color: #003399 \\9;\n}\n.btn-warning {\n  color: #ffffff;\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n  background-color: #faa732;\n  background-image: -moz-linear-gradient(top, #fbb450, #f89406);\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));\n  background-image: -webkit-linear-gradient(top, #fbb450, #f89406);\n  background-image: -o-linear-gradient(top, #fbb450, #f89406);\n  background-image: linear-gradient(to bottom, #fbb450, #f89406);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);\n  border-color: #f89406 #f89406 #ad6704;\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n  *background-color: #f89406;\n  /* Darken IE7 buttons by default so they stand out more given they won't have borders */\n\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.btn-warning:hover,\n.btn-warning:active,\n.btn-warning.active,\n.btn-warning.disabled,\n.btn-warning[disabled] {\n  color: #ffffff;\n  background-color: #f89406;\n  *background-color: #df8505;\n}\n.btn-warning:active,\n.btn-warning.active {\n  background-color: #c67605 \\9;\n}\n.btn-danger {\n  color: #ffffff;\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n  background-color: #da4f49;\n  background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));\n  background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);\n  background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);\n  background-image: linear-gradient(to bottom, #ee5f5b, #bd362f);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);\n  border-color: #bd362f #bd362f #802420;\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n  *background-color: #bd362f;\n  /* Darken IE7 buttons by default so they stand out more given they won't have borders */\n\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.btn-danger:hover,\n.btn-danger:active,\n.btn-danger.active,\n.btn-danger.disabled,\n.btn-danger[disabled] {\n  color: #ffffff;\n  background-color: #bd362f;\n  *background-color: #a9302a;\n}\n.btn-danger:active,\n.btn-danger.active {\n  background-color: #942a25 \\9;\n}\n.btn-success {\n  color: #ffffff;\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n  background-color: #5bb75b;\n  background-image: -moz-linear-gradient(top, #62c462, #51a351);\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));\n  background-image: -webkit-linear-gradient(top, #62c462, #51a351);\n  background-image: -o-linear-gradient(top, #62c462, #51a351);\n  background-image: linear-gradient(to bottom, #62c462, #51a351);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);\n  border-color: #51a351 #51a351 #387038;\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n  *background-color: #51a351;\n  /* Darken IE7 buttons by default so they stand out more given they won't have borders */\n\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.btn-success:hover,\n.btn-success:active,\n.btn-success.active,\n.btn-success.disabled,\n.btn-success[disabled] {\n  color: #ffffff;\n  background-color: #51a351;\n  *background-color: #499249;\n}\n.btn-success:active,\n.btn-success.active {\n  background-color: #408140 \\9;\n}\n.btn-info {\n  color: #ffffff;\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n  background-color: #49afcd;\n  background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));\n  background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);\n  background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);\n  background-image: linear-gradient(to bottom, #5bc0de, #2f96b4);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);\n  border-color: #2f96b4 #2f96b4 #1f6377;\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n  *background-color: #2f96b4;\n  /* Darken IE7 buttons by default so they stand out more given they won't have borders */\n\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.btn-info:hover,\n.btn-info:active,\n.btn-info.active,\n.btn-info.disabled,\n.btn-info[disabled] {\n  color: #ffffff;\n  background-color: #2f96b4;\n  *background-color: #2a85a0;\n}\n.btn-info:active,\n.btn-info.active {\n  background-color: #24748c \\9;\n}\n.btn-inverse {\n  color: #ffffff;\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n  background-color: #363636;\n  background-image: -moz-linear-gradient(top, #444444, #222222);\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222));\n  background-image: -webkit-linear-gradient(top, #444444, #222222);\n  background-image: -o-linear-gradient(top, #444444, #222222);\n  background-image: linear-gradient(to bottom, #444444, #222222);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);\n  border-color: #222222 #222222 #000000;\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n  *background-color: #222222;\n  /* Darken IE7 buttons by default so they stand out more given they won't have borders */\n\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.btn-inverse:hover,\n.btn-inverse:active,\n.btn-inverse.active,\n.btn-inverse.disabled,\n.btn-inverse[disabled] {\n  color: #ffffff;\n  background-color: #222222;\n  *background-color: #151515;\n}\n.btn-inverse:active,\n.btn-inverse.active {\n  background-color: #080808 \\9;\n}\nbutton.btn,\ninput[type=\"submit\"].btn {\n  *padding-top: 3px;\n  *padding-bottom: 3px;\n}\nbutton.btn::-moz-focus-inner,\ninput[type=\"submit\"].btn::-moz-focus-inner {\n  padding: 0;\n  border: 0;\n}\nbutton.btn.btn-large,\ninput[type=\"submit\"].btn.btn-large {\n  *padding-top: 7px;\n  *padding-bottom: 7px;\n}\nbutton.btn.btn-small,\ninput[type=\"submit\"].btn.btn-small {\n  *padding-top: 3px;\n  *padding-bottom: 3px;\n}\nbutton.btn.btn-mini,\ninput[type=\"submit\"].btn.btn-mini {\n  *padding-top: 1px;\n  *padding-bottom: 1px;\n}\n.btn-link,\n.btn-link:active {\n  background-color: transparent;\n  background-image: none;\n  -webkit-box-shadow: none;\n  -moz-box-shadow: none;\n  box-shadow: none;\n}\n.btn-link {\n  border-color: transparent;\n  cursor: pointer;\n  color: #0088cc;\n  -webkit-border-radius: 0;\n  -moz-border-radius: 0;\n  border-radius: 0;\n}\n.btn-link:hover {\n  color: #005580;\n  text-decoration: underline;\n  background-color: transparent;\n}\n[class^=\"icon-\"],\n[class*=\" icon-\"] {\n  display: inline-block;\n  width: 14px;\n  height: 14px;\n  *margin-right: .3em;\n  line-height: 14px;\n  vertical-align: text-top;\n  background-image: url(\"../img/glyphicons-halflings.png\");\n  background-position: 14px 14px;\n  background-repeat: no-repeat;\n  margin-top: 1px;\n}\n/* White icons with optional class, or on hover/active states of certain elements */\n.icon-white,\n.nav > .active > a > [class^=\"icon-\"],\n.nav > .active > a > [class*=\" icon-\"],\n.dropdown-menu > li > a:hover > [class^=\"icon-\"],\n.dropdown-menu > li > a:hover > [class*=\" icon-\"],\n.dropdown-menu > .active > a > [class^=\"icon-\"],\n.dropdown-menu > .active > a > [class*=\" icon-\"] {\n  background-image: url(\"../img/glyphicons-halflings-white.png\");\n}\n.icon-glass {\n  background-position: 0      0;\n}\n.icon-music {\n  background-position: -24px 0;\n}\n.icon-search {\n  background-position: -48px 0;\n}\n.icon-envelope {\n  background-position: -72px 0;\n}\n.icon-heart {\n  background-position: -96px 0;\n}\n.icon-star {\n  background-position: -120px 0;\n}\n.icon-star-empty {\n  background-position: -144px 0;\n}\n.icon-user {\n  background-position: -168px 0;\n}\n.icon-film {\n  background-position: -192px 0;\n}\n.icon-th-large {\n  background-position: -216px 0;\n}\n.icon-th {\n  background-position: -240px 0;\n}\n.icon-th-list {\n  background-position: -264px 0;\n}\n.icon-ok {\n  background-position: -288px 0;\n}\n.icon-remove {\n  background-position: -312px 0;\n}\n.icon-zoom-in {\n  background-position: -336px 0;\n}\n.icon-zoom-out {\n  background-position: -360px 0;\n}\n.icon-off {\n  background-position: -384px 0;\n}\n.icon-signal {\n  background-position: -408px 0;\n}\n.icon-cog {\n  background-position: -432px 0;\n}\n.icon-trash {\n  background-position: -456px 0;\n}\n.icon-home {\n  background-position: 0 -24px;\n}\n.icon-file {\n  background-position: -24px -24px;\n}\n.icon-time {\n  background-position: -48px -24px;\n}\n.icon-road {\n  background-position: -72px -24px;\n}\n.icon-download-alt {\n  background-position: -96px -24px;\n}\n.icon-download {\n  background-position: -120px -24px;\n}\n.icon-upload {\n  background-position: -144px -24px;\n}\n.icon-inbox {\n  background-position: -168px -24px;\n}\n.icon-play-circle {\n  background-position: -192px -24px;\n}\n.icon-repeat {\n  background-position: -216px -24px;\n}\n.icon-refresh {\n  background-position: -240px -24px;\n}\n.icon-list-alt {\n  background-position: -264px -24px;\n}\n.icon-lock {\n  background-position: -287px -24px;\n}\n.icon-flag {\n  background-position: -312px -24px;\n}\n.icon-headphones {\n  background-position: -336px -24px;\n}\n.icon-volume-off {\n  background-position: -360px -24px;\n}\n.icon-volume-down {\n  background-position: -384px -24px;\n}\n.icon-volume-up {\n  background-position: -408px -24px;\n}\n.icon-qrcode {\n  background-position: -432px -24px;\n}\n.icon-barcode {\n  background-position: -456px -24px;\n}\n.icon-tag {\n  background-position: 0 -48px;\n}\n.icon-tags {\n  background-position: -25px -48px;\n}\n.icon-book {\n  background-position: -48px -48px;\n}\n.icon-bookmark {\n  background-position: -72px -48px;\n}\n.icon-print {\n  background-position: -96px -48px;\n}\n.icon-camera {\n  background-position: -120px -48px;\n}\n.icon-font {\n  background-position: -144px -48px;\n}\n.icon-bold {\n  background-position: -167px -48px;\n}\n.icon-italic {\n  background-position: -192px -48px;\n}\n.icon-text-height {\n  background-position: -216px -48px;\n}\n.icon-text-width {\n  background-position: -240px -48px;\n}\n.icon-align-left {\n  background-position: -264px -48px;\n}\n.icon-align-center {\n  background-position: -288px -48px;\n}\n.icon-align-right {\n  background-position: -312px -48px;\n}\n.icon-align-justify {\n  background-position: -336px -48px;\n}\n.icon-list {\n  background-position: -360px -48px;\n}\n.icon-indent-left {\n  background-position: -384px -48px;\n}\n.icon-indent-right {\n  background-position: -408px -48px;\n}\n.icon-facetime-video {\n  background-position: -432px -48px;\n}\n.icon-picture {\n  background-position: -456px -48px;\n}\n.icon-pencil {\n  background-position: 0 -72px;\n}\n.icon-map-marker {\n  background-position: -24px -72px;\n}\n.icon-adjust {\n  background-position: -48px -72px;\n}\n.icon-tint {\n  background-position: -72px -72px;\n}\n.icon-edit {\n  background-position: -96px -72px;\n}\n.icon-share {\n  background-position: -120px -72px;\n}\n.icon-check {\n  background-position: -144px -72px;\n}\n.icon-move {\n  background-position: -168px -72px;\n}\n.icon-step-backward {\n  background-position: -192px -72px;\n}\n.icon-fast-backward {\n  background-position: -216px -72px;\n}\n.icon-backward {\n  background-position: -240px -72px;\n}\n.icon-play {\n  background-position: -264px -72px;\n}\n.icon-pause {\n  background-position: -288px -72px;\n}\n.icon-stop {\n  background-position: -312px -72px;\n}\n.icon-forward {\n  background-position: -336px -72px;\n}\n.icon-fast-forward {\n  background-position: -360px -72px;\n}\n.icon-step-forward {\n  background-position: -384px -72px;\n}\n.icon-eject {\n  background-position: -408px -72px;\n}\n.icon-chevron-left {\n  background-position: -432px -72px;\n}\n.icon-chevron-right {\n  background-position: -456px -72px;\n}\n.icon-plus-sign {\n  background-position: 0 -96px;\n}\n.icon-minus-sign {\n  background-position: -24px -96px;\n}\n.icon-remove-sign {\n  background-position: -48px -96px;\n}\n.icon-ok-sign {\n  background-position: -72px -96px;\n}\n.icon-question-sign {\n  background-position: -96px -96px;\n}\n.icon-info-sign {\n  background-position: -120px -96px;\n}\n.icon-screenshot {\n  background-position: -144px -96px;\n}\n.icon-remove-circle {\n  background-position: -168px -96px;\n}\n.icon-ok-circle {\n  background-position: -192px -96px;\n}\n.icon-ban-circle {\n  background-position: -216px -96px;\n}\n.icon-arrow-left {\n  background-position: -240px -96px;\n}\n.icon-arrow-right {\n  background-position: -264px -96px;\n}\n.icon-arrow-up {\n  background-position: -289px -96px;\n}\n.icon-arrow-down {\n  background-position: -312px -96px;\n}\n.icon-share-alt {\n  background-position: -336px -96px;\n}\n.icon-resize-full {\n  background-position: -360px -96px;\n}\n.icon-resize-small {\n  background-position: -384px -96px;\n}\n.icon-plus {\n  background-position: -408px -96px;\n}\n.icon-minus {\n  background-position: -433px -96px;\n}\n.icon-asterisk {\n  background-position: -456px -96px;\n}\n.icon-exclamation-sign {\n  background-position: 0 -120px;\n}\n.icon-gift {\n  background-position: -24px -120px;\n}\n.icon-leaf {\n  background-position: -48px -120px;\n}\n.icon-fire {\n  background-position: -72px -120px;\n}\n.icon-eye-open {\n  background-position: -96px -120px;\n}\n.icon-eye-close {\n  background-position: -120px -120px;\n}\n.icon-warning-sign {\n  background-position: -144px -120px;\n}\n.icon-plane {\n  background-position: -168px -120px;\n}\n.icon-calendar {\n  background-position: -192px -120px;\n}\n.icon-random {\n  background-position: -216px -120px;\n  width: 16px;\n}\n.icon-comment {\n  background-position: -240px -120px;\n}\n.icon-magnet {\n  background-position: -264px -120px;\n}\n.icon-chevron-up {\n  background-position: -288px -120px;\n}\n.icon-chevron-down {\n  background-position: -313px -119px;\n}\n.icon-retweet {\n  background-position: -336px -120px;\n}\n.icon-shopping-cart {\n  background-position: -360px -120px;\n}\n.icon-folder-close {\n  background-position: -384px -120px;\n}\n.icon-folder-open {\n  background-position: -408px -120px;\n  width: 16px;\n}\n.icon-resize-vertical {\n  background-position: -432px -119px;\n}\n.icon-resize-horizontal {\n  background-position: -456px -118px;\n}\n.icon-hdd {\n  background-position: 0 -144px;\n}\n.icon-bullhorn {\n  background-position: -24px -144px;\n}\n.icon-bell {\n  background-position: -48px -144px;\n}\n.icon-certificate {\n  background-position: -72px -144px;\n}\n.icon-thumbs-up {\n  background-position: -96px -144px;\n}\n.icon-thumbs-down {\n  background-position: -120px -144px;\n}\n.icon-hand-right {\n  background-position: -144px -144px;\n}\n.icon-hand-left {\n  background-position: -168px -144px;\n}\n.icon-hand-up {\n  background-position: -192px -144px;\n}\n.icon-hand-down {\n  background-position: -216px -144px;\n}\n.icon-circle-arrow-right {\n  background-position: -240px -144px;\n}\n.icon-circle-arrow-left {\n  background-position: -264px -144px;\n}\n.icon-circle-arrow-up {\n  background-position: -288px -144px;\n}\n.icon-circle-arrow-down {\n  background-position: -312px -144px;\n}\n.icon-globe {\n  background-position: -336px -144px;\n}\n.icon-wrench {\n  background-position: -360px -144px;\n}\n.icon-tasks {\n  background-position: -384px -144px;\n}\n.icon-filter {\n  background-position: -408px -144px;\n}\n.icon-briefcase {\n  background-position: -432px -144px;\n}\n.icon-fullscreen {\n  background-position: -456px -144px;\n}\n.btn-group {\n  position: relative;\n  font-size: 0;\n  white-space: nowrap;\n  *margin-left: .3em;\n}\n.btn-group:first-child {\n  *margin-left: 0;\n}\n.btn-group + .btn-group {\n  margin-left: 5px;\n}\n.btn-toolbar {\n  font-size: 0;\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\n.btn-toolbar .btn-group {\n  display: inline-block;\n  *display: inline;\n  /* IE7 inline-block hack */\n\n  *zoom: 1;\n}\n.btn-toolbar .btn + .btn,\n.btn-toolbar .btn-group + .btn,\n.btn-toolbar .btn + .btn-group {\n  margin-left: 5px;\n}\n.btn-group > .btn {\n  position: relative;\n  -webkit-border-radius: 0;\n  -moz-border-radius: 0;\n  border-radius: 0;\n}\n.btn-group > .btn + .btn {\n  margin-left: -1px;\n}\n.btn-group > .btn,\n.btn-group > .dropdown-menu {\n  font-size: 14px;\n}\n.btn-group > .btn-mini {\n  font-size: 11px;\n}\n.btn-group > .btn-small {\n  font-size: 12px;\n}\n.btn-group > .btn-large {\n  font-size: 16px;\n}\n.btn-group > .btn:first-child {\n  margin-left: 0;\n  -webkit-border-top-left-radius: 4px;\n  -moz-border-radius-topleft: 4px;\n  border-top-left-radius: 4px;\n  -webkit-border-bottom-left-radius: 4px;\n  -moz-border-radius-bottomleft: 4px;\n  border-bottom-left-radius: 4px;\n}\n.btn-group > .btn:last-child,\n.btn-group > .dropdown-toggle {\n  -webkit-border-top-right-radius: 4px;\n  -moz-border-radius-topright: 4px;\n  border-top-right-radius: 4px;\n  -webkit-border-bottom-right-radius: 4px;\n  -moz-border-radius-bottomright: 4px;\n  border-bottom-right-radius: 4px;\n}\n.btn-group > .btn.large:first-child {\n  margin-left: 0;\n  -webkit-border-top-left-radius: 6px;\n  -moz-border-radius-topleft: 6px;\n  border-top-left-radius: 6px;\n  -webkit-border-bottom-left-radius: 6px;\n  -moz-border-radius-bottomleft: 6px;\n  border-bottom-left-radius: 6px;\n}\n.btn-group > .btn.large:last-child,\n.btn-group > .large.dropdown-toggle {\n  -webkit-border-top-right-radius: 6px;\n  -moz-border-radius-topright: 6px;\n  border-top-right-radius: 6px;\n  -webkit-border-bottom-right-radius: 6px;\n  -moz-border-radius-bottomright: 6px;\n  border-bottom-right-radius: 6px;\n}\n.btn-group > .btn:hover,\n.btn-group > .btn:focus,\n.btn-group > .btn:active,\n.btn-group > .btn.active {\n  z-index: 2;\n}\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n  outline: 0;\n}\n.btn-group > .btn + .dropdown-toggle {\n  padding-left: 8px;\n  padding-right: 8px;\n  -webkit-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);\n  -moz-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);\n  box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);\n  *padding-top: 5px;\n  *padding-bottom: 5px;\n}\n.btn-group > .btn-mini + .dropdown-toggle {\n  padding-left: 5px;\n  padding-right: 5px;\n  *padding-top: 2px;\n  *padding-bottom: 2px;\n}\n.btn-group > .btn-small + .dropdown-toggle {\n  *padding-top: 5px;\n  *padding-bottom: 4px;\n}\n.btn-group > .btn-large + .dropdown-toggle {\n  padding-left: 12px;\n  padding-right: 12px;\n  *padding-top: 7px;\n  *padding-bottom: 7px;\n}\n.btn-group.open .dropdown-toggle {\n  background-image: none;\n  -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);\n  -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);\n  box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);\n}\n.btn-group.open .btn.dropdown-toggle {\n  background-color: #e6e6e6;\n}\n.btn-group.open .btn-primary.dropdown-toggle {\n  background-color: #0044cc;\n}\n.btn-group.open .btn-warning.dropdown-toggle {\n  background-color: #f89406;\n}\n.btn-group.open .btn-danger.dropdown-toggle {\n  background-color: #bd362f;\n}\n.btn-group.open .btn-success.dropdown-toggle {\n  background-color: #51a351;\n}\n.btn-group.open .btn-info.dropdown-toggle {\n  background-color: #2f96b4;\n}\n.btn-group.open .btn-inverse.dropdown-toggle {\n  background-color: #222222;\n}\n.btn .caret {\n  margin-top: 8px;\n  margin-left: 0;\n}\n.btn-mini .caret,\n.btn-small .caret,\n.btn-large .caret {\n  margin-top: 6px;\n}\n.btn-large .caret {\n  border-left-width: 5px;\n  border-right-width: 5px;\n  border-top-width: 5px;\n}\n.dropup .btn-large .caret {\n  border-bottom: 5px solid #000000;\n  border-top: 0;\n}\n.btn-primary .caret,\n.btn-warning .caret,\n.btn-danger .caret,\n.btn-info .caret,\n.btn-success .caret,\n.btn-inverse .caret {\n  border-top-color: #ffffff;\n  border-bottom-color: #ffffff;\n}\n.btn-group-vertical {\n  display: inline-block;\n  *display: inline;\n  /* IE7 inline-block hack */\n\n  *zoom: 1;\n}\n.btn-group-vertical .btn {\n  display: block;\n  float: none;\n  width: 100%;\n  -webkit-border-radius: 0;\n  -moz-border-radius: 0;\n  border-radius: 0;\n}\n.btn-group-vertical .btn + .btn {\n  margin-left: 0;\n  margin-top: -1px;\n}\n.btn-group-vertical .btn:first-child {\n  -webkit-border-radius: 4px 4px 0 0;\n  -moz-border-radius: 4px 4px 0 0;\n  border-radius: 4px 4px 0 0;\n}\n.btn-group-vertical .btn:last-child {\n  -webkit-border-radius: 0 0 4px 4px;\n  -moz-border-radius: 0 0 4px 4px;\n  border-radius: 0 0 4px 4px;\n}\n.btn-group-vertical .btn-large:first-child {\n  -webkit-border-radius: 6px 6px 0 0;\n  -moz-border-radius: 6px 6px 0 0;\n  border-radius: 6px 6px 0 0;\n}\n.btn-group-vertical .btn-large:last-child {\n  -webkit-border-radius: 0 0 6px 6px;\n  -moz-border-radius: 0 0 6px 6px;\n  border-radius: 0 0 6px 6px;\n}\n.nav {\n  margin-left: 0;\n  margin-bottom: 20px;\n  list-style: none;\n}\n.nav > li > a {\n  display: block;\n}\n.nav > li > a:hover {\n  text-decoration: none;\n  background-color: #eeeeee;\n}\n.nav > .pull-right {\n  float: right;\n}\n.nav-header {\n  display: block;\n  padding: 3px 15px;\n  font-size: 11px;\n  font-weight: bold;\n  line-height: 20px;\n  color: #999999;\n  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);\n  text-transform: uppercase;\n}\n.nav li + .nav-header {\n  margin-top: 9px;\n}\n.nav-list {\n  padding-left: 15px;\n  padding-right: 15px;\n  margin-bottom: 0;\n}\n.nav-list > li > a,\n.nav-list .nav-header {\n  margin-left: -15px;\n  margin-right: -15px;\n  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);\n}\n.nav-list > li > a {\n  padding: 3px 15px;\n}\n.nav-list > .active > a,\n.nav-list > .active > a:hover {\n  color: #ffffff;\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);\n  background-color: #0088cc;\n}\n.nav-list [class^=\"icon-\"] {\n  margin-right: 2px;\n}\n.nav-list .divider {\n  *width: 100%;\n  height: 1px;\n  margin: 9px 1px;\n  *margin: -5px 0 5px;\n  overflow: hidden;\n  background-color: #e5e5e5;\n  border-bottom: 1px solid #ffffff;\n}\n.nav-tabs,\n.nav-pills {\n  *zoom: 1;\n}\n.nav-tabs:before,\n.nav-pills:before,\n.nav-tabs:after,\n.nav-pills:after {\n  display: table;\n  content: \"\";\n  line-height: 0;\n}\n.nav-tabs:after,\n.nav-pills:after {\n  clear: both;\n}\n.nav-tabs > li,\n.nav-pills > li {\n  float: left;\n}\n.nav-tabs > li > a,\n.nav-pills > li > a {\n  padding-right: 12px;\n  padding-left: 12px;\n  margin-right: 2px;\n  line-height: 14px;\n}\n.nav-tabs {\n  border-bottom: 1px solid #ddd;\n}\n.nav-tabs > li {\n  margin-bottom: -1px;\n}\n.nav-tabs > li > a {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  line-height: 20px;\n  border: 1px solid transparent;\n  -webkit-border-radius: 4px 4px 0 0;\n  -moz-border-radius: 4px 4px 0 0;\n  border-radius: 4px 4px 0 0;\n}\n.nav-tabs > li > a:hover {\n  border-color: #eeeeee #eeeeee #dddddd;\n}\n.nav-tabs > .active > a,\n.nav-tabs > .active > a:hover {\n  color: #555555;\n  background-color: #ffffff;\n  border: 1px solid #ddd;\n  border-bottom-color: transparent;\n  cursor: default;\n}\n.nav-pills > li > a {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  margin-top: 2px;\n  margin-bottom: 2px;\n  -webkit-border-radius: 5px;\n  -moz-border-radius: 5px;\n  border-radius: 5px;\n}\n.nav-pills > .active > a,\n.nav-pills > .active > a:hover {\n  color: #ffffff;\n  background-color: #0088cc;\n}\n.nav-stacked > li {\n  float: none;\n}\n.nav-stacked > li > a {\n  margin-right: 0;\n}\n.nav-tabs.nav-stacked {\n  border-bottom: 0;\n}\n.nav-tabs.nav-stacked > li > a {\n  border: 1px solid #ddd;\n  -webkit-border-radius: 0;\n  -moz-border-radius: 0;\n  border-radius: 0;\n}\n.nav-tabs.nav-stacked > li:first-child > a {\n  -webkit-border-top-right-radius: 4px;\n  -moz-border-radius-topright: 4px;\n  border-top-right-radius: 4px;\n  -webkit-border-top-left-radius: 4px;\n  -moz-border-radius-topleft: 4px;\n  border-top-left-radius: 4px;\n}\n.nav-tabs.nav-stacked > li:last-child > a {\n  -webkit-border-bottom-right-radius: 4px;\n  -moz-border-radius-bottomright: 4px;\n  border-bottom-right-radius: 4px;\n  -webkit-border-bottom-left-radius: 4px;\n  -moz-border-radius-bottomleft: 4px;\n  border-bottom-left-radius: 4px;\n}\n.nav-tabs.nav-stacked > li > a:hover {\n  border-color: #ddd;\n  z-index: 2;\n}\n.nav-pills.nav-stacked > li > a {\n  margin-bottom: 3px;\n}\n.nav-pills.nav-stacked > li:last-child > a {\n  margin-bottom: 1px;\n}\n.nav-tabs .dropdown-menu {\n  -webkit-border-radius: 0 0 6px 6px;\n  -moz-border-radius: 0 0 6px 6px;\n  border-radius: 0 0 6px 6px;\n}\n.nav-pills .dropdown-menu {\n  -webkit-border-radius: 6px;\n  -moz-border-radius: 6px;\n  border-radius: 6px;\n}\n.nav .dropdown-toggle .caret {\n  border-top-color: #0088cc;\n  border-bottom-color: #0088cc;\n  margin-top: 6px;\n}\n.nav .dropdown-toggle:hover .caret {\n  border-top-color: #005580;\n  border-bottom-color: #005580;\n}\n/* move down carets for tabs */\n.nav-tabs .dropdown-toggle .caret {\n  margin-top: 8px;\n}\n.nav .active .dropdown-toggle .caret {\n  border-top-color: #fff;\n  border-bottom-color: #fff;\n}\n.nav-tabs .active .dropdown-toggle .caret {\n  border-top-color: #555555;\n  border-bottom-color: #555555;\n}\n.nav > .dropdown.active > a:hover {\n  cursor: pointer;\n}\n.nav-tabs .open .dropdown-toggle,\n.nav-pills .open .dropdown-toggle,\n.nav > li.dropdown.open.active > a:hover {\n  color: #ffffff;\n  background-color: #999999;\n  border-color: #999999;\n}\n.nav li.dropdown.open .caret,\n.nav li.dropdown.open.active .caret,\n.nav li.dropdown.open a:hover .caret {\n  border-top-color: #ffffff;\n  border-bottom-color: #ffffff;\n  opacity: 1;\n  filter: alpha(opacity=100);\n}\n.tabs-stacked .open > a:hover {\n  border-color: #999999;\n}\n.tabbable {\n  *zoom: 1;\n}\n.tabbable:before,\n.tabbable:after {\n  display: table;\n  content: \"\";\n  line-height: 0;\n}\n.tabbable:after {\n  clear: both;\n}\n.tab-content {\n  overflow: auto;\n}\n.tabs-below > .nav-tabs,\n.tabs-right > .nav-tabs,\n.tabs-left > .nav-tabs {\n  border-bottom: 0;\n}\n.tab-content > .tab-pane,\n.pill-content > .pill-pane {\n  display: none;\n}\n.tab-content > .active,\n.pill-content > .active {\n  display: block;\n}\n.tabs-below > .nav-tabs {\n  border-top: 1px solid #ddd;\n}\n.tabs-below > .nav-tabs > li {\n  margin-top: -1px;\n  margin-bottom: 0;\n}\n.tabs-below > .nav-tabs > li > a {\n  -webkit-border-radius: 0 0 4px 4px;\n  -moz-border-radius: 0 0 4px 4px;\n  border-radius: 0 0 4px 4px;\n}\n.tabs-below > .nav-tabs > li > a:hover {\n  border-bottom-color: transparent;\n  border-top-color: #ddd;\n}\n.tabs-below > .nav-tabs > .active > a,\n.tabs-below > .nav-tabs > .active > a:hover {\n  border-color: transparent #ddd #ddd #ddd;\n}\n.tabs-left > .nav-tabs > li,\n.tabs-right > .nav-tabs > li {\n  float: none;\n}\n.tabs-left > .nav-tabs > li > a,\n.tabs-right > .nav-tabs > li > a {\n  min-width: 74px;\n  margin-right: 0;\n  margin-bottom: 3px;\n}\n.tabs-left > .nav-tabs {\n  float: left;\n  margin-right: 19px;\n  border-right: 1px solid #ddd;\n}\n.tabs-left > .nav-tabs > li > a {\n  margin-right: -1px;\n  -webkit-border-radius: 4px 0 0 4px;\n  -moz-border-radius: 4px 0 0 4px;\n  border-radius: 4px 0 0 4px;\n}\n.tabs-left > .nav-tabs > li > a:hover {\n  border-color: #eeeeee #dddddd #eeeeee #eeeeee;\n}\n.tabs-left > .nav-tabs .active > a,\n.tabs-left > .nav-tabs .active > a:hover {\n  border-color: #ddd transparent #ddd #ddd;\n  *border-right-color: #ffffff;\n}\n.tabs-right > .nav-tabs {\n  float: right;\n  margin-left: 19px;\n  border-left: 1px solid #ddd;\n}\n.tabs-right > .nav-tabs > li > a {\n  margin-left: -1px;\n  -webkit-border-radius: 0 4px 4px 0;\n  -moz-border-radius: 0 4px 4px 0;\n  border-radius: 0 4px 4px 0;\n}\n.tabs-right > .nav-tabs > li > a:hover {\n  border-color: #eeeeee #eeeeee #eeeeee #dddddd;\n}\n.tabs-right > .nav-tabs .active > a,\n.tabs-right > .nav-tabs .active > a:hover {\n  border-color: #ddd #ddd #ddd transparent;\n  *border-left-color: #ffffff;\n}\n.nav > .disabled > a {\n  color: #999999;\n}\n.nav > .disabled > a:hover {\n  text-decoration: none;\n  background-color: transparent;\n  cursor: default;\n}\n.navbar {\n  overflow: visible;\n  margin-bottom: 20px;\n  color: #555555;\n  *position: relative;\n  *z-index: 2;\n}\n.navbar-inner {\n  min-height: 40px;\n  padding-left: 20px;\n  padding-right: 20px;\n  background-color: #fafafa;\n  background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2);\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));\n  background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2);\n  background-image: -o-linear-gradient(top, #ffffff, #f2f2f2);\n  background-image: linear-gradient(to bottom, #ffffff, #f2f2f2);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);\n  border: 1px solid #d4d4d4;\n  -webkit-border-radius: 4px;\n  -moz-border-radius: 4px;\n  border-radius: 4px;\n  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);\n  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);\n  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);\n}\n.navbar .container {\n  width: auto;\n}\n.nav-collapse.collapse {\n  height: auto;\n}\n.navbar .brand {\n  float: left;\n  display: block;\n  padding: 10px 20px 10px;\n  margin-left: -20px;\n  font-size: 20px;\n  font-weight: 200;\n  color: #555555;\n  text-shadow: 0 1px 0 #ffffff;\n}\n.navbar .brand:hover {\n  text-decoration: none;\n}\n.navbar-text {\n  margin-bottom: 0;\n  line-height: 40px;\n}\n.navbar-link {\n  color: #555555;\n}\n.navbar-link:hover {\n  color: #333333;\n}\n.navbar .divider-vertical {\n  height: 40px;\n  margin: 0 9px;\n  border-left: 1px solid #f2f2f2;\n  border-right: 1px solid #ffffff;\n}\n.navbar .btn,\n.navbar .btn-group {\n  margin-top: 6px;\n}\n.navbar .btn-group .btn {\n  margin: 0;\n}\n.navbar-form {\n  margin-bottom: 0;\n  *zoom: 1;\n}\n.navbar-form:before,\n.navbar-form:after {\n  display: table;\n  content: \"\";\n  line-height: 0;\n}\n.navbar-form:after {\n  clear: both;\n}\n.navbar-form input,\n.navbar-form select,\n.navbar-form .radio,\n.navbar-form .checkbox {\n  margin-top: 5px;\n}\n.navbar-form input,\n.navbar-form select,\n.navbar-form .btn {\n  display: inline-block;\n  margin-bottom: 0;\n}\n.navbar-form input[type=\"image\"],\n.navbar-form input[type=\"checkbox\"],\n.navbar-form input[type=\"radio\"] {\n  margin-top: 3px;\n}\n.navbar-form .input-append,\n.navbar-form .input-prepend {\n  margin-top: 6px;\n  white-space: nowrap;\n}\n.navbar-form .input-append input,\n.navbar-form .input-prepend input {\n  margin-top: 0;\n}\n.navbar-search {\n  position: relative;\n  float: left;\n  margin-top: 5px;\n  margin-bottom: 0;\n}\n.navbar-search .search-query {\n  margin-bottom: 0;\n  padding: 4px 14px;\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-size: 13px;\n  font-weight: normal;\n  line-height: 1;\n  -webkit-border-radius: 15px;\n  -moz-border-radius: 15px;\n  border-radius: 15px;\n}\n.navbar-static-top {\n  position: static;\n  width: 100%;\n  margin-bottom: 0;\n}\n.navbar-static-top .navbar-inner {\n  -webkit-border-radius: 0;\n  -moz-border-radius: 0;\n  border-radius: 0;\n}\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  position: fixed;\n  right: 0;\n  left: 0;\n  z-index: 1030;\n  margin-bottom: 0;\n}\n.navbar-fixed-top .navbar-inner,\n.navbar-fixed-bottom .navbar-inner,\n.navbar-static-top .navbar-inner {\n  border: 0;\n}\n.navbar-fixed-top .navbar-inner,\n.navbar-fixed-bottom .navbar-inner {\n  padding-left: 0;\n  padding-right: 0;\n  -webkit-border-radius: 0;\n  -moz-border-radius: 0;\n  border-radius: 0;\n}\n.navbar-static-top .container,\n.navbar-fixed-top .container,\n.navbar-fixed-bottom .container {\n  width: 940px;\n}\n.navbar-fixed-top {\n  top: 0;\n}\n.navbar-fixed-top .navbar-inner,\n.navbar-static-top .navbar-inner {\n  -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,.1), 0 1px 10px rgba(0,0,0,.1);\n  -moz-box-shadow: inset 0 -1px 0 rgba(0,0,0,.1), 0 1px 10px rgba(0,0,0,.1);\n  box-shadow: inset 0 -1px 0 rgba(0,0,0,.1), 0 1px 10px rgba(0,0,0,.1);\n}\n.navbar-fixed-bottom {\n  bottom: 0;\n}\n.navbar-fixed-bottom .navbar-inner {\n  -webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,.1), 0 -1px 10px rgba(0,0,0,.1);\n  -moz-box-shadow: inset 0 1px 0 rgba(0,0,0,.1), 0 -1px 10px rgba(0,0,0,.1);\n  box-shadow: inset 0 1px 0 rgba(0,0,0,.1), 0 -1px 10px rgba(0,0,0,.1);\n}\n.navbar .nav {\n  position: relative;\n  left: 0;\n  display: block;\n  float: left;\n  margin: 0 10px 0 0;\n}\n.navbar .nav.pull-right {\n  float: right;\n}\n.navbar .nav > li {\n  float: left;\n}\n.navbar .nav > li > a {\n  float: none;\n  padding: 10px 15px 10px;\n  color: #555555;\n  text-decoration: none;\n  text-shadow: 0 1px 0 #ffffff;\n}\n.navbar .nav .dropdown-toggle .caret {\n  margin-top: 8px;\n}\n.navbar .nav > li > a:focus,\n.navbar .nav > li > a:hover {\n  background-color: transparent;\n  color: #333333;\n  text-decoration: none;\n}\n.navbar .nav > .active > a,\n.navbar .nav > .active > a:hover,\n.navbar .nav > .active > a:focus {\n  color: #555555;\n  text-decoration: none;\n  background-color: #e5e5e5;\n  -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);\n  -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);\n  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);\n}\n.navbar .btn-navbar {\n  display: none;\n  float: right;\n  padding: 7px 10px;\n  margin-left: 5px;\n  margin-right: 5px;\n  color: #ffffff;\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n  background-color: #ededed;\n  background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5);\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));\n  background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5);\n  background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5);\n  background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);\n  border-color: #e5e5e5 #e5e5e5 #bfbfbf;\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n  *background-color: #e5e5e5;\n  /* Darken IE7 buttons by default so they stand out more given they won't have borders */\n\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);\n  -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);\n  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);\n}\n.navbar .btn-navbar:hover,\n.navbar .btn-navbar:active,\n.navbar .btn-navbar.active,\n.navbar .btn-navbar.disabled,\n.navbar .btn-navbar[disabled] {\n  color: #ffffff;\n  background-color: #e5e5e5;\n  *background-color: #d9d9d9;\n}\n.navbar .btn-navbar:active,\n.navbar .btn-navbar.active {\n  background-color: #cccccc \\9;\n}\n.navbar .btn-navbar .icon-bar {\n  display: block;\n  width: 18px;\n  height: 2px;\n  background-color: #f5f5f5;\n  -webkit-border-radius: 1px;\n  -moz-border-radius: 1px;\n  border-radius: 1px;\n  -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);\n  -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);\n  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);\n}\n.btn-navbar .icon-bar + .icon-bar {\n  margin-top: 3px;\n}\n.navbar .nav > li > .dropdown-menu:before {\n  content: '';\n  display: inline-block;\n  border-left: 7px solid transparent;\n  border-right: 7px solid transparent;\n  border-bottom: 7px solid #ccc;\n  border-bottom-color: rgba(0, 0, 0, 0.2);\n  position: absolute;\n  top: -7px;\n  left: 9px;\n}\n.navbar .nav > li > .dropdown-menu:after {\n  content: '';\n  display: inline-block;\n  border-left: 6px solid transparent;\n  border-right: 6px solid transparent;\n  border-bottom: 6px solid #ffffff;\n  position: absolute;\n  top: -6px;\n  left: 10px;\n}\n.navbar-fixed-bottom .nav > li > .dropdown-menu:before {\n  border-top: 7px solid #ccc;\n  border-top-color: rgba(0, 0, 0, 0.2);\n  border-bottom: 0;\n  bottom: -7px;\n  top: auto;\n}\n.navbar-fixed-bottom .nav > li > .dropdown-menu:after {\n  border-top: 6px solid #ffffff;\n  border-bottom: 0;\n  bottom: -6px;\n  top: auto;\n}\n.navbar .nav li.dropdown.open > .dropdown-toggle,\n.navbar .nav li.dropdown.active > .dropdown-toggle,\n.navbar .nav li.dropdown.open.active > .dropdown-toggle {\n  background-color: #e5e5e5;\n  color: #555555;\n}\n.navbar .nav li.dropdown > .dropdown-toggle .caret {\n  border-top-color: #555555;\n  border-bottom-color: #555555;\n}\n.navbar .nav li.dropdown.open > .dropdown-toggle .caret,\n.navbar .nav li.dropdown.active > .dropdown-toggle .caret,\n.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret {\n  border-top-color: #555555;\n  border-bottom-color: #555555;\n}\n.navbar .pull-right > li > .dropdown-menu,\n.navbar .nav > li > .dropdown-menu.pull-right {\n  left: auto;\n  right: 0;\n}\n.navbar .pull-right > li > .dropdown-menu:before,\n.navbar .nav > li > .dropdown-menu.pull-right:before {\n  left: auto;\n  right: 12px;\n}\n.navbar .pull-right > li > .dropdown-menu:after,\n.navbar .nav > li > .dropdown-menu.pull-right:after {\n  left: auto;\n  right: 13px;\n}\n.navbar .pull-right > li > .dropdown-menu .dropdown-menu,\n.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu {\n  left: auto;\n  right: 100%;\n  margin-left: 0;\n  margin-right: -1px;\n  -webkit-border-radius: 6px 0 6px 6px;\n  -moz-border-radius: 6px 0 6px 6px;\n  border-radius: 6px 0 6px 6px;\n}\n.navbar-inverse {\n  color: #999999;\n}\n.navbar-inverse .navbar-inner {\n  background-color: #1b1b1b;\n  background-image: -moz-linear-gradient(top, #222222, #111111);\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111));\n  background-image: -webkit-linear-gradient(top, #222222, #111111);\n  background-image: -o-linear-gradient(top, #222222, #111111);\n  background-image: linear-gradient(to bottom, #222222, #111111);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);\n  border-color: #252525;\n}\n.navbar-inverse .brand,\n.navbar-inverse .nav > li > a {\n  color: #999999;\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\n.navbar-inverse .brand:hover,\n.navbar-inverse .nav > li > a:hover {\n  color: #ffffff;\n}\n.navbar-inverse .nav > li > a:focus,\n.navbar-inverse .nav > li > a:hover {\n  background-color: transparent;\n  color: #ffffff;\n}\n.navbar-inverse .nav .active > a,\n.navbar-inverse .nav .active > a:hover,\n.navbar-inverse .nav .active > a:focus {\n  color: #ffffff;\n  background-color: #111111;\n}\n.navbar-inverse .navbar-link {\n  color: #999999;\n}\n.navbar-inverse .navbar-link:hover {\n  color: #ffffff;\n}\n.navbar-inverse .divider-vertical {\n  border-left-color: #111111;\n  border-right-color: #222222;\n}\n.navbar-inverse .nav li.dropdown.open > .dropdown-toggle,\n.navbar-inverse .nav li.dropdown.active > .dropdown-toggle,\n.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle {\n  background-color: #111111;\n  color: #ffffff;\n}\n.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret {\n  border-top-color: #999999;\n  border-bottom-color: #999999;\n}\n.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret,\n.navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret,\n.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret {\n  border-top-color: #ffffff;\n  border-bottom-color: #ffffff;\n}\n.navbar-inverse .navbar-search .search-query {\n  color: #ffffff;\n  background-color: #515151;\n  border-color: #111111;\n  -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);\n  -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);\n  box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);\n  -webkit-transition: none;\n  -moz-transition: none;\n  -o-transition: none;\n  transition: none;\n}\n.navbar-inverse .navbar-search .search-query:-moz-placeholder {\n  color: #cccccc;\n}\n.navbar-inverse .navbar-search .search-query:-ms-input-placeholder {\n  color: #cccccc;\n}\n.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder {\n  color: #cccccc;\n}\n.navbar-inverse .navbar-search .search-query:focus,\n.navbar-inverse .navbar-search .search-query.focused {\n  padding: 5px 15px;\n  color: #333333;\n  text-shadow: 0 1px 0 #ffffff;\n  background-color: #ffffff;\n  border: 0;\n  -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);\n  -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);\n  box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);\n  outline: 0;\n}\n.navbar-inverse .btn-navbar {\n  color: #ffffff;\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n  background-color: #0e0e0e;\n  background-image: -moz-linear-gradient(top, #151515, #040404);\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404));\n  background-image: -webkit-linear-gradient(top, #151515, #040404);\n  background-image: -o-linear-gradient(top, #151515, #040404);\n  background-image: linear-gradient(to bottom, #151515, #040404);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);\n  border-color: #040404 #040404 #000000;\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n  *background-color: #040404;\n  /* Darken IE7 buttons by default so they stand out more given they won't have borders */\n\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.navbar-inverse .btn-navbar:hover,\n.navbar-inverse .btn-navbar:active,\n.navbar-inverse .btn-navbar.active,\n.navbar-inverse .btn-navbar.disabled,\n.navbar-inverse .btn-navbar[disabled] {\n  color: #ffffff;\n  background-color: #040404;\n  *background-color: #000000;\n}\n.navbar-inverse .btn-navbar:active,\n.navbar-inverse .btn-navbar.active {\n  background-color: #000000 \\9;\n}\n.breadcrumb {\n  padding: 8px 15px;\n  margin: 0 0 20px;\n  list-style: none;\n  background-color: #f5f5f5;\n  -webkit-border-radius: 4px;\n  -moz-border-radius: 4px;\n  border-radius: 4px;\n}\n.breadcrumb li {\n  display: inline-block;\n  *display: inline;\n  /* IE7 inline-block hack */\n\n  *zoom: 1;\n  text-shadow: 0 1px 0 #ffffff;\n}\n.breadcrumb .divider {\n  padding: 0 5px;\n  color: #ccc;\n}\n.breadcrumb .active {\n  color: #999999;\n}\n.pagination {\n  height: 40px;\n  margin: 20px 0;\n}\n.pagination ul {\n  display: inline-block;\n  *display: inline;\n  /* IE7 inline-block hack */\n\n  *zoom: 1;\n  margin-left: 0;\n  margin-bottom: 0;\n  -webkit-border-radius: 3px;\n  -moz-border-radius: 3px;\n  border-radius: 3px;\n  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n  -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.pagination li {\n  display: inline;\n}\n.pagination a,\n.pagination span {\n  float: left;\n  padding: 0 14px;\n  line-height: 38px;\n  text-decoration: none;\n  background-color: #ffffff;\n  border: 1px solid #dddddd;\n  border-left-width: 0;\n}\n.pagination a:hover,\n.pagination .active a,\n.pagination .active span {\n  background-color: #f5f5f5;\n}\n.pagination .active a,\n.pagination .active span {\n  color: #999999;\n  cursor: default;\n}\n.pagination .disabled span,\n.pagination .disabled a,\n.pagination .disabled a:hover {\n  color: #999999;\n  background-color: transparent;\n  cursor: default;\n}\n.pagination li:first-child a,\n.pagination li:first-child span {\n  border-left-width: 1px;\n  -webkit-border-radius: 3px 0 0 3px;\n  -moz-border-radius: 3px 0 0 3px;\n  border-radius: 3px 0 0 3px;\n}\n.pagination li:last-child a,\n.pagination li:last-child span {\n  -webkit-border-radius: 0 3px 3px 0;\n  -moz-border-radius: 0 3px 3px 0;\n  border-radius: 0 3px 3px 0;\n}\n.pagination-centered {\n  text-align: center;\n}\n.pagination-right {\n  text-align: right;\n}\n.pager {\n  margin: 20px 0;\n  list-style: none;\n  text-align: center;\n  *zoom: 1;\n}\n.pager:before,\n.pager:after {\n  display: table;\n  content: \"\";\n  line-height: 0;\n}\n.pager:after {\n  clear: both;\n}\n.pager li {\n  display: inline;\n}\n.pager a {\n  display: inline-block;\n  padding: 5px 14px;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  -webkit-border-radius: 15px;\n  -moz-border-radius: 15px;\n  border-radius: 15px;\n}\n.pager a:hover {\n  text-decoration: none;\n  background-color: #f5f5f5;\n}\n.pager .next a {\n  float: right;\n}\n.pager .previous a {\n  float: left;\n}\n.pager .disabled a,\n.pager .disabled a:hover {\n  color: #999999;\n  background-color: #fff;\n  cursor: default;\n}\n.alert {\n  padding: 8px 35px 8px 14px;\n  margin-bottom: 20px;\n  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);\n  background-color: #fcf8e3;\n  border: 1px solid #fbeed5;\n  -webkit-border-radius: 4px;\n  -moz-border-radius: 4px;\n  border-radius: 4px;\n  color: #c09853;\n}\n.alert h4 {\n  margin: 0;\n}\n.alert .close {\n  position: relative;\n  top: -2px;\n  right: -21px;\n  line-height: 20px;\n}\n.alert-success {\n  background-color: #dff0d8;\n  border-color: #d6e9c6;\n  color: #468847;\n}\n.alert-danger,\n.alert-error {\n  background-color: #f2dede;\n  border-color: #eed3d7;\n  color: #b94a48;\n}\n.alert-info {\n  background-color: #d9edf7;\n  border-color: #bce8f1;\n  color: #3a87ad;\n}\n.alert-block {\n  padding-top: 14px;\n  padding-bottom: 14px;\n}\n.alert-block > p,\n.alert-block > ul {\n  margin-bottom: 0;\n}\n.alert-block p + p {\n  margin-top: 5px;\n}\n.hero-unit {\n  padding: 60px;\n  margin-bottom: 30px;\n  background-color: #eeeeee;\n  -webkit-border-radius: 6px;\n  -moz-border-radius: 6px;\n  border-radius: 6px;\n}\n.hero-unit h1 {\n  margin-bottom: 0;\n  font-size: 60px;\n  line-height: 1;\n  color: inherit;\n  letter-spacing: -1px;\n}\n.hero-unit p {\n  font-size: 18px;\n  font-weight: 200;\n  line-height: 30px;\n  color: inherit;\n}\n.dropup,\n.dropdown {\n  position: relative;\n}\n.dropdown-toggle {\n  *margin-bottom: -3px;\n}\n.dropdown-toggle:active,\n.open .dropdown-toggle {\n  outline: 0;\n}\n.caret {\n  display: inline-block;\n  width: 0;\n  height: 0;\n  vertical-align: top;\n  border-top: 4px solid #000000;\n  border-right: 4px solid transparent;\n  border-left: 4px solid transparent;\n  content: \"\";\n}\n.dropdown .caret {\n  margin-top: 8px;\n  margin-left: 2px;\n}\n.dropdown-menu {\n  position: absolute;\n  top: 100%;\n  left: 0;\n  z-index: 1000;\n  display: none;\n  float: left;\n  min-width: 160px;\n  padding: 5px 0;\n  margin: 2px 0 0;\n  list-style: none;\n  background-color: #ffffff;\n  border: 1px solid #ccc;\n  border: 1px solid rgba(0, 0, 0, 0.2);\n  *border-right-width: 2px;\n  *border-bottom-width: 2px;\n  -webkit-border-radius: 6px;\n  -moz-border-radius: 6px;\n  border-radius: 6px;\n  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n  -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n  -webkit-background-clip: padding-box;\n  -moz-background-clip: padding;\n  background-clip: padding-box;\n}\n.dropdown-menu.pull-right {\n  right: 0;\n  left: auto;\n}\n.dropdown-menu .divider {\n  *width: 100%;\n  height: 1px;\n  margin: 9px 1px;\n  *margin: -5px 0 5px;\n  overflow: hidden;\n  background-color: #e5e5e5;\n  border-bottom: 1px solid #ffffff;\n}\n.dropdown-menu a {\n  display: block;\n  padding: 3px 20px;\n  clear: both;\n  font-weight: normal;\n  line-height: 20px;\n  color: #333333;\n  white-space: nowrap;\n}\n.dropdown-menu li > a:hover,\n.dropdown-menu li > a:focus,\n.dropdown-submenu:hover > a {\n  text-decoration: none;\n  color: #ffffff;\n  background-color: #0088cc;\n  background-color: #0081c2;\n  background-image: -moz-linear-gradient(top, #0088cc, #0077b3);\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));\n  background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);\n  background-image: -o-linear-gradient(top, #0088cc, #0077b3);\n  background-image: linear-gradient(to bottom, #0088cc, #0077b3);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);\n}\n.dropdown-menu .active > a,\n.dropdown-menu .active > a:hover {\n  color: #ffffff;\n  text-decoration: none;\n  outline: 0;\n  background-color: #0088cc;\n  background-color: #0081c2;\n  background-image: -moz-linear-gradient(top, #0088cc, #0077b3);\n  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));\n  background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);\n  background-image: -o-linear-gradient(top, #0088cc, #0077b3);\n  background-image: linear-gradient(to bottom, #0088cc, #0077b3);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);\n}\n.dropdown-menu .disabled > a,\n.dropdown-menu .disabled > a:hover {\n  color: #999999;\n}\n.dropdown-menu .disabled > a:hover {\n  text-decoration: none;\n  background-color: transparent;\n  cursor: default;\n}\n.open {\n  *z-index: 1000;\n}\n.open  > .dropdown-menu {\n  display: block;\n}\n.pull-right > .dropdown-menu {\n  right: 0;\n  left: auto;\n}\n.dropup .caret,\n.navbar-fixed-bottom .dropdown .caret {\n  border-top: 0;\n  border-bottom: 4px solid #000000;\n  content: \"\\2191\";\n}\n.dropup .dropdown-menu,\n.navbar-fixed-bottom .dropdown .dropdown-menu {\n  top: auto;\n  bottom: 100%;\n  margin-bottom: 1px;\n}\n.dropdown-submenu {\n  position: relative;\n}\n.dropdown-submenu > .dropdown-menu {\n  top: 0;\n  left: 100%;\n  margin-top: -6px;\n  margin-left: -1px;\n  -webkit-border-radius: 0 6px 6px 6px;\n  -moz-border-radius: 0 6px 6px 6px;\n  border-radius: 0 6px 6px 6px;\n}\n.dropdown-submenu:hover .dropdown-menu {\n  display: block;\n}\n.dropdown-submenu > a:after {\n  display: block;\n  content: \" \";\n  float: right;\n  width: 0;\n  height: 0;\n  border-color: transparent;\n  border-style: solid;\n  border-width: 5px 0 5px 5px;\n  border-left-color: #cccccc;\n  margin-top: 5px;\n  margin-right: -10px;\n}\n.dropdown-submenu:hover > a:after {\n  border-left-color: #ffffff;\n}\n.dropdown .dropdown-menu .nav-header {\n  padding-left: 20px;\n  padding-right: 20px;\n}\n.typeahead {\n  margin-top: 2px;\n  -webkit-border-radius: 4px;\n  -moz-border-radius: 4px;\n  border-radius: 4px;\n}\n.well {\n  min-height: 20px;\n  padding: 19px;\n  margin-bottom: 20px;\n  background-color: #f5f5f5;\n  border: 1px solid #e3e3e3;\n  -webkit-border-radius: 4px;\n  -moz-border-radius: 4px;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.well blockquote {\n  border-color: #ddd;\n  border-color: rgba(0, 0, 0, 0.15);\n}\n.well-large {\n  padding: 24px;\n  -webkit-border-radius: 6px;\n  -moz-border-radius: 6px;\n  border-radius: 6px;\n}\n.well-small {\n  padding: 9px;\n  -webkit-border-radius: 3px;\n  -moz-border-radius: 3px;\n  border-radius: 3px;\n}\n.close {\n  float: right;\n  font-size: 20px;\n  font-weight: bold;\n  line-height: 20px;\n  color: #000000;\n  text-shadow: 0 1px 0 #ffffff;\n  opacity: 0.2;\n  filter: alpha(opacity=20);\n}\n.close:hover {\n  color: #000000;\n  text-decoration: none;\n  cursor: pointer;\n  opacity: 0.4;\n  filter: alpha(opacity=40);\n}\nbutton.close {\n  padding: 0;\n  cursor: pointer;\n  background: transparent;\n  border: 0;\n  -webkit-appearance: none;\n}\n.pull-right {\n  float: right;\n}\n.pull-left {\n  float: left;\n}\n.hide {\n  display: none;\n}\n.show {\n  display: block;\n}\n.invisible {\n  visibility: hidden;\n}\n.affix {\n  position: fixed;\n}\n.hidden {\n  display: none;\n  visibility: hidden;\n}\n.visible-phone {\n  display: none !important;\n}\n.visible-tablet {\n  display: none !important;\n}\n.hidden-desktop {\n  display: none !important;\n}\n.visible-desktop {\n  display: inherit !important;\n}\n@media (min-width: 768px) and (max-width: 979px) {\n  .hidden-desktop {\n    display: inherit !important;\n  }\n  .visible-desktop {\n    display: none !important ;\n  }\n  .visible-tablet {\n    display: inherit !important;\n  }\n  .hidden-tablet {\n    display: none !important;\n  }\n}\n@media (max-width: 767px) {\n  .hidden-desktop {\n    display: inherit !important;\n  }\n  .visible-desktop {\n    display: none !important;\n  }\n  .visible-phone {\n    display: inherit !important;\n  }\n  .hidden-phone {\n    display: none !important;\n  }\n}\n@media (max-width: 767px) {\n  body {\n    padding-left: 20px;\n    padding-right: 20px;\n  }\n  .navbar-fixed-top,\n  .navbar-fixed-bottom {\n    margin-left: -20px;\n    margin-right: -20px;\n  }\n  .container-fluid {\n    padding: 0;\n  }\n  .dl-horizontal dt {\n    float: none;\n    clear: none;\n    width: auto;\n    text-align: left;\n  }\n  .dl-horizontal dd {\n    margin-left: 0;\n  }\n  .container {\n    width: auto;\n  }\n  .row-fluid {\n    width: 100%;\n  }\n  .row,\n  .thumbnails {\n    margin-left: 0;\n  }\n  .thumbnails > li {\n    float: none;\n    margin-left: 0;\n  }\n  [class*=\"span\"],\n  .row-fluid [class*=\"span\"] {\n    float: none;\n    display: block;\n    width: auto;\n    margin-left: 0;\n  }\n  .span12,\n  .row-fluid .span12 {\n    width: 100%;\n    -webkit-box-sizing: border-box;\n    -moz-box-sizing: border-box;\n    box-sizing: border-box;\n  }\n  .input-large,\n  .input-xlarge,\n  .input-xxlarge,\n  input[class*=\"span\"],\n  select[class*=\"span\"],\n  textarea[class*=\"span\"],\n  .uneditable-input {\n    display: block;\n    width: 100%;\n    min-height: 30px;\n    -webkit-box-sizing: border-box;\n    -moz-box-sizing: border-box;\n    box-sizing: border-box;\n  }\n  .input-prepend input,\n  .input-append input,\n  .input-prepend input[class*=\"span\"],\n  .input-append input[class*=\"span\"] {\n    display: inline-block;\n    width: auto;\n  }\n  .modal {\n    position: fixed;\n    top: 20px;\n    left: 20px;\n    right: 20px;\n    width: auto;\n    margin: 0;\n  }\n  .modal.fade.in {\n    top: auto;\n  }\n}\n@media (max-width: 480px) {\n  .nav-collapse {\n    -webkit-transform: translate3d(0, 0, 0);\n  }\n  .page-header h1 small {\n    display: block;\n    line-height: 20px;\n  }\n  input[type=\"checkbox\"],\n  input[type=\"radio\"] {\n    border: 1px solid #ccc;\n  }\n  .form-horizontal .control-group > label {\n    float: none;\n    width: auto;\n    padding-top: 0;\n    text-align: left;\n  }\n  .form-horizontal .controls {\n    margin-left: 0;\n  }\n  .form-horizontal .control-list {\n    padding-top: 0;\n  }\n  .form-horizontal .form-actions {\n    padding-left: 10px;\n    padding-right: 10px;\n  }\n  .modal {\n    top: 10px;\n    left: 10px;\n    right: 10px;\n  }\n  .modal-header .close {\n    padding: 10px;\n    margin: -10px;\n  }\n  .carousel-caption {\n    position: static;\n  }\n}\n@media (min-width: 768px) and (max-width: 979px) {\n  .row {\n    margin-left: -20px;\n    *zoom: 1;\n  }\n  .row:before,\n  .row:after {\n    display: table;\n    content: \"\";\n    line-height: 0;\n  }\n  .row:after {\n    clear: both;\n  }\n  [class*=\"span\"] {\n    float: left;\n    margin-left: 20px;\n  }\n  .container,\n  .navbar-static-top .container,\n  .navbar-fixed-top .container,\n  .navbar-fixed-bottom .container {\n    width: 724px;\n  }\n  .span12 {\n    width: 724px;\n  }\n  .span11 {\n    width: 662px;\n  }\n  .span10 {\n    width: 600px;\n  }\n  .span9 {\n    width: 538px;\n  }\n  .span8 {\n    width: 476px;\n  }\n  .span7 {\n    width: 414px;\n  }\n  .span6 {\n    width: 352px;\n  }\n  .span5 {\n    width: 290px;\n  }\n  .span4 {\n    width: 228px;\n  }\n  .span3 {\n    width: 166px;\n  }\n  .span2 {\n    width: 104px;\n  }\n  .span1 {\n    width: 42px;\n  }\n  .offset12 {\n    margin-left: 764px;\n  }\n  .offset11 {\n    margin-left: 702px;\n  }\n  .offset10 {\n    margin-left: 640px;\n  }\n  .offset9 {\n    margin-left: 578px;\n  }\n  .offset8 {\n    margin-left: 516px;\n  }\n  .offset7 {\n    margin-left: 454px;\n  }\n  .offset6 {\n    margin-left: 392px;\n  }\n  .offset5 {\n    margin-left: 330px;\n  }\n  .offset4 {\n    margin-left: 268px;\n  }\n  .offset3 {\n    margin-left: 206px;\n  }\n  .offset2 {\n    margin-left: 144px;\n  }\n  .offset1 {\n    margin-left: 82px;\n  }\n  .row-fluid {\n    width: 100%;\n    *zoom: 1;\n  }\n  .row-fluid:before,\n  .row-fluid:after {\n    display: table;\n    content: \"\";\n    line-height: 0;\n  }\n  .row-fluid:after {\n    clear: both;\n  }\n  .row-fluid [class*=\"span\"] {\n    display: block;\n    width: 100%;\n    min-height: 30px;\n    -webkit-box-sizing: border-box;\n    -moz-box-sizing: border-box;\n    box-sizing: border-box;\n    float: left;\n    margin-left: 2.7624309392265194%;\n    *margin-left: 2.709239449864817%;\n  }\n  .row-fluid [class*=\"span\"]:first-child {\n    margin-left: 0;\n  }\n  .row-fluid .span12 {\n    width: 100%;\n    *width: 99.94680851063829%;\n  }\n  .row-fluid .span11 {\n    width: 91.43646408839778%;\n    *width: 91.38327259903608%;\n  }\n  .row-fluid .span10 {\n    width: 82.87292817679558%;\n    *width: 82.81973668743387%;\n  }\n  .row-fluid .span9 {\n    width: 74.30939226519337%;\n    *width: 74.25620077583166%;\n  }\n  .row-fluid .span8 {\n    width: 65.74585635359117%;\n    *width: 65.69266486422946%;\n  }\n  .row-fluid .span7 {\n    width: 57.18232044198895%;\n    *width: 57.12912895262725%;\n  }\n  .row-fluid .span6 {\n    width: 48.61878453038674%;\n    *width: 48.56559304102504%;\n  }\n  .row-fluid .span5 {\n    width: 40.05524861878453%;\n    *width: 40.00205712942283%;\n  }\n  .row-fluid .span4 {\n    width: 31.491712707182323%;\n    *width: 31.43852121782062%;\n  }\n  .row-fluid .span3 {\n    width: 22.92817679558011%;\n    *width: 22.87498530621841%;\n  }\n  .row-fluid .span2 {\n    width: 14.3646408839779%;\n    *width: 14.311449394616199%;\n  }\n  .row-fluid .span1 {\n    width: 5.801104972375691%;\n    *width: 5.747913483013988%;\n  }\n  .row-fluid .offset12 {\n    margin-left: 105.52486187845304%;\n    *margin-left: 105.41847889972962%;\n  }\n  .row-fluid .offset12:first-child {\n    margin-left: 102.76243093922652%;\n    *margin-left: 102.6560479605031%;\n  }\n  .row-fluid .offset11 {\n    margin-left: 96.96132596685082%;\n    *margin-left: 96.8549429881274%;\n  }\n  .row-fluid .offset11:first-child {\n    margin-left: 94.1988950276243%;\n    *margin-left: 94.09251204890089%;\n  }\n  .row-fluid .offset10 {\n    margin-left: 88.39779005524862%;\n    *margin-left: 88.2914070765252%;\n  }\n  .row-fluid .offset10:first-child {\n    margin-left: 85.6353591160221%;\n    *margin-left: 85.52897613729868%;\n  }\n  .row-fluid .offset9 {\n    margin-left: 79.8342541436464%;\n    *margin-left: 79.72787116492299%;\n  }\n  .row-fluid .offset9:first-child {\n    margin-left: 77.07182320441989%;\n    *margin-left: 76.96544022569647%;\n  }\n  .row-fluid .offset8 {\n    margin-left: 71.2707182320442%;\n    *margin-left: 71.16433525332079%;\n  }\n  .row-fluid .offset8:first-child {\n    margin-left: 68.50828729281768%;\n    *margin-left: 68.40190431409427%;\n  }\n  .row-fluid .offset7 {\n    margin-left: 62.70718232044199%;\n    *margin-left: 62.600799341718584%;\n  }\n  .row-fluid .offset7:first-child {\n    margin-left: 59.94475138121547%;\n    *margin-left: 59.838368402492065%;\n  }\n  .row-fluid .offset6 {\n    margin-left: 54.14364640883978%;\n    *margin-left: 54.037263430116376%;\n  }\n  .row-fluid .offset6:first-child {\n    margin-left: 51.38121546961326%;\n    *margin-left: 51.27483249088986%;\n  }\n  .row-fluid .offset5 {\n    margin-left: 45.58011049723757%;\n    *margin-left: 45.47372751851417%;\n  }\n  .row-fluid .offset5:first-child {\n    margin-left: 42.81767955801105%;\n    *margin-left: 42.71129657928765%;\n  }\n  .row-fluid .offset4 {\n    margin-left: 37.01657458563536%;\n    *margin-left: 36.91019160691196%;\n  }\n  .row-fluid .offset4:first-child {\n    margin-left: 34.25414364640884%;\n    *margin-left: 34.14776066768544%;\n  }\n  .row-fluid .offset3 {\n    margin-left: 28.45303867403315%;\n    *margin-left: 28.346655695309746%;\n  }\n  .row-fluid .offset3:first-child {\n    margin-left: 25.69060773480663%;\n    *margin-left: 25.584224756083227%;\n  }\n  .row-fluid .offset2 {\n    margin-left: 19.88950276243094%;\n    *margin-left: 19.783119783707537%;\n  }\n  .row-fluid .offset2:first-child {\n    margin-left: 17.12707182320442%;\n    *margin-left: 17.02068884448102%;\n  }\n  .row-fluid .offset1 {\n    margin-left: 11.32596685082873%;\n    *margin-left: 11.219583872105325%;\n  }\n  .row-fluid .offset1:first-child {\n    margin-left: 8.56353591160221%;\n    *margin-left: 8.457152932878806%;\n  }\n  input,\n  textarea,\n  .uneditable-input {\n    margin-left: 0;\n  }\n  .controls-row [class*=\"span\"] + [class*=\"span\"] {\n    margin-left: 20px;\n  }\n  input.span12, textarea.span12, .uneditable-input.span12 {\n    width: 710px;\n  }\n  input.span11, textarea.span11, .uneditable-input.span11 {\n    width: 648px;\n  }\n  input.span10, textarea.span10, .uneditable-input.span10 {\n    width: 586px;\n  }\n  input.span9, textarea.span9, .uneditable-input.span9 {\n    width: 524px;\n  }\n  input.span8, textarea.span8, .uneditable-input.span8 {\n    width: 462px;\n  }\n  input.span7, textarea.span7, .uneditable-input.span7 {\n    width: 400px;\n  }\n  input.span6, textarea.span6, .uneditable-input.span6 {\n    width: 338px;\n  }\n  input.span5, textarea.span5, .uneditable-input.span5 {\n    width: 276px;\n  }\n  input.span4, textarea.span4, .uneditable-input.span4 {\n    width: 214px;\n  }\n  input.span3, textarea.span3, .uneditable-input.span3 {\n    width: 152px;\n  }\n  input.span2, textarea.span2, .uneditable-input.span2 {\n    width: 90px;\n  }\n  input.span1, textarea.span1, .uneditable-input.span1 {\n    width: 28px;\n  }\n}\n@media (min-width: 1200px) {\n  .row {\n    margin-left: -30px;\n    *zoom: 1;\n  }\n  .row:before,\n  .row:after {\n    display: table;\n    content: \"\";\n    line-height: 0;\n  }\n  .row:after {\n    clear: both;\n  }\n  [class*=\"span\"] {\n    float: left;\n    margin-left: 30px;\n  }\n  .container,\n  .navbar-static-top .container,\n  .navbar-fixed-top .container,\n  .navbar-fixed-bottom .container {\n    width: 1170px;\n  }\n  .span12 {\n    width: 1170px;\n  }\n  .span11 {\n    width: 1070px;\n  }\n  .span10 {\n    width: 970px;\n  }\n  .span9 {\n    width: 870px;\n  }\n  .span8 {\n    width: 770px;\n  }\n  .span7 {\n    width: 670px;\n  }\n  .span6 {\n    width: 570px;\n  }\n  .span5 {\n    width: 470px;\n  }\n  .span4 {\n    width: 370px;\n  }\n  .span3 {\n    width: 270px;\n  }\n  .span2 {\n    width: 170px;\n  }\n  .span1 {\n    width: 70px;\n  }\n  .offset12 {\n    margin-left: 1230px;\n  }\n  .offset11 {\n    margin-left: 1130px;\n  }\n  .offset10 {\n    margin-left: 1030px;\n  }\n  .offset9 {\n    margin-left: 930px;\n  }\n  .offset8 {\n    margin-left: 830px;\n  }\n  .offset7 {\n    margin-left: 730px;\n  }\n  .offset6 {\n    margin-left: 630px;\n  }\n  .offset5 {\n    margin-left: 530px;\n  }\n  .offset4 {\n    margin-left: 430px;\n  }\n  .offset3 {\n    margin-left: 330px;\n  }\n  .offset2 {\n    margin-left: 230px;\n  }\n  .offset1 {\n    margin-left: 130px;\n  }\n  .row-fluid {\n    width: 100%;\n    *zoom: 1;\n  }\n  .row-fluid:before,\n  .row-fluid:after {\n    display: table;\n    content: \"\";\n    line-height: 0;\n  }\n  .row-fluid:after {\n    clear: both;\n  }\n  .row-fluid [class*=\"span\"] {\n    display: block;\n    width: 100%;\n    min-height: 30px;\n    -webkit-box-sizing: border-box;\n    -moz-box-sizing: border-box;\n    box-sizing: border-box;\n    float: left;\n    margin-left: 2.564102564102564%;\n    *margin-left: 2.5109110747408616%;\n  }\n  .row-fluid [class*=\"span\"]:first-child {\n    margin-left: 0;\n  }\n  .row-fluid .span12 {\n    width: 100%;\n    *width: 99.94680851063829%;\n  }\n  .row-fluid .span11 {\n    width: 91.45299145299145%;\n    *width: 91.39979996362975%;\n  }\n  .row-fluid .span10 {\n    width: 82.90598290598291%;\n    *width: 82.8527914166212%;\n  }\n  .row-fluid .span9 {\n    width: 74.35897435897436%;\n    *width: 74.30578286961266%;\n  }\n  .row-fluid .span8 {\n    width: 65.81196581196582%;\n    *width: 65.75877432260411%;\n  }\n  .row-fluid .span7 {\n    width: 57.26495726495726%;\n    *width: 57.21176577559556%;\n  }\n  .row-fluid .span6 {\n    width: 48.717948717948715%;\n    *width: 48.664757228587014%;\n  }\n  .row-fluid .span5 {\n    width: 40.17094017094017%;\n    *width: 40.11774868157847%;\n  }\n  .row-fluid .span4 {\n    width: 31.623931623931625%;\n    *width: 31.570740134569924%;\n  }\n  .row-fluid .span3 {\n    width: 23.076923076923077%;\n    *width: 23.023731587561375%;\n  }\n  .row-fluid .span2 {\n    width: 14.52991452991453%;\n    *width: 14.476723040552828%;\n  }\n  .row-fluid .span1 {\n    width: 5.982905982905983%;\n    *width: 5.929714493544281%;\n  }\n  .row-fluid .offset12 {\n    margin-left: 105.12820512820512%;\n    *margin-left: 105.02182214948171%;\n  }\n  .row-fluid .offset12:first-child {\n    margin-left: 102.56410256410257%;\n    *margin-left: 102.45771958537915%;\n  }\n  .row-fluid .offset11 {\n    margin-left: 96.58119658119658%;\n    *margin-left: 96.47481360247316%;\n  }\n  .row-fluid .offset11:first-child {\n    margin-left: 94.01709401709402%;\n    *margin-left: 93.91071103837061%;\n  }\n  .row-fluid .offset10 {\n    margin-left: 88.03418803418803%;\n    *margin-left: 87.92780505546462%;\n  }\n  .row-fluid .offset10:first-child {\n    margin-left: 85.47008547008548%;\n    *margin-left: 85.36370249136206%;\n  }\n  .row-fluid .offset9 {\n    margin-left: 79.48717948717949%;\n    *margin-left: 79.38079650845607%;\n  }\n  .row-fluid .offset9:first-child {\n    margin-left: 76.92307692307693%;\n    *margin-left: 76.81669394435352%;\n  }\n  .row-fluid .offset8 {\n    margin-left: 70.94017094017094%;\n    *margin-left: 70.83378796144753%;\n  }\n  .row-fluid .offset8:first-child {\n    margin-left: 68.37606837606839%;\n    *margin-left: 68.26968539734497%;\n  }\n  .row-fluid .offset7 {\n    margin-left: 62.393162393162385%;\n    *margin-left: 62.28677941443899%;\n  }\n  .row-fluid .offset7:first-child {\n    margin-left: 59.82905982905982%;\n    *margin-left: 59.72267685033642%;\n  }\n  .row-fluid .offset6 {\n    margin-left: 53.84615384615384%;\n    *margin-left: 53.739770867430444%;\n  }\n  .row-fluid .offset6:first-child {\n    margin-left: 51.28205128205128%;\n    *margin-left: 51.175668303327875%;\n  }\n  .row-fluid .offset5 {\n    margin-left: 45.299145299145295%;\n    *margin-left: 45.1927623204219%;\n  }\n  .row-fluid .offset5:first-child {\n    margin-left: 42.73504273504273%;\n    *margin-left: 42.62865975631933%;\n  }\n  .row-fluid .offset4 {\n    margin-left: 36.75213675213675%;\n    *margin-left: 36.645753773413354%;\n  }\n  .row-fluid .offset4:first-child {\n    margin-left: 34.18803418803419%;\n    *margin-left: 34.081651209310785%;\n  }\n  .row-fluid .offset3 {\n    margin-left: 28.205128205128204%;\n    *margin-left: 28.0987452264048%;\n  }\n  .row-fluid .offset3:first-child {\n    margin-left: 25.641025641025642%;\n    *margin-left: 25.53464266230224%;\n  }\n  .row-fluid .offset2 {\n    margin-left: 19.65811965811966%;\n    *margin-left: 19.551736679396257%;\n  }\n  .row-fluid .offset2:first-child {\n    margin-left: 17.094017094017094%;\n    *margin-left: 16.98763411529369%;\n  }\n  .row-fluid .offset1 {\n    margin-left: 11.11111111111111%;\n    *margin-left: 11.004728132387708%;\n  }\n  .row-fluid .offset1:first-child {\n    margin-left: 8.547008547008547%;\n    *margin-left: 8.440625568285142%;\n  }\n  input,\n  textarea,\n  .uneditable-input {\n    margin-left: 0;\n  }\n  .controls-row [class*=\"span\"] + [class*=\"span\"] {\n    margin-left: 30px;\n  }\n  input.span12, textarea.span12, .uneditable-input.span12 {\n    width: 1156px;\n  }\n  input.span11, textarea.span11, .uneditable-input.span11 {\n    width: 1056px;\n  }\n  input.span10, textarea.span10, .uneditable-input.span10 {\n    width: 956px;\n  }\n  input.span9, textarea.span9, .uneditable-input.span9 {\n    width: 856px;\n  }\n  input.span8, textarea.span8, .uneditable-input.span8 {\n    width: 756px;\n  }\n  input.span7, textarea.span7, .uneditable-input.span7 {\n    width: 656px;\n  }\n  input.span6, textarea.span6, .uneditable-input.span6 {\n    width: 556px;\n  }\n  input.span5, textarea.span5, .uneditable-input.span5 {\n    width: 456px;\n  }\n  input.span4, textarea.span4, .uneditable-input.span4 {\n    width: 356px;\n  }\n  input.span3, textarea.span3, .uneditable-input.span3 {\n    width: 256px;\n  }\n  input.span2, textarea.span2, .uneditable-input.span2 {\n    width: 156px;\n  }\n  input.span1, textarea.span1, .uneditable-input.span1 {\n    width: 56px;\n  }\n  .thumbnails {\n    margin-left: -30px;\n  }\n  .thumbnails > li {\n    margin-left: 30px;\n  }\n  .row-fluid .thumbnails {\n    margin-left: 0;\n  }\n}\n@media (max-width: 979px) {\n  body {\n    padding-top: 0;\n  }\n  .navbar-fixed-top,\n  .navbar-fixed-bottom {\n    position: static;\n  }\n  .navbar-fixed-top {\n    margin-bottom: 20px;\n  }\n  .navbar-fixed-bottom {\n    margin-top: 20px;\n  }\n  .navbar-fixed-top .navbar-inner,\n  .navbar-fixed-bottom .navbar-inner {\n    padding: 5px;\n  }\n  .navbar .container {\n    width: auto;\n    padding: 0;\n  }\n  .navbar .brand {\n    padding-left: 10px;\n    padding-right: 10px;\n    margin: 0 0 0 -5px;\n  }\n  .nav-collapse {\n    clear: both;\n  }\n  .nav-collapse .nav {\n    float: none;\n    margin: 0 0 10px;\n  }\n  .nav-collapse .nav > li {\n    float: none;\n  }\n  .nav-collapse .nav > li > a {\n    margin-bottom: 2px;\n  }\n  .nav-collapse .nav > .divider-vertical {\n    display: none;\n  }\n  .nav-collapse .nav .nav-header {\n    color: #555555;\n    text-shadow: none;\n  }\n  .nav-collapse .nav > li > a,\n  .nav-collapse .dropdown-menu a {\n    padding: 9px 15px;\n    font-weight: bold;\n    color: #555555;\n    -webkit-border-radius: 3px;\n    -moz-border-radius: 3px;\n    border-radius: 3px;\n  }\n  .nav-collapse .btn {\n    padding: 4px 10px 4px;\n    font-weight: normal;\n    -webkit-border-radius: 4px;\n    -moz-border-radius: 4px;\n    border-radius: 4px;\n  }\n  .nav-collapse .dropdown-menu li + li a {\n    margin-bottom: 2px;\n  }\n  .nav-collapse .nav > li > a:hover,\n  .nav-collapse .dropdown-menu a:hover {\n    background-color: #f2f2f2;\n  }\n  .navbar-inverse .nav-collapse .nav > li > a:hover,\n  .navbar-inverse .nav-collapse .dropdown-menu a:hover {\n    background-color: #111111;\n  }\n  .nav-collapse.in .btn-group {\n    margin-top: 5px;\n    padding: 0;\n  }\n  .nav-collapse .dropdown-menu {\n    position: static;\n    top: auto;\n    left: auto;\n    float: none;\n    display: block;\n    max-width: none;\n    margin: 0 15px;\n    padding: 0;\n    background-color: transparent;\n    border: none;\n    -webkit-border-radius: 0;\n    -moz-border-radius: 0;\n    border-radius: 0;\n    -webkit-box-shadow: none;\n    -moz-box-shadow: none;\n    box-shadow: none;\n  }\n  .nav-collapse .dropdown-menu:before,\n  .nav-collapse .dropdown-menu:after {\n    display: none;\n  }\n  .nav-collapse .dropdown-menu .divider {\n    display: none;\n  }\n  .nav-collapse .navbar-form,\n  .nav-collapse .navbar-search {\n    float: none;\n    padding: 10px 15px;\n    margin: 10px 0;\n    border-top: 1px solid #f2f2f2;\n    border-bottom: 1px solid #f2f2f2;\n    -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);\n    -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);\n    box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);\n  }\n  .navbar .nav-collapse .nav.pull-right {\n    float: none;\n    margin-left: 0;\n  }\n  .nav-collapse,\n  .nav-collapse.collapse {\n    overflow: hidden;\n    height: 0;\n  }\n  .navbar .btn-navbar {\n    display: block;\n  }\n  .navbar-static .navbar-inner {\n    padding-left: 10px;\n    padding-right: 10px;\n  }\n}\n@media (min-width: 980px) {\n  .nav-collapse.collapse {\n    height: auto !important;\n    overflow: visible !important;\n  }\n}\n"
  },
  {
    "path": "assets/vendor/bootstrap/js/bootstrap.js",
    "content": "define([ 'jquery' ], function($) {\n\n/* ============================================================\n * bootstrap-dropdown.js v2.1.0\n * http://twitter.github.com/bootstrap/javascript.html#dropdowns\n * ============================================================\n * Copyright 2012 Twitter, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * ============================================================ */\n\n\n\n  \"use strict\"; // jshint ;_;\n\n\n /* DROPDOWN CLASS DEFINITION\n  * ========================= */\n\n  var toggle = '[data-toggle=dropdown]'\n    , Dropdown = function (element) {\n        var $el = $(element).on('click.dropdown.data-api', this.toggle)\n        $('html').on('click.dropdown.data-api', function () {\n          $el.parent().removeClass('open')\n        })\n      }\n\n  Dropdown.prototype = {\n\n    constructor: Dropdown\n\n  , toggle: function (e) {\n      var $this = $(this)\n        , $parent\n        , isActive\n\n      if ($this.is('.disabled, :disabled')) return\n\n      $parent = getParent($this)\n\n      isActive = $parent.hasClass('open')\n\n      clearMenus()\n\n      if (!isActive) {\n        $parent.toggleClass('open')\n        $this.focus()\n      }\n\n      return false\n    }\n\n  , keydown: function (e) {\n      var $this\n        , $items\n        , $active\n        , $parent\n        , isActive\n        , index\n\n      if (!/(38|40|27)/.test(e.keyCode)) return\n\n      $this = $(this)\n\n      e.preventDefault()\n      e.stopPropagation()\n\n      if ($this.is('.disabled, :disabled')) return\n\n      $parent = getParent($this)\n\n      isActive = $parent.hasClass('open')\n\n      if (!isActive || (isActive && e.keyCode == 27)) return $this.click()\n\n      $items = $('[role=menu] li:not(.divider) a', $parent)\n\n      if (!$items.length) return\n\n      index = $items.index($items.filter(':focus'))\n\n      if (e.keyCode == 38 && index > 0) index--                                        // up\n      if (e.keyCode == 40 && index < $items.length - 1) index++                        // down\n      if (!~index) index = 0\n\n      $items\n        .eq(index)\n        .focus()\n    }\n\n  }\n\n  function clearMenus() {\n    getParent($(toggle))\n      .removeClass('open')\n  }\n\n  function getParent($this) {\n    var selector = $this.attr('data-target')\n      , $parent\n\n    if (!selector) {\n      selector = $this.attr('href')\n      selector = selector && selector.replace(/.*(?=#[^\\s]*$)/, '') //strip for ie7\n    }\n\n    $parent = $(selector)\n    $parent.length || ($parent = $this.parent())\n\n    return $parent\n  }\n\n\n  /* DROPDOWN PLUGIN DEFINITION\n   * ========================== */\n\n  $.fn.dropdown = function (option) {\n    return this.each(function () {\n      var $this = $(this)\n        , data = $this.data('dropdown')\n      if (!data) $this.data('dropdown', (data = new Dropdown(this)))\n      if (typeof option == 'string') data[option].call($this)\n    })\n  }\n\n  $.fn.dropdown.Constructor = Dropdown\n\n\n  /* APPLY TO STANDARD DROPDOWN ELEMENTS\n   * =================================== */\n\n  $(function () {\n    $('html')\n      .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)\n    $('body')\n      .on('click.dropdown touchstart.dropdown.data-api', '.dropdown', function (e) { e.stopPropagation() })\n      .on('click.dropdown.data-api touchstart.dropdown.data-api'  , toggle, Dropdown.prototype.toggle)\n      .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)\n  })\n\n\n});"
  },
  {
    "path": "assets/vendor/codemirror.js",
    "content": "define([\n  './CodeMirror-2.25/mode/javascript/javascript',\n  './CodeMirror-2.25/mode/xml/xml'\n], function() {\n  return CodeMirror;\n});"
  },
  {
    "path": "assets/vendor/jquery.js",
    "content": "/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */\n!function(a,b){\"object\"==typeof module&&\"object\"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error(\"jQuery requires a window with a document\");return b(a)}:b(a)}(\"undefined\"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=\"1.11.1\",m=function(a,b){return new m.fn.init(a,b)},n=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,o=/^-ms-/,p=/-([\\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:\"\",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for(\"boolean\"==typeof g&&(j=g,g=arguments[h]||{},h++),\"object\"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:\"jQuery\"+(l+Math.random()).replace(/\\D/g,\"\"),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return\"function\"===m.type(a)},isArray:Array.isArray||function(a){return\"array\"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||\"object\"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,\"constructor\")&&!j.call(a.constructor.prototype,\"isPrototypeOf\"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+\"\":\"object\"==typeof a||\"function\"==typeof a?h[i.call(a)]||\"object\":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,\"ms-\").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?\"\":(a+\"\").replace(n,\"\")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,\"string\"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return\"string\"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"),function(a,b){h[\"[object \"+b+\"]\"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return\"function\"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:\"array\"===c||0===b||\"number\"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u=\"sizzle\"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C=\"undefined\",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L=\"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",M=\"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",N=\"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",O=N.replace(\"w\",\"w#\"),P=\"\\\\[\"+M+\"*(\"+N+\")(?:\"+M+\"*([*^$|!~]?=)\"+M+\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\"+O+\"))|)\"+M+\"*\\\\]\",Q=\":(\"+N+\")(?:\\\\((('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\"+P+\")*)|.*)\\\\)|)\",R=new RegExp(\"^\"+M+\"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\"+M+\"+$\",\"g\"),S=new RegExp(\"^\"+M+\"*,\"+M+\"*\"),T=new RegExp(\"^\"+M+\"*([>+~]|\"+M+\")\"+M+\"*\"),U=new RegExp(\"=\"+M+\"*([^\\\\]'\\\"]*?)\"+M+\"*\\\\]\",\"g\"),V=new RegExp(Q),W=new RegExp(\"^\"+O+\"$\"),X={ID:new RegExp(\"^#(\"+N+\")\"),CLASS:new RegExp(\"^\\\\.(\"+N+\")\"),TAG:new RegExp(\"^(\"+N.replace(\"w\",\"w*\")+\")\"),ATTR:new RegExp(\"^\"+P),PSEUDO:new RegExp(\"^\"+Q),CHILD:new RegExp(\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\"+M+\"*(even|odd|(([+-]|)(\\\\d*)n|)\"+M+\"*(?:([+-]|)\"+M+\"*(\\\\d+)|))\"+M+\"*\\\\)|)\",\"i\"),bool:new RegExp(\"^(?:\"+L+\")$\",\"i\"),needsContext:new RegExp(\"^\"+M+\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\"+M+\"*((?:-\\\\d)?\\\\d*)\"+M+\"*\\\\)|)(?=[^-]|$)\",\"i\")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\\d$/i,$=/^[^{]+\\{\\s*\\[native \\w/,_=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,ab=/[+~]/,bb=/'|\\\\/g,cb=new RegExp(\"\\\\\\\\([\\\\da-f]{1,6}\"+M+\"?|(\"+M+\")|.)\",\"ig\"),db=function(a,b,c){var d=\"0x\"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||\"string\"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&\"object\"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute(\"id\"))?s=r.replace(bb,\"\\\\$&\"):b.setAttribute(\"id\",s),s=\"[id='\"+s+\"'] \",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(\",\")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute(\"id\")}}}return i(a.replace(R,\"$1\"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+\" \")>d.cacheLength&&delete b[a.shift()],b[c+\" \"]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement(\"div\");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split(\"|\"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return\"input\"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return(\"input\"===c||\"button\"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?\"HTML\"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener(\"unload\",function(){m()},!1):g.attachEvent&&g.attachEvent(\"onunload\",function(){m()})),c.attributes=ib(function(a){return a.className=\"i\",!a.getAttribute(\"className\")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment(\"\")),!a.getElementsByTagName(\"*\").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML=\"<div class='a'></div><div class='a i'></div>\",a.firstChild.className=\"i\",2===a.getElementsByClassName(\"i\").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute(\"id\")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode(\"id\");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if(\"*\"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML=\"<select msallowclip=''><option selected=''></option></select>\",a.querySelectorAll(\"[msallowclip^='']\").length&&q.push(\"[*^$]=\"+M+\"*(?:''|\\\"\\\")\"),a.querySelectorAll(\"[selected]\").length||q.push(\"\\\\[\"+M+\"*(?:value|\"+L+\")\"),a.querySelectorAll(\":checked\").length||q.push(\":checked\")}),ib(function(a){var b=e.createElement(\"input\");b.setAttribute(\"type\",\"hidden\"),a.appendChild(b).setAttribute(\"name\",\"D\"),a.querySelectorAll(\"[name=d]\").length&&q.push(\"name\"+M+\"*[*^$|!~]?=\"),a.querySelectorAll(\":enabled\").length||q.push(\":enabled\",\":disabled\"),a.querySelectorAll(\"*,:x\"),q.push(\",.*:\")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,\"div\"),s.call(a,\"[s!='']:x\"),r.push(\"!=\",Q)}),q=q.length&&new RegExp(q.join(\"|\")),r=r.length&&new RegExp(r.join(\"|\")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,\"='$1']\"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error(\"Syntax error, unrecognized expression: \"+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c=\"\",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if(\"string\"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{\">\":{dir:\"parentNode\",first:!0},\" \":{dir:\"parentNode\"},\"+\":{dir:\"previousSibling\",first:!0},\"~\":{dir:\"previousSibling\"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||\"\").replace(cb,db),\"~=\"===a[2]&&(a[3]=\" \"+a[3]+\" \"),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),\"nth\"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*(\"even\"===a[3]||\"odd\"===a[3])),a[5]=+(a[7]+a[8]||\"odd\"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||\"\":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(\")\",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return\"*\"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+\" \"];return b||(b=new RegExp(\"(^|\"+M+\")\"+a+\"(\"+M+\"|$)\"))&&y(a,function(a){return b.test(\"string\"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute(\"class\")||\"\")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?\"!=\"===b:b?(e+=\"\",\"=\"===b?e===c:\"!=\"===b?e!==c:\"^=\"===b?c&&0===e.indexOf(c):\"*=\"===b?c&&e.indexOf(c)>-1:\"$=\"===b?c&&e.slice(-c.length)===c:\"~=\"===b?(\" \"+e+\" \").indexOf(c)>-1:\"|=\"===b?e===c||e.slice(0,c.length+1)===c+\"-\":!1):!0}},CHILD:function(a,b,c,d,e){var f=\"nth\"!==a.slice(0,3),g=\"last\"!==a.slice(-4),h=\"of-type\"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?\"nextSibling\":\"previousSibling\",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p=\"only\"===a&&!o&&\"nextSibling\"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error(\"unsupported pseudo: \"+a);return e[u]?e(b):e.length>1?(c=[a,a,\"\",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,\"$1\"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||\"\")||fb.error(\"unsupported lang: \"+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute(\"xml:lang\")||b.getAttribute(\"lang\"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+\"-\");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return\"input\"===b&&!!a.checked||\"option\"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return\"input\"===b&&\"button\"===a.type||\"button\"===b},text:function(a){var b;return\"input\"===a.nodeName.toLowerCase()&&\"text\"===a.type&&(null==(b=a.getAttribute(\"type\"))||\"text\"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+\" \"];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R,\" \")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d=\"\";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&\"parentNode\"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||\"*\",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[\" \"],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:\" \"===a[i-2].type?\"*\":\"\"})).replace(R,\"$1\"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q=\"0\",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG(\"*\",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+\" \"];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n=\"function\"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&\"ID\"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split(\"\").sort(B).join(\"\")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement(\"div\"))}),ib(function(a){return a.innerHTML=\"<a href='#'></a>\",\"#\"===a.firstChild.getAttribute(\"href\")})||jb(\"type|href|height|width\",function(a,b,c){return c?void 0:a.getAttribute(b,\"type\"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML=\"<input/>\",a.firstChild.setAttribute(\"value\",\"\"),\"\"===a.firstChild.getAttribute(\"value\")})||jb(\"value\",function(a,b,c){return c||\"input\"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute(\"disabled\")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[\":\"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,v=/^.[^:#\\[\\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if(\"string\"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=\":not(\"+a+\")\"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if(\"string\"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+\" \"+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,\"string\"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if(\"string\"==typeof a){if(c=\"<\"===a.charAt(0)&&\">\"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?\"undefined\"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||\"string\"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?\"string\"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,\"parentNode\")},parentsUntil:function(a,b,c){return m.dir(a,\"parentNode\",c)},next:function(a){return D(a,\"nextSibling\")},prev:function(a){return D(a,\"previousSibling\")},nextAll:function(a){return m.dir(a,\"nextSibling\")},prevAll:function(a){return m.dir(a,\"previousSibling\")},nextUntil:function(a,b,c){return m.dir(a,\"nextSibling\",c)},prevUntil:function(a,b,c){return m.dir(a,\"previousSibling\",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,\"iframe\")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return\"Until\"!==a.slice(-5)&&(d=c),d&&\"string\"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a=\"string\"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);\"function\"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&\"string\"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[[\"resolve\",\"done\",m.Callbacks(\"once memory\"),\"resolved\"],[\"reject\",\"fail\",m.Callbacks(\"once memory\"),\"rejected\"],[\"notify\",\"progress\",m.Callbacks(\"memory\")]],c=\"pending\",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+\"With\"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+\"With\"](this===e?d:this,arguments),this},e[f[0]+\"With\"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler(\"ready\"),m(y).off(\"ready\")))}}});function I(){y.addEventListener?(y.removeEventListener(\"DOMContentLoaded\",J,!1),a.removeEventListener(\"load\",J,!1)):(y.detachEvent(\"onreadystatechange\",J),a.detachEvent(\"onload\",J))}function J(){(y.addEventListener||\"load\"===event.type||\"complete\"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),\"complete\"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener(\"DOMContentLoaded\",J,!1),a.addEventListener(\"load\",J,!1);else{y.attachEvent(\"onreadystatechange\",J),a.attachEvent(\"onload\",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll(\"left\")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K=\"undefined\",L;for(L in m(k))break;k.ownLast=\"0\"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName(\"body\")[0],c&&c.style&&(b=y.createElement(\"div\"),d=y.createElement(\"div\"),d.style.cssText=\"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText=\"display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1\",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement(\"div\");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+\" \").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute(\"classid\")===b};var M=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d=\"data-\"+b.replace(N,\"-$1\").toLowerCase();if(c=a.getAttribute(d),\"string\"==typeof c){try{c=\"true\"===c?!0:\"false\"===c?!1:\"null\"===c?null:+c+\"\"===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if((\"data\"!==b||!m.isEmptyObject(a[b]))&&\"toJSON\"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;\nif(k&&j[k]&&(e||j[k].data)||void 0!==d||\"string\"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),(\"object\"==typeof b||\"function\"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),\"string\"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(\" \")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{\"applet \":!0,\"embed \":!0,\"object \":\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,\"parsedAttrs\"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf(\"data-\")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,\"parsedAttrs\",!0)}return e}return\"object\"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||\"fx\")+\"queue\",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||\"fx\";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};\"inprogress\"===e&&(e=c.shift(),d--),e&&(\"fx\"===b&&c.unshift(\"inprogress\"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+\"queueHooks\";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks(\"once memory\").add(function(){m._removeData(a,b+\"queue\"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return\"string\"!=typeof a&&(b=a,a=\"fx\",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),\"fx\"===a&&\"inprogress\"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||\"fx\",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};\"string\"!=typeof a&&(b=a,a=void 0),a=a||\"fx\";while(g--)c=m._data(f[g],a+\"queueHooks\"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,T=[\"Top\",\"Right\",\"Bottom\",\"Left\"],U=function(a,b){return a=b||a,\"none\"===m.css(a,\"display\")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if(\"object\"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement(\"input\"),b=y.createElement(\"div\"),c=y.createDocumentFragment();if(b.innerHTML=\"  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>\",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName(\"tbody\").length,k.htmlSerialize=!!b.getElementsByTagName(\"link\").length,k.html5Clone=\"<:nav></:nav>\"!==y.createElement(\"nav\").cloneNode(!0).outerHTML,a.type=\"checkbox\",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML=\"<textarea>x</textarea>\",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML=\"<input type='radio' checked='checked' name='t'/>\",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent(\"onclick\",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement(\"div\");for(b in{submit:!0,change:!0,focusin:!0})c=\"on\"+b,(k[b+\"Bubbles\"]=c in a)||(d.setAttribute(c,\"t\"),k[b+\"Bubbles\"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||\"\").match(E)||[\"\"],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||\"\").split(\".\").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(\".\")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent(\"on\"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||\"\").match(E)||[\"\"],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||\"\").split(\".\").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp(\"(^|\\\\.)\"+p.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&(\"**\"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,\"events\"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,\"type\")?b.type:b,q=j.call(b,\"namespace\")?b.namespace.split(\".\"):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(\".\")>=0&&(q=p.split(\".\"),p=q.shift(),q.sort()),g=p.indexOf(\":\")<0&&\"on\"+p,b=b[m.expando]?b:new m.Event(p,\"object\"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join(\".\"),b.namespace_re=b.namespace?new RegExp(\"(^|\\\\.)\"+q.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,\"events\")||{})[b.type]&&m._data(h,\"handle\"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,\"events\")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||\"click\"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||\"click\"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+\" \",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:\"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which\".split(\" \"),fixHooks:{},keyHooks:{props:\"char charCode key keyCode\".split(\" \"),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:\"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement\".split(\" \"),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:\"focusin\"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:\"focusout\"},click:{trigger:function(){return m.nodeName(this,\"input\")&&\"checkbox\"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,\"a\")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d=\"on\"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:\"mouseover\",mouseleave:\"mouseout\",pointerenter:\"pointerover\",pointerleave:\"pointerout\"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,\"form\")?!1:void m.event.add(this,\"click._submit keypress._submit\",function(a){var b=a.target,c=m.nodeName(b,\"input\")||m.nodeName(b,\"button\")?b.form:void 0;c&&!m._data(c,\"submitBubbles\")&&(m.event.add(c,\"submit._submit\",function(a){a._submit_bubble=!0}),m._data(c,\"submitBubbles\",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate(\"submit\",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,\"form\")?!1:void m.event.remove(this,\"._submit\")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?((\"checkbox\"===this.type||\"radio\"===this.type)&&(m.event.add(this,\"propertychange._change\",function(a){\"checked\"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,\"click._change\",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate(\"change\",this,a,!0)})),!1):void m.event.add(this,\"beforeactivate._change\",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,\"changeBubbles\")&&(m.event.add(b,\"change._change\",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate(\"change\",this.parentNode,a,!0)}),m._data(b,\"changeBubbles\",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||\"radio\"!==b.type&&\"checkbox\"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,\"._change\"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:\"focusin\",blur:\"focusout\"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if(\"object\"==typeof a){\"string\"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&(\"string\"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+\".\"+d.namespace:d.origType,d.selector,d.handler),this;if(\"object\"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||\"function\"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split(\"|\"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb=\"abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video\",fb=/ jQuery\\d+=\"(?:null|\\d+)\"/g,gb=new RegExp(\"<(?:\"+eb+\")[\\\\s/>]\",\"i\"),hb=/^\\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,jb=/<([\\w:]+)/,kb=/<tbody/i,lb=/<|&#?\\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\\s*(?:[^=]|=\\s*.checked.)/i,ob=/^$|\\/(?:java|ecma)script/i,pb=/^true\\/(.*)/,qb=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,rb={option:[1,\"<select multiple='multiple'>\",\"</select>\"],legend:[1,\"<fieldset>\",\"</fieldset>\"],area:[1,\"<map>\",\"</map>\"],param:[1,\"<object>\",\"</object>\"],thead:[1,\"<table>\",\"</table>\"],tr:[2,\"<table><tbody>\",\"</tbody></table>\"],col:[2,\"<table><tbody></tbody><colgroup>\",\"</colgroup></table>\"],td:[3,\"<table><tbody><tr>\",\"</tr></tbody></table>\"],_default:k.htmlSerialize?[0,\"\",\"\"]:[1,\"X<div>\",\"</div>\"]},sb=db(y),tb=sb.appendChild(y.createElement(\"div\"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||\"*\"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||\"*\"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,\"table\")&&m.nodeName(11!==b.nodeType?b:b.firstChild,\"tr\")?a.getElementsByTagName(\"tbody\")[0]||a.appendChild(a.ownerDocument.createElement(\"tbody\")):a}function xb(a){return a.type=(null!==m.find.attr(a,\"type\"))+\"/\"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute(\"type\"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,\"globalEval\",!b||m._data(b[d],\"globalEval\"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}\"script\"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):\"object\"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):\"input\"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):\"option\"===c?b.defaultSelected=b.selected=a.defaultSelected:(\"input\"===c||\"textarea\"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test(\"<\"+a.nodeName+\">\")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,\"script\"),d.length>0&&zb(d,!i&&ub(a,\"script\")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if(\"object\"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement(\"div\")),i=(jb.exec(f)||[\"\",\"\"])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,\"<$1></$2>\")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f=\"table\"!==i||kb.test(f)?\"<table>\"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],\"tbody\")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent=\"\";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,\"input\"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),\"script\"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||\"\")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,\"script\")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,\"select\")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,\"\"):void 0;if(!(\"string\"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||[\"\",\"\"])[1].toLowerCase()])){a=a.replace(ib,\"<$1></$2>\");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&\"string\"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,\"script\"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,\"script\"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||\"\")&&!m._data(d,\"globalEval\")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||\"\").replace(qb,\"\")));i=c=null}return this}}),m.each({appendTo:\"append\",prependTo:\"prepend\",insertBefore:\"before\",insertAfter:\"after\",replaceAll:\"replaceWith\"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],\"display\");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),\"none\"!==c&&c||(Cb=(Cb||m(\"<iframe frameborder='0' width='0' height='0'/>\")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName(\"body\")[0],c&&c.style?(b=y.createElement(\"div\"),d=y.createElement(\"div\"),d.style.cssText=\"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText=\"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1\",b.appendChild(y.createElement(\"div\")).style.width=\"5px\",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp(\"^(\"+S+\")(?!px)[a-z%]+$\",\"i\"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(\"\"!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+\"\"}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left=\"fontSize\"===b?\"1em\":g,g=h.pixelLeft+\"px\",h.left=d,f&&(e.left=f)),void 0===g?g:g+\"\"||\"auto\"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement(\"div\"),b.innerHTML=\"  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>\",d=b.getElementsByTagName(\"a\")[0],c=d&&d.style){c.cssText=\"float:left;opacity:.5\",k.opacity=\"0.5\"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip=\"content-box\",b.cloneNode(!0).style.backgroundClip=\"\",k.clearCloneStyle=\"content-box\"===b.style.backgroundClip,k.boxSizing=\"\"===c.boxSizing||\"\"===c.MozBoxSizing||\"\"===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName(\"body\")[0],c&&c.style&&(b=y.createElement(\"div\"),d=y.createElement(\"div\"),d.style.cssText=\"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\",c.appendChild(d).appendChild(b),b.style.cssText=\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute\",e=f=!1,h=!0,a.getComputedStyle&&(e=\"1%\"!==(a.getComputedStyle(b,null)||{}).top,f=\"4px\"===(a.getComputedStyle(b,null)||{width:\"4px\"}).width,i=b.appendChild(y.createElement(\"div\")),i.style.cssText=b.style.cssText=\"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0\",i.style.marginRight=i.style.width=\"0\",b.style.width=\"1px\",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML=\"<table><tr><td></td><td>t</td></tr></table>\",i=b.getElementsByTagName(\"td\"),i[0].style.cssText=\"margin:0;border:0;padding:0;display:none\",g=0===i[0].offsetHeight,g&&(i[0].style.display=\"\",i[1].style.display=\"none\",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\\([^)]*\\)/i,Nb=/opacity\\s*=\\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp(\"^(\"+S+\")(.*)$\",\"i\"),Qb=new RegExp(\"^([+-])=(\"+S+\")\",\"i\"),Rb={position:\"absolute\",visibility:\"hidden\",display:\"block\"},Sb={letterSpacing:\"0\",fontWeight:\"400\"},Tb=[\"Webkit\",\"O\",\"Moz\",\"ms\"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,\"olddisplay\"),c=d.style.display,b?(f[g]||\"none\"!==c||(d.style.display=\"\"),\"\"===d.style.display&&U(d)&&(f[g]=m._data(d,\"olddisplay\",Fb(d.nodeName)))):(e=U(d),(c&&\"none\"!==c||!e)&&m._data(d,\"olddisplay\",e?c:m.css(d,\"display\"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&\"none\"!==d.style.display&&\"\"!==d.style.display||(d.style.display=b?f[g]||\"\":\"none\"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||\"px\"):b}function Xb(a,b,c,d,e){for(var f=c===(d?\"border\":\"content\")?4:\"width\"===b?1:0,g=0;4>f;f+=2)\"margin\"===c&&(g+=m.css(a,c+T[f],!0,e)),d?(\"content\"===c&&(g-=m.css(a,\"padding\"+T[f],!0,e)),\"margin\"!==c&&(g-=m.css(a,\"border\"+T[f]+\"Width\",!0,e))):(g+=m.css(a,\"padding\"+T[f],!0,e),\"padding\"!==c&&(g+=m.css(a,\"border\"+T[f]+\"Width\",!0,e)));return g}function Yb(a,b,c){var d=!0,e=\"width\"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&\"border-box\"===m.css(a,\"boxSizing\",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?\"border\":\"content\"),d,f)+\"px\"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,\"opacity\");return\"\"===c?\"1\":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{\"float\":k.cssFloat?\"cssFloat\":\"styleFloat\"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&\"get\"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,\"string\"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f=\"number\"),null!=c&&c===c&&(\"number\"!==f||m.cssNumber[h]||(c+=\"px\"),k.clearCloneStyle||\"\"!==c||0!==b.indexOf(\"background\")||(i[b]=\"inherit\"),!(g&&\"set\"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&\"get\"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),\"normal\"===f&&b in Sb&&(f=Sb[b]),\"\"===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each([\"height\",\"width\"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,\"display\"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&\"border-box\"===m.css(a,\"boxSizing\",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||\"\")?.01*parseFloat(RegExp.$1)+\"\":b?\"1\":\"\"},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?\"alpha(opacity=\"+100*b+\")\":\"\",f=d&&d.filter||c.filter||\"\";c.zoom=1,(b>=1||\"\"===b)&&\"\"===m.trim(f.replace(Mb,\"\"))&&c.removeAttribute&&(c.removeAttribute(\"filter\"),\"\"===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+\" \"+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:\"inline-block\"},Jb,[a,\"marginRight\"]):void 0}),m.each({margin:\"\",padding:\"\",border:\"Width\"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f=\"string\"==typeof c?c.split(\" \"):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return\"boolean\"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||\"swing\",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?\"\":\"px\")\n},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,\"\"),b&&\"auto\"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp(\"^(?:([+-])=|)(\"+S+\")([a-z%]*)$\",\"i\"),cc=/queueHooks$/,dc=[ic],ec={\"*\":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?\"\":\"px\"),g=(m.cssNumber[a]||\"px\"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||\".5\",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d[\"margin\"+c]=d[\"padding\"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec[\"*\"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,\"fxshow\");c.queue||(h=m._queueHooks(a,\"fx\"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,\"fx\").length||h.empty.fire()})})),1===a.nodeType&&(\"height\"in b||\"width\"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,\"display\"),l=\"none\"===j?m._data(a,\"olddisplay\")||Fb(a.nodeName):j,\"inline\"===l&&\"none\"===m.css(a,\"float\")&&(k.inlineBlockNeedsLayout&&\"inline\"!==Fb(a.nodeName)?p.zoom=1:p.display=\"inline-block\")),c.overflow&&(p.overflow=\"hidden\",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||\"toggle\"===e,e===(q?\"hide\":\"show\")){if(\"show\"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))\"inline\"===(\"none\"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?\"hidden\"in r&&(q=r.hidden):r=m._data(a,\"fxshow\",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,\"fxshow\");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start=\"width\"===d||\"height\"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&\"expand\"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=[\"*\"]):a=a.split(\" \");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&\"object\"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:\"number\"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue=\"fx\"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css(\"opacity\",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,\"finish\"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return\"string\"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||\"fx\",[]),this.each(function(){var b=!0,e=null!=a&&a+\"queueHooks\",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||\"fx\"),this.each(function(){var b,c=m._data(this),d=c[a+\"queue\"],e=c[a+\"queueHooks\"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each([\"toggle\",\"show\",\"hide\"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||\"boolean\"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc(\"show\"),slideUp:gc(\"hide\"),slideToggle:gc(\"toggle\"),fadeIn:{opacity:\"show\"},fadeOut:{opacity:\"hide\"},fadeToggle:{opacity:\"toggle\"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||\"fx\",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement(\"div\"),b.setAttribute(\"className\",\"t\"),b.innerHTML=\"  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>\",d=b.getElementsByTagName(\"a\")[0],c=y.createElement(\"select\"),e=c.appendChild(y.createElement(\"option\")),a=b.getElementsByTagName(\"input\")[0],d.style.cssText=\"top:1px\",k.getSetAttribute=\"t\"!==b.className,k.style=/top/.test(d.getAttribute(\"style\")),k.hrefNormalized=\"/a\"===d.getAttribute(\"href\"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement(\"form\").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement(\"input\"),a.setAttribute(\"value\",\"\"),k.input=\"\"===a.getAttribute(\"value\"),a.value=\"t\",a.setAttribute(\"type\",\"radio\"),k.radioValue=\"t\"===a.value}();var lc=/\\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e=\"\":\"number\"==typeof e?e+=\"\":m.isArray(e)&&(e=m.map(e,function(a){return null==a?\"\":a+\"\"})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&\"set\"in b&&void 0!==b.set(this,e,\"value\")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&\"get\"in b&&void 0!==(c=b.get(e,\"value\"))?c:(c=e.value,\"string\"==typeof c?c.replace(lc,\"\"):null==c?\"\":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,\"value\");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f=\"select-one\"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute(\"disabled\"))||c.parentNode.disabled&&m.nodeName(c.parentNode,\"optgroup\"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each([\"radio\",\"checkbox\"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute(\"value\")?\"on\":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&\"get\"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&\"set\"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+\"\"),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase(\"default-\"+c)]=a[d]=!1:m.attr(a,c,\"\"),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&\"radio\"===b&&m.nodeName(a,\"input\")){var c=a.value;return a.setAttribute(\"type\",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase(\"default-\"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase(\"default-\"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,\"input\")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+=\"\",\"value\"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&\"\"!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,\"\"===b?!1:b,c)}},m.each([\"width\",\"height\"],function(a,b){m.attrHooks[b]={set:function(a,c){return\"\"===c?(a.setAttribute(b,\"auto\"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+\"\"}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{\"for\":\"htmlFor\",\"class\":\"className\"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&\"set\"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&\"get\"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,\"tabindex\");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each([\"href\",\"src\"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each([\"tabIndex\",\"readOnly\",\"maxLength\",\"cellSpacing\",\"cellPadding\",\"rowSpan\",\"colSpan\",\"useMap\",\"frameBorder\",\"contentEditable\"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype=\"encoding\");var uc=/[\\t\\r\\n\\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=\"string\"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||\"\").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(\" \"+c.className+\" \").replace(uc,\" \"):\" \")){f=0;while(e=b[f++])d.indexOf(\" \"+e+\" \")<0&&(d+=e+\" \");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||\"string\"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||\"\").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(\" \"+c.className+\" \").replace(uc,\" \"):\"\")){f=0;while(e=b[f++])while(d.indexOf(\" \"+e+\" \")>=0)d=d.replace(\" \"+e+\" \",\" \");g=a?m.trim(d):\"\",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return\"boolean\"==typeof b&&\"string\"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if(\"string\"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||\"boolean\"===c)&&(this.className&&m._data(this,\"__className__\",this.className),this.className=this.className||a===!1?\"\":m._data(this,\"__className__\")||\"\")})},hasClass:function(a){for(var b=\" \"+a+\" \",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(\" \"+this[c].className+\" \").replace(uc,\" \").indexOf(b)>=0)return!0;return!1}}),m.each(\"blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu\".split(\" \"),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,\"**\"):this.off(b,a||\"**\",c)}});var vc=m.now(),wc=/\\?/,xc=/(,)|(\\[|{)|(}|])|\"(?:[^\"\\\\\\r\\n]|\\\\[\"\\\\\\/bfnrt]|\\\\u[\\da-fA-F]{4})*\"\\s*:?|true|false|null|-?(?!0\\d)\\d+(?:\\.\\d+|)(?:[eE][+-]?\\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+\"\");var c,d=null,e=m.trim(b+\"\");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,\"\")}))?Function(\"return \"+e)():m.error(\"Invalid JSON: \"+b)},m.parseXML=function(b){var c,d;if(!b||\"string\"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,\"text/xml\")):(c=new ActiveXObject(\"Microsoft.XMLDOM\"),c.async=\"false\",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName(\"parsererror\").length||m.error(\"Invalid XML: \"+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \\t]*([^\\r\\n]*)\\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\\/\\//,Gc=/^([\\w.+-]+:)(?:\\/\\/(?:[^\\/?#]*@|)([^\\/?#:]*)(?::(\\d+)|)|)/,Hc={},Ic={},Jc=\"*/\".concat(\"*\");try{zc=location.href}catch(Kc){zc=y.createElement(\"a\"),zc.href=\"\",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){\"string\"!=typeof b&&(c=b,b=\"*\");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])\"+\"===d.charAt(0)?(d=d.slice(1)||\"*\",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return\"string\"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e[\"*\"]&&g(\"*\")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while(\"*\"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader(\"Content-Type\"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+\" \"+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if(\"*\"===f)f=i;else if(\"*\"!==i&&i!==f){if(g=j[i+\" \"+f]||j[\"* \"+f],!g)for(e in j)if(h=e.split(\" \"),h[1]===f&&(g=j[i+\" \"+h[0]]||j[\"* \"+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a[\"throws\"])b=g(b);else try{b=g(b)}catch(l){return{state:\"parsererror\",error:g?l:\"No conversion from \"+i+\" to \"+f}}}return{state:\"success\",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:\"GET\",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:\"application/x-www-form-urlencoded; charset=UTF-8\",accepts:{\"*\":Jc,text:\"text/plain\",html:\"text/html\",xml:\"application/xml, text/xml\",json:\"application/json, text/javascript\"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:\"responseXML\",text:\"responseText\",json:\"responseJSON\"},converters:{\"* text\":String,\"text html\":!0,\"text json\":m.parseJSON,\"text xml\":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){\"object\"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks(\"once memory\"),q=k.statusCode||{},r={},s={},t=0,u=\"canceled\",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+\"\").replace(Ac,\"\").replace(Fc,yc[1]+\"//\"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||\"*\").toLowerCase().match(E)||[\"\"],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||(\"http:\"===c[1]?\"80\":\"443\"))===(yc[3]||(\"http:\"===yc[1]?\"80\":\"443\")))),k.data&&k.processData&&\"string\"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger(\"ajaxStart\"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?\"&\":\"?\")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,\"$1_=\"+vc++):e+(wc.test(e)?\"&\":\"?\")+\"_=\"+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader(\"If-Modified-Since\",m.lastModified[e]),m.etag[e]&&v.setRequestHeader(\"If-None-Match\",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader(\"Content-Type\",k.contentType),v.setRequestHeader(\"Accept\",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+(\"*\"!==k.dataTypes[0]?\", \"+Jc+\"; q=0.01\":\"\"):k.accepts[\"*\"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u=\"abort\";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger(\"ajaxSend\",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort(\"timeout\")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,\"No Transport\");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||\"\",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader(\"Last-Modified\"),w&&(m.lastModified[e]=w),w=v.getResponseHeader(\"etag\"),w&&(m.etag[e]=w)),204===a||\"HEAD\"===k.type?x=\"nocontent\":304===a?x=\"notmodified\":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x=\"error\",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+\"\",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?\"ajaxSuccess\":\"ajaxError\",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger(\"ajaxComplete\",[v,k]),--m.active||m.event.trigger(\"ajaxStop\")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,\"json\")},getScript:function(a,b){return m.get(a,void 0,b,\"script\")}}),m.each([\"get\",\"post\"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each([\"ajaxStart\",\"ajaxStop\",\"ajaxComplete\",\"ajaxError\",\"ajaxSuccess\",\"ajaxSend\"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:\"GET\",dataType:\"script\",async:!1,global:!1,\"throws\":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,\"body\")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&\"none\"===(a.style&&a.style.display||m.css(a,\"display\"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\\[\\]$/,Sc=/\\r?\\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+\"[\"+(\"object\"==typeof e?b:\"\")+\"]\",e,c,d)});else if(c||\"object\"!==m.type(b))d(a,b);else for(e in b)Vc(a+\"[\"+e+\"]\",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?\"\":b,d[d.length]=encodeURIComponent(a)+\"=\"+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join(\"&\").replace(Qc,\"+\")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,\"elements\");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(\":disabled\")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,\"\\r\\n\")}}):{name:b.name,value:c.replace(Sc,\"\\r\\n\")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on(\"unload\",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&\"withCredentials\"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c[\"X-Requested-With\"]||(c[\"X-Requested-With\"]=\"XMLHttpRequest\");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+\"\");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,\"string\"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=\"\"}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject(\"Microsoft.XMLHTTP\")}catch(b){}}m.ajaxSetup({accepts:{script:\"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"},contents:{script:/(?:java|ecma)script/},converters:{\"text script\":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter(\"script\",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type=\"GET\",a.global=!1)}),m.ajaxTransport(\"script\",function(a){if(a.crossDomain){var b,c=y.head||m(\"head\")[0]||y.documentElement;return{send:function(d,e){b=y.createElement(\"script\"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,\"success\"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\\?(?=&|$)|\\?\\?/;m.ajaxSetup({jsonp:\"callback\",jsonpCallback:function(){var a=_c.pop()||m.expando+\"_\"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter(\"json jsonp\",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?\"url\":\"string\"==typeof b.data&&!(b.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&ad.test(b.data)&&\"data\");return h||\"jsonp\"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,\"$1\"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?\"&\":\"?\")+b.jsonp+\"=\"+e),b.converters[\"script json\"]=function(){return g||m.error(e+\" was not called\"),g[0]},b.dataTypes[0]=\"json\",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),\"script\"):void 0}),m.parseHTML=function(a,b,c){if(!a||\"string\"!=typeof a)return null;\"boolean\"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if(\"string\"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(\" \");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&\"object\"==typeof b&&(f=\"POST\"),g.length>0&&m.ajax({url:a,type:f,dataType:\"html\",data:b}).done(function(a){e=arguments,g.html(d?m(\"<div>\").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,\"position\"),l=m(a),n={};\"static\"===k&&(a.style.position=\"relative\"),h=l.offset(),f=m.css(a,\"top\"),i=m.css(a,\"left\"),j=(\"absolute\"===k||\"fixed\"===k)&&m.inArray(\"auto\",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),\"using\"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return\"fixed\"===m.css(d,\"position\")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],\"html\")||(c=a.offset()),c.top+=m.css(a[0],\"borderTopWidth\",!0),c.left+=m.css(a[0],\"borderLeftWidth\",!0)),{top:b.top-c.top-m.css(d,\"marginTop\",!0),left:b.left-c.left-m.css(d,\"marginLeft\",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,\"html\")&&\"static\"===m.css(a,\"position\"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:\"pageXOffset\",scrollTop:\"pageYOffset\"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each([\"top\",\"left\"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+\"px\":c):void 0})}),m.each({Height:\"height\",Width:\"width\"},function(a,b){m.each({padding:\"inner\"+a,content:b,\"\":\"outer\"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||\"boolean\"!=typeof d),g=c||(d===!0||e===!0?\"margin\":\"border\");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement[\"client\"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body[\"scroll\"+a],e[\"scroll\"+a],b.body[\"offset\"+a],e[\"offset\"+a],e[\"client\"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,\"function\"==typeof define&&define.amd&&define(\"jquery\",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});\n"
  },
  {
    "path": "assets/vendor/require.js",
    "content": "/*\n RequireJS 2.0.6 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.\n Available via the MIT or new BSD license.\n see: http://github.com/jrburke/requirejs for details\n*/\nvar requirejs,require,define;\n(function(Z){function x(b){return J.call(b)===\"[object Function]\"}function E(b){return J.call(b)===\"[object Array]\"}function o(b,e){if(b){var f;for(f=0;f<b.length;f+=1)if(b[f]&&e(b[f],f,b))break}}function M(b,e){if(b){var f;for(f=b.length-1;f>-1;f-=1)if(b[f]&&e(b[f],f,b))break}}function y(b,e){for(var f in b)if(b.hasOwnProperty(f)&&e(b[f],f))break}function N(b,e,f,h){e&&y(e,function(e,j){if(f||!F.call(b,j))h&&typeof e!==\"string\"?(b[j]||(b[j]={}),N(b[j],e,f,h)):b[j]=e});return b}function t(b,e){return function(){return e.apply(b,\narguments)}}function $(b){if(!b)return b;var e=Z;o(b.split(\".\"),function(b){e=e[b]});return e}function aa(b,e,f){return function(){var h=ga.call(arguments,0),c;if(f&&x(c=h[h.length-1]))c.__requireJsBuild=!0;h.push(e);return b.apply(null,h)}}function ba(b,e,f){o([[\"toUrl\"],[\"undef\"],[\"defined\",\"requireDefined\"],[\"specified\",\"requireSpecified\"]],function(h){var c=h[1]||h[0];b[h[0]]=e?aa(e[c],f):function(){var b=z[O];return b[c].apply(b,arguments)}})}function G(b,e,f,h){e=Error(e+\"\\nhttp://requirejs.org/docs/errors.html#\"+\nb);e.requireType=b;e.requireModules=h;if(f)e.originalError=f;return e}function ha(){if(H&&H.readyState===\"interactive\")return H;M(document.getElementsByTagName(\"script\"),function(b){if(b.readyState===\"interactive\")return H=b});return H}var j,p,u,B,s,C,H,I,ca,da,ia=/(\\/\\*([\\s\\S]*?)\\*\\/|([^:]|^)\\/\\/(.*)$)/mg,ja=/[^.]\\s*require\\s*\\(\\s*[\"']([^'\"\\s]+)[\"']\\s*\\)/g,ea=/\\.js$/,ka=/^\\.\\//;p=Object.prototype;var J=p.toString,F=p.hasOwnProperty;p=Array.prototype;var ga=p.slice,la=p.splice,w=!!(typeof window!==\n\"undefined\"&&navigator&&document),fa=!w&&typeof importScripts!==\"undefined\",ma=w&&navigator.platform===\"PLAYSTATION 3\"?/^complete$/:/^(complete|loaded)$/,O=\"_\",S=typeof opera!==\"undefined\"&&opera.toString()===\"[object Opera]\",z={},r={},P=[],K=!1;if(typeof define===\"undefined\"){if(typeof requirejs!==\"undefined\"){if(x(requirejs))return;r=requirejs;requirejs=void 0}typeof require!==\"undefined\"&&!x(require)&&(r=require,require=void 0);j=requirejs=function(b,e,f,h){var c,o=O;!E(b)&&typeof b!==\"string\"&&\n(c=b,E(e)?(b=e,e=f,f=h):b=[]);if(c&&c.context)o=c.context;(h=z[o])||(h=z[o]=j.s.newContext(o));c&&h.configure(c);return h.require(b,e,f)};j.config=function(b){return j(b)};require||(require=j);j.version=\"2.0.6\";j.jsExtRegExp=/^\\/|:|\\?|\\.js$/;j.isBrowser=w;p=j.s={contexts:z,newContext:function(b){function e(a,d,k){var l,b,i,v,e,c,f,g=d&&d.split(\"/\");l=g;var h=m.map,j=h&&h[\"*\"];if(a&&a.charAt(0)===\".\")if(d){l=m.pkgs[d]?g=[d]:g.slice(0,g.length-1);d=a=l.concat(a.split(\"/\"));for(l=0;d[l];l+=1)if(b=d[l],\nb===\".\")d.splice(l,1),l-=1;else if(b===\"..\")if(l===1&&(d[2]===\"..\"||d[0]===\"..\"))break;else l>0&&(d.splice(l-1,2),l-=2);l=m.pkgs[d=a[0]];a=a.join(\"/\");l&&a===d+\"/\"+l.main&&(a=d)}else a.indexOf(\"./\")===0&&(a=a.substring(2));if(k&&(g||j)&&h){d=a.split(\"/\");for(l=d.length;l>0;l-=1){i=d.slice(0,l).join(\"/\");if(g)for(b=g.length;b>0;b-=1)if(k=h[g.slice(0,b).join(\"/\")])if(k=k[i]){v=k;e=l;break}if(v)break;!c&&j&&j[i]&&(c=j[i],f=l)}!v&&c&&(v=c,e=f);v&&(d.splice(0,e,v),a=d.join(\"/\"))}return a}function f(a){w&&\no(document.getElementsByTagName(\"script\"),function(d){if(d.getAttribute(\"data-requiremodule\")===a&&d.getAttribute(\"data-requirecontext\")===g.contextName)return d.parentNode.removeChild(d),!0})}function h(a){var d=m.paths[a];if(d&&E(d)&&d.length>1)return f(a),d.shift(),g.undef(a),g.require([a]),!0}function c(a,d,k,l){var b,i,v=a?a.indexOf(\"!\"):-1,c=null,f=d?d.name:null,h=a,j=!0,m=\"\";a||(j=!1,a=\"_@r\"+(M+=1));v!==-1&&(c=a.substring(0,v),a=a.substring(v+1,a.length));c&&(c=e(c,f,l),i=q[c]);a&&(c?m=i&&\ni.normalize?i.normalize(a,function(a){return e(a,f,l)}):e(a,f,l):(m=e(a,f,l),b=g.nameToUrl(m)));a=c&&!i&&!k?\"_unnormalized\"+(O+=1):\"\";return{prefix:c,name:m,parentMap:d,unnormalized:!!a,url:b,originalName:h,isDefine:j,id:(c?c+\"!\"+m:m)+a}}function p(a){var d=a.id,k=n[d];k||(k=n[d]=new g.Module(a));return k}function r(a,d,k){var b=a.id,c=n[b];if(F.call(q,b)&&(!c||c.defineEmitComplete))d===\"defined\"&&k(q[b]);else p(a).on(d,k)}function A(a,d){var k=a.requireModules,b=!1;if(d)d(a);else if(o(k,function(d){if(d=\nn[d])d.error=a,d.events.error&&(b=!0,d.emit(\"error\",a))}),!b)j.onError(a)}function s(){P.length&&(la.apply(D,[D.length-1,0].concat(P)),P=[])}function u(a,d,k){a=a&&a.map;d=aa(k||g.require,a,d);ba(d,g,a);d.isBrowser=w;return d}function z(a){delete n[a];o(L,function(d,k){if(d.map.id===a)return L.splice(k,1),d.defined||(g.waitCount-=1),!0})}function B(a,d,k){var b=a.map.id,c=a.depMaps,i;if(a.inited){if(d[b])return a;d[b]=!0;o(c,function(a){var a=a.id,b=n[a];return!b||k[a]||!b.inited||!b.enabled?void 0:\ni=B(b,d,k)});k[b]=!0;return i}}function C(a,d,b){var l=a.map.id,c=a.depMaps;if(a.inited&&a.map.isDefine){if(d[l])return q[l];d[l]=a;o(c,function(i){var i=i.id,c=n[i];!Q[i]&&c&&(!c.inited||!c.enabled?b[l]=!0:(c=C(c,d,b),b[i]||a.defineDepById(i,c)))});a.check(!0);return q[l]}}function I(a){a.check()}function T(){var a,d,b,l,c=(b=m.waitSeconds*1E3)&&g.startTime+b<(new Date).getTime(),i=[],e=!1,j=!0;if(!U){U=!0;y(n,function(b){a=b.map;d=a.id;if(b.enabled&&!b.error)if(!b.inited&&c)h(d)?e=l=!0:(i.push(d),\nf(d));else if(!b.inited&&b.fetched&&a.isDefine&&(e=!0,!a.prefix))return j=!1});if(c&&i.length)return b=G(\"timeout\",\"Load timeout for modules: \"+i,null,i),b.contextName=g.contextName,A(b);j&&(o(L,function(a){if(!a.defined){var a=B(a,{},{}),d={};a&&(C(a,d,{}),y(d,I))}}),y(n,I));if((!c||l)&&e)if((w||fa)&&!V)V=setTimeout(function(){V=0;T()},50);U=!1}}function W(a){p(c(a[0],null,!0)).init(a[1],a[2])}function J(a){var a=a.currentTarget||a.srcElement,d=g.onScriptLoad;a.detachEvent&&!S?a.detachEvent(\"onreadystatechange\",\nd):a.removeEventListener(\"load\",d,!1);d=g.onScriptError;a.detachEvent&&!S||a.removeEventListener(\"error\",d,!1);return{node:a,id:a&&a.getAttribute(\"data-requiremodule\")}}var U,X,g,Q,V,m={waitSeconds:7,baseUrl:\"./\",paths:{},pkgs:{},shim:{}},n={},Y={},D=[],q={},R={},M=1,O=1,L=[];Q={require:function(a){return u(a)},exports:function(a){a.usingExports=!0;if(a.map.isDefine)return a.exports=q[a.map.id]={}},module:function(a){return a.module={id:a.map.id,uri:a.map.url,config:function(){return m.config&&m.config[a.map.id]||\n{}},exports:q[a.map.id]}}};X=function(a){this.events=Y[a.id]||{};this.map=a;this.shim=m.shim[a.id];this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};X.prototype={init:function(a,d,b,c){c=c||{};if(!this.inited){this.factory=d;if(b)this.on(\"error\",b);else this.events.error&&(b=t(this,function(a){this.emit(\"error\",a)}));this.depMaps=a&&a.slice(0);this.depMaps.rjsSkipMap=a.rjsSkipMap;this.errback=b;this.inited=!0;this.ignore=c.ignore;c.enabled||this.enabled?this.enable():\nthis.check()}},defineDepById:function(a,d){var b;o(this.depMaps,function(d,c){if(d.id===a)return b=c,!0});return this.defineDep(b,d)},defineDep:function(a,d){this.depMatched[a]||(this.depMatched[a]=!0,this.depCount-=1,this.depExports[a]=d)},fetch:function(){if(!this.fetched){this.fetched=!0;g.startTime=(new Date).getTime();var a=this.map;if(this.shim)u(this,!0)(this.shim.deps||[],t(this,function(){return a.prefix?this.callPlugin():this.load()}));else return a.prefix?this.callPlugin():this.load()}},\nload:function(){var a=this.map.url;R[a]||(R[a]=!0,g.load(this.map.id,a))},check:function(a){if(this.enabled&&!this.enabling){var d,b,c=this.map.id;b=this.depExports;var e=this.exports,i=this.factory;if(this.inited)if(this.error)this.emit(\"error\",this.error);else{if(!this.defining){this.defining=!0;if(this.depCount<1&&!this.defined){if(x(i)){if(this.events.error)try{e=g.execCb(c,i,b,e)}catch(f){d=f}else e=g.execCb(c,i,b,e);if(this.map.isDefine)if((b=this.module)&&b.exports!==void 0&&b.exports!==this.exports)e=\nb.exports;else if(e===void 0&&this.usingExports)e=this.exports;if(d)return d.requireMap=this.map,d.requireModules=[this.map.id],d.requireType=\"define\",A(this.error=d)}else e=i;this.exports=e;if(this.map.isDefine&&!this.ignore&&(q[c]=e,j.onResourceLoad))j.onResourceLoad(g,this.map,this.depMaps);delete n[c];this.defined=!0;g.waitCount-=1;g.waitCount===0&&(L=[])}this.defining=!1;if(!a&&this.defined&&!this.defineEmitted)this.defineEmitted=!0,this.emit(\"defined\",this.exports),this.defineEmitComplete=!0}}else this.fetch()}},\ncallPlugin:function(){var a=this.map,d=a.id,b=c(a.prefix,null,!1,!0);r(b,\"defined\",t(this,function(b){var k;k=this.map.name;var i=this.map.parentMap?this.map.parentMap.name:null;if(this.map.unnormalized){if(b.normalize&&(k=b.normalize(k,function(a){return e(a,i,!0)})||\"\"),b=c(a.prefix+\"!\"+k,this.map.parentMap,!1,!0),r(b,\"defined\",t(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),b=n[b.id]){if(this.events.error)b.on(\"error\",t(this,function(a){this.emit(\"error\",a)}));\nb.enable()}}else k=t(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),k.error=t(this,function(a){this.inited=!0;this.error=a;a.requireModules=[d];y(n,function(a){a.map.id.indexOf(d+\"_unnormalized\")===0&&z(a.map.id)});A(a)}),k.fromText=function(a,b){var d=K;d&&(K=!1);p(c(a));j.exec(b);d&&(K=!0);g.completeLoad(a)},b.load(a.name,u(a.parentMap,!0,function(a,b,d){a.rjsSkipMap=!0;return g.require(a,b,d)}),k,m)}));g.enable(b,this);this.pluginMaps[b.id]=b},enable:function(){this.enabled=\n!0;if(!this.waitPushed)L.push(this),g.waitCount+=1,this.waitPushed=!0;this.enabling=!0;o(this.depMaps,t(this,function(a,b){var k,e;if(typeof a===\"string\"){a=c(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.depMaps.rjsSkipMap);this.depMaps[b]=a;if(k=Q[a.id]){this.depExports[b]=k(this);return}this.depCount+=1;r(a,\"defined\",t(this,function(a){this.defineDep(b,a);this.check()}));this.errback&&r(a,\"error\",this.errback)}k=a.id;e=n[k];!Q[k]&&e&&!e.enabled&&g.enable(a,this)}));y(this.pluginMaps,\nt(this,function(a){var b=n[a.id];b&&!b.enabled&&g.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){o(this.events[a],function(a){a(b)});a===\"error\"&&delete this.events[a]}};return g={config:m,contextName:b,registry:n,defined:q,urlFetched:R,waitCount:0,defQueue:D,Module:X,makeModuleMap:c,configure:function(a){a.baseUrl&&a.baseUrl.charAt(a.baseUrl.length-1)!==\"/\"&&(a.baseUrl+=\"/\");var b=m.pkgs,e=m.shim,f=m.paths,\nj=m.map;N(m,a,!0);m.paths=N(f,a.paths,!0);if(a.map)m.map=N(j||{},a.map,!0,!0);if(a.shim)y(a.shim,function(a,b){E(a)&&(a={deps:a});if(a.exports&&!a.exports.__buildReady)a.exports=g.makeShimExports(a.exports);e[b]=a}),m.shim=e;if(a.packages)o(a.packages,function(a){a=typeof a===\"string\"?{name:a}:a;b[a.name]={name:a.name,location:a.location||a.name,main:(a.main||\"main\").replace(ka,\"\").replace(ea,\"\")}}),m.pkgs=b;y(n,function(a,b){if(!a.inited&&!a.map.unnormalized)a.map=c(b)});if(a.deps||a.callback)g.require(a.deps||\n[],a.callback)},makeShimExports:function(a){var b;return typeof a===\"string\"?(b=function(){return $(a)},b.exports=a,b):function(){return a.apply(Z,arguments)}},requireDefined:function(a,b){var e=c(a,b,!1,!0).id;return F.call(q,e)},requireSpecified:function(a,b){a=c(a,b,!1,!0).id;return F.call(q,a)||F.call(n,a)},require:function(a,d,e,f){var h;if(typeof a===\"string\"){if(x(d))return A(G(\"requireargs\",\"Invalid require call\"),e);if(j.get)return j.get(g,a,d);a=c(a,d,!1,!0);a=a.id;return!F.call(q,a)?A(G(\"notloaded\",\n'Module name \"'+a+'\" has not been loaded yet for context: '+b)):q[a]}e&&!x(e)&&(f=e,e=void 0);d&&!x(d)&&(f=d,d=void 0);for(s();D.length;)if(h=D.shift(),h[0]===null)return A(G(\"mismatch\",\"Mismatched anonymous define() module: \"+h[h.length-1]));else W(h);p(c(null,f)).init(a,d,e,{enabled:!0});T();return g.require},undef:function(a){s();var b=c(a,null,!0),e=n[a];delete q[a];delete R[b.url];delete Y[a];if(e){if(e.events.defined)Y[a]=e.events;z(a)}},enable:function(a){n[a.id]&&p(a).enable()},completeLoad:function(a){var b,\nc,e=m.shim[a]||{},f=e.exports&&e.exports.exports;for(s();D.length;){c=D.shift();if(c[0]===null){c[0]=a;if(b)break;b=!0}else c[0]===a&&(b=!0);W(c)}c=n[a];if(!b&&!q[a]&&c&&!c.inited)if(m.enforceDefine&&(!f||!$(f)))if(h(a))return;else return A(G(\"nodefine\",\"No define call for \"+a,null,[a]));else W([a,e.deps||[],e.exports]);T()},toUrl:function(a,b){var c=a.lastIndexOf(\".\"),f=null;c!==-1&&(f=a.substring(c,a.length),a=a.substring(0,c));return g.nameToUrl(e(a,b&&b.id,!0),f)},nameToUrl:function(a,b){var c,\ne,f,i,h,g;if(j.jsExtRegExp.test(a))i=a+(b||\"\");else{c=m.paths;e=m.pkgs;i=a.split(\"/\");for(h=i.length;h>0;h-=1)if(g=i.slice(0,h).join(\"/\"),f=e[g],g=c[g]){E(g)&&(g=g[0]);i.splice(0,h,g);break}else if(f){c=a===f.name?f.location+\"/\"+f.main:f.location;i.splice(0,h,c);break}i=i.join(\"/\");i+=b||(/\\?/.test(i)?\"\":\".js\");i=(i.charAt(0)===\"/\"||i.match(/^[\\w\\+\\.\\-]+:/)?\"\":m.baseUrl)+i}return m.urlArgs?i+((i.indexOf(\"?\")===-1?\"?\":\"&\")+m.urlArgs):i},load:function(a,b){j.load(g,a,b)},execCb:function(a,b,c,e){return b.apply(e,\nc)},onScriptLoad:function(a){if(a.type===\"load\"||ma.test((a.currentTarget||a.srcElement).readyState))H=null,a=J(a),g.completeLoad(a.id)},onScriptError:function(a){var b=J(a);if(!h(b.id))return A(G(\"scripterror\",\"Script error\",a,[b.id]))}}}};j({});ba(j);if(w&&(u=p.head=document.getElementsByTagName(\"head\")[0],B=document.getElementsByTagName(\"base\")[0]))u=p.head=B.parentNode;j.onError=function(b){throw b;};j.load=function(b,e,f){var h=b&&b.config||{},c;if(w)return c=h.xhtml?document.createElementNS(\"http://www.w3.org/1999/xhtml\",\n\"html:script\"):document.createElement(\"script\"),c.type=h.scriptType||\"text/javascript\",c.charset=\"utf-8\",c.async=!0,c.setAttribute(\"data-requirecontext\",b.contextName),c.setAttribute(\"data-requiremodule\",e),c.attachEvent&&!(c.attachEvent.toString&&c.attachEvent.toString().indexOf(\"[native code\")<0)&&!S?(K=!0,c.attachEvent(\"onreadystatechange\",b.onScriptLoad)):(c.addEventListener(\"load\",b.onScriptLoad,!1),c.addEventListener(\"error\",b.onScriptError,!1)),c.src=f,I=c,B?u.insertBefore(c,B):u.appendChild(c),\nI=null,c;else fa&&(importScripts(f),b.completeLoad(e))};w&&M(document.getElementsByTagName(\"script\"),function(b){if(!u)u=b.parentNode;if(s=b.getAttribute(\"data-main\")){if(!r.baseUrl)C=s.split(\"/\"),ca=C.pop(),da=C.length?C.join(\"/\")+\"/\":\"./\",r.baseUrl=da,s=ca;s=s.replace(ea,\"\");r.deps=r.deps?r.deps.concat(s):[s];return!0}});define=function(b,e,f){var h,c;typeof b!==\"string\"&&(f=e,e=b,b=null);E(e)||(f=e,e=[]);!e.length&&x(f)&&f.length&&(f.toString().replace(ia,\"\").replace(ja,function(b,c){e.push(c)}),\ne=(f.length===1?[\"require\"]:[\"require\",\"exports\",\"module\"]).concat(e));if(K&&(h=I||ha()))b||(b=h.getAttribute(\"data-requiremodule\")),c=z[h.getAttribute(\"data-requirecontext\")];(c?c.defQueue:P).push([b,e,f])};define.amd={jQuery:!0};j.exec=function(b){return eval(b)};j(r)}})(this);"
  },
  {
    "path": "content/ajax-deferreds/index.md",
    "content": "title: AJAX & Deferreds\nsandbox: /sandbox/ajax-deferreds\nprevious:\n  name: Effects\n  path: /chapter/effects\nnext: false\nlinks:\n  - name: Ajax Documentation\n    path: http://api.jquery.com/category/ajax/\n  - name: The jqXHR Object\n    path: http://api.jquery.com/jQuery.ajax/#jqXHR\n  - name: Deferreds in jQuery\n    path: http://api.jquery.com/category/deferred-object/\n---\n\n## AJAX\n\nAJAX &mdash; \"asynchronous JavaScript and XML\" &mdash; is a means of loading data from a\nserver without requiring a page reload. It uses a browser's built-in XMLHttpRequest (XHR) functionality to make a request to the server and then handle the data that the server returns.\n\njQuery provides the `$.ajax` method  &mdash; and several convenience methods  &mdash; to make it easier to work with XHRs across browsers.\n\n### $.ajax\n\nWe can use the jQuery `$.ajax()` method in a couple of different ways: we can pass it a configuration object as its sole argument, or we can pass it a URL and an optional configuration object. Let's take a look at the first approach:\n\n    // Create the \"callback\" functions that will be invoked when...\n\n    // ... the AJAX request is successful\n    var updatePage = function( resp ) {\n      $( '#target').html( resp.people[0].name );\n    };\n\n    // ... the AJAX request fails\n    var printError = function( req, status, err ) {\n      console.log( 'something went wrong', status, err );\n    };\n\n    // Create an object to describe the AJAX request\n    var ajaxOptions = {\n      url: '/data/people.json',\n      dataType: 'json',\n      success: updatePage,\n      error: printError\n    };\n\n    // Initiate the request!\n    $.ajax(ajaxOptions);\n\nOf course, you can be less verbose by just passing an object literal to the `$.ajax()` method, and using anonymous functions for the `success` and `error` callbacks. This version is easier to write, and likely easier to maintain:\n\n    $.ajax({\n      url: '/data/people.json',\n      dataType: 'json',\n      success: function( resp ) {\n        $( '#target').html( resp.people[0].name );\n      },\n      error: function( req, status, err ) {\n        console.log( 'something went wrong', status, err );\n      }\n    });\n\nAs mentioned earlier, you can also call the `$.ajax()` method by passing it a URL and an optional configuration object. This can be useful if you want to use the default configuration for `$.ajax()`, or if you want to use the same configuration for several URLs.\n\n    $.ajax( '/data/people.json', {\n      type: 'GET',\n      dataType: 'json',\n      success: function( resp ) {\n        console.log( resp.people );\n      },\n      error: function( req, status, err ) {\n        console.log( 'something went wrong', status, err );\n      }\n    });\n\nIn this version, only the URL is required, but the configuration object lets\nus tell jQuery what data we want to send, which HTTP method to use (GET, POST,\netc.), what kind of data we expect to receive, how to react when the\nrequest succeeds or fails, and much more.\n\n[See the `$.ajax()` documentation](http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings) for a complete list of configuration options.\n\n### A is for asynchronous\n\nAJAX requests run *asynchronously*  &mdash; that means that the `$.ajax` method\nreturns before the request is finished, and therefore before the `success`\ncallback runs. That means that this function's `return` statement runs before\nthe request is complete. This means the `getSomeData` function below will return `data` before it is defined, causing the code to throw an error.\n\n    ```<span class=\"caution\">caution</span> broken code\n    var getSomeData = function() {\n      var data;\n\n      $.ajax({\n        url: '/data/people.json',\n        dataType: 'json',\n        success: function(resp) {\n          data = resp.people;\n        }\n      });\n\n      return data;\n    }\n\n    $( '#target' ).html( getSomeData().people[0].name );\n\n### X is for JSON\n\nThe term AJAX was [coined in 2005](http://www.adaptivepath.com/ideas/ajax-new-approach-web-applications) to describe a method for retrieving data from a server without requiring a page refresh. Back then, data sent by a server tended to be formatted as [XML](http://en.wikipedia.org/wiki/XML), but these days, most modern applications use [JSON](http://www.json.org/) as the format for data from the server.\n\nJSON is a string representation of data; it looks a whole lot like a normal JavaScript object, but it can only be used to represent a subset of the data that a normal JavaScript object can represent. For example, JSON cannot represent function or date objects. Here's an example of a JSON string; note how all property names are quoted:\n\n    { \"people\" : [\n      {\n        \"name\" : \"Ben\",\n        \"url\" : \"http://benalman.com/\",\n        \"bio\" : \"I create groovy websites, useful jQuery plugins, and play a mean funk bass. I'm also Director of Pluginization at @bocoup.\"\n      },\n      {\n        \"name\" : \"Rebecca\",\n        \"url\" : \"http://rmurphey.com\",\n        \"bio\" : \"Senior JS dev at Bocoup\"\n      },\n      {\n        \"name\" : \"Jory\",\n        \"url\" : \"http://joryburson.com\",\n        \"bio\" : \"super-enthusiastic about open web education @bocoup. lover of media, art, and fake mustaches.\"\n      }\n    ] }\n\nIt's important to remember that *JSON is a string representation of an object*  &mdash; the string must be parsed into an actual JavaScript object before working with it. When you're working with a JSON response to an XHR, jQuery takes care of this task for you, but it's crucial to understand the difference between the JSON representation of an object, and the object itself.\n\n<div class=\"alert alert-info\">\n\nIf you need to create a JSON string from a JavaScript object, or if you need to parse a JSON string outside of jQuery, modern browsers provide the `JSON.stringify()` and `JSON.parse()` methods. This functionality can be added to older browsers using the [json2.js](https://github.com/douglascrockford/JSON-js) library. jQuery also provides the `jQuery.parseJSON` method, which provides the same functionality as `JSON.parse()` across all browsers. However, jQuery does not provide a method that corresponds to `JSON.stringify()`.\n\n</div>\n\n### Convenience methods\n\nIf we're just making a simple request  &mdash; and if we don't care about error\nhandling  &mdash; jQuery provides several \"convenience methods\" that let us use an\nabbreviated syntax. Each of these methods takes a URL, an optional data object,\nand an optional callback for handling a successful request.\n\n    $.get( '/data/people.html', function( html ){\n      $( '#target' ).html( html );\n    });\n\n    $.post( '/data/save', { name: 'Rebecca' }, function( resp ) {\n      console.log( resp );\n    });\n\n### Sending data & working with forms\n\nWe can send data with our request by setting the `data` property on our\nconfiguration object, or by passing an object as the second argument to one of\nthe convenience methods.\n\nFor a GET request, this data will be appended to the URL as a query string;\nfor a POST request, it will be sent as form data. jQuery provides the helpful `.serialize()` method for taking form input and converting it to a query string format (`field1name=field1value&field2name=field2value...`):\n\n    $( 'form' ).submit(function( event ) {\n      event.preventDefault();\n\n      var form = $( this );\n\n      $.ajax({\n        type: 'POST',\n        url: '/data/save',\n        data: form.serialize(),\n        dataType: 'json',\n        success: function( resp ) {\n          console.log( resp );\n        }\n      });\n    });\n\n### jqXHR\n\n`$.ajax()` (and related convenience methods) returns a jqXHR object  &mdash; a *jQuery XML HTTP Request*  &mdash; which has a host of powerful methods. We can make a request using `$.ajax()`, and then capture the returned jqXHR object in a variable.\n\n    var req = $.ajax({\n      url: '/data/people.json',\n      dataType: 'json'\n    });\n\nWe can use this object to attach callbacks to the request, even after the request has completed. For example, we can use the `.then()` method of the jqXHR object to attach success and error callbacks. The `.then()` method takes one or two functions as its arguments. The first function will be be called if the request succeeds; the second will be called if the request fails.\n\n    var success = function( resp ) {\n      $( '#target' ).append(\n        '<p>people: ' + resp.people.length + '</p>'\n      );\n      console.log( resp.people );\n    };\n\n    var err = function( req, status, err ) {\n      $( '#target' ).append( '<p>something went wrong</p>' );\n    };\n\n    req.then( success, err );\n    req.then(function() {\n      $( '#target' ).append( '<p>it worked</p>' );\n    });\n\nWe can call `.then()` on a request as many times as we'd like; it's a first-in, first-out queue.\n\nIf we don't want to attach success and error callbacks at the same time, we can\nuse the `.done()` and `.fail()` methods of the request object.\n\n    req.done( success );\n    req.fail( err );\n\nIf we want to attach a callback that runs on success or failure, we can use the\n`.always()` method of the request object.\n\n    req.always(function() {\n      $( '#target' )\n        .append( '<p>one way or another, it is done now</p>' );\n    });\n\n### JSONP\n\nMany JavaScript developers are alarmed when they first try to use `$.ajax` to fetch data from another domain and their request fails. For example, you may try fetching data from a third-party API, and discover that your request consistently fails.\n\nAs it turns out, for security reasons, XHRs to other domains are blocked by the browser. However, certain third-party APIs provide a response formatted as JSONP  &mdash; \"JSON with Padding\"  &mdash; which allows you to use their data even though it is hosted on another server.\n\nJSONP isn't exactly AJAX  &mdash; rather than using the browser's XHR functionality, it actually works by inserting a script tag into the page that contains the requested data, \"padded\" with a function wrapper. Nevertheless, jQuery lets you make a JSONP request with `$.ajax()` by specifying `'jsonp'` as the `dataType` in the configuration object.\n\n    $.ajax({\n      url: '/data/search.jsonp',\n      data: { q: 'a' },\n      dataType: 'jsonp',\n      success: function( resp ) {\n        $( '#target' ).html( 'Results: ' + resp.results.length );\n      }\n    });\n\n<div class=\"alert alert-info\">\n\nAn API that offers JSONP will specify the name of the callback parameter to use\nin the query string; generally, this name is `callback`, and so jQuery uses\nthat as its default. However, you can override this callback name by specifying\nthe `jsonp` property in the configuration object passed to `$.ajax()`.\n\n</div>\n\nYou can also use the `$.getJSON()` convenience method to make a JSONP request;\nif the URL includes `callback=?` or similar, then jQuery will treat it as a\nJSONP request.\n\n    $.getJSON( '/data/search.jsonp?q=a&callback=?',\n      function( resp ) {\n        $( '#target' ).html( 'Results: ' + resp.results.length );\n      }\n    );\n\n[CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing)  &mdash; cross-origin resource sharing  &mdash; is another option for enabling cross-origin requests. However, it is not supported on older browsers, and it requires server-side configuration and manipulation of the XHR headers in order to work.\n\n## Deferreds\n\nThe jqXHR object is simply a special flavor of a \"deferred\". jQuery lets you\ncreate your own deferreds, which can be a powerful way for managing\nasynchronous code. Deferreds provide a means to react to the eventual success\nor failure of an asynchronous operation, and reduce the need for deeply nested\ncallbacks.\n\n### $.Deferred\n\nYou can create your own deferreds using `$.Deferred()`. Here, we run a function\nin a setTimeout, and \"resolve\" our deferred with the return value of that\nfunction. We return the deferred's \"promise\"  &mdash; an object to which we can\nattach callbacks, but which doesn't have the ability to modify the outcome of\ndeferred itself. We \"reject\" the deferred if anything goes wrong with running\nthe provided function.\n\n    function doSomethingLater( fn, time ) {\n      var dfd = $.Deferred();\n\n      setTimeout(function() {\n        dfd.resolve( fn() );\n      }, time || 0);\n\n      return dfd.promise();\n    }\n\n    var promise = doSomethingLater(function() {\n      console.log( 'This function will be called in 100ms' );\n    }, 100);\n\n### .then(), .done(), .fail(), .always()\n\nJust like with a jqXHR, we can attach success and error handlers to a promise.\n\n    function doSomethingLater( fn, time ) {\n      var dfd = $.Deferred();\n\n      setTimeout(function() {\n        dfd.resolve( fn() );\n      }, time || 0);\n\n      return dfd.promise();\n    }\n\n    var success = function( resp ) {\n      $( '#target' ).html( 'it worked' );\n    };\n\n    var err = function( req, status, err ) {\n      $( '#target' ).html( 'it failed' );\n    };\n\n    var dfd = doSomethingLater(function() { /* ... */ }, 100);\n\n    dfd.then( success, err );\n\n### pipe()\n\nWe can use the `.pipe()` method of a promise to react to the resolution of an\nasynchronous operation by manipulating the value it returns and creating a new\ndeferred.\n\nAs of jQuery 1.8, the `.then()` method of a promise behaves like `.pipe()`.\n\n    function doSomethingLater( fn, time ) {\n      var dfd = $.Deferred();\n\n      setTimeout(function() {\n        dfd.resolve( fn() );\n      }, time || 0);\n\n      return dfd.promise();\n    }\n\n    var dfd = doSomethingLater(function() { return 1; }, 100);\n\n    dfd\n      .pipe(function(resp) { return resp + ' ' + resp; })\n      .done(function(upperCaseResp) {\n        $( '#target' ).html( upperCaseResp );\n      });\n\n### Reacting to maybe-asynchronous operations\n\nSometimes we have an operation that might return immediately, or\nmight be asynchronous  &mdash; for example, if a function does something\nasync the first time it runs, and then caches the value for future\nuse. In this case, we can use `$.when()` to react to either case.\n\n    function maybeAsync( num ) {\n      var dfd = $.Deferred();\n\n      // return a deferred when num === 1\n      if ( num === 1 ) {\n        setTimeout(function() {\n          dfd.resolve( num );\n        }, 100);\n        return dfd.promise();\n      }\n\n      // return immediately otherwise\n      return num;\n    }\n\n    // this will resolve async\n    $.when( maybeAsync( 1 ) ).then(function( resp ) {\n      $( '#target' ).append( '<p>' + resp + '</p>' );\n    });\n\n    // this will return immediately\n    $.when( maybeAsync( 0 ) ).then(function( resp ) {\n      $( '#target' ).append( '<p>' + resp + '</p>' );\n    });\n\nYou can also pass `$.when()` more than one argument, which lets you mix sync\nand async operations; you get their return values back as arguments to the\ncallback.\n\n    function maybeAsync( num ) {\n      var dfd = $.Deferred();\n\n      // return a deferred when num === 1\n      if ( num === 1 ) {\n        setTimeout(function() {\n          dfd.resolve( num );\n        }, 100);\n        return dfd.promise();\n      }\n\n      // return immediately otherwise\n      return num;\n    }\n\n    $.when( maybeAsync( 0 ), maybeAsync( 1 ) )\n      .then(function( resp1, resp2 ) {\n        var target = $( '#target' );\n        target.append( '<p>' + resp1 + '</p>' );\n        target.append( '<p>' + resp2 + '</p>' );\n      });\n\nWhen a jqXHR is one of the arguments to `$.when()`, we get an array of\narguments passed to our callback.\n\n    function maybeAsync( num ) {\n      var dfd = $.Deferred();\n\n      // return a deferred when num === 1\n      if ( num === 1 ) {\n        setTimeout(function() {\n          dfd.resolve( num );\n        }, 100);\n        return dfd.promise();\n      }\n\n      // return immediately otherwise\n      return num;\n    }\n\n    $.when( maybeAsync( 0 ), $.get( '/data/people.json' ) )\n      .then(function( resp1, resp2 ) {\n        console.log( \"Both operations are done\", resp1, resp2 );\n      });\n"
  },
  {
    "path": "content/ajax-deferreds/sandbox/index.html",
    "content": "<h3>Ajax &amp; Deferreds Sandbox</h3>\n\n<div id=\"target\">\n\nThis content will be replaced as you make successful AJAX requests.\n\n</div>\n"
  },
  {
    "path": "content/effects/index.md",
    "content": "title: Animating Your Pages with jQuery\nsandbox: /sandbox/effects\nprevious:\n  name: Events & Event Delegation\n  path: /chapter/events\nnext:\n  name: AJAX & Deferreds\n  path: /chapter/ajax-deferreds\nlinks:\n  - name: Effects Documentation\n    path: http://api.jquery.com/category/effects/\n---\n\njQuery makes it trivial to add simple effects to your page. Effects can use the\nbuilt-in settings or provide a customized duration. You can also create custom\nanimations of arbitrary CSS properties.\n\nSee the [effects documentation](http://api.jquery.com/category/effects/) for\ncomplete details on jQuery effects.\n\n<div class=\"alert alert-info\">\n\n**An important note about animations:** In modern browsers, and especially on mobile devices, it is often much more efficient to achieve animations using CSS rather than JavaScript. The details of doing this are beyond the scope of this guide, but if you are only targeting mobile devices or browsers that support CSS animations, then you should use CSS for animations where possible. You may also want to consider setting `jQuery.fx.off` to true on low-resource devices; doing so will cause animation methods to immediately set elements to the desired state, rather than animating to that state.\n\n</div>\n\n## Built-in effects\n\nFrequently used effects are built into jQuery as methods that you can call on\nany jQuery object:\n\n- **`.show()`** Show the selected elements.\n- **`.hide()`** Hide the selected elements.\n- **`.fadeIn()`** Animate the opacity of the selected elements to 100%.\n- **`.fadeOut()`** Animate the opacity of the selected elements to 0%.\n- **`.slideDown()`** Display the selected elements with a vertical sliding\n  motion.\n- **`.slideUp()`** Hide the selected elements with a vertical sliding motion.\n- **`.slideToggle()`** Show or hide the selected elements with a vertical\n  sliding motion, depending on whether the elements are currently visible.\n\nOnce you've made a selection, it's simple to apply an effect to that selection.\n\n    $( '.hidden' ).show();\n\nYou can also specify the duration of built-in effects. There are two ways to do\nthis: you can specify a time in milliseconds ...\n\n    $( '.hidden' ).show( 300 );\n\n... or use one of the pre-defined speeds:\n\n    $( '.hidden' ).show( 'slow' );\n\nThe predefined speeds are specified in the `jQuery.fx.speeds` object; you can\nmodify this object to override the defaults, or extend it with new names:\n\n    // re-set an existing predefined speed\n    jQuery.fx.speeds.fast = 50;\n\n    // create a new pre-defined speed\n    jQuery.fx.speeds.turtle = 3000;\n\n    // Since we've re-set the 'fast' speed, this will now animate over the\n    // course of 50 milliseconds\n    $( '.hidden' ).hide( 'fast' );\n\n    // After they are created, we can use custom speeds just as we use the\n    // built-in speeds\n    $( '.other-hidden' ).show( 'turtle' );\n\nOften, you'll want to do something once an animation is done &mdash; if you try to do it before the animation completes, it may affect the quality of the animation, or it may remove elements that are part of the animation. You can provide a callback function to the animation methods if you want to specify what should happen when the effect is complete. Inside the callback, `this` refers to the raw DOM element that the effect was applied to. Just like with event callbacks, we can turn it into a jQuery object by passing it to the `$()` function: `$( this )`.\n\n    $( 'p.old' ).fadeOut( 300, function() {\n      $( this ).remove();\n    });\n\nNote that if your selection doesn't contain any elements, then your callback\nwill never run! If you need your callback to run regardless of whether there\nare elements in your selection, you can create a function and use it for both cases:\n\n    var oldElements = $( 'p.old' );\n    var thingToAnimate = $( '#nonexistent' );\n\n    // This function will be a \"callback\" to the \"show\" method when there are\n    // elements to show. Otherwise, we will simply call it immediately\n    var removeOldElements = function() {\n      oldElements.remove();\n    };\n\n    if ( thingToAnimate.length ) {\n\n      // When passed as a callback to \"show\", the function will be invoked\n      // when the animation is complete\n      thingToAnimate.show( 'slow', removeOldElements );\n\n    } else {\n      removeOldElements();\n    }\n\n## Custom effects with .animate()\n\nIf the built-in animations don't suit your needs, you can use `.animate()` to\ncreate custom animations of many CSS properties. (Notably, you cannot animate the color property, but there is a\n[plugin](https://github.com/jquery/jquery-color/) that makes it possible).\n\nThe `.animate()` method takes up to three arguments:\n\n- an object defining the properties to be animated\n- the duration of the animation, in milliseconds\n- a callback function that will be called when the animation is complete\n\nThe `.animate()` method can animate to a specified final value, or it can\nincrement an existing value.\n\n    $( '.funtimes' ).animate({\n        left: '+=50', // increase by 50\n        opacity: 0.25,\n        fontSize: '12px'\n      },\n      300,\n      function() {\n        // executes when the animation is done\n      }\n    );\n\n<div class=\"alert alert-info\">\n\nNote that if you want to animate a CSS property whose name includes a hyphen, you will need to use a \"[camel case](http://en.wikipedia.org/wiki/CamelCase)\" version of the property name if you do not quote the property name. For example, the `font-size` property must be referred to as `fontSize`.\n\n</div>\n\n## Managing animations\n\njQuery provides two important methods for managing animations.\n\n- `.stop()` will stop currently running animations on the selected elements.\n- `.delay()` will pause before the execution of the next animation method. Pass\n  it the number of milliseconds you want to wait.\n\njQuery also provides methods for managing the effects queue, creating custom\nqueues, and adding custom functions to these queues. These methods are beyond\nthe scope of this guide, but [you can read about them\nhere](http://api.jquery.com/category/effects/).\n"
  },
  {
    "path": "content/effects/sandbox/index.html",
    "content": "<h3>Sandbox</h3>\n\n<p>This is some HTML that you can use to try out <a\nhref=\"http://jquery.com\">jQuery</a> in the editor on the left.  Use your\nbrowser's console to see the HTML.</p>\n\n<p class=\"hidden\">This is a secret!</p>\n<p class=\"old\">This will be removed.</p>\n<p class=\"funtimes\">Funtimes!</p>\n"
  },
  {
    "path": "content/events/index.md",
    "content": "title: Events and Event Delegation\nsandbox: /sandbox/events\nprevious:\n  name: Traversing & Manipulating\n  path: /chapter/traversing-manipulating\nnext:\n  name: Effects\n  path: /chapter/effects\nlinks:\n  - name: jQuery Events Documentation\n    path: http://api.jquery.com/category/events/\n---\n\njQuery makes it easy to respond to user interaction with a web page. This means that you can write code that runs when a user clicks on a certain part of the page, or when she moves her mouse over a form element. For example, this\ncode listens for a user to click on any `li` element in the page:\n\n    $( 'li' ).click(function( event ) {\n      console.log( 'clicked', $( this ).text() );\n    });\n\nThe code above selects all list items on the page, then binds a handler function to the click event of each list item using jQuery's `.click()` method.\n\nMethods such as `.click()`, `.blur()`, `.change()`, and others are \"shorthand\"\nmethods for event binding. jQuery provides a number of these shorthand methods, each of which corresponds to a native DOM event:\n\n<table class=\"table table-bordered\">\n  <thead>\n    <tr>\n      <th>Native Event Name</th>\n      <th>Shorthand Method</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>click</td>\n      <td><code>.click()</code></td>\n    </tr>\n    <tr>\n      <td>keydown</td>\n      <td><code>.keydown()</code></td>\n    </tr>\n    <tr>\n      <td>keypress</td>\n      <td><code>.keypress()</code></td>\n    </tr>\n    <tr>\n      <td>keyup</td>\n      <td><code>.keyup()</code></td>\n    </tr>\n    <tr>\n      <td>mouseover</td>\n      <td><code>.mouseover()</code></td>\n    </tr>\n    <tr>\n      <td>mouseout</td>\n      <td><code>.mouseout()</code></td>\n    </tr>\n    <tr>\n      <td>mouseenter</td>\n      <td><code>.mouseenter()</code></td>\n    </tr>\n    <tr>\n      <td>mouseleave</td>\n      <td><code>.mouseleave()</code></td>\n    </tr>\n    <tr>\n      <td>scroll</td>\n      <td><code>.scroll()</code></td>\n    </tr>\n    <tr>\n      <td>focus</td>\n      <td><code>.focus()</code></td>\n    </tr>\n    <tr>\n      <td>blur</td>\n      <td><code>.blur()</code></td>\n    </tr>\n    <tr>\n      <td>resize</td>\n      <td><code>.resize()</code></td>\n    </tr>\n  </tbody>\n</table>\n\n\nUnder the hood, all of the shorthand methods make use of jQuery's `.on()` method. You can use the `.on()` method in your own code; indeed, doing so gives you a lot more flexibility. When you use the `.on()` method, you pass the native event name as the first argument, and then the handler function as the second argument:\n\n    $( 'li' ).on( 'click', function( event ) {\n      console.log( 'clicked', $( this ).text() );\n    });\n\nOnce you've \"bound\" an event handler to an element, you can trigger that event\nhandler using jQuery as well.\n\n    $( 'li' ).trigger( 'click' );\n\nIf the event you want to trigger has a shorthand method (see the table above), you can also trigger the event by simply calling the shorthand method:\n\n    $( 'li' ).click();\n\n<div class=\"alert alert-info\">\n\nWhen you `.trigger()` an event, you only trigger event handlers that were bound with JavaScript &mdash; you don't trigger the default behavior of the event. For example, if you trigger the click event of an `a` element, it will not automatically navigate to the `href` of that element (though you could write code that would make it do so).\n\n</div>\n\nOnce you have bound an event, you can unbind the event using jQuery's `.off()` method. This will remove any event handlers that were bound to the specified event:\n\n    $( 'li' ).off( 'click' );\n\n## Namespaced events\n\nOne advantage that `.on()` offers is the ability to use \"namespaced\" events.\nWhen would you want to use namespaces? Consider a situation where you bind some events, and then want to *unbind* some of the handlers. As we just saw, you could do it this way:\n\n    ```<span class=\"caution\">caution</span> antipattern\n    $( 'li' ).on( 'click', function() {\n      console.log( 'a list item was clicked' );\n    });\n\n    $( 'li' ).on( 'click', function() {\n      registerClick();\n      doSomethingElse();\n    });\n\n    $( 'li' ).off( 'click' );\n\nHowever, this will unbind *all* click handlers on all `li` elements, which isn't what we want. If you bind an event handler using a *namespaced event*, you can target that event handler specifically:\n\n    $( 'li' ).on( 'click.logging', function() {\n      console.log( 'a list item was clicked' );\n    });\n\n    $( 'li' ).on( 'click.analytics', function() {\n      registerClick();\n      doSomethingElse();\n    });\n\n    $( 'li' ).off( 'click.logging' );\n\nThis code leaves our analytics-related click untouched, while unbinding our logging-related click.\n\nWe can also use namespaces to trigger only certain events:\n\n    $( 'li' ).trigger( 'click.logging' );\n\n## Binding multiple events at once\n\nAnother benefit of using `.on()` is the ability to bind to multiple events at\nonce. For example, you might want to run the same code when a user scrolls the\nwindow or when a user resizes the window. The `.on()` method lets you pass both\nevents &mdash; in a space-separated string &mdash; followed by the function that you want\nto handle both events:\n\n    $( 'input[type=\"text\"]' ).on('focus blur', function() {\n      console.log( 'The user focused or blurred the input' );\n    });\n\n    $( window ).on( 'resize.foo scroll.bar', function() {\n      console.log( 'The window has been resized or scrolled!' );\n    });\n\n## Passing named functions as event handlers\n\nIn all of our examples up until now, we've been passing anonymous functions as event handlers. However, you can create a function ahead of time and store it in a variable, then pass that variable as the event handler. This is useful if you want to use the same handler for different events or events on different elements.\n\n    var handleClick = function() {\n      console.log( 'something was clicked' );\n    };\n\n    $( 'li' ).on( 'click', handleClick );\n    $( 'h1' ).on( 'click', handleClick );\n\n## The event object\n\nWhenever an event is triggered, the event handler function receives one\nargument, an event object that is normalized across browsers. This object has\nmany [useful properties](http://api.jquery.com/category/events/event-object/),\nincluding the following:\n\n    $( document ).on( 'click', function( event ) {\n      console.log( event.type );    // The event type, eg. \"click\"\n      console.log( event.which );   // The button or key that was pressed.\n      console.log( event.target );  // The originating element.\n      console.log( event.pageX );   // The document mouse X coordinate.\n      console.log( event.pageY );   // The document mouse Y coordinate.\n    });\n\n## Inside the event handler\n\nWhen you specify a function to be used as an event handler, that function gets\naccess to the *raw DOM element* that initiated the event as `this`. If you want\nto use jQuery to manipulate the element, you will need to pass it to `$()`:\n\n    $( 'input' ).on( 'keydown', function( event ) {\n      // this: The element on which the event handler was bound.\n      // event: The event object.\n\n      // Change the input element's background to red if backspace was\n      // pressed, otherwise green.\n      $( this ).css( 'background', event.which === 8 ? 'red' : 'green' );\n    });\n\n## Preventing the default action\n\nOften, you'll want to prevent the default action of an event; for example, you\nmay want to handle a click on an `a` element using AJAX, rather than triggering\na full page reload. Many developers achieve this by having the event handler\nreturn `false`, but this actually has another side effect: it stops the\n*propagation* of the event as well, which can have unintended consequences.\nThe right way to prevent the default behavior of an event is to call the\n`.preventDefault()` method of the event object.\n\n    $( 'a' ).on( 'click', function( event ) {\n      // Prevent the default action.\n      event.preventDefault();\n      // Log stuff.\n      console.log( 'I was just clicked!' );\n    });\n\nThis will allow the event to \"bubble,\" which we'll explore below.\n\n## Event bubbling\n\nConsider the following code:\n\n    $( '*' ).add( [ document, window ] ).on( 'click', function( event ) {\n      event.preventDefault();\n      console.log( this );\n    });\n\nIt binds a click handler to all elements in a document (something you should\n*never* do in real code), as well as to the `document` and `window`. What\nhappens when you click on an `a` element that's nested inside other elements?\nIn fact, the click event will be triggered for the `a` element as well as for\nall of the elements that contain the `a` &mdash; all the way up to the `document`\nand the `window`. (You can click on the <i class=\"icon-eye-open\"></i> icon to\ntry it in the sandbox yourself.)\n\nThis behavior is called event bubbling &mdash; the event is triggered on the element\non which the user clicked, and &mdash; unless you call `.stopPropagation()` on the\nevent object &mdash; the event is then triggered all the way up the DOM.\n\nYou can see this more clearly when you consider the following markup:\n\n    <a href=\"#foo\"><span>I am a Link!</span></a>\n    <a href=\"#bar\"><b><i>I am another Link!</i></b></a>\n\nAnd the following code:\n\n    $( 'a' ).on( 'click', function( event ) {\n      event.preventDefault();\n      console.log( $( this ).attr( 'href' ) );\n    });\n\nWhen you click on \"I am a Link!\", you are not actually clicking on an `a`, but\nrather on a `span` inside of an `a`. Nevertheless, the click event bubbles up\nto the `a`, and the bound click handler fires.\n\n## Event delegation\n\nThe bubbling behavior of events allows us to do \"event delegation\" &mdash; binding\nhandlers to high-level elements, and then detecting which low-level element\ninitiated the event. For example, we could bind an event to an unordered list,\nand then determine which element initiated the event:\n\n    $( '#my-unordered-list' ).on( 'click', function( event ) {\n      console.log( event.target ); // logs the element that initiated the event\n    });\n\nOf course, if our unordered list contains list items that contain other markup,\nbut we really only care about which list item was clicked, then this can get\nmessy in a hurry. Thankfully, jQuery provides a helper that lets us specify\nwhich elements we care about, while still only binding to the high-level\nelement.\n\n    $( '#my-unordered-list' ).on( 'click', 'li', function( event ) {\n      console.log( this ); // logs the list item that was clicked\n    });\n\n    $( '<li>a new list item!</li>' ).appendTo( '#my-unordered-list' );\n\nEvent delegation has two main benefits. First, it allows us to bind fewer event\nhandlers than we'd have to bind if we were listening to clicks on individual\nelements, which can be a big performance gain. Second, it allows us to bind to\nparent elements &mdash; such as an unordered list &mdash; and know that our event\nhandlers will fire as expected *even if the contents of that parent element\nchange*.\n\nFor example, this code adds a new list item after the event delegation is set\nup; clicking on the new item works just fine, without any additional event\nbinding code.\n\n    $( '#my-unordered-list' ).on( 'click', 'li', function( event ) {\n      console.log( this ); // logs the list item that was clicked\n    });\n\n    $( '<li>a new list item!</li>' ).appendTo( '#my-unordered-list' );\n\n## Conclusion\n\nIn this section, we took a look at various ways to listen for user interaction\nwith our page, including how we can use event delegation to more efficiently\nset up event handlers. In the next section, we'll look at how we can animate\nelements using jQuery's effects methods.\n"
  },
  {
    "path": "content/events/sandbox/index.html",
    "content": "<h3>Sandbox</h3>\n\n<div id=\"target\">\n\n  <p>This is some HTML that you can use to try out <a\n  href=\"http://jquery.com\">jQuery</a> in the editor on the left.  Use your\n  browser's console to see the HTML.</p>\n\n  <ul id=\"my-unordered-list\">\n    <li><span><i>HTML</i></span></li>\n    <li class=\"special\"><a href=\"https://developer.mozilla.org/en/CSS/\"><i>CSS</i></a></li>\n    <li>JavaScript</li>\n  </ul>\n\n  <form>\n    <input type=\"text\">\n  </form>\n\n</div>\n"
  },
  {
    "path": "content/index.md",
    "content": "title: A guide to the basics of jQuery\nmenu:\n  - name: JavaScript Basics\n    path: /chapter/javascript-basics\n  - name: jQuery Basics\n    path: /chapter/jquery-basics\n  - name: Traversing & Manipulating\n    path: /chapter/traversing-manipulating\n  - name: Events & Event Delegation\n    path: /chapter/events\n  - name: Effects\n    path: /chapter/effects\n  - name: AJAX & Deferreds\n    path: /chapter/ajax-deferreds\n---\n\njQuery Fundamentals is designed to get you comfortable working through\ncommon problems you'll be called upon to solve using jQuery.\nTo get the most out of this site, you'll want to read the content *and* try the\nvarious interactive examples. Each chapter will cover a concept and give you a\nchance to try example code related to the concept.\n\nWe highly recommend using this site with the [Chrome\nbrowser](https://www.google.com/intl/en/chrome/browser/) or another browser\nthat supports modern JavaScript features and includes good developer tools.\n\n### Using the built-in editor\nMost pages on this site include a built-in editor where you can try out code.\nThis code will run against the markup that's displayed in the box to the\nright of the editor. To run the code in the editor, click the <i\nclass=\"icon-play\"></i> button. Reset the results area to its original state\nby clicking the <i class=\"icon-repeat\"></i> icon.\n\n### Trying the examples\nEach chapter of jQuery Fundamentals includes example code that demonstrates\nthe concepts being discussed. Click on the <i\nclass=\"icon-eye-open\"></i> icon in the bar above the example to copy\nthe example to the editor at the top of the page.\n\n<a class=\"btn btn-primary\" href=\"/chapter/javascript-basics\">Let's get to it!</a>\n"
  },
  {
    "path": "content/javascript-basics/index.md",
    "content": "title: JavaScript Basics\nsandbox: /sandbox/javascript-basics\nprevious:\n  name: Home\n  path: /\nnext:\n  name: jQuery Basics\n  path: /chapter/jquery-basics\nlinks:\n  - name: 'MDN: JavaScript'\n    path: https://developer.mozilla.org/en-US/docs/Web/JavaScript\n  - name: Chrome Developer Tools Overview\n    path: https://developer.chrome.com/devtools/index\n  - name: 'Fixing these jQuery: A Guide to Debugging'\n    path: http://fixingthesejquery.com\n  - name: Chrome Developer Tools Cheat Sheet\n    path: https://github.com/borismus/DevTools-Lab/raw/master/cheatsheet/chromedev-cheatsheet.pdf\n  - name: 'Chrome Dev Tools: 12 Tricks to Develop Quicker (video)'\n    path: http://www.youtube.com/watch?v=nOEw9iiopwI\n---\n\njQuery is built on top of JavaScript, a rich and expressive language in its own\nright. This section covers the basic concepts of JavaScript, as well as some\nfrequent pitfalls for people who have not used JavaScript before. While it will\nbe of particular value to people with no programming experience, even people\nwho have used other programming languages may benefit from learning about some\nof the peculiarities of JavaScript.\n\nHere's a simple JavaScript program that adds a message to the page:\n\n    // create a function that will greet a person,\n    // and assign the function to the `greet` variable\n    var greet = function( person, message ) {\n      var greeting = 'Hello, ' + person + '!';\n      log( greeting + ' ' + message );\n    };\n\n    // use the function to greet Jory, passing in her\n    // name and the message we want to use\n    greet( 'Jory', 'Welcome to JavaScript' );\n\n    // use the function to greet Rebecca, passing in her\n    // name and a different message\n    greet( 'Rebecca', 'Thanks for joining us' );\n\n<div class=\"alert\">\n\nIn the above example, we use a function called `log`. This is a helper function that is defined by the JavaScript that powers this site &mdash; it is not a built-in JavaScript function. You can use `log` in the built-in editor for this site, but you'll need to use `console.log` in your normal code, and then view the output in your browser's console.\n\n</div>\n\nYou can try running this program by clicking the <i class=\"icon-eye-open\"></i>\nand it will copy the code to the built-in editor automatically. Once it's\nthere, you can click the <i class=\"icon-play\"></i> button to execute it; you\ncan also make changes to it. Press the <i class=\"icon-repeat\"></i> button to\nreturn to the original code.\n\nIt's OK if you don't understand everything that's going on in this program; in the rest of this section, we'll talk about variables, functions, and several other building blocks of JavaScript.\n\n## A comment about comments\n\nComments can be a useful tool for explaining what's happening in a piece of code. The contents of a comment will have no effect whatsoever on how your code runs. Some people like to heavily comment their code, while others prefer to include comments only to explain things that may not be immediately obvious.\n\nJavaScript allows for single-line and multi-line comments. A single-line comment begins with `//`; a multi-line comment begins with `/*` and ends with `*/`.\n\n    // This is a single line comment\n    var foo;\n\n    /*\n      This is a multi-line comment. It can go on\n      for several lines, like this.\n     */\n\nYou'll also sometimes see multi-line comments used for inline comments:\n\n    function cornify( unicorns /* integer */, rainbows /* integer */ ) {\n\n    }\n\n## The building blocks of JavaScript\n\n### Variables\n\nVariables are the way that we store values so we can use them later. Variables can contain any value &mdash; text, numbers, data (such as \"arrays\" and \"objects\"), even code (in the form of \"functions\"). We declare a variable using a `var` statement:\n\n    var myName = 'Rebecca';\n\nVariable names can be just about anything, as long as they don't begin with a number and don't include a hyphen.\n\nYou can define one variable per statement:\n\n    var a = 1;\n    var b = 'two';\n\nYou can also define multiple variables in a single statement, by separating them with commas:\n\n    var a = 1,\n        b = 'two';\n\nOnce you have assigned a value to a variable, you can use that variable whenever you want to get access to the value you stored.\n\n    log( myName ); // logs 'Rebecca'\n\nVariables are a key ingredient in adhering to the *Don't Repeat Yourself* philosophy. If you need to use a value more than once, you probably want to store it in a variable.\n\nWe'll talk more about variables in the next section, Functions.\n\n### Functions\n\nFunctions are a fundamental building block of JavaScript programs; they provide a way that we can put small pieces of functionality in a neatly-wrapped package. For example, consider a function that adds two numbers:\n\n    function(a, b) {\n      return a + b;\n    }\n\nThis function takes two **parameters**, `a` and `b`. It adds them together, and returns the result.\n\nThis is a valid bit of JavaScript, but as written, there's no way for us to *call* our function if we actually want to add two things. We can solve this by assigning our function to a variable:\n\n    var addTwoNumbers = function(a, b) {\n      return a + b;\n    };\n\nWhat we've done here is take a **function expression** and assign it to a variable. Now that we've done this, we can call our function by using the name of the variable, passing `1` and `2` as **arguments** into the function:\n\n    log( addTwoNumbers(1, 2) ); // logs 3\n\nWe could also use a **function declaration** to give our function a name:\n\n    function addTwoNumbers(a, b) {\n      return a + b;\n    }\n\nThis lets us call our function just like we did before, but this approach should be used with caution, as explained [in this post](http://javascriptweblog.wordpress.com/2010/07/06/function-declarations-vs-function-expressions/).\n\nBottom line: naming functions using the function declaration approach can have unexpected results if you don't fully understand a feature of JavaScript known as hoisting. The details of hoisting are beyond the scope of this guide, but for now we'll stick to assigning function expressions to variables.\n\n#### Functions and variable scope\n\nVariables that are declared inside a function with a `var` statement are only available inside of the function; this is generally desirable, and all variables should be declared with a `var` statement unless they are intended to be **global** &mdash; that is, available anywhere in your code. This usually isn't what you want, unless you want it to be possible for other code to change the value of the variable.\n\nWhat does it mean that a variable is only accessible inside of a function? Give\nthe following code a try:\n\n    ```<span class=\"caution\">caution</span> broken code\n    var myFunction = function() {\n      var foo = 'bar';\n    };\n\n    myFunction();\n    log( typeof foo ); // logs undefined!\n\nIn the example above, if we'd tried to actually use `foo` outside of the function &mdash; rather than just checking its type &mdash; our browser would have reported an error, and any code after the line where we used `foo` would not run.\n\nThe next example shows how we can have two variables with the same name, as long as each variable exists in a separate scope. In this example, we declare the variable `foo` and assign it the value `'qux'`; then, inside a function, we declare another variable named `foo`, and assign it the value `'bar'`. Notice how, outside of the function, the variable `foo` does not change, even when we create the variable `foo` inside the function.\n\n    var foo = 'qux';\n    var myFunction = function() {\n      var foo = 'bar';\n    };\n\n    log( foo ); // logs 'qux'\n    myFunction();\n    log( foo ); // still logs 'qux'\n\nDespite the fact that both variables have the same name, JavaScript considers the two variables as completely separate entities. This is just one of many reasons that it's important to give your variables meaningful names.\n\nVariable scope is one of the fundamental concepts of JavaScript, and one of the\nconcepts that people struggle with often. It's important to remember that:\n\n- you should almost always declare variables with a `var` statement\n- variables declared inside of a function using a `var` statement are not\n  available outside of that function\n- variables declared without a `var` statement are always global\n\nBeware that variables that are not declared with the `var` keyword are\nimplicitly global! In the following example, the variable `a` is available outside the function because it wasn't declared with the `var` keyword &mdash; this is generally undesirable.\n\n    ```<span class=\"caution\">caution</span> unsafe code\n    function test() {\n      a = 1;\n    }\n\n    test();\n\n    log( a ); // logs 1\n\n\n### Objects\n\nAs it turns out, most everything we work with in JavaScript is an object &mdash; in fact, there are only five kinds of values that are *not* objects:\n\n- strings (text)\n- booleans (true/false)\n- numbers\n- `undefined`\n- `null`\n\nThese values are called **primitives**, but even some of these values can be treated as though they were objects &mdash; more on that in a minute. But what's an object? Let's look at an example of a simple object:\n\n    var person = {\n      firstName : 'Boaz',\n      lastName : 'Sender'\n    };\n\nThe object we've created here has two **properties**: `firstName` and `lastName`. We've created it using the \"object literal syntax\" &mdash; that is, by putting a set of key-value pairs in `{ }`. Note that, for each pair, there is a colon between the key and the value, and there is a comma between each pair. Note also that there is *not* a comma after the last key-value pair &mdash; if you accidentally include a comma after the last pair, you will get errors in older browsers.\n\n#### Accessing properties\n\nWe've stored our object in a variable named `person`, which makes it easy to access its properties, using either *dot notation* or *bracket notation*.\n\n    var person = {\n      firstName : 'Boaz',\n      lastName : 'Sender'\n    };\n\n    log( 'First name: ' + person.firstName );     // dot notation\n    log( 'Last name: ' + person[ 'lastName' ] );  // bracket notation\n\nYou'll notice that with bracket notation, we used a quoted string for the property name we were after; with dot notation, we just used the literal property name, without quotes. Bracket notation is a useful approach if, say, the name of the property you're after is stored in a variable:\n\n    var person = {\n      firstName : 'Boaz',\n      lastName : 'Sender'\n    };\n\n    var prop = 'lastName';\n\n    log( 'Last name: ' + person[ prop ] );\n\nOnce we've created an object, we can modify its properties.\n\n    var person = {\n      firstName : 'Boaz',\n      lastName : 'Sender'\n    };\n\n    person.firstName = 'Ben';\n    person.lastName = 'Alman';\n\n    log( 'First name: ' + person.firstName );\n    log( 'Last name: ' + person.lastName );\n\nThis aspect of JavaScript is both blessing and curse. It means that objects are incredibly flexible, but it also means that there's no \"privacy.\" Any code can easily overwrite the value of a property of any object to which it has access &mdash; another reason why it's important to keep variables out of the global scope unless it's OK for other code to modify them.\n\n#### Object methods\n\n**Methods** of an object are just properties whose values are functions. Let's add a `.greet()` method to our `person` object:\n\n    var person = {\n      firstName : 'Boaz',\n      lastName : 'Sender',\n      greet : function(name) {\n        log( 'Hi, ' + name );\n      }\n    };\n\n    person.greet( person.firstName );\n\nThe `.greet()` method in the example above received a string, `name`, as its argument. When we called the method, though, we simply passed in the value of the `firstName` property of the `person` object. If we wanted a super-flexible `.greet()` method that could greet anyone, this might be what we want. But it probably makes more sense that the `.greet()` method will greet the particular person.\n\n#### The meaning of `this`\n\nInside of a method &mdash; indeed, inside of any function &mdash; there is a special keyword available to us: `this`. It refers to the object that is the context in which the function was called.\n\nWhen we call `person.greet()`, the context object is `person` itself. This means that we can use `this` to access a property of the `person` object from directly within the `.greet()` method.\n\n<div class=\"alert alert-info\">\n\nThe meaning of `this` can be incredibly perplexing to new JavaScript developers, and you should take comfort in knowing that jQuery largely makes it so that you don't need to understand it for a while. However, no discussion of objects and methods is complete without talking about `this` at least a little. In short, if this section is confusing, feel free to skip to [Objects in jQuery](#objects-in-jquery), and come back to it when you're ready.\n\n</div>\n\nLet's look at how we could use `this` in our method.\n\n    var person = {\n      firstName : 'Boaz',\n      lastName : 'Sender',\n      greet : function() {\n        log( 'Hi, ' + this.firstName );\n      }\n    };\n\n    person.greet();\n\nNot so confusing so far, right? The confusion arises because *the meaning of `this` can change* &mdash; as mentioned above, it depends on the context in which the function was called! Consider the following code:\n\n    ```<span class=\"caution\">caution</span> broken code\n    var person = {\n      firstName : 'Boaz',\n      lastName : 'Sender',\n      greet : function() {\n        log( 'Hi, ' + this.firstName );\n      }\n    };\n\n    var sayIt = person.greet; // store the method in a variable\n\n    sayIt(); // logs 'Hi, undefined' -- uh-oh\n\nWhen we store the `.greet()` method in a variable `sayIt` and then call `sayIt()`, the context object changes to the global `window` object, *not the `person` object*. Since the `window` object doesn't have a property `firstName`, we get `undefined` when we try to access it.\n\nWhat's a developer to do? First, be aware that storing object methods in variables can have unintended consequences for the meaning of `this`. Second, be aware that you can force the meaning of `this` to be what you want it to be, using the `.call()` or `.apply()` method on the function itself.\n\n    var person = {\n      firstName : 'Boaz',\n      lastName : 'Sender',\n      greet : function() {\n        log( 'Hi, ' + this.firstName );\n      }\n    };\n\n    var sayIt = person.greet;\n\n    sayIt.call( person );\n\nBoth `.call()` and the very similar `.apply()` method also let us pass arguments to the function we're invoking. Imagine if our greet method took some arguments; we could pass those arguments using `.call()` like this:\n\n    var person = {\n      firstName : 'Boaz',\n      lastName : 'Sender',\n      greet : function(greeting, punctuation) {\n        log( greeting + ', ' + this.firstName + punctuation );\n      }\n    };\n\n    var sayIt = person.greet;\n\n    sayIt.call( person, 'Hello', '!!1!!1' );\n\nWe could do the same thing using `.apply()`, but we'd pass the arguments within a single array instead of as separate arguments:\n\n    var person = {\n      firstName : 'Boaz',\n      lastName : 'Sender',\n      greet : function(greeting, punctuation) {\n        log( greeting + ', ' + this.firstName + punctuation );\n      }\n    };\n\n    var sayIt = person.greet;\n\n    sayIt.apply( person, [ 'Hello', '!!1!!1' ] );\n\n<div class=\"alert alert-info\">\n\nFor more details about `.call()` and `.apply()`, see the MDN documentation on [`.call()`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function/call) and [`.apply()`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function/apply).\n\n</div>\n\n<a name=\"objects-in-jquery\"></a>\n#### Objects in jQuery\n\nWe've barely scratched the surface of objects, but you now know the basics you'll need to know to work with objects as you learn jQuery. In basic jQuery, you'll mainly use objects to provide configuration options. For example, you can provide an object to change several CSS properties on an element at once:\n\n    $('#main').css({\n      color: 'red',\n      border: '1px solid blue'\n    });\n\nAs far as `this`, jQuery tends to take control over its meaning. In the case of [event handlers](/chapter/events), `this` will refer to the element to which you bound the handler; in the case of [iterating over a set of elements in a selection](/chapter/jquery-basics#explicit-iteration), `this` will refer to the current element in the iteration. You shouldn't need to worry about understanding `this` too much during your initial learning &mdash; it's just a good thing to keep in mind as your learning continues.\n\n#### Further reading\n\nThe [MDN JavaScript Guide](https://developer.mozilla.org/en-US/docs/JavaScript/Guide/Working_with_Objects) goes into detail about topics such as object prototypes, constructor functions, and deleting object properties.\n\n\n### Arrays\n\nArrays are a type of object used to store lists of values. They are a handy way to store a set of related items of the same type (such as strings), though in reality, an array can include multiple types of items, including other arrays.\n\nThe preferred way to create an array is to use the *array literal notation*:\n\n    var myArray = [ 'a', 'b', 'c' ];\n\n<div class=\"alert alert-info\">\n\nYou will sometimes see code that creates an array using the `new Array('a', 'b', 'c')` construct. This is generally frowned upon among JavaScript developers; it provides no advantages over the literal construct, and has some disadvantages, such as the fact that `new Array(3)` will create an array with three undefined elements, rather than the array `[ 3 ]`.\n\n</div>\n\nYou can access properties of arrays (sometimes called **elements**) with the same bracket notation we used for objects. Each element is automatically given a name based on its position in the array. Be careful, though: the numbers start at zero! Lets look at an example array with three elements:\n\n    ```<span class=\"caution\">caution</span> antipattern\n    var myArray = [ 'a', 'b', 'c' ];\n    var firstItem = myArray[ \"0\" ]; // access the first item\n\nWhen retrieving array elements, it's usually much more convenient to use numbers to specify the **index** of the element you're after:\n\n    var myArray = [ 'a', 'b', 'c' ];\n    var firstItem = myArray[ 0 ];\n\n    var secondItem = myArray[ 1 ]; // access the item at index 1\n    log( secondItem ); // logs 'b'\n\nWe can determine how many items are in an array by accessing an array's `length` property:\n\n    var myArray = [ 'a', 'b', 'c' ];\n    var len = myArray.length;\n    log( len ); // logs 3\n\n#### `for` Loops: Iterating over Arrays\n\nSince we know how to get the length of an array, and we know that an array's first item is at index `0`, we can iterate over the items in an array using a `for` loop:\n\n    var myArray = [ 'a', 'b', 'c' ];\n    var i;\n    var len = myArray.length;\n\n    // we'll use the variable i as our index; it starts at 0,\n    // and we increment it by 1 (using i++) until i is no longer\n    // less than the length of the array\n    for (i = 0; i < len; i = i + 1) {\n      log( 'item at index ' + i + ' is ' + myArray[ i ] );\n    }\n\nThere is a whole lot more that you can do with arrays; for a complete reference, see the [Mozilla Developer Network's Array documentation](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/).\n\n## Logic and Truthiness\n\n<a name=\"logic-and-truthiness\"></a>\n\nJavaScript provides `if` and `else`, as well as the *ternary operator*, to allow us to do certain things only when certain conditions are met. JavaScript determines whether a condition is met by evaluating a value or an expression for its \"truthiness.\" Because JavaScript is a dynamically typed language, we can use any value or combination of values; however, the rules by which JavaScript determines whether a given value or expression is `true` or `false` can be confusing.\n\nHere's an example of a simple `if` statement in JavaScript. It evaluates the truthiness of the number `1`; because `1` is **truthy**, the code inside the block &mdash; delineated by `{` and `}` &mdash; will run.\n\n    if ( 1 ) {\n      // this code will run!\n      log( '1 is truthy' );\n    }\n\nAs it turns out, most values in JavaScript are truthy &mdash; in fact, there are only five values in JavaScript that are **falsy**:\n\n- `undefined` (the default value of declared variables that are not assigned a\n  value)\n- `null`\n- `NaN` (\"not a number\")\n- `0` (the number zero)\n- `''` (an empty string)\n\nWhen we want to test whether a value is \"falsy,\" we can use the `!` operator:\n\n    var a = '';\n\n    if ( !a ) {\n      // this code will run if a is falsy\n      log( 'a was falsy' );\n    }\n\nThe value `NaN` is a special case. Values that are `NaN` will evaluate to false\nin a simple conditional expression:\n\n    var notANumber = 'four' - 'five';\n\n    if ( !notANumber ) {\n      // this code will run\n      log( '!notANumber was truthy' );\n    }\n\nHowever, if we compare the value `NaN` to `false`, we get back a falsy value:\n\n    var notANumber = 'four' - 'five';\n\n    if ( notANumber == false ) {\n      // this code will not run!\n      log( 'notANumber was falsy' );\n    } else {\n      // this code will run\n      log( 'notANumber was truthy' );\n    }\n\nIt's important to remember that *all other values aside from the five values\nlisted above* are truthy. This includes empty arrays, empty objects, all\nnon-empty strings (including the string `'0'`), and all numbers other than `0`.\n\n<div class=\"alert\">\n\nIt is possible to write single-line `if` and `else` statements without using curly braces. This practice is discouraged, as it can make code difficult to read and maintain. It is mentioned here simply because you may encounter it in others' code.\n\n</div>\n\n### Logical Operators\n\nLogical operators allow you to evaluate operands using AND (`&&`) and OR (`||`) operations.\n\n    var foo = 1;\n    var bar = 0;\n    var baz = 2;\n\n    foo || bar;     // returns 1, which is truthy\n    bar || foo;     // returns 1, which is truthy\n\n    foo && bar;     // returns 0, which is falsy\n    foo && baz;     // returns 2, which is truthy\n\nIn the case of the `||` operator, the value returned is the first value that proves the statement truthy, or the last value. In the case of the `&&` operator, the value returned is the first value that proves the statement falsy, or the last value.\n\nYou'll sometimes see logical operators used as a clever way to control code execution:\n\n    foo && bar();   // runs bar() only if foo is truthy\n\n    var bar = baz || createBar();  // use baz as value for bar unless\n                                   // baz is falsy; in that case, create bar\n\nThis style is elegant and pleasantly terse, but it can be difficult to read, especially for beginners. You should be aware of what it means if you come across it in code, but you may want to refrain from using this style at first, and use traditional `if` and `else` statements for clarity.\n\n### The Ternary Operator\n\nOften, you'll want to set a variable's value differently depending on whether a certain condition is true or false. Of course, you could achieve this with an `if` and `else` statement:\n\n    ```<span class=\"caution\">caution</span> antipattern\n    var propertyName;\n\n    if (dim === 'width') {\n      propertyName = 'clientWidth';\n    } else {\n      propertyName = 'clientHeight';\n    }\n\nHowever, the ternary operator provides a much more succinct way of conditionally setting the value of a variable:\n\n    var propertyName = ( dim === 'width' ) ? 'clientWidth' : 'clientHeight';\n\nThe statement before the `?` is evaluated for its truthiness. If it is truthy, the first value (`'clientWidth'`) is used as the value of the `propertyName` variable; otherwise, the second value (`'clientHeight'`) is used.\n\n\n## JavaScript gotchas\n\nIn addition to variable scope and truthiness, there are many other gotchas in JavaScript. Let's take a look at a few of them.\n\n### Naming things\n\n<a name=\"naming-things\"></a>\n\nValid names in JavaScript begin with a letter or certain symbols, followed by\nzero or more letters, digits, underscores, or symbols. Names may not begin with\nnumbers, and may not include hyphens. Besides these rules, you can name your variables however you'd like! All of these names are valid:\n\n- `a`\n- `a1`\n- `foo_bar`\n- `fooBarBaz`\n- `$fooBar`\n- `_foo`\n- `__foo__`\n\nThere are some conventions that people use when naming things in JavaScript, but these are optional, and don't have any effect on how the code works:\n\n- Names that begin with `_` are usually \"private\" (more on this later).\n- Names that begin with uppercase letters are usually \"constructors,\" used to create new instances of objects (more on this later as well).\n- In code that uses jQuery, names that begin with `$` usually refer to jQuery objects.\n\n### Reserved words\n\n<a name=\"reserved-words\"></a>\n\nJavaScript reserves certain words for its own use; you should avoid using these\nwords for the names of things.\n\n<pre>\nabstract boolean break byte case catch char class const continue debugger\ndefault delete do double else enum export extends false final finally float\nfor function goto if implements import in instanceof int interface long\nnative new null package private protected public return short static super\nswitch synchronized this throw throws transient true try typeof var\nvolatile void while with\n</pre>\n\nIf you must use one of these names as the name of an object property, you\nshould quote the property name:\n\n    var myObject = {\n      'class': 'tasty'\n    };\n\n### Operations on numbers and strings\n\nWorking with numbers in JavaScript can be a bit unpredictable, due to the way JavaScript represents numbers internally. For example, addition using decimals can have results that are close but not quite accurate:\n\n    log( 0.0001 + 0.0002 ); // 0.00030000000000000003\n\nThis won't come up often when working with jQuery, but it's an important issue to be aware of, especially if you're working with decimal numbers like currency. If you're doing mathematical operations that require precision, you should convert values to integers before working with them, and convert them back when you're done.\n\nJavaScript is a loosely-typed language. If you try to do mathematical\noperations using values that are not numbers, *JavaScript will not throw\nerrors*, and the result may not be what you'd expect.\n\n    log( 'a' + 2 );           // 'a2'\n    log( '4' + 3 );           // '43'\n    log( 'five' - '4' );      // NaN (not a number)\n    log( - '1' );             // -1\n    log( 1 + true );          // 2\n    log( 1 == true );         // true\n    log( 1 === true );        // false\n\n## Further reading\n\nWe've only scratched the surface of JavaScript. The Mozilla Developer Network\nis an excellent resource for information about the JavaScript language,\nparticularly their [JavaScript\nGuide](https://developer.mozilla.org/en/JavaScript/Guide). Specifically, you'll\ndo well to read the following articles:\n\n- [JavaScript Overview](https://developer.mozilla.org/en/JavaScript/Guide/JavaScript_Overview)\n- [Values, variables, and literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_types)\n- [Functions](https://developer.mozilla.org/en/JavaScript/Guide/Functions)\n- [Immediately Invoked Function Expressions](http://benalman.com/news/2010/11/immediately-invoked-function-expression/)\n- [Arrays](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/)\n"
  },
  {
    "path": "content/javascript-basics/sandbox/index.html",
    "content": "<h3>JavaScript Basics Sandbox</h3>\n\n<p>This is some HTML that you can use to try out JavaScript in the editor on\nthe left.</p>\n"
  },
  {
    "path": "content/jquery-basics/index.md",
    "content": "title: jQuery Basics\nprevious:\n  name: JavaScript Basics\n  path: /chapter/javascript-basics\nsandbox: /sandbox/jquery-basics\nnext:\n  name: Traversing & Manipulating\n  path: /chapter/traversing-manipulating\nlinks:\n  - name: jQuery API Documentation\n    path: http://api.jquery.com/\n  - name: Selector Documentation\n    path: http://api.jquery.com/category/selectors/\n---\n\nThe jQuery library makes it easy to manipulate a page of HTML after it's\ndisplayed by the browser. It also provides tools that help you listen for a\nuser to interact with your page, tools that help you create animations in your\npage, and tools that let you communicate with a server without reloading the\npage.  We'll get to those in a bit. First, let's look at some jQuery basics,\nand at how we can use jQuery to perform its core functionality: getting some\nelements and doing something with them.\n\n<div class=\"alert alert-info\">\n\nThis guide assumes that you understand [HTML](https://developer.mozilla.org/en-US/docs/HTML/Introduction) and [CSS Selectors](http://www.w3.org/TR/CSS2/selector.html). If you are not familiar with how you can use CSS selectors to target elements, you should spend some time getting up to speed before trying to work through this guide.\n\n</div>\n\n## What&rsquo;s $, anyway?\n\nThe jQuery library provides the `jQuery` function, which lets you select\nelements using CSS selectors.\n\n    var listItems = jQuery( 'li' );\n\nOf course, if you've seen any jQuery code, you're probably more accustomed to\nseeing something like this:\n\n    var listItems = $( 'li' );\n\nAs discussed in the [JavaScript Basics](/chapter/javascript-basics#naming-things) section, valid names in JavaScript can be pretty much anything, as long as they don't begin with a number and don't include a hyphen. So, the `$` in the code above is just a shorter, more convenient name for the `jQuery`\nfunction; indeed, in the [jQuery source\ncode](https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js), you'll\nfind this near the end:\n\n    // Expose jQuery to the global object\n    window.jQuery = window.$ = jQuery;\n\n\nWhen you call the `$()` function and pass a selector to it, you create a new\njQuery object. Of course, in JavaScript, functions are objects too, so that\nmeans that `$` (and `jQuery`, of course) has properties and methods, too. For\nexample, you can refer to the `$.support` property for information on what the\ncurrent browser environment supports, and you use the `$.ajax` method to make\nan AJAX request.\n\n<div class=\"alert\">\n\nFor the rest of this guide, we'll use `$` instead of `jQuery` for the sake of\nbrevity. Note that if your page contains more than one JavaScript library, then\n`$` may be used by another library, which can cause jQuery not to work. If you\nexperience this, you should consider using\n[jQuery.noConflict](http://api.jquery.com/jQuery.noConflict/) before loading\nthe other libraries.\n\n</div>\n\n\n## $(document).ready()\n\nBefore you can safely use jQuery to do anything to your page, you need to\nensure that the page is in a state where it's ready to be manipulated. With\njQuery, we accomplish this by putting our code in a function, and then passing that function to `$(document).ready()`. As you can see here, the function we pass can just be an anonymous function.\n\n    $( document ).ready(function() {\n      console.log( 'ready!' );\n    });\n\nThis will run the function that we pass to `.ready()` once the document is\nready. What's going on here? We're using `$(document)` to create a jQuery\nobject from our page's `document`, and then calling the `.ready()` function on\nthat object, passing it the function we want to execute.\n\nSince this is something you'll find yourself doing a lot, there's a shorthand\nmethod for this if you prefer &mdash; the `$()` function does double duty as an\nalias for `$(document).ready()` if you pass it a function:\n\n    $(function() {\n      console.log( 'ready!' );\n    });\n\n<div class=\"alert\">\n\nFor the rest of this guide, we'll assume that the code we're looking at is\nenclosed in `$(document).ready(function() { ... });`, and we'll leave that part\nout for brevity.\n\n</div>\n\n## Get some elements\n\nThe simplest thing we can do with jQuery is get some elements and do something\nwith them. If you understand [CSS](https://developer.mozilla.org/en/CSS)\nselectors, getting some elements is very straightforward: you simply pass the\nappropriate selector to `$()`.\n\n    $( '#header' ); // select the element with an ID of 'header'\n    $( 'li' );      // select all list items on the page\n    $( 'ul li' );   // select list items that are in unordered lists\n    $( '.person' ); // select all elements with a class of 'person'\n\nIt's important to understand that any selection you make will only contain\nelements that existed in the page when you made the selection. That is, if you\nwrite `var anchors = $( 'a' );` and then add another `<a>` element to your page\nlater, then your `anchors` variable will not contain that new element.\n\n### Other ways to create a jQuery object\n\nIn addition to passing a simple selector to `$()`, you can create jQuery\nobjects in a few other ways:\n\n    // create a jQuery object from a DOM element\n    $( document.body.children[0] );\n\n    // create a jQuery object from a list of DOM elements\n    $( [ window, document ] );\n\n    // make a selection in the context of a DOM element\n    var firstBodyChild = document.body.children[0];\n    $( 'li', firstBodyChild );\n\n    // make a selection within a previous selection\n    var paragraph = $( 'p' );\n    $( 'a', paragraph );\n\n### Did my selection get anything?\n\nSometimes, you'll only want to do something when your selection matches some\nelements. Because the `$()` function *always* returns a jQuery object, and an\nobject is always [truthy](/chapter/javascript-basics#logic-and-truthiness), you'll need to test the contents of your selection to\ndetermine whether anything was found.\n\n    ```<span class=\"caution\">caution</span> broken code\n    if ( $( '#nonexistent' ) ) {\n      // Wrong! This code will always run!\n    }\n\n    if ( $( '#nonexistent' ).length > 0 ) {\n      // Correct! This code will only run if there's an element in your page\n      // with an ID of 'nonexistent'\n    }\n\nWe can shorten our check even further if we remember that `0` is a falsy value:\n\n    if ( $( '#nonexistent' ).length ) {\n      // This code will only run if there's a matching element\n    }\n\n### Getting single elements from a selection\n\nIf you need to work with the raw DOM element from a selection, you need to\naccess that element from the jQuery object. For example, if you wanted to\naccess an `<input>` element's `value` property directly, you would want to work\nwith the raw DOM element.\n\n    var listItems = $( 'li' );\n    var rawListItem = listItems[0]; // or listItems.get( 0 )\n    var html = rawListItem.innerHTML;\n\nNote that you *cannot* call jQuery methods on raw DOM elements. So, the\nfollowing will not work:\n\n    ```<span class=\"caution\">caution</span> broken code\n    var listItems = $( 'li' );\n    var rawListItem = listItems[0];\n    var html = rawListItem.html();\n    // Object #<HTMLInputElement> has no method 'html'\n\nIf you need to work with a single element in a selection and you want to be\nable to use jQuery methods on that element, then you can get a new jQuery\nobject containing a single element by using `.eq()` and passing the index of\nthe element you're after.\n\n    var listItems = $( 'li' );\n    var secondListItem = listItems.eq( 1 );\n    secondListItem.remove();\n\n## Creating new elements\n\nThe `$` function has one last role: creating new elements. If you pass an HTML\nsnippet to `$()`, it will create a new element in memory &mdash; that is, the\nelement will be created, but it won't be placed on the page until you place it\non the page.\n\n    $( '<p>' ); // creates a new <p> element with no content\n    $( '<p>Hello!</p>' ); // creates a new <p> element with content\n    $( '<p class=\"greet\">Hello!</p>' ); // creates a new <p> with content and class\n\nYou can also create an element by passing an object with information about how\nto create the element:\n\n    $( '<p>', {\n      html: 'Hello!',\n      'class': 'greet'\n    });\n\nNote that we must wrap the `class` property in quotation marks, as `class` is a [reserved word](/chapter/javascript-basics#reserved-words) in JavaScript, and failing to quote it will cause errors in some browsers. See [the jQuery documentation](http://api.jquery.com/jQuery/#jQuery2) for details on the various properties you can include in the object.\n\nWe'll look at how to place created elements into the document in the next\nchapter, which covers [traversing and\nmanipulating](/chapter/traversing-manipulating) the document.\n\n## Working with selections\n\nOnce you've created a jQuery object that contains your selection, you probably\nwant to do something with your selection. Before we do that, though, there are\na few concepts that are key to understanding the jQuery way of doing things.\n\n### Testing a selection\n\nWe can determine whether a selection meets certain criteria using the `.is()`\nmethod. The most common way to use this method is to provide a selector as its\nsole argument. It returns `true` or `false` depending on whether the selection\nmatches the selector:\n\n    $( 'li' ).eq( 0 ).is( '.special' ); // false\n    $( 'li' ).eq( 1 ).is( '.special' ); // true\n\nYou can also pass to the `.is()` method a jQuery object, a raw DOM element, or\neven a function if you need to do a more complex test. See [the\ndocumentation](http://api.jquery.com/is/) for more details.\n\n### Getters, setters, and implicit iteration\n\nThere are many methods you can call once you've made a selection. These methods\ngenerally fall into two categories: getters and setters. Getters retrieve a\npiece of information from the selection, and setters alter the selection in\nsome way. In almost all cases, getters operate only on the first element in a\nselection (`.text()` is a notable exception); setters operate on *all* elements\nin a selection, using what's known as *implicit iteration*.\n\nImplicit iteration means that jQuery automatically iterates over all the\nelements in a selection when you call a setter method on that selection. This\nmeans that, when you want to do something to all of the elements in a\nselection, you don't have to call a setter method on every item in your selection &mdash;\nyou just call the method on the selection itself, and jQuery iterates over the\nelements for you.\n\nLet's say that you want to change the HTML of all of the list items on your\npage. To do this, we'd use the `.html()` method, which will change the HTML of\n*all* of the selected list items.\n\n    $( 'li' ).html( 'New HTML' );\n\nYou can also pass a function to jQuery's setter methods. This\nfunction's return value is used as the new value, and it receives two\narguments: the index of the element in the selection, and the old value of the\nthing you're trying to change. This is useful when you need information about\nan element's current state in order to properly set the new state.\n\n    $( 'li' ).html(function( index, oldHtml ) {\n      return oldHtml + '!!!'\n    });\n\n### Explicit iteration\n\n<a name=\"explicit-iteration\"></a>\nSometimes, the task you're trying to accomplish won't fit neatly into one of\njQuery's existing methods, and you'll need to explicitly iterate over a\nselection. The `.each()` method lets you do this. In the following code, we use\nit to add a `<b>` tag at the beginning of the list item, containing the index\nof the list item.\n\n    $( 'li' ).each(function( index, elem ) {\n      // this: the current, raw DOM element\n      // index: the current element's index in the selection\n      // elem: the current, raw DOM element (same as this)\n      $( elem ).prepend( '<b>' + index + ': </b>' );\n    });\n\n<div class=\"alert alert-info\">\n\nYou'll notice that, inside the function that we pass to `.each()`, we have access to the current raw DOM element in two ways: as `this` and as `elem`. As discussed in the [JavaScript Basics section](/chapter/javascript-basics), `this` is a special keyword in JavaScript, referring to the object that is the current context of the function.\n\nIn jQuery, `this` almost always refers to the raw DOM element on which the function is currently operating. So, in the case of `.each()`, it refers to the current element in the set of elements we're iterating over.\n\n</div>\n\n### Chaining\n\nOne of the most lucrative parts of jQuery is the ability to \"chain\" methods\ntogether. This means that we can call a series of methods on a selection\nwithout having to repeat the selection or store the selection in a variable. We\ncan even make new selections based on previous selections, all without breaking\nthe chain.\n\n    $( 'li' )\n      .click(function() {\n        $( this ).addClass( 'clicked' );\n      })\n      .find( 'span' )\n        .attr( 'title', 'Hover over me' );\n\nChaining is possible because every setter method in jQuery returns the\nselection on which it was called. It's extraordinarily powerful, and it's a\nfeature that many libraries have adopted. However, it must be used with care.\nExtensive chaining can make code *extremely* difficult to read, modify, and\ndebug. There is no hard-and-fast rule on how long a chain should be, but even\nthe simple chain above is probably worth refactoring for readability.\n\n    var listItems = $( 'li' );\n    var spans = listItems.find( 'span' );\n\n    listItems\n      .click(function() {\n        $( this ).addClass( 'clicked' );\n      });\n\n    spans.attr( 'title', 'Hover over me' );\n\n## Conclusion\n\nWe've gotten a great overview of how jQuery ticks; in the next section, we'll\ntake a look at how to actually start accomplishing things with it!\n"
  },
  {
    "path": "content/jquery-basics/sandbox/index.html",
    "content": "<h3>Sandbox</h3>\n\n<p>This is some HTML that you can use to try out <a\nhref=\"http://jquery.com\">jQuery</a> in the editor on the left.  Use your\nbrowser's console to see the HTML.</p>\n\n<ul id=\"my-unordered-list\">\n  <li><span><i>HTML</i></span></li>\n  <li class=\"special\"><a href=\"https://developer.mozilla.org/en/CSS/\"><i>CSS</i></a></li>\n  <li>JavaScript</li>\n</ul>\n"
  },
  {
    "path": "content/traversing-manipulating/index.md",
    "content": "title: Traversing & Manipulating\nsandbox: /sandbox/traversing-manipulating\nprevious:\n  name: jQuery Basics\n  path: /chapter/jquery-basics\nnext:\n  name: Events & Event Delegation\n  path: /chapter/events\nlinks:\n  - name: Traversal Documentation\n    path: http://api.jquery.com/category/traversing/\n  - name: Manipulation Documentation\n    path: http://api.jquery.com/category/manipulation/\n---\n\njQuery provides powerful tools for finding the element or elements you're\nafter, and then working with those elements to achieve a desired result.\nThrough its traversal and manipulation methods, it takes tasks that would be\nrather painful to achieve using native DOM manipulation, and makes those tasks\nfairly straightforward and intuitive.\n\nIn this chapter, we'll take a look at some (but not all) of those traversal and\nmanipulation methods. Before we do, though, there are a few important\nvocabulary terms that you should know. Let's consider a bit of HTML:\n\n    <ul>\n        <li>\n            <span>\n                <i>Foo</i>\n            </span>\n        </li>\n        <li>Bar</li>\n    </ul>\n\n- The first list item is a **child** of the unordered list.\n- The unordered list is the **parent** of both list items.\n- The span is a **descendant** of the unordered list.\n- The unordered list is an **ancestor** of everything inside of it.\n- The two list items are **siblings**.\n\n\n\n## Traversal\n\njQuery lets us \"traverse\" &mdash; or move through &mdash; the HTML elements that make up our page. First, we make an initial selection, and then move through the DOM relative to that selection. As we move through the DOM, we're altering our original selection; in some cases, we're replacing the original selection with the new selection, while in other cases, we're adding to or subtracting from the original selection.\n\n### Filtering selections\n\nYou can filter an existing selection to only include elements that match a\ncertain criteria. For example, you can filter a selection in the following ways:\n\n    var listItems = $( 'li' );\n\n    // filter the selection to only items with a class of 'special'\n    var special = listItems.filter( '.special' );\n\n    // filter the selection to only items without a class of 'special'\n    var notSpecial = listItems.not( '.special' );\n\n    // filter the selection to only items that contain a span\n    var hasSpans = listItems.has( 'span' );\n\nImportantly, note that `.not()` is *not* the opposite of `.is()`. The `.is()`\nmethod returns a boolean, while the `.not()` method returns a new jQuery\nobject.\n\n### Finding elements relative to a selection\n\nAn initial selection can serve as the \"home base\" for making additional\nselections; for example, you may have an existing selection that contains an\nindividual list item, and then need to work with its siblings or the unordered\nlist that contains the item. You can make a new selection relative to an\nexisting selection easily:\n\n    // get the first list item on the page\n    var listItem = $( 'li' ).first(); // also: .last()\n\n    // get the siblings of the list item\n    var siblings = listItem.siblings();\n\n    // get the next sibling of the list item\n    var nextSibling = listItem.next(); // also: .prev()\n\n    // get the list item's parent\n    var list = listItem.parent();\n\n    // get the list items that are immediate children of the list\n    var listItems = list.children();\n\n    // get ALL list items in the list, including nested ones\n    var allListItems = list.find( 'li' );\n\n    // find all ancestors of the list item that have a class of \"module\"\n    var modules = listItem.parents( '.module' );\n\n    // find the closest ancestor of the list item that has a class of \"module\"\n    var module = listItem.closest( '.module' );\n\nYou can also add to an existing selection by using the `.add()` method.\nYou can pass it a selector, an array of elements, a string of HTML, or a jQuery\nobject.\n\n    var list = $( '#my-unordered-list' );\n\n    // do some stuff with the list, and then ...\n\n    var listAndListItems = list.add( '#my-unordered-list li' );\n\n### Getting back to your original selection\n\nWhen you use one of the traversal methods to find some elements relative to an initial selection, jQuery stores a reference to your initial selection in case you want to get back to it. For example, consider a case where you select an unordered list, make some changes to its list items, and then want to work with the unordered list again. You can use the jQuery `.end()` method to get back to your original selection:\n\n    $( '#my-unordered-list' )\n      .find('li')\n\n      // now we're working with the list items\n      .addClass('special')\n\n    .end()\n\n    // now we're back to working with the list\n    .addClass('super-special');\n\nThe `.end()` method makes it easy to make a lot of changes in a single statement. This practice does little for code clarity, though; it's a little like telling a story without stopping to take a breath. Because of this, you should use it sparingly. More often than not, it will lead to code that's difficult to read, maintain, and debug.\n\nA better solution might look like this:\n\n    var list = $( '#my-unordered-list' );\n    var listItems = list.find('li');\n\n    listItems.addClass( 'special' );\n    list.addClass( 'super-special' );\n\njQuery also provides the `.addBack()` method if you want to add your original selection to your current selection. For example:\n\n    $( 'li.special' )\n\n      .siblings()\n\n        // now we're working with the siblings of the original selection\n        .removeClass( 'important' )\n\n      .addBack()\n\n      // now we're working with the original li's AND their siblings\n      .addClass( 'urgent' );\n\nConfused? Just like the `.end()` method can result in code that's difficult to work with, the `.addBack()` method &mdash; while sometimes useful &mdash; can easily lead to complex code. A better solution would use the `.add()` method to combine two original selections instead:\n\n    var specialListItems = $( 'li.special' );\n    var otherListItems = specialListItems.siblings();\n\n    otherListItems.removeClass( 'important' );\n    specialListItems.add( otherListItems ).addClass( 'urgent' );\n\nThere are several traversal methods we haven't covered here; you can read about\nall of the traversal methods in the [traversing\ndocumentation](http://api.jquery.com/category/traversing/).\n\n## Manipulation\n\njQuery's manipulation methods allow you to alter the DOM of your page using a\nsyntax that's much friendlier than the one provided by native DOM manipulation\nmethods. Manipulation methods return the jQuery object on which they were called,\nwhich means you can chain them or combine them with other jQuery methods such\nas the ones discussed above.\n\n### Altering elements\n\nThere are myriad ways to alter elements using jQuery. Here, we'll look at how\nto achieve some of the most common tasks.\n\n#### Adding and removing classes\n\nThe class attribute on an element can be used to target CSS rules, and can also\nbe a useful way to target jQuery selections. For example, an element may have a\nclass of `hidden`, with a corresponding CSS rule that causes elements with that\nclass to have their `display` set to `none`. Using jQuery, we can add and\nremove classes to affect the display of elements.\n\n    $( 'li' ).addClass( 'hidden' );\n    $( 'li' ).eq( 1 ).removeClass( 'hidden' );\n\nIf your use case requires adding and removing a class repeatedly, jQuery provides the `.toggleClass()` method. The following code adds the class `hidden` if it is not present, and removes it if it is present.\n\n    $( 'li' ).eq( 1 ).toggleClass( 'hidden' );\n\n#### Changing style\n\n<div class=\"alert alert-info\">\n\nWhenever possible, you should use classes\ncombined with CSS rules to affect the *presentation* of elements, and use\njQuery only to add and remove those classes as shown above. In this section,\nwe'll see how to alter the style of an element directly, but CSS rules combined\nwith classes are always preferable if they can achieve the desired effect.\n\n</div>\n\nWhen you can't achieve your goal via adding and removing classes, jQuery\nprovides the `.css()` method to allow you to set the style of elements\ndirectly. This is usually required when you want to set numeric values that can\nonly be calculated at runtime &mdash; for example, positioning information. The\n`.css()` method should *not* be used to set simple styles, such as `display:\nnone` &mdash; in almost all cases, it is preferable to achieve these changes via\nclasses and CSS.\n\nFor example, consider the case where you want to style an element based on the\nwidth of its parent element; it might be difficult or impossible to know the\nwidth of the parent element ahead of time in a flexible layout. In this case,\nwe might resort to the `.css()` method for styling.\n\n    var list = $( '#my-unordered-list' );\n    var width = Math.floor( list.width() * 0.1 );\n\n    list.find('li').each(function( index, elem ) {\n      var padding = width * index;\n      $( elem ).css( 'padding-left', padding + 'px' );\n    });\n\nIf you need to set multiple properties at once, you can pass an object to the\n`.css()` method rather than a property name and a value. Note that you will\nneed to quote any property names that include a hyphen.\n\n    $( 'li' ).eq( 1 ).css({\n      'font-size': '20px',\n      'padding-left': '20px'\n    });\n\n#### Changing form values\n\njQuery provides the `.val()` method for altering the value of form elements\nsuch as `select` and `input` elements.\n\nFor text `input` elements, you can set their content by passing a string to the\n`.val()` method:\n\n    $( 'input[type=\"text\"]' ).val( 'new value' );\n\nFor `select` elements, you can set the chosen option using `.val()` as well:\n\n    $( 'select' ).val( '2' );\n\nFor checkbox `input` elements, you'll need to set the `checked` property on\nthe element using the `.prop()` method.\n\n    $( 'input[type=\"checkbox\"]' ).prop( 'checked', 'checked' );\n\n<div class=\"alert alert-info\">\n\nThe `.prop()` method was introduced in jQuery 1.6; prior versions of jQuery used the `.attr()` method for this purpose. It continues to work in later versions of jQuery, but in the case of the `checked` property, it ultimately just calls the `.prop()` method. If you are using a version of jQuery later than 1.6, you should always use the `.prop()` method to set the `checked` property and other DOM element properties. See the [documentation](http://api.jquery.com/prop/) for a more detailed explanation.\n\n</div>\n\n\n#### Changing other attributes\n\nYou can use jQuery's `.attr()` method to change other attributes of elements.\nFor example, you can use it to set a new `title` attribute for a link:\n\n    $( 'a' ).attr( 'title', 'Click me!' );\n\nWhen setting an attribute, you can pass a function as the second argument. Just\nlike other setter methods, this function receives two arguments: the index of\nthe element on which it's operating, and the original value of the attribute.\nThis function should return the new value for the attribute.\n\n    $( 'a' ).attr( 'href', function(index, value) {\n      return value + '?special=true';\n    });\n\nYou can also remove attributes entirely using `.removeAttr()`.\n\n\n### Getting information from elements\n\nIn the [jQuery basics](/chapter/jquery-basics) chapter, we discussed the notion\nof \"getter\" and \"setter\" methods. All of the methods that can be used to\nchange elements can also be used to get information from elements. For example,\nthe `.val()` method described above can be used as both a setter and a\ngetter.\n\n    var input = $( 'input[type=\"text\"]' );\n    input.val( 'new value' );\n    input.val(); // returns 'new value'\n\nLikewise, the `.css()` method can be used to retrieve the value of individual\nCSS properties by passing only a property name, not a value.\n\n    var listItemColor = $( 'li' ).css( 'color' );\n\nWhen manipulation methods are used as getters, *the method operates on only the\nfirst element in the selection*, with one notable exception: the `.text()`\nmethod. In the case of the `.text()` method, the text of *all* selected\nelements will be returned if no argument is passed to the method.\n\n### Placing elements in the document\n\nWhether you've selected an element or created a new element, you can take your\nselection and place it in your document. There are generally two ways to do\nthis: by calling a method on the element(s) you want to place, or by calling a\nmethod on the element relative to which you want to place it.\n\nFor example, consider the case where you want to move the first list item in a\nlist to the end of the list. There are several ways to achieve this.\n\nYou could append the item to the list by calling `.appendTo()` on the list\nitem:\n\n    var listItem = $( '#my-unordered-list li' ).first();\n    listItem.appendTo( '#my-unordered-list' );\n\nYou could append the item to the list by calling `.append()` on the list:\n\n    var listItem = $( '#my-unordered-list li' ).first();\n    $( '#my-unordered-list' ).append( listItem );\n\nYou could insert the list item after the last list item by calling\n`.insertAfter()` on the list item that you want to move:\n\n    var listItems = $( '#my-unordered-list li' );\n    listItems.first().insertAfter( listItems.last() );\n\nYou could also insert the list item after the last list item by calling\n`.after()` on the last list item:\n\n    var listItems = $( '#my-unordered-list li' );\n    listItems.last().after( listItems.first() );\n\nThere are many other methods for placing elements &mdash; you can place them\n[around](http://api.jquery.com/category/manipulation/dom-insertion-around/),\n[inside](http://api.jquery.com/category/manipulation/dom-insertion-inside/),\nand\n[outside](http://api.jquery.com/category/manipulation/dom-insertion-outside/)\nof other elements, depending on your specific needs.\n\nThe most effective way to place an element depends on the elements to which you\nalready have access. In the example above, you might choose to append the list\nitem to the unordered list if you have already selected the unordered list for\nsome other purpose; or, if you already had a selection containing all of the\nlist items, then placing the first list item relative to the last list item\nmight be the easiest path.\n\nWhen choosing how to place an element, you should consider not only the easiest\nway to place it, but also the most maintainable way. Beware of placements that\nmake assumptions about the exact structure of your page's HTML.\n\n### Copying elements\n\nYou can make a copy of an element or a set of elements using jQuery's\n`.clone()` method. This will make a copy of the elements, but note that the\ncopy is only in memory &mdash; you will need to place it in the document yourself.\nYou can manipulate the cloned element or elements before placing them into the\ndocument.\n\n    var clones = $( 'li' ).clone();\n\n    clones.html(function( index, oldHtml ) {\n      return oldHtml + '!!!';\n    });\n\n    $( '#my-unordered-list' ).append( clones );\n\n<div class=\"alert alert-info\">\n\n**Note:** jQuery will not prevent you from\ncloning an element with an ID, but you should ensure that you change or remove\nthe cloned element's `id` attribute before inserting it into the document, as a\ndocument should never have more than one element with a particular ID.\n\n</div>\n\n### Removing elements\n\nThere are three ways to remove elements from the document: `.remove()`,\n`.detach()`, and `.replaceWith()`. Each method serves a particular purpose.\n\nThe `.remove()` method should be used to remove elements permanently, as it\nwill also unbind any event handlers attached to the elements being removed. The\n`.remove()` method returns a reference to the removed elements, but if you\nre-add the removed elements, the removed elements will no longer have events\nbound to them.\n\n    $( '#my-unordered-list li' ).click(function() {\n      alert( $( this ).text() );\n    });\n\n    var removedListItem = $( '#my-unordered-list li' ).first().remove();\n\n    removedListItem.appendTo( '#my-unordered-list' );\n    removedListItem.trigger( 'click' ); // no alert!\n\nThe `.detach()` method is useful for temporarily removing elements from the document; for example, if you are going to make a lot of changes to your page's structure using jQuery, it will be more efficient to use `.detach()` to remove the affected elements, make your changes, and then re-attach the element using one of the insertion methods. Elements removed with `.detach()` will retain their event handlers; you can re-add them to the document with `.appendTo()` or another DOM insertion method.\n\n    $( '#my-unordered-list li' ).click(function() {\n      alert( $( this ).text() );\n    });\n\n    var detachedListItem = $( '#my-unordered-list li' ).first().detach();\n\n    // do something complicated with the list item\n\n    detachedListItem.appendTo( '#my-unordered-list' );\n    detachedListItem.trigger( 'click' ); // alert!\n\nFinally, the `.replaceWith()` method replaces an element or elements with the\nelement or HTML passed as an argument to `.replaceWith()`. The replaced\nelements are returned, but just like with `.remove()`, all event handlers are\nunbound from the replaced elements.\n\n    $( '#my-unordered-list li' ).click(function() {\n      alert( $( this ).text() );\n    });\n\n    var replacedListItem = $( '#my-unordered-list li' ).first()\n      .replaceWith( '<li>new!</li>' );\n\n    replacedListItem.appendTo( '#my-unordered-list' );\n\n    replacedListItem.trigger( 'click' ); // no alert!\n\n## Conclusion\n\nIn this section, we looked at various ways we can move through a document, move\nelements and place new elements in the document, and make changes to elements.\nIn the next section, we'll look at how to listen for user interaction with our\npage.\n"
  },
  {
    "path": "content/traversing-manipulating/sandbox/index.html",
    "content": "<h3>Sandbox</h3>\n\n<ul id=\"my-unordered-list\">\n  <li><span><i>HTML</i></span></li>\n  <li class=\"special\"><a href=\"https://developer.mozilla.org/en/CSS/\"><i>CSS</i></a></li>\n  <li>JavaScript</li>\n</ul>\n\n<form>\n  <div>\n    <label class=\"checkbox\">checkbox <input type=\"checkbox\"></label>\n  </div>\n  <div>\n    <select>\n      <option value=\"1\">option 1</option>\n      <option value=\"2\">option 2</option>\n    </select>\n  </div>\n  <div>\n    <input type=\"text\">\n  </div>\n</form>\n"
  },
  {
    "path": "data/people.html",
    "content": "<ul>\n  <li>Ben</li>\n  <li>Rebecca</li>\n  <li>Jory</li>\n  <li>Luke</li>\n</ul>"
  },
  {
    "path": "data/people.json",
    "content": "{ \"people\" : [\n  {\n    \"name\" : \"Ben\",\n    \"url\" : \"http://benalman.com/\",\n    \"bio\" : \"I create groovy websites, useful jQuery plugins, and play a mean funk bass. I'm also Director of Pluginization at @bocoup.\"\n  },\n  {\n    \"name\" : \"Rebecca\",\n    \"url\" : \"http://rmurphey.com\",\n    \"bio\" : \"Senior JS dev at Bocoup\"\n  },\n  {\n    \"name\" : \"Jory\",\n    \"url\" : \"http://joryburson.com\",\n    \"bio\" : \"super-enthusiastic about open web education @bocoup. lover of media, art, and fake mustaches.\"\n  },\n  {\n    \"name\" : \"Luke\",\n    \"bio\" : \"\",\n    \"url\" : \"\"\n  }\n] }\n"
  },
  {
    "path": "deploy/ansible/deploy.yml",
    "content": "- hosts: all\n  gather_facts: false\n  become: yes\n  become_method: sudo\n  roles:\n    - deploy\n    - services\n"
  },
  {
    "path": "deploy/ansible/group_vars/all.yml",
    "content": "#########\n# GENERAL\n#########\n\nbase_path: /mnt/jqf\napp_name: jqf\napp_port: 4444\napp_log_file: /var/log/{{app_name}}\ngit_repo: https://github.com/bocoup/jqfundamentals.com\n\n##############\n# PROVISIONING\n##############\n\nansible_python_interpreter: /usr/bin/python3\n\n# Keys to be added to apt.\napt_keys:\n  - \"https://deb.nodesource.com/gpgkey/nodesource.gpg.key\"\n\n# Ppas to be added to apt. Useful ppas (replace trusty with your Ubuntu\n# version codename, if necessary):\n# Git latest:     ppa:git-core/ppa\n# Node.js 10.x (LTS): deb https://deb.nodesource.com/node_10.x trusty main\n# Node.js 12.x:       deb https://deb.nodesource.com/node_12.x trusty main\napt_ppas:\n  - \"deb https://deb.nodesource.com/node_10.x bionic main\"\n\n# Any apt packages to install. Apt package versions may be specified like\n# - git=2.1.0\napt_packages:\n  - git\n  - nodejs\n  - nginx\n  - libcurl4-openssl-dev\n\n###################\n# DEPLOY EXTRA VARS\n###################\n\n# Specify any ref (eg. branch, tag, SHA) to be deployed. This ref must be\n# pushed to the remote git_repo.\ncommit: master"
  },
  {
    "path": "deploy/ansible/host_vars/jqfundamentals.com",
    "content": "---\n# configuration for production server\n\nenv: production\nhostname: jqf\njqf_fqdn: jqfundamentals.com\n"
  },
  {
    "path": "deploy/ansible/inventory/production",
    "content": "[appservers]\njqfundamentals.com\n"
  },
  {
    "path": "deploy/ansible/provision.yml",
    "content": "- hosts: all\n  gather_facts: false\n  become: yes\n  become_method: sudo\n  roles:\n    - base\n    - configure\n    - nginx\n- include: deploy.yml\n"
  },
  {
    "path": "deploy/ansible/roles/base/tasks/main.yml",
    "content": "---\n# Get the box up and running. These tasks run before the box is configured\n# or the project is cloned or built. All system dependencies should be\n# installed here.\n\n- name: add keys to apt\n  apt_key: url={{item}} state=present\n  with_items: \"{{apt_keys}}\"\n\n- name: add ppas to apt\n  apt_repository: repo=\"{{item}}\" state=present update_cache=yes\n  with_items: \"{{apt_ppas}}\"\n\n- name: install apt packages\n  apt: name={{item}} state=latest update_cache=yes force=yes\n  with_items: \"{{apt_packages}}\"\n  environment:\n    LC_ALL: en_US.UTF-8\n"
  },
  {
    "path": "deploy/ansible/roles/configure/tasks/main.yml",
    "content": "---\n# configure nest api server\n\n- name: set hostname\n  hostname: name={{hostname}}\n\n- name: put hosts in /etc/hosts\n  lineinfile: \"dest=/etc/hosts line='127.0.0.1 {{hostname}} {{jqf_fqdn}}'\"\n\n- name: get github.com public key\n  command: /usr/bin/ssh-keyscan github.com\n  register: github_keyscan\n\n- name: github key is recognized\n  lineinfile:\n    dest: /etc/ssh/ssh_known_hosts\n    create: yes\n    regexp: '^github.com'\n    line: \"{{github_keyscan.stdout}}\"\n\n- name: keep SSH agent socket when sudoing\n  lineinfile:\n    dest: /etc/sudoers\n    insertafter: '^Defaults'\n    line: \"Defaults\\tenv_keep += \\\"SSH_AUTH_SOCK\\\"\"\n    state: present\n    validate: 'visudo -cf %s'\n"
  },
  {
    "path": "deploy/ansible/roles/deploy/tasks/main.yml",
    "content": "- name: remove temporary build\n  command: rm -rf {{base_path}}.tmp\n\n- name: change ownership of `www-data`'s home directory\n  file: path=/var/www state=directory owner=www-data\n\n- name: temp build directory exists\n  file: path={{base_path}}.tmp state=directory owner=www-data\n\n- name: code is synchronized via git to temp directory\n  git: dest={{base_path}}.tmp repo={{git_repo}} version={{commit}}\n  when: env != 'development'\n  become_user: www-data\n\n# The `npm` Ansible module cannot be used on this system because it is\n# incompatible with the version of the npm CLI which is available on the\n# machine.\n- name: Install Node.js dependencies\n  command: npm install\n  args:\n    chdir: \"{{base_path}}.tmp\"\n  become_user: www-data\n\n- name: production version of the application has been built\n  command: npm run build\n  args:\n    chdir: \"{{base_path}}.tmp\"\n\n- name: current production build is removed\n  command: rm -rf {{base_path}}\n\n- name: new production build is in place\n  command: mv {{base_path}}.tmp {{base_path}}\n"
  },
  {
    "path": "deploy/ansible/roles/nginx/tasks/main.yml",
    "content": "---\n# configure nginx\n\n- name: make sure nginx has a configuration file for jqf\n  template: src=jqf.conf dest=/etc/nginx/conf.d/jqf.conf backup=no\n\n- name: restart nginx\n  service: name=nginx state=restarted\n"
  },
  {
    "path": "deploy/ansible/roles/nginx/templates/jqf.conf",
    "content": "server {\n  root {{base_path}};\n  listen 80;\n  server_name {{jqf_fqdn}};\n\n  error_page 404 /404;\n\n  location / {\n    include proxy_params;\n    proxy_pass http://127.0.0.1:{{app_port}};\n    proxy_buffering on;\n\n    location ~* ^.+\\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|html|htm|json)$ {\n      add_header Pragma public;\n      add_header Cache-Control \"public, must-revalidate, proxy-revalidate\";\n      access_log off;\n      expires max;\n\n      rewrite ^/public/v\\d+/(.*)$ /public/$1 last;\n      rewrite ^/favicon.ico /public/img/favicon.ico last;\n      rewrite ^/package\\.json /404;\n    }\n  }\n}\n"
  },
  {
    "path": "deploy/ansible/roles/services/tasks/main.yml",
    "content": "---\n# configure services\n\n- name: define a service to run production site\n  become: yes\n  template:\n    src: app.service.j2\n    dest: /etc/systemd/system/app.service\n\n- name: enable system service\n  systemd:\n    name: app\n    enabled: true\n    state: restarted\n"
  },
  {
    "path": "deploy/ansible/roles/services/templates/app.service.j2",
    "content": "[Unit]\nDescription=jqfundamentals Node.js application\nWants=network.target\nAfter=network.target\n\n[Service]\nType=simple\nEnvironment=NODE_ENV={{env}}\nEnvironment=NODE_ENV_PORT={{app_port}}\nWorkingDirectory={{base_path}}\nExecStart=/usr/bin/node {{base_path}}/server\nRestart=always\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "deploy/id_ed25519-robocoup-jqfundamentals.com",
    "content": "-----BEGIN OPENSSH PRIVATE KEY-----\nb3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABDHQVETaj\nyJiktm9XdZw5o6AAAAEAAAAAEAAAAzAAAAC3NzaC1lZDI1NTE5AAAAIESu1plyXkmf+Nm+\nmAhE4Fmlk5cmrKFMznpnzs8yQf1HAAAAoFR02il8U79f72B0ZageiSyRFJ7g+dm3zI8TD5\n9XfXjRz06bOfBLE+F2In0tRJluSC3ug2nOcDrpvYQzQUP5KfkxSyyOS1l4eGjH+gWJDh13\nyh4XUaVuhBfdPdujfahDMs33HzfdEE5C3YWSw9k5eeJXLLhmNW8v+VbfZAU38Dso+F6ryq\ncybY3iVMZH2wZtUOpmMUYmiYbepva4VfFRo/M=\n-----END OPENSSH PRIVATE KEY-----\n"
  },
  {
    "path": "legacy/assets/jquery.js",
    "content": "/*!\n * jQuery JavaScript Library v1.5.2\n * http://jquery.com/\n *\n * Copyright 2011, John Resig\n * Dual licensed under the MIT or GPL Version 2 licenses.\n * http://jquery.org/license\n *\n * Includes Sizzle.js\n * http://sizzlejs.com/\n * Copyright 2011, The Dojo Foundation\n * Released under the MIT, BSD, and GPL Licenses.\n *\n * Date: Thu Mar 31 15:28:23 2011 -0400\n */\n(function( window, undefined ) {\n\n// Use the correct document accordingly with window argument (sandbox)\nvar document = window.document;\nvar jQuery = (function() {\n\n// Define a local copy of jQuery\nvar jQuery = function( selector, context ) {\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\treturn new jQuery.fn.init( selector, context, rootjQuery );\n\t},\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$,\n\n\t// A central reference to the root jQuery(document)\n\trootjQuery,\n\n\t// A simple way to check for HTML strings or ID strings\n\t// (both of which we optimize for)\n\tquickExpr = /^(?:[^<]*(<[\\w\\W]+>)[^>]*$|#([\\w\\-]+)$)/,\n\n\t// Check if a string has a non-whitespace character in it\n\trnotwhite = /\\S/,\n\n\t// Used for trimming whitespace\n\ttrimLeft = /^\\s+/,\n\ttrimRight = /\\s+$/,\n\n\t// Check for digits\n\trdigit = /\\d/,\n\n\t// Match a standalone tag\n\trsingleTag = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>)?$/,\n\n\t// JSON RegExp\n\trvalidchars = /^[\\],:{}\\s]*$/,\n\trvalidescape = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g,\n\trvalidtokens = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g,\n\trvalidbraces = /(?:^|:|,)(?:\\s*\\[)+/g,\n\n\t// Useragent RegExp\n\trwebkit = /(webkit)[ \\/]([\\w.]+)/,\n\tropera = /(opera)(?:.*version)?[ \\/]([\\w.]+)/,\n\trmsie = /(msie) ([\\w.]+)/,\n\trmozilla = /(mozilla)(?:.*? rv:([\\w.]+))?/,\n\n\t// Keep a UserAgent string for use with jQuery.browser\n\tuserAgent = navigator.userAgent,\n\n\t// For matching the engine and version of the browser\n\tbrowserMatch,\n\n\t// The deferred used on DOM ready\n\treadyList,\n\n\t// The ready event handler\n\tDOMContentLoaded,\n\n\t// Save a reference to some core methods\n\ttoString = Object.prototype.toString,\n\thasOwn = Object.prototype.hasOwnProperty,\n\tpush = Array.prototype.push,\n\tslice = Array.prototype.slice,\n\ttrim = String.prototype.trim,\n\tindexOf = Array.prototype.indexOf,\n\n\t// [[Class]] -> type pairs\n\tclass2type = {};\n\njQuery.fn = jQuery.prototype = {\n\tconstructor: jQuery,\n\tinit: function( selector, context, rootjQuery ) {\n\t\tvar match, elem, ret, doc;\n\n\t\t// Handle $(\"\"), $(null), or $(undefined)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Handle $(DOMElement)\n\t\tif ( selector.nodeType ) {\n\t\t\tthis.context = this[0] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\t\t}\n\n\t\t// The body element only exists once, optimize finding it\n\t\tif ( selector === \"body\" && !context && document.body ) {\n\t\t\tthis.context = document;\n\t\t\tthis[0] = document.body;\n\t\t\tthis.selector = \"body\";\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\t\t}\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\t// Are we dealing with HTML string or an ID?\n\t\t\tmatch = quickExpr.exec( selector );\n\n\t\t\t// Verify a match, and that no context was specified for #id\n\t\t\tif ( match && (match[1] || !context) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[1] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[0] : context;\n\t\t\t\t\tdoc = (context ? context.ownerDocument || context : document);\n\n\t\t\t\t\t// If a single string is passed in and it's a single tag\n\t\t\t\t\t// just do a createElement and skip the rest\n\t\t\t\t\tret = rsingleTag.exec( selector );\n\n\t\t\t\t\tif ( ret ) {\n\t\t\t\t\t\tif ( jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\t\tselector = [ document.createElement( ret[1] ) ];\n\t\t\t\t\t\t\tjQuery.fn.attr.call( selector, context, true );\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tselector = [ doc.createElement( ret[1] ) ];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tret = jQuery.buildFragment( [ match[1] ], [ doc ] );\n\t\t\t\t\t\tselector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.merge( this, selector );\n\n\t\t\t\t// HANDLE: $(\"#id\")\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[2] );\n\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t\t// nodes that are no longer in the document #6963\n\t\t\t\t\tif ( elem && elem.parentNode ) {\n\t\t\t\t\t\t// Handle the case where IE and Opera return items\n\t\t\t\t\t\t// by name instead of ID\n\t\t\t\t\t\tif ( elem.id !== match[2] ) {\n\t\t\t\t\t\t\treturn rootjQuery.find( selector );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Otherwise, we inject the element directly into the jQuery object\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t\tthis[0] = elem;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.context = document;\n\t\t\t\t\tthis.selector = selector;\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn (context || rootjQuery).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( jQuery.isFunction( selector ) ) {\n\t\t\treturn rootjQuery.ready( selector );\n\t\t}\n\n\t\tif (selector.selector !== undefined) {\n\t\t\tthis.selector = selector.selector;\n\t\t\tthis.context = selector.context;\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t},\n\n\t// Start with an empty selector\n\tselector: \"\",\n\n\t// The current version of jQuery being used\n\tjquery: \"1.5.2\",\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\t// The number of elements contained in the matched element set\n\tsize: function() {\n\t\treturn this.length;\n\t},\n\n\ttoArray: function() {\n\t\treturn slice.call( this, 0 );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\t\treturn num == null ?\n\n\t\t\t// Return a 'clean' array\n\t\t\tthis.toArray() :\n\n\t\t\t// Return just the object\n\t\t\t( num < 0 ? this[ this.length + num ] : this[ num ] );\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems, name, selector ) {\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = this.constructor();\n\n\t\tif ( jQuery.isArray( elems ) ) {\n\t\t\tpush.apply( ret, elems );\n\n\t\t} else {\n\t\t\tjQuery.merge( ret, elems );\n\t\t}\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\tret.context = this.context;\n\n\t\tif ( name === \"find\" ) {\n\t\t\tret.selector = this.selector + (this.selector ? \" \" : \"\") + selector;\n\t\t} else if ( name ) {\n\t\t\tret.selector = this.selector + \".\" + name + \"(\" + selector + \")\";\n\t\t}\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\t// (You can seed the arguments with an array of args, but this is\n\t// only used internally.)\n\teach: function( callback, args ) {\n\t\treturn jQuery.each( this, callback, args );\n\t},\n\n\tready: function( fn ) {\n\t\t// Attach the listeners\n\t\tjQuery.bindReady();\n\n\t\t// Add the callback\n\t\treadyList.done( fn );\n\n\t\treturn this;\n\t},\n\n\teq: function( i ) {\n\t\treturn i === -1 ?\n\t\t\tthis.slice( i ) :\n\t\t\tthis.slice( i, +i + 1 );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ),\n\t\t\t\"slice\", slice.call(arguments).join(\",\") );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map(this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t}));\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor(null);\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: [].sort,\n\tsplice: [].splice\n};\n\n// Give the init function the jQuery prototype for later instantiation\njQuery.fn.init.prototype = jQuery.fn;\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[0] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !jQuery.isFunction(target) ) {\n\t\ttarget = {};\n\t}\n\n\t// extend jQuery itself if only one argument is passed\n\tif ( length === i ) {\n\t\ttarget = this;\n\t\t--i;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\t\t// Only deal with non-null/undefined values\n\t\tif ( (options = arguments[ i ]) != null ) {\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tsrc = target[ name ];\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {\n\t\t\t\t\tif ( copyIsArray ) {\n\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\tclone = src && jQuery.isArray(src) ? src : [];\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src && jQuery.isPlainObject(src) ? src : {};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend({\n\tnoConflict: function( deep ) {\n\t\twindow.$ = _$;\n\n\t\tif ( deep ) {\n\t\t\twindow.jQuery = _jQuery;\n\t\t}\n\n\t\treturn jQuery;\n\t},\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See #6781\n\treadyWait: 1,\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\t\t// A third-party is pushing the ready event forwards\n\t\tif ( wait === true ) {\n\t\t\tjQuery.readyWait--;\n\t\t}\n\n\t\t// Make sure that the DOM is not already loaded\n\t\tif ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) {\n\t\t\t// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n\t\t\tif ( !document.body ) {\n\t\t\t\treturn setTimeout( jQuery.ready, 1 );\n\t\t\t}\n\n\t\t\t// Remember that the DOM is ready\n\t\t\tjQuery.isReady = true;\n\n\t\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If there are functions bound, to execute\n\t\t\treadyList.resolveWith( document, [ jQuery ] );\n\n\t\t\t// Trigger any bound ready events\n\t\t\tif ( jQuery.fn.trigger ) {\n\t\t\t\tjQuery( document ).trigger( \"ready\" ).unbind( \"ready\" );\n\t\t\t}\n\t\t}\n\t},\n\n\tbindReady: function() {\n\t\tif ( readyList ) {\n\t\t\treturn;\n\t\t}\n\n\t\treadyList = jQuery._Deferred();\n\n\t\t// Catch cases where $(document).ready() is called after the\n\t\t// browser event has already occurred.\n\t\tif ( document.readyState === \"complete\" ) {\n\t\t\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\t\t\treturn setTimeout( jQuery.ready, 1 );\n\t\t}\n\n\t\t// Mozilla, Opera and webkit nightlies currently support this event\n\t\tif ( document.addEventListener ) {\n\t\t\t// Use the handy event callback\n\t\t\tdocument.addEventListener( \"DOMContentLoaded\", DOMContentLoaded, false );\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.addEventListener( \"load\", jQuery.ready, false );\n\n\t\t// If IE event model is used\n\t\t} else if ( document.attachEvent ) {\n\t\t\t// ensure firing before onload,\n\t\t\t// maybe late but safe also for iframes\n\t\t\tdocument.attachEvent(\"onreadystatechange\", DOMContentLoaded);\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.attachEvent( \"onload\", jQuery.ready );\n\n\t\t\t// If IE and not a frame\n\t\t\t// continually check to see if the document is ready\n\t\t\tvar toplevel = false;\n\n\t\t\ttry {\n\t\t\t\ttoplevel = window.frameElement == null;\n\t\t\t} catch(e) {}\n\n\t\t\tif ( document.documentElement.doScroll && toplevel ) {\n\t\t\t\tdoScrollCheck();\n\t\t\t}\n\t\t}\n\t},\n\n\t// See test/unit/core.js for details concerning isFunction.\n\t// Since version 1.3, DOM methods and functions like alert\n\t// aren't supported. They return false on IE (#2968).\n\tisFunction: function( obj ) {\n\t\treturn jQuery.type(obj) === \"function\";\n\t},\n\n\tisArray: Array.isArray || function( obj ) {\n\t\treturn jQuery.type(obj) === \"array\";\n\t},\n\n\t// A crude way of determining if an object is a window\n\tisWindow: function( obj ) {\n\t\treturn obj && typeof obj === \"object\" && \"setInterval\" in obj;\n\t},\n\n\tisNaN: function( obj ) {\n\t\treturn obj == null || !rdigit.test( obj ) || isNaN( obj );\n\t},\n\n\ttype: function( obj ) {\n\t\treturn obj == null ?\n\t\t\tString( obj ) :\n\t\t\tclass2type[ toString.call(obj) ] || \"object\";\n\t},\n\n\tisPlainObject: function( obj ) {\n\t\t// Must be an Object.\n\t\t// Because of IE, we also have to check the presence of the constructor property.\n\t\t// Make sure that DOM nodes and window objects don't pass through, as well\n\t\tif ( !obj || jQuery.type(obj) !== \"object\" || obj.nodeType || jQuery.isWindow( obj ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Not own constructor property must be Object\n\t\tif ( obj.constructor &&\n\t\t\t!hasOwn.call(obj, \"constructor\") &&\n\t\t\t!hasOwn.call(obj.constructor.prototype, \"isPrototypeOf\") ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Own properties are enumerated firstly, so to speed up,\n\t\t// if last one is own, then all properties are own.\n\n\t\tvar key;\n\t\tfor ( key in obj ) {}\n\n\t\treturn key === undefined || hasOwn.call( obj, key );\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tfor ( var name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\terror: function( msg ) {\n\t\tthrow msg;\n\t},\n\n\tparseJSON: function( data ) {\n\t\tif ( typeof data !== \"string\" || !data ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Make sure leading/trailing whitespace is removed (IE can't handle it)\n\t\tdata = jQuery.trim( data );\n\n\t\t// Make sure the incoming data is actual JSON\n\t\t// Logic borrowed from http://json.org/json2.js\n\t\tif ( rvalidchars.test(data.replace(rvalidescape, \"@\")\n\t\t\t.replace(rvalidtokens, \"]\")\n\t\t\t.replace(rvalidbraces, \"\")) ) {\n\n\t\t\t// Try to use the native JSON parser first\n\t\t\treturn window.JSON && window.JSON.parse ?\n\t\t\t\twindow.JSON.parse( data ) :\n\t\t\t\t(new Function(\"return \" + data))();\n\n\t\t} else {\n\t\t\tjQuery.error( \"Invalid JSON: \" + data );\n\t\t}\n\t},\n\n\t// Cross-browser xml parsing\n\t// (xml & tmp used internally)\n\tparseXML: function( data , xml , tmp ) {\n\n\t\tif ( window.DOMParser ) { // Standard\n\t\t\ttmp = new DOMParser();\n\t\t\txml = tmp.parseFromString( data , \"text/xml\" );\n\t\t} else { // IE\n\t\t\txml = new ActiveXObject( \"Microsoft.XMLDOM\" );\n\t\t\txml.async = \"false\";\n\t\t\txml.loadXML( data );\n\t\t}\n\n\t\ttmp = xml.documentElement;\n\n\t\tif ( ! tmp || ! tmp.nodeName || tmp.nodeName === \"parsererror\" ) {\n\t\t\tjQuery.error( \"Invalid XML: \" + data );\n\t\t}\n\n\t\treturn xml;\n\t},\n\n\tnoop: function() {},\n\n\t// Evalulates a script in a global context\n\tglobalEval: function( data ) {\n\t\tif ( data && rnotwhite.test(data) ) {\n\t\t\t// Inspired by code by Andrea Giammarchi\n\t\t\t// http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html\n\t\t\tvar head = document.head || document.getElementsByTagName( \"head\" )[0] || document.documentElement,\n\t\t\t\tscript = document.createElement( \"script\" );\n\n\t\t\tif ( jQuery.support.scriptEval() ) {\n\t\t\t\tscript.appendChild( document.createTextNode( data ) );\n\t\t\t} else {\n\t\t\t\tscript.text = data;\n\t\t\t}\n\n\t\t\t// Use insertBefore instead of appendChild to circumvent an IE6 bug.\n\t\t\t// This arises when a base node is used (#2709).\n\t\t\thead.insertBefore( script, head.firstChild );\n\t\t\thead.removeChild( script );\n\t\t}\n\t},\n\n\tnodeName: function( elem, name ) {\n\t\treturn elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();\n\t},\n\n\t// args is for internal usage only\n\teach: function( object, callback, args ) {\n\t\tvar name, i = 0,\n\t\t\tlength = object.length,\n\t\t\tisObj = length === undefined || jQuery.isFunction(object);\n\n\t\tif ( args ) {\n\t\t\tif ( isObj ) {\n\t\t\t\tfor ( name in object ) {\n\t\t\t\t\tif ( callback.apply( object[ name ], args ) === false ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( ; i < length; ) {\n\t\t\t\t\tif ( callback.apply( object[ i++ ], args ) === false ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// A special, fast, case for the most common use of each\n\t\t} else {\n\t\t\tif ( isObj ) {\n\t\t\t\tfor ( name in object ) {\n\t\t\t\t\tif ( callback.call( object[ name ], name, object[ name ] ) === false ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( var value = object[0];\n\t\t\t\t\ti < length && callback.call( value, i, value ) !== false; value = object[++i] ) {}\n\t\t\t}\n\t\t}\n\n\t\treturn object;\n\t},\n\n\t// Use native String.trim function wherever possible\n\ttrim: trim ?\n\t\tfunction( text ) {\n\t\t\treturn text == null ?\n\t\t\t\t\"\" :\n\t\t\t\ttrim.call( text );\n\t\t} :\n\n\t\t// Otherwise use our own trimming functionality\n\t\tfunction( text ) {\n\t\t\treturn text == null ?\n\t\t\t\t\"\" :\n\t\t\t\ttext.toString().replace( trimLeft, \"\" ).replace( trimRight, \"\" );\n\t\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( array, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( array != null ) {\n\t\t\t// The window, strings (and functions) also have 'length'\n\t\t\t// The extra typeof function check is to prevent crashes\n\t\t\t// in Safari 2 (See: #3039)\n\t\t\t// Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930\n\t\t\tvar type = jQuery.type(array);\n\n\t\t\tif ( array.length == null || type === \"string\" || type === \"function\" || type === \"regexp\" || jQuery.isWindow( array ) ) {\n\t\t\t\tpush.call( ret, array );\n\t\t\t} else {\n\t\t\t\tjQuery.merge( ret, array );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, array ) {\n\t\tif ( array.indexOf ) {\n\t\t\treturn array.indexOf( elem );\n\t\t}\n\n\t\tfor ( var i = 0, length = array.length; i < length; i++ ) {\n\t\t\tif ( array[ i ] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t},\n\n\tmerge: function( first, second ) {\n\t\tvar i = first.length,\n\t\t\tj = 0;\n\n\t\tif ( typeof second.length === \"number\" ) {\n\t\t\tfor ( var l = second.length; j < l; j++ ) {\n\t\t\t\tfirst[ i++ ] = second[ j ];\n\t\t\t}\n\n\t\t} else {\n\t\t\twhile ( second[j] !== undefined ) {\n\t\t\t\tfirst[ i++ ] = second[ j++ ];\n\t\t\t}\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, inv ) {\n\t\tvar ret = [], retVal;\n\t\tinv = !!inv;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( var i = 0, length = elems.length; i < length; i++ ) {\n\t\t\tretVal = !!callback( elems[ i ], i );\n\t\t\tif ( inv !== retVal ) {\n\t\t\t\tret.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar ret = [], value;\n\n\t\t// Go through the array, translating each of the items to their\n\t\t// new value (or values).\n\t\tfor ( var i = 0, length = elems.length; i < length; i++ ) {\n\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\tif ( value != null ) {\n\t\t\t\tret[ ret.length ] = value;\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn ret.concat.apply( [], ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\tproxy: function( fn, proxy, thisObject ) {\n\t\tif ( arguments.length === 2 ) {\n\t\t\tif ( typeof proxy === \"string\" ) {\n\t\t\t\tthisObject = fn;\n\t\t\t\tfn = thisObject[ proxy ];\n\t\t\t\tproxy = undefined;\n\n\t\t\t} else if ( proxy && !jQuery.isFunction( proxy ) ) {\n\t\t\t\tthisObject = proxy;\n\t\t\t\tproxy = undefined;\n\t\t\t}\n\t\t}\n\n\t\tif ( !proxy && fn ) {\n\t\t\tproxy = function() {\n\t\t\t\treturn fn.apply( thisObject || this, arguments );\n\t\t\t};\n\t\t}\n\n\t\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\t\tif ( fn ) {\n\t\t\tproxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;\n\t\t}\n\n\t\t// So proxy can be declared as an argument\n\t\treturn proxy;\n\t},\n\n\t// Mutifunctional method to get and set values to a collection\n\t// The value/s can be optionally by executed if its a function\n\taccess: function( elems, key, value, exec, fn, pass ) {\n\t\tvar length = elems.length;\n\n\t\t// Setting many attributes\n\t\tif ( typeof key === \"object\" ) {\n\t\t\tfor ( var k in key ) {\n\t\t\t\tjQuery.access( elems, k, key[k], exec, fn, value );\n\t\t\t}\n\t\t\treturn elems;\n\t\t}\n\n\t\t// Setting one attribute\n\t\tif ( value !== undefined ) {\n\t\t\t// Optionally, function values get executed if exec is true\n\t\t\texec = !pass && exec && jQuery.isFunction(value);\n\n\t\t\tfor ( var i = 0; i < length; i++ ) {\n\t\t\t\tfn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );\n\t\t\t}\n\n\t\t\treturn elems;\n\t\t}\n\n\t\t// Getting an attribute\n\t\treturn length ? fn( elems[0], key ) : undefined;\n\t},\n\n\tnow: function() {\n\t\treturn (new Date()).getTime();\n\t},\n\n\t// Use of jQuery.browser is frowned upon.\n\t// More details: http://docs.jquery.com/Utilities/jQuery.browser\n\tuaMatch: function( ua ) {\n\t\tua = ua.toLowerCase();\n\n\t\tvar match = rwebkit.exec( ua ) ||\n\t\t\tropera.exec( ua ) ||\n\t\t\trmsie.exec( ua ) ||\n\t\t\tua.indexOf(\"compatible\") < 0 && rmozilla.exec( ua ) ||\n\t\t\t[];\n\n\t\treturn { browser: match[1] || \"\", version: match[2] || \"0\" };\n\t},\n\n\tsub: function() {\n\t\tfunction jQuerySubclass( selector, context ) {\n\t\t\treturn new jQuerySubclass.fn.init( selector, context );\n\t\t}\n\t\tjQuery.extend( true, jQuerySubclass, this );\n\t\tjQuerySubclass.superclass = this;\n\t\tjQuerySubclass.fn = jQuerySubclass.prototype = this();\n\t\tjQuerySubclass.fn.constructor = jQuerySubclass;\n\t\tjQuerySubclass.subclass = this.subclass;\n\t\tjQuerySubclass.fn.init = function init( selector, context ) {\n\t\t\tif ( context && context instanceof jQuery && !(context instanceof jQuerySubclass) ) {\n\t\t\t\tcontext = jQuerySubclass(context);\n\t\t\t}\n\n\t\t\treturn jQuery.fn.init.call( this, selector, context, rootjQuerySubclass );\n\t\t};\n\t\tjQuerySubclass.fn.init.prototype = jQuerySubclass.fn;\n\t\tvar rootjQuerySubclass = jQuerySubclass(document);\n\t\treturn jQuerySubclass;\n\t},\n\n\tbrowser: {}\n});\n\n// Populate the class2type map\njQuery.each(\"Boolean Number String Function Array Date RegExp Object\".split(\" \"), function(i, name) {\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n});\n\nbrowserMatch = jQuery.uaMatch( userAgent );\nif ( browserMatch.browser ) {\n\tjQuery.browser[ browserMatch.browser ] = true;\n\tjQuery.browser.version = browserMatch.version;\n}\n\n// Deprecated, use jQuery.browser.webkit instead\nif ( jQuery.browser.webkit ) {\n\tjQuery.browser.safari = true;\n}\n\nif ( indexOf ) {\n\tjQuery.inArray = function( elem, array ) {\n\t\treturn indexOf.call( array, elem );\n\t};\n}\n\n// IE doesn't match non-breaking spaces with \\s\nif ( rnotwhite.test( \"\\xA0\" ) ) {\n\ttrimLeft = /^[\\s\\xA0]+/;\n\ttrimRight = /[\\s\\xA0]+$/;\n}\n\n// All jQuery objects should point back to these\nrootjQuery = jQuery(document);\n\n// Cleanup functions for the document ready method\nif ( document.addEventListener ) {\n\tDOMContentLoaded = function() {\n\t\tdocument.removeEventListener( \"DOMContentLoaded\", DOMContentLoaded, false );\n\t\tjQuery.ready();\n\t};\n\n} else if ( document.attachEvent ) {\n\tDOMContentLoaded = function() {\n\t\t// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n\t\tif ( document.readyState === \"complete\" ) {\n\t\t\tdocument.detachEvent( \"onreadystatechange\", DOMContentLoaded );\n\t\t\tjQuery.ready();\n\t\t}\n\t};\n}\n\n// The DOM ready check for Internet Explorer\nfunction doScrollCheck() {\n\tif ( jQuery.isReady ) {\n\t\treturn;\n\t}\n\n\ttry {\n\t\t// If IE is used, use the trick by Diego Perini\n\t\t// http://javascript.nwbox.com/IEContentLoaded/\n\t\tdocument.documentElement.doScroll(\"left\");\n\t} catch(e) {\n\t\tsetTimeout( doScrollCheck, 1 );\n\t\treturn;\n\t}\n\n\t// and execute any waiting functions\n\tjQuery.ready();\n}\n\n// Expose jQuery to the global object\nreturn jQuery;\n\n})();\n\n\nvar // Promise methods\n\tpromiseMethods = \"then done fail isResolved isRejected promise\".split( \" \" ),\n\t// Static reference to slice\n\tsliceDeferred = [].slice;\n\njQuery.extend({\n\t// Create a simple deferred (one callbacks list)\n\t_Deferred: function() {\n\t\tvar // callbacks list\n\t\t\tcallbacks = [],\n\t\t\t// stored [ context , args ]\n\t\t\tfired,\n\t\t\t// to avoid firing when already doing so\n\t\t\tfiring,\n\t\t\t// flag to know if the deferred has been cancelled\n\t\t\tcancelled,\n\t\t\t// the deferred itself\n\t\t\tdeferred  = {\n\n\t\t\t\t// done( f1, f2, ...)\n\t\t\t\tdone: function() {\n\t\t\t\t\tif ( !cancelled ) {\n\t\t\t\t\t\tvar args = arguments,\n\t\t\t\t\t\t\ti,\n\t\t\t\t\t\t\tlength,\n\t\t\t\t\t\t\telem,\n\t\t\t\t\t\t\ttype,\n\t\t\t\t\t\t\t_fired;\n\t\t\t\t\t\tif ( fired ) {\n\t\t\t\t\t\t\t_fired = fired;\n\t\t\t\t\t\t\tfired = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( i = 0, length = args.length; i < length; i++ ) {\n\t\t\t\t\t\t\telem = args[ i ];\n\t\t\t\t\t\t\ttype = jQuery.type( elem );\n\t\t\t\t\t\t\tif ( type === \"array\" ) {\n\t\t\t\t\t\t\t\tdeferred.done.apply( deferred, elem );\n\t\t\t\t\t\t\t} else if ( type === \"function\" ) {\n\t\t\t\t\t\t\t\tcallbacks.push( elem );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( _fired ) {\n\t\t\t\t\t\t\tdeferred.resolveWith( _fired[ 0 ], _fired[ 1 ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// resolve with given context and args\n\t\t\t\tresolveWith: function( context, args ) {\n\t\t\t\t\tif ( !cancelled && !fired && !firing ) {\n\t\t\t\t\t\t// make sure args are available (#8421)\n\t\t\t\t\t\targs = args || [];\n\t\t\t\t\t\tfiring = 1;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\twhile( callbacks[ 0 ] ) {\n\t\t\t\t\t\t\t\tcallbacks.shift().apply( context, args );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinally {\n\t\t\t\t\t\t\tfired = [ context, args ];\n\t\t\t\t\t\t\tfiring = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// resolve with this as context and given arguments\n\t\t\t\tresolve: function() {\n\t\t\t\t\tdeferred.resolveWith( this, arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Has this deferred been resolved?\n\t\t\t\tisResolved: function() {\n\t\t\t\t\treturn !!( firing || fired );\n\t\t\t\t},\n\n\t\t\t\t// Cancel\n\t\t\t\tcancel: function() {\n\t\t\t\t\tcancelled = 1;\n\t\t\t\t\tcallbacks = [];\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\treturn deferred;\n\t},\n\n\t// Full fledged deferred (two callbacks list)\n\tDeferred: function( func ) {\n\t\tvar deferred = jQuery._Deferred(),\n\t\t\tfailDeferred = jQuery._Deferred(),\n\t\t\tpromise;\n\t\t// Add errorDeferred methods, then and promise\n\t\tjQuery.extend( deferred, {\n\t\t\tthen: function( doneCallbacks, failCallbacks ) {\n\t\t\t\tdeferred.done( doneCallbacks ).fail( failCallbacks );\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tfail: failDeferred.done,\n\t\t\trejectWith: failDeferred.resolveWith,\n\t\t\treject: failDeferred.resolve,\n\t\t\tisRejected: failDeferred.isResolved,\n\t\t\t// Get a promise for this deferred\n\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\tpromise: function( obj ) {\n\t\t\t\tif ( obj == null ) {\n\t\t\t\t\tif ( promise ) {\n\t\t\t\t\t\treturn promise;\n\t\t\t\t\t}\n\t\t\t\t\tpromise = obj = {};\n\t\t\t\t}\n\t\t\t\tvar i = promiseMethods.length;\n\t\t\t\twhile( i-- ) {\n\t\t\t\t\tobj[ promiseMethods[i] ] = deferred[ promiseMethods[i] ];\n\t\t\t\t}\n\t\t\t\treturn obj;\n\t\t\t}\n\t\t} );\n\t\t// Make sure only one callback list will be used\n\t\tdeferred.done( failDeferred.cancel ).fail( deferred.cancel );\n\t\t// Unexpose cancel\n\t\tdelete deferred.cancel;\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( firstParam ) {\n\t\tvar args = arguments,\n\t\t\ti = 0,\n\t\t\tlength = args.length,\n\t\t\tcount = length,\n\t\t\tdeferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?\n\t\t\t\tfirstParam :\n\t\t\t\tjQuery.Deferred();\n\t\tfunction resolveFunc( i ) {\n\t\t\treturn function( value ) {\n\t\t\t\targs[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\t// Strange bug in FF4:\n\t\t\t\t\t// Values changed onto the arguments object sometimes end up as undefined values\n\t\t\t\t\t// outside the $.when method. Cloning the object into a fresh array solves the issue\n\t\t\t\t\tdeferred.resolveWith( deferred, sliceDeferred.call( args, 0 ) );\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\tif ( length > 1 ) {\n\t\t\tfor( ; i < length; i++ ) {\n\t\t\t\tif ( args[ i ] && jQuery.isFunction( args[ i ].promise ) ) {\n\t\t\t\t\targs[ i ].promise().then( resolveFunc(i), deferred.reject );\n\t\t\t\t} else {\n\t\t\t\t\t--count;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( !count ) {\n\t\t\t\tdeferred.resolveWith( deferred, args );\n\t\t\t}\n\t\t} else if ( deferred !== firstParam ) {\n\t\t\tdeferred.resolveWith( deferred, length ? [ firstParam ] : [] );\n\t\t}\n\t\treturn deferred.promise();\n\t}\n});\n\n\n\n\n(function() {\n\n\tjQuery.support = {};\n\n\tvar div = document.createElement(\"div\");\n\n\tdiv.style.display = \"none\";\n\tdiv.innerHTML = \"   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>\";\n\n\tvar all = div.getElementsByTagName(\"*\"),\n\t\ta = div.getElementsByTagName(\"a\")[0],\n\t\tselect = document.createElement(\"select\"),\n\t\topt = select.appendChild( document.createElement(\"option\") ),\n\t\tinput = div.getElementsByTagName(\"input\")[0];\n\n\t// Can't get basic test support\n\tif ( !all || !all.length || !a ) {\n\t\treturn;\n\t}\n\n\tjQuery.support = {\n\t\t// IE strips leading whitespace when .innerHTML is used\n\t\tleadingWhitespace: div.firstChild.nodeType === 3,\n\n\t\t// Make sure that tbody elements aren't automatically inserted\n\t\t// IE will insert them into empty tables\n\t\ttbody: !div.getElementsByTagName(\"tbody\").length,\n\n\t\t// Make sure that link elements get serialized correctly by innerHTML\n\t\t// This requires a wrapper element in IE\n\t\thtmlSerialize: !!div.getElementsByTagName(\"link\").length,\n\n\t\t// Get the style information from getAttribute\n\t\t// (IE uses .cssText insted)\n\t\tstyle: /red/.test( a.getAttribute(\"style\") ),\n\n\t\t// Make sure that URLs aren't manipulated\n\t\t// (IE normalizes it by default)\n\t\threfNormalized: a.getAttribute(\"href\") === \"/a\",\n\n\t\t// Make sure that element opacity exists\n\t\t// (IE uses filter instead)\n\t\t// Use a regex to work around a WebKit issue. See #5145\n\t\topacity: /^0.55$/.test( a.style.opacity ),\n\n\t\t// Verify style float existence\n\t\t// (IE uses styleFloat instead of cssFloat)\n\t\tcssFloat: !!a.style.cssFloat,\n\n\t\t// Make sure that if no value is specified for a checkbox\n\t\t// that it defaults to \"on\".\n\t\t// (WebKit defaults to \"\" instead)\n\t\tcheckOn: input.value === \"on\",\n\n\t\t// Make sure that a selected-by-default option has a working selected property.\n\t\t// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)\n\t\toptSelected: opt.selected,\n\n\t\t// Will be defined later\n\t\tdeleteExpando: true,\n\t\toptDisabled: false,\n\t\tcheckClone: false,\n\t\tnoCloneEvent: true,\n\t\tnoCloneChecked: true,\n\t\tboxModel: null,\n\t\tinlineBlockNeedsLayout: false,\n\t\tshrinkWrapBlocks: false,\n\t\treliableHiddenOffsets: true,\n\t\treliableMarginRight: true\n\t};\n\n\tinput.checked = true;\n\tjQuery.support.noCloneChecked = input.cloneNode( true ).checked;\n\n\t// Make sure that the options inside disabled selects aren't marked as disabled\n\t// (WebKit marks them as diabled)\n\tselect.disabled = true;\n\tjQuery.support.optDisabled = !opt.disabled;\n\n\tvar _scriptEval = null;\n\tjQuery.support.scriptEval = function() {\n\t\tif ( _scriptEval === null ) {\n\t\t\tvar root = document.documentElement,\n\t\t\t\tscript = document.createElement(\"script\"),\n\t\t\t\tid = \"script\" + jQuery.now();\n\n\t\t\t// Make sure that the execution of code works by injecting a script\n\t\t\t// tag with appendChild/createTextNode\n\t\t\t// (IE doesn't support this, fails, and uses .text instead)\n\t\t\ttry {\n\t\t\t\tscript.appendChild( document.createTextNode( \"window.\" + id + \"=1;\" ) );\n\t\t\t} catch(e) {}\n\n\t\t\troot.insertBefore( script, root.firstChild );\n\n\t\t\tif ( window[ id ] ) {\n\t\t\t\t_scriptEval = true;\n\t\t\t\tdelete window[ id ];\n\t\t\t} else {\n\t\t\t\t_scriptEval = false;\n\t\t\t}\n\n\t\t\troot.removeChild( script );\n\t\t}\n\n\t\treturn _scriptEval;\n\t};\n\n\t// Test to see if it's possible to delete an expando from an element\n\t// Fails in Internet Explorer\n\ttry {\n\t\tdelete div.test;\n\n\t} catch(e) {\n\t\tjQuery.support.deleteExpando = false;\n\t}\n\n\tif ( !div.addEventListener && div.attachEvent && div.fireEvent ) {\n\t\tdiv.attachEvent(\"onclick\", function click() {\n\t\t\t// Cloning a node shouldn't copy over any\n\t\t\t// bound event handlers (IE does this)\n\t\t\tjQuery.support.noCloneEvent = false;\n\t\t\tdiv.detachEvent(\"onclick\", click);\n\t\t});\n\t\tdiv.cloneNode(true).fireEvent(\"onclick\");\n\t}\n\n\tdiv = document.createElement(\"div\");\n\tdiv.innerHTML = \"<input type='radio' name='radiotest' checked='checked'/>\";\n\n\tvar fragment = document.createDocumentFragment();\n\tfragment.appendChild( div.firstChild );\n\n\t// WebKit doesn't clone checked state correctly in fragments\n\tjQuery.support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked;\n\n\t// Figure out if the W3C box model works as expected\n\t// document.body must exist before we can do this\n\tjQuery(function() {\n\t\tvar div = document.createElement(\"div\"),\n\t\t\tbody = document.getElementsByTagName(\"body\")[0];\n\n\t\t// Frameset documents with no body should not run this code\n\t\tif ( !body ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdiv.style.width = div.style.paddingLeft = \"1px\";\n\t\tbody.appendChild( div );\n\t\tjQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;\n\n\t\tif ( \"zoom\" in div.style ) {\n\t\t\t// Check if natively block-level elements act like inline-block\n\t\t\t// elements when setting their display to 'inline' and giving\n\t\t\t// them layout\n\t\t\t// (IE < 8 does this)\n\t\t\tdiv.style.display = \"inline\";\n\t\t\tdiv.style.zoom = 1;\n\t\t\tjQuery.support.inlineBlockNeedsLayout = div.offsetWidth === 2;\n\n\t\t\t// Check if elements with layout shrink-wrap their children\n\t\t\t// (IE 6 does this)\n\t\t\tdiv.style.display = \"\";\n\t\t\tdiv.innerHTML = \"<div style='width:4px;'></div>\";\n\t\t\tjQuery.support.shrinkWrapBlocks = div.offsetWidth !== 2;\n\t\t}\n\n\t\tdiv.innerHTML = \"<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>\";\n\t\tvar tds = div.getElementsByTagName(\"td\");\n\n\t\t// Check if table cells still have offsetWidth/Height when they are set\n\t\t// to display:none and there are still other visible table cells in a\n\t\t// table row; if so, offsetWidth/Height are not reliable for use when\n\t\t// determining if an element has been hidden directly using\n\t\t// display:none (it is still safe to use offsets if a parent element is\n\t\t// hidden; don safety goggles and see bug #4512 for more information).\n\t\t// (only IE 8 fails this test)\n\t\tjQuery.support.reliableHiddenOffsets = tds[0].offsetHeight === 0;\n\n\t\ttds[0].style.display = \"\";\n\t\ttds[1].style.display = \"none\";\n\n\t\t// Check if empty table cells still have offsetWidth/Height\n\t\t// (IE < 8 fail this test)\n\t\tjQuery.support.reliableHiddenOffsets = jQuery.support.reliableHiddenOffsets && tds[0].offsetHeight === 0;\n\t\tdiv.innerHTML = \"\";\n\n\t\t// Check if div with explicit width and no margin-right incorrectly\n\t\t// gets computed margin-right based on width of container. For more\n\t\t// info see bug #3333\n\t\t// Fails in WebKit before Feb 2011 nightlies\n\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\n\t\tif ( document.defaultView && document.defaultView.getComputedStyle ) {\n\t\t\tdiv.style.width = \"1px\";\n\t\t\tdiv.style.marginRight = \"0\";\n\t\t\tjQuery.support.reliableMarginRight = ( parseInt(document.defaultView.getComputedStyle(div, null).marginRight, 10) || 0 ) === 0;\n\t\t}\n\n\t\tbody.removeChild( div ).style.display = \"none\";\n\t\tdiv = tds = null;\n\t});\n\n\t// Technique from Juriy Zaytsev\n\t// http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/\n\tvar eventSupported = function( eventName ) {\n\t\tvar el = document.createElement(\"div\");\n\t\teventName = \"on\" + eventName;\n\n\t\t// We only care about the case where non-standard event systems\n\t\t// are used, namely in IE. Short-circuiting here helps us to\n\t\t// avoid an eval call (in setAttribute) which can cause CSP\n\t\t// to go haywire. See: https://developer.mozilla.org/en/Security/CSP\n\t\tif ( !el.attachEvent ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tvar isSupported = (eventName in el);\n\t\tif ( !isSupported ) {\n\t\t\tel.setAttribute(eventName, \"return;\");\n\t\t\tisSupported = typeof el[eventName] === \"function\";\n\t\t}\n\t\treturn isSupported;\n\t};\n\n\tjQuery.support.submitBubbles = eventSupported(\"submit\");\n\tjQuery.support.changeBubbles = eventSupported(\"change\");\n\n\t// release memory in IE\n\tdiv = all = a = null;\n})();\n\n\n\nvar rbrace = /^(?:\\{.*\\}|\\[.*\\])$/;\n\njQuery.extend({\n\tcache: {},\n\n\t// Please use with caution\n\tuuid: 0,\n\n\t// Unique for each copy of jQuery on the page\n\t// Non-digits removed to match rinlinejQuery\n\texpando: \"jQuery\" + ( jQuery.fn.jquery + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// The following elements throw uncatchable exceptions if you\n\t// attempt to add expando properties to them.\n\tnoData: {\n\t\t\"embed\": true,\n\t\t// Ban all objects except for Flash (which handle expandos)\n\t\t\"object\": \"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\",\n\t\t\"applet\": true\n\t},\n\n\thasData: function( elem ) {\n\t\telem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];\n\n\t\treturn !!elem && !isEmptyDataObject( elem );\n\t},\n\n\tdata: function( elem, name, data, pvt /* Internal Use Only */ ) {\n\t\tif ( !jQuery.acceptData( elem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar internalKey = jQuery.expando, getByName = typeof name === \"string\", thisCache,\n\n\t\t\t// We have to handle DOM nodes and JS objects differently because IE6-7\n\t\t\t// can't GC object references properly across the DOM-JS boundary\n\t\t\tisNode = elem.nodeType,\n\n\t\t\t// Only DOM nodes need the global jQuery cache; JS object data is\n\t\t\t// attached directly to the object so GC can occur automatically\n\t\t\tcache = isNode ? jQuery.cache : elem,\n\n\t\t\t// Only defining an ID for JS objects if its cache already exists allows\n\t\t\t// the code to shortcut on the same path as a DOM node with no cache\n\t\t\tid = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando;\n\n\t\t// Avoid doing any more work than we need to when trying to get data on an\n\t\t// object that has no data at all\n\t\tif ( (!id || (pvt && id && !cache[ id ][ internalKey ])) && getByName && data === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !id ) {\n\t\t\t// Only DOM nodes need a new unique ID for each element since their data\n\t\t\t// ends up in the global cache\n\t\t\tif ( isNode ) {\n\t\t\t\telem[ jQuery.expando ] = id = ++jQuery.uuid;\n\t\t\t} else {\n\t\t\t\tid = jQuery.expando;\n\t\t\t}\n\t\t}\n\n\t\tif ( !cache[ id ] ) {\n\t\t\tcache[ id ] = {};\n\n\t\t\t// TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery\n\t\t\t// metadata on plain JS objects when the object is serialized using\n\t\t\t// JSON.stringify\n\t\t\tif ( !isNode ) {\n\t\t\t\tcache[ id ].toJSON = jQuery.noop;\n\t\t\t}\n\t\t}\n\n\t\t// An object can be passed to jQuery.data instead of a key/value pair; this gets\n\t\t// shallow copied over onto the existing cache\n\t\tif ( typeof name === \"object\" || typeof name === \"function\" ) {\n\t\t\tif ( pvt ) {\n\t\t\t\tcache[ id ][ internalKey ] = jQuery.extend(cache[ id ][ internalKey ], name);\n\t\t\t} else {\n\t\t\t\tcache[ id ] = jQuery.extend(cache[ id ], name);\n\t\t\t}\n\t\t}\n\n\t\tthisCache = cache[ id ];\n\n\t\t// Internal jQuery data is stored in a separate object inside the object's data\n\t\t// cache in order to avoid key collisions between internal data and user-defined\n\t\t// data\n\t\tif ( pvt ) {\n\t\t\tif ( !thisCache[ internalKey ] ) {\n\t\t\t\tthisCache[ internalKey ] = {};\n\t\t\t}\n\n\t\t\tthisCache = thisCache[ internalKey ];\n\t\t}\n\n\t\tif ( data !== undefined ) {\n\t\t\tthisCache[ name ] = data;\n\t\t}\n\n\t\t// TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should\n\t\t// not attempt to inspect the internal events object using jQuery.data, as this\n\t\t// internal data object is undocumented and subject to change.\n\t\tif ( name === \"events\" && !thisCache[name] ) {\n\t\t\treturn thisCache[ internalKey ] && thisCache[ internalKey ].events;\n\t\t}\n\n\t\treturn getByName ? thisCache[ name ] : thisCache;\n\t},\n\n\tremoveData: function( elem, name, pvt /* Internal Use Only */ ) {\n\t\tif ( !jQuery.acceptData( elem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar internalKey = jQuery.expando, isNode = elem.nodeType,\n\n\t\t\t// See jQuery.data for more information\n\t\t\tcache = isNode ? jQuery.cache : elem,\n\n\t\t\t// See jQuery.data for more information\n\t\t\tid = isNode ? elem[ jQuery.expando ] : jQuery.expando;\n\n\t\t// If there is already no cache entry for this object, there is no\n\t\t// purpose in continuing\n\t\tif ( !cache[ id ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( name ) {\n\t\t\tvar thisCache = pvt ? cache[ id ][ internalKey ] : cache[ id ];\n\n\t\t\tif ( thisCache ) {\n\t\t\t\tdelete thisCache[ name ];\n\n\t\t\t\t// If there is no data left in the cache, we want to continue\n\t\t\t\t// and let the cache object itself get destroyed\n\t\t\t\tif ( !isEmptyDataObject(thisCache) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// See jQuery.data for more information\n\t\tif ( pvt ) {\n\t\t\tdelete cache[ id ][ internalKey ];\n\n\t\t\t// Don't destroy the parent cache unless the internal data object\n\t\t\t// had been the only thing left in it\n\t\t\tif ( !isEmptyDataObject(cache[ id ]) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tvar internalCache = cache[ id ][ internalKey ];\n\n\t\t// Browsers that fail expando deletion also refuse to delete expandos on\n\t\t// the window, but it will allow it on all other JS objects; other browsers\n\t\t// don't care\n\t\tif ( jQuery.support.deleteExpando || cache != window ) {\n\t\t\tdelete cache[ id ];\n\t\t} else {\n\t\t\tcache[ id ] = null;\n\t\t}\n\n\t\t// We destroyed the entire user cache at once because it's faster than\n\t\t// iterating through each key, but we need to continue to persist internal\n\t\t// data if it existed\n\t\tif ( internalCache ) {\n\t\t\tcache[ id ] = {};\n\t\t\t// TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery\n\t\t\t// metadata on plain JS objects when the object is serialized using\n\t\t\t// JSON.stringify\n\t\t\tif ( !isNode ) {\n\t\t\t\tcache[ id ].toJSON = jQuery.noop;\n\t\t\t}\n\n\t\t\tcache[ id ][ internalKey ] = internalCache;\n\n\t\t// Otherwise, we need to eliminate the expando on the node to avoid\n\t\t// false lookups in the cache for entries that no longer exist\n\t\t} else if ( isNode ) {\n\t\t\t// IE does not allow us to delete expando properties from nodes,\n\t\t\t// nor does it have a removeAttribute function on Document nodes;\n\t\t\t// we must handle all of these cases\n\t\t\tif ( jQuery.support.deleteExpando ) {\n\t\t\t\tdelete elem[ jQuery.expando ];\n\t\t\t} else if ( elem.removeAttribute ) {\n\t\t\t\telem.removeAttribute( jQuery.expando );\n\t\t\t} else {\n\t\t\t\telem[ jQuery.expando ] = null;\n\t\t\t}\n\t\t}\n\t},\n\n\t// For internal use only.\n\t_data: function( elem, name, data ) {\n\t\treturn jQuery.data( elem, name, data, true );\n\t},\n\n\t// A method for determining if a DOM node can handle the data expando\n\tacceptData: function( elem ) {\n\t\tif ( elem.nodeName ) {\n\t\t\tvar match = jQuery.noData[ elem.nodeName.toLowerCase() ];\n\n\t\t\tif ( match ) {\n\t\t\t\treturn !(match === true || elem.getAttribute(\"classid\") !== match);\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n});\n\njQuery.fn.extend({\n\tdata: function( key, value ) {\n\t\tvar data = null;\n\n\t\tif ( typeof key === \"undefined\" ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = jQuery.data( this[0] );\n\n\t\t\t\tif ( this[0].nodeType === 1 ) {\n\t\t\t\t\tvar attr = this[0].attributes, name;\n\t\t\t\t\tfor ( var i = 0, l = attr.length; i < l; i++ ) {\n\t\t\t\t\t\tname = attr[i].name;\n\n\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\tname = name.substr( 5 );\n\t\t\t\t\t\t\tdataAttr( this[0], name, data[ name ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\n\t\t} else if ( typeof key === \"object\" ) {\n\t\t\treturn this.each(function() {\n\t\t\t\tjQuery.data( this, key );\n\t\t\t});\n\t\t}\n\n\t\tvar parts = key.split(\".\");\n\t\tparts[1] = parts[1] ? \".\" + parts[1] : \"\";\n\n\t\tif ( value === undefined ) {\n\t\t\tdata = this.triggerHandler(\"getData\" + parts[1] + \"!\", [parts[0]]);\n\n\t\t\t// Try to fetch any internally stored data first\n\t\t\tif ( data === undefined && this.length ) {\n\t\t\t\tdata = jQuery.data( this[0], key );\n\t\t\t\tdata = dataAttr( this[0], key, data );\n\t\t\t}\n\n\t\t\treturn data === undefined && parts[1] ?\n\t\t\t\tthis.data( parts[0] ) :\n\t\t\t\tdata;\n\n\t\t} else {\n\t\t\treturn this.each(function() {\n\t\t\t\tvar $this = jQuery( this ),\n\t\t\t\t\targs = [ parts[0], value ];\n\n\t\t\t\t$this.triggerHandler( \"setData\" + parts[1] + \"!\", args );\n\t\t\t\tjQuery.data( this, key, value );\n\t\t\t\t$this.triggerHandler( \"changeData\" + parts[1] + \"!\", args );\n\t\t\t});\n\t\t}\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery.removeData( this, key );\n\t\t});\n\t}\n});\n\nfunction dataAttr( elem, key, data ) {\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tdata = elem.getAttribute( \"data-\" + key );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = data === \"true\" ? true :\n\t\t\t\tdata === \"false\" ? false :\n\t\t\t\tdata === \"null\" ? null :\n\t\t\t\t!jQuery.isNaN( data ) ? parseFloat( data ) :\n\t\t\t\t\trbrace.test( data ) ? jQuery.parseJSON( data ) :\n\t\t\t\t\tdata;\n\t\t\t} catch( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tjQuery.data( elem, key, data );\n\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\n\treturn data;\n}\n\n// TODO: This is a hack for 1.5 ONLY to allow objects with a single toJSON\n// property to be considered empty objects; this property always exists in\n// order to make sure JSON.stringify does not expose internal metadata\nfunction isEmptyDataObject( obj ) {\n\tfor ( var name in obj ) {\n\t\tif ( name !== \"toJSON\" ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n\n\n\njQuery.extend({\n\tqueue: function( elem, type, data ) {\n\t\tif ( !elem ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttype = (type || \"fx\") + \"queue\";\n\t\tvar q = jQuery._data( elem, type );\n\n\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\tif ( !data ) {\n\t\t\treturn q || [];\n\t\t}\n\n\t\tif ( !q || jQuery.isArray(data) ) {\n\t\t\tq = jQuery._data( elem, type, jQuery.makeArray(data) );\n\n\t\t} else {\n\t\t\tq.push( data );\n\t\t}\n\n\t\treturn q;\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tfn = queue.shift();\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift(\"inprogress\");\n\t\t\t}\n\n\t\t\tfn.call(elem, function() {\n\t\t\t\tjQuery.dequeue(elem, type);\n\t\t\t});\n\t\t}\n\n\t\tif ( !queue.length ) {\n\t\t\tjQuery.removeData( elem, type + \"queue\", true );\n\t\t}\n\t}\n});\n\njQuery.fn.extend({\n\tqueue: function( type, data ) {\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t}\n\n\t\tif ( data === undefined ) {\n\t\t\treturn jQuery.queue( this[0], type );\n\t\t}\n\t\treturn this.each(function( i ) {\n\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\tif ( type === \"fx\" && queue[0] !== \"inprogress\" ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t});\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t});\n\t},\n\n\t// Based off of the plugin by Clint Helfers, with permission.\n\t// http://blindsignals.com/index.php/2009/07/jquery-delay/\n\tdelay: function( time, type ) {\n\t\ttime = jQuery.fx ? jQuery.fx.speeds[time] || time : time;\n\t\ttype = type || \"fx\";\n\n\t\treturn this.queue( type, function() {\n\t\t\tvar elem = this;\n\t\t\tsetTimeout(function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t}, time );\n\t\t});\n\t},\n\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t}\n});\n\n\n\n\nvar rclass = /[\\n\\t\\r]/g,\n\trspaces = /\\s+/,\n\trreturn = /\\r/g,\n\trspecialurl = /^(?:href|src|style)$/,\n\trtype = /^(?:button|input)$/i,\n\trfocusable = /^(?:button|input|object|select|textarea)$/i,\n\trclickable = /^a(?:rea)?$/i,\n\trradiocheck = /^(?:radio|checkbox)$/i;\n\njQuery.props = {\n\t\"for\": \"htmlFor\",\n\t\"class\": \"className\",\n\treadonly: \"readOnly\",\n\tmaxlength: \"maxLength\",\n\tcellspacing: \"cellSpacing\",\n\trowspan: \"rowSpan\",\n\tcolspan: \"colSpan\",\n\ttabindex: \"tabIndex\",\n\tusemap: \"useMap\",\n\tframeborder: \"frameBorder\"\n};\n\njQuery.fn.extend({\n\tattr: function( name, value ) {\n\t\treturn jQuery.access( this, name, value, true, jQuery.attr );\n\t},\n\n\tremoveAttr: function( name, fn ) {\n\t\treturn this.each(function(){\n\t\t\tjQuery.attr( this, name, \"\" );\n\t\t\tif ( this.nodeType === 1 ) {\n\t\t\t\tthis.removeAttribute( name );\n\t\t\t}\n\t\t});\n\t},\n\n\taddClass: function( value ) {\n\t\tif ( jQuery.isFunction(value) ) {\n\t\t\treturn this.each(function(i) {\n\t\t\t\tvar self = jQuery(this);\n\t\t\t\tself.addClass( value.call(this, i, self.attr(\"class\")) );\n\t\t\t});\n\t\t}\n\n\t\tif ( value && typeof value === \"string\" ) {\n\t\t\tvar classNames = (value || \"\").split( rspaces );\n\n\t\t\tfor ( var i = 0, l = this.length; i < l; i++ ) {\n\t\t\t\tvar elem = this[i];\n\n\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\tif ( !elem.className ) {\n\t\t\t\t\t\telem.className = value;\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar className = \" \" + elem.className + \" \",\n\t\t\t\t\t\t\tsetClass = elem.className;\n\n\t\t\t\t\t\tfor ( var c = 0, cl = classNames.length; c < cl; c++ ) {\n\t\t\t\t\t\t\tif ( className.indexOf( \" \" + classNames[c] + \" \" ) < 0 ) {\n\t\t\t\t\t\t\t\tsetClass += \" \" + classNames[c];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telem.className = jQuery.trim( setClass );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tif ( jQuery.isFunction(value) ) {\n\t\t\treturn this.each(function(i) {\n\t\t\t\tvar self = jQuery(this);\n\t\t\t\tself.removeClass( value.call(this, i, self.attr(\"class\")) );\n\t\t\t});\n\t\t}\n\n\t\tif ( (value && typeof value === \"string\") || value === undefined ) {\n\t\t\tvar classNames = (value || \"\").split( rspaces );\n\n\t\t\tfor ( var i = 0, l = this.length; i < l; i++ ) {\n\t\t\t\tvar elem = this[i];\n\n\t\t\t\tif ( elem.nodeType === 1 && elem.className ) {\n\t\t\t\t\tif ( value ) {\n\t\t\t\t\t\tvar className = (\" \" + elem.className + \" \").replace(rclass, \" \");\n\t\t\t\t\t\tfor ( var c = 0, cl = classNames.length; c < cl; c++ ) {\n\t\t\t\t\t\t\tclassName = className.replace(\" \" + classNames[c] + \" \", \" \");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telem.className = jQuery.trim( className );\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\telem.className = \"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar type = typeof value,\n\t\t\tisBool = typeof stateVal === \"boolean\";\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each(function(i) {\n\t\t\t\tvar self = jQuery(this);\n\t\t\t\tself.toggleClass( value.call(this, i, self.attr(\"class\"), stateVal), stateVal );\n\t\t\t});\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\tif ( type === \"string\" ) {\n\t\t\t\t// toggle individual class names\n\t\t\t\tvar className,\n\t\t\t\t\ti = 0,\n\t\t\t\t\tself = jQuery( this ),\n\t\t\t\t\tstate = stateVal,\n\t\t\t\t\tclassNames = value.split( rspaces );\n\n\t\t\t\twhile ( (className = classNames[ i++ ]) ) {\n\t\t\t\t\t// check each className given, space seperated list\n\t\t\t\t\tstate = isBool ? state : !self.hasClass( className );\n\t\t\t\t\tself[ state ? \"addClass\" : \"removeClass\" ]( className );\n\t\t\t\t}\n\n\t\t\t} else if ( type === \"undefined\" || type === \"boolean\" ) {\n\t\t\t\tif ( this.className ) {\n\t\t\t\t\t// store className if set\n\t\t\t\t\tjQuery._data( this, \"__className__\", this.className );\n\t\t\t\t}\n\n\t\t\t\t// toggle whole className\n\t\t\t\tthis.className = this.className || value === false ? \"\" : jQuery._data( this, \"__className__\" ) || \"\";\n\t\t\t}\n\t\t});\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className = \" \" + selector + \" \";\n\t\tfor ( var i = 0, l = this.length; i < l; i++ ) {\n\t\t\tif ( (\" \" + this[i].className + \" \").replace(rclass, \" \").indexOf( className ) > -1 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t},\n\n\tval: function( value ) {\n\t\tif ( !arguments.length ) {\n\t\t\tvar elem = this[0];\n\n\t\t\tif ( elem ) {\n\t\t\t\tif ( jQuery.nodeName( elem, \"option\" ) ) {\n\t\t\t\t\t// attributes.value is undefined in Blackberry 4.7 but\n\t\t\t\t\t// uses .value. See #6932\n\t\t\t\t\tvar val = elem.attributes.value;\n\t\t\t\t\treturn !val || val.specified ? elem.value : elem.text;\n\t\t\t\t}\n\n\t\t\t\t// We need to handle select boxes special\n\t\t\t\tif ( jQuery.nodeName( elem, \"select\" ) ) {\n\t\t\t\t\tvar index = elem.selectedIndex,\n\t\t\t\t\t\tvalues = [],\n\t\t\t\t\t\toptions = elem.options,\n\t\t\t\t\t\tone = elem.type === \"select-one\";\n\n\t\t\t\t\t// Nothing was selected\n\t\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Loop through all the selected options\n\t\t\t\t\tfor ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {\n\t\t\t\t\t\tvar option = options[ i ];\n\n\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\tif ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute(\"disabled\") === null) &&\n\t\t\t\t\t\t\t\t(!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, \"optgroup\" )) ) {\n\n\t\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\t\tvalue = jQuery(option).val();\n\n\t\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fixes Bug #2551 -- select.val() broken in IE after form.reset()\n\t\t\t\t\tif ( one && !values.length && options.length ) {\n\t\t\t\t\t\treturn jQuery( options[ index ] ).val();\n\t\t\t\t\t}\n\n\t\t\t\t\treturn values;\n\t\t\t\t}\n\n\t\t\t\t// Handle the case where in Webkit \"\" is returned instead of \"on\" if a value isn't specified\n\t\t\t\tif ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) {\n\t\t\t\t\treturn elem.getAttribute(\"value\") === null ? \"on\" : elem.value;\n\t\t\t\t}\n\n\t\t\t\t// Everything else, we just grab the value\n\t\t\t\treturn (elem.value || \"\").replace(rreturn, \"\");\n\n\t\t\t}\n\n\t\t\treturn undefined;\n\t\t}\n\n\t\tvar isFunction = jQuery.isFunction(value);\n\n\t\treturn this.each(function(i) {\n\t\t\tvar self = jQuery(this), val = value;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isFunction ) {\n\t\t\t\tval = value.call(this, i, self.val());\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\t\t\t} else if ( jQuery.isArray(val) ) {\n\t\t\t\tval = jQuery.map(val, function (value) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) {\n\t\t\t\tthis.checked = jQuery.inArray( self.val(), val ) >= 0;\n\n\t\t\t} else if ( jQuery.nodeName( this, \"select\" ) ) {\n\t\t\t\tvar values = jQuery.makeArray(val);\n\n\t\t\t\tjQuery( \"option\", this ).each(function() {\n\t\t\t\t\tthis.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;\n\t\t\t\t});\n\n\t\t\t\tif ( !values.length ) {\n\t\t\t\t\tthis.selectedIndex = -1;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t});\n\t}\n});\n\njQuery.extend({\n\tattrFn: {\n\t\tval: true,\n\t\tcss: true,\n\t\thtml: true,\n\t\ttext: true,\n\t\tdata: true,\n\t\twidth: true,\n\t\theight: true,\n\t\toffset: true\n\t},\n\n\tattr: function( elem, name, value, pass ) {\n\t\t// don't get/set attributes on text, comment and attribute nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || elem.nodeType === 2 ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif ( pass && name in jQuery.attrFn ) {\n\t\t\treturn jQuery(elem)[name](value);\n\t\t}\n\n\t\tvar notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc( elem ),\n\t\t\t// Whether we are setting (or getting)\n\t\t\tset = value !== undefined;\n\n\t\t// Try to normalize/fix the name\n\t\tname = notxml && jQuery.props[ name ] || name;\n\n\t\t// Only do all the following if this is a node (faster for style)\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\t// These attributes require special treatment\n\t\t\tvar special = rspecialurl.test( name );\n\n\t\t\t// Safari mis-reports the default selected property of an option\n\t\t\t// Accessing the parent's selectedIndex property fixes it\n\t\t\tif ( name === \"selected\" && !jQuery.support.optSelected ) {\n\t\t\t\tvar parent = elem.parentNode;\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.selectedIndex;\n\n\t\t\t\t\t// Make sure that it also works with optgroups, see #5701\n\t\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If applicable, access the attribute via the DOM 0 way\n\t\t\t// 'in' checks fail in Blackberry 4.7 #6931\n\t\t\tif ( (name in elem || elem[ name ] !== undefined) && notxml && !special ) {\n\t\t\t\tif ( set ) {\n\t\t\t\t\t// We can't allow the type property to be changed (since it causes problems in IE)\n\t\t\t\t\tif ( name === \"type\" && rtype.test( elem.nodeName ) && elem.parentNode ) {\n\t\t\t\t\t\tjQuery.error( \"type property can't be changed\" );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( value === null ) {\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\telem.removeAttribute( name );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\telem[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// browsers index elements by id/name on forms, give priority to attributes.\n\t\t\t\tif ( jQuery.nodeName( elem, \"form\" ) && elem.getAttributeNode(name) ) {\n\t\t\t\t\treturn elem.getAttributeNode( name ).nodeValue;\n\t\t\t\t}\n\n\t\t\t\t// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set\n\t\t\t\t// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\n\t\t\t\tif ( name === \"tabIndex\" ) {\n\t\t\t\t\tvar attributeNode = elem.getAttributeNode( \"tabIndex\" );\n\n\t\t\t\t\treturn attributeNode && attributeNode.specified ?\n\t\t\t\t\t\tattributeNode.value :\n\t\t\t\t\t\trfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?\n\t\t\t\t\t\t\t0 :\n\t\t\t\t\t\t\tundefined;\n\t\t\t\t}\n\n\t\t\t\treturn elem[ name ];\n\t\t\t}\n\n\t\t\tif ( !jQuery.support.style && notxml && name === \"style\" ) {\n\t\t\t\tif ( set ) {\n\t\t\t\t\telem.style.cssText = \"\" + value;\n\t\t\t\t}\n\n\t\t\t\treturn elem.style.cssText;\n\t\t\t}\n\n\t\t\tif ( set ) {\n\t\t\t\t// convert the value to a string (all browsers do this but IE) see #1070\n\t\t\t\telem.setAttribute( name, \"\" + value );\n\t\t\t}\n\n\t\t\t// Ensure that missing attributes return undefined\n\t\t\t// Blackberry 4.7 returns \"\" from getAttribute #6938\n\t\t\tif ( !elem.attributes[ name ] && (elem.hasAttribute && !elem.hasAttribute( name )) ) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tvar attr = !jQuery.support.hrefNormalized && notxml && special ?\n\t\t\t\t\t// Some attributes require a special call on IE\n\t\t\t\t\telem.getAttribute( name, 2 ) :\n\t\t\t\t\telem.getAttribute( name );\n\n\t\t\t// Non-existent attributes return null, we normalize to undefined\n\t\t\treturn attr === null ? undefined : attr;\n\t\t}\n\t\t// Handle everything which isn't a DOM element node\n\t\tif ( set ) {\n\t\t\telem[ name ] = value;\n\t\t}\n\t\treturn elem[ name ];\n\t}\n});\n\n\n\n\nvar rnamespaces = /\\.(.*)$/,\n\trformElems = /^(?:textarea|input|select)$/i,\n\trperiod = /\\./g,\n\trspace = / /g,\n\trescape = /[^\\w\\s.|`]/g,\n\tfcleanup = function( nm ) {\n\t\treturn nm.replace(rescape, \"\\\\$&\");\n\t};\n\n/*\n * A number of helper functions used for managing events.\n * Many of the ideas behind this code originated from\n * Dean Edwards' addEvent library.\n */\njQuery.event = {\n\n\t// Bind an event to an element\n\t// Original by Dean Edwards\n\tadd: function( elem, types, handler, data ) {\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// TODO :: Use a try/catch until it's safe to pull this out (likely 1.6)\n\t\t// Minor release fix for bug #8018\n\t\ttry {\n\t\t\t// For whatever reason, IE has trouble passing the window object\n\t\t\t// around, causing it to be cloned in the process\n\t\t\tif ( jQuery.isWindow( elem ) && ( elem !== window && !elem.frameElement ) ) {\n\t\t\t\telem = window;\n\t\t\t}\n\t\t}\n\t\tcatch ( e ) {}\n\n\t\tif ( handler === false ) {\n\t\t\thandler = returnFalse;\n\t\t} else if ( !handler ) {\n\t\t\t// Fixes bug #7229. Fix recommended by jdalton\n\t\t\treturn;\n\t\t}\n\n\t\tvar handleObjIn, handleObj;\n\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t}\n\n\t\t// Make sure that the function being executed has a unique ID\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure\n\t\tvar elemData = jQuery._data( elem );\n\n\t\t// If no elemData is found then we must be trying to bind to one of the\n\t\t// banned noData elements\n\t\tif ( !elemData ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar events = elemData.events,\n\t\t\teventHandle = elemData.handle;\n\n\t\tif ( !events ) {\n\t\t\telemData.events = events = {};\n\t\t}\n\n\t\tif ( !eventHandle ) {\n\t\t\telemData.handle = eventHandle = function( e ) {\n\t\t\t\t// Handle the second event of a trigger and when\n\t\t\t\t// an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.handle.apply( eventHandle.elem, arguments ) :\n\t\t\t\t\tundefined;\n\t\t\t};\n\t\t}\n\n\t\t// Add elem as a property of the handle function\n\t\t// This is to prevent a memory leak with non-native events in IE.\n\t\teventHandle.elem = elem;\n\n\t\t// Handle multiple events separated by a space\n\t\t// jQuery(...).bind(\"mouseover mouseout\", fn);\n\t\ttypes = types.split(\" \");\n\n\t\tvar type, i = 0, namespaces;\n\n\t\twhile ( (type = types[ i++ ]) ) {\n\t\t\thandleObj = handleObjIn ?\n\t\t\t\tjQuery.extend({}, handleObjIn) :\n\t\t\t\t{ handler: handler, data: data };\n\n\t\t\t// Namespaced event handlers\n\t\t\tif ( type.indexOf(\".\") > -1 ) {\n\t\t\t\tnamespaces = type.split(\".\");\n\t\t\t\ttype = namespaces.shift();\n\t\t\t\thandleObj.namespace = namespaces.slice(0).sort().join(\".\");\n\n\t\t\t} else {\n\t\t\t\tnamespaces = [];\n\t\t\t\thandleObj.namespace = \"\";\n\t\t\t}\n\n\t\t\thandleObj.type = type;\n\t\t\tif ( !handleObj.guid ) {\n\t\t\t\thandleObj.guid = handler.guid;\n\t\t\t}\n\n\t\t\t// Get the current list of functions bound to this event\n\t\t\tvar handlers = events[ type ],\n\t\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// Init the event handler queue\n\t\t\tif ( !handlers ) {\n\t\t\t\thandlers = events[ type ] = [];\n\n\t\t\t\t// Check for a special event handler\n\t\t\t\t// Only use addEventListener/attachEvent if the special\n\t\t\t\t// events handler returns false\n\t\t\t\tif ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\t\t\t\t\t// Bind the global event handler to the element\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle, false );\n\n\t\t\t\t\t} else if ( elem.attachEvent ) {\n\t\t\t\t\t\telem.attachEvent( \"on\" + type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add the function to the element's handler list\n\t\t\thandlers.push( handleObj );\n\n\t\t\t// Keep track of which events have been used, for global triggering\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t\t// Nullify elem to prevent memory leaks in IE\n\t\telem = null;\n\t},\n\n\tglobal: {},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, pos ) {\n\t\t// don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( handler === false ) {\n\t\t\thandler = returnFalse;\n\t\t}\n\n\t\tvar ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType,\n\t\t\telemData = jQuery.hasData( elem ) && jQuery._data( elem ),\n\t\t\tevents = elemData && elemData.events;\n\n\t\tif ( !elemData || !events ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// types is actually an event object here\n\t\tif ( types && types.type ) {\n\t\t\thandler = types.handler;\n\t\t\ttypes = types.type;\n\t\t}\n\n\t\t// Unbind all events for the element\n\t\tif ( !types || typeof types === \"string\" && types.charAt(0) === \".\" ) {\n\t\t\ttypes = types || \"\";\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tjQuery.event.remove( elem, type + types );\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\t// jQuery(...).unbind(\"mouseover mouseout\", fn);\n\t\ttypes = types.split(\" \");\n\n\t\twhile ( (type = types[ i++ ]) ) {\n\t\t\torigType = type;\n\t\t\thandleObj = null;\n\t\t\tall = type.indexOf(\".\") < 0;\n\t\t\tnamespaces = [];\n\n\t\t\tif ( !all ) {\n\t\t\t\t// Namespaced event handlers\n\t\t\t\tnamespaces = type.split(\".\");\n\t\t\t\ttype = namespaces.shift();\n\n\t\t\t\tnamespace = new RegExp(\"(^|\\\\.)\" +\n\t\t\t\t\tjQuery.map( namespaces.slice(0).sort(), fcleanup ).join(\"\\\\.(?:.*\\\\.)?\") + \"(\\\\.|$)\");\n\t\t\t}\n\n\t\t\teventType = events[ type ];\n\n\t\t\tif ( !eventType ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( !handler ) {\n\t\t\t\tfor ( j = 0; j < eventType.length; j++ ) {\n\t\t\t\t\thandleObj = eventType[ j ];\n\n\t\t\t\t\tif ( all || namespace.test( handleObj.namespace ) ) {\n\t\t\t\t\t\tjQuery.event.remove( elem, origType, handleObj.handler, j );\n\t\t\t\t\t\teventType.splice( j--, 1 );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\tfor ( j = pos || 0; j < eventType.length; j++ ) {\n\t\t\t\thandleObj = eventType[ j ];\n\n\t\t\t\tif ( handler.guid === handleObj.guid ) {\n\t\t\t\t\t// remove the given handler for the given type\n\t\t\t\t\tif ( all || namespace.test( handleObj.namespace ) ) {\n\t\t\t\t\t\tif ( pos == null ) {\n\t\t\t\t\t\t\teventType.splice( j--, 1 );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( pos != null ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// remove generic event handler if no more handlers exist\n\t\t\tif ( eventType.length === 0 || pos != null && eventType.length === 1 ) {\n\t\t\t\tif ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tret = null;\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tvar handle = elemData.handle;\n\t\t\tif ( handle ) {\n\t\t\t\thandle.elem = null;\n\t\t\t}\n\n\t\t\tdelete elemData.events;\n\t\t\tdelete elemData.handle;\n\n\t\t\tif ( jQuery.isEmptyObject( elemData ) ) {\n\t\t\t\tjQuery.removeData( elem, undefined, true );\n\t\t\t}\n\t\t}\n\t},\n\n\t// bubbling is internal\n\ttrigger: function( event, data, elem /*, bubbling */ ) {\n\t\t// Event object or event type\n\t\tvar type = event.type || event,\n\t\t\tbubbling = arguments[3];\n\n\t\tif ( !bubbling ) {\n\t\t\tevent = typeof event === \"object\" ?\n\t\t\t\t// jQuery.Event object\n\t\t\t\tevent[ jQuery.expando ] ? event :\n\t\t\t\t// Object literal\n\t\t\t\tjQuery.extend( jQuery.Event(type), event ) :\n\t\t\t\t// Just the event type (string)\n\t\t\t\tjQuery.Event(type);\n\n\t\t\tif ( type.indexOf(\"!\") >= 0 ) {\n\t\t\t\tevent.type = type = type.slice(0, -1);\n\t\t\t\tevent.exclusive = true;\n\t\t\t}\n\n\t\t\t// Handle a global trigger\n\t\t\tif ( !elem ) {\n\t\t\t\t// Don't bubble custom events when global (to avoid too much overhead)\n\t\t\t\tevent.stopPropagation();\n\n\t\t\t\t// Only trigger if we've ever bound an event for it\n\t\t\t\tif ( jQuery.event.global[ type ] ) {\n\t\t\t\t\t// XXX This code smells terrible. event.js should not be directly\n\t\t\t\t\t// inspecting the data cache\n\t\t\t\t\tjQuery.each( jQuery.cache, function() {\n\t\t\t\t\t\t// internalKey variable is just used to make it easier to find\n\t\t\t\t\t\t// and potentially change this stuff later; currently it just\n\t\t\t\t\t\t// points to jQuery.expando\n\t\t\t\t\t\tvar internalKey = jQuery.expando,\n\t\t\t\t\t\t\tinternalCache = this[ internalKey ];\n\t\t\t\t\t\tif ( internalCache && internalCache.events && internalCache.events[ type ] ) {\n\t\t\t\t\t\t\tjQuery.event.trigger( event, data, internalCache.handle.elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle triggering a single element\n\n\t\t\t// don't do events on text and comment nodes\n\t\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\t// Clean up in case it is reused\n\t\t\tevent.result = undefined;\n\t\t\tevent.target = elem;\n\n\t\t\t// Clone the incoming data, if any\n\t\t\tdata = jQuery.makeArray( data );\n\t\t\tdata.unshift( event );\n\t\t}\n\n\t\tevent.currentTarget = elem;\n\n\t\t// Trigger the event, it is assumed that \"handle\" is a function\n\t\tvar handle = jQuery._data( elem, \"handle\" );\n\n\t\tif ( handle ) {\n\t\t\thandle.apply( elem, data );\n\t\t}\n\n\t\tvar parent = elem.parentNode || elem.ownerDocument;\n\n\t\t// Trigger an inline bound script\n\t\ttry {\n\t\t\tif ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) {\n\t\t\t\tif ( elem[ \"on\" + type ] && elem[ \"on\" + type ].apply( elem, data ) === false ) {\n\t\t\t\t\tevent.result = false;\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\n\t\t// prevent IE from throwing an error for some elements with some event types, see #3533\n\t\t} catch (inlineError) {}\n\n\t\tif ( !event.isPropagationStopped() && parent ) {\n\t\t\tjQuery.event.trigger( event, data, parent, true );\n\n\t\t} else if ( !event.isDefaultPrevented() ) {\n\t\t\tvar old,\n\t\t\t\ttarget = event.target,\n\t\t\t\ttargetType = type.replace( rnamespaces, \"\" ),\n\t\t\t\tisClick = jQuery.nodeName( target, \"a\" ) && targetType === \"click\",\n\t\t\t\tspecial = jQuery.event.special[ targetType ] || {};\n\n\t\t\tif ( (!special._default || special._default.call( elem, event ) === false) &&\n\t\t\t\t!isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) {\n\n\t\t\t\ttry {\n\t\t\t\t\tif ( target[ targetType ] ) {\n\t\t\t\t\t\t// Make sure that we don't accidentally re-trigger the onFOO events\n\t\t\t\t\t\told = target[ \"on\" + targetType ];\n\n\t\t\t\t\t\tif ( old ) {\n\t\t\t\t\t\t\ttarget[ \"on\" + targetType ] = null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tjQuery.event.triggered = event.type;\n\t\t\t\t\t\ttarget[ targetType ]();\n\t\t\t\t\t}\n\n\t\t\t\t// prevent IE from throwing an error for some elements with some event types, see #3533\n\t\t\t\t} catch (triggerError) {}\n\n\t\t\t\tif ( old ) {\n\t\t\t\t\ttarget[ \"on\" + targetType ] = old;\n\t\t\t\t}\n\n\t\t\t\tjQuery.event.triggered = undefined;\n\t\t\t}\n\t\t}\n\t},\n\n\thandle: function( event ) {\n\t\tvar all, handlers, namespaces, namespace_re, events,\n\t\t\tnamespace_sort = [],\n\t\t\targs = jQuery.makeArray( arguments );\n\n\t\tevent = args[0] = jQuery.event.fix( event || window.event );\n\t\tevent.currentTarget = this;\n\n\t\t// Namespaced event handlers\n\t\tall = event.type.indexOf(\".\") < 0 && !event.exclusive;\n\n\t\tif ( !all ) {\n\t\t\tnamespaces = event.type.split(\".\");\n\t\t\tevent.type = namespaces.shift();\n\t\t\tnamespace_sort = namespaces.slice(0).sort();\n\t\t\tnamespace_re = new RegExp(\"(^|\\\\.)\" + namespace_sort.join(\"\\\\.(?:.*\\\\.)?\") + \"(\\\\.|$)\");\n\t\t}\n\n\t\tevent.namespace = event.namespace || namespace_sort.join(\".\");\n\n\t\tevents = jQuery._data(this, \"events\");\n\n\t\thandlers = (events || {})[ event.type ];\n\n\t\tif ( events && handlers ) {\n\t\t\t// Clone the handlers to prevent manipulation\n\t\t\thandlers = handlers.slice(0);\n\n\t\t\tfor ( var j = 0, l = handlers.length; j < l; j++ ) {\n\t\t\t\tvar handleObj = handlers[ j ];\n\n\t\t\t\t// Filter the functions by class\n\t\t\t\tif ( all || namespace_re.test( handleObj.namespace ) ) {\n\t\t\t\t\t// Pass in a reference to the handler function itself\n\t\t\t\t\t// So that we can later remove it\n\t\t\t\t\tevent.handler = handleObj.handler;\n\t\t\t\t\tevent.data = handleObj.data;\n\t\t\t\t\tevent.handleObj = handleObj;\n\n\t\t\t\t\tvar ret = handleObj.handler.apply( this, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tevent.result = ret;\n\t\t\t\t\t\tif ( ret === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( event.isImmediatePropagationStopped() ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\tprops: \"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which\".split(\" \"),\n\n\tfix: function( event ) {\n\t\tif ( event[ jQuery.expando ] ) {\n\t\t\treturn event;\n\t\t}\n\n\t\t// store a copy of the original event object\n\t\t// and \"clone\" to set read-only properties\n\t\tvar originalEvent = event;\n\t\tevent = jQuery.Event( originalEvent );\n\n\t\tfor ( var i = this.props.length, prop; i; ) {\n\t\t\tprop = this.props[ --i ];\n\t\t\tevent[ prop ] = originalEvent[ prop ];\n\t\t}\n\n\t\t// Fix target property, if necessary\n\t\tif ( !event.target ) {\n\t\t\t// Fixes #1925 where srcElement might not be defined either\n\t\t\tevent.target = event.srcElement || document;\n\t\t}\n\n\t\t// check if target is a textnode (safari)\n\t\tif ( event.target.nodeType === 3 ) {\n\t\t\tevent.target = event.target.parentNode;\n\t\t}\n\n\t\t// Add relatedTarget, if necessary\n\t\tif ( !event.relatedTarget && event.fromElement ) {\n\t\t\tevent.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;\n\t\t}\n\n\t\t// Calculate pageX/Y if missing and clientX/Y available\n\t\tif ( event.pageX == null && event.clientX != null ) {\n\t\t\tvar doc = document.documentElement,\n\t\t\t\tbody = document.body;\n\n\t\t\tevent.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);\n\t\t\tevent.pageY = event.clientY + (doc && doc.scrollTop  || body && body.scrollTop  || 0) - (doc && doc.clientTop  || body && body.clientTop  || 0);\n\t\t}\n\n\t\t// Add which for key events\n\t\tif ( event.which == null && (event.charCode != null || event.keyCode != null) ) {\n\t\t\tevent.which = event.charCode != null ? event.charCode : event.keyCode;\n\t\t}\n\n\t\t// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)\n\t\tif ( !event.metaKey && event.ctrlKey ) {\n\t\t\tevent.metaKey = event.ctrlKey;\n\t\t}\n\n\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\n\t\t// Note: button is not normalized, so don't use it\n\t\tif ( !event.which && event.button !== undefined ) {\n\t\t\tevent.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));\n\t\t}\n\n\t\treturn event;\n\t},\n\n\t// Deprecated, use jQuery.guid instead\n\tguid: 1E8,\n\n\t// Deprecated, use jQuery.proxy instead\n\tproxy: jQuery.proxy,\n\n\tspecial: {\n\t\tready: {\n\t\t\t// Make sure the ready event is setup\n\t\t\tsetup: jQuery.bindReady,\n\t\t\tteardown: jQuery.noop\n\t\t},\n\n\t\tlive: {\n\t\t\tadd: function( handleObj ) {\n\t\t\t\tjQuery.event.add( this,\n\t\t\t\t\tliveConvert( handleObj.origType, handleObj.selector ),\n\t\t\t\t\tjQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) );\n\t\t\t},\n\n\t\t\tremove: function( handleObj ) {\n\t\t\t\tjQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tsetup: function( data, namespaces, eventHandle ) {\n\t\t\t\t// We only want to do this special case on windows\n\t\t\t\tif ( jQuery.isWindow( this ) ) {\n\t\t\t\t\tthis.onbeforeunload = eventHandle;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tteardown: function( namespaces, eventHandle ) {\n\t\t\t\tif ( this.onbeforeunload === eventHandle ) {\n\t\t\t\t\tthis.onbeforeunload = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\njQuery.removeEvent = document.removeEventListener ?\n\tfunction( elem, type, handle ) {\n\t\tif ( elem.removeEventListener ) {\n\t\t\telem.removeEventListener( type, handle, false );\n\t\t}\n\t} :\n\tfunction( elem, type, handle ) {\n\t\tif ( elem.detachEvent ) {\n\t\t\telem.detachEvent( \"on\" + type, handle );\n\t\t}\n\t};\n\njQuery.Event = function( src ) {\n\t// Allow instantiation without the 'new' keyword\n\tif ( !this.preventDefault ) {\n\t\treturn new jQuery.Event( src );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false ||\n\t\t\tsrc.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// timeStamp is buggy for some events on Firefox(#3843)\n\t// So we won't rely on the native value\n\tthis.timeStamp = jQuery.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\nfunction returnFalse() {\n\treturn false;\n}\nfunction returnTrue() {\n\treturn true;\n}\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tpreventDefault: function() {\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tvar e = this.originalEvent;\n\t\tif ( !e ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// if preventDefault exists run it on the original event\n\t\tif ( e.preventDefault ) {\n\t\t\te.preventDefault();\n\n\t\t// otherwise set the returnValue property of the original event to false (IE)\n\t\t} else {\n\t\t\te.returnValue = false;\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tvar e = this.originalEvent;\n\t\tif ( !e ) {\n\t\t\treturn;\n\t\t}\n\t\t// if stopPropagation exists run it on the original event\n\t\tif ( e.stopPropagation ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t\t// otherwise set the cancelBubble property of the original event to true (IE)\n\t\te.cancelBubble = true;\n\t},\n\tstopImmediatePropagation: function() {\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\t\tthis.stopPropagation();\n\t},\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse\n};\n\n// Checks if an event happened on an element within another element\n// Used in jQuery.event.special.mouseenter and mouseleave handlers\nvar withinElement = function( event ) {\n\t// Check if mouse(over|out) are still within the same parent element\n\tvar parent = event.relatedTarget;\n\n\t// Firefox sometimes assigns relatedTarget a XUL element\n\t// which we cannot access the parentNode property of\n\ttry {\n\n\t\t// Chrome does something similar, the parentNode property\n\t\t// can be accessed but is null.\n\t\tif ( parent && parent !== document && !parent.parentNode ) {\n\t\t\treturn;\n\t\t}\n\t\t// Traverse up the tree\n\t\twhile ( parent && parent !== this ) {\n\t\t\tparent = parent.parentNode;\n\t\t}\n\n\t\tif ( parent !== this ) {\n\t\t\t// set the correct event type\n\t\t\tevent.type = event.data;\n\n\t\t\t// handle event if we actually just moused on to a non sub-element\n\t\t\tjQuery.event.handle.apply( this, arguments );\n\t\t}\n\n\t// assuming we've left the element since we most likely mousedover a xul element\n\t} catch(e) { }\n},\n\n// In case of event delegation, we only need to rename the event.type,\n// liveHandler will take care of the rest.\ndelegate = function( event ) {\n\tevent.type = event.data;\n\tjQuery.event.handle.apply( this, arguments );\n};\n\n// Create mouseenter and mouseleave events\njQuery.each({\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tsetup: function( data ) {\n\t\t\tjQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig );\n\t\t},\n\t\tteardown: function( data ) {\n\t\t\tjQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement );\n\t\t}\n\t};\n});\n\n// submit delegation\nif ( !jQuery.support.submitBubbles ) {\n\n\tjQuery.event.special.submit = {\n\t\tsetup: function( data, namespaces ) {\n\t\t\tif ( this.nodeName && this.nodeName.toLowerCase() !== \"form\" ) {\n\t\t\t\tjQuery.event.add(this, \"click.specialSubmit\", function( e ) {\n\t\t\t\t\tvar elem = e.target,\n\t\t\t\t\t\ttype = elem.type;\n\n\t\t\t\t\tif ( (type === \"submit\" || type === \"image\") && jQuery( elem ).closest(\"form\").length ) {\n\t\t\t\t\t\ttrigger( \"submit\", this, arguments );\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tjQuery.event.add(this, \"keypress.specialSubmit\", function( e ) {\n\t\t\t\t\tvar elem = e.target,\n\t\t\t\t\t\ttype = elem.type;\n\n\t\t\t\t\tif ( (type === \"text\" || type === \"password\") && jQuery( elem ).closest(\"form\").length && e.keyCode === 13 ) {\n\t\t\t\t\t\ttrigger( \"submit\", this, arguments );\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\n\t\tteardown: function( namespaces ) {\n\t\t\tjQuery.event.remove( this, \".specialSubmit\" );\n\t\t}\n\t};\n\n}\n\n// change delegation, happens here so we have bind.\nif ( !jQuery.support.changeBubbles ) {\n\n\tvar changeFilters,\n\n\tgetVal = function( elem ) {\n\t\tvar type = elem.type, val = elem.value;\n\n\t\tif ( type === \"radio\" || type === \"checkbox\" ) {\n\t\t\tval = elem.checked;\n\n\t\t} else if ( type === \"select-multiple\" ) {\n\t\t\tval = elem.selectedIndex > -1 ?\n\t\t\t\tjQuery.map( elem.options, function( elem ) {\n\t\t\t\t\treturn elem.selected;\n\t\t\t\t}).join(\"-\") :\n\t\t\t\t\"\";\n\n\t\t} else if ( elem.nodeName.toLowerCase() === \"select\" ) {\n\t\t\tval = elem.selectedIndex;\n\t\t}\n\n\t\treturn val;\n\t},\n\n\ttestChange = function testChange( e ) {\n\t\tvar elem = e.target, data, val;\n\n\t\tif ( !rformElems.test( elem.nodeName ) || elem.readOnly ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdata = jQuery._data( elem, \"_change_data\" );\n\t\tval = getVal(elem);\n\n\t\t// the current data will be also retrieved by beforeactivate\n\t\tif ( e.type !== \"focusout\" || elem.type !== \"radio\" ) {\n\t\t\tjQuery._data( elem, \"_change_data\", val );\n\t\t}\n\n\t\tif ( data === undefined || val === data ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( data != null || val ) {\n\t\t\te.type = \"change\";\n\t\t\te.liveFired = undefined;\n\t\t\tjQuery.event.trigger( e, arguments[1], elem );\n\t\t}\n\t};\n\n\tjQuery.event.special.change = {\n\t\tfilters: {\n\t\t\tfocusout: testChange,\n\n\t\t\tbeforedeactivate: testChange,\n\n\t\t\tclick: function( e ) {\n\t\t\t\tvar elem = e.target, type = elem.type;\n\n\t\t\t\tif ( type === \"radio\" || type === \"checkbox\" || elem.nodeName.toLowerCase() === \"select\" ) {\n\t\t\t\t\ttestChange.call( this, e );\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// Change has to be called before submit\n\t\t\t// Keydown will be called before keypress, which is used in submit-event delegation\n\t\t\tkeydown: function( e ) {\n\t\t\t\tvar elem = e.target, type = elem.type;\n\n\t\t\t\tif ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== \"textarea\") ||\n\t\t\t\t\t(e.keyCode === 32 && (type === \"checkbox\" || type === \"radio\")) ||\n\t\t\t\t\ttype === \"select-multiple\" ) {\n\t\t\t\t\ttestChange.call( this, e );\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// Beforeactivate happens also before the previous element is blurred\n\t\t\t// with this event you can't trigger a change event, but you can store\n\t\t\t// information\n\t\t\tbeforeactivate: function( e ) {\n\t\t\t\tvar elem = e.target;\n\t\t\t\tjQuery._data( elem, \"_change_data\", getVal(elem) );\n\t\t\t}\n\t\t},\n\n\t\tsetup: function( data, namespaces ) {\n\t\t\tif ( this.type === \"file\" ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tfor ( var type in changeFilters ) {\n\t\t\t\tjQuery.event.add( this, type + \".specialChange\", changeFilters[type] );\n\t\t\t}\n\n\t\t\treturn rformElems.test( this.nodeName );\n\t\t},\n\n\t\tteardown: function( namespaces ) {\n\t\t\tjQuery.event.remove( this, \".specialChange\" );\n\n\t\t\treturn rformElems.test( this.nodeName );\n\t\t}\n\t};\n\n\tchangeFilters = jQuery.event.special.change.filters;\n\n\t// Handle when the input is .focus()'d\n\tchangeFilters.focus = changeFilters.beforeactivate;\n}\n\nfunction trigger( type, elem, args ) {\n\t// Piggyback on a donor event to simulate a different one.\n\t// Fake originalEvent to avoid donor's stopPropagation, but if the\n\t// simulated event prevents default then we do the same on the donor.\n\t// Don't pass args or remember liveFired; they apply to the donor event.\n\tvar event = jQuery.extend( {}, args[ 0 ] );\n\tevent.type = type;\n\tevent.originalEvent = {};\n\tevent.liveFired = undefined;\n\tjQuery.event.handle.call( elem, event );\n\tif ( event.isDefaultPrevented() ) {\n\t\targs[ 0 ].preventDefault();\n\t}\n}\n\n// Create \"bubbling\" focus and blur events\nif ( document.addEventListener ) {\n\tjQuery.each({ focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\t\n\t\t// Attach a single capturing handler while someone wants focusin/focusout\n\t\tvar attaches = 0;\n\t\t\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\t\t\t\tif ( attaches++ === 0 ) {\n\t\t\t\t\tdocument.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tif ( --attaches === 0 ) {\n\t\t\t\t\tdocument.removeEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tfunction handler( donor ) {\n\t\t\t// Donor event is always a native one; fix it and switch its type.\n\t\t\t// Let focusin/out handler cancel the donor focus/blur event.\n\t\t\tvar e = jQuery.event.fix( donor );\n\t\t\te.type = fix;\n\t\t\te.originalEvent = {};\n\t\t\tjQuery.event.trigger( e, null, e.target );\n\t\t\tif ( e.isDefaultPrevented() ) {\n\t\t\t\tdonor.preventDefault();\n\t\t\t}\n\t\t}\n\t});\n}\n\njQuery.each([\"bind\", \"one\"], function( i, name ) {\n\tjQuery.fn[ name ] = function( type, data, fn ) {\n\t\t// Handle object literals\n\t\tif ( typeof type === \"object\" ) {\n\t\t\tfor ( var key in type ) {\n\t\t\t\tthis[ name ](key, data, type[key], fn);\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\n\t\tif ( jQuery.isFunction( data ) || data === false ) {\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\tvar handler = name === \"one\" ? jQuery.proxy( fn, function( event ) {\n\t\t\tjQuery( this ).unbind( event, handler );\n\t\t\treturn fn.apply( this, arguments );\n\t\t}) : fn;\n\n\t\tif ( type === \"unload\" && name !== \"one\" ) {\n\t\t\tthis.one( type, data, fn );\n\n\t\t} else {\n\t\t\tfor ( var i = 0, l = this.length; i < l; i++ ) {\n\t\t\t\tjQuery.event.add( this[i], type, handler, data );\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t};\n});\n\njQuery.fn.extend({\n\tunbind: function( type, fn ) {\n\t\t// Handle object literals\n\t\tif ( typeof type === \"object\" && !type.preventDefault ) {\n\t\t\tfor ( var key in type ) {\n\t\t\t\tthis.unbind(key, type[key]);\n\t\t\t}\n\n\t\t} else {\n\t\t\tfor ( var i = 0, l = this.length; i < l; i++ ) {\n\t\t\t\tjQuery.event.remove( this[i], type, fn );\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.live( types, data, fn, selector );\n\t},\n\n\tundelegate: function( selector, types, fn ) {\n\t\tif ( arguments.length === 0 ) {\n\t\t\t\treturn this.unbind( \"live\" );\n\n\t\t} else {\n\t\t\treturn this.die( types, null, fn, selector );\n\t\t}\n\t},\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t});\n\t},\n\n\ttriggerHandler: function( type, data ) {\n\t\tif ( this[0] ) {\n\t\t\tvar event = jQuery.Event( type );\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tjQuery.event.trigger( event, data, this[0] );\n\t\t\treturn event.result;\n\t\t}\n\t},\n\n\ttoggle: function( fn ) {\n\t\t// Save reference to arguments for access in closure\n\t\tvar args = arguments,\n\t\t\ti = 1;\n\n\t\t// link all the functions, so any of them can unbind this click handler\n\t\twhile ( i < args.length ) {\n\t\t\tjQuery.proxy( fn, args[ i++ ] );\n\t\t}\n\n\t\treturn this.click( jQuery.proxy( fn, function( event ) {\n\t\t\t// Figure out which function to execute\n\t\t\tvar lastToggle = ( jQuery._data( this, \"lastToggle\" + fn.guid ) || 0 ) % i;\n\t\t\tjQuery._data( this, \"lastToggle\" + fn.guid, lastToggle + 1 );\n\n\t\t\t// Make sure that clicks stop\n\t\t\tevent.preventDefault();\n\n\t\t\t// and execute the function\n\t\t\treturn args[ lastToggle ].apply( this, arguments ) || false;\n\t\t}));\n\t},\n\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t}\n});\n\nvar liveMap = {\n\tfocus: \"focusin\",\n\tblur: \"focusout\",\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\"\n};\n\njQuery.each([\"live\", \"die\"], function( i, name ) {\n\tjQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) {\n\t\tvar type, i = 0, match, namespaces, preType,\n\t\t\tselector = origSelector || this.selector,\n\t\t\tcontext = origSelector ? this : jQuery( this.context );\n\n\t\tif ( typeof types === \"object\" && !types.preventDefault ) {\n\t\t\tfor ( var key in types ) {\n\t\t\t\tcontext[ name ]( key, data, types[key], selector );\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\n\t\tif ( jQuery.isFunction( data ) ) {\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\ttypes = (types || \"\").split(\" \");\n\n\t\twhile ( (type = types[ i++ ]) != null ) {\n\t\t\tmatch = rnamespaces.exec( type );\n\t\t\tnamespaces = \"\";\n\n\t\t\tif ( match )  {\n\t\t\t\tnamespaces = match[0];\n\t\t\t\ttype = type.replace( rnamespaces, \"\" );\n\t\t\t}\n\n\t\t\tif ( type === \"hover\" ) {\n\t\t\t\ttypes.push( \"mouseenter\" + namespaces, \"mouseleave\" + namespaces );\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tpreType = type;\n\n\t\t\tif ( type === \"focus\" || type === \"blur\" ) {\n\t\t\t\ttypes.push( liveMap[ type ] + namespaces );\n\t\t\t\ttype = type + namespaces;\n\n\t\t\t} else {\n\t\t\t\ttype = (liveMap[ type ] || type) + namespaces;\n\t\t\t}\n\n\t\t\tif ( name === \"live\" ) {\n\t\t\t\t// bind live handler\n\t\t\t\tfor ( var j = 0, l = context.length; j < l; j++ ) {\n\t\t\t\t\tjQuery.event.add( context[j], \"live.\" + liveConvert( type, selector ),\n\t\t\t\t\t\t{ data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } );\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t// unbind live handler\n\t\t\t\tcontext.unbind( \"live.\" + liveConvert( type, selector ), fn );\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t};\n});\n\nfunction liveHandler( event ) {\n\tvar stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret,\n\t\telems = [],\n\t\tselectors = [],\n\t\tevents = jQuery._data( this, \"events\" );\n\n\t// Make sure we avoid non-left-click bubbling in Firefox (#3861) and disabled elements in IE (#6911)\n\tif ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === \"click\" ) {\n\t\treturn;\n\t}\n\n\tif ( event.namespace ) {\n\t\tnamespace = new RegExp(\"(^|\\\\.)\" + event.namespace.split(\".\").join(\"\\\\.(?:.*\\\\.)?\") + \"(\\\\.|$)\");\n\t}\n\n\tevent.liveFired = this;\n\n\tvar live = events.live.slice(0);\n\n\tfor ( j = 0; j < live.length; j++ ) {\n\t\thandleObj = live[j];\n\n\t\tif ( handleObj.origType.replace( rnamespaces, \"\" ) === event.type ) {\n\t\t\tselectors.push( handleObj.selector );\n\n\t\t} else {\n\t\t\tlive.splice( j--, 1 );\n\t\t}\n\t}\n\n\tmatch = jQuery( event.target ).closest( selectors, event.currentTarget );\n\n\tfor ( i = 0, l = match.length; i < l; i++ ) {\n\t\tclose = match[i];\n\n\t\tfor ( j = 0; j < live.length; j++ ) {\n\t\t\thandleObj = live[j];\n\n\t\t\tif ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) && !close.elem.disabled ) {\n\t\t\t\telem = close.elem;\n\t\t\t\trelated = null;\n\n\t\t\t\t// Those two events require additional checking\n\t\t\t\tif ( handleObj.preType === \"mouseenter\" || handleObj.preType === \"mouseleave\" ) {\n\t\t\t\t\tevent.type = handleObj.preType;\n\t\t\t\t\trelated = jQuery( event.relatedTarget ).closest( handleObj.selector )[0];\n\t\t\t\t}\n\n\t\t\t\tif ( !related || related !== elem ) {\n\t\t\t\t\telems.push({ elem: elem, handleObj: handleObj, level: close.level });\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfor ( i = 0, l = elems.length; i < l; i++ ) {\n\t\tmatch = elems[i];\n\n\t\tif ( maxLevel && match.level > maxLevel ) {\n\t\t\tbreak;\n\t\t}\n\n\t\tevent.currentTarget = match.elem;\n\t\tevent.data = match.handleObj.data;\n\t\tevent.handleObj = match.handleObj;\n\n\t\tret = match.handleObj.origHandler.apply( match.elem, arguments );\n\n\t\tif ( ret === false || event.isPropagationStopped() ) {\n\t\t\tmaxLevel = match.level;\n\n\t\t\tif ( ret === false ) {\n\t\t\t\tstop = false;\n\t\t\t}\n\t\t\tif ( event.isImmediatePropagationStopped() ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn stop;\n}\n\nfunction liveConvert( type, selector ) {\n\treturn (type && type !== \"*\" ? type + \".\" : \"\") + selector.replace(rperiod, \"`\").replace(rspace, \"&\");\n}\n\njQuery.each( (\"blur focus focusin focusout load resize scroll unload click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup error\").split(\" \"), function( i, name ) {\n\n\t// Handle event binding\n\tjQuery.fn[ name ] = function( data, fn ) {\n\t\tif ( fn == null ) {\n\t\t\tfn = data;\n\t\t\tdata = null;\n\t\t}\n\n\t\treturn arguments.length > 0 ?\n\t\t\tthis.bind( name, data, fn ) :\n\t\t\tthis.trigger( name );\n\t};\n\n\tif ( jQuery.attrFn ) {\n\t\tjQuery.attrFn[ name ] = true;\n\t}\n});\n\n\n/*!\n * Sizzle CSS Selector Engine\n *  Copyright 2011, The Dojo Foundation\n *  Released under the MIT, BSD, and GPL Licenses.\n *  More information: http://sizzlejs.com/\n */\n(function(){\n\nvar chunker = /((?:\\((?:\\([^()]+\\)|[^()]+)+\\)|\\[(?:\\[[^\\[\\]]*\\]|['\"][^'\"]*['\"]|[^\\[\\]'\"]+)+\\]|\\\\.|[^ >+~,(\\[\\\\]+)+|[>+~])(\\s*,\\s*)?((?:.|\\r|\\n)*)/g,\n\tdone = 0,\n\ttoString = Object.prototype.toString,\n\thasDuplicate = false,\n\tbaseHasDuplicate = true,\n\trBackslash = /\\\\/g,\n\trNonWord = /\\W/;\n\n// Here we check if the JavaScript engine is using some sort of\n// optimization where it does not always call our comparision\n// function. If that is the case, discard the hasDuplicate value.\n//   Thus far that includes Google Chrome.\n[0, 0].sort(function() {\n\tbaseHasDuplicate = false;\n\treturn 0;\n});\n\nvar Sizzle = function( selector, context, results, seed ) {\n\tresults = results || [];\n\tcontext = context || document;\n\n\tvar origContext = context;\n\n\tif ( context.nodeType !== 1 && context.nodeType !== 9 ) {\n\t\treturn [];\n\t}\n\t\n\tif ( !selector || typeof selector !== \"string\" ) {\n\t\treturn results;\n\t}\n\n\tvar m, set, checkSet, extra, ret, cur, pop, i,\n\t\tprune = true,\n\t\tcontextXML = Sizzle.isXML( context ),\n\t\tparts = [],\n\t\tsoFar = selector;\n\t\n\t// Reset the position of the chunker regexp (start from head)\n\tdo {\n\t\tchunker.exec( \"\" );\n\t\tm = chunker.exec( soFar );\n\n\t\tif ( m ) {\n\t\t\tsoFar = m[3];\n\t\t\n\t\t\tparts.push( m[1] );\n\t\t\n\t\t\tif ( m[2] ) {\n\t\t\t\textra = m[3];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t} while ( m );\n\n\tif ( parts.length > 1 && origPOS.exec( selector ) ) {\n\n\t\tif ( parts.length === 2 && Expr.relative[ parts[0] ] ) {\n\t\t\tset = posProcess( parts[0] + parts[1], context );\n\n\t\t} else {\n\t\t\tset = Expr.relative[ parts[0] ] ?\n\t\t\t\t[ context ] :\n\t\t\t\tSizzle( parts.shift(), context );\n\n\t\t\twhile ( parts.length ) {\n\t\t\t\tselector = parts.shift();\n\n\t\t\t\tif ( Expr.relative[ selector ] ) {\n\t\t\t\t\tselector += parts.shift();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tset = posProcess( selector, set );\n\t\t\t}\n\t\t}\n\n\t} else {\n\t\t// Take a shortcut and set the context if the root selector is an ID\n\t\t// (but not if it'll be faster if the inner selector is an ID)\n\t\tif ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&\n\t\t\t\tExpr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {\n\n\t\t\tret = Sizzle.find( parts.shift(), context, contextXML );\n\t\t\tcontext = ret.expr ?\n\t\t\t\tSizzle.filter( ret.expr, ret.set )[0] :\n\t\t\t\tret.set[0];\n\t\t}\n\n\t\tif ( context ) {\n\t\t\tret = seed ?\n\t\t\t\t{ expr: parts.pop(), set: makeArray(seed) } :\n\t\t\t\tSizzle.find( parts.pop(), parts.length === 1 && (parts[0] === \"~\" || parts[0] === \"+\") && context.parentNode ? context.parentNode : context, contextXML );\n\n\t\t\tset = ret.expr ?\n\t\t\t\tSizzle.filter( ret.expr, ret.set ) :\n\t\t\t\tret.set;\n\n\t\t\tif ( parts.length > 0 ) {\n\t\t\t\tcheckSet = makeArray( set );\n\n\t\t\t} else {\n\t\t\t\tprune = false;\n\t\t\t}\n\n\t\t\twhile ( parts.length ) {\n\t\t\t\tcur = parts.pop();\n\t\t\t\tpop = cur;\n\n\t\t\t\tif ( !Expr.relative[ cur ] ) {\n\t\t\t\t\tcur = \"\";\n\t\t\t\t} else {\n\t\t\t\t\tpop = parts.pop();\n\t\t\t\t}\n\n\t\t\t\tif ( pop == null ) {\n\t\t\t\t\tpop = context;\n\t\t\t\t}\n\n\t\t\t\tExpr.relative[ cur ]( checkSet, pop, contextXML );\n\t\t\t}\n\n\t\t} else {\n\t\t\tcheckSet = parts = [];\n\t\t}\n\t}\n\n\tif ( !checkSet ) {\n\t\tcheckSet = set;\n\t}\n\n\tif ( !checkSet ) {\n\t\tSizzle.error( cur || selector );\n\t}\n\n\tif ( toString.call(checkSet) === \"[object Array]\" ) {\n\t\tif ( !prune ) {\n\t\t\tresults.push.apply( results, checkSet );\n\n\t\t} else if ( context && context.nodeType === 1 ) {\n\t\t\tfor ( i = 0; checkSet[i] != null; i++ ) {\n\t\t\t\tif ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {\n\t\t\t\t\tresults.push( set[i] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\tfor ( i = 0; checkSet[i] != null; i++ ) {\n\t\t\t\tif ( checkSet[i] && checkSet[i].nodeType === 1 ) {\n\t\t\t\t\tresults.push( set[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t} else {\n\t\tmakeArray( checkSet, results );\n\t}\n\n\tif ( extra ) {\n\t\tSizzle( extra, origContext, results, seed );\n\t\tSizzle.uniqueSort( results );\n\t}\n\n\treturn results;\n};\n\nSizzle.uniqueSort = function( results ) {\n\tif ( sortOrder ) {\n\t\thasDuplicate = baseHasDuplicate;\n\t\tresults.sort( sortOrder );\n\n\t\tif ( hasDuplicate ) {\n\t\t\tfor ( var i = 1; i < results.length; i++ ) {\n\t\t\t\tif ( results[i] === results[ i - 1 ] ) {\n\t\t\t\t\tresults.splice( i--, 1 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn results;\n};\n\nSizzle.matches = function( expr, set ) {\n\treturn Sizzle( expr, null, null, set );\n};\n\nSizzle.matchesSelector = function( node, expr ) {\n\treturn Sizzle( expr, null, null, [node] ).length > 0;\n};\n\nSizzle.find = function( expr, context, isXML ) {\n\tvar set;\n\n\tif ( !expr ) {\n\t\treturn [];\n\t}\n\n\tfor ( var i = 0, l = Expr.order.length; i < l; i++ ) {\n\t\tvar match,\n\t\t\ttype = Expr.order[i];\n\t\t\n\t\tif ( (match = Expr.leftMatch[ type ].exec( expr )) ) {\n\t\t\tvar left = match[1];\n\t\t\tmatch.splice( 1, 1 );\n\n\t\t\tif ( left.substr( left.length - 1 ) !== \"\\\\\" ) {\n\t\t\t\tmatch[1] = (match[1] || \"\").replace( rBackslash, \"\" );\n\t\t\t\tset = Expr.find[ type ]( match, context, isXML );\n\n\t\t\t\tif ( set != null ) {\n\t\t\t\t\texpr = expr.replace( Expr.match[ type ], \"\" );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( !set ) {\n\t\tset = typeof context.getElementsByTagName !== \"undefined\" ?\n\t\t\tcontext.getElementsByTagName( \"*\" ) :\n\t\t\t[];\n\t}\n\n\treturn { set: set, expr: expr };\n};\n\nSizzle.filter = function( expr, set, inplace, not ) {\n\tvar match, anyFound,\n\t\told = expr,\n\t\tresult = [],\n\t\tcurLoop = set,\n\t\tisXMLFilter = set && set[0] && Sizzle.isXML( set[0] );\n\n\twhile ( expr && set.length ) {\n\t\tfor ( var type in Expr.filter ) {\n\t\t\tif ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {\n\t\t\t\tvar found, item,\n\t\t\t\t\tfilter = Expr.filter[ type ],\n\t\t\t\t\tleft = match[1];\n\n\t\t\t\tanyFound = false;\n\n\t\t\t\tmatch.splice(1,1);\n\n\t\t\t\tif ( left.substr( left.length - 1 ) === \"\\\\\" ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( curLoop === result ) {\n\t\t\t\t\tresult = [];\n\t\t\t\t}\n\n\t\t\t\tif ( Expr.preFilter[ type ] ) {\n\t\t\t\t\tmatch = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );\n\n\t\t\t\t\tif ( !match ) {\n\t\t\t\t\t\tanyFound = found = true;\n\n\t\t\t\t\t} else if ( match === true ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( match ) {\n\t\t\t\t\tfor ( var i = 0; (item = curLoop[i]) != null; i++ ) {\n\t\t\t\t\t\tif ( item ) {\n\t\t\t\t\t\t\tfound = filter( item, match, i, curLoop );\n\t\t\t\t\t\t\tvar pass = not ^ !!found;\n\n\t\t\t\t\t\t\tif ( inplace && found != null ) {\n\t\t\t\t\t\t\t\tif ( pass ) {\n\t\t\t\t\t\t\t\t\tanyFound = true;\n\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcurLoop[i] = false;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} else if ( pass ) {\n\t\t\t\t\t\t\t\tresult.push( item );\n\t\t\t\t\t\t\t\tanyFound = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( found !== undefined ) {\n\t\t\t\t\tif ( !inplace ) {\n\t\t\t\t\t\tcurLoop = result;\n\t\t\t\t\t}\n\n\t\t\t\t\texpr = expr.replace( Expr.match[ type ], \"\" );\n\n\t\t\t\t\tif ( !anyFound ) {\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Improper expression\n\t\tif ( expr === old ) {\n\t\t\tif ( anyFound == null ) {\n\t\t\t\tSizzle.error( expr );\n\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\told = expr;\n\t}\n\n\treturn curLoop;\n};\n\nSizzle.error = function( msg ) {\n\tthrow \"Syntax error, unrecognized expression: \" + msg;\n};\n\nvar Expr = Sizzle.selectors = {\n\torder: [ \"ID\", \"NAME\", \"TAG\" ],\n\n\tmatch: {\n\t\tID: /#((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)/,\n\t\tCLASS: /\\.((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)/,\n\t\tNAME: /\\[name=['\"]*((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)['\"]*\\]/,\n\t\tATTR: /\\[\\s*((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)\\s*(?:(\\S?=)\\s*(?:(['\"])(.*?)\\3|(#?(?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)*)|)|)\\s*\\]/,\n\t\tTAG: /^((?:[\\w\\u00c0-\\uFFFF\\*\\-]|\\\\.)+)/,\n\t\tCHILD: /:(only|nth|last|first)-child(?:\\(\\s*(even|odd|(?:[+\\-]?\\d+|(?:[+\\-]?\\d*)?n\\s*(?:[+\\-]\\s*\\d+)?))\\s*\\))?/,\n\t\tPOS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\))?(?=[^\\-]|$)/,\n\t\tPSEUDO: /:((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)(?:\\((['\"]?)((?:\\([^\\)]+\\)|[^\\(\\)]*)+)\\2\\))?/\n\t},\n\n\tleftMatch: {},\n\n\tattrMap: {\n\t\t\"class\": \"className\",\n\t\t\"for\": \"htmlFor\"\n\t},\n\n\tattrHandle: {\n\t\thref: function( elem ) {\n\t\t\treturn elem.getAttribute( \"href\" );\n\t\t},\n\t\ttype: function( elem ) {\n\t\t\treturn elem.getAttribute( \"type\" );\n\t\t}\n\t},\n\n\trelative: {\n\t\t\"+\": function(checkSet, part){\n\t\t\tvar isPartStr = typeof part === \"string\",\n\t\t\t\tisTag = isPartStr && !rNonWord.test( part ),\n\t\t\t\tisPartStrNotTag = isPartStr && !isTag;\n\n\t\t\tif ( isTag ) {\n\t\t\t\tpart = part.toLowerCase();\n\t\t\t}\n\n\t\t\tfor ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {\n\t\t\t\tif ( (elem = checkSet[i]) ) {\n\t\t\t\t\twhile ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}\n\n\t\t\t\t\tcheckSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?\n\t\t\t\t\t\telem || false :\n\t\t\t\t\t\telem === part;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( isPartStrNotTag ) {\n\t\t\t\tSizzle.filter( part, checkSet, true );\n\t\t\t}\n\t\t},\n\n\t\t\">\": function( checkSet, part ) {\n\t\t\tvar elem,\n\t\t\t\tisPartStr = typeof part === \"string\",\n\t\t\t\ti = 0,\n\t\t\t\tl = checkSet.length;\n\n\t\t\tif ( isPartStr && !rNonWord.test( part ) ) {\n\t\t\t\tpart = part.toLowerCase();\n\n\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\telem = checkSet[i];\n\n\t\t\t\t\tif ( elem ) {\n\t\t\t\t\t\tvar parent = elem.parentNode;\n\t\t\t\t\t\tcheckSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\telem = checkSet[i];\n\n\t\t\t\t\tif ( elem ) {\n\t\t\t\t\t\tcheckSet[i] = isPartStr ?\n\t\t\t\t\t\t\telem.parentNode :\n\t\t\t\t\t\t\telem.parentNode === part;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( isPartStr ) {\n\t\t\t\t\tSizzle.filter( part, checkSet, true );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t\"\": function(checkSet, part, isXML){\n\t\t\tvar nodeCheck,\n\t\t\t\tdoneName = done++,\n\t\t\t\tcheckFn = dirCheck;\n\n\t\t\tif ( typeof part === \"string\" && !rNonWord.test( part ) ) {\n\t\t\t\tpart = part.toLowerCase();\n\t\t\t\tnodeCheck = part;\n\t\t\t\tcheckFn = dirNodeCheck;\n\t\t\t}\n\n\t\t\tcheckFn( \"parentNode\", part, doneName, checkSet, nodeCheck, isXML );\n\t\t},\n\n\t\t\"~\": function( checkSet, part, isXML ) {\n\t\t\tvar nodeCheck,\n\t\t\t\tdoneName = done++,\n\t\t\t\tcheckFn = dirCheck;\n\n\t\t\tif ( typeof part === \"string\" && !rNonWord.test( part ) ) {\n\t\t\t\tpart = part.toLowerCase();\n\t\t\t\tnodeCheck = part;\n\t\t\t\tcheckFn = dirNodeCheck;\n\t\t\t}\n\n\t\t\tcheckFn( \"previousSibling\", part, doneName, checkSet, nodeCheck, isXML );\n\t\t}\n\t},\n\n\tfind: {\n\t\tID: function( match, context, isXML ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && !isXML ) {\n\t\t\t\tvar m = context.getElementById(match[1]);\n\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t// nodes that are no longer in the document #6963\n\t\t\t\treturn m && m.parentNode ? [m] : [];\n\t\t\t}\n\t\t},\n\n\t\tNAME: function( match, context ) {\n\t\t\tif ( typeof context.getElementsByName !== \"undefined\" ) {\n\t\t\t\tvar ret = [],\n\t\t\t\t\tresults = context.getElementsByName( match[1] );\n\n\t\t\t\tfor ( var i = 0, l = results.length; i < l; i++ ) {\n\t\t\t\t\tif ( results[i].getAttribute(\"name\") === match[1] ) {\n\t\t\t\t\t\tret.push( results[i] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn ret.length === 0 ? null : ret;\n\t\t\t}\n\t\t},\n\n\t\tTAG: function( match, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( match[1] );\n\t\t\t}\n\t\t}\n\t},\n\tpreFilter: {\n\t\tCLASS: function( match, curLoop, inplace, result, not, isXML ) {\n\t\t\tmatch = \" \" + match[1].replace( rBackslash, \"\" ) + \" \";\n\n\t\t\tif ( isXML ) {\n\t\t\t\treturn match;\n\t\t\t}\n\n\t\t\tfor ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {\n\t\t\t\tif ( elem ) {\n\t\t\t\t\tif ( not ^ (elem.className && (\" \" + elem.className + \" \").replace(/[\\t\\n\\r]/g, \" \").indexOf(match) >= 0) ) {\n\t\t\t\t\t\tif ( !inplace ) {\n\t\t\t\t\t\t\tresult.push( elem );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if ( inplace ) {\n\t\t\t\t\t\tcurLoop[i] = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t},\n\n\t\tID: function( match ) {\n\t\t\treturn match[1].replace( rBackslash, \"\" );\n\t\t},\n\n\t\tTAG: function( match, curLoop ) {\n\t\t\treturn match[1].replace( rBackslash, \"\" ).toLowerCase();\n\t\t},\n\n\t\tCHILD: function( match ) {\n\t\t\tif ( match[1] === \"nth\" ) {\n\t\t\t\tif ( !match[2] ) {\n\t\t\t\t\tSizzle.error( match[0] );\n\t\t\t\t}\n\n\t\t\t\tmatch[2] = match[2].replace(/^\\+|\\s*/g, '');\n\n\t\t\t\t// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'\n\t\t\t\tvar test = /(-?)(\\d*)(?:n([+\\-]?\\d*))?/.exec(\n\t\t\t\t\tmatch[2] === \"even\" && \"2n\" || match[2] === \"odd\" && \"2n+1\" ||\n\t\t\t\t\t!/\\D/.test( match[2] ) && \"0n+\" + match[2] || match[2]);\n\n\t\t\t\t// calculate the numbers (first)n+(last) including if they are negative\n\t\t\t\tmatch[2] = (test[1] + (test[2] || 1)) - 0;\n\t\t\t\tmatch[3] = test[3] - 0;\n\t\t\t}\n\t\t\telse if ( match[2] ) {\n\t\t\t\tSizzle.error( match[0] );\n\t\t\t}\n\n\t\t\t// TODO: Move to normal caching system\n\t\t\tmatch[0] = done++;\n\n\t\t\treturn match;\n\t\t},\n\n\t\tATTR: function( match, curLoop, inplace, result, not, isXML ) {\n\t\t\tvar name = match[1] = match[1].replace( rBackslash, \"\" );\n\t\t\t\n\t\t\tif ( !isXML && Expr.attrMap[name] ) {\n\t\t\t\tmatch[1] = Expr.attrMap[name];\n\t\t\t}\n\n\t\t\t// Handle if an un-quoted value was used\n\t\t\tmatch[4] = ( match[4] || match[5] || \"\" ).replace( rBackslash, \"\" );\n\n\t\t\tif ( match[2] === \"~=\" ) {\n\t\t\t\tmatch[4] = \" \" + match[4] + \" \";\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\tPSEUDO: function( match, curLoop, inplace, result, not ) {\n\t\t\tif ( match[1] === \"not\" ) {\n\t\t\t\t// If we're dealing with a complex expression, or a simple one\n\t\t\t\tif ( ( chunker.exec(match[3]) || \"\" ).length > 1 || /^\\w/.test(match[3]) ) {\n\t\t\t\t\tmatch[3] = Sizzle(match[3], null, null, curLoop);\n\n\t\t\t\t} else {\n\t\t\t\t\tvar ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);\n\n\t\t\t\t\tif ( !inplace ) {\n\t\t\t\t\t\tresult.push.apply( result, ret );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\treturn match;\n\t\t},\n\n\t\tPOS: function( match ) {\n\t\t\tmatch.unshift( true );\n\n\t\t\treturn match;\n\t\t}\n\t},\n\t\n\tfilters: {\n\t\tenabled: function( elem ) {\n\t\t\treturn elem.disabled === false && elem.type !== \"hidden\";\n\t\t},\n\n\t\tdisabled: function( elem ) {\n\t\t\treturn elem.disabled === true;\n\t\t},\n\n\t\tchecked: function( elem ) {\n\t\t\treturn elem.checked === true;\n\t\t},\n\t\t\n\t\tselected: function( elem ) {\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\t\t\t\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\tparent: function( elem ) {\n\t\t\treturn !!elem.firstChild;\n\t\t},\n\n\t\tempty: function( elem ) {\n\t\t\treturn !elem.firstChild;\n\t\t},\n\n\t\thas: function( elem, i, match ) {\n\t\t\treturn !!Sizzle( match[3], elem ).length;\n\t\t},\n\n\t\theader: function( elem ) {\n\t\t\treturn (/h\\d/i).test( elem.nodeName );\n\t\t},\n\n\t\ttext: function( elem ) {\n\t\t\tvar attr = elem.getAttribute( \"type\" ), type = elem.type;\n\t\t\t// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) \n\t\t\t// use getAttribute instead to test this case\n\t\t\treturn \"text\" === type && ( attr === type || attr === null );\n\t\t},\n\n\t\tradio: function( elem ) {\n\t\t\treturn \"radio\" === elem.type;\n\t\t},\n\n\t\tcheckbox: function( elem ) {\n\t\t\treturn \"checkbox\" === elem.type;\n\t\t},\n\n\t\tfile: function( elem ) {\n\t\t\treturn \"file\" === elem.type;\n\t\t},\n\t\tpassword: function( elem ) {\n\t\t\treturn \"password\" === elem.type;\n\t\t},\n\n\t\tsubmit: function( elem ) {\n\t\t\treturn \"submit\" === elem.type;\n\t\t},\n\n\t\timage: function( elem ) {\n\t\t\treturn \"image\" === elem.type;\n\t\t},\n\n\t\treset: function( elem ) {\n\t\t\treturn \"reset\" === elem.type;\n\t\t},\n\n\t\tbutton: function( elem ) {\n\t\t\treturn \"button\" === elem.type || elem.nodeName.toLowerCase() === \"button\";\n\t\t},\n\n\t\tinput: function( elem ) {\n\t\t\treturn (/input|select|textarea|button/i).test( elem.nodeName );\n\t\t}\n\t},\n\tsetFilters: {\n\t\tfirst: function( elem, i ) {\n\t\t\treturn i === 0;\n\t\t},\n\n\t\tlast: function( elem, i, match, array ) {\n\t\t\treturn i === array.length - 1;\n\t\t},\n\n\t\teven: function( elem, i ) {\n\t\t\treturn i % 2 === 0;\n\t\t},\n\n\t\todd: function( elem, i ) {\n\t\t\treturn i % 2 === 1;\n\t\t},\n\n\t\tlt: function( elem, i, match ) {\n\t\t\treturn i < match[3] - 0;\n\t\t},\n\n\t\tgt: function( elem, i, match ) {\n\t\t\treturn i > match[3] - 0;\n\t\t},\n\n\t\tnth: function( elem, i, match ) {\n\t\t\treturn match[3] - 0 === i;\n\t\t},\n\n\t\teq: function( elem, i, match ) {\n\t\t\treturn match[3] - 0 === i;\n\t\t}\n\t},\n\tfilter: {\n\t\tPSEUDO: function( elem, match, i, array ) {\n\t\t\tvar name = match[1],\n\t\t\t\tfilter = Expr.filters[ name ];\n\n\t\t\tif ( filter ) {\n\t\t\t\treturn filter( elem, i, match, array );\n\n\t\t\t} else if ( name === \"contains\" ) {\n\t\t\t\treturn (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || \"\").indexOf(match[3]) >= 0;\n\n\t\t\t} else if ( name === \"not\" ) {\n\t\t\t\tvar not = match[3];\n\n\t\t\t\tfor ( var j = 0, l = not.length; j < l; j++ ) {\n\t\t\t\t\tif ( not[j] === elem ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\n\t\t\t} else {\n\t\t\t\tSizzle.error( name );\n\t\t\t}\n\t\t},\n\n\t\tCHILD: function( elem, match ) {\n\t\t\tvar type = match[1],\n\t\t\t\tnode = elem;\n\n\t\t\tswitch ( type ) {\n\t\t\t\tcase \"only\":\n\t\t\t\tcase \"first\":\n\t\t\t\t\twhile ( (node = node.previousSibling) )\t {\n\t\t\t\t\t\tif ( node.nodeType === 1 ) { \n\t\t\t\t\t\t\treturn false; \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( type === \"first\" ) { \n\t\t\t\t\t\treturn true; \n\t\t\t\t\t}\n\n\t\t\t\t\tnode = elem;\n\n\t\t\t\tcase \"last\":\n\t\t\t\t\twhile ( (node = node.nextSibling) )\t {\n\t\t\t\t\t\tif ( node.nodeType === 1 ) { \n\t\t\t\t\t\t\treturn false; \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn true;\n\n\t\t\t\tcase \"nth\":\n\t\t\t\t\tvar first = match[2],\n\t\t\t\t\t\tlast = match[3];\n\n\t\t\t\t\tif ( first === 1 && last === 0 ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvar doneName = match[0],\n\t\t\t\t\t\tparent = elem.parentNode;\n\t\n\t\t\t\t\tif ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {\n\t\t\t\t\t\tvar count = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor ( node = parent.firstChild; node; node = node.nextSibling ) {\n\t\t\t\t\t\t\tif ( node.nodeType === 1 ) {\n\t\t\t\t\t\t\t\tnode.nodeIndex = ++count;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} \n\n\t\t\t\t\t\tparent.sizcache = doneName;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvar diff = elem.nodeIndex - last;\n\n\t\t\t\t\tif ( first === 0 ) {\n\t\t\t\t\t\treturn diff === 0;\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tID: function( elem, match ) {\n\t\t\treturn elem.nodeType === 1 && elem.getAttribute(\"id\") === match;\n\t\t},\n\n\t\tTAG: function( elem, match ) {\n\t\t\treturn (match === \"*\" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;\n\t\t},\n\t\t\n\t\tCLASS: function( elem, match ) {\n\t\t\treturn (\" \" + (elem.className || elem.getAttribute(\"class\")) + \" \")\n\t\t\t\t.indexOf( match ) > -1;\n\t\t},\n\n\t\tATTR: function( elem, match ) {\n\t\t\tvar name = match[1],\n\t\t\t\tresult = Expr.attrHandle[ name ] ?\n\t\t\t\t\tExpr.attrHandle[ name ]( elem ) :\n\t\t\t\t\telem[ name ] != null ?\n\t\t\t\t\t\telem[ name ] :\n\t\t\t\t\t\telem.getAttribute( name ),\n\t\t\t\tvalue = result + \"\",\n\t\t\t\ttype = match[2],\n\t\t\t\tcheck = match[4];\n\n\t\t\treturn result == null ?\n\t\t\t\ttype === \"!=\" :\n\t\t\t\ttype === \"=\" ?\n\t\t\t\tvalue === check :\n\t\t\t\ttype === \"*=\" ?\n\t\t\t\tvalue.indexOf(check) >= 0 :\n\t\t\t\ttype === \"~=\" ?\n\t\t\t\t(\" \" + value + \" \").indexOf(check) >= 0 :\n\t\t\t\t!check ?\n\t\t\t\tvalue && result !== false :\n\t\t\t\ttype === \"!=\" ?\n\t\t\t\tvalue !== check :\n\t\t\t\ttype === \"^=\" ?\n\t\t\t\tvalue.indexOf(check) === 0 :\n\t\t\t\ttype === \"$=\" ?\n\t\t\t\tvalue.substr(value.length - check.length) === check :\n\t\t\t\ttype === \"|=\" ?\n\t\t\t\tvalue === check || value.substr(0, check.length + 1) === check + \"-\" :\n\t\t\t\tfalse;\n\t\t},\n\n\t\tPOS: function( elem, match, i, array ) {\n\t\t\tvar name = match[2],\n\t\t\t\tfilter = Expr.setFilters[ name ];\n\n\t\t\tif ( filter ) {\n\t\t\t\treturn filter( elem, i, match, array );\n\t\t\t}\n\t\t}\n\t}\n};\n\nvar origPOS = Expr.match.POS,\n\tfescape = function(all, num){\n\t\treturn \"\\\\\" + (num - 0 + 1);\n\t};\n\nfor ( var type in Expr.match ) {\n\tExpr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\\[]*\\])(?![^\\(]*\\))/.source) );\n\tExpr.leftMatch[ type ] = new RegExp( /(^(?:.|\\r|\\n)*?)/.source + Expr.match[ type ].source.replace(/\\\\(\\d+)/g, fescape) );\n}\n\nvar makeArray = function( array, results ) {\n\tarray = Array.prototype.slice.call( array, 0 );\n\n\tif ( results ) {\n\t\tresults.push.apply( results, array );\n\t\treturn results;\n\t}\n\t\n\treturn array;\n};\n\n// Perform a simple check to determine if the browser is capable of\n// converting a NodeList to an array using builtin methods.\n// Also verifies that the returned array holds DOM nodes\n// (which is not the case in the Blackberry browser)\ntry {\n\tArray.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;\n\n// Provide a fallback method if it does not work\n} catch( e ) {\n\tmakeArray = function( array, results ) {\n\t\tvar i = 0,\n\t\t\tret = results || [];\n\n\t\tif ( toString.call(array) === \"[object Array]\" ) {\n\t\t\tArray.prototype.push.apply( ret, array );\n\n\t\t} else {\n\t\t\tif ( typeof array.length === \"number\" ) {\n\t\t\t\tfor ( var l = array.length; i < l; i++ ) {\n\t\t\t\t\tret.push( array[i] );\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tfor ( ; array[i]; i++ ) {\n\t\t\t\t\tret.push( array[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t};\n}\n\nvar sortOrder, siblingCheck;\n\nif ( document.documentElement.compareDocumentPosition ) {\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tif ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {\n\t\t\treturn a.compareDocumentPosition ? -1 : 1;\n\t\t}\n\n\t\treturn a.compareDocumentPosition(b) & 4 ? -1 : 1;\n\t};\n\n} else {\n\tsortOrder = function( a, b ) {\n\t\tvar al, bl,\n\t\t\tap = [],\n\t\t\tbp = [],\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tcur = aup;\n\n\t\t// The nodes are identical, we can exit early\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\n\t\t// If the nodes are siblings (or identical) we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\n\t\t// If no parents were found then the nodes are disconnected\n\t\t} else if ( !aup ) {\n\t\t\treturn -1;\n\n\t\t} else if ( !bup ) {\n\t\t\treturn 1;\n\t\t}\n\n\t\t// Otherwise they're somewhere else in the tree so we need\n\t\t// to build up a full list of the parentNodes for comparison\n\t\twhile ( cur ) {\n\t\t\tap.unshift( cur );\n\t\t\tcur = cur.parentNode;\n\t\t}\n\n\t\tcur = bup;\n\n\t\twhile ( cur ) {\n\t\t\tbp.unshift( cur );\n\t\t\tcur = cur.parentNode;\n\t\t}\n\n\t\tal = ap.length;\n\t\tbl = bp.length;\n\n\t\t// Start walking down the tree looking for a discrepancy\n\t\tfor ( var i = 0; i < al && i < bl; i++ ) {\n\t\t\tif ( ap[i] !== bp[i] ) {\n\t\t\t\treturn siblingCheck( ap[i], bp[i] );\n\t\t\t}\n\t\t}\n\n\t\t// We ended someplace up the tree so do a sibling check\n\t\treturn i === al ?\n\t\t\tsiblingCheck( a, bp[i], -1 ) :\n\t\t\tsiblingCheck( ap[i], b, 1 );\n\t};\n\n\tsiblingCheck = function( a, b, ret ) {\n\t\tif ( a === b ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tvar cur = a.nextSibling;\n\n\t\twhile ( cur ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\tcur = cur.nextSibling;\n\t\t}\n\n\t\treturn 1;\n\t};\n}\n\n// Utility function for retreiving the text value of an array of DOM nodes\nSizzle.getText = function( elems ) {\n\tvar ret = \"\", elem;\n\n\tfor ( var i = 0; elems[i]; i++ ) {\n\t\telem = elems[i];\n\n\t\t// Get the text from text nodes and CDATA nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 4 ) {\n\t\t\tret += elem.nodeValue;\n\n\t\t// Traverse everything else, except comment nodes\n\t\t} else if ( elem.nodeType !== 8 ) {\n\t\t\tret += Sizzle.getText( elem.childNodes );\n\t\t}\n\t}\n\n\treturn ret;\n};\n\n// Check to see if the browser returns elements by name when\n// querying by getElementById (and provide a workaround)\n(function(){\n\t// We're going to inject a fake input element with a specified name\n\tvar form = document.createElement(\"div\"),\n\t\tid = \"script\" + (new Date()).getTime(),\n\t\troot = document.documentElement;\n\n\tform.innerHTML = \"<a name='\" + id + \"'/>\";\n\n\t// Inject it into the root element, check its status, and remove it quickly\n\troot.insertBefore( form, root.firstChild );\n\n\t// The workaround has to do additional checks after a getElementById\n\t// Which slows things down for other browsers (hence the branching)\n\tif ( document.getElementById( id ) ) {\n\t\tExpr.find.ID = function( match, context, isXML ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && !isXML ) {\n\t\t\t\tvar m = context.getElementById(match[1]);\n\n\t\t\t\treturn m ?\n\t\t\t\t\tm.id === match[1] || typeof m.getAttributeNode !== \"undefined\" && m.getAttributeNode(\"id\").nodeValue === match[1] ?\n\t\t\t\t\t\t[m] :\n\t\t\t\t\t\tundefined :\n\t\t\t\t\t[];\n\t\t\t}\n\t\t};\n\n\t\tExpr.filter.ID = function( elem, match ) {\n\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" && elem.getAttributeNode(\"id\");\n\n\t\t\treturn elem.nodeType === 1 && node && node.nodeValue === match;\n\t\t};\n\t}\n\n\troot.removeChild( form );\n\n\t// release memory in IE\n\troot = form = null;\n})();\n\n(function(){\n\t// Check to see if the browser returns only elements\n\t// when doing getElementsByTagName(\"*\")\n\n\t// Create a fake element\n\tvar div = document.createElement(\"div\");\n\tdiv.appendChild( document.createComment(\"\") );\n\n\t// Make sure no comments are found\n\tif ( div.getElementsByTagName(\"*\").length > 0 ) {\n\t\tExpr.find.TAG = function( match, context ) {\n\t\t\tvar results = context.getElementsByTagName( match[1] );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( match[1] === \"*\" ) {\n\t\t\t\tvar tmp = [];\n\n\t\t\t\tfor ( var i = 0; results[i]; i++ ) {\n\t\t\t\t\tif ( results[i].nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( results[i] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tresults = tmp;\n\t\t\t}\n\n\t\t\treturn results;\n\t\t};\n\t}\n\n\t// Check to see if an attribute returns normalized href attributes\n\tdiv.innerHTML = \"<a href='#'></a>\";\n\n\tif ( div.firstChild && typeof div.firstChild.getAttribute !== \"undefined\" &&\n\t\t\tdiv.firstChild.getAttribute(\"href\") !== \"#\" ) {\n\n\t\tExpr.attrHandle.href = function( elem ) {\n\t\t\treturn elem.getAttribute( \"href\", 2 );\n\t\t};\n\t}\n\n\t// release memory in IE\n\tdiv = null;\n})();\n\nif ( document.querySelectorAll ) {\n\t(function(){\n\t\tvar oldSizzle = Sizzle,\n\t\t\tdiv = document.createElement(\"div\"),\n\t\t\tid = \"__sizzle__\";\n\n\t\tdiv.innerHTML = \"<p class='TEST'></p>\";\n\n\t\t// Safari can't handle uppercase or unicode characters when\n\t\t// in quirks mode.\n\t\tif ( div.querySelectorAll && div.querySelectorAll(\".TEST\").length === 0 ) {\n\t\t\treturn;\n\t\t}\n\t\n\t\tSizzle = function( query, context, extra, seed ) {\n\t\t\tcontext = context || document;\n\n\t\t\t// Only use querySelectorAll on non-XML documents\n\t\t\t// (ID selectors don't work in non-HTML documents)\n\t\t\tif ( !seed && !Sizzle.isXML(context) ) {\n\t\t\t\t// See if we find a selector to speed up\n\t\t\t\tvar match = /^(\\w+$)|^\\.([\\w\\-]+$)|^#([\\w\\-]+$)/.exec( query );\n\t\t\t\t\n\t\t\t\tif ( match && (context.nodeType === 1 || context.nodeType === 9) ) {\n\t\t\t\t\t// Speed-up: Sizzle(\"TAG\")\n\t\t\t\t\tif ( match[1] ) {\n\t\t\t\t\t\treturn makeArray( context.getElementsByTagName( query ), extra );\n\t\t\t\t\t\n\t\t\t\t\t// Speed-up: Sizzle(\".CLASS\")\n\t\t\t\t\t} else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {\n\t\t\t\t\t\treturn makeArray( context.getElementsByClassName( match[2] ), extra );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( context.nodeType === 9 ) {\n\t\t\t\t\t// Speed-up: Sizzle(\"body\")\n\t\t\t\t\t// The body element only exists once, optimize finding it\n\t\t\t\t\tif ( query === \"body\" && context.body ) {\n\t\t\t\t\t\treturn makeArray( [ context.body ], extra );\n\t\t\t\t\t\t\n\t\t\t\t\t// Speed-up: Sizzle(\"#ID\")\n\t\t\t\t\t} else if ( match && match[3] ) {\n\t\t\t\t\t\tvar elem = context.getElementById( match[3] );\n\n\t\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t\t\t// nodes that are no longer in the document #6963\n\t\t\t\t\t\tif ( elem && elem.parentNode ) {\n\t\t\t\t\t\t\t// Handle the case where IE and Opera return items\n\t\t\t\t\t\t\t// by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === match[3] ) {\n\t\t\t\t\t\t\t\treturn makeArray( [ elem ], extra );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn makeArray( [], extra );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn makeArray( context.querySelectorAll(query), extra );\n\t\t\t\t\t} catch(qsaError) {}\n\n\t\t\t\t// qSA works strangely on Element-rooted queries\n\t\t\t\t// We can work around this by specifying an extra ID on the root\n\t\t\t\t// and working up from there (Thanks to Andrew Dupont for the technique)\n\t\t\t\t// IE 8 doesn't work on object elements\n\t\t\t\t} else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== \"object\" ) {\n\t\t\t\t\tvar oldContext = context,\n\t\t\t\t\t\told = context.getAttribute( \"id\" ),\n\t\t\t\t\t\tnid = old || id,\n\t\t\t\t\t\thasParent = context.parentNode,\n\t\t\t\t\t\trelativeHierarchySelector = /^\\s*[+~]/.test( query );\n\n\t\t\t\t\tif ( !old ) {\n\t\t\t\t\t\tcontext.setAttribute( \"id\", nid );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnid = nid.replace( /'/g, \"\\\\$&\" );\n\t\t\t\t\t}\n\t\t\t\t\tif ( relativeHierarchySelector && hasParent ) {\n\t\t\t\t\t\tcontext = context.parentNode;\n\t\t\t\t\t}\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif ( !relativeHierarchySelector || hasParent ) {\n\t\t\t\t\t\t\treturn makeArray( context.querySelectorAll( \"[id='\" + nid + \"'] \" + query ), extra );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch(pseudoError) {\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif ( !old ) {\n\t\t\t\t\t\t\toldContext.removeAttribute( \"id\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn oldSizzle(query, context, extra, seed);\n\t\t};\n\n\t\tfor ( var prop in oldSizzle ) {\n\t\t\tSizzle[ prop ] = oldSizzle[ prop ];\n\t\t}\n\n\t\t// release memory in IE\n\t\tdiv = null;\n\t})();\n}\n\n(function(){\n\tvar html = document.documentElement,\n\t\tmatches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;\n\n\tif ( matches ) {\n\t\t// Check to see if it's possible to do matchesSelector\n\t\t// on a disconnected node (IE 9 fails this)\n\t\tvar disconnectedMatch = !matches.call( document.createElement( \"div\" ), \"div\" ),\n\t\t\tpseudoWorks = false;\n\n\t\ttry {\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( document.documentElement, \"[test!='']:sizzle\" );\n\t\n\t\t} catch( pseudoError ) {\n\t\t\tpseudoWorks = true;\n\t\t}\n\n\t\tSizzle.matchesSelector = function( node, expr ) {\n\t\t\t// Make sure that attribute selectors are quoted\n\t\t\texpr = expr.replace(/\\=\\s*([^'\"\\]]*)\\s*\\]/g, \"='$1']\");\n\n\t\t\tif ( !Sizzle.isXML( node ) ) {\n\t\t\t\ttry { \n\t\t\t\t\tif ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {\n\t\t\t\t\t\tvar ret = matches.call( node, expr );\n\n\t\t\t\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\t\t\t\tif ( ret || !disconnectedMatch ||\n\t\t\t\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t\t\t\t// fragment in IE 9, so check for that\n\t\t\t\t\t\t\t\tnode.document && node.document.nodeType !== 11 ) {\n\t\t\t\t\t\t\treturn ret;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch(e) {}\n\t\t\t}\n\n\t\t\treturn Sizzle(expr, null, null, [node]).length > 0;\n\t\t};\n\t}\n})();\n\n(function(){\n\tvar div = document.createElement(\"div\");\n\n\tdiv.innerHTML = \"<div class='test e'></div><div class='test'></div>\";\n\n\t// Opera can't find a second classname (in 9.6)\n\t// Also, make sure that getElementsByClassName actually exists\n\tif ( !div.getElementsByClassName || div.getElementsByClassName(\"e\").length === 0 ) {\n\t\treturn;\n\t}\n\n\t// Safari caches class attributes, doesn't catch changes (in 3.2)\n\tdiv.lastChild.className = \"e\";\n\n\tif ( div.getElementsByClassName(\"e\").length === 1 ) {\n\t\treturn;\n\t}\n\t\n\tExpr.order.splice(1, 0, \"CLASS\");\n\tExpr.find.CLASS = function( match, context, isXML ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && !isXML ) {\n\t\t\treturn context.getElementsByClassName(match[1]);\n\t\t}\n\t};\n\n\t// release memory in IE\n\tdiv = null;\n})();\n\nfunction dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {\n\tfor ( var i = 0, l = checkSet.length; i < l; i++ ) {\n\t\tvar elem = checkSet[i];\n\n\t\tif ( elem ) {\n\t\t\tvar match = false;\n\n\t\t\telem = elem[dir];\n\n\t\t\twhile ( elem ) {\n\t\t\t\tif ( elem.sizcache === doneName ) {\n\t\t\t\t\tmatch = checkSet[elem.sizset];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ( elem.nodeType === 1 && !isXML ){\n\t\t\t\t\telem.sizcache = doneName;\n\t\t\t\t\telem.sizset = i;\n\t\t\t\t}\n\n\t\t\t\tif ( elem.nodeName.toLowerCase() === cur ) {\n\t\t\t\t\tmatch = elem;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\telem = elem[dir];\n\t\t\t}\n\n\t\t\tcheckSet[i] = match;\n\t\t}\n\t}\n}\n\nfunction dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {\n\tfor ( var i = 0, l = checkSet.length; i < l; i++ ) {\n\t\tvar elem = checkSet[i];\n\n\t\tif ( elem ) {\n\t\t\tvar match = false;\n\t\t\t\n\t\t\telem = elem[dir];\n\n\t\t\twhile ( elem ) {\n\t\t\t\tif ( elem.sizcache === doneName ) {\n\t\t\t\t\tmatch = checkSet[elem.sizset];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\tif ( !isXML ) {\n\t\t\t\t\t\telem.sizcache = doneName;\n\t\t\t\t\t\telem.sizset = i;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( typeof cur !== \"string\" ) {\n\t\t\t\t\t\tif ( elem === cur ) {\n\t\t\t\t\t\t\tmatch = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {\n\t\t\t\t\t\tmatch = elem;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telem = elem[dir];\n\t\t\t}\n\n\t\t\tcheckSet[i] = match;\n\t\t}\n\t}\n}\n\nif ( document.documentElement.contains ) {\n\tSizzle.contains = function( a, b ) {\n\t\treturn a !== b && (a.contains ? a.contains(b) : true);\n\t};\n\n} else if ( document.documentElement.compareDocumentPosition ) {\n\tSizzle.contains = function( a, b ) {\n\t\treturn !!(a.compareDocumentPosition(b) & 16);\n\t};\n\n} else {\n\tSizzle.contains = function() {\n\t\treturn false;\n\t};\n}\n\nSizzle.isXML = function( elem ) {\n\t// documentElement is verified for cases where it doesn't yet exist\n\t// (such as loading iframes in IE - #4833) \n\tvar documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;\n\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\n};\n\nvar posProcess = function( selector, context ) {\n\tvar match,\n\t\ttmpSet = [],\n\t\tlater = \"\",\n\t\troot = context.nodeType ? [context] : context;\n\n\t// Position selectors must be done after the filter\n\t// And so must :not(positional) so we move all PSEUDOs to the end\n\twhile ( (match = Expr.match.PSEUDO.exec( selector )) ) {\n\t\tlater += match[0];\n\t\tselector = selector.replace( Expr.match.PSEUDO, \"\" );\n\t}\n\n\tselector = Expr.relative[selector] ? selector + \"*\" : selector;\n\n\tfor ( var i = 0, l = root.length; i < l; i++ ) {\n\t\tSizzle( selector, root[i], tmpSet );\n\t}\n\n\treturn Sizzle.filter( later, tmpSet );\n};\n\n// EXPOSE\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\njQuery.expr[\":\"] = jQuery.expr.filters;\njQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\n\n\n})();\n\n\nvar runtil = /Until$/,\n\trparentsprev = /^(?:parents|prevUntil|prevAll)/,\n\t// Note: This RegExp should be improved, or likely pulled from Sizzle\n\trmultiselector = /,/,\n\tisSimple = /^.[^:#\\[\\.,]*$/,\n\tslice = Array.prototype.slice,\n\tPOS = jQuery.expr.match.POS,\n\t// methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend({\n\tfind: function( selector ) {\n\t\tvar ret = this.pushStack( \"\", \"find\", selector ),\n\t\t\tlength = 0;\n\n\t\tfor ( var i = 0, l = this.length; i < l; i++ ) {\n\t\t\tlength = ret.length;\n\t\t\tjQuery.find( selector, this[i], ret );\n\n\t\t\tif ( i > 0 ) {\n\t\t\t\t// Make sure that the results are unique\n\t\t\t\tfor ( var n = length; n < ret.length; n++ ) {\n\t\t\t\t\tfor ( var r = 0; r < length; r++ ) {\n\t\t\t\t\t\tif ( ret[r] === ret[n] ) {\n\t\t\t\t\t\t\tret.splice(n--, 1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\thas: function( target ) {\n\t\tvar targets = jQuery( target );\n\t\treturn this.filter(function() {\n\t\t\tfor ( var i = 0, l = targets.length; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[i] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t},\n\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow(this, selector, false), \"not\", selector);\n\t},\n\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow(this, selector, true), \"filter\", selector );\n\t},\n\n\tis: function( selector ) {\n\t\treturn !!selector && jQuery.filter( selector, this ).length > 0;\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar ret = [], i, l, cur = this[0];\n\n\t\tif ( jQuery.isArray( selectors ) ) {\n\t\t\tvar match, selector,\n\t\t\t\tmatches = {},\n\t\t\t\tlevel = 1;\n\n\t\t\tif ( cur && selectors.length ) {\n\t\t\t\tfor ( i = 0, l = selectors.length; i < l; i++ ) {\n\t\t\t\t\tselector = selectors[i];\n\n\t\t\t\t\tif ( !matches[selector] ) {\n\t\t\t\t\t\tmatches[selector] = jQuery.expr.match.POS.test( selector ) ?\n\t\t\t\t\t\t\tjQuery( selector, context || this.context ) :\n\t\t\t\t\t\t\tselector;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\twhile ( cur && cur.ownerDocument && cur !== context ) {\n\t\t\t\t\tfor ( selector in matches ) {\n\t\t\t\t\t\tmatch = matches[selector];\n\n\t\t\t\t\t\tif ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) {\n\t\t\t\t\t\t\tret.push({ selector: selector, elem: cur, level: level });\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcur = cur.parentNode;\n\t\t\t\t\tlevel++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn ret;\n\t\t}\n\n\t\tvar pos = POS.test( selectors ) ?\n\t\t\tjQuery( selectors, context || this.context ) : null;\n\n\t\tfor ( i = 0, l = this.length; i < l; i++ ) {\n\t\t\tcur = this[i];\n\n\t\t\twhile ( cur ) {\n\t\t\t\tif ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {\n\t\t\t\t\tret.push( cur );\n\t\t\t\t\tbreak;\n\n\t\t\t\t} else {\n\t\t\t\t\tcur = cur.parentNode;\n\t\t\t\t\tif ( !cur || !cur.ownerDocument || cur === context ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tret = ret.length > 1 ? jQuery.unique(ret) : ret;\n\n\t\treturn this.pushStack( ret, \"closest\", selectors );\n\t},\n\n\t// Determine the position of an element within\n\t// the matched set of elements\n\tindex: function( elem ) {\n\t\tif ( !elem || typeof elem === \"string\" ) {\n\t\t\treturn jQuery.inArray( this[0],\n\t\t\t\t// If it receives a string, the selector is used\n\t\t\t\t// If it receives nothing, the siblings are used\n\t\t\t\telem ? jQuery( elem ) : this.parent().children() );\n\t\t}\n\t\t// Locate the position of the desired element\n\t\treturn jQuery.inArray(\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[0] : elem, this );\n\t},\n\n\tadd: function( selector, context ) {\n\t\tvar set = typeof selector === \"string\" ?\n\t\t\t\tjQuery( selector, context ) :\n\t\t\t\tjQuery.makeArray( selector ),\n\t\t\tall = jQuery.merge( this.get(), set );\n\n\t\treturn this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?\n\t\t\tall :\n\t\t\tjQuery.unique( all ) );\n\t},\n\n\tandSelf: function() {\n\t\treturn this.add( this.prevObject );\n\t}\n});\n\n// A painfully simple check to see if an element is disconnected\n// from a document (should be improved, where feasible).\nfunction isDisconnected( node ) {\n\treturn !node || !node.parentNode || node.parentNode.nodeType === 11;\n}\n\njQuery.each({\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn jQuery.dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, i, until ) {\n\t\treturn jQuery.dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn jQuery.nth( elem, 2, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn jQuery.nth( elem, 2, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn jQuery.dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn jQuery.dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, i, until ) {\n\t\treturn jQuery.dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, i, until ) {\n\t\treturn jQuery.dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn jQuery.sibling( elem.parentNode.firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn jQuery.sibling( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\treturn jQuery.nodeName( elem, \"iframe\" ) ?\n\t\t\telem.contentDocument || elem.contentWindow.document :\n\t\t\tjQuery.makeArray( elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar ret = jQuery.map( this, fn, until ),\n\t\t\t// The variable 'args' was introduced in\n\t\t\t// https://github.com/jquery/jquery/commit/52a0238\n\t\t\t// to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.\n\t\t\t// http://code.google.com/p/v8/issues/detail?id=1050\n\t\t\targs = slice.call(arguments);\n\n\t\tif ( !runtil.test( name ) ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tret = jQuery.filter( selector, ret );\n\t\t}\n\n\t\tret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;\n\n\t\tif ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {\n\t\t\tret = ret.reverse();\n\t\t}\n\n\t\treturn this.pushStack( ret, name, args.join(\",\") );\n\t};\n});\n\njQuery.extend({\n\tfilter: function( expr, elems, not ) {\n\t\tif ( not ) {\n\t\t\texpr = \":not(\" + expr + \")\";\n\t\t}\n\n\t\treturn elems.length === 1 ?\n\t\t\tjQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :\n\t\t\tjQuery.find.matches(expr, elems);\n\t},\n\n\tdir: function( elem, dir, until ) {\n\t\tvar matched = [],\n\t\t\tcur = elem[ dir ];\n\n\t\twhile ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {\n\t\t\tif ( cur.nodeType === 1 ) {\n\t\t\t\tmatched.push( cur );\n\t\t\t}\n\t\t\tcur = cur[dir];\n\t\t}\n\t\treturn matched;\n\t},\n\n\tnth: function( cur, result, dir, elem ) {\n\t\tresult = result || 1;\n\t\tvar num = 0;\n\n\t\tfor ( ; cur; cur = cur[dir] ) {\n\t\t\tif ( cur.nodeType === 1 && ++num === result ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn cur;\n\t},\n\n\tsibling: function( n, elem ) {\n\t\tvar r = [];\n\n\t\tfor ( ; n; n = n.nextSibling ) {\n\t\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\t\tr.push( n );\n\t\t\t}\n\t\t}\n\n\t\treturn r;\n\t}\n});\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, keep ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep(elements, function( elem, i ) {\n\t\t\tvar retVal = !!qualifier.call( elem, i, elem );\n\t\t\treturn retVal === keep;\n\t\t});\n\n\t} else if ( qualifier.nodeType ) {\n\t\treturn jQuery.grep(elements, function( elem, i ) {\n\t\t\treturn (elem === qualifier) === keep;\n\t\t});\n\n\t} else if ( typeof qualifier === \"string\" ) {\n\t\tvar filtered = jQuery.grep(elements, function( elem ) {\n\t\t\treturn elem.nodeType === 1;\n\t\t});\n\n\t\tif ( isSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter(qualifier, filtered, !keep);\n\t\t} else {\n\t\t\tqualifier = jQuery.filter( qualifier, filtered );\n\t\t}\n\t}\n\n\treturn jQuery.grep(elements, function( elem, i ) {\n\t\treturn (jQuery.inArray( elem, qualifier ) >= 0) === keep;\n\t});\n}\n\n\n\n\nvar rinlinejQuery = / jQuery\\d+=\"(?:\\d+|null)\"/g,\n\trleadingWhitespace = /^\\s+/,\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/ig,\n\trtagName = /<([\\w:]+)/,\n\trtbody = /<tbody/i,\n\trhtml = /<|&#?\\w+;/,\n\trnocache = /<(?:script|object|embed|option|style)/i,\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\twrapMap = {\n\t\toption: [ 1, \"<select multiple='multiple'>\", \"</select>\" ],\n\t\tlegend: [ 1, \"<fieldset>\", \"</fieldset>\" ],\n\t\tthead: [ 1, \"<table>\", \"</table>\" ],\n\t\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\t\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\t\tcol: [ 2, \"<table><tbody></tbody><colgroup>\", \"</colgroup></table>\" ],\n\t\tarea: [ 1, \"<map>\", \"</map>\" ],\n\t\t_default: [ 0, \"\", \"\" ]\n\t};\n\nwrapMap.optgroup = wrapMap.option;\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// IE can't serialize <link> and <script> tags normally\nif ( !jQuery.support.htmlSerialize ) {\n\twrapMap._default = [ 1, \"div<div>\", \"</div>\" ];\n}\n\njQuery.fn.extend({\n\ttext: function( text ) {\n\t\tif ( jQuery.isFunction(text) ) {\n\t\t\treturn this.each(function(i) {\n\t\t\t\tvar self = jQuery( this );\n\n\t\t\t\tself.text( text.call(this, i, self.text()) );\n\t\t\t});\n\t\t}\n\n\t\tif ( typeof text !== \"object\" && text !== undefined ) {\n\t\t\treturn this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );\n\t\t}\n\n\t\treturn jQuery.text( this );\n\t},\n\n\twrapAll: function( html ) {\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each(function(i) {\n\t\t\t\tjQuery(this).wrapAll( html.call(this, i) );\n\t\t\t});\n\t\t}\n\n\t\tif ( this[0] ) {\n\t\t\t// The elements to wrap the target around\n\t\t\tvar wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);\n\n\t\t\tif ( this[0].parentNode ) {\n\t\t\t\twrap.insertBefore( this[0] );\n\t\t\t}\n\n\t\t\twrap.map(function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstChild && elem.firstChild.nodeType === 1 ) {\n\t\t\t\t\telem = elem.firstChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t}).append(this);\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each(function(i) {\n\t\t\t\tjQuery(this).wrapInner( html.call(this, i) );\n\t\t\t});\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t});\n\t},\n\n\twrap: function( html ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery( this ).wrapAll( html );\n\t\t});\n\t},\n\n\tunwrap: function() {\n\t\treturn this.parent().each(function() {\n\t\t\tif ( !jQuery.nodeName( this, \"body\" ) ) {\n\t\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t\t}\n\t\t}).end();\n\t},\n\n\tappend: function() {\n\t\treturn this.domManip(arguments, true, function( elem ) {\n\t\t\tif ( this.nodeType === 1 ) {\n\t\t\t\tthis.appendChild( elem );\n\t\t\t}\n\t\t});\n\t},\n\n\tprepend: function() {\n\t\treturn this.domManip(arguments, true, function( elem ) {\n\t\t\tif ( this.nodeType === 1 ) {\n\t\t\t\tthis.insertBefore( elem, this.firstChild );\n\t\t\t}\n\t\t});\n\t},\n\n\tbefore: function() {\n\t\tif ( this[0] && this[0].parentNode ) {\n\t\t\treturn this.domManip(arguments, false, function( elem ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t});\n\t\t} else if ( arguments.length ) {\n\t\t\tvar set = jQuery(arguments[0]);\n\t\t\tset.push.apply( set, this.toArray() );\n\t\t\treturn this.pushStack( set, \"before\", arguments );\n\t\t}\n\t},\n\n\tafter: function() {\n\t\tif ( this[0] && this[0].parentNode ) {\n\t\t\treturn this.domManip(arguments, false, function( elem ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t});\n\t\t} else if ( arguments.length ) {\n\t\t\tvar set = this.pushStack( this, \"after\", arguments );\n\t\t\tset.push.apply( set, jQuery(arguments[0]).toArray() );\n\t\t\treturn set;\n\t\t}\n\t},\n\n\t// keepData is for internal use only--do not document\n\tremove: function( selector, keepData ) {\n\t\tfor ( var i = 0, elem; (elem = this[i]) != null; i++ ) {\n\t\t\tif ( !selector || jQuery.filter( selector, [ elem ] ).length ) {\n\t\t\t\tif ( !keepData && elem.nodeType === 1 ) {\n\t\t\t\t\tjQuery.cleanData( elem.getElementsByTagName(\"*\") );\n\t\t\t\t\tjQuery.cleanData( [ elem ] );\n\t\t\t\t}\n\n\t\t\t\tif ( elem.parentNode ) {\n\t\t\t\t\telem.parentNode.removeChild( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tempty: function() {\n\t\tfor ( var i = 0, elem; (elem = this[i]) != null; i++ ) {\n\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\tjQuery.cleanData( elem.getElementsByTagName(\"*\") );\n\t\t\t}\n\n\t\t\t// Remove any remaining nodes\n\t\t\twhile ( elem.firstChild ) {\n\t\t\t\telem.removeChild( elem.firstChild );\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function () {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t});\n\t},\n\n\thtml: function( value ) {\n\t\tif ( value === undefined ) {\n\t\t\treturn this[0] && this[0].nodeType === 1 ?\n\t\t\t\tthis[0].innerHTML.replace(rinlinejQuery, \"\") :\n\t\t\t\tnull;\n\n\t\t// See if we can take a shortcut and just use innerHTML\n\t\t} else if ( typeof value === \"string\" && !rnocache.test( value ) &&\n\t\t\t(jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&\n\t\t\t!wrapMap[ (rtagName.exec( value ) || [\"\", \"\"])[1].toLowerCase() ] ) {\n\n\t\t\tvalue = value.replace(rxhtmlTag, \"<$1></$2>\");\n\n\t\t\ttry {\n\t\t\t\tfor ( var i = 0, l = this.length; i < l; i++ ) {\n\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\tif ( this[i].nodeType === 1 ) {\n\t\t\t\t\t\tjQuery.cleanData( this[i].getElementsByTagName(\"*\") );\n\t\t\t\t\t\tthis[i].innerHTML = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t} catch(e) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\n\t\t} else if ( jQuery.isFunction( value ) ) {\n\t\t\tthis.each(function(i){\n\t\t\t\tvar self = jQuery( this );\n\n\t\t\t\tself.html( value.call(this, i, self.html()) );\n\t\t\t});\n\n\t\t} else {\n\t\t\tthis.empty().append( value );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\treplaceWith: function( value ) {\n\t\tif ( this[0] && this[0].parentNode ) {\n\t\t\t// Make sure that the elements are removed from the DOM before they are inserted\n\t\t\t// this can help fix replacing a parent with child elements\n\t\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\t\treturn this.each(function(i) {\n\t\t\t\t\tvar self = jQuery(this), old = self.html();\n\t\t\t\t\tself.replaceWith( value.call( this, i, old ) );\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif ( typeof value !== \"string\" ) {\n\t\t\t\tvalue = jQuery( value ).detach();\n\t\t\t}\n\n\t\t\treturn this.each(function() {\n\t\t\t\tvar next = this.nextSibling,\n\t\t\t\t\tparent = this.parentNode;\n\n\t\t\t\tjQuery( this ).remove();\n\n\t\t\t\tif ( next ) {\n\t\t\t\t\tjQuery(next).before( value );\n\t\t\t\t} else {\n\t\t\t\t\tjQuery(parent).append( value );\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\treturn this.length ?\n\t\t\t\tthis.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), \"replaceWith\", value ) :\n\t\t\t\tthis;\n\t\t}\n\t},\n\n\tdetach: function( selector ) {\n\t\treturn this.remove( selector, true );\n\t},\n\n\tdomManip: function( args, table, callback ) {\n\t\tvar results, first, fragment, parent,\n\t\t\tvalue = args[0],\n\t\t\tscripts = [];\n\n\t\t// We can't cloneNode fragments that contain checked, in WebKit\n\t\tif ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === \"string\" && rchecked.test( value ) ) {\n\t\t\treturn this.each(function() {\n\t\t\t\tjQuery(this).domManip( args, table, callback, true );\n\t\t\t});\n\t\t}\n\n\t\tif ( jQuery.isFunction(value) ) {\n\t\t\treturn this.each(function(i) {\n\t\t\t\tvar self = jQuery(this);\n\t\t\t\targs[0] = value.call(this, i, table ? self.html() : undefined);\n\t\t\t\tself.domManip( args, table, callback );\n\t\t\t});\n\t\t}\n\n\t\tif ( this[0] ) {\n\t\t\tparent = value && value.parentNode;\n\n\t\t\t// If we're in a fragment, just use that instead of building a new one\n\t\t\tif ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {\n\t\t\t\tresults = { fragment: parent };\n\n\t\t\t} else {\n\t\t\t\tresults = jQuery.buildFragment( args, this, scripts );\n\t\t\t}\n\n\t\t\tfragment = results.fragment;\n\n\t\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\t\tfirst = fragment = fragment.firstChild;\n\t\t\t} else {\n\t\t\t\tfirst = fragment.firstChild;\n\t\t\t}\n\n\t\t\tif ( first ) {\n\t\t\t\ttable = table && jQuery.nodeName( first, \"tr\" );\n\n\t\t\t\tfor ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) {\n\t\t\t\t\tcallback.call(\n\t\t\t\t\t\ttable ?\n\t\t\t\t\t\t\troot(this[i], first) :\n\t\t\t\t\t\t\tthis[i],\n\t\t\t\t\t\t// Make sure that we do not leak memory by inadvertently discarding\n\t\t\t\t\t\t// the original fragment (which might have attached data) instead of\n\t\t\t\t\t\t// using it; in addition, use the original fragment object for the last\n\t\t\t\t\t\t// item instead of first because it can end up being emptied incorrectly\n\t\t\t\t\t\t// in certain situations (Bug #8070).\n\t\t\t\t\t\t// Fragments from the fragment cache must always be cloned and never used\n\t\t\t\t\t\t// in place.\n\t\t\t\t\t\tresults.cacheable || (l > 1 && i < lastIndex) ?\n\t\t\t\t\t\t\tjQuery.clone( fragment, true, true ) :\n\t\t\t\t\t\t\tfragment\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( scripts.length ) {\n\t\t\t\tjQuery.each( scripts, evalScript );\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n});\n\nfunction root( elem, cur ) {\n\treturn jQuery.nodeName(elem, \"table\") ?\n\t\t(elem.getElementsByTagName(\"tbody\")[0] ||\n\t\telem.appendChild(elem.ownerDocument.createElement(\"tbody\"))) :\n\t\telem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\n\tif ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {\n\t\treturn;\n\t}\n\n\tvar internalKey = jQuery.expando,\n\t\toldData = jQuery.data( src ),\n\t\tcurData = jQuery.data( dest, oldData );\n\n\t// Switch to use the internal data object, if it exists, for the next\n\t// stage of data copying\n\tif ( (oldData = oldData[ internalKey ]) ) {\n\t\tvar events = oldData.events;\n\t\t\t\tcurData = curData[ internalKey ] = jQuery.extend({}, oldData);\n\n\t\tif ( events ) {\n\t\t\tdelete curData.handle;\n\t\t\tcurData.events = {};\n\n\t\t\tfor ( var type in events ) {\n\t\t\t\tfor ( var i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? \".\" : \"\" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction cloneFixAttributes(src, dest) {\n\t// We do not need to do anything for non-Elements\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// clearAttributes removes the attributes, which we don't want,\n\t// but also removes the attachEvent events, which we *do* want\n\tdest.clearAttributes();\n\n\t// mergeAttributes, in contrast, only merges back on the\n\t// original attributes, not the events\n\tdest.mergeAttributes(src);\n\n\t// IE6-8 fail to clone children inside object elements that use\n\t// the proprietary classid attribute value (rather than the type\n\t// attribute) to identify the type of content to display\n\tif ( nodeName === \"object\" ) {\n\t\tdest.outerHTML = src.outerHTML;\n\n\t} else if ( nodeName === \"input\" && (src.type === \"checkbox\" || src.type === \"radio\") ) {\n\t\t// IE6-8 fails to persist the checked state of a cloned checkbox\n\t\t// or radio button. Worse, IE6-7 fail to give the cloned element\n\t\t// a checked appearance if the defaultChecked value isn't also set\n\t\tif ( src.checked ) {\n\t\t\tdest.defaultChecked = dest.checked = src.checked;\n\t\t}\n\n\t\t// IE6-7 get confused and end up setting the value of a cloned\n\t\t// checkbox/radio button to an empty string instead of \"on\"\n\t\tif ( dest.value !== src.value ) {\n\t\t\tdest.value = src.value;\n\t\t}\n\n\t// IE6-8 fails to return the selected option to the default selected\n\t// state when cloning options\n\t} else if ( nodeName === \"option\" ) {\n\t\tdest.selected = src.defaultSelected;\n\n\t// IE6-8 fails to set the defaultValue to the correct value when\n\t// cloning other types of input fields\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n\n\t// Event data gets referenced instead of copied if the expando\n\t// gets copied too\n\tdest.removeAttribute( jQuery.expando );\n}\n\njQuery.buildFragment = function( args, nodes, scripts ) {\n\tvar fragment, cacheable, cacheresults,\n\t\tdoc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document);\n\n\t// Only cache \"small\" (1/2 KB) HTML strings that are associated with the main document\n\t// Cloning options loses the selected state, so don't cache them\n\t// IE 6 doesn't like it when you put <object> or <embed> elements in a fragment\n\t// Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache\n\tif ( args.length === 1 && typeof args[0] === \"string\" && args[0].length < 512 && doc === document &&\n\t\targs[0].charAt(0) === \"<\" && !rnocache.test( args[0] ) && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) {\n\n\t\tcacheable = true;\n\t\tcacheresults = jQuery.fragments[ args[0] ];\n\t\tif ( cacheresults ) {\n\t\t\tif ( cacheresults !== 1 ) {\n\t\t\t\tfragment = cacheresults;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( !fragment ) {\n\t\tfragment = doc.createDocumentFragment();\n\t\tjQuery.clean( args, doc, fragment, scripts );\n\t}\n\n\tif ( cacheable ) {\n\t\tjQuery.fragments[ args[0] ] = cacheresults ? fragment : 1;\n\t}\n\n\treturn { fragment: fragment, cacheable: cacheable };\n};\n\njQuery.fragments = {};\n\njQuery.each({\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar ret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tparent = this.length === 1 && this[0].parentNode;\n\n\t\tif ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {\n\t\t\tinsert[ original ]( this[0] );\n\t\t\treturn this;\n\n\t\t} else {\n\t\t\tfor ( var i = 0, l = insert.length; i < l; i++ ) {\n\t\t\t\tvar elems = (i > 0 ? this.clone(true) : this).get();\n\t\t\t\tjQuery( insert[i] )[ original ]( elems );\n\t\t\t\tret = ret.concat( elems );\n\t\t\t}\n\n\t\t\treturn this.pushStack( ret, name, insert.selector );\n\t\t}\n\t};\n});\n\nfunction getAll( elem ) {\n\tif ( \"getElementsByTagName\" in elem ) {\n\t\treturn elem.getElementsByTagName( \"*\" );\n\t\n\t} else if ( \"querySelectorAll\" in elem ) {\n\t\treturn elem.querySelectorAll( \"*\" );\n\n\t} else {\n\t\treturn [];\n\t}\n}\n\njQuery.extend({\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar clone = elem.cloneNode(true),\n\t\t\t\tsrcElements,\n\t\t\t\tdestElements,\n\t\t\t\ti;\n\n\t\tif ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&\n\t\t\t\t(elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {\n\t\t\t// IE copies events bound via attachEvent when using cloneNode.\n\t\t\t// Calling detachEvent on the clone will also remove the events\n\t\t\t// from the original. In order to get around this, we use some\n\t\t\t// proprietary methods to clear the events. Thanks to MooTools\n\t\t\t// guys for this hotness.\n\n\t\t\tcloneFixAttributes( elem, clone );\n\n\t\t\t// Using Sizzle here is crazy slow, so we use getElementsByTagName\n\t\t\t// instead\n\t\t\tsrcElements = getAll( elem );\n\t\t\tdestElements = getAll( clone );\n\n\t\t\t// Weird iteration because IE will replace the length property\n\t\t\t// with an element if you are cloning the body and one of the\n\t\t\t// elements on the page has a name or id of \"length\"\n\t\t\tfor ( i = 0; srcElements[i]; ++i ) {\n\t\t\t\tcloneFixAttributes( srcElements[i], destElements[i] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tcloneCopyEvent( elem, clone );\n\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = getAll( elem );\n\t\t\t\tdestElements = getAll( clone );\n\n\t\t\t\tfor ( i = 0; srcElements[i]; ++i ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[i], destElements[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n},\n\tclean: function( elems, context, fragment, scripts ) {\n\t\tcontext = context || document;\n\n\t\t// !context.createElement fails in IE with an error but returns typeof 'object'\n\t\tif ( typeof context.createElement === \"undefined\" ) {\n\t\t\tcontext = context.ownerDocument || context[0] && context[0].ownerDocument || document;\n\t\t}\n\n\t\tvar ret = [];\n\n\t\tfor ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {\n\t\t\tif ( typeof elem === \"number\" ) {\n\t\t\t\telem += \"\";\n\t\t\t}\n\n\t\t\tif ( !elem ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Convert html string into DOM nodes\n\t\t\tif ( typeof elem === \"string\" && !rhtml.test( elem ) ) {\n\t\t\t\telem = context.createTextNode( elem );\n\n\t\t\t} else if ( typeof elem === \"string\" ) {\n\t\t\t\t// Fix \"XHTML\"-style tags in all browsers\n\t\t\t\telem = elem.replace(rxhtmlTag, \"<$1></$2>\");\n\n\t\t\t\t// Trim whitespace, otherwise indexOf won't work as expected\n\t\t\t\tvar tag = (rtagName.exec( elem ) || [\"\", \"\"])[1].toLowerCase(),\n\t\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default,\n\t\t\t\t\tdepth = wrap[0],\n\t\t\t\t\tdiv = context.createElement(\"div\");\n\n\t\t\t\t// Go to html and back, then peel off extra wrappers\n\t\t\t\tdiv.innerHTML = wrap[1] + elem + wrap[2];\n\n\t\t\t\t// Move to the right depth\n\t\t\t\twhile ( depth-- ) {\n\t\t\t\t\tdiv = div.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Remove IE's autoinserted <tbody> from table fragments\n\t\t\t\tif ( !jQuery.support.tbody ) {\n\n\t\t\t\t\t// String was a <table>, *may* have spurious <tbody>\n\t\t\t\t\tvar hasBody = rtbody.test(elem),\n\t\t\t\t\t\ttbody = tag === \"table\" && !hasBody ?\n\t\t\t\t\t\t\tdiv.firstChild && div.firstChild.childNodes :\n\n\t\t\t\t\t\t\t// String was a bare <thead> or <tfoot>\n\t\t\t\t\t\t\twrap[1] === \"<table>\" && !hasBody ?\n\t\t\t\t\t\t\t\tdiv.childNodes :\n\t\t\t\t\t\t\t\t[];\n\n\t\t\t\t\tfor ( var j = tbody.length - 1; j >= 0 ; --j ) {\n\t\t\t\t\t\tif ( jQuery.nodeName( tbody[ j ], \"tbody\" ) && !tbody[ j ].childNodes.length ) {\n\t\t\t\t\t\t\ttbody[ j ].parentNode.removeChild( tbody[ j ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// IE completely kills leading whitespace when innerHTML is used\n\t\t\t\tif ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {\n\t\t\t\t\tdiv.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );\n\t\t\t\t}\n\n\t\t\t\telem = div.childNodes;\n\t\t\t}\n\n\t\t\tif ( elem.nodeType ) {\n\t\t\t\tret.push( elem );\n\t\t\t} else {\n\t\t\t\tret = jQuery.merge( ret, elem );\n\t\t\t}\n\t\t}\n\n\t\tif ( fragment ) {\n\t\t\tfor ( i = 0; ret[i]; i++ ) {\n\t\t\t\tif ( scripts && jQuery.nodeName( ret[i], \"script\" ) && (!ret[i].type || ret[i].type.toLowerCase() === \"text/javascript\") ) {\n\t\t\t\t\tscripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );\n\n\t\t\t\t} else {\n\t\t\t\t\tif ( ret[i].nodeType === 1 ) {\n\t\t\t\t\t\tret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName(\"script\"))) );\n\t\t\t\t\t}\n\t\t\t\t\tfragment.appendChild( ret[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, id, cache = jQuery.cache, internalKey = jQuery.expando, special = jQuery.event.special,\n\t\t\tdeleteExpando = jQuery.support.deleteExpando;\n\n\t\tfor ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {\n\t\t\tif ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tid = elem[ jQuery.expando ];\n\n\t\t\tif ( id ) {\n\t\t\t\tdata = cache[ id ] && cache[ id ][ internalKey ];\n\n\t\t\t\tif ( data && data.events ) {\n\t\t\t\t\tfor ( var type in data.events ) {\n\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Null the DOM reference to avoid IE6/7/8 leak (#7054)\n\t\t\t\t\tif ( data.handle ) {\n\t\t\t\t\t\tdata.handle.elem = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( deleteExpando ) {\n\t\t\t\t\tdelete elem[ jQuery.expando ];\n\n\t\t\t\t} else if ( elem.removeAttribute ) {\n\t\t\t\t\telem.removeAttribute( jQuery.expando );\n\t\t\t\t}\n\n\t\t\t\tdelete cache[ id ];\n\t\t\t}\n\t\t}\n\t}\n});\n\nfunction evalScript( i, elem ) {\n\tif ( elem.src ) {\n\t\tjQuery.ajax({\n\t\t\turl: elem.src,\n\t\t\tasync: false,\n\t\t\tdataType: \"script\"\n\t\t});\n\t} else {\n\t\tjQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || \"\" );\n\t}\n\n\tif ( elem.parentNode ) {\n\t\telem.parentNode.removeChild( elem );\n\t}\n}\n\n\n\n\nvar ralpha = /alpha\\([^)]*\\)/i,\n\tropacity = /opacity=([^)]*)/,\n\trdashAlpha = /-([a-z])/ig,\n\t// fixed for IE9, see #8346\n\trupper = /([A-Z]|^ms)/g,\n\trnumpx = /^-?\\d+(?:px)?$/i,\n\trnum = /^-?\\d/,\n\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssWidth = [ \"Left\", \"Right\" ],\n\tcssHeight = [ \"Top\", \"Bottom\" ],\n\tcurCSS,\n\n\tgetComputedStyle,\n\tcurrentStyle,\n\n\tfcamelCase = function( all, letter ) {\n\t\treturn letter.toUpperCase();\n\t};\n\njQuery.fn.css = function( name, value ) {\n\t// Setting 'undefined' is a no-op\n\tif ( arguments.length === 2 && value === undefined ) {\n\t\treturn this;\n\t}\n\n\treturn jQuery.access( this, name, value, true, function( elem, name, value ) {\n\t\treturn value !== undefined ?\n\t\t\tjQuery.style( elem, name, value ) :\n\t\t\tjQuery.css( elem, name );\n\t});\n};\n\njQuery.extend({\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\", \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\n\t\t\t\t} else {\n\t\t\t\t\treturn elem.style.opacity;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Exclude the following css properties to add px\n\tcssNumber: {\n\t\t\"zIndex\": true,\n\t\t\"fontWeight\": true,\n\t\t\"opacity\": true,\n\t\t\"zoom\": true,\n\t\t\"lineHeight\": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {\n\t\t// normalize float css property\n\t\t\"float\": jQuery.support.cssFloat ? \"cssFloat\" : \"styleFloat\"\n\t},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, origName = jQuery.camelCase( name ),\n\t\t\tstyle = elem.style, hooks = jQuery.cssHooks[ origName ];\n\n\t\tname = jQuery.cssProps[ origName ] || origName;\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\t// Make sure that NaN and null values aren't set. See: #7116\n\t\t\tif ( typeof value === \"number\" && isNaN( value ) || value == null ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add 'px' to the (except for certain CSS properties)\n\t\t\tif ( typeof value === \"number\" && !jQuery.cssNumber[ origName ] ) {\n\t\t\t\tvalue += \"px\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !(\"set\" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {\n\t\t\t\t// Wrapped to prevent IE from throwing errors when 'invalid' values are provided\n\t\t\t\t// Fixes bug #5509\n\t\t\t\ttry {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t} catch(e) {}\n\t\t\t}\n\n\t\t} else {\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra ) {\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, origName = jQuery.camelCase( name ),\n\t\t\thooks = jQuery.cssHooks[ origName ];\n\n\t\tname = jQuery.cssProps[ origName ] || origName;\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {\n\t\t\treturn ret;\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\t} else if ( curCSS ) {\n\t\t\treturn curCSS( elem, name, origName );\n\t\t}\n\t},\n\n\t// A method for quickly swapping in/out CSS properties to get correct calculations\n\tswap: function( elem, options, callback ) {\n\t\tvar old = {};\n\n\t\t// Remember the old values, and insert the new ones\n\t\tfor ( var name in options ) {\n\t\t\told[ name ] = elem.style[ name ];\n\t\t\telem.style[ name ] = options[ name ];\n\t\t}\n\n\t\tcallback.call( elem );\n\n\t\t// Revert the old values\n\t\tfor ( name in options ) {\n\t\t\telem.style[ name ] = old[ name ];\n\t\t}\n\t},\n\n\tcamelCase: function( string ) {\n\t\treturn string.replace( rdashAlpha, fcamelCase );\n\t}\n});\n\n// DEPRECATED, Use jQuery.css() instead\njQuery.curCSS = jQuery.css;\n\njQuery.each([\"height\", \"width\"], function( i, name ) {\n\tjQuery.cssHooks[ name ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tvar val;\n\n\t\t\tif ( computed ) {\n\t\t\t\tif ( elem.offsetWidth !== 0 ) {\n\t\t\t\t\tval = getWH( elem, name, extra );\n\n\t\t\t\t} else {\n\t\t\t\t\tjQuery.swap( elem, cssShow, function() {\n\t\t\t\t\t\tval = getWH( elem, name, extra );\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif ( val <= 0 ) {\n\t\t\t\t\tval = curCSS( elem, name, name );\n\n\t\t\t\t\tif ( val === \"0px\" && currentStyle ) {\n\t\t\t\t\t\tval = currentStyle( elem, name, name );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( val != null ) {\n\t\t\t\t\t\t// Should return \"auto\" instead of 0, use 0 for\n\t\t\t\t\t\t// temporary backwards-compat\n\t\t\t\t\t\treturn val === \"\" || val === \"auto\" ? \"0px\" : val;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( val < 0 || val == null ) {\n\t\t\t\t\tval = elem.style[ name ];\n\n\t\t\t\t\t// Should return \"auto\" instead of 0, use 0 for\n\t\t\t\t\t// temporary backwards-compat\n\t\t\t\t\treturn val === \"\" || val === \"auto\" ? \"0px\" : val;\n\t\t\t\t}\n\n\t\t\t\treturn typeof val === \"string\" ? val : val + \"px\";\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value ) {\n\t\t\tif ( rnumpx.test( value ) ) {\n\t\t\t\t// ignore negative width and height values #1599\n\t\t\t\tvalue = parseFloat(value);\n\n\t\t\t\tif ( value >= 0 ) {\n\t\t\t\t\treturn value + \"px\";\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t};\n});\n\nif ( !jQuery.support.opacity ) {\n\tjQuery.cssHooks.opacity = {\n\t\tget: function( elem, computed ) {\n\t\t\t// IE uses filters for opacity\n\t\t\treturn ropacity.test((computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || \"\") ?\n\t\t\t\t(parseFloat(RegExp.$1) / 100) + \"\" :\n\t\t\t\tcomputed ? \"1\" : \"\";\n\t\t},\n\n\t\tset: function( elem, value ) {\n\t\t\tvar style = elem.style;\n\n\t\t\t// IE has trouble with opacity if it does not have layout\n\t\t\t// Force it by setting the zoom level\n\t\t\tstyle.zoom = 1;\n\n\t\t\t// Set the alpha filter to set the opacity\n\t\t\tvar opacity = jQuery.isNaN(value) ?\n\t\t\t\t\"\" :\n\t\t\t\t\"alpha(opacity=\" + value * 100 + \")\",\n\t\t\t\tfilter = style.filter || \"\";\n\n\t\t\tstyle.filter = ralpha.test(filter) ?\n\t\t\t\tfilter.replace(ralpha, opacity) :\n\t\t\t\tstyle.filter + ' ' + opacity;\n\t\t}\n\t};\n}\n\njQuery(function() {\n\t// This hook cannot be added until DOM ready because the support test\n\t// for it is not run until after DOM ready\n\tif ( !jQuery.support.reliableMarginRight ) {\n\t\tjQuery.cssHooks.marginRight = {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\n\t\t\t\t// Work around by temporarily setting element display to inline-block\n\t\t\t\tvar ret;\n\t\t\t\tjQuery.swap( elem, { \"display\": \"inline-block\" }, function() {\n\t\t\t\t\tif ( computed ) {\n\t\t\t\t\t\tret = curCSS( elem, \"margin-right\", \"marginRight\" );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tret = elem.style.marginRight;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t};\n\t}\n});\n\nif ( document.defaultView && document.defaultView.getComputedStyle ) {\n\tgetComputedStyle = function( elem, newName, name ) {\n\t\tvar ret, defaultView, computedStyle;\n\n\t\tname = name.replace( rupper, \"-$1\" ).toLowerCase();\n\n\t\tif ( !(defaultView = elem.ownerDocument.defaultView) ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {\n\t\t\tret = computedStyle.getPropertyValue( name );\n\t\t\tif ( ret === \"\" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {\n\t\t\t\tret = jQuery.style( elem, name );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t};\n}\n\nif ( document.documentElement.currentStyle ) {\n\tcurrentStyle = function( elem, name ) {\n\t\tvar left,\n\t\t\tret = elem.currentStyle && elem.currentStyle[ name ],\n\t\t\trsLeft = elem.runtimeStyle && elem.runtimeStyle[ name ],\n\t\t\tstyle = elem.style;\n\n\t\t// From the awesome hack by Dean Edwards\n\t\t// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n\n\t\t// If we're not dealing with a regular pixel number\n\t\t// but a number that has a weird ending, we need to convert it to pixels\n\t\tif ( !rnumpx.test( ret ) && rnum.test( ret ) ) {\n\t\t\t// Remember the original values\n\t\t\tleft = style.left;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tif ( rsLeft ) {\n\t\t\t\telem.runtimeStyle.left = elem.currentStyle.left;\n\t\t\t}\n\t\t\tstyle.left = name === \"fontSize\" ? \"1em\" : (ret || 0);\n\t\t\tret = style.pixelLeft + \"px\";\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.left = left;\n\t\t\tif ( rsLeft ) {\n\t\t\t\telem.runtimeStyle.left = rsLeft;\n\t\t\t}\n\t\t}\n\n\t\treturn ret === \"\" ? \"auto\" : ret;\n\t};\n}\n\ncurCSS = getComputedStyle || currentStyle;\n\nfunction getWH( elem, name, extra ) {\n\tvar which = name === \"width\" ? cssWidth : cssHeight,\n\t\tval = name === \"width\" ? elem.offsetWidth : elem.offsetHeight;\n\n\tif ( extra === \"border\" ) {\n\t\treturn val;\n\t}\n\n\tjQuery.each( which, function() {\n\t\tif ( !extra ) {\n\t\t\tval -= parseFloat(jQuery.css( elem, \"padding\" + this )) || 0;\n\t\t}\n\n\t\tif ( extra === \"margin\" ) {\n\t\t\tval += parseFloat(jQuery.css( elem, \"margin\" + this )) || 0;\n\n\t\t} else {\n\t\t\tval -= parseFloat(jQuery.css( elem, \"border\" + this + \"Width\" )) || 0;\n\t\t}\n\t});\n\n\treturn val;\n}\n\nif ( jQuery.expr && jQuery.expr.filters ) {\n\tjQuery.expr.filters.hidden = function( elem ) {\n\t\tvar width = elem.offsetWidth,\n\t\t\theight = elem.offsetHeight;\n\n\t\treturn (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && (elem.style.display || jQuery.css( elem, \"display\" )) === \"none\");\n\t};\n\n\tjQuery.expr.filters.visible = function( elem ) {\n\t\treturn !jQuery.expr.filters.hidden( elem );\n\t};\n}\n\n\n\n\nvar r20 = /%20/g,\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trhash = /#.*$/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)\\r?$/mg, // IE leaves an \\r character at EOL\n\trinput = /^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,\n\t// #7653, #8125, #8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app\\-storage|.+\\-extension|file|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\trquery = /\\?/,\n\trscript = /<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi,\n\trselectTextarea = /^(?:select|textarea)/i,\n\trspacesAjax = /\\s+/,\n\trts = /([?&])_=[^&]*/,\n\trucHeaders = /(^|\\-)([a-z])/g,\n\trucHeadersFunc = function( _, $1, $2 ) {\n\t\treturn $1 + $2.toUpperCase();\n\t},\n\trurl = /^([\\w\\+\\.\\-]+:)(?:\\/\\/([^\\/?#:]*)(?::(\\d+))?)?/,\n\n\t// Keep a copy of the old load method\n\t_load = jQuery.fn.load,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t *    - BEFORE asking for a transport\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Document location\n\tajaxLocation,\n\n\t// Document location segments\n\tajaxLocParts;\n\n// #8138, IE may throw an exception when accessing\n// a field from document.location if document.domain has been set\ntry {\n\tajaxLocation = document.location.href;\n} catch( e ) {\n\t// Use the href attribute of an A element\n\t// since IE will modify it given document.location\n\tajaxLocation = document.createElement( \"a\" );\n\tajaxLocation.href = \"\";\n\tajaxLocation = ajaxLocation.href;\n}\n\n// Segment location into parts\najaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tif ( jQuery.isFunction( func ) ) {\n\t\t\tvar dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),\n\t\t\t\ti = 0,\n\t\t\t\tlength = dataTypes.length,\n\t\t\t\tdataType,\n\t\t\t\tlist,\n\t\t\t\tplaceBefore;\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\tfor(; i < length; i++ ) {\n\t\t\t\tdataType = dataTypes[ i ];\n\t\t\t\t// We control if we're asked to add before\n\t\t\t\t// any existing element\n\t\t\t\tplaceBefore = /^\\+/.test( dataType );\n\t\t\t\tif ( placeBefore ) {\n\t\t\t\t\tdataType = dataType.substr( 1 ) || \"*\";\n\t\t\t\t}\n\t\t\t\tlist = structure[ dataType ] = structure[ dataType ] || [];\n\t\t\t\t// then we add to the structure accordingly\n\t\t\t\tlist[ placeBefore ? \"unshift\" : \"push\" ]( func );\n\t\t\t}\n\t\t}\n\t};\n}\n\n//Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,\n\t\tdataType /* internal */, inspected /* internal */ ) {\n\n\tdataType = dataType || options.dataTypes[ 0 ];\n\tinspected = inspected || {};\n\n\tinspected[ dataType ] = true;\n\n\tvar list = structure[ dataType ],\n\t\ti = 0,\n\t\tlength = list ? list.length : 0,\n\t\texecuteOnly = ( structure === prefilters ),\n\t\tselection;\n\n\tfor(; i < length && ( executeOnly || !selection ); i++ ) {\n\t\tselection = list[ i ]( options, originalOptions, jqXHR );\n\t\t// If we got redirected to another dataType\n\t\t// we try there if executing only and not done already\n\t\tif ( typeof selection === \"string\" ) {\n\t\t\tif ( !executeOnly || inspected[ selection ] ) {\n\t\t\t\tselection = undefined;\n\t\t\t} else {\n\t\t\t\toptions.dataTypes.unshift( selection );\n\t\t\t\tselection = inspectPrefiltersOrTransports(\n\t\t\t\t\t\tstructure, options, originalOptions, jqXHR, selection, inspected );\n\t\t\t}\n\t\t}\n\t}\n\t// If we're only executing or nothing was selected\n\t// we try the catchall dataType if not done already\n\tif ( ( executeOnly || !selection ) && !inspected[ \"*\" ] ) {\n\t\tselection = inspectPrefiltersOrTransports(\n\t\t\t\tstructure, options, originalOptions, jqXHR, \"*\", inspected );\n\t}\n\t// unnecessary when only executing (prefilters)\n\t// but it'll be ignored by the caller in that case\n\treturn selection;\n}\n\njQuery.fn.extend({\n\tload: function( url, params, callback ) {\n\t\tif ( typeof url !== \"string\" && _load ) {\n\t\t\treturn _load.apply( this, arguments );\n\n\t\t// Don't do a request if no elements are being requested\n\t\t} else if ( !this.length ) {\n\t\t\treturn this;\n\t\t}\n\n\t\tvar off = url.indexOf( \" \" );\n\t\tif ( off >= 0 ) {\n\t\t\tvar selector = url.slice( off, url.length );\n\t\t\turl = url.slice( 0, off );\n\t\t}\n\n\t\t// Default to a GET request\n\t\tvar type = \"GET\";\n\n\t\t// If the second parameter was provided\n\t\tif ( params ) {\n\t\t\t// If it's a function\n\t\t\tif ( jQuery.isFunction( params ) ) {\n\t\t\t\t// We assume that it's the callback\n\t\t\t\tcallback = params;\n\t\t\t\tparams = undefined;\n\n\t\t\t// Otherwise, build a param string\n\t\t\t} else if ( typeof params === \"object\" ) {\n\t\t\t\tparams = jQuery.param( params, jQuery.ajaxSettings.traditional );\n\t\t\t\ttype = \"POST\";\n\t\t\t}\n\t\t}\n\n\t\tvar self = this;\n\n\t\t// Request the remote document\n\t\tjQuery.ajax({\n\t\t\turl: url,\n\t\t\ttype: type,\n\t\t\tdataType: \"html\",\n\t\t\tdata: params,\n\t\t\t// Complete callback (responseText is used internally)\n\t\t\tcomplete: function( jqXHR, status, responseText ) {\n\t\t\t\t// Store the response as specified by the jqXHR object\n\t\t\t\tresponseText = jqXHR.responseText;\n\t\t\t\t// If successful, inject the HTML into all the matched elements\n\t\t\t\tif ( jqXHR.isResolved() ) {\n\t\t\t\t\t// #4825: Get the actual response in case\n\t\t\t\t\t// a dataFilter is present in ajaxSettings\n\t\t\t\t\tjqXHR.done(function( r ) {\n\t\t\t\t\t\tresponseText = r;\n\t\t\t\t\t});\n\t\t\t\t\t// See if a selector was specified\n\t\t\t\t\tself.html( selector ?\n\t\t\t\t\t\t// Create a dummy div to hold the results\n\t\t\t\t\t\tjQuery(\"<div>\")\n\t\t\t\t\t\t\t// inject the contents of the document in, removing the scripts\n\t\t\t\t\t\t\t// to avoid any 'Permission Denied' errors in IE\n\t\t\t\t\t\t\t.append(responseText.replace(rscript, \"\"))\n\n\t\t\t\t\t\t\t// Locate the specified elements\n\t\t\t\t\t\t\t.find(selector) :\n\n\t\t\t\t\t\t// If not, just inject the full result\n\t\t\t\t\t\tresponseText );\n\t\t\t\t}\n\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tself.each( callback, [ responseText, status, jqXHR ] );\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn this;\n\t},\n\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\n\tserializeArray: function() {\n\t\treturn this.map(function(){\n\t\t\treturn this.elements ? jQuery.makeArray( this.elements ) : this;\n\t\t})\n\t\t.filter(function(){\n\t\t\treturn this.name && !this.disabled &&\n\t\t\t\t( this.checked || rselectTextarea.test( this.nodeName ) ||\n\t\t\t\t\trinput.test( this.type ) );\n\t\t})\n\t\t.map(function( i, elem ){\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\treturn val == null ?\n\t\t\t\tnull :\n\t\t\t\tjQuery.isArray( val ) ?\n\t\t\t\t\tjQuery.map( val, function( val, i ){\n\t\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t\t}) :\n\t\t\t\t\t{ name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t}).get();\n\t}\n});\n\n// Attach a bunch of functions for handling common AJAX events\njQuery.each( \"ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend\".split( \" \" ), function( i, o ){\n\tjQuery.fn[ o ] = function( f ){\n\t\treturn this.bind( o, f );\n\t};\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\t\t// shift arguments if data argument was omitted\n\t\tif ( jQuery.isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\treturn jQuery.ajax({\n\t\t\ttype: method,\n\t\t\turl: url,\n\t\t\tdata: data,\n\t\t\tsuccess: callback,\n\t\t\tdataType: type\n\t\t});\n\t};\n} );\n\njQuery.extend({\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function ( target, settings ) {\n\t\tif ( !settings ) {\n\t\t\t// Only one parameter, we extend ajaxSettings\n\t\t\tsettings = target;\n\t\t\ttarget = jQuery.extend( true, jQuery.ajaxSettings, settings );\n\t\t} else {\n\t\t\t// target was provided, we extend into it\n\t\t\tjQuery.extend( true, target, jQuery.ajaxSettings, settings );\n\t\t}\n\t\t// Flatten fields we don't want deep extended\n\t\tfor( var field in { context: 1, url: 1 } ) {\n\t\t\tif ( field in settings ) {\n\t\t\t\ttarget[ field ] = settings[ field ];\n\t\t\t} else if( field in jQuery.ajaxSettings ) {\n\t\t\t\ttarget[ field ] = jQuery.ajaxSettings[ field ];\n\t\t\t}\n\t\t}\n\t\treturn target;\n\t},\n\n\tajaxSettings: {\n\t\turl: ajaxLocation,\n\t\tisLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),\n\t\tglobal: true,\n\t\ttype: \"GET\",\n\t\tcontentType: \"application/x-www-form-urlencoded\",\n\t\tprocessData: true,\n\t\tasync: true,\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\thtml: \"text/html\",\n\t\t\ttext: \"text/plain\",\n\t\t\tjson: \"application/json, text/javascript\",\n\t\t\t\"*\": \"*/*\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /xml/,\n\t\t\thtml: /html/,\n\t\t\tjson: /json/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\"\n\t\t},\n\n\t\t// List of data converters\n\t\t// 1) key format is \"source_type destination_type\" (a single space in-between)\n\t\t// 2) the catchall symbol \"*\" can be used for source_type\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": window.String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": jQuery.parseJSON,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t}\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar // Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\t\t\t// Context for global events\n\t\t\t// It's the callbackContext if one was provided in the options\n\t\t\t// and if it's a DOM node or a jQuery collection\n\t\t\tglobalEventContext = callbackContext !== s &&\n\t\t\t\t( callbackContext.nodeType || callbackContext instanceof jQuery ) ?\n\t\t\t\t\t\tjQuery( callbackContext ) : jQuery.event,\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery._Deferred(),\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\t\t\t// ifModified key\n\t\t\tifModifiedKey,\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\t\t\t// transport\n\t\t\ttransport,\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\t\t\t// Cross-domain detection vars\n\t\t\tparts,\n\t\t\t// The jqXHR state\n\t\t\tstate = 0,\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\t\t\t// Loop variable\n\t\t\ti,\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( !state ) {\n\t\t\t\t\t\trequestHeaders[ name.toLowerCase().replace( rucHeaders, rucHeadersFunc ) ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn state === 2 ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( state === 2 ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[1].toLowerCase() ] = match[ 2 ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match === undefined ? null : match;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( !state ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tstatusText = statusText || \"abort\";\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( statusText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, statusText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Callback for when everything is done\n\t\t// It is defined here because jslint complains if it is declared\n\t\t// at the end of the function (which would be more logical and readable)\n\t\tfunction done( status, statusText, responses, headers ) {\n\n\t\t\t// Called once\n\t\t\tif ( state === 2 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// State is \"done\" now\n\t\t\tstate = 2;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\tclearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status ? 4 : 0;\n\n\t\t\tvar isSuccess,\n\t\t\t\tsuccess,\n\t\t\t\terror,\n\t\t\t\tresponse = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,\n\t\t\t\tlastModified,\n\t\t\t\tetag;\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( status >= 200 && status < 300 || status === 304 ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\n\t\t\t\t\tif ( ( lastModified = jqXHR.getResponseHeader( \"Last-Modified\" ) ) ) {\n\t\t\t\t\t\tjQuery.lastModified[ ifModifiedKey ] = lastModified;\n\t\t\t\t\t}\n\t\t\t\t\tif ( ( etag = jqXHR.getResponseHeader( \"Etag\" ) ) ) {\n\t\t\t\t\t\tjQuery.etag[ ifModifiedKey ] = etag;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If not modified\n\t\t\t\tif ( status === 304 ) {\n\n\t\t\t\t\tstatusText = \"notmodified\";\n\t\t\t\t\tisSuccess = true;\n\n\t\t\t\t// If we have data\n\t\t\t\t} else {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsuccess = ajaxConvert( s, response );\n\t\t\t\t\t\tstatusText = \"success\";\n\t\t\t\t\t\tisSuccess = true;\n\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\t// We have a parsererror\n\t\t\t\t\t\tstatusText = \"parsererror\";\n\t\t\t\t\t\terror = e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// We extract error from statusText\n\t\t\t\t// then normalize statusText and status for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif( !statusText || status ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = statusText;\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajax\" + ( isSuccess ? \"Success\" : \"Error\" ),\n\t\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.resolveWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s] );\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\t\tjqXHR.success = jqXHR.done;\n\t\tjqXHR.error = jqXHR.fail;\n\t\tjqXHR.complete = completeDeferred.done;\n\n\t\t// Status-dependent callbacks\n\t\tjqXHR.statusCode = function( map ) {\n\t\t\tif ( map ) {\n\t\t\t\tvar tmp;\n\t\t\t\tif ( state < 2 ) {\n\t\t\t\t\tfor( tmp in map ) {\n\t\t\t\t\t\tstatusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttmp = map[ jqXHR.status ];\n\t\t\t\t\tjqXHR.then( tmp, tmp );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn this;\n\t\t};\n\n\t\t// Remove hash character (#7531: and string promotion)\n\t\t// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url ) + \"\" ).replace( rhash, \"\" ).replace( rprotocol, ajaxLocParts[ 1 ] + \"//\" );\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = jQuery.trim( s.dataType || \"*\" ).toLowerCase().split( rspacesAjax );\n\n\t\t// Determine if a cross-domain request is in order\n\t\tif ( s.crossDomain == null ) {\n\t\t\tparts = rurl.exec( s.url.toLowerCase() );\n\t\t\ts.crossDomain = !!( parts &&\n\t\t\t\t( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||\n\t\t\t\t\t( parts[ 3 ] || ( parts[ 1 ] === \"http:\" ? 80 : 443 ) ) !=\n\t\t\t\t\t\t( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === \"http:\" ? 80 : 443 ) ) )\n\t\t\t);\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefiler, stop there\n\t\tif ( state === 2 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\tfireGlobals = s.global;\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// If data is available, append data to url\n\t\t\tif ( s.data ) {\n\t\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.data;\n\t\t\t}\n\n\t\t\t// Get ifModifiedKey before adding the anti-cache parameter\n\t\t\tifModifiedKey = s.url;\n\n\t\t\t// Add anti-cache in url if needed\n\t\t\tif ( s.cache === false ) {\n\n\t\t\t\tvar ts = jQuery.now(),\n\t\t\t\t\t// try replacing _= if it is there\n\t\t\t\t\tret = s.url.replace( rts, \"$1_=\" + ts );\n\n\t\t\t\t// if nothing was replaced, add timestamp to the end\n\t\t\t\ts.url = ret + ( (ret === s.url ) ? ( rquery.test( s.url ) ? \"&\" : \"?\" ) + \"_=\" + ts : \"\" );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\trequestHeaders[ \"Content-Type\" ] = s.contentType;\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tifModifiedKey = ifModifiedKey || s.url;\n\t\t\tif ( jQuery.lastModified[ ifModifiedKey ] ) {\n\t\t\t\trequestHeaders[ \"If-Modified-Since\" ] = jQuery.lastModified[ ifModifiedKey ];\n\t\t\t}\n\t\t\tif ( jQuery.etag[ ifModifiedKey ] ) {\n\t\t\t\trequestHeaders[ \"If-None-Match\" ] = jQuery.etag[ ifModifiedKey ];\n\t\t\t}\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\trequestHeaders.Accept = s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?\n\t\t\ts.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== \"*\" ? \", */*; q=0.01\" : \"\" ) :\n\t\t\ts.accepts[ \"*\" ];\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {\n\t\t\t\t// Abort if not done already\n\t\t\t\tjqXHR.abort();\n\t\t\t\treturn false;\n\n\t\t}\n\n\t\t// Install callbacks on deferreds\n\t\tfor ( i in { success: 1, error: 1, complete: 1 } ) {\n\t\t\tjqXHR[ i ]( s[ i ] );\n\t\t}\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = setTimeout( function(){\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tstate = 1;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch (e) {\n\t\t\t\t// Propagate exception as error if not done\n\t\t\t\tif ( status < 2 ) {\n\t\t\t\t\tdone( -1, e );\n\t\t\t\t// Simply rethrow otherwise\n\t\t\t\t} else {\n\t\t\t\t\tjQuery.error( e );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\t// Serialize an array of form elements or a set of\n\t// key/values into a query string\n\tparam: function( a, traditional ) {\n\t\tvar s = [],\n\t\t\tadd = function( key, value ) {\n\t\t\t\t// If value is a function, invoke it and return its value\n\t\t\t\tvalue = jQuery.isFunction( value ) ? value() : value;\n\t\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" + encodeURIComponent( value );\n\t\t\t};\n\n\t\t// Set traditional to true for jQuery <= 1.3.2 behavior.\n\t\tif ( traditional === undefined ) {\n\t\t\ttraditional = jQuery.ajaxSettings.traditional;\n\t\t}\n\n\t\t// If an array was passed in, assume that it is an array of form elements.\n\t\tif ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\t\t\t// Serialize the form elements\n\t\t\tjQuery.each( a, function() {\n\t\t\t\tadd( this.name, this.value );\n\t\t\t} );\n\n\t\t} else {\n\t\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t\t// did it), otherwise encode params recursively.\n\t\t\tfor ( var prefix in a ) {\n\t\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t\t}\n\t\t}\n\n\t\t// Return the resulting serialization\n\t\treturn s.join( \"&\" ).replace( r20, \"+\" );\n\t}\n});\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tif ( jQuery.isArray( obj ) && obj.length ) {\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\t\t\t\t// If array item is non-scalar (array or object), encode its\n\t\t\t\t// numeric index to resolve deserialization ambiguity issues.\n\t\t\t\t// Note that rack (as of 1.0.0) can't currently deserialize\n\t\t\t\t// nested arrays properly, and attempting to do so may cause\n\t\t\t\t// a server error. Possible fixes are to modify rack's\n\t\t\t\t// deserialization algorithm or to provide an option or flag\n\t\t\t\t// to force array serialization to be shallow.\n\t\t\t\tbuildParams( prefix + \"[\" + ( typeof v === \"object\" || jQuery.isArray(v) ? i : \"\" ) + \"]\", v, traditional, add );\n\t\t\t}\n\t\t});\n\n\t} else if ( !traditional && obj != null && typeof obj === \"object\" ) {\n\t\t// If we see an array here, it is empty and should be treated as an empty\n\t\t// object\n\t\tif ( jQuery.isArray( obj ) || jQuery.isEmptyObject( obj ) ) {\n\t\t\tadd( prefix, \"\" );\n\n\t\t// Serialize object item.\n\t\t} else {\n\t\t\tfor ( var name in obj ) {\n\t\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t\t}\n\t\t}\n\n\t} else {\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// This is still on the jQuery object... for now\n// Want to move this to jQuery.ajax some day\njQuery.extend({\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {}\n\n});\n\n/* Handles responses to an ajax request:\n * - sets all responseXXX fields accordingly\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar contents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields,\n\t\tct,\n\t\ttype,\n\t\tfinalDataType,\n\t\tfirstDataType;\n\n\t// Fill responseXXX fields\n\tfor( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n// Chain conversions given the request and the original response\nfunction ajaxConvert( s, response ) {\n\n\t// Apply the dataFilter if provided\n\tif ( s.dataFilter ) {\n\t\tresponse = s.dataFilter( response, s.dataType );\n\t}\n\n\tvar dataTypes = s.dataTypes,\n\t\tconverters = {},\n\t\ti,\n\t\tkey,\n\t\tlength = dataTypes.length,\n\t\ttmp,\n\t\t// Current and previous dataTypes\n\t\tcurrent = dataTypes[ 0 ],\n\t\tprev,\n\t\t// Conversion expression\n\t\tconversion,\n\t\t// Conversion function\n\t\tconv,\n\t\t// Conversion functions (transitive conversion)\n\t\tconv1,\n\t\tconv2;\n\n\t// For each dataType in the chain\n\tfor( i = 1; i < length; i++ ) {\n\n\t\t// Create converters map\n\t\t// with lowercased keys\n\t\tif ( i === 1 ) {\n\t\t\tfor( key in s.converters ) {\n\t\t\t\tif( typeof key === \"string\" ) {\n\t\t\t\t\tconverters[ key.toLowerCase() ] = s.converters[ key ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Get the dataTypes\n\t\tprev = current;\n\t\tcurrent = dataTypes[ i ];\n\n\t\t// If current is auto dataType, update it to prev\n\t\tif( current === \"*\" ) {\n\t\t\tcurrent = prev;\n\t\t// If no auto and dataTypes are actually different\n\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t// Get the converter\n\t\t\tconversion = prev + \" \" + current;\n\t\t\tconv = converters[ conversion ] || converters[ \"* \" + current ];\n\n\t\t\t// If there is no direct converter, search transitively\n\t\t\tif ( !conv ) {\n\t\t\t\tconv2 = undefined;\n\t\t\t\tfor( conv1 in converters ) {\n\t\t\t\t\ttmp = conv1.split( \" \" );\n\t\t\t\t\tif ( tmp[ 0 ] === prev || tmp[ 0 ] === \"*\" ) {\n\t\t\t\t\t\tconv2 = converters[ tmp[1] + \" \" + current ];\n\t\t\t\t\t\tif ( conv2 ) {\n\t\t\t\t\t\t\tconv1 = converters[ conv1 ];\n\t\t\t\t\t\t\tif ( conv1 === true ) {\n\t\t\t\t\t\t\t\tconv = conv2;\n\t\t\t\t\t\t\t} else if ( conv2 === true ) {\n\t\t\t\t\t\t\t\tconv = conv1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If we found no converter, dispatch an error\n\t\t\tif ( !( conv || conv2 ) ) {\n\t\t\t\tjQuery.error( \"No conversion from \" + conversion.replace(\" \",\" to \") );\n\t\t\t}\n\t\t\t// If found converter is not an equivalence\n\t\t\tif ( conv !== true ) {\n\t\t\t\t// Convert with 1 or 2 converters accordingly\n\t\t\t\tresponse = conv ? conv( response ) : conv2( conv1(response) );\n\t\t\t}\n\t\t}\n\t}\n\treturn response;\n}\n\n\n\n\nvar jsc = jQuery.now(),\n\tjsre = /(\\=)\\?(&|$)|\\?\\?/i;\n\n// Default jsonp settings\njQuery.ajaxSetup({\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\treturn jQuery.expando + \"_\" + ( jsc++ );\n\t}\n});\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar dataIsString = ( typeof s.data === \"string\" );\n\n\tif ( s.dataTypes[ 0 ] === \"jsonp\" ||\n\t\toriginalSettings.jsonpCallback ||\n\t\toriginalSettings.jsonp != null ||\n\t\ts.jsonp !== false && ( jsre.test( s.url ) ||\n\t\t\t\tdataIsString && jsre.test( s.data ) ) ) {\n\n\t\tvar responseContainer,\n\t\t\tjsonpCallback = s.jsonpCallback =\n\t\t\t\tjQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback,\n\t\t\tprevious = window[ jsonpCallback ],\n\t\t\turl = s.url,\n\t\t\tdata = s.data,\n\t\t\treplace = \"$1\" + jsonpCallback + \"$2\",\n\t\t\tcleanUp = function() {\n\t\t\t\t// Set callback back to previous value\n\t\t\t\twindow[ jsonpCallback ] = previous;\n\t\t\t\t// Call if it was a function and we have a response\n\t\t\t\tif ( responseContainer && jQuery.isFunction( previous ) ) {\n\t\t\t\t\twindow[ jsonpCallback ]( responseContainer[ 0 ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( s.jsonp !== false ) {\n\t\t\turl = url.replace( jsre, replace );\n\t\t\tif ( s.url === url ) {\n\t\t\t\tif ( dataIsString ) {\n\t\t\t\t\tdata = data.replace( jsre, replace );\n\t\t\t\t}\n\t\t\t\tif ( s.data === data ) {\n\t\t\t\t\t// Add callback manually\n\t\t\t\t\turl += (/\\?/.test( url ) ? \"&\" : \"?\") + s.jsonp + \"=\" + jsonpCallback;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ts.url = url;\n\t\ts.data = data;\n\n\t\t// Install callback\n\t\twindow[ jsonpCallback ] = function( response ) {\n\t\t\tresponseContainer = [ response ];\n\t\t};\n\n\t\t// Install cleanUp function\n\t\tjqXHR.then( cleanUp, cleanUp );\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[\"script json\"] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( jsonpCallback + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// Install script dataType\njQuery.ajaxSetup({\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /javascript|ecmascript/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n});\n\n// Handle cache's special case and global\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t\ts.global = false;\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function(s) {\n\n\t// This transport only deals with cross domain requests\n\tif ( s.crossDomain ) {\n\n\t\tvar script,\n\t\t\thead = document.head || document.getElementsByTagName( \"head\" )[0] || document.documentElement;\n\n\t\treturn {\n\n\t\t\tsend: function( _, callback ) {\n\n\t\t\t\tscript = document.createElement( \"script\" );\n\n\t\t\t\tscript.async = \"async\";\n\n\t\t\t\tif ( s.scriptCharset ) {\n\t\t\t\t\tscript.charset = s.scriptCharset;\n\t\t\t\t}\n\n\t\t\t\tscript.src = s.url;\n\n\t\t\t\t// Attach handlers for all browsers\n\t\t\t\tscript.onload = script.onreadystatechange = function( _, isAbort ) {\n\n\t\t\t\t\tif ( !script.readyState || /loaded|complete/.test( script.readyState ) ) {\n\n\t\t\t\t\t\t// Handle memory leak in IE\n\t\t\t\t\t\tscript.onload = script.onreadystatechange = null;\n\n\t\t\t\t\t\t// Remove the script\n\t\t\t\t\t\tif ( head && script.parentNode ) {\n\t\t\t\t\t\t\thead.removeChild( script );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Dereference the script\n\t\t\t\t\t\tscript = undefined;\n\n\t\t\t\t\t\t// Callback if not abort\n\t\t\t\t\t\tif ( !isAbort ) {\n\t\t\t\t\t\t\tcallback( 200, \"success\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t// Use insertBefore instead of appendChild  to circumvent an IE6 bug.\n\t\t\t\t// This arises when a base node is used (#2709 and #4378).\n\t\t\t\thead.insertBefore( script, head.firstChild );\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( script ) {\n\t\t\t\t\tscript.onload( 0, 1 );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar // #5280: next active xhr id and list of active xhrs' callbacks\n\txhrId = jQuery.now(),\n\txhrCallbacks,\n\n\t// XHR used to determine supports properties\n\ttestXHR;\n\n// #5280: Internet Explorer will keep connections alive if we don't abort on unload\nfunction xhrOnUnloadAbort() {\n\tjQuery( window ).unload(function() {\n\t\t// Abort all pending requests\n\t\tfor ( var key in xhrCallbacks ) {\n\t\t\txhrCallbacks[ key ]( 0, 1 );\n\t\t}\n\t});\n}\n\n// Functions to create xhrs\nfunction createStandardXHR() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch( e ) {}\n}\n\nfunction createActiveXHR() {\n\ttry {\n\t\treturn new window.ActiveXObject( \"Microsoft.XMLHTTP\" );\n\t} catch( e ) {}\n}\n\n// Create the request object\n// (This is still attached to ajaxSettings for backward compatibility)\njQuery.ajaxSettings.xhr = window.ActiveXObject ?\n\t/* Microsoft failed to properly\n\t * implement the XMLHttpRequest in IE7 (can't request local files),\n\t * so we use the ActiveXObject when it is available\n\t * Additionally XMLHttpRequest can be disabled in IE7/IE8 so\n\t * we need a fallback.\n\t */\n\tfunction() {\n\t\treturn !this.isLocal && createStandardXHR() || createActiveXHR();\n\t} :\n\t// For all other browsers, use the standard XMLHttpRequest object\n\tcreateStandardXHR;\n\n// Test if we can create an xhr object\ntestXHR = jQuery.ajaxSettings.xhr();\njQuery.support.ajax = !!testXHR;\n\n// Does this browser support crossDomain XHR requests\njQuery.support.cors = testXHR && ( \"withCredentials\" in testXHR );\n\n// No need for the temporary xhr anymore\ntestXHR = undefined;\n\n// Create transport if the browser can provide an xhr\nif ( jQuery.support.ajax ) {\n\n\tjQuery.ajaxTransport(function( s ) {\n\t\t// Cross domain only allowed if supported through XMLHttpRequest\n\t\tif ( !s.crossDomain || jQuery.support.cors ) {\n\n\t\t\tvar callback;\n\n\t\t\treturn {\n\t\t\t\tsend: function( headers, complete ) {\n\n\t\t\t\t\t// Get a new xhr\n\t\t\t\t\tvar xhr = s.xhr(),\n\t\t\t\t\t\thandle,\n\t\t\t\t\t\ti;\n\n\t\t\t\t\t// Open the socket\n\t\t\t\t\t// Passing null username, generates a login popup on Opera (#2865)\n\t\t\t\t\tif ( s.username ) {\n\t\t\t\t\t\txhr.open( s.type, s.url, s.async, s.username, s.password );\n\t\t\t\t\t} else {\n\t\t\t\t\t\txhr.open( s.type, s.url, s.async );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Apply custom fields if provided\n\t\t\t\t\tif ( s.xhrFields ) {\n\t\t\t\t\t\tfor ( i in s.xhrFields ) {\n\t\t\t\t\t\t\txhr[ i ] = s.xhrFields[ i ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Override mime type if needed\n\t\t\t\t\tif ( s.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\t\txhr.overrideMimeType( s.mimeType );\n\t\t\t\t\t}\n\n\t\t\t\t\t// X-Requested-With header\n\t\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\t\tif ( !s.crossDomain && !headers[\"X-Requested-With\"] ) {\n\t\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t\t}\n\n\t\t\t\t\t// Need an extra try/catch for cross domain requests in Firefox 3\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch( _ ) {}\n\n\t\t\t\t\t// Do send the request\n\t\t\t\t\t// This may raise an exception which is actually\n\t\t\t\t\t// handled in jQuery.ajax (so no try/catch here)\n\t\t\t\t\txhr.send( ( s.hasContent && s.data ) || null );\n\n\t\t\t\t\t// Listener\n\t\t\t\t\tcallback = function( _, isAbort ) {\n\n\t\t\t\t\t\tvar status,\n\t\t\t\t\t\t\tstatusText,\n\t\t\t\t\t\t\tresponseHeaders,\n\t\t\t\t\t\t\tresponses,\n\t\t\t\t\t\t\txml;\n\n\t\t\t\t\t\t// Firefox throws exceptions when accessing properties\n\t\t\t\t\t\t// of an xhr when a network error occured\n\t\t\t\t\t\t// http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)\n\t\t\t\t\t\ttry {\n\n\t\t\t\t\t\t\t// Was never called and is aborted or complete\n\t\t\t\t\t\t\tif ( callback && ( isAbort || xhr.readyState === 4 ) ) {\n\n\t\t\t\t\t\t\t\t// Only called once\n\t\t\t\t\t\t\t\tcallback = undefined;\n\n\t\t\t\t\t\t\t\t// Do not keep as active anymore\n\t\t\t\t\t\t\t\tif ( handle ) {\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = jQuery.noop;\n\t\t\t\t\t\t\t\t\tdelete xhrCallbacks[ handle ];\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// If it's an abort\n\t\t\t\t\t\t\t\tif ( isAbort ) {\n\t\t\t\t\t\t\t\t\t// Abort it manually if needed\n\t\t\t\t\t\t\t\t\tif ( xhr.readyState !== 4 ) {\n\t\t\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tstatus = xhr.status;\n\t\t\t\t\t\t\t\t\tresponseHeaders = xhr.getAllResponseHeaders();\n\t\t\t\t\t\t\t\t\tresponses = {};\n\t\t\t\t\t\t\t\t\txml = xhr.responseXML;\n\n\t\t\t\t\t\t\t\t\t// Construct response list\n\t\t\t\t\t\t\t\t\tif ( xml && xml.documentElement /* #4958 */ ) {\n\t\t\t\t\t\t\t\t\t\tresponses.xml = xml;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tresponses.text = xhr.responseText;\n\n\t\t\t\t\t\t\t\t\t// Firefox throws an exception when accessing\n\t\t\t\t\t\t\t\t\t// statusText for faulty cross-domain requests\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tstatusText = xhr.statusText;\n\t\t\t\t\t\t\t\t\t} catch( e ) {\n\t\t\t\t\t\t\t\t\t\t// We normalize with Webkit giving an empty statusText\n\t\t\t\t\t\t\t\t\t\tstatusText = \"\";\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Filter status for non standard behaviors\n\n\t\t\t\t\t\t\t\t\t// If the request is local and we have data: assume a success\n\t\t\t\t\t\t\t\t\t// (success with no data won't get notified, that's the best we\n\t\t\t\t\t\t\t\t\t// can do given current implementations)\n\t\t\t\t\t\t\t\t\tif ( !status && s.isLocal && !s.crossDomain ) {\n\t\t\t\t\t\t\t\t\t\tstatus = responses.text ? 200 : 404;\n\t\t\t\t\t\t\t\t\t// IE - #1450: sometimes returns 1223 when it should be 204\n\t\t\t\t\t\t\t\t\t} else if ( status === 1223 ) {\n\t\t\t\t\t\t\t\t\t\tstatus = 204;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch( firefoxAccessException ) {\n\t\t\t\t\t\t\tif ( !isAbort ) {\n\t\t\t\t\t\t\t\tcomplete( -1, firefoxAccessException );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Call complete if needed\n\t\t\t\t\t\tif ( responses ) {\n\t\t\t\t\t\t\tcomplete( status, statusText, responses, responseHeaders );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\t// if we're in sync mode or it's in cache\n\t\t\t\t\t// and has been retrieved directly (IE6 & IE7)\n\t\t\t\t\t// we need to manually fire the callback\n\t\t\t\t\tif ( !s.async || xhr.readyState === 4 ) {\n\t\t\t\t\t\tcallback();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Create the active xhrs callbacks list if needed\n\t\t\t\t\t\t// and attach the unload handler\n\t\t\t\t\t\tif ( !xhrCallbacks ) {\n\t\t\t\t\t\t\txhrCallbacks = {};\n\t\t\t\t\t\t\txhrOnUnloadAbort();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Add to list of active xhrs callbacks\n\t\t\t\t\t\thandle = xhrId++;\n\t\t\t\t\t\txhr.onreadystatechange = xhrCallbacks[ handle ] = callback;\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\tabort: function() {\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tcallback(0,1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t});\n}\n\n\n\n\nvar elemdisplay = {},\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trfxnum = /^([+\\-]=)?([\\d+.\\-]+)([a-z%]*)$/i,\n\ttimerId,\n\tfxAttrs = [\n\t\t// height animations\n\t\t[ \"height\", \"marginTop\", \"marginBottom\", \"paddingTop\", \"paddingBottom\" ],\n\t\t// width animations\n\t\t[ \"width\", \"marginLeft\", \"marginRight\", \"paddingLeft\", \"paddingRight\" ],\n\t\t// opacity animations\n\t\t[ \"opacity\" ]\n\t];\n\njQuery.fn.extend({\n\tshow: function( speed, easing, callback ) {\n\t\tvar elem, display;\n\n\t\tif ( speed || speed === 0 ) {\n\t\t\treturn this.animate( genFx(\"show\", 3), speed, easing, callback);\n\n\t\t} else {\n\t\t\tfor ( var i = 0, j = this.length; i < j; i++ ) {\n\t\t\t\telem = this[i];\n\t\t\t\tdisplay = elem.style.display;\n\n\t\t\t\t// Reset the inline display of this element to learn if it is\n\t\t\t\t// being hidden by cascaded rules or not\n\t\t\t\tif ( !jQuery._data(elem, \"olddisplay\") && display === \"none\" ) {\n\t\t\t\t\tdisplay = elem.style.display = \"\";\n\t\t\t\t}\n\n\t\t\t\t// Set elements which have been overridden with display: none\n\t\t\t\t// in a stylesheet to whatever the default browser style is\n\t\t\t\t// for such an element\n\t\t\t\tif ( display === \"\" && jQuery.css( elem, \"display\" ) === \"none\" ) {\n\t\t\t\t\tjQuery._data(elem, \"olddisplay\", defaultDisplay(elem.nodeName));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set the display of most of the elements in a second loop\n\t\t\t// to avoid the constant reflow\n\t\t\tfor ( i = 0; i < j; i++ ) {\n\t\t\t\telem = this[i];\n\t\t\t\tdisplay = elem.style.display;\n\n\t\t\t\tif ( display === \"\" || display === \"none\" ) {\n\t\t\t\t\telem.style.display = jQuery._data(elem, \"olddisplay\") || \"\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\t},\n\n\thide: function( speed, easing, callback ) {\n\t\tif ( speed || speed === 0 ) {\n\t\t\treturn this.animate( genFx(\"hide\", 3), speed, easing, callback);\n\n\t\t} else {\n\t\t\tfor ( var i = 0, j = this.length; i < j; i++ ) {\n\t\t\t\tvar display = jQuery.css( this[i], \"display\" );\n\n\t\t\t\tif ( display !== \"none\" && !jQuery._data( this[i], \"olddisplay\" ) ) {\n\t\t\t\t\tjQuery._data( this[i], \"olddisplay\", display );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set the display of the elements in a second loop\n\t\t\t// to avoid the constant reflow\n\t\t\tfor ( i = 0; i < j; i++ ) {\n\t\t\t\tthis[i].style.display = \"none\";\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\t},\n\n\t// Save the old toggle function\n\t_toggle: jQuery.fn.toggle,\n\n\ttoggle: function( fn, fn2, callback ) {\n\t\tvar bool = typeof fn === \"boolean\";\n\n\t\tif ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {\n\t\t\tthis._toggle.apply( this, arguments );\n\n\t\t} else if ( fn == null || bool ) {\n\t\t\tthis.each(function() {\n\t\t\t\tvar state = bool ? fn : jQuery(this).is(\":hidden\");\n\t\t\t\tjQuery(this)[ state ? \"show\" : \"hide\" ]();\n\t\t\t});\n\n\t\t} else {\n\t\t\tthis.animate(genFx(\"toggle\", 3), fn, fn2, callback);\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tfadeTo: function( speed, to, easing, callback ) {\n\t\treturn this.filter(\":hidden\").css(\"opacity\", 0).show().end()\n\t\t\t\t\t.animate({opacity: to}, speed, easing, callback);\n\t},\n\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar optall = jQuery.speed(speed, easing, callback);\n\n\t\tif ( jQuery.isEmptyObject( prop ) ) {\n\t\t\treturn this.each( optall.complete );\n\t\t}\n\n\t\treturn this[ optall.queue === false ? \"each\" : \"queue\" ](function() {\n\t\t\t// XXX 'this' does not always have a nodeName when running the\n\t\t\t// test suite\n\n\t\t\tvar opt = jQuery.extend({}, optall), p,\n\t\t\t\tisElement = this.nodeType === 1,\n\t\t\t\thidden = isElement && jQuery(this).is(\":hidden\"),\n\t\t\t\tself = this;\n\n\t\t\tfor ( p in prop ) {\n\t\t\t\tvar name = jQuery.camelCase( p );\n\n\t\t\t\tif ( p !== name ) {\n\t\t\t\t\tprop[ name ] = prop[ p ];\n\t\t\t\t\tdelete prop[ p ];\n\t\t\t\t\tp = name;\n\t\t\t\t}\n\n\t\t\t\tif ( prop[p] === \"hide\" && hidden || prop[p] === \"show\" && !hidden ) {\n\t\t\t\t\treturn opt.complete.call(this);\n\t\t\t\t}\n\n\t\t\t\tif ( isElement && ( p === \"height\" || p === \"width\" ) ) {\n\t\t\t\t\t// Make sure that nothing sneaks out\n\t\t\t\t\t// Record all 3 overflow attributes because IE does not\n\t\t\t\t\t// change the overflow attribute when overflowX and\n\t\t\t\t\t// overflowY are set to the same value\n\t\t\t\t\topt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];\n\n\t\t\t\t\t// Set display property to inline-block for height/width\n\t\t\t\t\t// animations on inline elements that are having width/height\n\t\t\t\t\t// animated\n\t\t\t\t\tif ( jQuery.css( this, \"display\" ) === \"inline\" &&\n\t\t\t\t\t\t\tjQuery.css( this, \"float\" ) === \"none\" ) {\n\t\t\t\t\t\tif ( !jQuery.support.inlineBlockNeedsLayout ) {\n\t\t\t\t\t\t\tthis.style.display = \"inline-block\";\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvar display = defaultDisplay(this.nodeName);\n\n\t\t\t\t\t\t\t// inline-level elements accept inline-block;\n\t\t\t\t\t\t\t// block-level elements need to be inline with layout\n\t\t\t\t\t\t\tif ( display === \"inline\" ) {\n\t\t\t\t\t\t\t\tthis.style.display = \"inline-block\";\n\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.style.display = \"inline\";\n\t\t\t\t\t\t\t\tthis.style.zoom = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( jQuery.isArray( prop[p] ) ) {\n\t\t\t\t\t// Create (if needed) and add to specialEasing\n\t\t\t\t\t(opt.specialEasing = opt.specialEasing || {})[p] = prop[p][1];\n\t\t\t\t\tprop[p] = prop[p][0];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( opt.overflow != null ) {\n\t\t\t\tthis.style.overflow = \"hidden\";\n\t\t\t}\n\n\t\t\topt.curAnim = jQuery.extend({}, prop);\n\n\t\t\tjQuery.each( prop, function( name, val ) {\n\t\t\t\tvar e = new jQuery.fx( self, opt, name );\n\n\t\t\t\tif ( rfxtypes.test(val) ) {\n\t\t\t\t\te[ val === \"toggle\" ? hidden ? \"show\" : \"hide\" : val ]( prop );\n\n\t\t\t\t} else {\n\t\t\t\t\tvar parts = rfxnum.exec(val),\n\t\t\t\t\t\tstart = e.cur();\n\n\t\t\t\t\tif ( parts ) {\n\t\t\t\t\t\tvar end = parseFloat( parts[2] ),\n\t\t\t\t\t\t\tunit = parts[3] || ( jQuery.cssNumber[ name ] ? \"\" : \"px\" );\n\n\t\t\t\t\t\t// We need to compute starting value\n\t\t\t\t\t\tif ( unit !== \"px\" ) {\n\t\t\t\t\t\t\tjQuery.style( self, name, (end || 1) + unit);\n\t\t\t\t\t\t\tstart = ((end || 1) / e.cur()) * start;\n\t\t\t\t\t\t\tjQuery.style( self, name, start + unit);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If a +=/-= token was provided, we're doing a relative animation\n\t\t\t\t\t\tif ( parts[1] ) {\n\t\t\t\t\t\t\tend = ((parts[1] === \"-=\" ? -1 : 1) * end) + start;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\te.custom( start, end, unit );\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\te.custom( start, val, \"\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// For JS strict compliance\n\t\t\treturn true;\n\t\t});\n\t},\n\n\tstop: function( clearQueue, gotoEnd ) {\n\t\tvar timers = jQuery.timers;\n\n\t\tif ( clearQueue ) {\n\t\t\tthis.queue([]);\n\t\t}\n\n\t\tthis.each(function() {\n\t\t\t// go in reverse order so anything added to the queue during the loop is ignored\n\t\t\tfor ( var i = timers.length - 1; i >= 0; i-- ) {\n\t\t\t\tif ( timers[i].elem === this ) {\n\t\t\t\t\tif (gotoEnd) {\n\t\t\t\t\t\t// force the next step to be the last\n\t\t\t\t\t\ttimers[i](true);\n\t\t\t\t\t}\n\n\t\t\t\t\ttimers.splice(i, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// start the next in the queue if the last step wasn't forced\n\t\tif ( !gotoEnd ) {\n\t\t\tthis.dequeue();\n\t\t}\n\n\t\treturn this;\n\t}\n\n});\n\nfunction genFx( type, num ) {\n\tvar obj = {};\n\n\tjQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() {\n\t\tobj[ this ] = type;\n\t});\n\n\treturn obj;\n}\n\n// Generate shortcuts for custom animations\njQuery.each({\n\tslideDown: genFx(\"show\", 1),\n\tslideUp: genFx(\"hide\", 1),\n\tslideToggle: genFx(\"toggle\", 1),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n});\n\njQuery.extend({\n\tspeed: function( speed, easing, fn ) {\n\t\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend({}, speed) : {\n\t\t\tcomplete: fn || !fn && easing ||\n\t\t\t\tjQuery.isFunction( speed ) && speed,\n\t\t\tduration: speed,\n\t\t\teasing: fn && easing || easing && !jQuery.isFunction(easing) && easing\n\t\t};\n\n\t\topt.duration = jQuery.fx.off ? 0 : typeof opt.duration === \"number\" ? opt.duration :\n\t\t\topt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default;\n\n\t\t// Queueing\n\t\topt.old = opt.complete;\n\t\topt.complete = function() {\n\t\t\tif ( opt.queue !== false ) {\n\t\t\t\tjQuery(this).dequeue();\n\t\t\t}\n\t\t\tif ( jQuery.isFunction( opt.old ) ) {\n\t\t\t\topt.old.call( this );\n\t\t\t}\n\t\t};\n\n\t\treturn opt;\n\t},\n\n\teasing: {\n\t\tlinear: function( p, n, firstNum, diff ) {\n\t\t\treturn firstNum + diff * p;\n\t\t},\n\t\tswing: function( p, n, firstNum, diff ) {\n\t\t\treturn ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;\n\t\t}\n\t},\n\n\ttimers: [],\n\n\tfx: function( elem, options, prop ) {\n\t\tthis.options = options;\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\n\t\tif ( !options.orig ) {\n\t\t\toptions.orig = {};\n\t\t}\n\t}\n\n});\n\njQuery.fx.prototype = {\n\t// Simple function for setting a style value\n\tupdate: function() {\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\t(jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );\n\t},\n\n\t// Get the current size\n\tcur: function() {\n\t\tif ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {\n\t\t\treturn this.elem[ this.prop ];\n\t\t}\n\n\t\tvar parsed,\n\t\t\tr = jQuery.css( this.elem, this.prop );\n\t\t// Empty strings, null, undefined and \"auto\" are converted to 0,\n\t\t// complex values such as \"rotate(1rad)\" are returned as is,\n\t\t// simple values such as \"10px\" are parsed to Float.\n\t\treturn isNaN( parsed = parseFloat( r ) ) ? !r || r === \"auto\" ? 0 : r : parsed;\n\t},\n\n\t// Start an animation from one number to another\n\tcustom: function( from, to, unit ) {\n\t\tvar self = this,\n\t\t\tfx = jQuery.fx;\n\n\t\tthis.startTime = jQuery.now();\n\t\tthis.start = from;\n\t\tthis.end = to;\n\t\tthis.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? \"\" : \"px\" );\n\t\tthis.now = this.start;\n\t\tthis.pos = this.state = 0;\n\n\t\tfunction t( gotoEnd ) {\n\t\t\treturn self.step(gotoEnd);\n\t\t}\n\n\t\tt.elem = this.elem;\n\n\t\tif ( t() && jQuery.timers.push(t) && !timerId ) {\n\t\t\ttimerId = setInterval(fx.tick, fx.interval);\n\t\t}\n\t},\n\n\t// Simple 'show' function\n\tshow: function() {\n\t\t// Remember where we started, so that we can go back to it later\n\t\tthis.options.orig[this.prop] = jQuery.style( this.elem, this.prop );\n\t\tthis.options.show = true;\n\n\t\t// Begin the animation\n\t\t// Make sure that we start at a small width/height to avoid any\n\t\t// flash of content\n\t\tthis.custom(this.prop === \"width\" || this.prop === \"height\" ? 1 : 0, this.cur());\n\n\t\t// Start by showing the element\n\t\tjQuery( this.elem ).show();\n\t},\n\n\t// Simple 'hide' function\n\thide: function() {\n\t\t// Remember where we started, so that we can go back to it later\n\t\tthis.options.orig[this.prop] = jQuery.style( this.elem, this.prop );\n\t\tthis.options.hide = true;\n\n\t\t// Begin the animation\n\t\tthis.custom(this.cur(), 0);\n\t},\n\n\t// Each step of an animation\n\tstep: function( gotoEnd ) {\n\t\tvar t = jQuery.now(), done = true;\n\n\t\tif ( gotoEnd || t >= this.options.duration + this.startTime ) {\n\t\t\tthis.now = this.end;\n\t\t\tthis.pos = this.state = 1;\n\t\t\tthis.update();\n\n\t\t\tthis.options.curAnim[ this.prop ] = true;\n\n\t\t\tfor ( var i in this.options.curAnim ) {\n\t\t\t\tif ( this.options.curAnim[i] !== true ) {\n\t\t\t\t\tdone = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( done ) {\n\t\t\t\t// Reset the overflow\n\t\t\t\tif ( this.options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {\n\t\t\t\t\tvar elem = this.elem,\n\t\t\t\t\t\toptions = this.options;\n\n\t\t\t\t\tjQuery.each( [ \"\", \"X\", \"Y\" ], function (index, value) {\n\t\t\t\t\t\telem.style[ \"overflow\" + value ] = options.overflow[index];\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\t// Hide the element if the \"hide\" operation was done\n\t\t\t\tif ( this.options.hide ) {\n\t\t\t\t\tjQuery(this.elem).hide();\n\t\t\t\t}\n\n\t\t\t\t// Reset the properties, if the item has been hidden or shown\n\t\t\t\tif ( this.options.hide || this.options.show ) {\n\t\t\t\t\tfor ( var p in this.options.curAnim ) {\n\t\t\t\t\t\tjQuery.style( this.elem, p, this.options.orig[p] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Execute the complete function\n\t\t\t\tthis.options.complete.call( this.elem );\n\t\t\t}\n\n\t\t\treturn false;\n\n\t\t} else {\n\t\t\tvar n = t - this.startTime;\n\t\t\tthis.state = n / this.options.duration;\n\n\t\t\t// Perform the easing function, defaults to swing\n\t\t\tvar specialEasing = this.options.specialEasing && this.options.specialEasing[this.prop];\n\t\t\tvar defaultEasing = this.options.easing || (jQuery.easing.swing ? \"swing\" : \"linear\");\n\t\t\tthis.pos = jQuery.easing[specialEasing || defaultEasing](this.state, n, 0, 1, this.options.duration);\n\t\t\tthis.now = this.start + ((this.end - this.start) * this.pos);\n\n\t\t\t// Perform the next step of the animation\n\t\t\tthis.update();\n\t\t}\n\n\t\treturn true;\n\t}\n};\n\njQuery.extend( jQuery.fx, {\n\ttick: function() {\n\t\tvar timers = jQuery.timers;\n\n\t\tfor ( var i = 0; i < timers.length; i++ ) {\n\t\t\tif ( !timers[i]() ) {\n\t\t\t\ttimers.splice(i--, 1);\n\t\t\t}\n\t\t}\n\n\t\tif ( !timers.length ) {\n\t\t\tjQuery.fx.stop();\n\t\t}\n\t},\n\n\tinterval: 13,\n\n\tstop: function() {\n\t\tclearInterval( timerId );\n\t\ttimerId = null;\n\t},\n\n\tspeeds: {\n\t\tslow: 600,\n\t\tfast: 200,\n\t\t// Default speed\n\t\t_default: 400\n\t},\n\n\tstep: {\n\t\topacity: function( fx ) {\n\t\t\tjQuery.style( fx.elem, \"opacity\", fx.now );\n\t\t},\n\n\t\t_default: function( fx ) {\n\t\t\tif ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {\n\t\t\t\tfx.elem.style[ fx.prop ] = (fx.prop === \"width\" || fx.prop === \"height\" ? Math.max(0, fx.now) : fx.now) + fx.unit;\n\t\t\t} else {\n\t\t\t\tfx.elem[ fx.prop ] = fx.now;\n\t\t\t}\n\t\t}\n\t}\n});\n\nif ( jQuery.expr && jQuery.expr.filters ) {\n\tjQuery.expr.filters.animated = function( elem ) {\n\t\treturn jQuery.grep(jQuery.timers, function( fn ) {\n\t\t\treturn elem === fn.elem;\n\t\t}).length;\n\t};\n}\n\nfunction defaultDisplay( nodeName ) {\n\tif ( !elemdisplay[ nodeName ] ) {\n\t\tvar elem = jQuery(\"<\" + nodeName + \">\").appendTo(\"body\"),\n\t\t\tdisplay = elem.css(\"display\");\n\n\t\telem.remove();\n\n\t\tif ( display === \"none\" || display === \"\" ) {\n\t\t\tdisplay = \"block\";\n\t\t}\n\n\t\telemdisplay[ nodeName ] = display;\n\t}\n\n\treturn elemdisplay[ nodeName ];\n}\n\n\n\n\nvar rtable = /^t(?:able|d|h)$/i,\n\trroot = /^(?:body|html)$/i;\n\nif ( \"getBoundingClientRect\" in document.documentElement ) {\n\tjQuery.fn.offset = function( options ) {\n\t\tvar elem = this[0], box;\n\n\t\tif ( options ) {\n\t\t\treturn this.each(function( i ) {\n\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t});\n\t\t}\n\n\t\tif ( !elem || !elem.ownerDocument ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( elem === elem.ownerDocument.body ) {\n\t\t\treturn jQuery.offset.bodyOffset( elem );\n\t\t}\n\n\t\ttry {\n\t\t\tbox = elem.getBoundingClientRect();\n\t\t} catch(e) {}\n\n\t\tvar doc = elem.ownerDocument,\n\t\t\tdocElem = doc.documentElement;\n\n\t\t// Make sure we're not dealing with a disconnected DOM node\n\t\tif ( !box || !jQuery.contains( docElem, elem ) ) {\n\t\t\treturn box ? { top: box.top, left: box.left } : { top: 0, left: 0 };\n\t\t}\n\n\t\tvar body = doc.body,\n\t\t\twin = getWindow(doc),\n\t\t\tclientTop  = docElem.clientTop  || body.clientTop  || 0,\n\t\t\tclientLeft = docElem.clientLeft || body.clientLeft || 0,\n\t\t\tscrollTop  = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop  || body.scrollTop,\n\t\t\tscrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft,\n\t\t\ttop  = box.top  + scrollTop  - clientTop,\n\t\t\tleft = box.left + scrollLeft - clientLeft;\n\n\t\treturn { top: top, left: left };\n\t};\n\n} else {\n\tjQuery.fn.offset = function( options ) {\n\t\tvar elem = this[0];\n\n\t\tif ( options ) {\n\t\t\treturn this.each(function( i ) {\n\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t});\n\t\t}\n\n\t\tif ( !elem || !elem.ownerDocument ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( elem === elem.ownerDocument.body ) {\n\t\t\treturn jQuery.offset.bodyOffset( elem );\n\t\t}\n\n\t\tjQuery.offset.initialize();\n\n\t\tvar computedStyle,\n\t\t\toffsetParent = elem.offsetParent,\n\t\t\tprevOffsetParent = elem,\n\t\t\tdoc = elem.ownerDocument,\n\t\t\tdocElem = doc.documentElement,\n\t\t\tbody = doc.body,\n\t\t\tdefaultView = doc.defaultView,\n\t\t\tprevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,\n\t\t\ttop = elem.offsetTop,\n\t\t\tleft = elem.offsetLeft;\n\n\t\twhile ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {\n\t\t\tif ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === \"fixed\" ) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcomputedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;\n\t\t\ttop  -= elem.scrollTop;\n\t\t\tleft -= elem.scrollLeft;\n\n\t\t\tif ( elem === offsetParent ) {\n\t\t\t\ttop  += elem.offsetTop;\n\t\t\t\tleft += elem.offsetLeft;\n\n\t\t\t\tif ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {\n\t\t\t\t\ttop  += parseFloat( computedStyle.borderTopWidth  ) || 0;\n\t\t\t\t\tleft += parseFloat( computedStyle.borderLeftWidth ) || 0;\n\t\t\t\t}\n\n\t\t\t\tprevOffsetParent = offsetParent;\n\t\t\t\toffsetParent = elem.offsetParent;\n\t\t\t}\n\n\t\t\tif ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== \"visible\" ) {\n\t\t\t\ttop  += parseFloat( computedStyle.borderTopWidth  ) || 0;\n\t\t\t\tleft += parseFloat( computedStyle.borderLeftWidth ) || 0;\n\t\t\t}\n\n\t\t\tprevComputedStyle = computedStyle;\n\t\t}\n\n\t\tif ( prevComputedStyle.position === \"relative\" || prevComputedStyle.position === \"static\" ) {\n\t\t\ttop  += body.offsetTop;\n\t\t\tleft += body.offsetLeft;\n\t\t}\n\n\t\tif ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === \"fixed\" ) {\n\t\t\ttop  += Math.max( docElem.scrollTop, body.scrollTop );\n\t\t\tleft += Math.max( docElem.scrollLeft, body.scrollLeft );\n\t\t}\n\n\t\treturn { top: top, left: left };\n\t};\n}\n\njQuery.offset = {\n\tinitialize: function() {\n\t\tvar body = document.body, container = document.createElement(\"div\"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.css(body, \"marginTop\") ) || 0,\n\t\t\thtml = \"<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>\";\n\n\t\tjQuery.extend( container.style, { position: \"absolute\", top: 0, left: 0, margin: 0, border: 0, width: \"1px\", height: \"1px\", visibility: \"hidden\" } );\n\n\t\tcontainer.innerHTML = html;\n\t\tbody.insertBefore( container, body.firstChild );\n\t\tinnerDiv = container.firstChild;\n\t\tcheckDiv = innerDiv.firstChild;\n\t\ttd = innerDiv.nextSibling.firstChild.firstChild;\n\n\t\tthis.doesNotAddBorder = (checkDiv.offsetTop !== 5);\n\t\tthis.doesAddBorderForTableAndCells = (td.offsetTop === 5);\n\n\t\tcheckDiv.style.position = \"fixed\";\n\t\tcheckDiv.style.top = \"20px\";\n\n\t\t// safari subtracts parent border width here which is 5px\n\t\tthis.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15);\n\t\tcheckDiv.style.position = checkDiv.style.top = \"\";\n\n\t\tinnerDiv.style.overflow = \"hidden\";\n\t\tinnerDiv.style.position = \"relative\";\n\n\t\tthis.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);\n\n\t\tthis.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);\n\n\t\tbody.removeChild( container );\n\t\tjQuery.offset.initialize = jQuery.noop;\n\t},\n\n\tbodyOffset: function( body ) {\n\t\tvar top = body.offsetTop,\n\t\t\tleft = body.offsetLeft;\n\n\t\tjQuery.offset.initialize();\n\n\t\tif ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) {\n\t\t\ttop  += parseFloat( jQuery.css(body, \"marginTop\") ) || 0;\n\t\t\tleft += parseFloat( jQuery.css(body, \"marginLeft\") ) || 0;\n\t\t}\n\n\t\treturn { top: top, left: left };\n\t},\n\n\tsetOffset: function( elem, options, i ) {\n\t\tvar position = jQuery.css( elem, \"position\" );\n\n\t\t// set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tvar curElem = jQuery( elem ),\n\t\t\tcurOffset = curElem.offset(),\n\t\t\tcurCSSTop = jQuery.css( elem, \"top\" ),\n\t\t\tcurCSSLeft = jQuery.css( elem, \"left\" ),\n\t\t\tcalculatePosition = (position === \"absolute\" || position === \"fixed\") && jQuery.inArray('auto', [curCSSTop, curCSSLeft]) > -1,\n\t\t\tprops = {}, curPosition = {}, curTop, curLeft;\n\n\t\t// need to be able to calculate position if either top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t}\n\n\t\tcurTop  = calculatePosition ? curPosition.top  : parseInt( curCSSTop,  10 ) || 0;\n\t\tcurLeft = calculatePosition ? curPosition.left : parseInt( curCSSLeft, 10 ) || 0;\n\n\t\tif ( jQuery.isFunction( options ) ) {\n\t\t\toptions = options.call( elem, i, curOffset );\n\t\t}\n\n\t\tif (options.top != null) {\n\t\t\tprops.top = (options.top - curOffset.top) + curTop;\n\t\t}\n\t\tif (options.left != null) {\n\t\t\tprops.left = (options.left - curOffset.left) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\n\njQuery.fn.extend({\n\tposition: function() {\n\t\tif ( !this[0] ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tvar elem = this[0],\n\n\t\t// Get *real* offsetParent\n\t\toffsetParent = this.offsetParent(),\n\n\t\t// Get correct offsets\n\t\toffset       = this.offset(),\n\t\tparentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();\n\n\t\t// Subtract element margins\n\t\t// note: when an element has margin: auto the offsetLeft and marginLeft\n\t\t// are the same in Safari causing offset.left to incorrectly be 0\n\t\toffset.top  -= parseFloat( jQuery.css(elem, \"marginTop\") ) || 0;\n\t\toffset.left -= parseFloat( jQuery.css(elem, \"marginLeft\") ) || 0;\n\n\t\t// Add offsetParent borders\n\t\tparentOffset.top  += parseFloat( jQuery.css(offsetParent[0], \"borderTopWidth\") ) || 0;\n\t\tparentOffset.left += parseFloat( jQuery.css(offsetParent[0], \"borderLeftWidth\") ) || 0;\n\n\t\t// Subtract the two offsets\n\t\treturn {\n\t\t\ttop:  offset.top  - parentOffset.top,\n\t\t\tleft: offset.left - parentOffset.left\n\t\t};\n\t},\n\n\toffsetParent: function() {\n\t\treturn this.map(function() {\n\t\t\tvar offsetParent = this.offsetParent || document.body;\n\t\t\twhile ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, \"position\") === \"static\") ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\t\t\treturn offsetParent;\n\t\t});\n\t}\n});\n\n\n// Create scrollLeft and scrollTop methods\njQuery.each( [\"Left\", \"Top\"], function( i, name ) {\n\tvar method = \"scroll\" + name;\n\n\tjQuery.fn[ method ] = function(val) {\n\t\tvar elem = this[0], win;\n\n\t\tif ( !elem ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( val !== undefined ) {\n\t\t\t// Set the scroll offset\n\t\t\treturn this.each(function() {\n\t\t\t\twin = getWindow( this );\n\n\t\t\t\tif ( win ) {\n\t\t\t\t\twin.scrollTo(\n\t\t\t\t\t\t!i ? val : jQuery(win).scrollLeft(),\n\t\t\t\t\t\ti ? val : jQuery(win).scrollTop()\n\t\t\t\t\t);\n\n\t\t\t\t} else {\n\t\t\t\t\tthis[ method ] = val;\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\twin = getWindow( elem );\n\n\t\t\t// Return the scroll offset\n\t\t\treturn win ? (\"pageXOffset\" in win) ? win[ i ? \"pageYOffset\" : \"pageXOffset\" ] :\n\t\t\t\tjQuery.support.boxModel && win.document.documentElement[ method ] ||\n\t\t\t\t\twin.document.body[ method ] :\n\t\t\t\telem[ method ];\n\t\t}\n\t};\n});\n\nfunction getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ?\n\t\telem :\n\t\telem.nodeType === 9 ?\n\t\t\telem.defaultView || elem.parentWindow :\n\t\t\tfalse;\n}\n\n\n\n\n// Create innerHeight, innerWidth, outerHeight and outerWidth methods\njQuery.each([ \"Height\", \"Width\" ], function( i, name ) {\n\n\tvar type = name.toLowerCase();\n\n\t// innerHeight and innerWidth\n\tjQuery.fn[\"inner\" + name] = function() {\n\t\treturn this[0] ?\n\t\t\tparseFloat( jQuery.css( this[0], type, \"padding\" ) ) :\n\t\t\tnull;\n\t};\n\n\t// outerHeight and outerWidth\n\tjQuery.fn[\"outer\" + name] = function( margin ) {\n\t\treturn this[0] ?\n\t\t\tparseFloat( jQuery.css( this[0], type, margin ? \"margin\" : \"border\" ) ) :\n\t\t\tnull;\n\t};\n\n\tjQuery.fn[ type ] = function( size ) {\n\t\t// Get window width or height\n\t\tvar elem = this[0];\n\t\tif ( !elem ) {\n\t\t\treturn size == null ? null : this;\n\t\t}\n\n\t\tif ( jQuery.isFunction( size ) ) {\n\t\t\treturn this.each(function( i ) {\n\t\t\t\tvar self = jQuery( this );\n\t\t\t\tself[ type ]( size.call( this, i, self[ type ]() ) );\n\t\t\t});\n\t\t}\n\n\t\tif ( jQuery.isWindow( elem ) ) {\n\t\t\t// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode\n\t\t\t// 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat\n\t\t\tvar docElemProp = elem.document.documentElement[ \"client\" + name ];\n\t\t\treturn elem.document.compatMode === \"CSS1Compat\" && docElemProp ||\n\t\t\t\telem.document.body[ \"client\" + name ] || docElemProp;\n\n\t\t// Get document width or height\n\t\t} else if ( elem.nodeType === 9 ) {\n\t\t\t// Either scroll[Width/Height] or offset[Width/Height], whichever is greater\n\t\t\treturn Math.max(\n\t\t\t\telem.documentElement[\"client\" + name],\n\t\t\t\telem.body[\"scroll\" + name], elem.documentElement[\"scroll\" + name],\n\t\t\t\telem.body[\"offset\" + name], elem.documentElement[\"offset\" + name]\n\t\t\t);\n\n\t\t// Get or set width or height on the element\n\t\t} else if ( size === undefined ) {\n\t\t\tvar orig = jQuery.css( elem, type ),\n\t\t\t\tret = parseFloat( orig );\n\n\t\t\treturn jQuery.isNaN( ret ) ? orig : ret;\n\n\t\t// Set the width or height on the element (default to pixels if value is unitless)\n\t\t} else {\n\t\t\treturn this.css( type, typeof size === \"string\" ? size : size + \"px\" );\n\t\t}\n\t};\n\n});\n\n\nwindow.jQuery = window.$ = jQuery;\n})(window);\n"
  },
  {
    "path": "legacy/assets/shBrushJScript.js",
    "content": "/**\n * SyntaxHighlighter\n * http://alexgorbatchev.com/\n *\n * SyntaxHighlighter is donationware. If you are using it, please donate.\n * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate\n *\n * @version\n * 2.1.382 (June 24 2010)\n * \n * @copyright\n * Copyright (C) 2004-2009 Alex Gorbatchev.\n *\n * @license\n * This file is part of SyntaxHighlighter.\n * \n * SyntaxHighlighter is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n * \n * SyntaxHighlighter 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\n * GNU General Public License for more details.\n * \n * You should have received a copy of the GNU General Public License\n * along with SyntaxHighlighter.  If not, see <http://www.gnu.org/copyleft/lesser.html>.\n */\nSyntaxHighlighter.brushes.JScript = function()\n{\n\tvar keywords =\t'break case catch continue ' +\n\t\t\t\t\t'default delete do else false  ' +\n\t\t\t\t\t'for function if in instanceof ' +\n\t\t\t\t\t'new null return super switch ' +\n\t\t\t\t\t'this throw true try typeof var while with'\n\t\t\t\t\t;\n\n\tthis.regexList = [\n\t\t{ regex: SyntaxHighlighter.regexLib.singleLineCComments,\tcss: 'comments' },\t\t\t// one line comments\n\t\t{ regex: SyntaxHighlighter.regexLib.multiLineCComments,\t\tcss: 'comments' },\t\t\t// multiline comments\n\t\t{ regex: SyntaxHighlighter.regexLib.doubleQuotedString,\t\tcss: 'string' },\t\t\t// double quoted strings\n\t\t{ regex: SyntaxHighlighter.regexLib.singleQuotedString,\t\tcss: 'string' },\t\t\t// single quoted strings\n\t\t{ regex: /\\s*#.*/gm,\t\t\t\t\t\t\t\t\t\tcss: 'preprocessor' },\t\t// preprocessor tags like #region and #endregion\n\t\t{ regex: new RegExp(this.getKeywords(keywords), 'gm'),\t\tcss: 'keyword' }\t\t\t// keywords\n\t\t];\n\t\n\tthis.forHtmlScript(SyntaxHighlighter.regexLib.scriptScriptTags);\n};\n\nSyntaxHighlighter.brushes.JScript.prototype\t= new SyntaxHighlighter.Highlighter();\nSyntaxHighlighter.brushes.JScript.aliases\t= ['js', 'jscript', 'javascript'];"
  },
  {
    "path": "legacy/assets/shCore.css",
    "content": "/**\n * SyntaxHighlighter\n * http://alexgorbatchev.com/\n *\n * SyntaxHighlighter is donationware. If you are using it, please donate.\n * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate\n *\n * @version\n * 2.1.382 (June 24 2010)\n * \n * @copyright\n * Copyright (C) 2004-2009 Alex Gorbatchev.\n *\n * @license\n * This file is part of SyntaxHighlighter.\n * \n * SyntaxHighlighter is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n * \n * SyntaxHighlighter 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\n * GNU General Public License for more details.\n * \n * You should have received a copy of the GNU General Public License\n * along with SyntaxHighlighter.  If not, see <http://www.gnu.org/copyleft/lesser.html>.\n */\n.syntaxhighlighter,\n.syntaxhighlighter div,\n.syntaxhighlighter code,\n.syntaxhighlighter table,\n.syntaxhighlighter table td,\n.syntaxhighlighter table tr,\n.syntaxhighlighter table tbody\n{\n\tmargin: 0 !important;\n\tpadding: 0 !important;\n\tborder: 0 !important;\n\toutline: 0 !important;\n\tbackground: none !important;\n\ttext-align: left !important;\n\tfloat: none !important;\n\tvertical-align: baseline !important;\n\tposition: static !important;\n\tleft: auto !important;\n\ttop: auto !important;\n\tright: auto !important;\n\tbottom: auto !important;\n\theight: auto !important;\n\twidth: auto !important;\n\tline-height: 1.1em !important;\n\tfont-family: \"Consolas\", \"Bitstream Vera Sans Mono\", \"Courier New\", Courier, monospace !important;\n\tfont-weight: normal !important;\n\tfont-style: normal !important;\n\tfont-size: 1em !important;\n\tmin-height: inherit !important; /* For IE8, FF & WebKit */\n\tmin-height: auto !important; /* For IE7 */\n}\n\n.syntaxhighlighter\n{\n\twidth: 99% !important; /* 99% fixes IE8 horizontal scrollbar */\n\tmargin: 1em 0 1em 0 !important;\n\tpadding: 1px !important; /* adds a little border on top and bottom */\n\tposition: relative !important;\n}\n\n.syntaxhighlighter .bold \n{\n\tfont-weight: bold !important;\n}\n\n.syntaxhighlighter .italic \n{\n\tfont-style: italic !important;\n}\n\n.syntaxhighlighter .line\n{\n}\n\n.syntaxhighlighter .no-wrap .line .content\n{\n\twhite-space: pre !important;\n}\n\n.syntaxhighlighter .line table \n{\n\tborder-collapse: collapse !important;\n}\n\n.syntaxhighlighter .line td\n{\n\tvertical-align: top !important;\n}\n\n.syntaxhighlighter .line .number\n{\n\twidth: 3em !important;\n}\n\n.syntaxhighlighter .line .number code\n{\n\twidth: 2.7em !important;\n\tpadding-right: .3em !important;\n\ttext-align: right !important;\n\tdisplay: block !important;\n}\n\n.syntaxhighlighter .line .content\n{\n\tpadding-left: .5em !important;\n}\n\n.syntaxhighlighter .line .spaces\n{\n}\n\n/* Disable border and margin on the lines when no gutter option is set */\n.syntaxhighlighter.nogutter .line .content\n{\n\tborder-left: none !important;\n}\n\n.syntaxhighlighter .bar\n{\n\tdisplay: none !important;\n}\n\n.syntaxhighlighter .bar.show \n{\n\tdisplay: block !important;\n}\n\n.syntaxhighlighter.collapsed .bar\n{\n\tdisplay: block !important;\n}\n\n/* Adjust some properties when collapsed */\n\n.syntaxhighlighter.collapsed .lines\n{\n\tdisplay: none !important;\n}\n\n.syntaxhighlighter .lines.no-wrap\n{\n\toverflow: auto !important;\n\toverflow-y: hidden !important;\n}\n\n/* Styles for the toolbar */\n\n.syntaxhighlighter .toolbar\n{\n\tposition: absolute !important;\n\tright: 0px !important;\n\ttop: 0px !important;\n\tfont-size: 1px !important;\n\tpadding: 8px 8px 8px 0 !important; /* in px because images don't scale with ems */\n}\n\n.syntaxhighlighter.collapsed .toolbar\n{\n\tfont-size: 80% !important;\n\tpadding: .2em 0 .5em .5em !important;\n\tposition: static !important;\n}\n\n.syntaxhighlighter .toolbar a.item,\n.syntaxhighlighter .toolbar .item\n{\n\tdisplay: block !important;\n\tfloat: left !important;\n\tmargin-left: 8px !important;\n\tbackground-repeat: no-repeat !important;\n\toverflow: hidden !important;\n\ttext-indent: -5000px !important;\n}\n\n.syntaxhighlighter.collapsed .toolbar .item\n{\n\tdisplay: none !important;\n}\n\n.syntaxhighlighter.collapsed .toolbar .item.expandSource\n{\n\tbackground-image: url(magnifier.png) !important;\n\tdisplay: inline !important;\n\ttext-indent: 0 !important;\n\twidth: auto !important;\n\tfloat: none !important;\n\theight: 16px !important;\n\tpadding-left: 20px !important;\n}\n\n.syntaxhighlighter .toolbar .item.viewSource\n{\n\tbackground-image: url(page_white_code.png) !important;\n}\n\n.syntaxhighlighter .toolbar .item.printSource\n{\n\tbackground-image: url(printer.png) !important;\n}\n\n.syntaxhighlighter .toolbar .item.copyToClipboard\n{\n\ttext-indent: 0 !important;\n\tbackground: none !important;\n\toverflow: visible !important;\n}\n\n.syntaxhighlighter .toolbar .item.about\n{\n\tbackground-image: url(help.png) !important;\n}\n\n/** \n * Print view.\n * Colors are based on the default theme without background.\n */\n\n.syntaxhighlighter.printing,\n.syntaxhighlighter.printing .line.alt1 .content,\n.syntaxhighlighter.printing .line.alt2 .content,\n.syntaxhighlighter.printing .line.highlighted .number,\n.syntaxhighlighter.printing .line.highlighted.alt1 .content,\n.syntaxhighlighter.printing .line.highlighted.alt2 .content,\n{\n\tbackground: none !important;\n}\n\n/* Gutter line numbers */\n.syntaxhighlighter.printing .line .number\n{\n\tcolor: #bbb !important;\n}\n\n/* Add border to the lines */\n.syntaxhighlighter.printing .line .content\n{\n\tcolor: #000 !important;\n}\n\n/* Toolbar when visible */\n.syntaxhighlighter.printing .toolbar\n{\n\tdisplay: none !important;\n}\n\n.syntaxhighlighter.printing a\n{\n\ttext-decoration: none !important;\n}\n\n.syntaxhighlighter.printing .plain,\n.syntaxhighlighter.printing .plain a\n{ \n\tcolor: #000 !important;\n}\n\n.syntaxhighlighter.printing .comments,\n.syntaxhighlighter.printing .comments a\n{ \n\tcolor: #008200 !important;\n}\n\n.syntaxhighlighter.printing .string,\n.syntaxhighlighter.printing .string a\n{\n\tcolor: blue !important; \n}\n\n.syntaxhighlighter.printing .keyword\n{ \n\tcolor: #069 !important; \n\tfont-weight: bold !important; \n}\n\n.syntaxhighlighter.printing .preprocessor \n{ \n\tcolor: gray !important; \n}\n\n.syntaxhighlighter.printing .variable \n{ \n\tcolor: #a70 !important; \n}\n\n.syntaxhighlighter.printing .value\n{ \n\tcolor: #090 !important; \n}\n\n.syntaxhighlighter.printing .functions\n{ \n\tcolor: #ff1493 !important; \n}\n\n.syntaxhighlighter.printing .constants\n{ \n\tcolor: #0066CC !important; \n}\n\n.syntaxhighlighter.printing .script\n{\n\tfont-weight: bold !important;\n}\n\n.syntaxhighlighter.printing .color1,\n.syntaxhighlighter.printing .color1 a\n{ \n\tcolor: #808080 !important; \n}\n\n.syntaxhighlighter.printing .color2,\n.syntaxhighlighter.printing .color2 a\n{ \n\tcolor: #ff1493 !important; \n}\n\n.syntaxhighlighter.printing .color3,\n.syntaxhighlighter.printing .color3 a\n{ \n\tcolor: red !important; \n}"
  },
  {
    "path": "legacy/assets/shCore.js",
    "content": "/**\n * SyntaxHighlighter\n * http://alexgorbatchev.com/\n *\n * SyntaxHighlighter is donationware. If you are using it, please donate.\n * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate\n *\n * @version\n * 2.1.382 (June 24 2010)\n * \n * @copyright\n * Copyright (C) 2004-2009 Alex Gorbatchev.\n *\n * @license\n * This file is part of SyntaxHighlighter.\n * \n * SyntaxHighlighter is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n * \n * SyntaxHighlighter 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\n * GNU General Public License for more details.\n * \n * You should have received a copy of the GNU General Public License\n * along with SyntaxHighlighter.  If not, see <http://www.gnu.org/copyleft/lesser.html>.\n */\neval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c])}}return p}('c(!1k.2G){h 2G=l(){h p={6b:{\"1o-U\":\"\",\"84-2d\":1,\"83-2d-82\":I,\"1M\":v,\"8z-8H\":I,\"1H-2L\":4,\"3j\":I,\"1y\":I,\"67\":N,\"8B-8o\":I,\"7X\":N,\"5h-1n\":I,\"1F-1m\":N},M:{4Q:I,6f:v,5o:16,5k:16,8s:N,8G:N,89:\"58\",1g:{5p:\"54 1j\",5b:\"9O 1j\",5j:\"9P 6k 6q\",76:\"9N C 9M 26 9J 6q 9K\",3o:\"3o\",6F:\"?\",1x:\"2G\\\\n\\\\n\",6M:\"9L\\'t 9Q 2V D: \",86:\"9R 9W\\'t 9X D 1F-1m 9V: \",78:\"<!9U 1F 9S \\\\\"-//9T//6j 9I 1.0 9H//9w\\\\\" \\\\\"2o://5x.6J.6u/9x/6H/6j/6H-9v.9u\\\\\"><1F 9r=\\\\\"2o://5x.6J.6u/9y/9z\\\\\"><6y><9F 2o-9G=\\\\\"9E-9D\\\\\" 60=\\\\\"1X/1F; 9A=9B-8\\\\\" /><39>9C 2G</39></6y><2Z 1t=\\\\\"3H-9Z:an,ao,am,al-ai;aj-43:#ak;43:#ap;3H-2L:aq;1X-6z:6A;\\\\\"><B 1t=\\\\\"1X-6z:6A;6x-4G:au;\\\\\"><B 1t=\\\\\"3H-2L:at-ar;\\\\\">2G</B><B 1t=\\\\\"3H-2L:.ah;6x-9q:ag;\\\\\"><B>6O 2.1.a5 (a6 24 a4)</B><B><a 1Q=\\\\\"2o://6G.3x\\\\\" a3=\\\\\"44\\\\\" 1t=\\\\\"43:#6E;1X-6t:6r;\\\\\">2o://6G.3x</a></B><B>a1 a2 a7 f 1m, a8 <a 1Q=\\\\\"ae://5x.af.3x/ad-ac/a9?aa=ab-ax&8Z=8Q\\\\\" 1t=\\\\\"43:#6E;1X-6t:6r;\\\\\">8P</a> 6k 8N 8R 8S!</B></B><B>8W C 8V 8U.</B><B>8X 8J-8K 8O 9h.</B></B></2Z></1F>\"},8C:N},1q:{4U:v,9g:v,3D:v,6g:{}},2n:{},8l:{9f:/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//3v,9d:/\\\\/\\\\/.*$/3v,9e:/#.*$/3v,9j:/\"([^\\\\\\\\\"\\\\n]|\\\\\\\\.)*\"/g,9o:/\\'([^\\\\\\\\\\'\\\\n]|\\\\\\\\.)*\\'/g,8Y:/\"([^\\\\\\\\\"]|\\\\\\\\.)*\"/g,9m:/\\'([^\\\\\\\\\\']|\\\\\\\\.)*\\'/g,9k:/(&X;|<)!--[\\\\s\\\\S]*?--(&Y;|>)/3v,3Q:/&X;\\\\w+:\\\\/\\\\/[\\\\w-.\\\\/?%&=@:;]*&Y;|\\\\w+:\\\\/\\\\/[\\\\w-.\\\\/?%&=@:;]*/g,9c:{F:/(&X;|<)\\\\?=?/g,19:/\\\\?(&Y;|>)/g},92:{F:/(&X;|<)%=?/g,19:/%(&Y;|>)/g},91:{F:/(&X;|<)\\\\s*1m.*?(&Y;|>)/4v,19:/(&X;|<)\\\\/\\\\s*1m\\\\s*(&Y;|>)/4v}},1y:{18:l(3f){h 3C=Q.1N(\"3c\"),5s=p.1y.7d;3C.L=\"1y\";D(h 35 26 5s){h 6h=5s[35],5r=W 6h(3f),1U=5r.18();3f.6a[35]=5r;c(1U==v){1J}c(7I(1U)==\"90\"){1U=p.1y.6l(1U,3f.1h,35)}1U.L+=\"5v \"+35;3C.2u(1U)}q 3C},6l:l(5K,6m,5D){h a=Q.1N(\"a\"),5M=a.1t,5u=p.M,5L=5u.5o,5N=5u.5k;a.1Q=\"#\"+5D;a.39=5K;a.5g=6m;a.75=5D;a.27=5K;c(38(5L)==N){5M.1W=5L+\"73\"}c(38(5N)==N){5M.2s=5N+\"73\"}a.96=l(e){9n{p.1y.7a(f,e||1k.6V,f.5g,f.75)}97(e){p.A.1x(e.77)}q N};q a},7a:l(7f,7e,7b,7h,7c){h 5G=p.1q.6g[7b],5H;c(5G==v||(5H=5G.6a[7h])==v){q v}q 5H.2B(7f,7e,7c)},7d:{5p:l(59){f.18=l(){c(59.T(\"67\")!=I){q}q p.M.1g.5p};f.2B=l(5a,8T,8M){h B=59.B;5a.8v.4u(5a);B.L=B.L.E(\"5O\",\"\")}},5b:l(71){f.18=l(){q p.M.1g.5b};f.2B=l(aV,bV,bW){h 3Y=p.A.3E(71.5f).E(/</g,\"&X;\"),2t=p.A.4M(\"\",\"44\",bU,bT,\"bR=0, bS=1, bX=0, 6s=1\");3Y=p.A.2I(3Y);2t.Q.3I(\"<58>\"+3Y+\"</58>\");2t.Q.4c()}},5j:l(65){h 3k,bY,5i=65.1h;f.18=l(){h 2Q=p.M;c(2Q.6f==v){q v}l 1I(52){h 5e=\"\";D(h 56 26 52){5e+=\"<c3 U=\\'\"+56+\"\\' 23=\\'\"+52[56]+\"\\'/>\"}q 5e};l 2q(5l){h 5n=\"\";D(h 5m 26 5l){5n+=\" \"+5m+\"=\\'\"+5l[5m]+\"\\'\"}q 5n};h 68={1W:2Q.5o,2s:2Q.5k,1h:5i+\"c0\",4j:\"bQ/x-6Z-6U\",39:p.M.1g.5j},5V={bP:\"ay\",bG:\"bH\",bF:\"5g=\"+5i,bD:\"N\"},5W=2Q.6f,3O;c(/bI/i.1R(7j.6B)){3O=\"<4d\"+2q({bJ:\"bO:bN-bM-bK-bL-c4\",cl:\"2o://cj.c7.3x/ce/6Z/ck/6U/c9.ci#6O=9,0,0,0\"})+2q(68)+\">\"+1I(5V)+1I({c8:5W})+\"</4d>\"}G{3O=\"<c6\"+2q(68)+2q(5V)+2q({cf:5W})+\"/>\"}3k=Q.1N(\"B\");3k.27=3O;q 3k};f.2B=l(co,cn,63){h 72=63.bA;6S(72){2O\"7l\":h 64=p.A.2I(p.A.3E(65.5f).E(/&X;/g,\"<\").E(/&Y;/g,\">\").E(/&aT;/g,\"&\"));c(1k.74){1k.74.aU(\"1X\",64)}G{q p.A.2I(64)}2O\"aS\":p.A.1x(p.M.1g.76);2y;2O\"aP\":p.A.1x(63.77);2y}}},bB:l(61){f.18=l(){q p.M.1g.3o};f.2B=l(aW,b1,b2){h 29=Q.1N(\"b0\"),1G=v;c(p.1q.3D!=v){Q.2Z.4u(p.1q.3D)}p.1q.3D=29;29.1t.aX=\"aY:aO;1W:6w;2s:6w;F:-6o;4G:-6o;\";Q.2Z.2u(29);1G=29.5Z.Q;6D(1G,1k.Q);1G.3I(\"<B 1o=\\\\\"\"+61.B.L.E(\"5O\",\"\")+\" aD\\\\\">\"+61.B.27+\"</B>\");1G.4c();29.5Z.4Y();29.5Z.3o();l 6D(6I,6C){h 2E=6C.4D(\"4e\");D(h i=0;i<2E.u;i++){c(2E[i].6i.70()==\"6P\"&&/aC\\\\.1a$/.1R(2E[i].1Q)){6I.3I(\"<4e 4j=\\\\\"1X/1a\\\\\" 6i=\\\\\"6P\\\\\" 1Q=\\\\\"\"+2E[i].1Q+\"\\\\\"></4e>\")}}}}},az:l(aA){f.18=l(){q p.M.1g.6F};f.2B=l(aG,aL){h 2t=p.A.4M(\"\",\"44\",aK,aJ,\"6s=0\"),1G=2t.Q;1G.3I(p.M.1g.78);1G.4c();2t.4Y()}}}},A:{Z:l(4a,6L,3U){3U=3w.aH(3U||0,0);D(h i=3U;i<4a.u;i++){c(4a[i]==6L){q i}}q-1},6d:l(7g){q 7g+3w.aI(3w.b3()*b4).2h()},6c:l(47,46){h 3m={},28;D(28 26 47){3m[28]=47[28]}D(28 26 46){3m[28]=46[28]}q 3m},7t:l(4L){6S(4L){2O\"I\":q I;2O\"N\":q N}q 4L},4M:l(3Q,6W,4H,4O,2R){h x=(6T.1W-4H)/2,y=(6T.2s-4O)/2;2R+=\", F=\"+x+\", 4G=\"+y+\", 1W=\"+4H+\", 2s=\"+4O;2R=2R.E(/^,/,\"\");h 4V=1k.bn(3Q,6W,2R);4V.4Y();q 4V},7y:l(1E,1Y,1Z){c(1E.6X){1E[\"e\"+1Y+1Z]=1Z;1E[1Y+1Z]=l(){1E[\"e\"+1Y+1Z](1k.6V)};1E.6X(\"bt\"+1Y,1E[1Y+1Z])}G{1E.by(1Y,1Z,N)}},1x:l(z){1x(p.M.1g.1x+z)},4P:l(4h,6N){h 2w=p.1q.4U,3W=v;c(2w==v){2w={};D(h 2W 26 p.2n){h 3g=p.2n[2W].bx;c(3g==v){1J}p.2n[2W].U=2W.70();D(h i=0;i<3g.u;i++){2w[3g[i]]=2W}}p.1q.4U=2w}3W=p.2n[2w[4h]];c(3W==v&&6N!=N){p.A.1x(p.M.1g.6M+4h)}q 3W},4x:l(z,6Q){h 2C=z.1O(\"\\\\n\");D(h i=0;i<2C.u;i++){2C[i]=6Q(2C[i])}q 2C.5A(\"\\\\n\")},7A:l(z){q z.E(/^[ ]*[\\\\n]+|[\\\\n]*[ ]*$/g,\"\")},8b:l(z){h 42,4E={},4S=W V(\"^\\\\\\\\[(?<4T>(.*?))\\\\\\\\]$\"),6R=W V(\"(?<U>[\\\\\\\\w-]+)\"+\"\\\\\\\\s*:\\\\\\\\s*\"+\"(?<23>\"+\"[\\\\\\\\w-%#]+|\"+\"\\\\\\\\[.*?\\\\\\\\]|\"+\"\\\\\".*?\\\\\"|\"+\"\\'.*?\\'\"+\")\\\\\\\\s*;?\",\"g\");2r((42=6R.R(z))!=v){h 2f=42.23.E(/^[\\'\"]|[\\'\"]$/g,\"\");c(2f!=v&&4S.1R(2f)){h m=4S.R(2f);2f=m.4T.u>0?m.4T.1O(/\\\\s*,\\\\s*/):[]}4E[42.U]=2f}q 4E},7Q:l(z,1a){c(z==v||z.u==0||z==\"\\\\n\"){q z}z=z.E(/</g,\"&X;\");z=z.E(/ {2,}/g,l(m){h 4o=\"\";D(h i=0;i<m.u-1;i++){4o+=\"&2m;\"}q 4o+\" \"});c(1a!=v){z=p.A.4x(z,l(2j){c(2j.u==0){q\"\"}h 3F=\"\";2j=2j.E(/^(&2m;| )+/,l(s){3F=s;q\"\"});c(2j.u==0){q 3F}q 3F+\"<C 1o=\\\\\"\"+1a+\"\\\\\">\"+2j+\"</C>\"})}q z},81:l(79,7i){h 34=79.2h();2r(34.u<7i){34=\"0\"+34}q 34},6p:l(){h 40=Q.1N(\"B\"),3J,3i=0,4y=Q.2Z,1h=p.A.6d(\"6p\"),36=\"<B 1o=\\\\\"\",33=\"</B>\",4A=\"</4t>\";40.27=36+\"6e\\\\\">\"+36+\"1n\\\\\">\"+36+\"2d\\\\\">\"+36+\"60\"+\"\\\\\"><4t 1o=\\\\\"b7\\\\\"><4t 1h=\\\\\"\"+1h+\"\\\\\">&2m;\"+4A+4A+33+33+33+33;4y.2u(40);3J=Q.b6(1h);c(/bb/i.1R(7j.6B)){h 6v=1k.bh(3J,v);3i=80(6v.bg(\"1W\"))}G{3i=3J.bd}4y.4u(40);q 3i},8c:l(6n,6K){h 1H=\"\";D(h i=0;i<6K;i++){1H+=\" \"}q 6n.E(/\\\\t/g,1H)},8D:l(2F,4w){h be=2F.1O(\"\\\\n\"),1H=\"\\\\t\",62=\"\";D(h i=0;i<50;i++){62+=\"                    \"}l 8u(3n,17,8y){q 3n.22(0,17)+62.22(0,8y)+3n.22(17+1,3n.u)};2F=p.A.4x(2F,l(21){c(21.Z(1H)==-1){q 21}h 17=0;2r((17=21.Z(1H))!=-1){h 8r=4w-17%4w;21=8u(21,17,8r)}q 21});q 2F},3E:l(z){h br=/<br\\\\s*\\\\/?>|&X;br\\\\s*\\\\/?&Y;/4v;c(p.M.8s==I){z=z.E(br,\"\\\\n\")}c(p.M.8G==I){z=z.E(br,\"\")}q z},2J:l(z){q z.E(/^\\\\s+|\\\\s+$/g,\"\")},2I:l(z){h 2a=p.A.3E(z).1O(\"\\\\n\"),bf=W bi(),8g=/^\\\\s*/,20=bc;D(h i=0;i<2a.u&&20>0;i++){h 4z=2a[i];c(p.A.2J(4z).u==0){1J}h 4C=8g.R(4z);c(4C==v){q z}20=3w.20(4C[0].u,20)}c(20>0){D(h i=0;i<2a.u;i++){2a[i]=2a[i].22(20)}}q 2a.5A(\"\\\\n\")},7W:l(31,30){c(31.H<30.H){q-1}G{c(31.H>30.H){q 1}G{c(31.u<30.u){q-1}G{c(31.u>30.u){q 1}}}}q 0},2S:l(8i,2Y){l 8p(4B,87){q[W p.4W(4B[0],4B.H,87.1a)]};h b5=0,4s=v,3Z=[],8h=2Y.4K?2Y.4K:8p;2r((4s=2Y.3K.R(8i))!=v){3Z=3Z.2l(8h(4s,2Y))}q 3Z},8m:l(8k){h X=\"&X;\",Y=\"&Y;\";q 8k.E(p.8l.3Q,l(m){h 4k=\"\",4l=\"\";c(m.Z(X)==0){4l=X;m=m.3M(X.u)}c(m.Z(Y)==m.u-Y.u){m=m.3M(0,m.u-Y.u);4k=Y}q 4l+\"<a 1Q=\\\\\"\"+m+\"\\\\\">\"+m+\"</a>\"+4k})},8a:l(){h 3G=Q.4D(\"1m\"),4i=[];D(h i=0;i<3G.u;i++){c(3G[i].4j==\"6e\"){4i.K(3G[i])}}q 4i},8t:l(4n){h 4m=\"<![b8[\",3P=\"]]>\",1u=p.A.2J(4n),3L=N;c(1u.Z(4m)==0){1u=1u.3M(4m.u);3L=I}c(1u.Z(3P)==1u.u-3P.u){1u=1u.3M(0,1u.u-3P.u);3L=I}q 3L?1u:4n}},1M:l(8e,4p){l 8f(4r){h 4q=[];D(h i=0;i<4r.u;i++){4q.K(4r[i])}q 4q};h 2k=4p?[4p]:8f(Q.4D(p.M.89)),8q=\"27\",2v=v,4R=p.M;c(4R.4Q){2k=2k.2l(p.A.8a())}c(2k.u===0){q}D(h i=0;i<2k.u;i++){h 2T=2k[i],1T=p.A.8b(2T.L),1L,2D,1P;1T=p.A.6c(8e,1T);1L=1T[\"2V\"];c(1L==v){1J}c(1T[\"1F-1m\"]==\"I\"||p.6b[\"1F-1m\"]==I){2v=W p.4b(1L);1L=\"b9\"}G{h 3S=p.A.4P(1L);c(3S){1L=3S.U;2v=W 3S()}G{1J}}2D=2T[8q];c(4R.4Q){2D=p.A.8t(2D)}1T[\"2V-U\"]=1L;2v.1M(2D,1T);1P=2v.B;c(p.M.8C){1P=Q.1N(\"bk\");1P.23=2v.B.27;1P.1t.1W=\"bu\";1P.1t.2s=\"bw\"}2T.8v.bz(1P,2T)}},bs:l(7x){p.A.7y(1k,\"bm\",l(){p.1M(7x)})}};p.4W=l(4X,7B,1a){f.23=4X;f.H=7B;f.u=4X.u;f.1a=1a;f.5S=v};p.4W.1c.2h=l(){q f.23};p.4b=l(4F){h 3t=p.A.4P(4F),2p,4J=W p.2n.bl(),bo=v;c(3t==v){q}2p=W 3t();f.49=4J;c(2p.3N==v){p.A.1x(p.M.1g.86+4F);q}4J.5c.K({3K:2p.3N.C,4K:7E});l 3l(4N,7F){D(h j=0;j<4N.u;j++){4N[j].H+=7F}};l 7E(15,bq){h 7w=15.C,1l=[],4Z=2p.5c,7v=15.H+15.F.u,2P=2p.3N,1p;D(h i=0;i<4Z.u;i++){1p=p.A.2S(7w,4Z[i]);3l(1p,7v);1l=1l.2l(1p)}c(2P.F!=v&&15.F!=v){1p=p.A.2S(15.F,2P.F);3l(1p,15.H);1l=1l.2l(1p)}c(2P.19!=v&&15.19!=v){1p=p.A.2S(15.19,2P.19);3l(1p,15.H+15[0].bp(15.19));1l=1l.2l(1p)}D(h j=0;j<1l.u;j++){1l[j].5S=3t.U}q 1l}};p.4b.1c.1M=l(7k,7p){f.49.1M(7k,7p);f.B=f.49.B};p.7q=l(){};p.7q.1c={T:l(7u,7s){h 48=f.1I[7u];q p.A.7t(48==v?7s:48)},18:l(7H){q Q.1N(7H)},8n:l(32,7Y){h 3A=[];c(32!=v){D(h i=0;i<32.u;i++){c(7I(32[i])==\"4d\"){3A=3A.2l(p.A.2S(7Y,32[i]))}}}q 3A.aM(p.A.7W)},8F:l(){h 1V=f.2X;D(h i=0;i<1V.u;i++){c(1V[i]===v){1J}h 2z=1V[i],45=2z.H+2z.u;D(h j=i+1;j<1V.u&&1V[i]!==v;j++){h 25=1V[j];c(25===v){1J}G{c(25.H>45){2y}G{c(25.H==2z.H&&25.u>2z.u){f.2X[i]=v}G{c(25.H>=2z.H&&25.H<45){f.2X[j]=v}}}}}}},7Z:l(2U){h 3h=2U.1O(\"\\\\n\"),3X=80(f.T(\"84-2d\")),2i=f.T(\"83-2d-82\"),7U=f.T(\"1M\",[]),7M=f.T(\"3j\");2U=\"\";c(2i==I){2i=(3X+3h.u-1).2h().u}G{c(38(2i)==I){2i=0}}D(h i=0;i<3h.u;i++){h 1A=3h[i],66=/^(&2m;|\\\\s)+/.R(1A),51=\"aE\"+(i%2==0?1:2),7N=p.A.81(3X+i,2i),7T=p.A.Z(7U,(3X+i).2h())!=-1,2H=v;c(66!=v){2H=66[0].2h();1A=1A.22(2H.u)}1A=p.A.2J(1A);c(1A.u==0){1A=\"&2m;\"}c(7T){51+=\" aN\"}2U+=\"<B 1o=\\\\\"2d \"+51+\"\\\\\">\"+\"<7P>\"+\"<7R>\"+(7M?\"<3T 1o=\\\\\"aZ\\\\\"><C>\"+7N+\"</C></3T>\":\"\")+\"<3T 1o=\\\\\"60\\\\\">\"+(2H!=v?\"<C 1o=\\\\\"aQ\\\\\">\"+2H.E(\" \",\"&2m;\")+\"</C>\":\"\")+1A+\"</3T>\"+\"</7R>\"+\"</7P>\"+\"</B>\"}q 2U},88:l(69,5T){h 17=0,3p=\"\",3r=p.A.7Q,5R=f.T(\"2V-U\",\"\");l 5X(5Y){h 5Q=5Y?(5Y.5S||5R):5R;q 5Q?5Q+\" \":\"\"};D(h i=0;i<5T.u;i++){h 1v=5T[i],3y;c(1v===v||1v.u===0){1J}3y=5X(1v);3p+=3r(69.22(17,1v.H-17),3y+\"7K\")+3r(1v.23,3y+1v.1a);17=1v.H+1v.u}3p+=3r(69.22(17),5X()+\"7K\");q 3p},1M:l(C,7V){h cg=p.M,1q=p.1q,B,ca,3e,cd=\"cm\";f.1I={};f.B=v;f.1n=v;f.C=v;f.1e=v;f.6a={};f.1h=p.A.6d(\"ch\");1q.6g[f.1h]=f;c(C===v){C=\"\"}f.1I=p.A.6c(p.6b,7V||{});c(f.T(\"7X\")==I){f.1I.1y=f.1I.3j=N}f.B=B=f.18(\"3c\");f.1n=f.18(\"3c\");f.1n.L=\"1n\";L=\"6e\";B.1h=f.1h;c(f.T(\"67\")){L+=\" 5O\"}c(f.T(\"3j\")==N){L+=\" c5\"}c(f.T(\"5h-1n\")==N){f.1n.L+=\" bC-5h\"}L+=\" \"+f.T(\"1o-U\");L+=\" \"+f.T(\"2V-U\");B.L=L;f.5f=C;f.C=p.A.7A(C).E(/\\\\r/g,\" \");3e=f.T(\"1H-2L\");f.C=f.T(\"8z-8H\")==I?p.A.8D(f.C,3e):p.A.8c(f.C,3e);f.C=p.A.2I(f.C);c(f.T(\"1y\")){f.1e=f.18(\"3c\");f.1e.L=\"1e\";f.1e.2u(p.1y.18(f));B.2u(f.1e);h 1e=f.1e;l 53(){1e.L=1e.L.E(\"54\",\"\")};B.c1=l(){53();1e.L+=\" 54\"};B.c2=l(){53()}}B.2u(f.1n);f.2X=f.8n(f.5c,f.C);f.8F();C=f.88(f.C,f.2X);C=f.7Z(p.A.2J(C));c(f.T(\"8B-8o\")){C=p.A.8m(C)}f.1n.27=C},9i:l(z){z=z.E(/^\\\\s+|\\\\s+$/g,\"\").E(/\\\\s+/g,\"|\");q\"\\\\\\\\b(?:\"+z+\")\\\\\\\\b\"},9l:l(2K){f.3N={F:{3K:2K.F,1a:\"1m\"},19:{3K:2K.19,1a:\"1m\"},C:W V(\"(?<F>\"+2K.F.1j+\")\"+\"(?<C>.*?)\"+\"(?<19>\"+2K.19.1j+\")\",\"99\")}}};q p}()}c(!1k.V){(l(){h 2A={R:10.1c.R,8w:5I.1c.8w,E:5I.1c.E,1O:5I.1c.1O},1D={13:/(?:[^\\\\\\\\([#\\\\s.]+|\\\\\\\\(?!k<[\\\\w$]+>|[7z]{[^}]+})[\\\\S\\\\s]?|\\\\((?=\\\\?(?!#|<[\\\\w$]+>)))+|(\\\\()(?:\\\\?(?:(#)[^)]*\\\\)|<([$\\\\w]+)>))?|\\\\\\\\(?:k<([\\\\w$]+)>|[7z]{([^}]+)})|(\\\\[\\\\^?)|([\\\\S\\\\s])/g,98:/(?:[^$]+|\\\\$(?![1-9$&`\\']|{[$\\\\w]+}))+|\\\\$(?:([1-9]\\\\d*|[$&`\\'])|{([$\\\\w]+)})/g,3d:/^(?:\\\\s+|#.*)+/,5B:/^(?:[?*+]|{\\\\d+(?:,\\\\d*)?})/,7J:/&&\\\\[\\\\^?/g,7O:/]/g},7G=l(5C,5v,5t){D(h i=5t||0;i<5C.u;i++){c(5C[i]===5v){q i}}q-1},8I=/()??/.R(\"\")[1]!==3a,3b={};V=l(1d,1S){c(1d 5U 10){c(1S!==3a){3q 7n(\"4g\\'t 4I 9a 8A 95 7r 10 5t 94\")}q 1d.3z()}h 1S=1S||\"\",7S=1S.Z(\"s\")>-1,7L=1S.Z(\"x\")>-1,5z=N,3R=[],14=[],13=1D.13,J,cc,3V,37,3u;13.O=0;2r(J=2A.R.2e(13,1d)){c(J[2]){c(!1D.5B.1R(1d.1b(13.O))){14.K(\"(?:)\")}}G{c(J[1]){3R.K(J[3]||v);c(J[3]){5z=I}14.K(\"(\")}G{c(J[4]){37=7G(3R,J[4]);14.K(37>-1?\"\\\\\\\\\"+(37+1)+(38(1d.5w(13.O))?\"\":\"(?:)\"):J[0])}G{c(J[5]){14.K(3b.7o?3b.7o.7l(J[5],J[0].5w(1)===\"P\"):J[0])}G{c(J[6]){c(1d.5w(13.O)===\"]\"){14.K(J[6]===\"[\"?\"(?!)\":\"[\\\\\\\\S\\\\\\\\s]\");13.O++}G{cc=V.8d(\"&&\"+1d.1b(J.H),1D.7J,1D.7O,\"\",{7D:\"\\\\\\\\\"})[0];14.K(J[6]+cc+\"]\");13.O+=cc.u+1}}G{c(J[7]){c(7S&&J[7]===\".\"){14.K(\"[\\\\\\\\S\\\\\\\\s]\")}G{c(7L&&1D.3d.1R(J[7])){3V=2A.R.2e(1D.3d,1d.1b(13.O-1))[0].u;c(!1D.5B.1R(1d.1b(13.O-1+3V))){14.K(\"(?:)\")}13.O+=3V-1}G{14.K(J[7])}}}G{14.K(J[0])}}}}}}}3u=10(14.5A(\"\"),2A.E.2e(1S,/[9Y]+/g,\"\"));3u.1B={1j:1d,2g:5z?3R:v};q 3u};V.9s=l(U,o){3b[U]=o};10.1c.R=l(z){h 1f=2A.R.2e(f,z),U,i,5y;c(1f){c(8I&&1f.u>1){5y=W 10(\"^\"+f.1j+\"$(?!\\\\\\\\s)\",f.5J());2A.E.2e(1f[0],5y,l(){D(i=1;i<8j.u-2;i++){c(8j[i]===3a){1f[i]=3a}}})}c(f.1B&&f.1B.2g){D(i=1;i<1f.u;i++){U=f.1B.2g[i-1];c(U){1f[U]=1f[i]}}}c(f.3s&&f.O>(1f.H+1f[0].u)){f.O--}}q 1f}})()}10.1c.5J=l(){q(f.3s?\"g\":\"\")+(f.aw?\"i\":\"\")+(f.8E?\"m\":\"\")+(f.3d?\"x\":\"\")+(f.a0?\"y\":\"\")};10.1c.3z=l(7C){h 5E=W V(f.1j,(7C||\"\")+f.5J());c(f.1B){5E.1B={1j:f.1B.1j,2g:f.1B.2g?f.1B.2g.1b(0):v}}q 5E};10.1c.2e=l(93,z){q f.R(z)};10.1c.9b=l(9p,8x){q f.R(8x[0])};V.57=l(55,5d){h 5P=\"/\"+55+\"/\"+(5d||\"\");q V.57[5P]||(V.57[5P]=W V(55,5d))};V.41=l(z){q z.E(/[-[\\\\]{}()*+?.\\\\\\\\^$|,#\\\\s]/g,\"\\\\\\\\$&\")};V.8d=l(z,F,11,1i,2N){h 2N=2N||{},2M=2N.7D,12=2N.cb,1i=1i||\"\",5F=1i.Z(\"g\")>-1,6Y=1i.Z(\"i\")>-1,7m=1i.Z(\"m\")>-1,5q=1i.Z(\"y\")>-1,1i=1i.E(/y/g,\"\"),F=F 5U 10?(F.3s?F:F.3z(\"g\")):W V(F,\"g\"+1i),11=11 5U 10?(11.3s?11:11.3z(\"g\")):W V(11,\"g\"+1i),1K=[],2x=0,1s=0,1r=0,1w=0,2c,2b,1z,1C,3B,4f;c(2M){c(2M.u>1){3q aR(\"4g\\'t 4I aB aF 7r 41 85\")}c(7m){3q 7n(\"4g\\'t 4I 41 85 8A bv bj 8E ba\")}3B=V.41(2M);4f=W 10(\"^(?:\"+3B+\"[\\\\\\\\S\\\\\\\\s]|(?:(?!\"+F.1j+\"|\"+11.1j+\")[^\"+3B+\"])+)+\",6Y?\"i\":\"\")}2r(I){F.O=11.O=1r+(2M?(4f.R(z.1b(1r))||[\"\"])[0].u:0);1z=F.R(z);1C=11.R(z);c(1z&&1C){c(1z.H<=1C.H){1C=v}G{1z=v}}c(1z||1C){1s=(1z||1C).H;1r=(1z?F:11).O}G{c(!2x){2y}}c(5q&&!2x&&1s>1w){2y}c(1z){c(!2x++){2c=1s;2b=1r}}G{c(1C&&2x){c(!--2x){c(12){c(12[0]&&2c>1w){1K.K([12[0],z.1b(1w,2c),1w,2c])}c(12[1]){1K.K([12[1],z.1b(2c,2b),2c,2b])}c(12[2]){1K.K([12[2],z.1b(2b,1s),2b,1s])}c(12[3]){1K.K([12[3],z.1b(1s,1r),1s,1r])}}G{1K.K(z.1b(2b,1s))}1w=1r;c(!5F){2y}}}G{F.O=11.O=0;3q bE(\"bZ 8L av 9t as\")}}c(1s===1r){1r++}}c(5F&&!5q&&12&&12[0]&&z.u>1w){1K.K([12[0],z.1b(1w),1w,z.u])}F.O=11.O=0;q 1K};',62,769,'||||||||||||if|||this||var||||function||||sh|return||||length|null||||str|utils|div|code|for|replace|left|else|index|true|_121|push|className|config|false|lastIndex||document|exec||getParam|name|XRegExp|new|lt|gt|indexOf|RegExp|_139|vN|part|_11f|_d3||pos|create|right|css|slice|prototype|_119|bar|_129|strings|id|_13a|source|window|_d6|script|lines|class|_da|vars|_145|_144|style|_b5|_103|_146|alert|toolbar|_149|_f4|_x|_14a|lib|obj|html|doc|tab|params|continue|_142|_c3|highlight|createElement|split|_c5|href|test|_11a|_c2|_8|_e7|width|text|_5a|_5b|min|_91|substr|value||_ec|in|innerHTML|_4f|_3c|_98|_148|_147|line|call|_6e|captureNames|toString|_f0|_75|_bc|concat|nbsp|brushes|http|_cd|attributes|while|height|wnd|appendChild|_be|_5f|_143|break|_e9|real|execute|_66|_c4|_40|_88|SyntaxHighlighter|_f9|unindent|trim|_10f|size|_13c|_13b|case|_d9|_28|_55|getMatches|_c1|_ed|brush|_61|matches|_a2|body|m2|m1|_e3|_81|_7a|_5|_80|_124|isNaN|title|undefined|_118|DIV|extended|_10b|_2|_62|_ee|_7d|gutter|_25|offsetMatches|_4e|_8e|print|_fd|throw|_fe|global|_cc|_125|gm|Math|com|_104|addFlags|_e5|_14b|_3|printFrame|fixInputString|_76|_af|font|write|_7c|regex|_b6|substring|htmlScript|_32|_b4|url|_11e|_c6|td|_49|len|_60|_ef|_22|_a7|_7b|escape|_6a|color|_blank|_ea|_4d|_4c|_e1|xmlBrush|_47|HtmlScript|close|object|link|esc|can|_5d|_b0|type|_ad|_ae|_b3|_b2|_73|_b8|_ba|_b9|_a6|span|removeChild|gi|_89|eachLine|_7e|_9d|_82|_a3|_9e|getElementsByTagName|_6b|_cb|top|_53|supply|_ce|func|_50|popup|_d0|_54|findBrush|useScriptTags|_bf|_6c|values|discoveredBrushes|win|Match|_c8|focus|_d7||_f6|_29|hide|show|_133|_2b|cache|pre|_19|_1a|viewSource|regexList|_134|_2a|originalCode|highlighterId|wrap|_27|copyToClipboard|toolbarItemHeight|_2c|_2e|_2d|toolbarItemWidth|expandSource|_141|_7|_4|from|_e|item|charAt|www|r2|_11d|join|quantifier|_113|_b|_12e|_13e|_17|_18|String|getNativeFlags|_9|_f|_d|_10|collapsed|key|_101|_ff|brushName|_fb|instanceof|_30|swf|getBrushNameCss|_100|contentWindow|content|_38|_8c|_35|_37|_24|_f5|collapse|_2f|_fa|toolbarCommands|defaults|merge|guid|syntaxhighlighter|clipboardSwf|highlighters|_6|rel|DTD|to|createButton|_a|_84|500px|measureSpace|clipboard|none|scrollbars|decoration|org|_83|0px|margin|head|align|center|userAgent|_3f|copyStyles|0099FF|help|alexgorbatchev|xhtml1|_3e|w3|_85|_48|noBrush|_5e|version|stylesheet|_65|_6d|switch|screen|flash|event|_52|attachEvent|_13f|shockwave|toLowerCase|_1e|_36|px|clipboardData|commandName|copyToClipboardConfirmation|message|aboutDialog|_78|executeCommand|_14|_16|items|_13|_12|_4b|_15|_79|navigator|_dd|get|_140|TypeError|unicode|_de|Highlighter|one|_e0|toBoolean|_df|_d8|_d5|_c7|addEvent|pP|trimFirstAndLastLines|_c9|_12d|escapeChar|process|_d1|_112|_e2|typeof|classLeft|plain|_11c|_f2|_f7|classRight|table|decorate|tr|_11b|_f8|_f1|_106|matchesSortCallback|light|_e4|createDisplayLines|parseInt|padNumber|numbers|pad|first|character|brushNotHtmlScript|_a4|processMatches|tagName|getSyntaxHighlighterScriptTags|parseParams|processTabs|matchRecursive|_b7|toArray|_9a|_a8|_a1|arguments|_a9|regexLib|processUrls|findMatches|links|defaultAdd|_bd|_93|bloggerMode|stripCData|insertSpaces|parentNode|match|args|_90|smart|when|auto|debug|processSmartTabs|multiline|removeNestedMatches|stripBrs|tabs|_117|2004|2009|data|_1c|keep|Alex|donate|2930402|development|active|_1b|highlighter|syntax|JavaScript|Copyright|multiLineDoubleQuotedString|hosted_button_id|string|scriptScriptTags|aspScriptTags|_12f|another|constructing|onclick|catch|replaceVar|sgi|flags|apply|phpScriptTags|singleLineCComments|singleLinePerlComments|multiLineCComments|spaceWidth|Gorbatchev|getKeywords|doubleQuotedString|xmlComments|forHtmlScript|multiLineSingleQuotedString|try|singleQuotedString|_131|bottom|xmlns|addPlugin|unbalanced|dtd|transitional|EN|TR|1999|xhtml|charset|utf|About|Type|Content|meta|equiv|Transitional|XHTML|your|now|Can|is|The|view|copy|find|Brush|PUBLIC|W3C|DOCTYPE|option|wasn|configured|sx|family|sticky|If|you|target|2010|382|June|like|please|webscr|cmd|_s|bin|cgi|https|paypal|4em|75em|serif|background|fff|sans|Helvetica|Geneva|Arial|000|1em|large|delimiters|xx|3em|contains|ignoreCase|xclick|always|about|_42|more|shCore|printing|alt|than|_43|max|round|250|500|_44|sort|highlighted|absolute|error|spaces|SyntaxError|ok|amp|setData|_1f|_39|cssText|position|number|IFRAME|_3a|_3b|random|1000000|_a5|getElementById|block|CDATA|htmlscript|flag|opera|1000|offsetWidth|_8a|_99|getPropertyValue|getComputedStyle|Array|the|textarea|Xml|load|open|_cf|lastIndexOf|_d4||all|on|70em|using|30em|aliases|addEventListener|replaceChild|command|printSource|no|menu|Error|flashVars|wmode|transparent|msie|classid|11cf|96b8|ae6d|d27cdb6e|clsid|allowScriptAccess|application|location|resizable|400|750|_20|_21|menubar|_26|subject|_clipboard|onmouseover|onmouseout|param|444553540000|nogutter|embed|macromedia|movie|swflash|_10a|valueNames||_10c|pub|src|conf|highlighter_|cab|download|cabs|codebase|important|_34|_33'.split('|'),0,{}))"
  },
  {
    "path": "legacy/assets/shThemeRDark.css",
    "content": "/**\n * SyntaxHighlighter\n * http://alexgorbatchev.com/\n *\n * SyntaxHighlighter is donationware. If you are using it, please donate.\n * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate\n *\n * @version\n * 2.1.382 (June 24 2010)\n * \n * @copyright\n * Copyright (C) 2004-2009 Alex Gorbatchev.\n *\n * @license\n * This file is part of SyntaxHighlighter.\n * \n * SyntaxHighlighter is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n * \n * SyntaxHighlighter 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\n * GNU General Public License for more details.\n * \n * You should have received a copy of the GNU General Public License\n * along with SyntaxHighlighter.  If not, see <http://www.gnu.org/copyleft/lesser.html>.\n */\n/**\n * RDark SyntaxHighlighter theme based on theme by Radu Dineiu\n * http://www.vim.org/scripts/script.php?script_id=1732\n */\n\n/************************************\n * Interface elements.\n ************************************/\n\n.syntaxhighlighter\n{\n\tbackground-color: #1B2426 !important;\n}\n\n/* Gutter line numbers */\n.syntaxhighlighter .line .number\n{\n\tcolor: #B9BDB6 !important;\n}\n\n/* Add border to the lines */\n.syntaxhighlighter .line .content\n{\n\tborder-left: 3px solid #435A5F !important;\n\tcolor: #B9BDB6 !important;\n}\n\n.syntaxhighlighter.printing .line .content \n{\n\tborder: 0 !important;\n}\n\n/* First line */\n.syntaxhighlighter .line.alt1\n{\n\tbackground-color: #1B2426 !important;\n}\n\n/* Second line */\n.syntaxhighlighter .line.alt2\n{\n\tbackground-color: #1B2426 !important;\n}\n\n/* Highlighed line number */\n.syntaxhighlighter .line.highlighted .number\n{\n\tbackground-color: #435A5F !important;\n\tcolor: #fff !important;\n}\n\n/* Highlighed line */\n.syntaxhighlighter .line.highlighted.alt1,\n.syntaxhighlighter .line.highlighted.alt2\n{\n\tbackground-color: #435A5F !important;\n}\n\n.syntaxhighlighter .toolbar\n{\n\tbackground-color: #1B2426 !important;\n}\n\n.syntaxhighlighter .toolbar a\n{\n\tcolor: #646763 !important;\n}\n\n.syntaxhighlighter .toolbar a:hover\n{\n\tcolor: #E0E8FF !important;\n}\n\n/************************************\n * Actual syntax highlighter colors.\n ************************************/\n.syntaxhighlighter .plain,\n.syntaxhighlighter .plain a\n{ \n\tcolor: #B9BDB6 !important;\n}\n\n.syntaxhighlighter .comments,\n.syntaxhighlighter .comments a\n{ \n\tcolor: #878A85 !important;\n}\n\n.syntaxhighlighter .string,\n.syntaxhighlighter .string a\n{\n\tcolor: #5CE638 !important; \n}\n\n.syntaxhighlighter .keyword\n{ \n\tcolor: #5BA1CF !important; \n}\n\n.syntaxhighlighter .preprocessor \n{ \n\tcolor: #435A5F !important; \n}\n\n.syntaxhighlighter .variable \n{ \n\tcolor: #FFAA3E !important; \n}\n\n.syntaxhighlighter .value\n{ \n\tcolor: #090 !important; \n}\n\n.syntaxhighlighter .functions\n{ \n\tcolor: #FFAA3E !important; \n}\n\n.syntaxhighlighter .constants\n{ \n\tcolor: #E0E8FF !important; \n}\n\n.syntaxhighlighter .script\n{ \n\tbackground-color: #435A5F !important;\n}\n\n.syntaxhighlighter .color1,\n.syntaxhighlighter .color1 a\n{ \n\tcolor: #E0E8FF !important; \n}\n\n.syntaxhighlighter .color2,\n.syntaxhighlighter .color2 a\n{ \n\tcolor: #FFFFFF !important; \n}\n\n.syntaxhighlighter .color3,\n.syntaxhighlighter .color3 a\n{ \n\tcolor: #FFAA3E !important; \n}"
  },
  {
    "path": "legacy/assets/style.css",
    "content": "body {\n  margin: 20px auto;\n  width: 60%;\n  font-family:Georgia, serif;\n}\n\na {\n  color:#ce242a;\n}\n\na:visited {\n  color:#9f2826;\n}\n\ndiv.chapter {\n  padding:50px 0;\n  border-top:1px solid #ccc;\n  border-bottom:1px solid #ccc;\n}\n\np {\n  line-height:1.4em;\n}\n\n.titlepage h2.title {\n  font-size:200%\n}\n\nh1.title {\n  font-size:250%;\n}\n\nh1, h2, h3, h4, h5 {\n  font-family:Helvetica,Arial, sans-serif;\n}\n\n.example {\n  margin:20px 0;\n}\n\n.example .example-contents {\n  margin:0 0 10px 0;\n}\n\n.example .title {\n  font-family:Helvetica, Arial, sans-serif;\n  font-style:italic;\n  margin:20px 0 3px 0;\n  font-size:90%;\n}\n\n.note {\n  background-color:#fe6;\n  padding:15px;\n}\n\ndt span.term {\n  font-family:Helvetica, Arial, sans-serif;\n  font-weight:bold;\n}\n\np.toc {\n  font-family: Helvetica, Arial, sans-serif;\n  font-size:90%;\n}\n\n#toc li, #loe li {\n  color:#ce242a;\n  cursor:pointer;\n}\n"
  },
  {
    "path": "legacy/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge;chrome=1\" >\n    <meta charset=\"utf-8\">\n    <title>\n      jQuery Fundamentals\n    </title>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"/legacy/assets/style.css\">\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"/legacy/assets/shCore.css\">\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"/legacy/assets/shThemeRDark.css\">\n  </head>\n  <body>\n    <div title=\"jQuery Fundamentals\" class=\"book\">\n\n      <div id=\"titlepage\">\n        <div>\n          <div>\n            <h1 class=\"title\">\n              jQuery Fundamentals\n            </h1>\n          </div>\n          <div>\n            <div class=\"author\">\n              <h3 class=\"author\">\n                By <a href=\"http://rmurphey.com\" class=\"ulink\">Rebecca Murphey</a>\n              </h3>\n            </div>\n          </div>\n          <div>\n            <div class=\"othercredit\">\n              <h3 class=\"othercredit\">\n                <span class=\"orgname\"><a href=\"http://github.com/rmurphey/jqfundamentals\" class=\"ulink\">http://github.com/rmurphey/jqfundamentals</a></span>\n              </h3>\n            </div>\n          </div>\n          <div>\n            <div class=\"othercredit\">\n              <h3 class=\"othercredit\">\n                <span class=\"orgname\">With contributions by James Padolsey, Paul Irish, and others. See the GitHub repository for a complete history of contributions.</span>\n              </h3>\n            </div>\n          </div>\n          <div>\n            <p class=\"copyright\">\n              Copyright © 2012\n            </p>\n          </div>\n          <div>\n            <div title=\"Legal Notice\" class=\"legalnotice\">\n              <p>\n                Licensed by Rebecca Murphey under the <a href=\"http://creativecommons.org/licenses/by-sa/3.0/us/\" class=\"ulink\">Creative Commons Attribution-Share Alike 3.0 United States license</a>. You are free to copy, distribute, transmit, and remix this work, provided you attribute the work to Rebecca Murphey as the original author and reference <a href=\"http://github.com/rmurphey/jqfundamentals\" class=\"ulink\">the GitHub repository for the work</a>. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license. Any of the above conditions can be waived if you get permission from the copyright holder. For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with <a href=\"http://creativecommons.org/licenses/by-sa/3.0/us/\" class=\"ulink\">a link to the license</a>.\n              </p>\n            </div>\n          </div>\n\n        </div>\n      </div> <!-- end titlepage -->\n\n      <div id=\"toc\">\n        <h2>Contents</h2>\n        <ul>\n        <!-- JS-generated TOC goes here -->\n        </ul>\n      </div>\n\n      <div id=\"loe\">\n        <h2>List of Examples</h2>\n        <ul>\n        <!-- JS-generated list of examples goes here -->\n        </ul>\n      </div>\n\n              <div title=\"Welcome\" class=\"chapter\">\n        <div class=\"titlepage\">\n          <div>\n            <div>\n              <h2 class=\"title\">\n                Welcome\n              </h2>\n            </div>\n          </div>\n        </div>\n        <p>\n          jQuery is fast becoming a must-have skill for front-end developers. The purpose of this book is to provide an overview of the jQuery JavaScript library; when you're done with the book, you should be able to complete basic tasks using jQuery, and have a solid basis from which to continue your learning. This book was designed as material to be used in a classroom setting, but you may find it useful for individual study.\n        </p>\n        <p>\n          This is a hands-on class. We will spend a bit of time covering a concept, and then you’ll have the chance to work on an exercise related to the concept. Some of the exercises may seem trivial; others may be downright daunting. In either case, there is no grade; the goal is simply to get you comfortable working your way through problems you’ll commonly be called upon to solve using jQuery. Example solutions to all of the exercises are included in the sample code.\n        </p>\n        <div title=\"Getting the Code\" class=\"section\">\n          <h2 class=\"title\">\n            Getting the Code\n          </h2>\n          <p>\n            The code we’ll be using in this book is hosted <a href=\"http://github.com/rmurphey/jqfundamentals\" class=\"ulink\">in a repository on Github</a>. You can download a .zip or .tar file of the code, then uncompress it to use it on your server. If you’re git-inclined, you’re welcome to clone or fork the repository.\n          </p>\n        </div>\n        <div title=\"Software\" class=\"section\">\n          <h2 class=\"title\">\n            Software\n          </h2>\n          <p>\n            You'll want to have the following tools to make the most of the class:\n          </p>\n          <ul>\n            <li>\n              <p>\n                The Firefox browser\n              </p>\n            </li>\n            <li>\n              <p>\n                The Firebug extension for Firefox\n              </p>\n            </li>\n            <li>\n              <p>\n                A plain text editor\n              </p>\n            </li>\n            <li>\n              <p>\n                For the Ajax portions: A local server (such as MAMP or WAMP), or an FTP or SSH client to access a remote server.\n              </p>\n            </li>\n          </ul>\n        </div>\n        <div title=\"Adding JavaScript to Your Page\" class=\"section\">\n          <h2 class=\"title\">\n            Adding JavaScript to Your Page\n          </h2>\n          <p>\n            JavaScript can be included inline or by including an external file via a script tag. The order in which you include JavaScript is important: dependencies must be included before the script that depends on them.\n          </p>\n          <p>\n            For the sake of page performance, JavaScript should be included as close to the end of your HTML as is practical. Multiple JavaScript files should be combined for production use.\n          </p>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>An example of inline JavaScript</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\n&lt;script&gt;\nconsole.log('hello');\n&lt;/script&gt;\n</pre>\n            </div>\n          </div>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>An example of including external JavaScript</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\n&lt;script src='/js/jquery.js'&gt;&lt;/script&gt;\n</pre>\n            </div>\n          </div>\n        </div>\n        <div title=\"JavaScript Debugging\" class=\"section\">\n          <h2 class=\"title\">\n            JavaScript Debugging\n          </h2>\n          <p>\n            A debugging tool is essential for JavaScript development. Firefox provides a debugger via the Firebug extension; Safari and Chrome provide built-in consoles.\n          </p>\n          <p>\n            Each console offers:\n          </p>\n          <ul>\n            <li>\n              <p>\n                single- and multi-line editors for experimenting with JavaScript\n              </p>\n            </li>\n            <li>\n              <p>\n                an inspector for looking at the generated source of your page\n              </p>\n            </li>\n            <li>\n              <p>\n                a Network or Resources view, to examine network requests\n              </p>\n            </li>\n          </ul>\n          <p>\n            When you are writing JavaScript code, you can use the following methods to send messages to the console:\n          </p>\n          <ul>\n            <li>\n              <code class=\"code\">console.log()</code> for sending general log messages\n            </li>\n            <li>\n              <code class=\"code\">console.dir()</code> for logging a browseable object\n            </li>\n            <li>\n              <code class=\"code\">console.warn()</code> for logging warnings\n            </li>\n            <li>\n              <code class=\"code\">console.error()</code> for logging error messages\n            </li>\n          </ul>\n          <p>\n            Other console methods are also available, though they may differ from one browser to another. The consoles also provide the ability to set break points and watch expressions in your code for debugging purposes.\n          </p>\n        </div>\n        <div title=\"Exercises\" class=\"section\">\n          <h2 class=\"title\">\n            Exercises\n          </h2>\n          <p>\n            Most chapters in the book conclude with one or more exercises. For some exercises, you’ll be able to work directly in Firebug; for others, you will need to include other scripts after the jQuery script tag as directed in the individual exercises.\n          </p>\n          <p>\n            In some cases, you will need to consult the jQuery documentation in order to complete an exercise, as we won’t have covered all of the relevant information in the book. This is by design; the jQuery library is large, and learning to find answers in the documentation is an important part of the process.\n          </p>\n          <p>\n            Here are a few suggestions for tackling these problems:\n          </p>\n          <ul>\n            <li>\n              <p>\n                First, make sure you thoroughly understand the problem you're being asked to solve.\n              </p>\n            </li>\n            <li>\n              <p>\n                Next, figure out which elements you'll need to access in order to solve the problem, and determine how you'll get those elements. Use Firebug to verify that you're getting the elements you're after.\n              </p>\n            </li>\n            <li>\n              <p>\n                Finally, figure out what you need to do with the elements to solve the problem. It can be helpful to write comments explaining what you're going to do before you try to write the code to do it.\n              </p>\n            </li>\n          </ul>\n          <p>\n            Do not be afraid to make mistakes! Do not try to make your code perfect on the first try! Making mistakes and experimenting with solutions is part of learning the library, and you’ll be a better developer for it. Examples of solutions for these exercises are located in the <code class=\"filename\">/solutions</code> directory in the sample code.\n          </p>\n        </div>\n        <h2 class=\"title\">\n          Conventions used in this book\n        </h2>\n        <p>\n          Methods that can be called on jQuery objects will be referred to as <code class=\"code\">$.fn.methodName</code>. Methods that exist in the jQuery namespace but that cannot be called on jQuery objects will be referred to as <code class=\"code\">$.methodName</code>. If this doesn't mean much to you, don't worry — it should become clearer as you progress through the book.\n        </p>\n        <div class=\"example\">\n          <p class=\"title\">\n            <b>Example of an example</b>\n          </p>\n          <div class=\"example-contents\">\n            <pre class=\"brush: js\">\n// code examples will appear like this\n</pre>\n          </div>\n        </div>\n        <p class=\"remark\">\n          <i><span class=\"remark\">Remarks will appear like this.</span></i>\n        </p>\n        <div class=\"note\">\n        <h3 class=\"title\">\n          Note\n        </h3>\n        <p>\n          Notes about a topic will appear like this.\n        </p>\n        </div>\n        <div title=\"Reference Material\" class=\"section\">\n          <h2 class=\"title\">\n            Reference Material\n          </h2>\n          <p>\n            There are any number of articles and blog posts out there that address some aspect of jQuery. Some are phenomenal; some are downright wrong. When you read an article about jQuery, be sure it's talking about the same version as you're using, and resist the urge to just copy and paste — take the time to understand the code in the article.\n          </p>\n          <p>\n            Here are some excellent resources to use during your jQuery learning. The most important of all is the jQuery source itself: it contains, in code form, complete documentation of the library. It is not a black box — your understanding of the library will grow exponentially if you spend some time visiting it now and again —&nbsp;and I highly recommend bookmarking it in your browser and referring to it often.\n          </p>\n          <ul>\n            <li>\n              <p>\n                <a href=\"http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js\" class=\"ulink\">The jQuery source</a>\n              </p>\n            </li>\n            <li>\n              <p>\n                <a href=\"http://api.jquery.com\" class=\"ulink\">jQuery documentation</a>\n              </p>\n            </li>\n            <li>\n              <p>\n                <a href=\"http://forum.jquery.com/\" class=\"ulink\">jQuery forum</a>\n              </p>\n            </li>\n            <li>\n              <p>\n                <a href=\"http://delicious.com/rdmey/jquery-class\" class=\"ulink\">Delicious bookmarks</a>\n              </p>\n            </li>\n            <li>\n              <p>\n                <a href=\"http://docs.jquery.com/Discussion#Chat_.2F_IRC_Channel\" class=\"ulink\">#jquery IRC channel on Freenode</a>\n              </p>\n            </li>\n          </ul>\n        </div>\n      </div>        <div title=\"Part&nbsp;I.&nbsp;JavaScript 101\" class=\"part\">\n        <div class=\"titlepage\">\n          <div>\n            <div>\n              <h1 class=\"title\">\n                Part&nbsp;I.&nbsp;JavaScript 101\n              </h1>\n            </div>\n          </div>\n        </div>\n               <div title=\"JavaScript Basics\" class=\"chapter\">\n          <div class=\"titlepage\">\n            <div>\n              <div>\n                <h2 class=\"title\">\n                  JavaScript Basics\n                </h2>\n              </div>\n            </div>\n          </div>\n          <div title=\"Overview\" class=\"section\">\n            <h2 class=\"title\">\n              Overview\n            </h2>\n            <p>\n              jQuery is built on top of JavaScript, a rich and expressive language in its own right. This section covers the basic concepts of JavaScript, as well as some frequent pitfalls for people who have not used JavaScript before. While it will be of particular value to people with no programming experience, even people who have used other programming languages may benefit from learning about some of the peculiarities of JavaScript.\n            </p>\n            <p>\n              If you’re interested in learning more about the JavaScript language, I highly recommend <em class=\"citetitle\">JavaScript: The Good Parts</em> by Douglas Crockford.\n            </p>\n          </div>\n          <div title=\"Syntax Basics\" class=\"section\">\n            <h2 class=\"title\">\n              Syntax Basics\n            </h2>\n            <p>\n              Understanding statements, variable naming, whitespace, and other basic JavaScript syntax.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>A simple variable declaration</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nvar foo = 'hello world';\n</pre>\n              </div>\n            </div>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Whitespace has no meaning outside of quotation marks</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nvar foo =         'hello world';\n</pre>\n              </div>\n            </div>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Parentheses indicate precedence</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n2 * 3 + 5;    // returns 11; multiplication happens first\n2 * (3 + 5);  // returns 16; addition happens first\n</pre>\n              </div>\n            </div>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Tabs enhance readability, but have no special meaning</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nvar foo = function() {\n    console.log('hello');\n};\n</pre>\n              </div>\n            </div>\n          </div>\n          <div title=\"Operators\" class=\"section\">\n            <h2 class=\"title\">\n              Operators\n            </h2>\n            <div title=\"Basic Operators\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Basic Operators\n                </h3>\n              </div>\n              <p>\n                Basic operators allow you to manipulate values.\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Concatenation</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\nvar foo = 'hello';\nvar bar = 'world';\n\nconsole.log(foo + ' ' + bar); // 'hello world'\n</pre>\n                </div>\n              </div>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Multiplication and division</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\n2 * 3;\n2 / 3;\n</pre>\n                </div>\n              </div>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Incrementing and decrementing</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\nvar i = 1;\n\nvar j = ++i;  // pre-increment:  j equals 2; i equals 2\nvar k = i++;  // post-increment: k equals 2; i equals 3\n</pre>\n                </div>\n              </div>\n            </div>\n            <div title=\"Operations on Numbers &amp; Strings\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Operations on Numbers &amp; Strings\n                </h3>\n              </div>\n              <p>\n                In JavaScript, numbers and strings will occasionally behave in ways you might not expect.\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Addition vs. concatenation</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\nvar foo = 1;\nvar bar = '2';\n\nconsole.log(foo + bar);  // 12. uh oh\n</pre>\n                </div>\n              </div>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Forcing a string to act as a number</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\nvar foo = 1;\nvar bar = '2';\n\n// coerce the string to a number\nconsole.log(foo + Number(bar));\n</pre>\n                </div>\n              </div>\n              <p>\n                The Number constructor, when called as a function (like above) will have the effect of casting its argument into a number. You could also use the unary plus operator, which does the same thing:\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Forcing a string to act as a number (using the unary-plus operator)</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\nconsole.log(foo + +bar);\n</pre>\n                </div>\n              </div>\n            </div>\n            <div class=\"titlepage\">\n              <h3 class=\"title\">\n                Logical Operators\n              </h3>\n            </div>\n            <p>\n              Logical operators allow you to evaluate a series of operands using AND and OR operations.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Logical AND and OR operators</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nvar foo = 1;\nvar bar = 0;\nvar baz = 2;\n\nfoo || bar;   // returns 1, which is true\nbar || foo;   // returns 1, which is true\n\nfoo &amp;&amp; bar;   // returns 0, which is false\nfoo &amp;&amp; baz;   // returns 2, which is true\nbaz &amp;&amp; foo;   // returns 1, which is true\n</pre>\n              </div>\n            </div>\n            <p>\n              Though it may not be clear from the example, the <code class=\"code\">||</code> operator returns the value of the first truthy operand, or, in cases where neither operand is truthy, it'll return the last of both operands. The <code class=\"code\">&amp;&amp;</code> operator returns the value of the first false operand, or the value of the last operand if both operands are truthy.\n            </p>\n            <p>\n             Be sure to consult <a title=\"Truthy and Falsy Things\" href=\"#Truthy and Falsy Things\">the section called “Truthy and Falsy Things”</a> for more details on which values evaluate to <code class=\"code\">true</code> and which evaluate to <code class=\"code\">false</code>.\n            </p>\n            <div class=\"note\">\n            <h3 class=\"title\">\n              Note\n            </h3>\n            <p>\n              You'll sometimes see developers use these logical operators for flow control instead of using <code class=\"code\">if</code> statements. For example:\n            </p>\n            <pre class=\"brush: js\">\n// do something with foo if foo is truthy\nfoo &amp;&amp; doSomething(foo);\n\n// set bar to baz if baz is truthy;\n// otherwise, set it to the return\n// value of createBar()\nvar bar = baz || createBar();\n</pre>\n            <p>\n              This style is quite elegant and pleasantly terse; that said, it can be really hard to read, especially for beginners. I bring it up here so you'll recognize it in code you read, but I don't recommend using it until you're extremely comfortable with what it means and how you can expect it to behave.\n            </p>\n            </div>\n            <div title=\"Comparison Operators\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Comparison Operators\n                </h3>\n              </div>\n              <p>\n                Comparison operators allow you to test whether values are equivalent or whether values are identical.\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Comparison operators</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\nvar foo = 1;\nvar bar = 0;\nvar baz = '1';\nvar bim = 2;\n\nfoo == bar;   // returns false\nfoo != bar;   // returns true\nfoo == baz;   // returns true; careful!\n\nfoo === baz;             // returns false\nfoo !== baz;             // returns true\nfoo === parseInt(baz);   // returns true\n\nfoo &gt; bim;    // returns false\nbim &gt; baz;    // returns true\nfoo &lt;= baz;   // returns true\n</pre>\n                </div>\n              </div>\n            </div>\n          </div>\n          <h2 class=\"title\">\n            Conditional Code\n          </h2>\n          <p>\n            Sometimes you only want to run a block of code under certain conditions. Flow control — via <code class=\"code\">if</code> and <code class=\"code\">else</code> blocks —&nbsp;lets you run code only under certain conditions.\n          </p>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>Flow control</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\nvar foo = true;\nvar bar = false;\n\nif (bar) {\n    // this code will never run\n    console.log('hello!');\n}\n\nif (bar) {\n    // this code won't run\n} else {\n    if (foo) {\n        // this code will run\n    } else {\n        // this code would run if foo and bar were both false\n    }\n}\n</pre>\n            </div>\n          </div>\n          <div class=\"note\">\n          <h3 class=\"title\">\n            Note\n          </h3>\n          <p>\n            While curly braces aren't strictly required around single-line <code class=\"code\">if</code> statements, using them consistently, even when they aren't strictly required, makes for vastly more readable code.\n          </p>\n          <p>\n            Be mindful not to define functions with the same name multiple times within separate <code class=\"code\">if</code>/<code class=\"code\">else</code> blocks, as doing so may not have the expected result.\n          </p>\n          </div>\n\n          <div title=\"Truthy and Falsy Things\" id=\"Truthy and Falsy Things\" class=\"section\">\n            <div class=\"titlepage\">\n              <h3 class=\"title\">\n                Truthy and Falsy Things\n              </h3>\n            </div>\n            <p>\n              In order to use flow control successfully, it's important to understand which kinds of values are \"truthy\" and which kinds of values are \"falsy.\" Sometimes, values that seem like they should evaluate one way actually evaluate another.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Values that evaluate to <code class=\"code\">true</code></b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n'0';\n'any string';\n[];  // an empty array\n{};  // an empty object\n1;   // any non-zero number\n</pre>\n              </div>\n            </div>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Values that evaluate to <code class=\"code\">false</code></b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n0;\n'';  // an empty string\nNaN; // JavaScript's \"not-a-number\" variable\nnull;\nundefined;  // be careful -- undefined can be redefined!\n</pre>\n              </div>\n            </div>\n          </div>\n          <div title=\"Conditional Variable Assignment with The Ternary Operator\" class=\"section\">\n            <div class=\"titlepage\">\n              <h3 class=\"title\">\n                Conditional Variable Assignment with The Ternary Operator\n              </h3>\n            </div>\n            <p>\n              Sometimes you want to set a variable to a value depending on some condition. You could use an <code class=\"code\">if</code>/<code class=\"code\">else</code> statement, but in many cases the ternary operator is more convenient. <span class=\"termdef\">[Definition: The <em class=\"firstterm\">ternary operator</em> tests a condition; if the condition is true, it returns a certain value, otherwise it returns a different value.]</span>\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>The ternary operator</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n// set foo to 1 if bar is true;\n// otherwise, set foo to 0\nvar foo = bar ? 1 : 0;\n</pre>\n              </div>\n            </div>\n            <p>\n              While the ternary operator can be used without assigning the return value to a variable, this is generally discouraged.\n            </p>\n          </div>\n          <div title=\"Switch Statements\" class=\"section\">\n            <div class=\"titlepage\">\n              <h3 class=\"title\">\n                Switch Statements\n              </h3>\n            </div>\n            <p>\n              Rather than using a series of if/else if/else blocks, sometimes it can be useful to use a switch statement instead. <span class=\"termdef\">[Definition: <em class=\"firstterm\">Switch statements</em> look at the value of a variable or expression, and run different blocks of code depending on the value.]</span>\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>A switch statement</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nswitch (foo) {\n\n    case 'bar':\n        alert('the value was bar -- yay!');\n    break;\n\n    case 'baz':\n        alert('boo baz :(');\n    break;\n\n    default:\n        alert('everything else is just ok');\n    break;\n\n}\n</pre>\n              </div>\n            </div>\n            <p>\n              Switch statements have somewhat fallen out of favor in JavaScript, because often the same behavior can be accomplished by creating an object that has more potential for reuse, testing, etc. For example:\n            </p>\n            <pre class=\"brush: js\">\nvar stuffToDo = {\n    'bar' : function() {\n        alert('the value was bar -- yay!');\n    },\n\n    'baz' : function() {\n        alert('boo baz :(');\n    },\n\n    'default' : function() {\n        alert('everything else is just ok');\n    }\n};\n\nif (stuffToDo[foo]) {\n    stuffToDo[foo]();\n} else {\n    stuffToDo['default']();\n}\n</pre>\n            <p>\n              We'll look at objects in greater depth later in this chapter.\n            </p>\n          </div>\n          <div title=\"Loops\" class=\"section\">\n            <h2 class=\"title\">\n              Loops\n            </h2>\n            <p>\n              Loops let you run a block of code a certain number of times.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Loops</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n// logs 'try 0', 'try 1', ..., 'try 4'\nfor (var i=0; i&lt;5; i++) {\n    console.log('try ' + i);\n}\n</pre>\n              </div>\n            </div>\n            <p>\n              <em><span class=\"remark\">Note that in</span></em> <em>Loops even though we use the keyword <span class=\"token\">var</span> before the variable name <code class=\"varname\">i</code>, this does not \"scope\" the variable <code class=\"varname\">i</code> to the loop block. We'll discuss scope in depth later in this chapter.</em>\n            </p>\n            <div title=\"The for loop\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  The for loop\n                </h3>\n              </div>\n              <p>\n                A <code class=\"code\">for</code> loop is made up of four statements and has the following structure:\n              </p>\n              <pre class=\"brush: js\">\nfor ([initialisation]; [conditional]; [iteration])\n [loopBody]\n</pre>\n              <p>\n                The <span class=\"emphasis\"><em>initialisation</em></span> statement is executed only once, before the loop starts. It gives you an opportunity to prepare or declare any variables.\n              </p>\n              <p>\n                The <span class=\"emphasis\"><em>conditional</em></span> statement is executed before each iteration, and its return value decides whether or not the loop is to continue. If the conditional statement evaluates to a falsey value then the loop stops.\n              </p>\n              <p>\n                The <span class=\"emphasis\"><em>iteration</em></span> statement is executed at the end of each iteration and gives you an opportunity to change the state of important variables. Typically, this will involve incrementing or decrementing a counter and thus bringing the loop ever closer to its end.\n              </p>\n              <p>\n                The <span class=\"emphasis\"><em>loopBody</em></span> statement is what runs on every iteration. It can contain anything you want. You'll typically have multiple statements that need to be executed and so will wrap them in a block ( <code class=\"code\">{...}</code>).\n              </p>\n              <p>\n                Here's a typical <code class=\"code\">for</code> loop:\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>A typical <code class=\"code\">for</code> loop</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\nfor (var i = 0, limit = 100; i &lt; limit; i++) {\n    // This block will be executed 100 times\n    console.log('Currently at ' + i);\n    // Note: the last log will be \"Currently at 99\"\n}\n</pre>\n                </div>\n              </div>\n            </div>\n            <div title=\"The while loop\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  The while loop\n                </h3>\n              </div>\n              <p>\n                A <code class=\"code\">while</code> loop is similar to an <code class=\"code\">if</code> statement, except that its body will keep executing until the condition evaluates to false.\n              </p>\n              <pre class=\"brush: js\">\nwhile ([conditional]) [loopBody]\n</pre>\n              <p>\n                Here's a typical <code class=\"code\">while</code> loop:\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>A typical <code class=\"code\">while</code> loop</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\nvar i = 0;\nwhile (i &lt; 100) {\n\n    // This block will be executed 100 times\n    console.log('Currently at ' + i);\n\n    i++; // increment i\n\n}\n</pre>\n                </div>\n              </div>\n              <p>\n                You'll notice that we're having to increment the counter within the loop's body. It is possible to combine the conditional and incrementer, like so:\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>A <code class=\"code\">while</code> loop with a combined conditional and incrementer</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\nvar i = -1;\nwhile (++i &lt; 100) {\n    // This block will be executed 100 times\n    console.log('Currently at ' + i);\n}\n</pre>\n                </div>\n              </div>\n              <p>\n                Notice that we're starting at <code class=\"code\">-1</code> and using the prefix incrementer (<code class=\"code\">++i</code>).\n              </p>\n            </div>\n            <div title=\"The do-while loop\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  The do-while loop\n                </h3>\n              </div>\n              <p>\n                This is almost exactly the same as the <code class=\"code\">while</code> loop, except for the fact that the loop's body is executed at least once before the condition is tested.\n              </p>\n              <pre class=\"brush: js\">\ndo [loopBody] while ([conditional])\n</pre>\n              <p>\n                Here's a <code class=\"code\">do-while</code> loop:\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>A <code class=\"code\">do-while</code> loop</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\ndo {\n\n    // Even though the condition evaluates to false\n    // this loop's body will still execute once.\n\n    alert('Hi there!');\n\n} while (false);\n</pre>\n                </div>\n              </div>\n              <p>\n                These types of loops are quite rare since only few situations require a loop that blindly executes at least once. Regardless, it's good to be aware of it.\n              </p>\n            </div>\n            <div title=\"Breaking and continuing\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Breaking and continuing\n                </h3>\n              </div>\n              <p>\n                Usually, a loop's termination will result from the conditional statement not evaluating to true, but it is possible to stop a loop in its tracks from within the loop's body with the <code class=\"code\">break</code> statement.\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Stopping a loop</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\nfor (var i = 0; i &lt; 10; i++) {\n    if (something) {\n        break;\n    }\n}\n</pre>\n                </div>\n              </div>\n              <p>\n                You may also want to continue the loop without executing more of the loop's body. This is done using the <code class=\"code\">continue</code> statement.\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Skipping to the next iteration of a loop</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\nfor (var i = 0; i &lt; 10; i++) {\n\n    if (something) {\n        continue;\n    }\n\n    // The following statement will only be executed\n    // if the conditional 'something' has not been met\n    console.log('I have been reached');\n\n}\n</pre>\n                </div>\n              </div>\n            </div>\n          </div>\n          <div title=\"Reserved Words\" class=\"section\">\n            <h2 class=\"title\">\n              Reserved Words\n            </h2>\n            <p>\n              JavaScript has a number of “reserved words,” or words that have special meaning in the language. You should avoid using these words in your code except when using them with their intended meaning.\n            </p>\n            <ul>\n                <li>\n                  <code class=\"code\">abstract</code>\n                </li>\n                <li>\n                  <code class=\"code\">boolean</code>\n                </li>\n                <li>\n                  <code class=\"code\">break</code>\n                </li>\n                <li>\n                  <code class=\"code\">byte</code>\n                </li>\n                <li>\n                  <code class=\"code\">case</code>\n                </li>\n                <li>\n                  <code class=\"code\">catch</code>\n                </li>\n                <li>\n                  <code class=\"code\">char</code>\n                </li>\n                <li>\n                  <code class=\"code\">class</code>\n                </li>\n                <li>\n                  <code class=\"code\">const</code>\n                </li>\n                <li>\n                  <code class=\"code\">continue</code>\n                </li>\n                <li>\n                  <code class=\"code\">debugger</code>\n                </li>\n                <li>\n                  <code class=\"code\">default</code>\n                </li>\n                <li>\n                  <code class=\"code\">delete</code>\n                </li>\n                <li>\n                  <code class=\"code\">do</code>\n                </li>\n                <li>\n                  <code class=\"code\">double</code>\n                </li>\n                <li>\n                  <code class=\"code\">else</code>\n                </li>\n                <li>\n                  <code class=\"code\">enum</code>\n                </li>\n                <li>\n                  <code class=\"code\">export</code>\n                </li>\n                <li>\n                  <code class=\"code\">extends</code>\n                </li>\n                <li>\n                  <code class=\"code\">final</code>\n                </li>\n                <li>\n                  <code class=\"code\">finally</code>\n                </li>\n                <li>\n                  <code class=\"code\">float</code>\n                </li>\n                <li>\n                  <code class=\"code\">for</code>\n                </li>\n                <li>\n                  <code class=\"code\">function</code>\n                </li>\n                <li>\n                  <code class=\"code\">goto</code>\n                </li>\n                <li>\n                  <code class=\"code\">if</code>\n                </li>\n                <li>\n                  <code class=\"code\">implements</code>\n                </li>\n                <li>\n                  <code class=\"code\">import</code>\n                </li>\n                <li>\n                  <code class=\"code\">in</code>\n                </li>\n                <li>\n                  <code class=\"code\">instanceof</code>\n                </li>\n                <li>\n                  <code class=\"code\">int</code>\n                </li>\n                <li>\n                  <code class=\"code\">interface</code>\n                </li>\n                <li>\n                  <code class=\"code\">long</code>\n                </li>\n                <li>\n                  <code class=\"code\">native</code>\n                </li>\n                <li>\n                  <code class=\"code\">new</code>\n                </li>\n                <li>\n                  <code class=\"code\">package</code>\n                </li>\n                <li>\n                  <code class=\"code\">private</code>\n                </li>\n                <li>\n                  <code class=\"code\">protected</code>\n                </li>\n                <li>\n                  <code class=\"code\">public</code>\n                </li>\n                <li>\n                  <code class=\"code\">return</code>\n                </li>\n                <li>\n                  <code class=\"code\">short</code>\n                </li>\n                <li>\n                  <code class=\"code\">static</code>\n                </li>\n                <li>\n                  <code class=\"code\">super</code>\n                </li>\n                <li>\n                  <code class=\"code\">switch</code>\n                </li>\n                <li>\n                  <code class=\"code\">synchronized</code>\n                </li>\n                <li>\n                  <code class=\"code\">this</code>\n                </li>\n                <li>\n                  <code class=\"code\">throw</code>\n                </li>\n                <li>\n                  <code class=\"code\">throws</code>\n                </li>\n                <li>\n                  <code class=\"code\">transient</code>\n                </li>\n                <li>\n                  <code class=\"code\">try</code>\n                </li>\n                <li>\n                  <code class=\"code\">typeof</code>\n                </li>\n                <li>\n                  <code class=\"code\">var</code>\n                </li>\n                <li>\n                  <code class=\"code\">void</code>\n                </li>\n                <li>\n                  <code class=\"code\">volatile</code>\n                </li>\n                <li>\n                  <code class=\"code\">while</code>\n                </li>\n                <li>\n                  <code class=\"code\">with</code>\n                </li>\n            </ul>\n          </div>\n          <div title=\"Arrays\" class=\"section\">\n            <h2 class=\"title\">\n              Arrays\n            </h2>\n            <p>\n              Arrays are zero-indexed lists of values. They are a handy way to store a set of related items of the same type (such as strings), though in reality, an array can include multiple types of items, including other arrays.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>A simple array</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nvar myArray = [ 'hello', 'world' ];\n</pre>\n              </div>\n            </div>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Accessing array items by index</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nvar myArray = [ 'hello', 'world', 'foo', 'bar' ];\nconsole.log(myArray[3]);   // logs 'bar'\n</pre>\n              </div>\n            </div>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Testing the size of an array</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nvar myArray = [ 'hello', 'world' ];\nconsole.log(myArray.length);   // logs 2\n</pre>\n              </div>\n            </div>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Changing the value of an array item</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nvar myArray = [ 'hello', 'world' ];\nmyArray[1] = 'changed';\n</pre>\n              </div>\n            </div>\n            <p class=\"remark\">\n              <i><span class=\"remark\">While it's possible to change the value of an array item as shown in</span> “Changing the value of an array item”, it's generally not advised.</i>\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Adding elements to an array</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nvar myArray = [ 'hello', 'world' ];\nmyArray.push('new');\n</pre>\n              </div>\n            </div>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Working with arrays</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nvar myArray = [ 'h', 'e', 'l', 'l', 'o' ];\nvar myString = myArray.join('');   // 'hello'\nvar mySplit = myString.split('');  // [ 'h', 'e', 'l', 'l', 'o' ]\n</pre>\n              </div>\n            </div>\n          </div>\n          <h2 class=\"title\">\n            Objects\n          </h2>\n          <p>\n            Objects contain one or more key-value pairs. The key portion can be any string. The value portion can be any type of value: a number, a string, an array, a function, or even another object.\n          </p>\n          <p>\n            <span class=\"termdef\">[Definition: When one of these values is a function, it’s called a <em class=\"firstterm\">method</em> of the object.]</span> Otherwise, they are called properties.\n          </p>\n          <p>\n            As it turns out, nearly everything in JavaScript is an object — arrays, functions, numbers, even strings — and they all have properties and methods.\n          </p>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>Creating an \"object literal\"</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\nvar myObject = {\n    sayHello : function() {\n        console.log('hello');\n    },\n\n    myName : 'Rebecca'\n};\n\nmyObject.sayHello();            // logs 'hello'\nconsole.log(myObject.myName);   // logs 'Rebecca'\n</pre>\n            </div>\n          </div>\n          <div class=\"note\">\n          <h3 class=\"title\">\n            Note\n          </h3>\n          <p>\n            When creating object literals, you should note that the key portion of each key-value pair can be written as any valid JavaScript identifier, a string (wrapped in quotes) or a number:\n          </p>\n          <pre class=\"brush: js\">\nvar myObject = {\n    validIdentifier: 123,\n    'some string': 456,\n    99999: 789\n};\n</pre>\n          <p>\n            Object literals can be extremely useful for code organization; for more information, read <a href=\"http://rmurphey.com/blog/2009/10/15/using-objects-to-organize-your-code/\" class=\"ulink\">Using Objects to Organize Your Code</a> by Rebecca Murphey.\n          </p>\n          </div>\n          <div title=\"Functions\" class=\"section\">\n            <h2 class=\"title\">\n              Functions\n            </h2>\n            <p>\n              Functions contain blocks of code that need to be executed repeatedly. Functions can take zero or more arguments, and can optionally return a value.\n            </p>\n            <p>\n              Functions can be created in a variety of ways:\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Function Declaration</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nfunction foo() { /* do something */ }\n</pre>\n              </div>\n            </div>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Named Function Expression</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nvar foo = function() { /* do something */ }\n</pre>\n              </div>\n            </div>\n            <p class=\"remark\">\n              <i><span class=\"remark\">I prefer the named function expression method of setting a function's name, for some rather</span></i> <i><a href=\"http://yura.thinkweb2.com/named-function-expressions/\" class=\"ulink\">in-depth and technical reasons</a>. You are likely to see both methods used in others' JavaScript code.</i>\n            </p>\n            <div title=\"Using Functions\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Using Functions\n                </h3>\n              </div>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>A simple function</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\nvar greet = function(person, greeting) {\n    var text = greeting + ', ' + person;\n    console.log(text);\n};\n\n\ngreet('Rebecca', 'Hello');\n</pre>\n                </div>\n              </div>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>A function that returns a value</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\nvar greet = function(person, greeting) {\n    var text = greeting + ', ' + person;\n    return text;\n};\n\nconsole.log(greet('Rebecca','hello'));\n</pre>\n                </div>\n              </div>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>A function that returns another function</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\nvar greet = function(person, greeting) {\n    var text = greeting + ', ' + person;\n    return function() { console.log(text); };\n};\n\n\nvar greeting = greet('Rebecca', 'Hello');\ngreeting();\n</pre>\n                </div>\n              </div>\n            </div>\n            <div title=\"Self-Executing Anonymous Functions\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Self-Executing Anonymous Functions\n                </h3>\n              </div>\n              <p>\n                A common pattern in JavaScript is the self-executing anonymous\n                function. This pattern creates a function expression and then\n                immediately executes the function. This pattern is extremely\n                useful for cases where you want to avoid polluting the global\n                namespace with your code &mdash; no variables declared inside of the function are visible outside of it.\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>A self-executing anonymous function</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\n(function(){\n    var foo = 'Hello world';\n})();\n\n\nconsole.log(foo);   // undefined!\n</pre>\n                </div>\n              </div>\n            </div>\n            <div title=\"Functions as Arguments\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Functions as Arguments\n                </h3>\n              </div>\n              <p>\n                In JavaScript, functions are \"first-class citizens\" &mdash they can be assigned to variables or passed to other functions as arguments. Passing functions as arguments is an extremely common idiom in jQuery.\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Passing an anonymous function as an argument</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\nvar myFn = function(fn) {\n    var result = fn();\n    console.log(result);\n};\n\nmyFn(function() { return 'hello world'; });   // logs 'hello world'\n</pre>\n                </div>\n              </div>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Passing a named function as an argument</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\nvar myFn = function(fn) {\n    var result = fn();\n    console.log(result);\n};\n\nvar myOtherFn = function() {\n    return 'hello world';\n};\n\nmyFn(myOtherFn);   // logs 'hello world'\n</pre>\n                </div>\n              </div>\n            </div>\n          </div>\n          <div title=\"Testing Type\" class=\"section\">\n            <h2 class=\"title\">\n              Testing Type\n            </h2>\n            <p>\n              JavaScript offers a way to test the \"type\" of a variable.\n              However, the result can be confusing &mdash; for example, the type of an Array is \"object\".\n            </p>\n            <p>\n              It's common practice to use the <code class=\"code\">typeof</code> operator when trying to determining the type of a specific value.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Testing the type of various variables</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nvar myFunction = function() {\n    console.log('hello');\n};\n\nvar myObject = {\n    foo : 'bar'\n};\n\nvar myArray = [ 'a', 'b', 'c' ];\n\nvar myString = 'hello';\n\nvar myNumber = 3;\n\ntypeof myFunction;   // returns 'function'\ntypeof myObject;     // returns 'object'\ntypeof myArray;      // returns 'object' -- careful!\ntypeof myString;     // returns 'string';\ntypeof myNumber;     // returns 'number'\n\ntypeof null;         // returns 'object' -- careful!\n\n\nif (myArray.push &amp;&amp; myArray.slice &amp;&amp; myArray.join) {\n    // probably an array\n    // (this is called \"duck typing\")\n}\n\nif (Object.prototype.toString.call(myArray) === '[object Array]') {\n    // Definitely an array!\n    // This is widely considered as the most robust way\n    // to determine if a specific value is an Array.\n}\n</pre>\n              </div>\n            </div>\n            <p>\n              jQuery offers utility methods to help you determine the type of an arbitrary value. These will be covered later.\n            </p>\n          </div>\n          <h2 class=\"title\">\n            The <code class=\"code\">this</code> keyword\n          </h2>\n          <p>\n            In JavaScript, as in most object-oriented programming languages, <code class=\"code\">this</code> is a special keyword that is used within methods to refer to the object on which a method is being invoked. The value of <code class=\"code\">this</code> is determined using a simple series of steps:\n          </p>\n          <div class=\"orderedlist\">\n            <ol class=\"orderedlist\">\n              <li>If the function is invoked using <a href=\"https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/call\" class=\"ulink\">Function.call</a> or <a href=\"https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/apply\" class=\"ulink\">Function.apply</a>, <code class=\"code\">this</code> will be set to the first argument passed to call/apply. If the first argument passed to call/apply is <code class=\"code\">null</code> or <code class=\"code\">undefined</code>, <code class=\"code\">this</code> will refer to the global object (which is the <code class=\"code\">window</code> object in Web browsers).\n              </li>\n              <li>If the function being invoked was created using <a href=\"https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind\" class=\"ulink\">Function.bind</a>, <code class=\"code\">this</code> will be the first argument that was passed to bind at the time the function was created.\n              </li>\n              <li>If the function is being invoked as a method of an object, <code class=\"code\">this</code> will refer to that object.\n              </li>\n              <li>Otherwise, the function is being invoked as a standalone function not attached to any object, and <code class=\"code\">this</code> will refer to the global object.\n              </li>\n            </ol>\n          </div>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>A function invoked using Function.call</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\nvar myObject = {\n    sayHello : function() {\n        console.log('Hi! My name is ' + this.myName);\n    },\n\n    myName : 'Rebecca'\n};\n\nvar secondObject = {\n    myName : 'Colin'\n};\n\nmyObject.sayHello();                  // logs 'Hi! My name is Rebecca'\nmyObject.sayHello.call(secondObject); // logs 'Hi! My name is Colin'\n</pre>\n            </div>\n          </div>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>A function created using Function.bind</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\nvar myName = 'the global object',\n\n    sayHello = function () {\n        console.log('Hi! My name is ' + this.myName);\n    },\n\n    myObject = {\n        myName : 'Rebecca'\n    };\n\nvar myObjectHello = sayHello.bind(myObject);\n\nsayHello();       // logs 'Hi! My name is the global object'\nmyObjectHello();  // logs 'Hi! My name is Rebecca'\n</pre>\n            </div>\n          </div>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>A function being attached to an object at runtime</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\nvar myName = 'the global object',\n\n    sayHello = function() {\n        console.log('Hi! My name is ' + this.myName);\n    },\n\n    myObject = {\n        myName : 'Rebecca'\n    },\n\n    secondObject = {\n        myName : 'Colin'\n    };\n\nmyObject.sayHello = sayHello;\nsecondObject.sayHello = sayHello;\n\nsayHello();               // logs 'Hi! My name is the global object'\nmyObject.sayHello();      // logs 'Hi! My name is Rebecca'\nsecondObject.sayHello();  // logs 'Hi! My name is Colin'\n</pre>\n            </div>\n          </div>\n          <div class=\"note\">\n          <h3 class=\"title\">\n            Note\n          </h3>\n          <p>\n            When invoking a function deep within a long namespace, it is often tempting to reduce the amount of code you need to type by storing a reference to the actual function as a single, shorter variable. It is important not to do this with instance methods as this will cause the value of <code class=\"code\">this</code> within the function to change, leading to incorrect code operation. For instance:\n          </p>\n          <pre class=\"brush: js\">\nvar myNamespace = {\n    myObject : {\n        sayHello : function() {\n            console.log('Hi! My name is ' + this.myName);\n        },\n\n        myName : 'Rebecca'\n    }\n};\n\nvar hello = myNamespace.myObject.sayHello;\n\nhello();  // logs 'Hi! My name is undefined'\n</pre>\n          <p>\n            You can, however, safely reduce everything up to the object on which the method is invoked:\n          </p>\n          <pre class=\"brush: js\">\nvar myNamespace = {\n    myObject : {\n        sayHello : function() {\n            console.log('Hi! My name is ' + this.myName);\n        },\n\n        myName : 'Rebecca'\n    }\n};\n\nvar obj = myNamespace.myObject;\n\nobj.sayHello();  // logs 'Hi! My name is Rebecca'\n</pre>\n          </div>\n          <div title=\"Scope\" class=\"section\">\n            <h2 class=\"title\">\n              Scope\n            </h2>\n            <p>\n              \"Scope\" refers to the variables that are available to a piece of code at a given time. A lack of understanding of scope can lead to frustrating debugging experiences.\n            </p>\n            <p>\n              When a variable is declared inside of a function using the <code\n              class=\"code\">var</code> keyword, it is only available to code\n              inside of that function &mdash; code outside of that function cannot access the variable. On the other hand, functions defined <span class=\"emphasis\"><em>inside</em></span> that function <span class=\"emphasis\"><em>will</em></span> have access to to the declared variable.\n            </p>\n            <p>\n              Furthermore, variables that are declared inside a function\n              without the <code class=\"code\">var</code> keyword are not local\n              to the function &mdash; JavaScript will traverse the scope chain all the way up to the window scope to find where the variable was previously defined. If the variable wasn't previously defined, it will be defined in the global scope, which can have extremely unexpected consequences;\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Functions have access to variables defined in the same scope</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nvar foo = 'hello';\n\nvar sayHello = function() {\n    console.log(foo);\n};\n\nsayHello();         // logs 'hello'\nconsole.log(foo);   // also logs 'hello'\n</pre>\n              </div>\n            </div>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Code outside the scope in which a variable was defined does not have access to the variable</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nvar sayHello = function() {\n    var foo = 'hello';\n    console.log(foo);\n};\n\nsayHello();         // logs 'hello'\nconsole.log(foo);   // doesn't log anything\n</pre>\n              </div>\n            </div>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Variables with the same name can exist in different scopes with different values</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nvar foo = 'world';\n\nvar sayHello = function() {\n    var foo = 'hello';\n    console.log(foo);\n};\n\nsayHello();         // logs 'hello'\nconsole.log(foo);   // logs 'world'\n</pre>\n              </div>\n            </div>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Functions can \"see\" changes in variable values after the function is defined</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nvar myFunction = function() {\n    var foo = 'hello';\n\n    var myFn = function() {\n        console.log(foo);\n    };\n\n    foo = 'world';\n\n    return myFn;\n};\n\nvar f = myFunction();\nf();  // logs 'world' -- uh oh\n</pre>\n              </div>\n            </div>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Scope insanity</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n// a self-executing anonymous function\n(function() {\n    var baz = 1;\n    var bim = function() { alert(baz); };\n    bar = function() { alert(baz); };\n})();\n\nconsole.log(baz);  // baz is not defined outside of the function\n\nbar();  // bar is defined outside of the anonymous function\n        // because it wasn't declared with var; furthermore,\n        // because it was defined in the same scope as baz,\n        // it has access to baz even though other code\n        // outside of the function does not\n\nbim();  // bim is not defined outside of the anonymous function,\n        // so this will result in an error\n</pre>\n              </div>\n            </div>\n          </div>\n          <div title=\"Closures\" class=\"section\">\n            <h2 class=\"title\">\n              Closures\n            </h2>\n            <p>\n              Closures are an extension of the concept of scope — functions have access to variables that were available in the scope where the function was created. If that’s confusing, don’t worry: closures are generally best understood by example.\n            </p>\n            <p>\n              In “Functions can \"see\" changes in variable values after the\n              function is defined”, we saw how functions have access to\n              changing variable values. The same sort of behavior exists with\n              functions defined within loops &mdash; the function \"sees\" the change in the variable's value even after the function is defined, resulting in all clicks alerting 5.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>How to lock in the value of <code class=\"code\">i</code>?</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n/* this won't behave as we want it to; */\n/* every click will alert 5 */\nfor (var i=0; i&lt;5; i++) {\n    $('&lt;p&gt;click me&lt;/p&gt;').appendTo('body').click(function() {\n        alert(i);\n    });\n}\n</pre>\n              </div>\n            </div>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Locking in the value of <code class=\"code\">i</code> with a closure</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n/* fix: “close” the value of i inside createFunction, so it won't change */\nvar createFunction = function(i) {\n    return function() { alert(i); };\n};\n\nfor (var i=0; i&lt;5; i++) {\n    $('&lt;p&gt;click me&lt;/p&gt;').appendTo('body').click(createFunction(i));\n}\n</pre>\n              </div>\n            </div>\n            <p>\n              Closures can also be used to resolve issues with the <code class=\"code\">this</code> keyword, which is unique to each scope:\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Using a closure to access inner and outer object instances simultaneously</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nvar outerObj = {\n    myName : 'outer',\n    outerFunction : function () {\n\n        // provide a reference to outerObj through innerFunction's closure\n        var self = this;\n\n        var innerObj = {\n            myName : 'inner',\n            innerFunction : function () {\n                console.log(self.myName, this.myName); // logs 'outer inner'\n            }\n        };\n\n        innerObj.innerFunction();\n\n        console.log(this.myName); // logs 'outer'\n    }\n};\n\nouterObj.outerFunction();\n</pre>\n              </div>\n            </div>\n            <p>\n              This mechanism can be particularly useful when dealing with callbacks, though in those cases, it is often better to use <a href=\"https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind\" class=\"ulink\">Function.bind</a>, which will avoid any overhead associated with scope traversal.\n            </p>\n          </div>\n        </div>\n      </div>       <div title=\"Part&nbsp;II.&nbsp;jQuery: Basic Concepts\" class=\"part\">\n        <div class=\"titlepage\">\n          <div>\n            <div>\n              <h1 class=\"title\">\n                Part&nbsp;II.&nbsp;jQuery: Basic Concepts\n              </h1>\n            </div>\n          </div>\n        </div>\n             <div title=\"jQuery Basics\" class=\"chapter\">\n          <div class=\"titlepage\">\n            <div>\n              <div>\n                <h2 class=\"title\">\n                  jQuery Basics\n                </h2>\n              </div>\n            </div>\n          </div>\n          <div title=\"$(document).ready()\" class=\"section\">\n            <h2 class=\"title\">\n              $(document).ready()\n            </h2>\n            <p>\n              You cannot safely manipulate a page until the document is “ready.” jQuery detects this state of readiness for you; code included inside <code class=\"code\">$(document).ready()</code> will only run once the page is ready for JavaScript code to execute.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>A $(document).ready() block</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$(document).ready(function() {\n    console.log('ready!');\n});\n</pre>\n              </div>\n            </div>\n            <p>\n              There is a shorthand for <code class=\"code\">$(document).ready()</code> that you will sometimes see; however, I recommend against using it if you are writing code that people who aren't experienced with jQuery may see.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Shorthand for $(document).ready()</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$(function() {\n    console.log('ready!');\n});\n</pre>\n              </div>\n            </div>\n            <p>\n              You can also pass a named function to <code class=\"code\">$(document).ready()</code> instead of passing an anonymous function.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Passing a named function instead of an anonymous function</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nfunction readyFn() {\n    // code to run when the document is ready\n}\n\n\n$(document).ready(readyFn);\n</pre>\n              </div>\n            </div>\n          </div>\n          <h2 class=\"title\">\n            Selecting Elements\n          </h2>\n          <p>\n            The most basic concept of jQuery is to “select some elements and do something with them.” jQuery supports most CSS3 selectors, as well as some non-standard selectors. For a complete selector reference, visit <a href=\"http://api.jquery.com/category/selectors/\" class=\"ulink\">http://api.jquery.com/category/selectors/</a>.\n          </p>\n          <p>\n            Following are a few examples of common selection techniques.\n          </p>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>Selecting elements by ID</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\n$('#myId'); // note IDs must be unique per page\n</pre>\n            </div>\n          </div>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>Selecting elements by class name</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\n$('div.myClass'); // performance improves if you specify element type\n</pre>\n            </div>\n          </div>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>Selecting elements by attribute</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\n$('input[name=first_name]'); // beware, this can be very slow\n</pre>\n            </div>\n          </div>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>Selecting elements by compound CSS selector</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\n$('#contents ul.people li');\n</pre>\n            </div>\n          </div>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>Pseudo-selectors</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\n$('a.external:first');\n$('tr:odd');\n$('#myForm :input');   // select all input-like elements in a form\n$('div:visible');\n$('div:gt(2)');        // all except the first three divs\n$('div:animated');     // all currently animated divs\n</pre>\n            </div>\n          </div>\n          <div>\n          <h3 class=\"title\">\n            Note\n          </h3>\n          <p>\n            When you use the <code class=\"code\">:visible</code> and <code class=\"code\">:hidden</code> pseudo-selectors, jQuery tests the actual visibility of the element, not its CSS visibility or display — that is, it looks to see if the element's <span class=\"emphasis\"><em>physical height and width on the page</em></span> are both greater than zero. However, this test doesn't work with <code class=\"code\">&lt;tr&gt;</code> elements; in this case, jQuery does check the CSS <code class=\"code\">display</code> property, and considers an element hidden if its <code class=\"code\">display</code> property is set to <code class=\"code\">none</code>. Elements that have not been added to the DOM will always be considered hidden, even if the CSS that would affect them would render them visible. (See the Manipulation section later in this chapter to learn how to create and add elements to the DOM.)\n          </p>\n          <p>\n            For reference, here is the code jQuery uses to determine whether an element is visible or hidden, with comments added for clarity:\n          </p>\n          <pre class=\"brush: js\">\njQuery.expr.filters.hidden = function( elem ) {\n    var width = elem.offsetWidth, height = elem.offsetHeight,\n        skip = elem.nodeName.toLowerCase() === \"tr\";\n\n    // does the element have 0 height, 0 width,\n    // and it's not a &lt;tr&gt;?\n    return width === 0 &amp;&amp; height === 0 &amp;&amp; !skip ?\n\n        // then it must be hidden\n        true :\n\n        // but if it has width and height\n        // and it's not a &lt;tr&gt;\n        width &gt; 0 &amp;&amp; height &gt; 0 &amp;&amp; !skip ?\n\n            // then it must be visible\n            false :\n\n            // if we get here, the element has width\n            // and height, but it's also a &lt;tr&gt;,\n            // so check its display property to\n            // decide whether it's hidden\n            jQuery.curCSS(elem, \"display\") === \"none\";\n};\n\njQuery.expr.filters.visible = function( elem ) {\n    return !jQuery.expr.filters.hidden( elem );\n};\n</pre>\n          </div>\n          <div title=\"Choosing Selectors\" class=\"sidebar\">\n            <p class=\"title\">\n              <b>Choosing Selectors</b>\n            </p>\n            <p>\n              Choosing good selectors is one way to improve the performance of your JavaScript. A little specificity — for example, including an element type such as <code class=\"code\">div</code> when selecting elements by class name — can go a long way. Generally, any time you can give jQuery a hint about where it might expect to find what you're looking for, you should. On the other hand, too much specificity can be a bad thing. A selector such as <code class=\"code\">#myTable thead tr th.special</code> is overkill if a selector such as <code class=\"code\">#myTable th.special</code> will get you what you want.\n            </p>\n            <p>\n              jQuery offers many attribute-based selectors, allowing you to make selections based on the content of arbitrary attributes using simplified regular expressions.\n            </p>\n            <pre class=\"brush: js\">\n// find all &lt;a&gt;s whose rel attribute\n// ends with \"thinger\"\n$(\"a[rel$='thinger']\");\n</pre>\n            <p>\n              While these can be useful in a pinch, they can also be extremely slow — I once wrote an attribute-based selector that locked up my page for multiple seconds. Wherever possible, make your selections using IDs, class names, and tag names.\n            </p>\n            <p>\n              Want to know more? <a href=\"http://paulirish.com/perf\" class=\"ulink\">Paul Irish has a great presentation about improving performance in JavaScript</a>, with several slides focused specifically on selector performance.\n            </p>\n          </div>\n          <div title=\"Does My Selection Contain Any Elements?\" class=\"section\">\n            <div class=\"titlepage\">\n              <h3 class=\"title\">\n                Does My Selection Contain Any Elements?\n              </h3>\n            </div>\n            <p>\n              Once you've made a selection, you'll often want to know whether you have anything to work with. You may be inclined to try something like:\n            </p>\n            <pre class=\"brush: js\">\nif ($('div.foo')) { ... }\n</pre>\n            <p>\n              This won't work. When you make a selection using <code class=\"code\">$()</code>, an object is always returned, and objects always evaluate to <code class=\"code\">true</code>. Even if your selection doesn't contain any elements, the code inside the <code class=\"code\">if</code> statement will still run.\n            </p>\n            <p>\n              Instead, you need to test the selection's length property, which tells you how many elements were selected. If the answer is 0, the length property will evaluate to false when used as a boolean value.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Testing whether a selection contains elements</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nif ($('div.foo').length) { ... }\n</pre>\n              </div>\n            </div>\n          </div>\n          <div class=\"titlepage\">\n            <h3 class=\"title\">\n              Saving Selections\n            </h3>\n          </div>\n          <p>\n            Every time you make a selection, a lot of code runs, and jQuery doesn't do caching of selections for you. If you've made a selection that you might need to make again, you should save the selection in a variable rather than making the selection repeatedly.\n          </p>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>Storing selections in a variable</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\nvar $divs = $('div');\n</pre>\n            </div>\n          </div>\n          <div class=\"note\">\n          <h3 class=\"title\">\n            Note\n          </h3>\n          <p>\n            In “Storing selections in a variable”, the variable name begins\n            with a dollar sign. Unlike in other languages, there's nothing\n            special about the dollar sign in JavaScript &mdash; it's just\n            another character. We use it here to indicate that the variable\n            contains a jQuery object. This practice &mdash; a sort of <a\n            href=\"http://en.wikipedia.org/wiki/Hungarian_notation\"\n            class=\"ulink\">Hungarian notation</a> &mdash; is merely convention, and is not mandatory.\n          </p>\n          </div>\n          <p>\n            Once you've stored your selection, you can call jQuery methods on the variable you stored it in just like you would have called them on the original selection.\n          </p>\n          <div class=\"note\">\n          <h3 class=\"title\">\n            Note\n          </h3>\n          <p>\n            A selection only fetches the elements that are on the page when you make the selection. If you add elements to the page later, you'll have to repeat the selection or otherwise add them to the selection stored in the variable. Stored selections don't magically update when the DOM changes.\n          </p>\n          </div>\n          <div title=\"Refining &amp; Filtering Selections\" class=\"section\">\n            <div class=\"titlepage\">\n              <h3 class=\"title\">\n                Refining &amp; Filtering Selections\n              </h3>\n            </div>\n            <p>\n              Sometimes you have a selection that contains more than what you're after; in this case, you may want to refine your selection. jQuery offers several methods for zeroing in on exactly what you're after.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Refining selections</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('div.foo').has('p');          // div.foo elements that contain &lt;p&gt;'s\n$('h1').not('.bar');            // h1 elements that don't have a class of bar\n$('ul li').filter('.current');  // unordered list items with class of current\n$('ul li').first();             // just the first unordered list item\n$('ul li').eq(5);               // the sixth\n</pre>\n              </div>\n            </div>\n          </div>\n          <div title=\"Selecting Form Elements\" class=\"section\">\n            <div class=\"titlepage\">\n              <h3 class=\"title\">\n                Selecting Form Elements\n              </h3>\n            </div>\n            <p>\n              jQuery offers several pseudo-selectors that help you find elements in your forms; these are especially helpful because it can be difficult to distinguish between form elements based on their state or type using standard CSS selectors.\n            </p>\n            <div class=\"variablelist\">\n              <dl>\n                <dt>\n                  <span class=\"term\">:button</span>\n                </dt>\n                <dd>\n                  <p>\n                    Selects <code class=\"code\">&lt;button&gt;</code> elements and elements with <code class=\"code\">type=\"button\"</code>\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">:checkbox</span>\n                </dt>\n                <dd>\n                  <p>\n                    Selects inputs with <code class=\"code\">type=\"checkbox\"</code>\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">:checked</span>\n                </dt>\n                <dd>\n                  <p>\n                    Selects checked inputs\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">:disabled</span>\n                </dt>\n                <dd>\n                  <p>\n                    Selects disabled form elements\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">:enabled</span>\n                </dt>\n                <dd>\n                  <p>\n                    Selects enabled form elements\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">:file</span>\n                </dt>\n                <dd>\n                  <p>\n                    Selects inputs with <code class=\"code\">type=\"file\"</code>\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">:image</span>\n                </dt>\n                <dd>\n                  <p>\n                    Selects inputs with <code class=\"code\">type=\"image\"</code>\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">:input</span>\n                </dt>\n                <dd>\n                  <p>\n                    Selects <code class=\"code\">&lt;input&gt;</code>, <code class=\"code\">&lt;textarea&gt;</code>, and <code class=\"code\">&lt;select&gt;</code> elements\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">:password</span>\n                </dt>\n                <dd>\n                  <p>\n                    Selects inputs with <code class=\"code\">type=\"password\"</code>\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">:radio</span>\n                </dt>\n                <dd>\n                  <p>\n                    Selects inputs with <code class=\"code\">type=\"radio\"</code>\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">:reset</span>\n                </dt>\n                <dd>\n                  <p>\n                    Selects inputs with <code class=\"code\">type=\"reset\"</code>\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">:selected</span>\n                </dt>\n                <dd>\n                  <p>\n                    Selects options that are selected\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">:submit</span>\n                </dt>\n                <dd>\n                  <p>\n                    Selects inputs with <code class=\"code\">type=\"submit\"</code>\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">:text</span>\n                </dt>\n                <dd>\n                  <p>\n                    Selects inputs with <code class=\"code\">type=\"text\"</code>\n                  </p>\n                </dd>\n              </dl>\n            </div>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Using form-related pseduo-selectors</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('#myForm :input'); // get all elements that accept input\n</pre>\n              </div>\n            </div>\n          </div>\n          <div title=\"Working with Selections\" class=\"section\">\n            <h2 class=\"title\">\n              Working with Selections\n            </h2>\n            <p>\n              Once you have a selection, you can call methods on the selection. Methods generally come in two different flavors: getters and setters. Getters return a property of the first selected element; setters set a property on all selected elements.\n            </p>\n            <div class=\"titlepage\">\n              <h3 class=\"title\">\n                Chaining\n              </h3>\n            </div>\n            <p>\n              If you call a method on a selection and that method returns a jQuery object, you can continue to call jQuery methods on the object without pausing for a semicolon.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Chaining</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('#content').find('h3').eq(2).html('new text for the third h3!');\n</pre>\n              </div>\n            </div>\n            <p>\n              If you are writing a chain that includes several steps, you (and the person who comes after you) may find your code more readable if you break the chain over several lines.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Formatting chained code</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('#content')\n    .find('h3')\n    .eq(2)\n    .html('new text for the third h3!');\n</pre>\n              </div>\n            </div>\n            <p>\n              If you change your selection in the midst of a chain, jQuery provides the <code class=\"code\">$.fn.end</code> method to get you back to your original selection.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Restoring your original selection using <code class=\"code\">$.fn.end</code></b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('#content')\n    .find('h3')\n    .eq(2)\n        .html('new text for the third h3!')\n    .end() // restores the selection to all h3's in #content\n    .eq(0)\n        .html('new text for the first h3!');\n</pre>\n              </div>\n            </div>\n            <div class=\"note\">\n            <h3 class=\"title\">\n              Note\n            </h3>\n            <p>\n              Chaining is extraordinarily powerful, and it's a feature that\n              many libraries have adapted since it was made popular by jQuery.\n              However, it must be used with care. Extensive chaining can make\n              code extremely difficult to modify or debug. There is no\n              hard-and-fast rule to how long a chain should be &mdash; just know that it is easy to get carried away.\n            </p>\n            </div>\n            <div title=\"Getters &amp; Setters\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Getters &amp; Setters\n                </h3>\n              </div>\n              <p>\n                jQuery “overloads” its methods, so the method used to set a value generally has the same name as the method used to get a value. When a method is used to set a value, it is called a setter. When a method is used to get (or read) a value, it is called a getter. Setters affect all elements in a selection; getters get the requested value only for the first element in the selection.\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>The <code class=\"code\">$.fn.html</code> method used as a setter</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\n$('h1').html('hello world');\n</pre>\n                </div>\n              </div>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>The html method used as a getter</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\n$('h1').html();\n</pre>\n                </div>\n              </div>\n              <p>\n                Setters return a jQuery object, allowing you to continue to call jQuery methods on your selection; getters return whatever they were asked to get, meaning you cannot continue to call jQuery methods on the value returned by the getter.\n              </p>\n            </div>\n          </div>\n          <h2 class=\"title\">\n            CSS, Styling, &amp; Dimensions\n          </h2>\n          <p>\n            jQuery includes a handy way to get and set CSS properties of elements.\n          </p>\n          <div class=\"note\">\n          <h3 class=\"title\">\n            Note\n          </h3>\n          <p>\n            CSS properties that normally include a hyphen need to be <em class=\"firstterm\">camel cased</em> in JavaScript. For example, the CSS property <code class=\"code\">font-size</code> is expressed as <code class=\"code\">fontSize</code> when used as a property name in JavaScript. This does not apply, however, when passing the name of a CSS property to the <code class=\"code\">$.fn.css</code> method as a string &mdash; in that case, either the camel cased or hyphenated form will work.</p>\n          </p>\n          </div>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>Getting CSS properties</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\n$('h1').css('fontSize'); // returns a string such as \"19px\"\n$('h1').css('font-size'); // also works\n</pre>\n            </div>\n          </div>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>Setting CSS properties</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\n$('h1').css('fontSize', '100px'); // setting an individual property\n$('h1').css({ 'fontSize' : '100px', 'color' : 'red' }); // setting multiple properties\n</pre>\n            </div>\n          </div>\n          <p class=\"remark\">\n            <i><span class=\"remark\">Note the style of the argument we use on\n            the second line &mdash; it is an object that contains multiple properties. This is a common way to pass multiple arguments to a function, and many jQuery setter methods accept objects to set mulitple values at once.</span></i>\n          </p>\n          <div title=\"Using CSS Classes for Styling\" class=\"section\">\n            <div class=\"titlepage\">\n              <h3 class=\"title\">\n                Using CSS Classes for Styling\n              </h3>\n            </div>\n            <p>\n              As a getter, the <code class=\"code\">$.fn.css</code> method is valuable; however, it should generally be avoided as a setter in production-ready code, because you don't want presentational information in your JavaScript. Instead, write CSS rules for classes that describe the various visual states, and then simply change the class on the element you want to affect.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Working with classes</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nvar $h1 = $('h1');\n\n$h1.addClass('big');\n$h1.removeClass('big');\n$h1.toggleClass('big');\n\nif ($h1.hasClass('big')) { ... }\n</pre>\n              </div>\n            </div>\n            <p>\n              Classes can also be useful for storing state information about an element, such as indicating that an element is selected.\n            </p>\n          </div>\n          <div title=\"Dimensions\" class=\"section\">\n            <div class=\"titlepage\">\n              <h3 class=\"title\">\n                Dimensions\n              </h3>\n            </div>\n            <p>\n              jQuery offers a variety of methods for obtaining and modifying dimension and position information about an element.\n            </p>\n            <p>\n              The code in “Basic dimensions methods”, is just a very brief overview of the dimensions functionality in jQuery; for complete details about jQuery dimension methods, visit <a href=\"http://api.jquery.com/category/dimensions/\" class=\"ulink\">http://api.jquery.com/category/dimensions/</a>.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Basic dimensions methods</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('h1').width('50px');   // sets the width of all H1 elements\n$('h1').width();         // gets the width of the first H1\n\n$('h1').height('50px');  // sets the height of all H1 elements\n$('h1').height();        // gets the height of the first H1\n\n$('h1').position();      // returns an object containing position\n                         // information for the first H1 relative to\n                         // its \"offset (positioned) parent\"\n</pre>\n              </div>\n            </div>\n          </div>\n          <div title=\"Attributes\" class=\"section\">\n            <h2 class=\"title\">\n              Attributes\n            </h2>\n            <p>\n              An element's attributes can contain useful information for your application, so it's important to be able to get and set them.\n            </p>\n            <p>\n              The <code class=\"code\">$.fn.attr</code> method acts as both a getter and a setter. As with the <code class=\"code\">$.fn.css</code> method, <code class=\"code\">$.fn.attr</code> as a setter can accept either a key and a value, or an object containing one or more key/value pairs.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Setting attributes</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('a').attr('href', 'allMyHrefsAreTheSameNow.html');\n$('a').attr({\n    'title' : 'all titles are the same too!',\n    'href' : 'somethingNew.html'\n});\n</pre>\n              </div>\n            </div>\n            <p class=\"remark\">\n              <i><span class=\"remark\">This time, we broke the object up into multiple lines. Remember, whitespace doesn't matter in JavaScript, so you should feel free to use it liberally to make your code more legible! You can use a minification tool later to strip out unnecessary whitespace for production.</span></i>\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Getting attributes</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('a').attr('href');  // returns the href for the first a element in the document\n</pre>\n              </div>\n            </div>\n          </div>\n          <h2 class=\"title\">\n            Traversing\n          </h2>\n          <p>\n            Once you have a jQuery selection, you can find other elements using your selection as a starting point.\n          </p>\n          <p>\n            For complete documentation of jQuery traversal methods, visit <a href=\"http://api.jquery.com/category/traversing/\" class=\"ulink\">http://api.jquery.com/category/traversing/</a>.\n          </p>\n          <div class=\"note\">\n          <h3 class=\"title\">\n            Note\n          </h3>\n          <p>\n            Be cautious with traversing long distances in your documents\n            &mdash; complex traversal makes it imperative that your document's structure remain the same, something that's difficult to guarantee even if you're the one creating the whole application from server to client. One- or two-step traversal is fine, but you generally want to avoid traversals that take you from one container to another.\n          </p>\n          </div>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>Moving around the DOM using traversal methods</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\n$('h1').next('p');\n$('div:visible').parent();\n$('input[name=first_name]').closest('form');\n$('#myList').children();\n$('li.selected').siblings();\n</pre>\n            </div>\n          </div>\n          <p>\n            You can also iterate over a selection using <code class=\"code\">$.fn.each</code>. This method iterates over all of the elements in a selection, and runs a function for each one. The function receives the index of the current element and the DOM element itself as arguments. Inside the function, the DOM element is also available as <code class=\"code\">this</code> by default.\n          </p>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>Iterating over a selection</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\n$('#myList li').each(function(idx, el) {\n    console.log(\n        'Element ' + idx +\n        'has the following html: ' +\n        $(el).html()\n    );\n});\n</pre>\n            </div>\n          </div>\n          <div title=\"Manipulating Elements\" class=\"section\">\n            <h2 class=\"title\">\n              Manipulating Elements\n            </h2>\n            <p>\n              Once you've made a selection, the fun begins. You can change, move, remove, and clone elements. You can also create new elements via a simple syntax.\n            </p>\n            <p>\n              For complete documentation of jQuery manipulation methods, visit <a href=\"http://api.jquery.com/category/manipulation/\" class=\"ulink\">http://api.jquery.com/category/manipulation/</a>.\n            </p>\n            <div class=\"titlepage\">\n              <h3 class=\"title\">\n                Getting and Setting Information about Elements\n              </h3>\n            </div>\n            <p>\n              There are any number of ways you can change an existing element. Among the most common tasks you'll perform is changing the inner HTML or attribute of an element. jQuery offers simple, cross-browser methods for these sorts of manipulations. You can also get information about elements using many of the same methods in their getter incarnations. We'll see examples of these throughout this section, but specifically, here are a few methods you can use to get and set information about elements.\n            </p>\n            <div class=\"note\">\n            <h3 class=\"title\">\n              Note\n            </h3>\n            <p>\n              Changing things about elements is trivial, but remember that the change will affect <span class=\"emphasis\"><em>all</em></span> elements in the selection, so if you just want to change one element, be sure to specify that in your selection before calling a setter method.\n            </p>\n            </div>\n            <div class=\"note\">\n            <h3 class=\"title\">\n              Note\n            </h3>\n            <p>\n              When methods act as getters, they generally only work on the first element in the selection, and they do not return a jQuery object, so you can't chain additional methods to them. One notable exception is <code class=\"code\">$.fn.text</code>; as mentioned below, it gets the text for all elements in the selection.\n            </p>\n            </div>\n            <div class=\"variablelist\">\n              <dl>\n                <dt>\n                  <span class=\"term\">$.fn.html</span>\n                </dt>\n                <dd>\n                  <p>\n                    Get or set the html contents.\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">$.fn.text</span>\n                </dt>\n                <dd>\n                  <p>\n                    Get or set the text contents; HTML will be stripped.\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">$.fn.attr</span>\n                </dt>\n                <dd>\n                  <p>\n                    Get or set the value of the provided attribute.\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">$.fn.width</span>\n                </dt>\n                <dd>\n                  <p>\n                    Get or set the width in pixels of the first element in the selection as an integer.\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">$.fn.height</span>\n                </dt>\n                <dd>\n                  <p>\n                    Get or set the height in pixels of the first element in the selection as an integer.\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">$.fn.position</span>\n                </dt>\n                <dd>\n                  <p>\n                    Get an object with position information for the first element in the selection, relative to its first positioned ancestor. <span class=\"emphasis\"><em>This is a getter only.</em></span>\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">$.fn.val</span>\n                </dt>\n                <dd>\n                  <p>\n                    Get or set the value of form elements.\n                  </p>\n                </dd>\n              </dl>\n            </div>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Changing the HTML of an element</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('#myDiv p:first')\n    .html('New &lt;strong&gt;first&lt;/strong&gt; paragraph!');\n</pre>\n              </div>\n            </div>\n            <div title=\"Moving, Copying, and Removing Elements\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Moving, Copying, and Removing Elements\n                </h3>\n              </div>\n              <p>\n                There are a variety of ways to move elements around the DOM; generally, there are two approaches:\n              </p>\n              <ul>\n                <li>\n                  <p>\n                    Place the selected element(s) relative to another element\n                  </p>\n                </li>\n                <li>\n                  <p>\n                    Place an element relative to the selected element(s)\n                  </p>\n                </li>\n              </ul>\n              <p>\n                For example, jQuery provides <code class=\"code\">$.fn.insertAfter</code> and <code class=\"code\">$.fn.after</code>. The <code class=\"code\">$.fn.insertAfter</code> method places the selected element(s) after the element that you provide as an argument; the <code class=\"code\">$.fn.after</code> method places the element provided as an argument after the selected element. Several other methods follow this pattern: <code class=\"code\">$.fn.insertBefore</code> and <code class=\"code\">$.fn.before</code>; <code class=\"code\">$.fn.appendTo</code> and <code class=\"code\">$.fn.append</code>; and <code class=\"code\">$.fn.prependTo</code> and <code class=\"code\">$.fn.prepend</code>.\n              </p>\n              <p>\n                The method that makes the most sense for you will depend on\n                what elements you already have selected, and whether you will\n                need to store a reference to the elements you're adding to the\n                page. If you need to store a reference, you will always want to\n                take the first approach &mdash; placing the selected elements\n                relative to another element &mdash; as it returns the element(s) you're placing. In this case, <code class=\"code\">$.fn.insertAfter</code>, <code class=\"code\">$.fn.insertBefore</code>, <code class=\"code\">$.fn.appendTo</code>, and <code class=\"code\">$.fn.prependTo</code> will be your tools of choice.\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Moving elements using different approaches</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\n// make the first list item the last list item\nvar $li = $('#myList li:first').appendTo('#myList');\n\n// another approach to the same problem\n$('#myList').append($('#myList li:first'));\n\n// note that there's no way to access the\n// list item that we moved, as this returns\n// the list itself\n</pre>\n                </div>\n              </div>\n              <div class=\"titlepage\">\n                <h4 class=\"title\">\n                  Cloning Elements\n                </h4>\n              </div>\n              <p>\n                When you use methods such as $.fn.appendTo, you are moving the element; sometimes you want to make a copy of the element instead. In this case, you'll need to use $.fn.clone first.\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Making a copy of an element</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\n// copy the first list item to the end of the list\n$('#myList li:first').clone().appendTo('#myList');\n</pre>\n                </div>\n              </div>\n              <div class=\"note\">\n              <h3 class=\"title\">\n                Note\n              </h3>\n              <p>\n                If you need to copy related data and events, be sure to pass <code class=\"code\">true</code> as an argument to <code class=\"code\">$.fn.clone</code>.\n              </p>\n              </div>\n              <div class=\"titlepage\">\n                <h4 class=\"title\">\n                  Removing Elements\n                </h4>\n              </div>\n              <p>\n                There are two ways to remove elements from the page: <code class=\"code\">$.fn.remove</code> and <code class=\"code\">$.fn.detach</code>. You'll use <code class=\"code\">$.fn.remove</code> when you want to permanently remove the selection from the page; while the method does return the removed element(s), those elements will not have their associated data and events attached to them if you return them to the page.\n              </p>\n              <p>\n                If you need the data and events to persist, you'll want to use <code class=\"code\">$.fn.detach</code> instead. Like <code class=\"code\">$.fn.remove</code>, it returns the selection, but it also maintains the data and events associated with the selection, so you can restore the selection to the page at a later time.\n              </p>\n              <div class=\"note\">\n              <h3 class=\"title\">\n                Note\n              </h3>\n              <p>\n                The <code class=\"code\">$.fn.detach</code> method is extremely valuable if you are doing heavy manipulation to an element. In that case, it's beneficial to <code class=\"code\">$.fn.detach</code> the element from the page, work on it in your code, and then restore it to the page when you're done. This saves you from expensive \"DOM touches\" while maintaining the element's data and events.\n              </p>\n              </div>\n              <p>\n                If you want to leave the element on the page but simply want to remove its contents, you can use <code class=\"code\">$.fn.empty</code> to dispose of the element's inner HTML.\n              </p>\n            </div>\n            <div class=\"titlepage\">\n              <h3 class=\"title\">\n                Creating New Elements\n              </h3>\n            </div>\n            <p>\n              jQuery offers a trivial and elegant way to create new elements using the same <code class=\"code\">$()</code> method you use to make selections.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Creating new elements</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('&lt;p&gt;This is a new paragraph&lt;/p&gt;');\n$('&lt;li class=\"new\"&gt;new list item&lt;/li&gt;');\n</pre>\n              </div>\n            </div>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Creating a new element with an attribute object</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('&lt;a/&gt;', {\n    html : 'This is a &lt;strong&gt;new&lt;/strong&gt; link',\n    'class' : 'new',\n    href : 'foo.html'\n});\n</pre>\n              </div>\n            </div>\n            <p class=\"remark\">\n              <i><span class=\"remark\">Note that in the attributes object we included as the second argument, the property name class is quoted, while the property names text and href are not. Property names generally do not need to be quoted unless they are reserved words (as class is in this case).</span></i>\n            </p>\n            <p>\n              When you create a new element, it is not immediately added to the page. There are several ways to add an element to the page once it's been created.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Getting a new element on to the page</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nvar $myNewElement = $('&lt;p&gt;New element&lt;/p&gt;');\n$myNewElement.appendTo('#content');\n\n$myNewElement.insertAfter('ul:last'); // this will remove the p from #content!\n$('ul').last().after($myNewElement.clone());  // clone the p so now we have 2\n</pre>\n              </div>\n            </div>\n            <p class=\"remark\">\n              <i><span class=\"remark\">Strictly speaking, you don't have to\n              store the created element in a variable &mdash; you could just call the method to add the element to the page directly after the $(). However, most of the time you will want a reference to the element you added, so you don't need to select it later.</span></i>\n            </p>\n            <p>\n              You can even create an element as you're adding it to the page, but note that in this case you don't get a reference to the newly created element.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Creating and adding an element to the page at the same time</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('ul').append('&lt;li&gt;list item&lt;/li&gt;');\n</pre>\n              </div>\n            </div>\n            <div class=\"note\">\n            <h3 class=\"title\">\n              Note\n            </h3>\n            <p>\n              The syntax for adding new elements to the page is so easy, it's tempting to forget that there's a huge performance cost for adding to the DOM repeatedly. If you are adding many elements to the same container, you'll want to concatenate all the html into a single string, and then append that string to the container instead of appending the elements one at a time. You can use an array to gather all the pieces together, then <code class=\"code\">join</code> them into a single string for appending.\n            </p>\n            <pre class=\"brush: js\">\nvar myItems = [], $myList = $('#myList');\n\nfor (var i=0; i&lt;100; i++) {\n    myItems.push('&lt;li&gt;item ' + i + '&lt;/li&gt;');\n}\n\n$myList.append(myItems.join(''));\n</pre>\n            </div>\n            <div title=\"Manipulating Attributes\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Manipulating Attributes\n                </h3>\n              </div>\n              <p>\n                jQuery's attribute manipulation capabilities are extensive. Basic changes are simple, but the $.fn.attr method also allows for more complex manipulations. It can either set an explicit value, or set a value using the return value of a function. When the function syntax is used, the function receives two arguments: the zero-based index of the element whose attribute is being changed, and the current value of the attribute being changed.\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Manipulating a single attribute</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\n$('#myDiv a:first').attr('href', 'newDestination.html');\n</pre>\n                </div>\n              </div>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Manipulating multiple attributes</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\n$('#myDiv a:first').attr({\n    href : 'newDestination.html',\n    rel : 'super-special'\n});\n</pre>\n                </div>\n              </div>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Using a function to determine an attribute's new value</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\n$('#myDiv a:first').attr({\n    rel : 'super-special',\n    href : function(idx, href) {\n        return '/new/' + href;\n    }\n});\n\n$('#myDiv a:first').attr('href', function(idx, href) {\n    return '/new/' + href;\n});\n</pre>\n                </div>\n              </div>\n            </div>\n          </div>\n          <div title=\"Exercises\" class=\"section\">\n            <h2 class=\"title\">\n              Exercises\n            </h2>\n            <div title=\"Selecting\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Selecting\n                </h3>\n              </div>\n              <p>\n                Open the file <code class=\"filename\">/exercises/index.html</code> in your browser. Use the file <code class=\"filename\">/exercises/js/sandbox.js</code> or work in Firebug to accomplish the following:\n              </p>\n              <div class=\"orderedlist\">\n                <ol class=\"orderedlist\">\n                  <li>\n                    <p>\n                      Select all of the div elements that have a class of \"module\".\n                    </p>\n                  </li>\n                  <li>\n                    <p>\n                      Come up with three selectors that you could use to get the third item in the #myList unordered list. Which is the best to use? Why?\n                    </p>\n                  </li>\n                  <li>\n                    <p>\n                      Select the label for the search input using an attribute selector.\n                    </p>\n                  </li>\n                  <li>\n                    <p>\n                      Figure out how many elements on the page are hidden (hint: .length).\n                    </p>\n                  </li>\n                  <li>\n                    <p>\n                      Figure out how many image elements on the page have an alt attribute.\n                    </p>\n                  </li>\n                  <li>\n                    <p>\n                      Select all of the odd table rows in the table body.\n                    </p>\n                  </li>\n                </ol>\n              </div>\n            </div>\n            <div title=\"Traversing\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Traversing\n                </h3>\n              </div>\n              <p>\n                Open the file <code class=\"filename\">/exercises/index.html</code> in your browser. Use the file <code class=\"filename\">/exercises/js/sandbox.js</code> or work in Firebug to accomplish the following:\n              </p>\n              <div class=\"orderedlist\">\n                <ol class=\"orderedlist\">\n                  <li>\n                    <p>\n                      Select all of the image elements on the page; log each image's alt attribute.\n                    </p>\n                  </li>\n                  <li>\n                    <p>\n                      Select the search input text box, then traverse up to the form and add a class to the form.\n                    </p>\n                  </li>\n                  <li>\n                    <p>\n                      Select the list item inside #myList that has a class of \"current\" and remove that class from it; add a class of \"current\" to the next list item.\n                    </p>\n                  </li>\n                  <li>\n                    <p>\n                      Select the select element inside #specials; traverse your way to the submit button.\n                    </p>\n                  </li>\n                  <li>\n                    <p>\n                      Select the first list item in the #slideshow element; add the class \"current\" to it, and then add a class of \"disabled\" to its sibling elements.\n                    </p>\n                  </li>\n                </ol>\n              </div>\n            </div>\n            <div title=\"Manipulating\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Manipulating\n                </h3>\n              </div>\n              <p>\n                Open the file <code class=\"filename\">/exercises/index.html</code> in your browser. Use the file <code class=\"filename\">/exercises/js/sandbox.js</code> or work in Firebug to accomplish the following:\n              </p>\n              <div class=\"orderedlist\">\n                <ol class=\"orderedlist\">\n                  <li>\n                    <p>\n                      Add five new list items to the end of the unordered list #myList. Hint:\n                    </p>\n                    <pre class=\"brush: js\">\nfor (var i = 0; i&lt;5; i++) { ... }\n</pre>\n                  </li>\n                  <li>\n                    <p>\n                      Remove the odd list items\n                    </p>\n                  </li>\n                  <li>\n                    <p>\n                      Add another h2 and another paragraph to the last div.module\n                    </p>\n                  </li>\n                  <li>\n                    <p>\n                      Add another option to the select element; give the option the value \"Wednesday\"\n                    </p>\n                  </li>\n                  <li>\n                    <p>\n                      Add a new div.module to the page after the last one; put a copy of one of the existing images inside of it.\n                    </p>\n                  </li>\n                </ol>\n              </div>\n            </div>\n          </div>\n        </div>\n        <div title=\"jQuery Core\" class=\"chapter\">\n          <div class=\"titlepage\">\n            <div>\n              <div>\n                <h2 class=\"title\">\n                  jQuery Core\n                </h2>\n              </div>\n            </div>\n          </div>\n          <div title=\"$ vs $()\" class=\"section\">\n            <h2 class=\"title\">\n              <code class=\"code\">$</code> vs <code class=\"code\">$()</code>\n            </h2>\n            <p>\n              Until now, we’ve been dealing entirely with methods that are called on a jQuery object. For example:\n            </p>\n            <pre class=\"brush: js\">\n$('h1').remove();\n</pre>\n            <p>\n              Most jQuery methods are called on jQuery objects as shown above; these methods are said to be part of the <code class=\"code\">$.fn</code> namespace, or the “jQuery prototype,” and are best thought of as jQuery object methods.\n            </p>\n            <p>\n              However, there are several methods that do not act on a selection; these methods are said to be part of the jQuery namespace, and are best thought of as core jQuery methods.\n            </p>\n            <p>\n              This distinction can be incredibly confusing to new jQuery users. Here’s what you need to remember:\n            </p>\n            <ul>\n              <li>Methods called on jQuery selections are in the <code class=\"code\">$.fn</code> namespace, and automatically receive and return the selection as this.\n              </li>\n              <li>Methods in the <code class=\"code\">$</code> namespace are generally utility-type methods, and do not work with selections; they are not automatically passed any arguments, and their return value will vary.\n              </li>\n            </ul>\n            <p>\n              There are a few cases where object methods and core methods have the same names, such as <code class=\"code\">$.each</code> and <code class=\"code\">$.fn.each</code>. In these cases, be extremely careful when reading the documentation that you are exploring the correct method.\n            </p>\n          </div>\n          <div title=\"Utility Methods\" class=\"section\">\n            <h2 class=\"title\">\n              Utility Methods\n            </h2>\n            <p>\n              jQuery offers several utility methods in the <code class=\"code\">$</code> namespace. These methods are helpful for accomplishing routine programming tasks. Below are examples of a few of the utility methods; for a complete reference on jQuery utility methods, visit <a href=\"http://api.jquery.com/category/utilities/\" class=\"ulink\">http://api.jquery.com/category/utilities/</a>.\n            </p>\n            <div class=\"variablelist\">\n              <dl>\n                <dt>\n                  <span class=\"term\">$.trim</span>\n                </dt>\n                <dd>\n                  <p>\n                    Removes leading and trailing whitespace.\n                  </p>\n                  <pre class=\"brush: js\">\n$.trim('    lots of extra whitespace    ');\n// returns 'lots of extra whitespace'\n</pre>\n                </dd>\n                <dt>\n                  <span class=\"term\">$.each</span>\n                </dt>\n                <dd>\n                  <p>\n                    Iterates over arrays and objects.\n                  </p>\n                  <pre class=\"brush: js\">\n$.each([ 'foo', 'bar', 'baz' ], function(idx, val) {\n    console.log('element ' + idx + 'is ' + val);\n});\n\n$.each({ foo : 'bar', baz : 'bim' }, function(k, v) {\n    console.log(k + ' : ' + v);\n});\n</pre>\n                  <div class=\"note\">\n                  <h3 class=\"title\">\n                    Note\n                  </h3>\n                  <p>\n                    There is also a method <code class=\"code\">$.fn.each</code>, which is used for iterating over a selection of elements.\n                  </p>\n                  </div>\n                </dd>\n                <dt>\n                  <span class=\"term\">$.inArray</span>\n                </dt>\n                <dd>\n                  <p>\n                    Returns a value's index in an array, or -1 if the value is not in the array.\n                  </p>\n                  <pre class=\"brush: js\">\nvar myArray = [ 1, 2, 3, 5 ];\n\nif ($.inArray(4, myArray) !== -1) {\n    console.log('found it!');\n}\n</pre>\n                </dd>\n                <dt>\n                  <span class=\"term\">$.extend</span>\n                </dt>\n                <dd>\n                  <p>\n                    Changes the properties of the first object using the properties of subsequent objects.\n                  </p>\n                  <pre class=\"brush: js\">\nvar firstObject = { foo : 'bar', a : 'b' };\nvar secondObject = { foo : 'baz' };\n\nvar newObject = $.extend(firstObject, secondObject);\nconsole.log(firstObject.foo); // 'baz'\nconsole.log(newObject.foo);   // 'baz'\n</pre>\n                  <p>\n                    If you don't want to change any of the objects you pass to <code class=\"code\">$.extend</code>, pass an empty object as the first argument.\n                  </p>\n                  <pre class=\"brush: js\">\nvar firstObject = { foo : 'bar', a : 'b' };\nvar secondObject = { foo : 'baz' };\n\nvar newObject = $.extend({}, firstObject, secondObject);\nconsole.log(firstObject.foo); // 'bar'\nconsole.log(newObject.foo);   // 'baz'\n</pre>\n                </dd>\n                <dt>\n                  <span class=\"term\">$.proxy</span>\n                </dt>\n                <dd>\n                  <p>\n                    Returns a function that will always run in the provided scope — that is, sets the meaning of <code class=\"code\">this</code> inside the passed function to the second argument.\n                  </p>\n                  <pre class=\"brush: js\">\nvar myFunction = function() { console.log(this); };\nvar myObject = { foo : 'bar' };\n\nmyFunction(); // logs window object\n\nvar myProxyFunction = $.proxy(myFunction, myObject);\nmyProxyFunction(); // logs myObject object\n</pre>\n                  <p>\n                    If you have an object with methods, you can pass the object and the name of a method to return a function that will always run in the scope of the object.\n                  </p>\n                  <pre class=\"brush: js\">\nvar myObject = {\n    myFn : function() {\n        console.log(this);\n    }\n};\n\n$('#foo').click(myObject.myFn); // logs DOM element #foo\n$('#foo').click($.proxy(myObject, 'myFn')); // logs myObject\n</pre>\n                </dd>\n              </dl>\n            </div>\n          </div>\n          <div title=\"Checking types\" class=\"section\">\n            <h2 class=\"title\">\n              Checking types\n            </h2>\n            <p>\n              As mentioned in the \"JavaScript basics\" section, jQuery offers a few basic utility methods for determining the type of a specific value.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Checking the type of an arbitrary value</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nvar myValue = [1, 2, 3];\n\n// Using JavaScript's typeof operator to test for primative types\ntypeof myValue == 'string'; // false\ntypeof myValue == 'number'; // false\ntypeof myValue == 'undefined'; // false\ntypeof myValue == 'boolean'; // false\n\n// Using strict equality operator to check for null\nmyValue === null; // false\n\n// Using jQuery's methods to check for non-primative types\njQuery.isFunction(myValue); // false\njQuery.isPlainObject(myValue); // false\njQuery.isArray(myValue); // true\n</pre>\n              </div>\n            </div>\n          </div>\n          <div title=\"Data Methods\" class=\"section\">\n            <h2 class=\"title\">\n              Data Methods\n            </h2>\n            <p>\n              As your work with jQuery progresses, you'll find that there's often data about an element that you want to store with the element. In plain JavaScript, you might do this by adding a property to the DOM element, but you'd have to deal with memory leaks in some browsers. jQuery offers a straightforward way to store data related to an element, and it manages the memory issues for you.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Storing and retrieving data related to an element</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('#myDiv').data('keyName', { foo : 'bar' });\n$('#myDiv').data('keyName'); // { foo : 'bar' }\n</pre>\n              </div>\n            </div>\n            <p>\n              You can store any kind of data on an element, and it's hard to overstate the importance of this when you get into complex application development. For the purposes of this class, we'll mostly use <code class=\"code\">$.fn.data</code> to store references to other elements.\n            </p>\n            <p>\n              For example, we may want to establish a relationship between a list item and a div that's inside of it. We could establish this relationship every single time we interact with the list item, but a better solution would be to establish the relationship once, and then store a pointer to the div on the list item using <code class=\"code\">$.fn.data</code>:\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Storing a relationship between elements using <code class=\"code\">$.fn.data</code></b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('#myList li').each(function() {\n    var $li = $(this), $div = $li.find('div.content');\n    $li.data('contentDiv', $div);\n});\n\n// later, we don't have to find the div again;\n// we can just read it from the list item's data\nvar $firstLi = $('#myList li:first');\n$firstLi.data('contentDiv').html('new content');\n</pre>\n              </div>\n            </div>\n            <p>\n              In addition to passing <code class=\"code\">$.fn.data</code> a single key-value pair to store data, you can also pass an object containing one or more pairs.\n            </p>\n          </div>\n          <div title=\"Feature &amp; Browser Detection\" class=\"section\">\n            <h2 class=\"title\">\n              Feature &amp; Browser Detection\n            </h2>\n            <p>\n              Although jQuery eliminates most JavaScript browser quirks, there are still occasions when your code needs to know about the browser environment.\n            </p>\n            <p>\n              jQuery offers the <code class=\"code\">$.support</code> object, as well as the deprecated <code class=\"code\">$.browser</code> object, for this purpose. For complete documentation on these objects, visit <a href=\"http://api.jquery.com/jQuery.support/\" class=\"ulink\">http://api.jquery.com/jQuery.support/</a> and <a href=\"http://api.jquery.com/jQuery.browser/\" class=\"ulink\">http://api.jquery.com/jQuery.browser/</a>.\n            </p>\n            <p>\n              The <code class=\"code\">$.support</code> object is dedicated to determining what features a browser supports; it is recommended as a more “future-proof” method of customizing your JavaScript for different browser environments.\n            </p>\n            <p>\n              The <code class=\"code\">$.browser</code> object was deprecated in favor of the <code class=\"code\">$.support</code> object, but it will not be removed from jQuery anytime soon. It provides direct detection of the browser brand and version.\n            </p>\n          </div>\n          <div title=\"Avoiding Conflicts with Other Libraries\" class=\"section\">\n            <h2 class=\"title\">\n              Avoiding Conflicts with Other Libraries\n            </h2>\n            <p>\n              If you are using another JavaScript library that uses the <code class=\"code\">$</code> variable, you can run into conflicts with jQuery. In order to avoid these conflicts, you need to put jQuery in no-conflict mode immediately after it is loaded onto the page and before you attempt to use jQuery in your page.\n            </p>\n            <p>\n              When you put jQuery into no-conflict mode, you have the option of assigning a variable name to replace <code class=\"code\">$</code>.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Putting jQuery into no-conflict mode</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n&lt;script src=\"prototype.js\"&gt;&lt;/script&gt;\n&lt;script src=\"jquery.js\"&gt;&lt;/script&gt;\n&lt;script&gt;var $j = jQuery.noConflict();&lt;/script&gt;\n</pre>\n              </div>\n            </div>\n            <p>\n              You can continue to use the standard <code class=\"code\">$</code> by wrapping your code in a self-executing anonymous function; this is a standard pattern for plugin authoring, where the author cannot know whether another library will have taken over the <code class=\"code\">$</code>.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Using the $ inside a self-executing anonymous function</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n&lt;script src=\"prototype.js\"&gt;&lt;/script&gt;\n&lt;script src=\"jquery.js\"&gt;&lt;/script&gt;\n&lt;script&gt;\njQuery.noConflict();\n\n(function($) {\n   // your code here, using the $\n})(jQuery);\n&lt;/script&gt;\n</pre>\n              </div>\n            </div>\n          </div>\n        </div>        <div title=\"Events\" class=\"chapter\">\n          <div class=\"titlepage\">\n            <div>\n              <div>\n                <h2 class=\"title\">\n                  Events\n                </h2>\n              </div>\n            </div>\n          </div>\n          <div title=\"Overview\" class=\"section\">\n            <h2 class=\"title\">\n              Overview\n            </h2>\n            <p>\n              jQuery provides simple methods for attaching event handlers to selections. When an event occurs, the provided function is executed. Inside the function, this refers to the element that was clicked.\n            </p>\n            <p>\n              For details on jQuery events, visit <a href=\"http://api.jquery.com/category/events/\" class=\"ulink\">http://api.jquery.com/category/events/</a>.\n            </p>\n            <p>\n              The event handling function can receive an event object. This object can be used to determine the nature of the event, and to prevent the event’s default behavior.\n            </p>\n            <p>\n              For details on the event object, visit <a href=\"http://api.jquery.com/category/events/event-object/\" class=\"ulink\">http://api.jquery.com/category/events/event-object/</a>.\n            </p>\n          </div>\n          <div title=\"Connecting Events to Elements\" class=\"section\">\n            <h2 class=\"title\">\n              Connecting Events to Elements\n            </h2>\n            <p>\n              jQuery offers convenience methods for most common events, and\n              these are the methods you will see used most often. These methods\n              &mdash; including <code class=\"code\">$.fn.click</code>, <code\n              class=\"code\">$.fn.focus</code>, <code\n              class=\"code\">$.fn.blur</code>, <code\n              class=\"code\">$.fn.change</code>, etc. &mdash; are shorthand for jQuery's <code class=\"code\">$.fn.bind</code> method. The bind method is useful for binding the same handler function to multiple events, when you want to provide data to the event hander, when you are working with custom events, or when you want to pass an object of multiple events and handlers.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Event binding using a convenience method</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('p').click(function() {\n    console.log('click');\n});\n</pre>\n              </div>\n            </div>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Event biding using the <code class=\"code\">$.fn.bind</code> method</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('p').bind('click', function() {\n    console.log('click');\n});\n</pre>\n              </div>\n            </div>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Event binding using the <code class=\"code\">$.fn.bind</code> method with data</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('input').bind(\n    'click change',  // bind to multiple events\n    { foo : 'bar' }, // pass in data\n\n    function(eventObject) {\n        console.log(eventObject.type, eventObject.data);\n        // logs event type, then { foo : 'bar' }\n    }\n);\n</pre>\n              </div>\n            </div>\n            <div title=\"Connecting Events to Run Only Once\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Connecting Events to Run Only Once\n                </h3>\n              </div>\n              <p>\n                Sometimes you need a particular handler to run only once\n                &mdash; after that, you may want no handler to run, or you may want a different handler to run. jQuery provides the <code class=\"code\">$.fn.one</code> method for this purpose.\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Switching handlers using the <code class=\"code\">$.fn.one</code> method</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\n$('p').one('click', function() {\n    console.log('You just clicked this for the first time!');\n    $(this).click(function() { console.log('You have clicked this before!'); });\n});\n</pre>\n                </div>\n              </div>\n              <p>\n                The <code class=\"code\">$.fn.one</code> method is especially useful if you need to do some complicated setup the first time an element is clicked, but not subsequent times.\n              </p>\n            </div>\n            <div title=\"Disconnecting Events\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Disconnecting Events\n                </h3>\n              </div>\n              <p>\n                To disconnect an event handler, you use the <code class=\"code\">$.fn.unbind</code> method and pass in the event type to unbind. If you attached a named function to the event, then you can isolate the unbinding to that named function by passing it as the second argument.\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Unbinding all click handlers on a selection</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\n$('p').unbind('click');\n</pre>\n                </div>\n              </div>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Unbinding a particular click handler</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\nvar foo = function() { console.log('foo'); };\nvar bar = function() { console.log('bar'); };\n\n$('p').bind('click', foo).bind('click', bar);\n$('p').unbind('click', bar); // foo is still bound to the click event\n</pre>\n                </div>\n              </div>\n            </div>\n            <div title=\"Namespacing Events\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Namespacing Events\n                </h3>\n              </div>\n              <p>\n                For complex applications and for plugins you share with others, it can be useful to namespace your events so you don't unintentionally disconnect events that you didn't or couldn't know about.\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Namespacing events</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\n$('p').bind('click.myNamespace', function() { /* ... */ });\n$('p').unbind('click.myNamespace');\n$('p').unbind('.myNamespace'); // unbind all events in the namespace\n</pre>\n                </div>\n              </div>\n            </div>\n          </div>\n          <div title=\"Binding Multiple Events\" class=\"section\">\n            <div class=\"titlepage\">\n              <h3 class=\"title\">\n                Binding Multiple Events\n              </h3>\n            </div>\n            <p>\n              Quite often elements in your application will be bound to multiple events, each having a different function for handing the event. In these cases you can pass an object into <code class=\"code\">$.fn.bind</code> with one or more key/value pairs, with the key being the event name and the value being the function to handle the event.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Binding Multiple Events</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('p').bind({\n  'click': function() { console.log('clicked!'); },\n  'mouseover': function() { console.log('hovered!'); }\n});\n</pre>\n              </div>\n            </div>\n          </div>\n          <div class=\"note\">\n          <h3 class=\"title\">\n            Note\n          </h3>\n          <p>\n            The option to pass an object of multiple events and handlers to <code class=\"code\">$.fn.bind</code> was introduced in jQuery 1.4.4.\n          </p>\n          </div>\n        </div>\n          <div title=\"Inside the Event Handling Function\" class=\"section\">\n            <h2 class=\"title\">\n              Inside the Event Handling Function\n            </h2>\n            <p>\n              As mentioned in the overview, the event handling function receives an event object, which contains many properties and methods. The event object is most commonly used to prevent the default action of the event via the preventDefault method. However, the event object contains a number of other useful properties and methods, including:\n            </p>\n            <div class=\"variablelist\">\n              <dl>\n                <dt>\n                  <span class=\"term\">pageX, pageY</span>\n                </dt>\n                <dd>\n                  <p>\n                    The mouse position at the time the event occurred, relative to the top left of the page.\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">type</span>\n                </dt>\n                <dd>\n                  <p>\n                    The type of the event (e.g. \"click\").\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">which</span>\n                </dt>\n                <dd>\n                  <p>\n                    The button or key that was pressed.\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">data</span>\n                </dt>\n                <dd>\n                  <p>\n                    Any data that was passed in when the event was bound.\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">target</span>\n                </dt>\n                <dd>\n                  <p>\n                    The DOM element that initiated the event.\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">preventDefault()</span>\n                </dt>\n                <dd>\n                  <p>\n                    Prevent the default action of the event (e.g. following a link).\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">stopPropagation()</span>\n                </dt>\n                <dd>\n                  <p>\n                    Stop the event from bubbling up to other elements.\n                  </p>\n                </dd>\n              </dl>\n            </div>\n            <p>\n              In addition to the event object, the event handling function also has access to the DOM element that the handler was bound to via the keyword <code class=\"code\">this</code>. To turn the DOM element into a jQuery object that we can use jQuery methods on, we simply do <code class=\"code\">$(this)</code>, often following this idiom:\n            </p>\n            <pre class=\"brush: js\">\nvar $this = $(this);\n</pre>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Preventing a link from being followed</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('a').click(function(e) {\n    var $this = $(this);\n    if ($this.attr('href').match('evil')) {\n        e.preventDefault();\n        $this.addClass('evil');\n    }\n});\n</pre>\n              </div>\n            </div>\n          </div>\n          <div title=\"Triggering Event Handlers\" class=\"section\">\n            <h2 class=\"title\">\n              Triggering Event Handlers\n            </h2>\n            <p>\n              jQuery provides a way to trigger the event handlers bound to an element without any user interaction via the <code class=\"code\">$.fn.trigger</code> method. While this method has its uses, it should not be used simply to call a function that was bound as a click handler. Instead, you should store the function you want to call in a variable, and pass the variable name when you do your binding. Then, you can call the function itself whenever you want, without the need for <code class=\"code\">$.fn.trigger</code>.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Triggering an event handler the right way</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nvar foo = function(e) {\n    if (e) {\n        console.log(e);\n    } else {\n        console.log('this didn\\'t come from an event!');\n    }\n};\n\n\n$('p').click(foo);\n\nfoo(); // instead of $('p').trigger('click')\n</pre>\n              </div>\n            </div>\n          </div>\n          <h2 class=\"title\">\n            Increasing Performance with Event Delegation\n          </h2>\n          <p>\n            You'll frequently use jQuery to add new elements to the page, and\n            when you do, you may need to bind events to those new elements\n            &mdash; events you already bound to similar elements that were on the page originally. Instead of repeating your event binding every time you add elements to the page, you can use event delegation. With event delegation, you bind your event to a container element, and then when the event occurs, you look to see which contained element it occurred on. If this sounds complicated, luckily jQuery makes it easy with its <code class=\"code\">$.fn.live</code> and <code class=\"code\">$.fn.delegate</code> methods.\n          </p>\n          <p>\n            While most people discover event delegation while dealing with elements added to the page later, it has some performance benefits even if you never add more elements to the page. The time required to bind event handlers to hundreds of individual elements is non-trivial; if you have a large set of elements, you should consider delegating related events to a container element.\n          </p>\n          <div class=\"note\">\n          <h3 class=\"title\">\n            Note\n          </h3>\n          <p>\n            The <code class=\"code\">$.fn.live</code> method was introduced in jQuery 1.3, and at that time only certain event types were supported. As of jQuery 1.4.2, the <code class=\"code\">$.fn.delegate</code> method is available, and is the preferred method.\n          </p>\n          </div>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>Event delegation using <code class=\"code\">$.fn.delegate</code></b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\n$('#myUnorderedList').delegate('li', 'click', function(e) {\n    var $myListItem = $(this);\n    // ...\n});\n</pre>\n            </div>\n          </div>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>Event delegation using <code class=\"code\">$.fn.live</code></b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\n$('#myUnorderedList li').live('click', function(e) {\n    var $myListItem = $(this);\n    // ...\n});\n</pre>\n            </div>\n          </div>\n          <div title=\"Unbinding Delegated Events\" class=\"section\">\n            <div class=\"titlepage\">\n              <h3 class=\"title\">\n                Unbinding Delegated Events\n              </h3>\n            </div>\n            <p>\n              If you need to remove delegated events, you can't simply unbind them. Instead, use <code class=\"code\">$.fn.undelegate</code> for events connected with <code class=\"code\">$.fn.delegate</code>, and <code class=\"code\">$.fn.die</code> for events connected with <code class=\"code\">$.fn.live</code>. As with bind, you can optionally pass in the name of the bound function.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Unbinding delegated events</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('#myUnorderedList').undelegate('li', 'click');\n$('#myUnorderedList li').die('click');\n</pre>\n              </div>\n            </div>\n          </div>\n          <div title=\"Event Helpers\" class=\"section\">\n            <h2 class=\"title\">\n              Event Helpers\n            </h2>\n            <p>\n              jQuery offers two event-related helper functions that save you a few keystrokes.\n            </p>\n            <div class=\"titlepage\">\n              <h3 class=\"title\">\n                <code class=\"code\">$.fn.hover</code>\n              </h3>\n            </div>\n            <p>\n              The <code class=\"code\">$.fn.hover</code> method lets you pass one or two functions to be run when the <code class=\"code\">mouseenter</code> and <code class=\"code\">mouseleave</code> events occur on an element. If you pass one function, it will be run for both events; if you pass two functions, the first will run for <code class=\"code\">mouseenter</code>, and the second will run for <code class=\"code\">mouseleave</code>.\n            </p>\n            <div class=\"note\">\n            <h3 class=\"title\">\n              Note\n            </h3>\n            <p>\n              Prior to jQuery 1.4, the <code class=\"code\">$.fn.hover</code> method required two functions.\n            </p>\n            </div>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>The hover helper function</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('#menu li').hover(function() {\n    $(this).toggleClass('hover');\n});\n</pre>\n              </div>\n            </div>\n            <div title=\"$.fn.toggle\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  <code class=\"code\">$.fn.toggle</code>\n                </h3>\n              </div>\n              <p>\n                The <code class=\"code\">$.fn.toggle</code> method is triggered by the \"click\" event and accepts two or more\n                functions. Each time the click event occurs, the next function in the list is called.\n                Generally, <code class=\"code\">$.fn.toggle</code> is used with just two functions; however, it will accept an\n                unlimited number of functions. Be careful, though: providing a long list of functions can be\n                difficult to debug).\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>The toggle helper function</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\n$('p.expander').toggle(\n    function() {\n        $(this).prev().addClass('open');\n    },\n    function() {\n        $(this).prev().removeClass('open');\n    }\n);\n</pre>\n                </div>\n              </div>\n            </div>\n          </div>\n          <div title=\"Exercises\" class=\"section\">\n            <h2 class=\"title\">\n              Exercises\n            </h2>\n            <div title=\"Create an Input Hint\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Create an Input Hint\n                </h3>\n              </div>\n              <p>\n                Open the file <code class=\"filename\">/exercises/index.html</code> in your browser. Use the file <code class=\"filename\">/exercises/js/inputHint.js</code> or work in Firebug. Your task is to use the text of the label for the search input to create \"hint\" text for the search input. The steps are as follows:\n              </p>\n              <div class=\"orderedlist\">\n                <ol class=\"orderedlist\">\n                  <li>\n                    <p>\n                      Set the value of the search input to the text of the label element\n                    </p>\n                  </li>\n                  <li>\n                    <p>\n                      Add a class of \"hint\" to the search input\n                    </p>\n                  </li>\n                  <li>\n                    <p>\n                      Remove the label element\n                    </p>\n                  </li>\n                  <li>\n                    <p>\n                      Bind a focus event to the search input that removes the hint text and the \"hint\" class\n                    </p>\n                  </li>\n                  <li>\n                    <p>\n                      Bind a blur event to the search input that restores the hint text and \"hint\" class if no search text was entered\n                    </p>\n                  </li>\n                </ol>\n              </div>\n              <p>\n                What other considerations might there be if you were creating this functionality for a real site?\n              </p>\n            </div>\n            <div title=\"Add Tabbed Navigation\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Add Tabbed Navigation\n                </h3>\n              </div>\n              <p>\n                Open the file <code class=\"filename\">/exercises/index.html</code> in your browser. Use the file <code class=\"filename\">/exercises/js/tabs.js</code>. Your task is to create tabbed navigation for the two div.module elements. To accomplish this:\n              </p>\n              <div class=\"orderedlist\">\n                <ol class=\"orderedlist\">\n                  <li>\n                    <p>\n                      Hide all of the modules.\n                    </p>\n                  </li>\n                  <li>\n                    <p>\n                      Create an unordered list element before the first module.\n                    </p>\n                  </li>\n                  <li>Iterate over the modules using <code class=\"code\">$.fn.each</code>. For each module, use the text of the h2 element as the text for a list item that you add to the unordered list element.\n                  </li>\n                  <li>\n                    <p>\n                      Bind a click event to the list item that:\n                    </p>\n                    <ul>\n                      <li>\n                        <p>\n                          Shows the related module, and hides any other modules\n                        </p>\n                      </li>\n                      <li>\n                        <p>\n                          Adds a class of \"current\" to the clicked list item\n                        </p>\n                      </li>\n                      <li>\n                        <p>\n                          Removes the class \"current\" from the other list item\n                        </p>\n                      </li>\n                    </ul>\n                  </li>\n                  <li>\n                    <p>\n                      Finally, show the first tab.\n                    </p>\n                  </li>\n                </ol>\n              </div>\n            </div>\n          </div>\n        </div>        <div title=\"Effects\" class=\"chapter\">\n          <div class=\"titlepage\">\n            <div>\n              <div>\n                <h2 class=\"title\">\n                  Effects\n                </h2>\n              </div>\n            </div>\n          </div>\n          <div title=\"Overview\" class=\"section\">\n            <h2 class=\"title\">\n              Overview\n            </h2>\n            <p>\n              jQuery makes it trivial to add simple effects to your page. Effects can use the built-in settings, or provide a customized duration. You can also create custom animations of arbitrary CSS properties.\n            </p>\n            <p>\n              For complete details on jQuery effects, visit <a href=\"http://api.jquery.com/category/effects/\" class=\"ulink\">http://api.jquery.com/category/effects/</a>.\n            </p>\n          </div>\n          <div title=\"Built-in Effects\" class=\"section\">\n            <h2 class=\"title\">\n              Built-in Effects\n            </h2>\n            <p>\n              Frequently used effects are built into jQuery as methods:\n            </p>\n            <div class=\"variablelist\">\n              <dl>\n                <dt>\n                  <span class=\"term\">$.fn.show</span>\n                </dt>\n                <dd>\n                  <p>\n                    Show the selected element.\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">$.fn.hide</span>\n                </dt>\n                <dd>\n                  <p>\n                    Hide the selected elements.\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">$.fn.fadeIn</span>\n                </dt>\n                <dd>\n                  <p>\n                    Animate the opacity of the selected elements to 100%.\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">$.fn.fadeOut</span>\n                </dt>\n                <dd>\n                  <p>\n                    Animate the opacity of the selected elements to 0%.\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">$.fn.slideDown</span>\n                </dt>\n                <dd>\n                  <p>\n                    Display the selected elements with a vertical sliding motion.\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">$.fn.slideUp</span>\n                </dt>\n                <dd>\n                  <p>\n                    Hide the selected elements with a vertical sliding motion.\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">$.fn.slideToggle</span>\n                </dt>\n                <dd>\n                  <p>\n                    Show or hide the selected elements with a vertical sliding motion, depending on whether the elements are currently visible.\n                  </p>\n                </dd>\n              </dl>\n            </div>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>A basic use of a built-in effect</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('h1').show();\n</pre>\n              </div>\n            </div>\n            <div title=\"Changing the Duration of Built-in Effects\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Changing the Duration of Built-in Effects\n                </h3>\n              </div>\n              <p>\n                With the exception of <code class=\"code\">$.fn.show</code> and <code class=\"code\">$.fn.hide</code>, all of the built-in methods are animated over the course of 400ms by default. Changing the duration of an effect is simple.\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Setting the duration of an effect</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\n$('h1').fadeIn(300);      // fade in over 300ms\n$('h1').fadeOut('slow');  // using a built-in speed definition\n</pre>\n                </div>\n              </div>\n              <div title=\"jQuery.fx.speeds\" class=\"section\">\n                <div class=\"titlepage\">\n                  <h4 class=\"title\">\n                    jQuery.fx.speeds\n                  </h4>\n                </div>\n                <p>\n                  jQuery has an object at <code class=\"code\">jQuery.fx.speeds</code> that contains the default speed, as well as settings for <code class=\"code\">\"slow\"</code> and <code class=\"code\">\"fast\"</code>.\n                </p>\n                <pre class=\"brush: js\">\nspeeds: {\n    slow: 600,\n    fast: 200,\n    // Default speed\n    _default: 400\n}\n</pre>\n                <p>\n                  It is possible to override or add to this object. For example, you may want to change the default duration of effects, or you may want to create your own effects speed.\n                </p>\n                <div class=\"example\">\n                  <p class=\"title\">\n                    <b>Augmenting <code class=\"code\">jQuery.fx.speeds</code> with custom speed definitions</b>\n                  </p>\n                  <div class=\"example-contents\">\n                    <pre class=\"brush: js\">\njQuery.fx.speeds.blazing = 100;\njQuery.fx.speeds.turtle = 2000;\n</pre>\n                  </div>\n                </div>\n              </div>\n            </div>\n            <div title=\"Doing Something when an Effect is Done\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Doing Something when an Effect is Done\n                </h3>\n              </div>\n              <p>\n                Often, you'll want to run some code once an animation is done\n                &mdash; if you run it before the animation is done, it may affect the quality of the animation, or it may remove elements that are part of the animation. <span class=\"termdef\">[Definition: <em class=\"firstterm\">Callback functions</em> provide a way to register your interest in an event that will happen in the future.]</span> In this case, the event we'll be responding to is the conclusion of the animation. Inside of the callback function, the keyword <code class=\"code\">this</code> refers to the element that the effect was called on; as we did inside of event handler functions, we can turn it into a jQuery object via <code class=\"code\">$(this)</code>.\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Running code when an animation is complete</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\n$('div.old').fadeOut(300, function() { $(this).remove(); });\n</pre>\n                </div>\n              </div>\n              <p>\n                Note that if your selection doesn't return any elements, your callback will never run! You can solve this problem by testing whether your selection returned any elements; if not, you can just run the callback immediately.\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Run a callback even if there were no elements to animate</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\nvar $thing = $('#nonexistent');\n\nvar cb = function() {\n    console.log('done!');\n};\n\nif ($thing.length) {\n    $thing.fadeIn(300, cb);\n} else {\n    cb();\n}\n</pre>\n                </div>\n              </div>\n            </div>\n          </div>\n          <h2 class=\"title\">\n            Custom Effects with <code class=\"code\">$.fn.animate</code>\n          </h2>\n          <p>\n            jQuery makes it possible to animate arbitrary CSS properties via the <code class=\"code\">$.fn.animate</code> method. The <code class=\"code\">$.fn.animate</code> method lets you animate to a set value, or to a value relative to the current value.\n          </p>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>Custom effects with <code class=\"code\">$.fn.animate</code></b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\n$('div.funtimes').animate(\n    {\n        left : \"+=50\",\n        opacity : 0.25\n    },\n    300, // duration\n    function() { console.log('done!'); // calback\n});\n</pre>\n            </div>\n          </div>\n          <div class=\"note\">\n          <h3 class=\"title\">\n            Note\n          </h3>\n          <p>\n            Color-related properties cannot be animated with <code class=\"code\">$.fn.animate</code> using jQuery out of the box. Color animations can easily be accomplished by including the <a href=\"http://plugins.jquery.com/files/jquery.color.js.txt\" class=\"ulink\">color plugin</a>. We'll discuss using plugins later in the book.\n          </p>\n          </div>\n          <div title=\"Easing\" class=\"section\">\n            <div class=\"titlepage\">\n              <h3 class=\"title\">\n                Easing\n              </h3>\n            </div>\n            <p>\n              <span class=\"termdef\">[Definition: <em\n              class=\"firstterm\">Easing</em> describes the manner in which an\n              effect occurs &mdash; whether the rate of change is steady, or varies over the duration of the animation.]</span> jQuery includes only two methods of easing: swing and linear. If you want more natural transitions in your animations, various easing plugins are available.\n            </p>\n            <p>\n              As of jQuery 1.4, it is possible to do per-property easing when using the $.fn.animate method.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Per-property easing</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('div.funtimes').animate(\n    {\n        left : [ \"+=50\", \"swing\" ],\n        opacity : [ 0.25, \"linear\" ]\n    },\n    300\n);\n</pre>\n              </div>\n            </div>\n            <p>\n              For more details on easing options, see <a href=\"http://api.jquery.com/animate/\" class=\"ulink\">http://api.jquery.com/animate/</a>.\n            </p>\n          </div>\n          <div title=\"Managing Effects\" class=\"section\">\n            <h2 class=\"title\">\n              Managing Effects\n            </h2>\n            <p>\n              jQuery provides several tools for managing animations.\n            </p>\n            <div class=\"variablelist\">\n              <dl>\n                <dt>\n                  <span class=\"term\">$.fn.stop</span>\n                </dt>\n                <dd>\n                  <p>\n                    Stop currently running animations on the selected elements.\n                  </p>\n                </dd>\n                <dt>\n                  <span class=\"term\">$.fn.delay</span>\n                </dt>\n                <dd>\n                  <p>\n                    Wait the specified number of milliseconds before running the next animation.\n                  </p>\n                  <pre class=\"brush: js\">\n$('h1').show(300).delay(1000).hide(300);\n</pre>\n                </dd>\n                <dt>\n                  <span class=\"term\">jQuery.fx.off</span>\n                </dt>\n                <dd>\n                  <p>\n                    If this value is true, there will be no transition for animations; elements will immediately be set to the target final state instead. This can be especially useful when dealing with older browsers; you also may want to provide the option to your users.\n                  </p>\n                </dd>\n              </dl>\n            </div>\n          </div>\n          <div title=\"Exercises\" class=\"section\">\n            <h2 class=\"title\">\n              Exercises\n            </h2>\n            <div title=\"Reveal Hidden Text\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Reveal Hidden Text\n                </h3>\n              </div>\n              <p>\n                Open the file <code class=\"filename\">/exercises/index.html</code> in your browser. Use the file <code class=\"filename\">/exercises/js/blog.js</code>. Your task is to add some interactivity to the blog section of the page. The spec for the feature is as follows:\n              </p>\n              <ul>\n                <li>\n                  <p>\n                    Clicking on a headline in the #blog div should slide down the excerpt paragraph\n                  </p>\n                </li>\n                <li>\n                  <p>\n                    Clicking on another headline should slide down its excerpt paragraph, and slide up any other currently showing excerpt paragraphs.\n                  </p>\n                </li>\n              </ul>\n              <p>\n                Hint: don't forget about the <code class=\"code\">:visible</code> selector!\n              </p>\n            </div>\n            <div title=\"Create Dropdown Menus\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Create Dropdown Menus\n                </h3>\n              </div>\n              <p>\n                Open the file <code class=\"filename\">/exercises/index.html</code> in your browser. Use the file <code class=\"filename\">/exercises/js/navigation.js</code>. Your task is to add dropdowns to the main navigation at the top of the page.\n              </p>\n              <ul>\n                <li>\n                  <p>\n                    Hovering over an item in the main menu should show that item's submenu items, if any.\n                  </p>\n                </li>\n                <li>\n                  <p>\n                    Exiting an item should hide any submenu items.\n                  </p>\n                </li>\n              </ul>\n              <p>\n                To accomplish this, use the <code class=\"code\">$.fn.hover</code> method to add and remove a class from the submenu items to control whether they're visible or hidden. (The file at <code class=\"filename\">/exercises/css/styles.css</code> includes the \"hover\" class for this purpose.)\n              </p>\n            </div>\n            <div title=\"Create a Slideshow\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Create a Slideshow\n                </h3>\n              </div>\n              <p>\n                Open the file <code class=\"filename\">/exercises/index.html</code> in your browser. Use the file <code class=\"filename\">/exercises/js/slideshow.js</code>. Your task is to take a plain semantic HTML page and enhance it with JavaScript by adding a slideshow.\n              </p>\n              <div class=\"orderedlist\">\n                <ol class=\"orderedlist\">\n                  <li>\n                    <p>\n                      Move the #slideshow element to the top of the body.\n                    </p>\n                  </li>\n                  <li>\n                    <p>\n                      Write code to cycle through the list items inside the element; fade one in, display it for a few seconds, then fade it out and fade in the next one.\n                    </p>\n                  </li>\n                  <li>\n                    <p>\n                      When you get to the end of the list, start again at the beginning.\n                    </p>\n                  </li>\n                </ol>\n              </div>\n              <p>\n                For an extra challenge, create a navigation area under the slideshow that shows how many images there are and which image you're currently viewing. (Hint: $.fn.prevAll will come in handy for this.)\n              </p>\n            </div>\n          </div>\n        </div>        <div title=\"Ajax\" class=\"chapter\">\n          <div class=\"titlepage\">\n            <div>\n              <div>\n                <h2 class=\"title\">\n                  Ajax\n                </h2>\n              </div>\n            </div>\n          </div>\n          <div title=\"Overview\" class=\"section\">\n            <h2 class=\"title\">\n              Overview\n            </h2>\n            <p>\n              The XMLHttpRequest method (XHR) allows browsers to communicate with the server without requiring a page reload. This method, also known as Ajax (Asynchronous JavaScript and XML), allows for web pages that provide rich, interactive experiences.\n            </p>\n            <p>\n              Ajax requests are triggered by JavaScript code; your code sends a request to a URL, and when it receives a response, a callback function can be triggered to handle the response. Because the request is asynchronous, the rest of your code continues to execute while the request is being processed, so it’s imperative that a callback be used to handle the response.\n            </p>\n            <p>\n              jQuery provides Ajax support that abstracts away painful browser differences. It offers both a full-featured <code class=\"code\">$.ajax()</code> method, and simple convenience methods such as <code class=\"code\">$.get()</code>, <code class=\"code\">$.getScript()</code>, <code class=\"code\">$.getJSON()</code>, <code class=\"code\">$.post()</code>, and <code class=\"code\">$().load()</code>.\n            </p>\n            <p>\n              Most jQuery applications don’t in fact use XML, despite the name “Ajax”; instead, they transport data as plain HTML or JSON (JavaScript Object Notation).\n            </p>\n            <p>\n              In general, Ajax does not work across domains. Exceptions are services that provide JSONP (JSON with Padding) support, which allow limited cross-domain functionality.\n            </p>\n          </div>\n          <div title=\"Key Concepts\" class=\"section\">\n            <h2 class=\"title\">\n              Key Concepts\n            </h2>\n            <p>\n              Proper use of Ajax-related jQuery methods requires understanding some key concepts first.\n            </p>\n            <div title=\"GET vs. Post\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  GET vs. Post\n                </h3>\n              </div>\n              <p>\n                The two most common “methods” for sending a request to a server are GET and POST. It’s important to understand the proper application of each.\n              </p>\n              <p>\n                The GET method should be used for non-destructive operations — that is, operations where you are only “getting” data from the server, not changing data on the server. For example, a query to a search service might be a GET request. GET requests may be cached by the browser, which can lead to unpredictable behavior if you are not expecting it. GET requests generally send all of their data in a query string.\n              </p>\n              <p>\n                The POST method should be used for destructive operations — that is, operations where you are changing data on the server. For example, a user saving a blog post should be a POST request. POST requests are generally not cached by the browser; a query string can be part of the URL, but the data tends to be sent separately as post data.\n              </p>\n            </div>\n            <div title=\"Data Types\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Data Types\n                </h3>\n              </div>\n              <p>\n                jQuery generally requires some instruction as to the type of data you expect to get back from an Ajax request; in some cases the data type is specified by the method name, and in other cases it is provided as part of a configuration object. There are several options:\n              </p>\n              <div class=\"variablelist\">\n                <dl>\n                  <dt>\n                    <span class=\"term\">text</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      For transporting simple strings\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">html</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      For transporting blocks of HTML to be placed on the page\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">script</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      For adding a new script to the page\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">json</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      For transporting JSON-formatted data, which can include strings, arrays, and objects\n                    </p>\n                    <div class=\"note\">\n                    <h3 class=\"title\">\n                      Note\n                    </h3>\n                    <p>\n                      As of jQuery 1.4, if the JSON data sent by your server isn't properly formatted, the request may fail silently. See <a href=\"http://json.org\" class=\"ulink\">http://json.org</a> for details on properly formatting JSON, but as a general rule, use built-in language methods for generating JSON on the server to avoid syntax issues.\n                    </p>\n                    </div>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">jsonp</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      For transporting JSON data from another domain\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">xml</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      For transporting data in a custom XML schema\n                    </p>\n                  </dd>\n                </dl>\n              </div>\n              <p class=\"remark\">\n                <i><span class=\"remark\">I am a strong proponent of using the JSON format in most cases, as it provides the most flexibility. It is especially useful for sending both HTML and data at the same time.</span></i>\n              </p>\n            </div>\n            <div title=\"A is for Asynchronous\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  A is for Asynchronous\n                </h3>\n              </div>\n              <p>\n                The asynchronicity of Ajax catches many new jQuery users off guard. Because Ajax calls are asynchronous by default, the response is not immediately available. Responses can only be handled using a callback. So, for example, the following code will not work:\n              </p>\n              <pre class=\"brush: js\">\nvar response;\n$.get('foo.php', function(r) { response = r; });\nconsole.log(response); // undefined!\n</pre>\n              <p>\n                Instead, we need to pass a callback function to our request; this callback will run when the request succeeds, at which point we can access the data that it returned, if any.\n              </p>\n              <pre class=\"brush: js\">\n$.get('foo.php', function(response) { console.log(response); });\n</pre>\n            </div>\n            <div title=\"Same-Origin Policy and JSONP\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Same-Origin Policy and JSONP\n                </h3>\n              </div>\n              <p>\n                In general, Ajax requests are limited to the same protocol (http or https), the same port, and the same domain as the page making the request. This limitation does not apply to scripts that are loaded via jQuery's Ajax methods.\n              </p>\n              <p>\n                The other exception is requests targeted at a JSONP service on another domain. In the case of JSONP, the provider of the service has agreed to respond to your request with a script that can be loaded into the page using a <code class=\"code\">&lt;script&gt;</code> tag, thus avoiding the same-origin limitation; that script will include the data you requested, wrapped in a callback function you provide.\n              </p>\n            </div>\n            <div title=\"Ajax and Firebug\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Ajax and Firebug\n                </h3>\n              </div>\n              <p>\n                Firebug (or the Webkit Inspector in Chrome or Safari) is an invaluable tool for working with Ajax requests. You can see Ajax requests as they happen in the Console tab of Firebug (and in the Resources &gt; XHR panel of Webkit Inspector), and you can click on a request to expand it and see details such as the request headers, response headers, response content, and more. If something isn't going as expected with an Ajax request, this is the first place to look to track down what's wrong.\n              </p>\n            </div>\n          </div>\n          <div title=\"jQuery's Ajax-Related Methods\" class=\"section\">\n            <h2 class=\"title\">\n              jQuery's Ajax-Related Methods\n            </h2>\n            <p>\n              While jQuery does offer many Ajax-related convenience methods, the core <code class=\"code\">$.ajax</code> method is at the heart of all of them, and understanding it is imperative. We'll review it first, and then touch briefly on the convenience methods.\n            </p>\n            <p class=\"remark\">\n              <i><span class=\"remark\">I generally use the $.ajax method and do not use convenience methods. As you'll see, it offers features that the convenience methods do not, and its syntax is more easily understandable, in my opinion.</span></i>\n            </p>\n            <div class=\"titlepage\">\n              <h3 class=\"title\">\n                $.ajax\n              </h3>\n            </div>\n            <p>\n              jQuery’s core <code class=\"code\">$.ajax</code> method is a powerful and straightforward way of creating Ajax requests. It takes a configuration object that contains all the instructions jQuery requires to complete the request. The <code class=\"code\">$.ajax</code> method is particularly valuable because it offers the ability to specify both success and failure callbacks. Also, its ability to take a configuration object that can be defined separately makes it easier to write reusable code. For complete documentation of the configuration options, visit <a href=\"http://api.jquery.com/jQuery.ajax/\" class=\"ulink\">http://api.jquery.com/jQuery.ajax/</a>.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Using the core $.ajax method</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$.ajax({\n    // the URL for the request\n    url : 'post.php',\n\n    // the data to send\n    // (will be converted to a query string)\n    data : { id : 123 },\n\n    // whether this is a POST or GET request\n    type : 'GET',\n\n    // the type of data we expect back\n    dataType : 'json',\n\n    // code to run if the request succeeds;\n    // the response is passed to the function\n    success : function(json) {\n        $('&lt;h1/&gt;').text(json.title).appendTo('body');\n        $('&lt;div class=\"content\"/&gt;')\n            .html(json.html).appendTo('body');\n    },\n\n    // code to run if the request fails;\n    // the raw request and status codes are\n    // passed to the function\n    error : function(xhr, status) {\n        alert('Sorry, there was a problem!');\n    },\n\n    // code to run regardless of success or failure\n    complete : function(xhr, status) {\n        alert('The request is complete!');\n    }\n});\n</pre>\n              </div>\n            </div>\n            <div class=\"note\">\n            <h3 class=\"title\">\n              Note\n            </h3>\n            <p>\n              A note about the <code class=\"code\">dataType</code> setting: if the server sends back data that is in a different format than you specify, your code may fail, and the reason will not always be clear, because the HTTP response code will not show an error. When working with Ajax requests, make sure your server is sending back the data type you're asking for, and verify that the Content-type header is accurate for the data type. For example, for JSON data, the Content-type header should be <code class=\"code\">application/json</code>.\n            </p>\n            </div>\n            <div title=\"$.ajax Options\" class=\"section\">\n              <div class=\"titlepage\">\n                <h4 class=\"title\">\n                  <code class=\"code\">$.ajax</code> Options\n                </h4>\n              </div>\n              <p>\n                There are many, many options for the $.ajax method, which is part of its power. For a complete list of options, visit <a href=\"http://api.jquery.com/jQuery.ajax/\" class=\"ulink\">http://api.jquery.com/jQuery.ajax/</a>; here are several that you will use frequently:\n              </p>\n              <div class=\"variablelist\">\n                <dl>\n                  <dt>\n                    <span class=\"term\">async</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      Set to <code class=\"code\">false</code> if the request should be sent synchronously. Defaults to <code class=\"code\">true</code>. Note that if you set this option to false, your request will block execution of other code until the response is received.\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">cache</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      Whether to use a cached response if available. Defaults to <code class=\"code\">true</code> for all dataTypes except \"script\" and \"jsonp\". When set to false, the URL will simply have a cachebusting parameter appended to it.\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">complete</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      A callback function to run when the request is complete, regardless of success or failure. The function receives the raw request object and the text status of the request.\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">context</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      The scope in which the callback function(s) should run (i.e. what <code class=\"code\">this</code> will mean inside the callback function(s)). By default, <code class=\"code\">this</code> inside the callback function(s) refers to the object originally passed to <code class=\"code\">$.ajax</code>.\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">data</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      The data to be sent to the server. This can either be an object or a query string, such as <code class=\"code\">foo=bar&amp;baz=bim</code>.\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">dataType</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      The type of data you expect back from the server. By default, jQuery will look at the MIME type of the response if no dataType is specified.\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">error</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      A callback function to run if the request results in an error. The function receives the raw request object and the text status of the request.\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">jsonp</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      The callback name to send in a query string when making a JSONP request. Defaults to \"callback\".\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">success</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      A callback function to run if the request succeeds. The function receives the response data (converted to a JavaScript object if the dataType was JSON), as well as the text status of the request and the raw request object.\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">timeout</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      The time in milliseconds to wait before considering the request a failure.\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">traditional</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      Set to true to use the param serialization style in use prior to jQuery 1.4. For details, see <a href=\"http://api.jquery.com/jQuery.param/\" class=\"ulink\">http://api.jquery.com/jQuery.param/</a>.\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">type</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      The type of the request, \"POST\" or \"GET\". Defaults to \"GET\". Other request types, such as \"PUT\" and \"DELETE\" can be used, but they may not be supported by all browsers.\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">url</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      The URL for the request.\n                    </p>\n                  </dd>\n                </dl>\n              </div>\n              <p>\n                The <code class=\"code\">url</code> option is the only required property of the <code class=\"code\">$.ajax</code> configuration object; all other properties are optional.\n              </p>\n            </div>\n            <div title=\"Convenience Methods\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Convenience Methods\n                </h3>\n              </div>\n              <p>\n                If you don't need the extensive configurability of <code class=\"code\">$.ajax</code>, and you don't care about handling errors, the Ajax convenience functions provided by jQuery can be useful, terse ways to accomplish Ajax requests. These methods are just \"wrappers\" around the core <code class=\"code\">$.ajax</code> method, and simply pre-set some of the options on the <code class=\"code\">$.ajax</code> method.\n              </p>\n              <p>\n                The convenience methods provided by jQuery are:\n              </p>\n              <div class=\"variablelist\">\n                <dl>\n                  <dt>\n                    <span class=\"term\">$.get</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      Perform a GET request to the provided URL.\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">$.post</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      Perform a POST request to the provided URL.\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">$.getScript</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      Add a script to the page.\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">$.getJSON</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      Perform a GET request, and expect JSON to be returned.\n                    </p>\n                  </dd>\n                </dl>\n              </div>\n              <p>\n                In each case, the methods take the following arguments, in order:\n              </p>\n              <div class=\"variablelist\">\n                <dl>\n                  <dt>\n                    <span class=\"term\">url</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      The URL for the request. Required.\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">data</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      The data to be sent to the server. Optional. This can either be an object or a query string, such as <code class=\"code\">foo=bar&amp;baz=bim</code>.\n                    </p>\n                    <div class=\"note\">\n                    <h3 class=\"title\">\n                      Note\n                    </h3>\n                    <p>\n                      This option is not valid for <code class=\"code\">$.getScript</code>.\n                    </p>\n                    </div>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">success callback</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      A callback function to run if the request succeeds. Optional. The function receives the response data (converted to a JavaScript object if the data type was JSON), as well as the text status of the request and the raw request object.\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">data type</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      The type of data you expect back from the server. Optional.\n                    </p>\n                    <div class=\"note\">\n                    <h3 class=\"title\">\n                      Note\n                    </h3>\n                    <p>\n                      This option is only applicable for methods that don't already specify the data type in their name.\n                    </p>\n                    </div>\n                  </dd>\n                </dl>\n              </div>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Using jQuery's Ajax convenience methods</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\n// get plain text or html\n$.get('/users.php', { userId : 1234 }, function(resp) {\n    console.log(resp);\n});\n\n// add a script to the page, then run a function defined in it\n$.getScript('/static/js/myScript.js', function() {\n    functionFromMyScript();\n});\n\n// get JSON-formatted data from the server\n$.getJSON('/details.php', function(resp) {\n    $.each(resp, function(k, v) {\n        console.log(k + ' : ' + v);\n    });\n});\n</pre>\n                </div>\n              </div>\n            </div>\n            <div title=\"$.fn.load\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  <code class=\"code\">$.fn.load</code>\n                </h3>\n              </div>\n              <p>\n                The <code class=\"code\">$.fn.load</code> method is unique among jQuery’s Ajax methods in that it is called on a selection. The <code class=\"code\">$.fn.load</code> method fetches HTML from a URL, and uses the returned HTML to populate the selected element(s). In addition to providing a URL to the method, you can optionally provide a selector; jQuery will fetch only the matching content from the returned HTML.\n              </p>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Using <code class=\"code\">$.fn.load</code> to populate an element</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\n$('#newContent').load('/foo.html');\n</pre>\n                </div>\n              </div>\n              <div class=\"example\">\n                <p class=\"title\">\n                  <b>Using <code class=\"code\">$.fn.load</code> to populate an element based on a selector</b>\n                </p>\n                <div class=\"example-contents\">\n                  <pre class=\"brush: js\">\n$('#newContent').load('/foo.html #myDiv h1:first', function(html) {\n  alert('Content updated!');\n});\n</pre>\n                </div>\n              </div>\n            </div>\n          </div>\n          <div title=\"Ajax and Forms\" class=\"section\">\n            <h2 class=\"title\">\n              Ajax and Forms\n            </h2>\n            <p>\n              jQuery’s ajax capabilities can be especially useful when dealing with forms. The <a href=\"http://jquery.malsup.com/form/\" class=\"ulink\">jQuery Form Plugin</a> is a well-tested tool for adding Ajax capabilities to forms, and you should generally use it for handling forms with Ajax rather than trying to roll your own solution for anything remotely complex. That said, there are a two jQuery methods you should know that relate to form processing in jQuery: <code class=\"code\">$.fn.serialize</code> and <code class=\"code\">$.fn.serializeArray</code>.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Turning form data into a query string</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('#myForm').serialize();\n</pre>\n              </div>\n            </div>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Creating an array of objects containing form data</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('#myForm').serializeArray();\n\n// creates a structure like this:\n[\n    { name : 'field1', value : 123 },\n    { name : 'field2', value : 'hello world' }\n]\n</pre>\n              </div>\n            </div>\n          </div>\n          <div title=\"Working with JSONP\" class=\"section\">\n            <h2 class=\"title\">\n              Working with JSONP\n            </h2>\n            <p>\n              The advent of JSONP &mdash; essentially a consensual cross-site\n              scripting hack &mdash; has opened the door to powerful mashups of content. Many prominent sites provide JSONP services, allowing you access to their content via a predefined API. A particularly great source of JSONP-formatted data is the <a href=\"http://developer.yahoo.com/yql/console/\" class=\"ulink\">Yahoo! Query Language</a>, which we'll use in the following example to fetch news about cats.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Using YQL and JSONP</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$.ajax({\n    url : 'http://query.yahooapis.com/v1/public/yql',\n\n    // the name of the callback parameter,\n    // as specified by the YQL service\n    jsonp : 'callback',\n\n    // tell jQuery we're expecting JSONP\n    dataType : 'jsonp',\n\n    // tell YQL what we want and that we want JSON\n    data : {\n        q : 'select title,abstract,url from search.news where query=\"cat\"',\n        format : 'json'\n    },\n\n    // work with the response\n    success : function(response) {\n        console.log(response);\n    }\n});\n</pre>\n              </div>\n            </div>\n            <p>\n              jQuery handles all the complex aspects of JSONP behind-the-scenes\n              &mdash; all we have to do is tell jQuery the name of the JSONP callback parameter specified by YQL (\"callback\" in this case), and otherwise the whole process looks and feels like a normal Ajax request.\n            </p>\n          </div>\n          <div title=\"Ajax Events\" class=\"section\">\n            <h2 class=\"title\">\n              Ajax Events\n            </h2>\n            <p>\n              Often, you’ll want to perform an operation whenever an Ajax requests starts or stops, such as showing or hiding a loading indicator. Rather than defining this behavior inside every Ajax request, you can bind Ajax events to elements just like you'd bind other events. For a complete list of Ajax events, visit <a href=\"http://docs.jquery.com/Ajax_Events\" class=\"ulink\">http://docs.jquery.com/Ajax_Events</a>.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Setting up a loading indicator using Ajax Events</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$('#loading_indicator')\n    .ajaxStart(function() { $(this).show(); })\n    .ajaxStop(function() { $(this).hide(); });\n</pre>\n              </div>\n            </div>\n          </div>\n          <div title=\"Exercises\" class=\"section\">\n            <h2 class=\"title\">\n              Exercises\n            </h2>\n            <div title=\"Load External Content\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Load External Content\n                </h3>\n              </div>\n              <p>\n                Open the file <code class=\"filename\">/exercises/index.html</code> in your browser. Use the file <code class=\"filename\">/exercises/js/load.js</code>. Your task is to load the content of a blog item when a user clicks on the title of the item.\n              </p>\n              <div class=\"orderedlist\">\n                <ol class=\"orderedlist\">\n                  <li>Create a target div after the headline for each blog post and store a reference to it on the headline element using <code class=\"code\">$.fn.data</code>.\n                  </li>\n                  <li>Bind a click event to the headline that will use the <code class=\"code\">$.fn.load</code> method to load the appropriate content from <code class=\"filename\">/exercises/data/blog.html</code> into the target div. Don't forget to prevent the default action of the click event.\n                  </li>\n                </ol>\n              </div>\n              <p>\n                Note that each blog headline in index.html includes a link to the post. You'll need to leverage the href of that link to get the proper content from blog.html. Once you have the href, here's one way to process it into an ID that you can use as a selector in <code class=\"code\">$.fn.load</code>:\n              </p>\n              <pre class=\"brush: js\">\nvar href = 'blog.html#post1';\nvar tempArray = href.split('#');\nvar id = '#' + tempArray[1];\n</pre>\n              <p>\n                Remember to make liberal use of <code class=\"code\">console.log</code> to make sure you're on the right path!\n              </p>\n            </div>\n            <div title=\"Load Content Using JSON\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Load Content Using JSON\n                </h3>\n              </div>\n              <p>\n                Open the file <code class=\"filename\">/exercises/index.html</code> in your browser. Use the file <code class=\"filename\">/exercises/js/specials.js</code>. Your task is to show the user details about the special for a given day when the user selects a day from the select dropdown.\n              </p>\n              <div class=\"orderedlist\">\n                <ol class=\"orderedlist\">\n                  <li>\n                    <p>\n                      Append a target div after the form that's inside the #specials element; this will be where you put information about the special once you receive it.\n                    </p>\n                  </li>\n                  <li>Bind to the change event of the select element; when the user changes the selection, send an Ajax request to <code class=\"filename\">/exercises/data/specials.json</code>.\n                  </li>\n                  <li>When the request returns a response, use the value the user selected in the select (hint: <code class=\"code\">$.fn.val</code>) to look up information about the special in the JSON response.\n                  </li>\n                  <li>\n                    <p>\n                      Add some HTML about the special to the target div you created.\n                    </p>\n                  </li>\n                  <li>\n                    <p>\n                      Finally, because the form is now Ajax-enabled, remove the submit button from the form.\n                    </p>\n                  </li>\n                </ol>\n              </div>\n              <p>\n                Note that we're loading the JSON every time the user changes their selection. How could we change the code so we only make the request once, and then use a cached response when the user changes their choice in the select?\n              </p>\n            </div>\n          </div>\n        </div>        <div title=\"Plugins\" class=\"chapter\">\n          <div class=\"titlepage\">\n            <div>\n              <div>\n                <h2 class=\"title\">\n                  Plugins\n                </h2>\n              </div>\n            </div>\n          </div>\n          <div title=\"What exactly is a plugin?\" class=\"section\">\n            <h2 class=\"title\">\n              What exactly is a plugin?\n            </h2>\n            <p>\n              A jQuery plugin is simply a new method that we use to extend jQuery's prototype object. By extending the prototype object you enable all jQuery objects to inherit any methods that you add. As established, whenever you call <code class=\"code\">jQuery()</code> you're creating a new jQuery object, with all of jQuery's methods inherited.\n            </p>\n            <p>\n              The idea of a plugin is to do something with a collection of elements. You could consider each method that comes with the jQuery core a plugin, like <code class=\"code\">fadeOut</code> or <code class=\"code\">addClass</code>.\n            </p>\n            <p>\n              You can make your own plugins and use them privately in your code or you can release them into the wild. There are thousands of jQuery plugins available online. The barrier to creating a plugin of your own is so low that you'll want to do it straight away!\n            </p>\n          </div>\n          <div title=\"How to create a basic plugin\" class=\"section\">\n            <h2 class=\"title\">\n              How to create a basic plugin\n            </h2>\n            <p>\n              The notation for creating a typical plugin is as follows:\n            </p>\n            <pre class=\"brush: js\">\n(function($){\n    $.fn.myNewPlugin = function() {\n        return this.each(function(){\n            // do something\n        });\n    };\n}(jQuery));\n</pre>\n            <p>\n              Don't let that confuse you though. The point of a jQuery plugin is to extend jQuery's prototype object, and that's what's happening on this line:\n            </p>\n            <pre class=\"brush: js\">\n$.fn.myNewPlugin = function() { //...\n</pre>\n            <p>\n              We wrap this assignment in an immediately-invoked function:\n            </p>\n            <pre class=\"brush: js\">\n(function($){\n    //...\n}(jQuery));\n</pre>\n            <p>\n              This has the effect of creating a \"private\" scope that allows us to extend jQuery using the dollar symbol without having to risk the possibility that the dollar has been overwritten by another library.\n            </p>\n            <p>\n              So our actual plugin, thus far, is this:\n            </p>\n            <pre class=\"brush: js\">\n$.fn.myNewPlugin = function() {\n    return this.each(function(){\n        // do something\n    });\n};\n</pre>\n            <p>\n              The <code class=\"code\">this</code> keyword within the new plugin refers to the jQuery object on which the plugin is being called.\n            </p>\n            <pre class=\"brush: js\">\nvar somejQueryObject = $('#something');\n\n$.fn.myNewPlugin = function() {\n    alert(this === somejQueryObject);\n};\n\nsomejQueryObject.myNewPlugin(); // alerts 'true'\n</pre>\n            <p>\n              Your typical jQuery object will contain references to any number of DOM elements, and that's why jQuery objects are often referred to as collections.\n            </p>\n            <p>\n              So, to do something with a collection we need to loop through it, which is most easily achieved using jQuery's <code class=\"code\">each()</code> method:\n            </p>\n            <pre class=\"brush: js\">\n$.fn.myNewPlugin = function() {\n    return this.each(function(){\n\n    });\n};\n</pre>\n            <p>\n              jQuery's <code class=\"code\">each()</code> method, like most other jQuery methods, returns a jQuery object, thus enabling what we've all come to know and love as 'chaining' (<code class=\"code\">$(...).css().attr()...</code>). We wouldn't want to break this convention so we return the <code class=\"code\">this</code> object. Within this loop you can do whatever you want with each element. Here's an example of a small plugin using some of the techniques we've discussed:\n            </p>\n            <pre class=\"brush: js\">\n(function($){\n    $.fn.showLinkLocation = function() {\n        return this.filter('a').each(function(){\n            $(this).append(\n                ' (' + $(this).attr('href') + ')'\n            );\n        });\n    };\n}(jQuery));\n\n// Usage example:\n$('a').showLinkLocation();\n</pre>\n            <p>\n              This handy plugin goes through all anchors in the collection and appends the <code class=\"code\">href</code> attribute in brackets.\n            </p>\n            <pre class=\"brush: js\">\n&lt;!-- Before plugin is called: --&gt;\n&lt;a href=\"page.html\"&gt;Foo&lt;/a&gt;\n\n&lt;!-- After plugin is called: --&gt;\n&lt;a href=\"page.html\"&gt;Foo (page.html)&lt;/a&gt;\n</pre>\n            <p>\n              Our plugin can be optimised though:\n            </p>\n            <pre class=\"brush: js\">\n(function($){\n    $.fn.showLinkLocation = function() {\n        return this.filter('a').append(function(){\n              return ' (' + this.href + ')';\n        });\n    };\n}(jQuery));\n</pre>\n            <p>\n              We're using the <code class=\"code\">append</code> method's capability to accept a callback, and the return value of that callback will determine what is appended to each element in the collection. Notice also that we're not using the <code class=\"code\">attr</code> method to retrieve the <code class=\"code\">href</code> attribute, because the native DOM API gives us easy access with the aptly named <code class=\"code\">href</code> property.\n            </p>\n            <p>\n              Here's another example of a plugin. This one doesn't require us to loop through every elememt with the <code class=\"code\">each()</code> method. Instead, we're simply going to delegate to other jQuery methods directly:\n            </p>\n            <pre class=\"brush: js\">\n(function($){\n    $.fn.fadeInAndAddClass = function(duration, className) {\n        return this.fadeIn(duration, function(){\n            $(this).addClass(className);\n        });\n    };\n}(jQuery));\n\n// Usage example:\n$('a').fadeInAndAddClass(400, 'finishedFading');\n</pre>\n          </div>\n          <div title=\"Finding &amp; Evaluating Plugins\" class=\"section\">\n            <h2 class=\"title\">\n              Finding &amp; Evaluating Plugins\n            </h2>\n            <p>\n              Plugins extend the basic jQuery functionality, and one of the most celebrated aspects of the library is its extensive plugin ecosystem. From table sorting to form validation to autocompletion ... if there’s a need for it, chances are good that someone has written a plugin for it.\n            </p>\n            <p>\n              The quality of jQuery plugins varies widely. Many plugins are extensively tested and well-maintained, but others are hastily created and then ignored. More than a few fail to follow best practices.\n            </p>\n            <p>\n              Google is your best initial resource for locating plugins, though the jQuery team is working on an improved plugin repository. Once you’ve identified some options via a Google search, you may want to consult the jQuery mailing list or the #jquery IRC channel to get input from others.\n            </p>\n            <p>\n              When looking for a plugin to fill a need, do your homework. Ensure that the plugin is well-documented, and look for the author to provide lots of examples of its use. Be wary of plugins that do far more than you need; they can end up adding substantial overhead to your page. For more tips on spotting a subpar plugin, read <a href=\"http://remysharp.com/2010/06/03/signs-of-a-poorly-written-jquery-plugin/\" class=\"ulink\">Signs of a poorly written jQuery plugin</a> by Remy Sharp.\n            </p>\n            <p>\n              Once you choose a plugin, you’ll need to add it to your page. Download the plugin, unzip it if necessary, place it your application’s directory structure, then include the plugin in your page using a script tag (after you include jQuery).\n            </p>\n          </div>\n          <div title=\"Writing Plugins\" class=\"section\">\n            <h2 class=\"title\">\n              Writing Plugins\n            </h2>\n            <p>\n              Sometimes you want to make a piece of functionality available throughout your code; for example, perhaps you want a single method you can call on a jQuery selection that performs a series of operations on the selection. In this case, you may want to write a plugin.\n            </p>\n            <p>\n              Most plugins are simply methods created in the <code class=\"code\">$.fn</code> namespace. jQuery guarantees that a method called on a jQuery object will be able to access that jQuery object as <code class=\"code\">this</code> inside the method. In return, your plugin needs to guarantee that it returns the same object it received, unless explicitly documented otherwise.\n            </p>\n            <p>\n              Here is an example of a simple plugin:\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Creating a plugin to add and remove a class on hover</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n// defining the plugin\n(function($){\n    $.fn.hoverClass = function(c) {\n        return this.hover(\n            function() { $(this).toggleClass(c); }\n        );\n    };\n})(jQuery);\n\n// using the plugin\n$('li').hoverClass('hover');\n</pre>\n              </div>\n            </div>\n            <p>\n              For more on plugin development, read Mike Alsup's essential post, <a href=\"http://www.learningjquery.com/2007/10/a-plugin-development-pattern\" class=\"ulink\">A Plugin Development Pattern</a>. In it, he creates a plugin called <code class=\"code\">$.fn.hilight</code>, which provides support for the metadata plugin if it's present, and provides a centralized method for setting global and instance options for the plugin.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>The Mike Alsup jQuery Plugin Development Pattern</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n//\n// create closure\n//\n(function($) {\n  //\n  // plugin definition\n  //\n  $.fn.hilight = function(options) {\n    debug(this);\n    // build main options before element iteration\n    var opts = $.extend({}, $.fn.hilight.defaults, options);\n    // iterate and reformat each matched element\n    return this.each(function() {\n      $this = $(this);\n      // build element specific options\n      var o = $.meta ? $.extend({}, opts, $this.data()) : opts;\n      // update element styles\n      $this.css({\n        backgroundColor: o.background,\n        color: o.foreground\n      });\n      var markup = $this.html();\n      // call our format function\n      markup = $.fn.hilight.format(markup);\n      $this.html(markup);\n    });\n  };\n  //\n  // private function for debugging\n  //\n  function debug($obj) {\n    if (window.console &amp;&amp; window.console.log)\n      window.console.log('hilight selection count: ' + $obj.size());\n  };\n  //\n  // define and expose our format function\n  //\n  $.fn.hilight.format = function(txt) {\n    return '&lt;strong&gt;' + txt + '&lt;/strong&gt;';\n  };\n  //\n  // plugin defaults\n  //\n  $.fn.hilight.defaults = {\n    foreground: 'red',\n    background: 'yellow'\n  };\n//\n// end of closure\n//\n})(jQuery);\n</pre>\n              </div>\n            </div>\n          </div>\n          <h2 class=\"title\">\n            Writing Stateful Plugins with the jQuery UI Widget Factory\n          </h2>\n          <div class=\"note\">\n          <h3 class=\"title\">\n            Note\n          </h3>\n          <p>\n            This section is based, with permission, on the blog post <a href=\"http://blog.nemikor.com/2010/05/15/building-stateful-jquery-plugins/\" class=\"ulink\">Building Stateful jQuery Plugins</a> by Scott Gonzalez.\n          </p>\n          </div>\n          <p>\n            While most existing jQuery plugins are stateless — that is, we call them on an element and that is the extent of our interaction with the plugin —&nbsp;there’s a large set of functionality that doesn’t fit into the basic plugin pattern.\n          </p>\n          <p>\n            In order to fill this gap, jQuery UI has implemented a more advanced plugin system. The new system manages state, allows multiple functions to be exposed via a single plugin, and provides various extension points. This system is called the widget factory and is exposed as <code class=\"code\">jQuery.widget</code> as part of jQuery UI 1.8; however, it can be used independently of jQuery UI.\n          </p>\n          <p>\n            To demonstrate the capabilities of the widget factory, we'll build a simple progress bar plugin.\n          </p>\n          <p>\n            To start, we’ll create a progress bar that just lets us set the progress once. As we can see below, this is done by calling <code class=\"code\">jQuery.widget</code> with two parameters: the name of the plugin to create and an object literal containing functions to support our plugin. When our plugin gets called, it will create a new plugin instance and all functions will be executed within the context of that instance. This is different from a standard jQuery plugin in two important ways. First, the context is an object, not a DOM element. Second, the context is always a single object, never a collection.\n          </p>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>A simple, stateful plugin using the jQuery UI widget factory</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\n$.widget(\"nmk.progressbar\", {\n    _create: function() {\n        var progress = this.options.value + \"%\";\n        this.element\n            .addClass(\"progressbar\")\n            .text(progress);\n    }\n});\n</pre>\n            </div>\n          </div>\n          <p>\n            The name of the plugin must contain a namespace; in this case we’ve used the <code class=\"code\">nmk</code> namespace. There is a limitation that namespaces be exactly one level deep — that is, we can't use a namespace like <code class=\"code\">nmk.foo</code>. We can also see that the widget factory has provided two properties for us. <code class=\"code\">this.element</code> is a jQuery object containing exactly one element. If our plugin is called on a jQuery object containing multiple elements, a separate plugin instance will be created for each element, and each instance will have its own <code class=\"code\">this.element</code>. The second property, <code class=\"code\">this.options</code>, is a hash containing key/value pairs for all of our plugin’s options. These options can be passed to our plugin as shown here.\n          </p>\n          <div class=\"note\">\n          <h3 class=\"title\">\n            Note\n          </h3>\n          <p>\n            In our example we use the <code class=\"code\">nmk</code> namespace. The <code class=\"code\">ui</code> namespace is reserved for official jQuery UI plugins. When building your own plugins, you should create your own namespace. This makes it clear where the plugin came from and whether it is part of a larger collection.\n          </p>\n          </div>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>Passing options to a widget</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\n$(\"&lt;div&gt;&lt;/div&gt;\")\n    .appendTo( \"body\" )\n    .progressbar({ value: 20 });\n</pre>\n            </div>\n          </div>\n          <p>\n            When we call <code class=\"code\">jQuery.widget</code> it extends jQuery by adding a method to <code class=\"code\">jQuery.fn</code> (the same way we'd create a standard plugin). The name of the function it adds is based on the name you pass to <code class=\"code\">jQuery.widget</code>, without the namespace; in our case it will create <code class=\"code\">jQuery.fn.progressbar</code>. The options passed to our plugin get set in <code class=\"code\">this.options</code> inside of our plugin instance. As shown below, we can specify default values for any of our options. When designing your API, you should figure out the most common use case for your plugin so that you can set appropriate default values and make all options truly optional.\n          </p>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>Setting default options for a widget</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\n$.widget(\"nmk.progressbar\", {\n    // default options\n    options: {\n        value: 0\n    },\n\n    _create: function() {\n        var progress = this.options.value + \"%\";\n        this.element\n            .addClass( \"progressbar\" )\n            .text( progress );\n    }\n});\n</pre>\n            </div>\n          </div>\n          <div class=\"titlepage\">\n            <h3 class=\"title\">\n              Adding Methods to a Widget\n            </h3>\n          </div>\n          <p>\n            Now that we can initialize our progress bar, we’ll add the ability to perform actions by calling methods on our plugin instance. To define a plugin method, we just include the function in the object literal that we pass to <code class=\"code\">jQuery.widget</code>. We can also define “private” methods by prepending an underscore to the function name.\n          </p>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>Creating widget methods</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\n$.widget(\"nmk.progressbar\", {\n    options: {\n        value: 0\n    },\n\n    _create: function() {\n        var progress = this.options.value + \"%\";\n        this.element\n            .addClass(\"progressbar\")\n            .text(progress);\n    },\n\n    // create a public method\n    value: function(value) {\n        // no value passed, act as a getter\n        if (value === undefined) {\n            return this.options.value;\n        // value passed, act as a setter\n        } else {\n            this.options.value = this._constrain(value);\n            var progress = this.options.value + \"%\";\n            this.element.text(progress);\n        }\n    },\n\n    // create a private method\n    _constrain: function(value) {\n        if (value &gt; 100) {\n            value = 100;\n        }\n        if (value &lt; 0) {\n            value = 0;\n        }\n        return value;\n    }\n});\n</pre>\n            </div>\n          </div>\n          <p>\n            To call a method on a plugin instance, you pass the name of the method to the jQuery plugin. If you are calling a method that accepts parameters, you simply pass those parameters after the method name.\n          </p>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>Calling methods on a plugin instance</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\nvar bar = $(\"&lt;div&gt;&lt;/div&gt;\")\n    .appendTo(\"body\")\n    .progressbar({ value: 20 });\n\n// get the current value\nalert(bar.progressbar(\"value\"));\n\n// update the value\nbar.progressbar(\"value\", 50);\n\n// get the current value again\nalert(bar.progressbar(\"value\"));\n</pre>\n            </div>\n          </div>\n          <div class=\"note\">\n          <h3 class=\"title\">\n            Note\n          </h3>\n          <p>\n            Executing methods by passing the method name to the same jQuery function that was used to initialize the plugin may seem odd. This is done to prevent pollution of the jQuery namespace while maintaining the ability to chain method calls.\n          </p>\n          </div>\n          <div title=\"Working with Widget Options\" class=\"section\">\n            <div class=\"titlepage\">\n              <h3 class=\"title\">\n                Working with Widget Options\n              </h3>\n            </div>\n            <p>\n              One of the methods that is automatically available to our plugin is the <code class=\"code\">option</code> method. The option method allows you to get and set options after initialization. This method works exactly like jQuery’s css and attr methods: you can pass just a name to use it as a setter, a name and value to use it as a single setter, or a hash of name/value pairs to set multiple values. When used as a getter, the plugin will return the current value of the option that corresponds to the name that was passed in. When used as a setter, the plugin’s <code class=\"code\">_setOption</code> method will be called for each option that is being set. We can specify a <code class=\"code\">_setOption</code> method in our plugin to react to option changes.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Responding when an option is set</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$.widget(\"nmk.progressbar\", {\n    options: {\n        value: 0\n    },\n\n    _create: function() {\n        this.element.addClass(\"progressbar\");\n        this._update();\n    },\n\n    _setOption: function(key, value) {\n        this.options[key] = value;\n        this._update();\n    },\n\n    _update: function() {\n        var progress = this.options.value + \"%\";\n        this.element.text(progress);\n    }\n});\n</pre>\n              </div>\n            </div>\n          </div>\n          <div title=\"Adding Callbacks\" class=\"section\">\n            <div class=\"titlepage\">\n              <h3 class=\"title\">\n                Adding Callbacks\n              </h3>\n            </div>\n            <p>\n              One of the easiest ways to make your plugin extensible is to add callbacks so users can react when the state of your plugin changes. We can see below how to add a callback to our progress bar to signify when the progress has reached 100%. The <code class=\"code\">_trigger</code> method takes three parameters: the name of the callback, a native event object that initiated the callback, and a hash of data relevant to the event. The callback name is the only required parameter, but the others can be very useful for users who want to implement custom functionality on top of your plugin. For example, if we were building a draggable plugin, we could pass the native mousemove event when triggering a drag callback; this would allow users to react to the drag based on the x/y coordinates provided by the event object.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Providing callbacks for user extension</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$.widget(\"nmk.progressbar\", {\n    options: {\n        value: 0\n    },\n\n    _create: function() {\n        this.element.addClass(\"progressbar\");\n        this._update();\n    },\n\n    _setOption: function(key, value) {\n        this.options[key] = value;\n        this._update();\n    },\n\n    _update: function() {\n        var progress = this.options.value + \"%\";\n        this.element.text(progress);\n        if (this.options.value == 100) {\n            this._trigger(\"complete\", null, { value: 100 });\n        }\n    }\n});\n</pre>\n              </div>\n            </div>\n            <p>\n              Callback functions are essentially just additional options, so you can get and set them just like any other option. Whenever a callback is executed, a corresponding event is triggered as well. The event type is determined by concatenating the plugin name and the callback name. The callback and event both receive the same two parameters: an event object and a hash of data relevant to the event, as we’ll see below.\n            </p>\n            <p>\n              If your plugin has functionality that you want to allow the user to prevent, the best way to support this is by creating cancelable callbacks. Users can cancel a callback, or its associated event, the same way they cancel any native event: by calling <code class=\"code\">event.preventDefault()</code> or using <code class=\"code\">return false</code>. If the user cancels the callback, the <code class=\"code\">_trigger</code> method will return false so you can implement the appropriate functionality within your plugin.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Binding to widget events</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nvar bar = $(\"&lt;div&gt;&lt;/div&gt;\")\n    .appendTo(\"body\")\n    .progressbar({\n        complete: function(event, data) {\n            alert( \"Callbacks are great!\" );\n        }\n    })\n    .bind(\"progressbarcomplete\", function(event, data) {\n        alert(\"Events bubble and support many handlers for extreme flexibility.\");\n        alert(\"The progress bar value is \" + data.value);\n    });\n\nbar.progressbar(\"option\", \"value\", 100);\n</pre>\n              </div>\n            </div>\n            <div title=\"The Widget Factory: Under the Hood\" class=\"sidebar\">\n              <p class=\"title\">\n                <b>The Widget Factory: Under the Hood</b>\n              </p>\n              <p>\n                When you call <code class=\"code\">jQuery.widget</code>, it creates a constructor function for your plugin and sets the object literal that you pass in as the prototype for your plugin instances. All of the functionality that automatically gets added to your plugin comes from a base widget prototype, which is defined as <code class=\"code\">jQuery.Widget.prototype</code>. When a plugin instance is created, it is stored on the original DOM element using <code class=\"code\">jQuery.data</code>, with the plugin name as the key.\n              </p>\n              <p>\n                Because the plugin instance is directly linked to the DOM element, you can access the plugin instance directly instead of going through the exposed plugin method if you want. This will allow you to call methods directly on the plugin instance instead of passing method names as strings and will also give you direct access to the plugin’s properties.\n              </p>\n              <pre class=\"brush: js\">\nvar bar = $(\"&lt;div&gt;&lt;/div&gt;\")\n    .appendTo(\"body\")\n    .progressbar()\n    .data(\"progressbar\" );\n\n// call a method directly on the plugin instance\nbar.option(\"value\", 50);\n\n// access properties on the plugin instance\nalert(bar.options.value);\n</pre>\n              <p>\n                One of the biggest benefits of having a constructor and prototype for a plugin is the ease of extending the plugin. By adding or modifying methods on the plugin’s prototype, we can modify the behavior of all instances of our plugin. For example, if we wanted to add a method to our progress bar to reset the progress to 0% we could add this method to the prototype and it would instantly be available to be called on any plugin instance.\n              </p>\n              <pre class=\"brush: js\">\n$.nmk.progressbar.prototype.reset = function() {\n    this._setOption(\"value\", 0);\n};\n</pre>\n            </div>\n          </div>\n          <div title=\"Cleaning Up\" class=\"section\">\n            <div class=\"titlepage\">\n              <h3 class=\"title\">\n                Cleaning Up\n              </h3>\n            </div>\n            <p>\n              In some cases, it will make sense to allow users to apply and then later unapply your plugin. You can accomplish this via the destroy method. Within the <code class=\"code\">destroy</code> method, you should undo anything your plugin may have done during initialization or later use. The <code class=\"code\">destroy</code> method is automatically called if the element that your plugin instance is tied to is removed from the DOM, so this can be used for garbage collection as well. The default <code class=\"code\">destroy</code> method removes the link between the DOM element and the plugin instance, so it’s important to call the base function from your plugin’s <code class=\"code\">destroy</code> method.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Adding a destroy method to a widget</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\n$.widget( \"nmk.progressbar\", {\n    options: {\n        value: 0\n    },\n\n    _create: function() {\n        this.element.addClass(\"progressbar\");\n        this._update();\n    },\n\n    _setOption: function(key, value) {\n        this.options[key] = value;\n        this._update();\n    },\n\n    _update: function() {\n        var progress = this.options.value + \"%\";\n        this.element.text(progress);\n        if (this.options.value == 100 ) {\n            this._trigger(\"complete\", null, { value: 100 });\n        }\n    },\n\n    destroy: function() {\n        this.element\n            .removeClass(\"progressbar\")\n            .text(\"\");\n\n        // call the base destroy function\n        $.Widget.prototype.destroy.call(this);\n    }\n});\n</pre>\n              </div>\n            </div>\n          </div>\n          <div title=\"Conclusion\" class=\"section\">\n            <div class=\"titlepage\">\n              <h3 class=\"title\">\n                Conclusion\n              </h3>\n            </div>\n            <p>\n              The widget factory is only one way of creating stateful plugins. There are a few different models that can be used and each have their own advantages and disadvantages. The widget factory solves lots of common problems for you and can greatly improve productivity, it also greatly improves code reuse, making it a great fit for jQuery UI as well as many other stateful plugins.\n            </p>\n          </div>\n          <div title=\"Exercises\" class=\"section\">\n            <h2 class=\"title\">\n              Exercises\n            </h2>\n            <div title=\"Make a Table Sortable\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Make a Table Sortable\n                </h3>\n              </div>\n              <p>\n                For this exercise, your task is to identify, download, and implement a table sorting plugin on the index.html page. When you’re done, all columns in the table on the page should be sortable.\n              </p>\n            </div>\n            <div title=\"Write a Table-Striping Plugin\" class=\"section\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Write a Table-Striping Plugin\n                </h3>\n              </div>\n              <p>\n                Open the file <code class=\"filename\">/exercises/index.html</code> in your browser. Use the file <code class=\"filename\">/exercises/js/stripe.js</code>. Your task is to write a plugin called \"stripe\" that you can call on any table element. When the plugin is called on a table element, it should change the color of odd rows in the table body to a user-specified color.\n              </p>\n              <pre class=\"brush: js\">\n$('#myTable').stripe('#cccccc');\n</pre>\n              <p>\n                Don't forget to return the table so other methods can be chained after the plugin!\n              </p>\n            </div>\n          </div>\n        </div>\n      </div>  <div title=\"Part&nbsp;III.&nbsp;Advanced Topics\" class=\"part\">\n    <div class=\"titlepage\">\n      <div>\n        <div>\n          <h1 class=\"title\">\n            Part&nbsp;III.&nbsp;Advanced Topics\n          </h1>\n        </div>\n      </div>\n    </div>\n    <div title=\"This Section is a Work in Progress\" class=\"article\">\n      <div class=\"titlepage\">\n        <div>\n          <div>\n            <h2 class=\"title\">\n              This Section is a Work in Progress\n            </h2>\n          </div>\n        </div>\n        <hr>\n      </div>\n      <p>\n        Please visit <a href=\"https://github.com/jquery/web-learn-jquery-com\" class=\"ulink\">https://github.com/jquery/web-learn-jquery-com</a> to contribute!\n      </p>\n    </div>\n    <div title=\"Performance Best Practices\" class=\"chapter\">\n          <div class=\"titlepage\">\n            <div>\n              <div>\n                <h2 class=\"title\">\n                  Performance Best Practices\n                </h2>\n              </div>\n            </div>\n          </div>\n          <p>\n            This chapter covers a number of jQuery and JavaScript best practices, in no particular order. Many of the best practices in this chapter are based on the <a href=\"http://paulirish.com/perf\" class=\"ulink\">jQuery Anti-Patterns for Performance</a> presentation by Paul Irish.\n          </p>\n          <div title=\"Cache length during loops\" class=\"sect1\">\n            <div class=\"titlepage\">\n              <div>\n                <div>\n                  <h2 class=\"title\">\n                    Cache length during loops\n                  </h2>\n                </div>\n              </div>\n            </div>\n            <p>\n              In a for loop, don't access the length property of an array every time; cache it beforehand.\n            </p>\n            <pre class=\"brush: js\">\nvar myLength = myArray.length;\n\nfor (var i = 0; i &lt; myLength; i++) {\n    // do stuff\n}\n</pre>\n          </div>\n          <div title=\"Append new content outside of a loop\" class=\"sect1\">\n            <div class=\"titlepage\">\n              <div>\n                <div>\n                  <h2 class=\"title\">\n                    Append new content outside of a loop\n                  </h2>\n                </div>\n              </div>\n            </div>\n            <p>\n              Touching the DOM comes at a cost; if you're adding a lot of elements to the DOM, do it all at once, not one at a time.\n            </p>\n            <pre class=\"brush: js\">\n// this is bad\n$.each(myArray, function(i, item) {\n   var newListItem = '&lt;li&gt;' + item + '&lt;/li&gt;';\n   $('#ballers').append(newListItem);\n});\n\n// better: do this\nvar frag = document.createDocumentFragment();\n\n$.each(myArray, function(i, item) {\n    var newListItem = '&lt;li&gt;' + item + '&lt;/li&gt;';\n    frag.appendChild(newListItem);\n});\n$('#ballers')[0].appendChild(frag);\n\n// or do this\nvar myHtml = '';\n\n$.each(myArray, function(i, item) {\n    html += '&lt;li&gt;' + item + '&lt;/li&gt;';\n});\n$('#ballers').html(myHtml);\n</pre>\n          </div>\n          <div title=\"Keep things DRY\" class=\"sect1\">\n            <div class=\"titlepage\">\n              <div>\n                <div>\n                  <h2 class=\"title\">\n                    Keep things DRY\n                  </h2>\n                </div>\n              </div>\n            </div>\n            <p>\n              Don't repeat yourself; if you're repeating yourself, you're doing it wrong.\n            </p>\n            <pre class=\"brush: js\">\n// BAD\nif ($eventfade.data('currently') != 'showing') {\n    $eventfade.stop();\n}\n\nif ($eventhover.data('currently') != 'showing') {\n    $eventhover.stop();\n}\n\nif ($spans.data('currently') != 'showing') {\n    $spans.stop();\n}\n\n// GOOD!!\nvar $elems = [$eventfade, $eventhover, $spans];\n$.each($elems, function(i,elem) {\n    if (elem.data('currently') != 'showing') {\n        elem.stop();\n    }\n});\n</pre>\n          </div>\n          <div title=\"Beware anonymous functions\" class=\"sect1\">\n            <div class=\"titlepage\">\n              <div>\n                <div>\n                  <h2 class=\"title\">\n                    Beware anonymous functions\n                  </h2>\n                </div>\n              </div>\n            </div>\n            <p>\n              Anonymous functions bound everywhere are a pain. They're difficult to debug, maintain, test, or reuse. Instead, use an object literal to organize and name your handlers and callbacks.\n            </p>\n            <pre class=\"brush: js\">\n// BAD\n$(document).ready(function() {\n    $('#magic').click(function(e) {\n        $('#yayeffects').slideUp(function() {\n            // ...\n        });\n    });\n\n    $('#happiness').load(url + ' #unicorns', function() {\n        // ...\n    });\n});\n\n// BETTER\nvar PI = {\n    onReady : function() {\n        $('#magic').click(PI.candyMtn);\n        $('#happiness').load(PI.url + ' #unicorns', PI.unicornCb);\n    },\n\n    candyMtn : function(e) {\n        $('#yayeffects').slideUp(PI.slideCb);\n    },\n\n    slideCb : function() { ... },\n\n    unicornCb : function() { ... }\n};\n\n$(document).ready(PI.onReady);\n</pre>\n          </div>\n          <div title=\"Optimize Selectors\" class=\"sect1\">\n            <div class=\"titlepage\">\n              <div>\n                <div>\n                  <h2 class=\"title\">\n                    Optimize Selectors\n                  </h2>\n                </div>\n              </div>\n            </div>\n            <p>\n              Selector optimization is less important than it used to be, as more browsers implement <code class=\"code\">document.querySelectorAll()</code> and the burden of selection shifts from jQuery to the browser. However, there are still some tips to keep in mind.\n            </p>\n            <div title=\"ID-Based Selectors\" class=\"sect2\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  ID-Based Selectors\n                </h3>\n              </div>\n              <p>\n                Beginning your selector with an ID is always best.\n              </p>\n              <pre class=\"brush: js\">\n// fast\n$('#container div.robotarm');\n\n// super-fast\n$('#container').find('div.robotarm');\n</pre>\n              <p>\n                The <code class=\"code\">$.fn.find</code> approach is faster because the first selection is handled without going through the Sizzle selector engine — ID-only selections are handled using <code class=\"code\">document.getElementById()</code>, which is extremely fast because it is native to the browser.\n              </p>\n            </div>\n            <div title=\"Specificity\" class=\"sect2\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Specificity\n                </h3>\n              </div>\n              <p>\n                Be specific on the right-hand side of your selector, and less specific on the left.\n              </p>\n              <pre class=\"brush: js\">\n// unoptimized\n$('div.data .gonzalez');\n\n// optimized\n$('.data td.gonzalez');\n</pre>\n              <p>\n                Use <code class=\"code\">tag.class</code> if possible on your right-most selector, and just <code class=\"code\">tag</code> or just <code class=\"code\">.class</code> on the left.\n              </p>\n              <p>\n                Avoid excessive specificity.\n              </p>\n              <pre class=\"brush: js\">\n$('.data table.attendees td.gonzalez');\n\n// better: drop the middle if possible\n$('.data td.gonzalez');\n</pre>\n              <p>\n                A \"flatter\" DOM also helps improve selector performance, as the selector engine has fewer layers to traverse when looking for an element.\n              </p>\n            </div>\n            <div title=\"Avoid the Universal Selector\" class=\"sect2\">\n              <div class=\"titlepage\">\n                <h3 class=\"title\">\n                  Avoid the Universal Selector\n                </h3>\n              </div>\n              <p>\n                Selections that specify or imply that a match could be found anywhere can be very slow.\n              </p>\n              <pre class=\"brush: js\">\n$('.buttons &gt; *');  // extremely expensive\n$('.buttons').children();  // much better\n\n$('.gender :radio');  // implied universal selection\n$('.gender *:radio'); // same thing, explicit now\n$('.gender input:radio'); // much better\n</pre>\n            </div>\n          </div>\n          <div title=\"Use Event Delegation\" class=\"sect1\">\n            <div class=\"titlepage\">\n              <div>\n                <div>\n                  <h2 class=\"title\">\n                    Use Event Delegation\n                  </h2>\n                </div>\n              </div>\n            </div>\n            <p>\n              Event delegation allows you to bind an event handler to one container element (for example, an unordered list) instead of multiple contained elements (for example, list items). jQuery makes this easy with $.fn.live and $.fn.delegate. Where possible, you should use <code class=\"code\">$.fn.delegate</code> instead of <code class=\"code\">$.fn.live</code>, as it eliminates the need for an unnecessary selection, and its explicit context (vs. <code class=\"code\">$.fn.live</code>'s context of <code class=\"code\">document</code>) reduces overhead by approximately 80%.\n            </p>\n            <p>\n              In addition to performance benefits, event delegation also allows you to add new contained elements to your page without having to re-bind the event handlers for them as they're added.\n            </p>\n            <pre class=\"brush: js\">\n// bad (if there are lots of list items)\n$('li.trigger').click(handlerFn);\n\n// better: event delegation with $.fn.live\n$('li.trigger').live('click', handlerFn);\n\n// best: event delegation with $.fn.delegate\n// allows you to specify a context easily\n$('#myList').delegate('li.trigger', 'click', handlerFn);\n</pre>\n          </div>\n          <div title=\"Detach Elements to Work With Them\" class=\"sect1\">\n            <div class=\"titlepage\">\n              <div>\n                <div>\n                  <h2 class=\"title\">\n                    Detach Elements to Work With Them\n                  </h2>\n                </div>\n              </div>\n            </div>\n            <p>\n              The DOM is slow; you want to avoid manipulating it as much as possible. jQuery introduced <code class=\"code\">$.fn.detach</code> in version 1.4 to help address this issue, allowing you to remove an element from the DOM while you work with it.\n            </p>\n            <pre class=\"brush: js\">\nvar $table = $('#myTable');\nvar $parent = $table.parent();\n\n$table.detach();\n// ... add lots and lots of rows to table\n$parent.append(table);\n</pre>\n          </div>\n          <div title=\"Use Stylesheets for Changing CSS on Many Elements\" class=\"sect1\">\n            <div class=\"titlepage\">\n              <div>\n                <div>\n                  <h2 class=\"title\">\n                    Use Stylesheets for Changing CSS on Many Elements\n                  </h2>\n                </div>\n              </div>\n            </div>\n            <p>\n              If you're changing the CSS of more than 20 elements using $.fn.css, consider adding a style tag to the page instead for a nearly 60% increase in speed.\n            </p>\n            <pre class=\"brush: js\">\n// fine for up to 20 elements, slow after that\n$('a.swedberg').css('color', '#asd123');\n$('&lt;style type=\"text/css\"&gt;a.swedberg { color : #asd123 }&lt;/style&gt;')\n    .appendTo('head');\n</pre>\n          </div>\n          <div title=\"Use $.data Instead of $.fn.data\" class=\"sect1\">\n            <div class=\"titlepage\">\n              <div>\n                <div>\n                  <h2 class=\"title\">\n                    Use <code class=\"code\">$.data</code> Instead of <code class=\"code\">$.fn.data</code>\n                  </h2>\n                </div>\n              </div>\n            </div>\n            <p>\n              Using $.data on a DOM element instead of calling $.fn.data on a jQuery selection can be up to 10 times faster. Be sure you understand the difference between a DOM element and a jQuery selection before doing this, though.\n            </p>\n            <pre class=\"brush: js\">\n// regular\n$(elem).data(key,value);  \n\n// 10x faster\n $.data(elem,key,value);\n</pre>\n          </div>\n          <div title=\"Don't Act on Absent Elements\" class=\"sect1\">\n            <div class=\"titlepage\">\n              <div>\n                <div>\n                  <h2 class=\"title\">\n                    Don't Act on Absent Elements\n                  </h2>\n                </div>\n              </div>\n            </div>\n            <p>\n              jQuery won't tell you if you're trying to run a whole lot of code on an empty selection — it will proceed as though nothing's wrong. It's up to you to verify that your selection contains some elements.\n            </p>\n            <pre class=\"brush: js\">\n// BAD: this runs three functions\n// before it realizes there's nothing\n// in the selection\n$('#nosuchthing').slideUp();\n\n// Better\nvar $mySelection = $('#nosuchthing');\nif ($mySelection.length) { $mySelection.slideUp(); }\n\n// BEST: add a doOnce plugin\njQuery.fn.doOnce = function(func){\n    this.length &amp;&amp; func.apply(this);\n    return this;\n }\n\n $('li.cartitems').doOnce(function(){ \n    // make it ajax! \\o/ \n});\n</pre>\n            <p>\n              This guidance is especially applicable for jQuery UI widgets, which have a lot of overhead even when the selection doesn't contain elements.\n            </p>\n          </div>\n          <div title=\"Variable Definition\" class=\"sect1\">\n            <div class=\"titlepage\">\n              <div>\n                <div>\n                  <h2 class=\"title\">\n                    Variable Definition\n                  </h2>\n                </div>\n              </div>\n            </div>\n            <p>\n              Variables can be defined in one statement instead of several.\n            </p>\n            <pre class=\"brush: js\">\n// old &amp; busted\nvar test = 1;\nvar test2 = function() { ... };\nvar test3 = test2(test);\n\n// new hotness\nvar test = 1,\n    test2 = function() { ... },\n    test3 = test2(test);\n</pre>\n            <p>\n              In self-executing functions, variable definition can be skipped all together.\n            </p>\n            <pre class=\"brush: js\">\n(function(foo, bar) { ... })(1, 2);\n</pre>\n          </div>\n          <div title=\"Conditionals\" class=\"sect1\">\n            <div class=\"titlepage\">\n              <div>\n                <div>\n                  <h2 class=\"title\">\n                    Conditionals\n                  </h2>\n                </div>\n              </div>\n            </div>\n            <pre class=\"brush: js\">\n// old way\nif (type == 'foo' || type == 'bar') { ... }\n\n// better\nif (/^(foo|bar)$/.test(type)) { ... }\n\n// object literal lookup\nif (({ foo : 1, bar : 1 })[type]) { ... }\n</pre>\n          </div>\n          <div title=\"Don't Treat jQuery as a Black Box\" class=\"sect1\">\n            <div class=\"titlepage\">\n              <div>\n                <div>\n                  <h2 class=\"title\">\n                    Don't Treat jQuery as a Black Box\n                  </h2>\n                </div>\n              </div>\n            </div>\n            <p>\n              Use the source as your documentation — bookmark <a href=\"http://bit.ly/jqsource\" class=\"ulink\">http://bit.ly/jqsource</a> and refer to it often.\n            </p>\n          </div>\n        </div>    <div title=\"Code Organization\" class=\"chapter\">\n      <div class=\"titlepage\">\n        <div>\n          <div>\n            <h2 class=\"title\">\n              Code Organization\n            </h2>\n          </div>\n        </div>\n      </div>\n      <div title=\"Overview\" class=\"section\">\n        <h2 class=\"title\">\n          Overview\n        </h2>\n        <p>\n          When you move beyond adding simple enhancements to your website with jQuery and start developing full-blown client-side applications, you need to consider how to organize your code. In this chapter, we'll take a look at various code organization patterns you can use in your jQuery application and explore the RequireJS dependency management and build system.\n        </p>\n        <div title=\"Key Concepts\" class=\"section\">\n          <div class=\"titlepage\">\n            <h3 class=\"title\">\n              Key Concepts\n            </h3>\n          </div>\n          <p>\n            Before we jump into code organization patterns, it's important to understand some concepts that are common to all good code organization patterns.\n          </p>\n          <ul>\n            <li>Your code should be divided into units of functionality — modules, services, etc. Avoid the temptation to have all of your code in one huge <code class=\"code\">$(document).ready()</code> block. This concept, loosely, is known as encapsulation.\n            </li>\n            <li>\n              <p>\n                Don't repeat yourself. Identify similarities among pieces of functionality, and use inheritance techniques to avoid repetitive code.\n              </p>\n            </li>\n            <li>\n              <p>\n                Despite jQuery's DOM-centric nature, JavaScript applications are not all about the DOM. Remember that not all pieces of functionality need to — or should — have a DOM representation.\n              </p>\n            </li>\n            <li>\n              <p>\n                Units of functionality should be <a href=\"http://en.wikipedia.org/wiki/Loose_coupling\" class=\"ulink\">loosely coupled</a> — a unit of functionality should be able to exist on its own, and communication between units should be handled via a messaging system such as custom events or pub/sub. Stay away from direct communication between units of functionality whenever possible.\n              </p>\n            </li>\n          </ul>\n          <p>\n            The concept of loose coupling can be especially troublesome to developers making their first foray into complex applications, so be mindful of this as you're getting started.\n          </p>\n        </div>\n      </div>\n      <div title=\"Encapsulation\" class=\"section\">\n        <h2 class=\"title\">\n          Encapsulation\n        </h2>\n        <p>\n          The first step to code organization is separating pieces of your application into distinct pieces; sometimes, even just this effort is sufficient to lend\n        </p>\n        <div title=\"The Object Literal\" class=\"section\">\n          <div class=\"titlepage\">\n            <h3 class=\"title\">\n              The Object Literal\n            </h3>\n          </div>\n          <p>\n            An object literal is perhaps the simplest way to encapsulate related code. It doesn't offer any privacy for properties or methods, but it's useful for eliminating anonymous functions from your code, centralizing configuration options, and easing the path to reuse and refactoring.\n          </p>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>An object literal</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\nvar myFeature = {\nmyProperty : 'hello',\n\nmyMethod : function() {\n    console.log(myFeature.myProperty);\n},\n\ninit : function(settings) {\n    myFeature.settings = settings;\n},\n\nreadSettings : function() {\n    console.log(myFeature.settings);\n}\n};\n\nmyFeature.myProperty; // 'hello'\nmyFeature.myMethod(); // logs 'hello'\nmyFeature.init({ foo : 'bar' });\nmyFeature.readSettings(); // logs { foo : 'bar' }\n</pre>\n            </div>\n          </div>\n          <p>\n            The object literal above is simply an object assigned to a variable. The object has one property and several methods. All of the properties and methods are public, so any part of your application can see the properties and call methods on the object. While there is an init method, there's nothing requiring that it be called before the object is functional.\n          </p>\n          <p>\n            How would we apply this pattern to jQuery code? Let's say that we had this code written in the traditional jQuery style:\n          </p>\n          <pre class=\"brush: js\">\n// clicking on a list item loads some content\n// using the list item's ID and hides content\n// in sibling list items\n$(document).ready(function() {\n$('#myFeature li')\n.append('&lt;div/&gt;')\n.click(function() {\n  var $this = $(this);\n  var $div = $this.find('div');\n  $div.load('foo.php?item=' +\n    $this.attr('id'),\n    function() {\n      $div.show();\n      $this.siblings()\n        .find('div').hide();\n    }\n  );\n});\n});\n</pre>\n          <p>\n            If this were the extent of our application, leaving it as-is would be fine. On the other hand, if this was a piece of a larger application, we'd do well to keep this functionality separate from unrelated functionality. We might also want to move the URL out of the code and into a configuration area. Finally, we might want to break up the chain to make it easier to modify pieces of the functionality later.\n          </p>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>Using an object literal for a jQuery feature</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\nvar myFeature = {\ninit : function(settings) {\n    myFeature.config = {\n        $items : $('#myFeature li'),\n        $container : $('&lt;div class=\"container\"&gt;&lt;/div&gt;'),\n        urlBase : '/foo.php?item='\n    };\n\n    // allow overriding the default config\n    $.extend(myFeature.config, settings);\n\n    myFeature.setup();\n},\n\nsetup : function() {\n    myFeature.config.$items\n        .each(myFeature.createContainer)\n        .click(myFeature.showItem);\n},\n\ncreateContainer : function() {\n    var $i = $(this),\n        $c = myFeature.config.$container.clone()\n                 .appendTo($i);\n\n    $i.data('container', $c);\n},\n\nbuildUrl : function() {\n    return myFeature.config.urlBase +\n           myFeature.$currentItem.attr('id');\n},\n\nshowItem : function() {\n    var myFeature.$currentItem = $(this);\n    myFeature.getContent(myFeature.showContent);\n},\n\ngetContent : function(callback) {\n    var url = myFeature.buildUrl();\n    myFeature.$currentItem\n        .data('container').load(url, callback);\n},\n\nshowContent : function() {\n    myFeature.$currentItem\n        .data('container').show();\n    myFeature.hideContent();\n},\n\nhideContent : function() {\n    myFeature.$currentItem.siblings()\n        .each(function() {\n            $(this).data('container').hide();\n        });\n}\n};\n\n$(document).ready(myFeature.init);\n</pre>\n            </div>\n          </div>\n          <p>\n            The first thing you'll notice is that this approach is obviously far longer than the original — again, if this were the extent of our application, using an object literal would likely be overkill. Assuming it's not the extent of our application, though, we've gained several things:\n          </p>\n          <ul>\n            <li>\n              <p>\n                We've broken our feature up into tiny methods. In the future, if we want to change how content is shown, it's clear where to change it. In the original code, this step is much harder to locate.\n              </p>\n            </li>\n            <li>\n              <p>\n                We've eliminated the use of anonymous functions.\n              </p>\n            </li>\n            <li>\n              <p>\n                We've moved configuration options out of the body of the code and put them in a central location.\n              </p>\n            </li>\n            <li>\n              <p>\n                We've eliminated the constraints of the chain, making the code easier to refactor, remix, and rearrange.\n              </p>\n            </li>\n          </ul>\n          <p>\n            For non-trivial features, object literals are a clear improvement over a long stretch of code stuffed in a $(document).ready() block, as they get us thinking about the pieces of our functionality. However, they aren't a whole lot more advanced than simply having a bunch of function declarations inside of that $(document).ready() block.\n          </p>\n        </div>\n        <div title=\"The Module Pattern\" class=\"section\">\n          <div class=\"titlepage\">\n            <h3 class=\"title\">\n              The Module Pattern\n            </h3>\n          </div>\n          <p>\n            The module pattern overcomes some of the limitations of the object literal, offering privacy for variables and functions while exposing a public API if desired.\n          </p>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>The module pattern</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\nvar feature =(function() {\n\n// private variables and functions\nvar privateThing = 'secret',\n    publicThing = 'not secret',\n\n    changePrivateThing = function() {\n        privateThing = 'super secret';\n    },\n\n    sayPrivateThing = function() {\n        console.log(privateThing);\n        changePrivateThing();\n    };\n\n// public API\nreturn {\n    publicThing : publicThing,\n    sayPrivateThing : sayPrivateThing\n}\n\n})();\n\nfeature.publicThing; // 'not secret'\n\nfeature.sayPrivateThing();\n// logs 'secret' and changes the value\n// of privateThing\n</pre>\n            </div>\n          </div>\n          <p>\n            In the example above, we self-execute an anonymous function that returns an object. Inside of the function, we define some variables. Because the variables are defined inside of the function, we don't have access to them outside of the function unless we put them in the return object. This means that no code outside of the function has access to the <code class=\"code\">privateThing</code> variable or to the <code class=\"code\">changePrivateThing</code> function. However, <code class=\"code\">sayPrivateThing</code> does have access to <code class=\"code\">privateThing</code> and <code class=\"code\">changePrivateThing</code>, because both were defined in the same scope as <code class=\"code\">sayPrivateThing</code>.\n          </p>\n          <p>\n            This pattern is powerful because, as you can gather from the variable names, it can give you private variables and functions while exposing a limited API consisting of the returned object's properties and methods.\n          </p>\n          <p>\n            Below is a revised version of the previous example, showing how we could create the same feature using the module pattern while only exposing one public method of the module, <code class=\"code\">showItemByIndex()</code>.\n          </p>\n          <div class=\"example\">\n            <p class=\"title\">\n              <b>Using the module pattern for a jQuery feature</b>\n            </p>\n            <div class=\"example-contents\">\n              <pre class=\"brush: js\">\n$(document).ready(function() {\nvar feature = (function() {\n\n    var $items = $('#myFeature li'),\n        $container = $('&lt;div class=\"container\"&gt;&lt;/div&gt;'),\n        $currentItem,\n\n        urlBase = '/foo.php?item=',\n\n        createContainer = function() {\n            var $i = $(this),\n                $c = $container.clone().appendTo($i);\n\n            $i.data('container', $c);\n        },\n\n        buildUrl = function() {\n            return urlBase + $currentItem.attr('id');\n        },\n\n        showItem = function() {\n            var $currentItem = $(this);\n            getContent(showContent);\n        },\n\n        showItemByIndex = function(idx) {\n            $.proxy(showItem, $items.get(idx));\n        },\n\n        getContent = function(callback) {\n            $currentItem.data('container').load(buildUrl(), callback);\n        },\n\n        showContent = function() {\n            $currentItem.data('container').show();\n            hideContent();\n        },\n\n        hideContent = function() {\n            $currentItem.siblings()\n                .each(function() {\n                    $(this).data('container').hide();\n            });\n        };\n\n    $items\n        .each(createContainer)\n        .click(showItem);\n\n    return { showItemByIndex : showItemByIndex };\n})();\n\nfeature.showItemByIndex(0);\n});\n</pre>\n            </div>\n          </div>\n        </div>\n      </div>\n      <h2 class=\"title\">\n        Managing Dependencies\n      </h2>\n      <div class=\"note\">\n      <h3 class=\"title\">\n        Note\n      </h3>\n      <p>\n        This section is based heavily on the excellent RequireJS documentation at <a href=\"http://requirejs.org/docs/jquery.html\" class=\"ulink\">http://requirejs.org/docs/jquery.html</a>, and is used with the permission of RequireJS author James Burke.\n      </p>\n      </div>\n      <p>\n        When a project reaches a certain size, managing the script modules for a project starts to get tricky. You need to be sure to sequence the scripts in the right order, and you need to start seriously thinking about combining scripts together into a bundle for deployment, so that only one or a very small number of requests are made to load the scripts. You may also want to load code on the fly, after page load.\n      </p>\n      <p>\n        RequireJS, a dependency management tool by James Burke, can help you manage the script modules, load them in the right order, and make it easy to combine the scripts later via the RequireJS optimization tool without needing to change your markup. It also gives you an easy way to load scripts after the page has loaded, allowing you to spread out the download size over time.\n      </p>\n      <p>\n        RequireJS has a module system that lets you define well-scoped modules, but you do not have to follow that system to get the benefits of dependency management and build-time optimizations. Over time, if you start to create more modular code that needs to be reused in a few places, the module format for RequireJS makes it easy to write encapsulated code that can be loaded on the fly. It can grow with you, particularly if you want to incorporate internationalization (i18n) string bundles, to localize your project for different languages, or load some HTML strings and make sure those strings are available before executing code, or even use JSONP services as dependencies.\n      </p>\n      <div title=\"Getting RequireJS\" class=\"section\">\n        <div class=\"titlepage\">\n          <h3 class=\"title\">\n            Getting RequireJS\n          </h3>\n        </div>\n        <p>\n          The easiest way to use RequireJS with jQuery is to <a href=\"http://requirejs.org/docs/download.html\" class=\"ulink\">download a build of jQuery that has RequireJS built in</a>. This build excludes portions of RequireJS that duplicate jQuery functionality. You may also find it useful to download <a href=\"http://requirejs.org/docs/release/0.11.0/jquery-require-sample.zip\" class=\"ulink\">a sample jQuery project that uses RequireJS</a>.\n        </p>\n      </div>\n      <div title=\"Using RequireJS with jQuery\" class=\"section\">\n        <div class=\"titlepage\">\n          <h3 class=\"title\">\n            Using RequireJS with jQuery\n          </h3>\n        </div>\n        <p>\n          Using RequireJS in your page is simple: just include the jQuery that has RequireJS built in, then require your application files. The following example assumes that the jQuery build, and your other scripts, are all in a <code class=\"filename\">scripts/</code> directory.\n        </p>\n        <div class=\"example\">\n          <p class=\"title\">\n            <b>Using RequireJS: A simple example</b>\n          </p>\n          <div class=\"example-contents\">\n            <pre class=\"brush: js\">\n&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n    &lt;title&gt;jQuery+RequireJS Sample Page&lt;/title&gt;\n    &lt;script src=\"scripts/require-jquery.js\"&gt;&lt;/script&gt;\n    &lt;script&gt;require([\"app\"]);&lt;/script&gt;\n&lt;/head&gt;\n&lt;body&gt;\n    &lt;h1&gt;jQuery+RequireJS Sample Page&lt;/h1&gt;\n&lt;/body&gt;\n&lt;/html&gt;\n</pre>\n          </div>\n        </div>\n        <p>\n          The call to <code class=\"code\">require([\"app\"])</code> tells RequireJS to load the <code class=\"filename\">scripts/app.js</code> file. RequireJS will load any dependency that is passed to <code class=\"code\">require()</code> without a <code class=\"filename\">.js</code> extension from the same directory as <code class=\"filename\">require-jquery.js</code>, though this can be configured to behave differently. If you feel more comfortable specifying the whole path, you can also do the following:\n        </p>\n        <pre class=\"brush: js\">\n&lt;script&gt;require([\"scripts/app.js\"]);&lt;/script&gt;\n</pre>\n        <p>\n          What is in <code class=\"filename\">app.js</code>? Another call to <code class=\"filename\">require.js</code> to load all the scripts you need and any init work you want to do for the page. This example <code class=\"filename\">app.js</code> script loads two plugins, <code class=\"filename\">jquery.alpha.js</code> and <code class=\"filename\">jquery.beta.js</code> (not the names of real plugins, just an example). The plugins should be in the same directory as <code class=\"filename\">require-jquery.js</code>:\n        </p>\n        <div class=\"example\">\n          <p class=\"title\">\n            <b>A simple JavaScript file with dependencies</b>\n          </p>\n          <div class=\"example-contents\">\n            <pre class=\"brush: js\">\nrequire([\"jquery.alpha\", \"jquery.beta\"], function() {\n//the jquery.alpha.js and jquery.beta.js plugins have been loaded.\n$(function() {\n    $('body').alpha().beta();\n});\n});\n</pre>\n          </div>\n        </div>\n      </div>\n      <div title=\"Creating Reusable Modules with RequireJS\" class=\"section\">\n        <div class=\"titlepage\">\n          <h3 class=\"title\">\n            Creating Reusable Modules with RequireJS\n          </h3>\n        </div>\n        <p>\n          RequireJS makes it easy to define reusable modules via <code class=\"code\">require.def()</code>. A RequireJS module can have dependencies that can be used to define a module, and a RequireJS module can return a value — an object, a function, whatever — that can then be consumed by yet other modules.\n        </p>\n        <p>\n          If your module does not have any dependencies, then just specify the name of the module as the first argument to <code class=\"code\">require.def()</code>. The second argument is just an object literal that defines the module's properties. For example:\n        </p>\n        <div class=\"example\">\n          <p class=\"title\">\n            <b>Defining a RequireJS module that has no dependencies</b>\n          </p>\n          <div class=\"example-contents\">\n            <pre class=\"brush: js\">\nrequire.def(\"my/simpleshirt\",\n{\n    color: \"black\",\n    size: \"unisize\"\n}\n);\n</pre>\n          </div>\n        </div>\n            <p>\n              This example would be stored in a my/simpleshirt.js file.\n            </p>\n            <p>\n              If your module has dependencies, you can specify the dependencies as the second argument to <code class=\"code\">require.def()</code> (as an array) and then pass a function as the third argument. The function will be called to define the module once all dependencies have loaded. The function receives the values returned by the dependencies as its arguments (in the same order they were required in the array), and the function should return an object that defines the module.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Defining a RequireJS module with dependencies</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nrequire.def(\"my/shirt\",\n[\"my/cart\", \"my/inventory\"],\nfunction(cart, inventory) {\n    //return an object to define the \"my/shirt\" module.\n    return {\n        color: \"blue\",\n        size: \"large\"\n        addToCart: function() {\n            inventory.decrement(this);\n            cart.add(this);\n        }\n    }\n}\n);\n</pre>\n              </div>\n            </div>\n            <p>\n              In this example, a my/shirt module is created. It depends on my/cart and my/inventory. On disk, the files are structured like this:\n            </p>\n            <pre class=\"brush: js\">\nmy/cart.js\nmy/inventory.js\nmy/shirt.js\n</pre>\n            <p>\n              The function that defines <code class=\"code\">my/shirt</code> is not called until the <code class=\"code\">my/cart</code> and <code class=\"code\">my/inventory</code> modules have been loaded, and the function receives the modules as the <code class=\"code\">cart</code> and <code class=\"code\">inventory</code> arguments. The order of the function arguments must match the order in which the dependencies were required in the dependencies array. The object returned by the function call defines the <code class=\"code\">my/shirt</code> module. Be defining modules in this way, <code class=\"code\">my/shirt</code> does not exist as a global object. Modules that define globals are explicitly discouraged, so multiple versions of a module can exist in a page at a time.\n            </p>\n            <p>\n              Modules do not have to return objects; any valid return value from a function is allowed.\n            </p>\n            <div class=\"example\">\n              <p class=\"title\">\n                <b>Defining a RequireJS module that returns a function</b>\n              </p>\n              <div class=\"example-contents\">\n                <pre class=\"brush: js\">\nrequire.def(\"my/title\",\n[\"my/dependency1\", \"my/dependency2\"],\nfunction(dep1, dep2) {\n    //return a function to define \"my/title\". It gets or sets\n    //the window title.\n    return function(title) {\n        return title ? (window.title = title) : window.title;\n    }\n}\n);\n</pre>\n              </div>\n            </div>\n            <p>\n              Only one module should be required per JavaScript file.\n            </p>\n          </div>\n        </div>\n      </div>\n      <div title=\"Optimizing Your Code: The RequireJS Build Tool\" class=\"section\">\n        <div class=\"titlepage\">\n          <h3 class=\"title\">\n            Optimizing Your Code: The RequireJS Build Tool\n          </h3>\n        </div>\n        <p>\n          Once you incorporate RequireJS for dependency management, your page is set up to be optimized very easily. Download the RequireJS source and place it anywhere you like, preferrably somewhere outside your web development area. For the purposes of this example, the RequireJS source is placed as a sibling to the <code class=\"filename\">webapp</code> directory, which contains the HTML page and the scripts directory with all the scripts. Complete directory structure:\n        </p>\n        <pre class=\"brush: js\">\nrequirejs/ (used for the build tools)\nwebapp/app.html\nwebapp/scripts/app.js\nwebapp/scripts/require-jquery.js\nwebapp/scripts/jquery.alpha.js\nwebapp/scripts/jquery.beta.js\n</pre>\n        <p>\n          Then, in the scripts directory that has <code class=\"filename\">require-jquery.js</code> and app.js, create a file called app.build.js with the following contents:\n        </p>\n        <div class=\"example\">\n          <p class=\"title\">\n            <b>A RequireJS build configuration file</b>\n          </p>\n          <div class=\"example-contents\">\n            <pre class=\"brush: js\">\n{\nappDir: \"../\",\nbaseUrl: \"scripts/\",\ndir: \"../../webapp-build\",\n//Comment out the optimize line if you want\n//the code minified by Closure Compiler using\n//the \"simple\" optimizations mode\noptimize: \"none\",\n\nmodules: [\n    {\n        name: \"app\"\n    }\n]\n}\n</pre>\n          </div>\n        </div>\n        <p>\n          To use the build tool, you need Java 6 installed. Closure Compiler is used for the JavaScript minification step (if <code class=\"code\">optimize: \"none\"</code> is commented out), and it requires Java 6.\n        </p>\n        <p>\n          To start the build, go to the webapp/scripts directory, execute the following command:\n        </p>\n        <pre class=\"brush: js\">\n# non-windows systems\n../../requirejs/build/build.sh app.build.js\n\n# windows systems\n..\\..\\requirejs\\build\\build.bat app.build.js\n</pre>\n        <p>\n          Now, in the webapp-build directory, <code class=\"filename\">app.js</code> will have the <code class=\"filename\">app.js</code> contents, <code class=\"filename\">jquery.alpha.js</code> and <code class=\"filename\">jquery.beta.js</code> inlined. If you then load the <code class=\"filename\">app.html</code> file in the <code class=\"filename\">webapp-build</code> directory, you should not see any network requests for <code class=\"filename\">jquery.alpha.js</code> and <code class=\"filename\">jquery.beta.js</code>.\n        </p>\n      </div>\n      <div title=\"Exercises\" class=\"section\">\n        <h2 class=\"title\">\n          Exercises\n        </h2>\n        <div title=\"Create a Portlet Module\" class=\"section\">\n          <div class=\"titlepage\">\n            <h3 class=\"title\">\n              Create a Portlet Module\n            </h3>\n          </div>\n          <p>\n            Open the file <code class=\"filename\">/exercises/portlets.html</code> in your browser. Use the file <code class=\"filename\">/exercises/js/portlets.js</code>. Your task is to create a portlet creation function that uses the module pattern, such that the following code will work:\n          </p>\n          <pre class=\"brush: js\">\nvar myPortlet = Portlet({\ntitle : 'Curry',\nsource : 'data/html/curry.html',\ninitialState : 'open' // or 'closed'\n});\n\nmyPortlet.$element.appendTo('body');\n</pre>\n          <p>\n            Each portlet should be a div with a title, a content area, a button to open/close the portlet, a button to remove the portlet, and a button to refresh the portlet. The portlet returned by the Portlet function should have the following public API:\n          </p>\n          <pre class=\"brush: js\">\nmyPortlet.open(); // force open state\nmyPortlet.close(); // force close state\nmyPortlet.toggle(); // toggle open/close state\nmyPortlet.refresh(); // refresh the content\nmyPortlet.destroy(); // remove the portlet from the page\nmyPortlet.setSource('data/html/onions.html');\n// change the source\n</pre>\n        </div>\n      </div>\n    </div>        <div title=\"Custom Events\" class=\"chapter\">\n          <div class=\"titlepage\">\n            <div>\n              <div>\n                <h2 class=\"title\">\n                  Custom Events\n                </h2>\n              </div>\n            </div>\n          </div>\n          <h2 class=\"title\">\n            Introducing Custom Events\n          </h2>\n          <p>\n            We’re all familiar with the basic events — click, mouseover, focus, blur, submit, etc. — that we can latch on to as a user interacts with the browser. Custom events open up a whole new world of event-driven programming. In this chapter, we’ll use jQuery’s custom events system to make a simple Twitter search application.\n          </p>\n          <p>\n            It can be difficult at first to understand why you'd want to use custom events, when the built-in events seem to suit your needs just fine. It turns out that custom events offer a whole new way of thinking about event-driven JavaScript. Instead of focusing on the element that triggers an action, custom events put the spotlight on the element being acted upon. This brings a bevy of benefits, including:\n          </p>\n          <ul>\n            <li>\n              <p>\n                Behaviors of the target element can easily be triggered by different elements using the same code.\n              </p>\n            </li>\n            <li>\n              <p>\n                Behaviors can be triggered across multiple, similar, target elements at once.\n              </p>\n            </li>\n            <li>\n              <p>\n                Behaviors are more clearly associated with the target element in code, making code easier to read and maintain.\n              </p>\n            </li>\n          </ul>\n          <p>\n            Why should you care? An example is probably the best way to explain. Suppose you have a lightbulb in a room in a house. The lightbulb is currently turned on, and it’s controlled by two three-way switches and a clapper:\n          </p>\n          <pre class=\"brush: js\">\n&lt;div class=\"room\" id=\"kitchen\"&gt;\n    &lt;div class=\"lightbulb on\"&gt;&lt;/div&gt;\n    &lt;div class=\"switch\"&gt;&lt;/div&gt;\n    &lt;div class=\"switch\"&gt;&lt;/div&gt;\n    &lt;div class=\"clapper\"&gt;&lt;/div&gt;\n&lt;/div&gt;\n</pre>\n          <p>\n            Triggering the clapper or either of the switches will change the state of the lightbulb. The switches and the clapper don’t care what state the lightbulb is in; they just want to change the state.\n          </p>\n          <p>\n            Without custom events, you might write some code like this:\n          </p>\n          <pre class=\"brush: js\">\n$('.switch, .clapper').click(function() {\n    var $light = $(this).parent().find('.lightbulb');\n    if ($light.hasClass('on')) {\n        $light.removeClass('on').addClass('off');\n    } else {\n        $light.removeClass('off').addClass('on');\n    }\n});\n</pre>\n          <p>\n            With custom events, your code might look more like this:\n          </p>\n          <pre class=\"brush: js\">\n$('.lightbulb').bind('changeState', function(e) {\n    var $light = $(this);\n    if ($light.hasClass('on')) {\n        $light.removeClass('on').addClass('off');\n    } else {\n        $light.removeClass('off').addClass('on');\n    }\n});\n\n$('.switch, .clapper').click(function() {\n    $(this).parent().find('.lightbulb').trigger('changeState');\n});\n</pre>\n          <p>\n            This last bit of code is not that exciting, but something important has happened: we’ve moved the behavior of the lightbulb to the lightbulb, and away from the switches and the clapper.\n          </p>\n          <p>\n            Let’s make our example a little more interesting. We’ll add another room to our house, along with a master switch, as shown here:\n          </p>\n          <pre class=\"brush: js\">\n&lt;div class=\"room\" id=\"kitchen\"&gt;\n    &lt;div class=\"lightbulb on\"&gt;&lt;/div&gt;\n    &lt;div class=\"switch\"&gt;&lt;/div&gt;\n    &lt;div class=\"switch\"&gt;&lt;/div&gt;\n    &lt;div class=\"clapper\"&gt;&lt;/div&gt;\n&lt;/div&gt;\n&lt;div class=\"room\" id=\"bedroom\"&gt;\n    &lt;div class=\"lightbulb on\"&gt;&lt;/div&gt;\n    &lt;div class=\"switch\"&gt;&lt;/div&gt;\n    &lt;div class=\"switch\"&gt;&lt;/div&gt;\n    &lt;div class=\"clapper\"&gt;&lt;/div&gt;\n&lt;/div&gt;\n&lt;div id=\"master_switch\"&gt;&lt;/div&gt;\n</pre>\n          <p>\n            If there are any lights on in the house, we want the master switch to turn all the lights off; otherwise, we want it to turn all lights on. To accomplish this, we’ll add two more custom events to the lightbulbs: <code class=\"code\">turnOn</code> and <code class=\"code\">turnOff</code>. We’ll make use of them in the <code class=\"code\">changeState</code> custom event, and use some logic to decide which one the master switch should trigger:\n          </p>\n          <pre class=\"brush: js\">\n$('.lightbulb')\n    .bind('changeState', function(e) {\n        var $light = $(this);\n        if ($light.hasClass('on')) {\n            $light.trigger('turnOff');\n        } else {\n            $light.trigger('turnOn');\n        }\n    })\n    .bind('turnOn', function(e) {\n        $(this).removeClass('off').addClass('on');\n    })\n    .bind('turnOff', function(e) {\n        $(this).removeClass('off').addClass('on');\n    });\n\n$('.switch, .clapper').click(function() {\n    $(this).parent().find('.lightbulb').trigger('changeState');\n});\n\n$('#master_switch').click(function() {\n    if ($('.lightbulb.on').length) {\n        $('.lightbulb').trigger('turnOff');\n    } else {\n        $('.lightbulb').trigger('turnOn');\n    }\n});\n</pre>\n          <p>\n            Note how the behavior of the master switch is attached to the master switch; the behavior of a lightbulb belongs to the lightbulbs.\n          </p>\n          <div class=\"note\">\n          <h3 class=\"title\">\n            Note\n          </h3>\n          <p>\n            If you’re accustomed to object-oriented programming, you may find it useful to think of custom events as methods of objects. Loosely speaking, the object to which the method belongs is created via the jQuery selector. Binding the changeState custom event to all <code class=\"code\">$(‘.light’)</code> elements is akin to having a class called <code class=\"code\">Light</code> with a method of <code class=\"code\">changeState</code>, and then instantiating new <code class=\"code\">Light</code> objects for each element with a classname of light.\n          </p>\n          </div>\n          <div title=\"Recap: $.fn.bind and $.fn.trigger\" class=\"sidebar\">\n            <p class=\"title\">\n              <b>Recap: $.fn.bind and $.fn.trigger</b>\n            </p>\n            <p>\n              In the world of custom events, there are two important jQuery methods: <code class=\"code\">$.fn.bind</code> and <code class=\"code\">$.fn.trigger</code>. In the Events chapter, we saw how to use these methods for working with user events; for this chapter, it's important to remember two things:\n            </p>\n            <ul>\n              <li>The <code class=\"code\">$.fn.bind</code> method takes an event type and an event handling function as arguments. Optionally, it can also receive event-related data as its second argument, pushing the event handling function to the third argument. Any data that is passed will be available to the event handling function in the <code class=\"code\">data</code> property of the event object. The event handling function always receives the event object as its first argument.\n              </li>\n              <li>The <code class=\"code\">$.fn.trigger</code> method takes an event type as its argument. Optionally, it can also take an array of values. These values will be passed to the event handling function as arguments after the event object.\n              </li>\n            </ul>\n            <p>\n              Here is an example of the usage of <code class=\"code\">$.fn.bind</code> and <code class=\"code\">$.fn.trigger</code> that uses custom data in both cases:\n            </p>\n            <pre class=\"brush: js\">\n$(document).bind('myCustomEvent', { foo : 'bar' }, function(e, arg1, arg2) {\n    console.log(e.data.foo); // 'bar'\n    console.log(arg1); // 'bim'\n    console.log(arg2); // 'baz'\n});\n\n$(document).trigger('myCustomEvent', [ 'bim', 'baz' ]);\n</pre>\n          </div>\n          <div title=\"A Sample Application\" class=\"section\">\n            <div class=\"titlepage\">\n              <h3 class=\"title\">\n                A Sample Application\n              </h3>\n            </div>\n            <p>\n              To demonstrate the power of custom events, we’re going to create a simple tool for searching Twitter. The tool will offer several ways for a user to add search terms to the display: by entering a search term in a text box, by entering multiple search terms in the URL, and by querying Twitter for trending terms.\n            </p>\n            <p>\n              The results for each term will be shown in a results container; these containers will be able to be expanded, collapsed, refreshed, and removed, either individually or all at once.\n            </p>\n            <p>\n              When we’re done, it will look like this:\n            </p>\n            <div class=\"figure\">\n              <p class=\"title\">\n                <b>Figure&nbsp;11.1.&nbsp;Our finished application</b>\n              </p>\n              <div class=\"figure-contents\">\n                <div class=\"screenshot\">\n                  <div class=\"mediaobject\">\n                    <img alt=\"Our finished application\" src=\"http://gyazo.com/70415e9fffab1c47953f5264ecf722fe.png\">\n                  </div>\n                </div>\n              </div>\n            </div><br class=\"figure-break\">\n            <div title=\"The Setup\" class=\"section\">\n              <div class=\"titlepage\">\n                <h4 class=\"title\">\n                  The Setup\n                </h4>\n              </div>\n              <p>\n                We’ll start with some basic HTML:\n              </p>\n              <pre class=\"brush: js\">\n&lt;h1&gt;Twitter Search&lt;/h1&gt;\n&lt;input type=\"button\" id=\"get_trends\"\n    value=\"Load Trending Terms\" /&gt;\n\n&lt;form&gt;\n    &lt;input type=\"text\" class=\"input_text\"\n        id=\"search_term\" /&gt;\n    &lt;input type=\"submit\" class=\"input_submit\"\n        value=\"Add Search Term\" /&gt;\n&lt;/form&gt;\n\n&lt;div id=\"twitter\"&gt;\n    &lt;div class=\"template results\"&gt;\n        &lt;h2&gt;Search Results for\n        &lt;span class=\"search_term\"&gt;&lt;/span&gt;&lt;/h2&gt;\n    &lt;/div&gt;\n&lt;/div&gt;\n</pre>\n              <p>\n                This gives us a container (#twitter) for our widget, a template for our results containers (hidden via CSS), and a simple form where users can input a search term. (For the sake of simplicity, we’re going to assume that our application is JavaScript-only and that our users will always have CSS.)\n              </p>\n              <p>\n                There are two types of objects we’ll want to act on: the results containers, and the Twitter container.\n              </p>\n              <p>\n                The results containers are the heart of the application. We’ll create a plugin that will prepare each results container once it’s added to the Twitter container. Among other things, it will bind the custom events for each container and add the action buttons at the top right of each container. Each results container will have the following custom events:\n              </p>\n              <div class=\"variablelist\">\n                <dl>\n                  <dt>\n                    <span class=\"term\">refresh</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      Mark the container as being in the “refreshing” state, and fire the request to fetch the data for the search term.\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">populate</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      Receive the returned JSON data and use it to populate the container.\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">remove</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      Remove the container from the page after the user verifies the request to do so. Verification can be bypassed by passing true as the second argument to the event handler. The remove event also removes the term associated with the results container from the global object containing the search terms.\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">collapse</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      Add a class of collapsed to the container, which will hide the results via CSS. It will also turn the container’s “Collapse” button into an “Expand” button.\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">expand</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      Remove the collapsed class from the container. It will also turn the container’s “Expand” button into a “Collapse” button.\n                    </p>\n                  </dd>\n                </dl>\n              </div>\n              <p>\n                The plugin is also responsible for adding the action buttons to the container. It binds a click event to each action’s list item, and uses the list item’s class to determine which custom event will be triggered on the corresponding results container.\n              </p>\n              <pre class=\"brush: js\">\n$.fn.twitterResult = function(settings) {\n    return this.each(function() {\n        var $results = $(this),\n            $actions = $.fn.twitterResult.actions =\n                $.fn.twitterResult.actions ||\n                $.fn.twitterResult.createActions(),\n            $a = $actions.clone().prependTo($results),\n            term = settings.term;\n\n        $results.find('span.search_term').text(term);\n\n        $.each(\n            ['refresh', 'populate', 'remove', 'collapse', 'expand'],\n            function(i, ev) {\n                $results.bind(\n                    ev,\n                    { term : term },\n                    $.fn.twitterResult.events[ev]\n                );\n            }\n        );\n\n        // use the class of each action to figure out\n        // which event it will trigger on the results panel\n        $a.find('li').click(function() {\n            // pass the li that was clicked to the function\n            // so it can be manipulated if needed\n            $results.trigger($(this).attr('class'), [ $(this) ]);\n        });\n    });\n};\n\n$.fn.twitterResult.createActions = function() {\n    return $('&lt;ul class=\"actions\" /&gt;').append(\n        '&lt;li class=\"refresh\"&gt;Refresh&lt;/li&gt;' +\n        '&lt;li class=\"remove\"&gt;Remove&lt;/li&gt;' +\n        '&lt;li class=\"collapse\"&gt;Collapse&lt;/li&gt;'\n    );\n};\n\n$.fn.twitterResult.events = {\n    refresh : function(e) {\n           // indicate that the results are refreshing\n        var $this = $(this).addClass('refreshing');\n\n        $this.find('p.tweet').remove();\n        $results.append('&lt;p class=\"loading\"&gt;Loading ...&lt;/p&gt;');\n\n        // get the twitter data using jsonp\n        $.getJSON(\n            'http://search.twitter.com/search.json?q=' +\n                escape(e.data.term) + '&amp;rpp=5&amp;callback=?',\n            function(json) {\n                $this.trigger('populate', [ json ]);\n            }\n        );\n    },\n\n    populate : function(e, json) {\n        var results = json.results;\n        var $this = $(this);\n\n        $this.find('p.loading').remove();\n\n        $.each(results, function(i,result) {\n            var tweet = '&lt;p class=\"tweet\"&gt;' +\n                '&lt;a href=\"http://twitter.com/' +\n                result.from_user +\n                '\"&gt;' +\n                result.from_user +\n                '&lt;/a&gt;: ' +\n                result.text +\n                ' &lt;span class=\"date\"&gt;' +\n                result.created_at +\n                '&lt;/span&gt;' +\n            '&lt;/p&gt;';\n            $this.append(tweet);\n        });\n\n        // indicate that the results\n        // are done refreshing\n        $this.removeClass('refreshing');\n    },\n\n    remove : function(e, force) {\n        if (\n            !force &amp;&amp;\n            !confirm('Remove panel for term ' + e.data.term + '?')\n        ) {\n            return;\n        }\n        $(this).remove();\n\n        // indicate that we no longer\n        // have a panel for the term\n        search_terms[e.data.term] = 0;\n    },\n\n    collapse : function(e) {\n        $(this).find('li.collapse').removeClass('collapse')\n            .addClass('expand').text('Expand');\n\n        $(this).addClass('collapsed');\n    },\n\n    expand : function(e) {\n        $(this).find('li.expand').removeClass('expand')\n            .addClass('collapse').text('Collapse');\n\n        $(this).removeClass('collapsed');\n    }\n};\n</pre>\n              <p>\n                The Twitter container itself will have just two custom events:\n              </p>\n              <div class=\"variablelist\">\n                <dl>\n                  <dt>\n                    <span class=\"term\">getResults</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      Receives a search term and checks to determine whether there’s already a results container for the term; if not, adds a results container using the results template, set up the results container using the <code class=\"code\">$.fn.twitterResult</code> plugin discussed above, and then triggers the <code class=\"code\">refresh</code> event on the results container in order to actually load the results. Finally, it will store the search term so the application knows not to re-fetch the term.\n                    </p>\n                  </dd>\n                  <dt>\n                    <span class=\"term\">getTrends</span>\n                  </dt>\n                  <dd>\n                    <p>\n                      Queries Twitter for the top 10 trending terms, then iterates over them and triggers the <code class=\"code\">getResults</code> event for each of them, thereby adding a results container for each term.\n                    </p>\n                  </dd>\n                </dl>\n              </div>\n              <p>\n                Here's how the Twitter container bindings look:\n              </p>\n              <pre class=\"brush: js\">\n$('#twitter')\n    .bind('getResults', function(e, term) {\n        // make sure we don't have a box for this term already\n        if (!search_terms[term]) {\n            var $this = $(this);\n            var $template = $this.find('div.template');\n\n            // make a copy of the template div\n            // and insert it as the first results box\n            $results = $template.clone().\n                removeClass('template').\n                insertBefore($this.find('div:first')).\n                twitterResult({\n                    'term' : term\n                });\n\n            // load the content using the \"refresh\"\n            // custom event that we bound to the results container\n            $results.trigger('refresh');\n            search_terms[term] = 1;\n        }\n    })\n    .bind('getTrends', function(e) {\n        var $this = $(this);\n        $.getJSON('http://search.twitter.com/trends.json?callback=?', function(json) {\n                var trends = json.trends;\n                $.each(trends, function(i, trend) {\n                    $this.trigger('getResults', [ trend.name ]);\n                });\n            });\n    });\n</pre>\n              <p>\n                So far, we’ve written a lot of code that does approximately nothing, but that’s OK. By specifying all the behaviors that we want our core objects to have, we’ve created a solid framework for rapidly building out the interface.\n              </p>\n              <p>\n                Let’s start by hooking up our text input and the “Load Trending Terms” button. For the text input, we’ll capture the term that was entered in the input and pass it as we trigger the Twitter container’s <code class=\"code\">getResults</code> event. Clicking the “Load Trending Terms” will trigger the Twitter container’s <code class=\"code\">getTrends</code> event:\n              </p>\n              <pre class=\"brush: js\">\n$('form').submit(function(e) {\n    e.preventDefault();\n    var term = $('#search_term').val();\n    $('#twitter').trigger('getResults', [ term ]);\n});\n\n$('#get_trends').click(function() {\n    $('#twitter').trigger('getTrends');\n});\n</pre>\n              <p>\n                By adding a few buttons with the appropriate IDs, we can make it possible to remove, collapse, expand, and refresh all results containers at once, as shown below. For the remove button, note how we’re passing a value of true to the event handler as its second argument, telling the event handler that we don’t want to verify the removal of individual containers.\n              </p>\n              <pre class=\"brush: js\">\n$.each(['refresh', 'expand', 'collapse'], function(i, ev) {\n    $('#' + ev).click(function(e) { $('#twitter div.results').trigger(ev); });\n});\n\n$('#remove').click(function(e) {\n    if (confirm('Remove all results?')) {\n        $('#twitter div.results').trigger('remove', [ true ]);\n    }\n});\n</pre>\n            </div>\n            <div title=\"Conclusion\" class=\"section\">\n              <div class=\"titlepage\">\n                <h4 class=\"title\">\n                  Conclusion\n                </h4>\n              </div>\n              <p>\n                Custom events offer a new way of thinking about your code: they put the emphasis on the target of a behavior, not on the element that triggers it. If you take the time at the outset to spell out the pieces of your application, as well as the behaviors those pieces need to exhibit, custom events can provide a powerful way for you to “talk” to those pieces, either one at a time or en masse. Once the behaviors of a piece have been described, it becomes trivial to trigger those behaviors from anywhere, allowing for rapid creation of and experimentation with interface options. Finally, custom events can enhance code readability and maintainability, by making clear the relationship between an element and its behaviors.\n              </p>\n              <p>\n                You can see the full application at <code class=\"filename\">demos/custom-events.html</code> and <code class=\"filename\">demos/js/custom-events.js</code> in the sample code.\n              </p>\n            </div>\n          </div>\n        </div>\n  </div>\n\n\n\n       </div>\n\n  <script>\n      var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-1464992-55']); _gaq.push(['_trackPageview']);\n\n      (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();\n  </script>\n  <script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.js\"></script>\n  <script src=\"/legacy/assets/shCore.js\"></script>\n  <script src=\"/legacy/assets/shBrushJScript.js\"></script>\n\n  <script>\n  $(function() {\n\n  var toc = $('#toc ul'),\n      loe = $('#loe ul');\n\n  function makeLi(text, href) {\n    return $('<li><a href=\"' + href + '\">' + text + '</a></li>');\n  }\n\n  $('div.chapter').each(function(i) {\n    var chapter = $(this),\n        chapterNumber = i + 1;\n\n    toc.append(\n      makeLi('Chapter ' + chapterNumber + ': ' + chapter.attr('title'), '#chapter-' + chapterNumber)\n    );\n\n    chapter.attr('id', 'chapter-' + chapterNumber);\n\n    chapter.find('div.example').each(function(j) {\n      var example = $(this),\n          title = example.find('p.title'),\n          exampleNumber = chapterNumber + '.' + (j+1),\n          exampleName = title.text();\n\n      loe.append(\n        makeLi('Example ' + exampleNumber + ': ' + exampleName, '#example-' + exampleNumber)\n      );\n\n      example.attr('id', 'example-' + exampleNumber);\n      title.html('Example ' + exampleNumber + ': ' + exampleName);\n    });\n\n    chapter.prepend('<p class=\"toc\"><a title=\"Back to top\" href=\"#toc\">Back to top</a></p>');\n  });\n\n  SyntaxHighlighter.all();\n\n  });\n  </script>\n\n    </body>\n  </html>\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"jqfundamentals.com\",\n  \"private\": true,\n  \"version\": \"0.2.0\",\n  \"description\": \"jqfundamentals.com site\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"grunt mocha\",\n    \"build\": \"grunt requirejs\",\n    \"serve\": \"node server\",\n    \"provision\": \"ansible-playbook -i deploy/ansible/inventory/production deploy/ansible/provision.yml --ask-sudo-pass\",\n    \"deploy\": \"ansible-playbook -i deploy/ansible/inventory/production deploy/ansible/deploy.yml --ask-sudo-pass\"\n  },\n  \"author\": \"Rebecca Murphey\",\n  \"license\": \"Copyright 2012 Bocoup. All rights reserved.\",\n  \"dependencies\": {\n    \"Faker\": \"0.7.2\",\n    \"body-parser\": \"1.19.0\",\n    \"compression\": \"1.7.4\",\n    \"express\": \"4.17.1\",\n    \"js-yaml\": \"3.13.1\",\n    \"marked\": \"0.6.2\",\n    \"morgan\": \"1.9.1\",\n    \"pug\": \"^2.0.4\",\n    \"serve-favicon\": \"2.5.0\",\n    \"underscore\": \"1.9.1\"\n  },\n  \"devDependencies\": {\n    \"grunt\": \"1.0.4\",\n    \"grunt-cli\": \"1.3.2\",\n    \"grunt-contrib-jshint\": \"2.1.0\",\n    \"grunt-contrib-requirejs\": \"1.0.0\",\n    \"grunt-contrib-watch\": \"1.1.0\",\n    \"grunt-mocha\": \"1.2.0\",\n    \"load-grunt-tasks\": \"5.0.0\"\n  }\n}\n"
  },
  {
    "path": "server/index.js",
    "content": "var fs =            require('fs');\nvar yaml =          require('js-yaml');\nvar md =            require('marked');\nvar Faker =         require('Faker');\nvar _ =             require('underscore');\nvar path =          require('path');\nvar { promisify } = require('util');\n\nvar express =       require('express');\nvar app =           express();\n\n// Express middlewares\nvar logger =        require('morgan');\nvar compression =   require('compression');\nvar bodyParser =    require('body-parser');\nvar favicon =       require('serve-favicon');\n\nvar contentDir =    __dirname + '/../content';\n\nvar dataDir =       __dirname + '/../data';\nvar htmlCache =     {};\n\nvar fakeData =      [];\nvar prod =          process.env.NODE_ENV === 'production';\nvar port =          process.env.NODE_ENV_PORT || 4444;\nvar cachebust =     'v' + new Date().getTime();\n\nvar readFile = promisify(fs.readFile);\n\nfor (var i = 0; i < 100; i++) {\n  fakeData.push(Faker.Helpers.userCard());\n}\n\napp.use( logger('dev') );\napp.use( compression() );\napp.use( bodyParser.urlencoded({\n  extended: true\n}) );\napp.use( bodyParser.json() );\n\nif ( !prod ) {\n  app.use( favicon(\n    path.join(__dirname, '..', 'assets/img/favicon.ico'),\n    { maxAge: 8640000000 }\n  ) );\n\n  app.use(\n    '/public/' + cachebust,\n    express.static(\n      path.join(__dirname, '..', 'assets'),\n      { maxAge: 8640000000 }\n    )\n  );\n\n  app.use(\n    '/public',\n    express.static(\n      path.join(__dirname, '..', 'assets')\n    )\n  );\n}\n\napp.use(\n  '/legacy',\n  express.static(\n    path.join(__dirname, '..', 'legacy'),\n    { maxAge: 8640000000 }\n  )\n);\n\napp.set('views', path.join(__dirname, '..', 'templates'));\napp.set('view engine', 'pug');\n\n// allow template inheritance\napp.set('view options', {\n\tlayout: false\n});\n\nfunction render(filename, template, res) {\n  var key = `${filename}-${template}`;\n\n  if (prod && htmlCache[key]) {\n    res.end(htmlCache[key]);\n    return;\n  }\n\n  var rendr = promisify(res.render.bind(res));\n\n  readFile(filename, 'utf8')\n    .catch(err => {\n      err._code = 404;\n      throw err;\n    }).then(async data => {\n      var parts = data.split('---\\n');\n      var config = yaml.load(parts.shift());\n      config.content = md(parts.shift());\n      config.cachebust = cachebust;\n\n      console.log(config);\n\n      var str = await rendr(template, config);\n      htmlCache[key] = str;\n      res.end(str);\n    }).catch(err => {\n      console.error(err);\n      error(res, err._code);\n    });\n}\n\nfunction findResults(query) {\n  if ( !query || !query.trim() ) { return []; }\n\n  var q = query.toLowerCase();\n\n  return _.filter(fakeData, function(item) {\n    var possibles = [ item.name, item.username, item.company.name ];\n    return _.any(possibles, function(p) {\n      return p.toLowerCase().match(q);\n    });\n  });\n}\n\napp.get('/', function(req, res) {\n  var homeMarkdown = [ contentDir, 'index.md' ].join('/');\n  render( homeMarkdown, 'home', res );\n});\n\napp.get(\"/data/search.json\", function(req, res) {\n  res.json({ results : findResults(req.query.q) });\n});\n\napp.get(\"/data/search.jsonp\", function(req, res) {\n  res.jsonp({ results : findResults(req.query.q) });\n});\n\napp.get('/data/search/sample.json', function(req, res) {\n  var sample = [];\n\n  for (var i = 0; i < 10; i++) {\n    sample.push(fakeData[i]);\n  }\n\n  res.json({ results : sample });\n});\n\napp.post(\"/data/save\", function(req, res) {\n  var data = req.body;\n\n  if (data) {\n    data.saved = true;\n  }\n\n  res.json(data || {});\n});\n\napp.get('/data/:filename', function(req, res) {\n  res.sendfile(req.params.filename, {\n    root: dataDir\n  }, function(err) {\n    if (err) {\n      console.log(dataDir);\n      console.log(err);\n      res.json({});\n    }\n  });\n});\n\napp.get('/sandbox/:name', function(req, res) {\n\tvar file = [ contentDir, req.params.name, 'sandbox', 'index.html' ].join('/');\n\n  fs.readFile(file, function(err, data) {\n    if (err) {\n      error(res, 404);\n      return;\n    }\n\n    res.render('iframe', {\n      content: data,\n      cachebust: cachebust\n    });\n  });\n});\n\napp.get('/chapter/:name', function(req, res) {\n\tvar chapterName = req.params.name;\n\tvar chapterMarkdown = [ contentDir, chapterName, 'index.md' ].join('/');\n  render( chapterMarkdown, 'chapter/index', res );\n});\n\napp.get('/500', function(req, res) {\n  error(res, 500);\n});\n\napp.get('/*', function(req, res) {\n  error(res, 404);\n});\n\nfunction error(res, code = 500) {\n  var codes = {\n    '404' : 'Not found',\n    '500' : 'Server error'\n  };\n\n  res.status(code);\n  res.render('error', {\n    code: code,\n    title: codes[code],\n    cachebust: cachebust\n  });\n}\n\napp.listen(port);\n\nconsole.log('jqfundamentals started on http://localhost:' + port);\n"
  },
  {
    "path": "templates/chapter/index.pug",
    "content": "extends ../layout.pug\n\nblock css\n  link(rel=\"stylesheet\", href=\"/public/vendor/CodeMirror-2.25/lib/codemirror.css\")\n\nblock header_buttons\n  include ../nav\n\n  .pull-right\n    button#editor-btn.btn.btn-primary Show Editor\n\nblock fixed_header\n  .container\n    #sandbox.row\n      .span8\n        #editor\n      .span4#results\n\nblock body\n  #main(data-chapter=`${sandbox}`)\n    if title\n      .page-header\n        h1= title\n\n    .row\n      .span4\n        #links.well\n          ul.nav.nav-list\n            li.nav-header Additional Resources\n            for link in links\n              li\n                a(href=link.path)= link.name\n\n      .span8\n        | !{content}\n        ul.pager\n          if previous\n            li.previous\n              a(href=previous.path) &larr;&nbsp;Previous:&nbsp;#{previous.name}\n          if next\n            li.next\n              a(href=next.path) Next:&nbsp;#{next.name}&nbsp;&rarr;\n\nblock scripts\n  script(src=`/public/${cachebust}/vendor/require.js`, data-main=`/public/${cachebust}/main`)\n\n  script\n    | require([ 'js/chapter' ]);\n"
  },
  {
    "path": "templates/error.pug",
    "content": "extends layout.pug\n\nblock body\n\n  #main.row\n    .span12\n      .page-header.home-page-header\n        h1 Sorry, what you&rsquo;re looking for isn&rsquo;t here\n      | <p style=\"margin-bottom: 50px;\">You probably want to head to the <a href=\"/\">home page</a> instead, don't you think?</p>\n"
  },
  {
    "path": "templates/header.pug",
    "content": "head\n  meta(charset=\"UTF-8\")\n\n  if title\n    title jQuery Fundamentals :: #{title}\n  else\n    title jQuery Fundamentals\n\n  block css\n\n  link(rel=\"shortcut icon\", href=\"/favicon.ico\")\n  link(rel=\"stylesheet\", href=\"/public/vendor/bootstrap/css/bootstrap.min.css\")\n  link(rel=\"stylesheet\", href=`/public/${cachebust}/css/base.css`)\n"
  },
  {
    "path": "templates/home/index.pug",
    "content": "extends ../layout.pug\n\nblock body\n  #main.row\n    .span4\n      ul.nav.nav-tabs.nav-stacked\n        for item in menu\n          li\n            a(href=item.path)= item.name\n\n    .span8\n      .page-header.home-page-header\n        h1= title\n      | !{content}\n"
  },
  {
    "path": "templates/iframe.pug",
    "content": "<!DOCTYPE html>\nhtml\n  head\n    link(rel=\"stylesheet\", href=\"/public/vendor/bootstrap/css/bootstrap.min.css\")\n    style.\n      body { margin : 0; padding: 0; font-family: Helvetica, Arial, sans-serif; }\n      .selected { color : red; }\n      .hidden { display : none; visibility: visible; }\n      body > .container { margin-left: 0; }\n  body\n    | !{content}\n\n  script(src=\"/public/vendor/jquery.js\")\n  script(src=`/public/${cachebust}/js/sandbox.js`)\n"
  },
  {
    "path": "templates/layout.pug",
    "content": "<!DOCTYPE html>\nhtml\n  include header.pug\n  body\n    a(href=\"https://github.com/bocoup/jqfundamentals.com\")\n      img.github-ribbon(src=\"https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67\", alt=\"Fork me on GitHub\", data-canonical-src=\"https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png\")\n\n    .navbar.navbar-fixed-top\n      .navbar-inner\n        .container\n          a.brand(href=\"/\") jQuery Fundamentals\n\n          block header_buttons\n\n      block fixed_header\n\n    .container\n      block body\n\n      footer\n        p\n          | <a href=\"/legacy\">View the original book</a> &bullet; <a href=\"mailto:jqf@bocoup.com\">Send feedback</a> &bullet; Copyright &copy; 2013&ndash;2019 <a href=\"https://bocoup.com\">Bocoup</a>\n          | <br><span xmlns:dct=\"http://purl.org/dc/terms/\" href=\"http://purl.org/dc/dcmitype/InteractiveResource\" property=\"dct:title\" rel=\"dct:type\">jqueryfundamentals.com</span> by <a xmlns:cc=\"http://creativecommons.org/ns#\" href=\"http://bocoup.com/\" property=\"cc:attributionName\" rel=\"cc:attributionURL\">Bocoup, LLC</a> is licensed under a <a rel=\"license\" href=\"http://creativecommons.org/licenses/by/4.0/\">Creative Commons Attribution 4.0 International License</a>.\n\n    block scripts\n    script.\n      var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-1464992-55']); _gaq.push(['_trackPageview']);\n\n      (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();\n"
  },
  {
    "path": "templates/nav.pug",
    "content": "ul.nav\n  li\n    a(href=\"/\") Home\n  li.dropdown\n    a.dropdown-toggle(data-toggle=\"dropdown\", href=\"#\") Contents &raquo;\n    ul.dropdown-menu\n      li\n        a(href=\"/chapter/javascript-basics\") JavaScript Basics\n      li\n        a(href=\"/chapter/jquery-basics\") jQuery Basics\n      li\n        a(href=\"/chapter/traversing-manipulating\") Traversing &amp; Manipulating\n      li\n        a(href=\"/chapter/events\") Events &amp; Event Delegation\n      li\n        a(href=\"/chapter/effects\") Effects\n      li\n        a(href=\"/chapter/ajax-deferreds\") AJAX &amp; Deferreds\n  li\n    a(href=\"mailto:jqf@bocoup.com\") Feedback"
  },
  {
    "path": "test/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <meta charset=\"utf-8\">\n    <link rel=\"stylesheet\" href=\"vendor/mocha.css\">\n\n    <script src=\"vendor/chai.js\"></script>\n    <script>\n    window.assert = chai.assert;\n    </script>\n\n    <script src=\"vendor/mocha.js\"></script>\n\n    <script>\n    mocha.setup('tdd');\n    </script>\n\n    <script src=\"../assets/vendor/require.js\"></script>\n    <script>\n    require.config({\n      baseUrl : '../assets',\n      deps : [ 'test/runner' ],\n      shim : {\n        'vendor/codemirror' : {\n          deps : [ 'vendor/CodeMirror-2.25/lib/codemirror'],\n          exports : 'CodeMirror'\n        }\n      },\n      paths : {\n        test : '../test',\n        jquery : 'vendor/jquery',\n        widgets : 'js/widgets'\n      }\n    });\n    </script>\n  </head>\n\n  <body>\n    <div id=\"mocha\"></div>\n    <div id=\"test\"></div>\n  </body>\n</html>\n"
  },
  {
    "path": "test/runner.js",
    "content": "require([\n  'test/widgets/editor'\n], function() {\n\n  mocha.run();\n});"
  },
  {
    "path": "test/vendor/chai.js",
    "content": "!function (name, context, definition) {\n  if (typeof require === 'function' && typeof exports === 'object' && typeof module === 'object') {\n    module.exports = definition();\n  } else if (typeof define === 'function' && typeof define.amd  === 'object') {\n    define(function () {\n      return definition();\n    });\n  } else {\n    context[name] = definition();\n  }\n}('chai', this, function () {\n\n  function require(p) {\n    var path = require.resolve(p)\n      , mod = require.modules[path];\n    if (!mod) throw new Error('failed to require \"' + p + '\"');\n    if (!mod.exports) {\n      mod.exports = {};\n      mod.call(mod.exports, mod, mod.exports, require.relative(path));\n    }\n    return mod.exports;\n  }\n\n  require.modules = {};\n\n  require.resolve = function (path) {\n    var orig = path\n      , reg = path + '.js'\n      , index = path + '/index.js';\n    return require.modules[reg] && reg\n      || require.modules[index] && index\n      || orig;\n  };\n\n  require.register = function (path, fn) {\n    require.modules[path] = fn;\n  };\n\n  require.relative = function (parent) {\n    return function(p){\n      if ('.' != p[0]) return require(p);\n\n      var path = parent.split('/')\n        , segs = p.split('/');\n      path.pop();\n\n      for (var i = 0; i < segs.length; i++) {\n        var seg = segs[i];\n        if ('..' == seg) path.pop();\n        else if ('.' != seg) path.push(seg);\n      }\n\n      return require(path.join('/'));\n    };\n  };\n\n  require.alias = function (from, to) {\n    var fn = require.modules[from];\n    require.modules[to] = fn;\n  };\n\n\n  require.register(\"chai.js\", function(module, exports, require){\n    /*!\n     * chai\n     * Copyright(c) 2011-2012 Jake Luer <jake@alogicalparadox.com>\n     * MIT Licensed\n     */\n\n    var used = []\n      , exports = module.exports = {};\n\n    /*!\n     * Chai version\n     */\n\n    exports.version = '1.2.0';\n\n    /*!\n     * Primary `Assertion` prototype\n     */\n\n    exports.Assertion = require('./chai/assertion');\n\n    /*!\n     * Assertion Error\n     */\n\n    exports.AssertionError = require('./chai/browser/error');\n\n    /*!\n     * Utils for plugins (not exported)\n     */\n\n    var util = require('./chai/utils');\n\n    /**\n     * # .use(function)\n     *\n     * Provides a way to extend the internals of Chai\n     *\n     * @param {Function}\n     * @returns {this} for chaining\n     * @api public\n     */\n\n    exports.use = function (fn) {\n      if (!~used.indexOf(fn)) {\n        fn(this, util);\n        used.push(fn);\n      }\n\n      return this;\n    };\n\n    /*!\n     * Core Assertions\n     */\n\n    var core = require('./chai/core/assertions');\n    exports.use(core);\n\n    /*!\n     * Expect interface\n     */\n\n    var expect = require('./chai/interface/expect');\n    exports.use(expect);\n\n    /*!\n     * Should interface\n     */\n\n    var should = require('./chai/interface/should');\n    exports.use(should);\n\n    /*!\n     * Assert interface\n     */\n\n    var assert = require('./chai/interface/assert');\n    exports.use(assert);\n\n  }); // module: chai.js\n\n  require.register(\"chai/assertion.js\", function(module, exports, require){\n    /*!\n     * chai\n     * http://chaijs.com\n     * Copyright(c) 2011-2012 Jake Luer <jake@alogicalparadox.com>\n     * MIT Licensed\n     */\n\n    /*!\n     * Module dependencies.\n     */\n\n    var AssertionError = require('./browser/error')\n      , util = require('./utils')\n      , flag = util.flag;\n\n    /*!\n     * Module export.\n     */\n\n    module.exports = Assertion;\n\n\n    /*!\n     * Assertion Constructor\n     *\n     * Creates object for chaining.\n     *\n     * @api private\n     */\n\n    function Assertion (obj, msg, stack) {\n      flag(this, 'ssfi', stack || arguments.callee);\n      flag(this, 'object', obj);\n      flag(this, 'message', msg);\n    }\n\n    /*!\n      * ### Assertion.includeStack\n      *\n      * User configurable property, influences whether stack trace\n      * is included in Assertion error message. Default of false\n      * suppresses stack trace in the error message\n      *\n      *     Assertion.includeStack = true;  // enable stack on error\n      *\n      * @api public\n      */\n\n    Assertion.includeStack = false;\n\n    Assertion.addProperty = function (name, fn) {\n      util.addProperty(this.prototype, name, fn);\n    };\n\n    Assertion.addMethod = function (name, fn) {\n      util.addMethod(this.prototype, name, fn);\n    };\n\n    Assertion.addChainableMethod = function (name, fn, chainingBehavior) {\n      util.addChainableMethod(this.prototype, name, fn, chainingBehavior);\n    };\n\n    Assertion.overwriteProperty = function (name, fn) {\n      util.overwriteProperty(this.prototype, name, fn);\n    };\n\n    Assertion.overwriteMethod = function (name, fn) {\n      util.overwriteMethod(this.prototype, name, fn);\n    };\n\n    /*!\n     * ### .assert(expression, message, negateMessage, expected, actual)\n     *\n     * Executes an expression and check expectations. Throws AssertionError for reporting if test doesn't pass.\n     *\n     * @name assert\n     * @param {Philosophical} expression to be tested\n     * @param {String} message to display if fails\n     * @param {String} negatedMessage to display if negated expression fails\n     * @param {Mixed} expected value (remember to check for negation)\n     * @param {Mixed} actual (optional) will default to `this.obj`\n     * @api private\n     */\n\n    Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual) {\n      var ok = util.test(this, arguments);\n\n      if (!ok) {\n        var msg = util.getMessage(this, arguments)\n          , actual = util.getActual(this, arguments);\n        throw new AssertionError({\n            message: msg\n          , actual: actual\n          , expected: expected\n          , stackStartFunction: (Assertion.includeStack) ? this.assert : flag(this, 'ssfi')\n        });\n      }\n    };\n\n    /*!\n     * ### ._obj\n     *\n     * Quick reference to stored `actual` value for plugin developers.\n     *\n     * @api private\n     */\n\n    Object.defineProperty(Assertion.prototype, '_obj',\n      { get: function () {\n          return flag(this, 'object');\n        }\n      , set: function (val) {\n          flag(this, 'object', val);\n        }\n    });\n\n  }); // module: chai/assertion.js\n\n  require.register(\"chai/browser/error.js\", function(module, exports, require){\n    /*!\n     * chai\n     * Copyright(c) 2011-2012 Jake Luer <jake@alogicalparadox.com>\n     * MIT Licensed\n     */\n\n    module.exports = AssertionError;\n\n    function AssertionError (options) {\n      options = options || {};\n      this.message = options.message;\n      this.actual = options.actual;\n      this.expected = options.expected;\n      this.operator = options.operator;\n\n      if (options.stackStartFunction && Error.captureStackTrace) {\n        var stackStartFunction = options.stackStartFunction;\n        Error.captureStackTrace(this, stackStartFunction);\n      }\n    }\n\n    AssertionError.prototype = Object.create(Error.prototype);\n    AssertionError.prototype.name = 'AssertionError';\n    AssertionError.prototype.constructor = AssertionError;\n\n    AssertionError.prototype.toString = function() {\n      return this.message;\n    };\n\n  }); // module: chai/browser/error.js\n\n  require.register(\"chai/core/assertions.js\", function(module, exports, require){\n    /*!\n     * chai\n     * http://chaijs.com\n     * Copyright(c) 2011-2012 Jake Luer <jake@alogicalparadox.com>\n     * MIT Licensed\n     */\n\n    module.exports = function (chai, _) {\n      var Assertion = chai.Assertion\n        , toString = Object.prototype.toString\n        , flag = _.flag;\n\n      /**\n       * ### Language Chains\n       *\n       * The following are provide as chainable getters to\n       * improve the readability of your assertions. They\n       * do not provide an testing capability unless they\n       * have been overwritten by a plugin.\n       *\n       * **Chains**\n       *\n       * - to\n       * - be\n       * - been\n       * - is\n       * - that\n       * - and\n       * - have\n       * - with\n       *\n       * @name language chains\n       * @api public\n       */\n\n      [ 'to', 'be', 'been'\n      , 'is', 'and', 'have'\n      , 'with', 'that' ].forEach(function (chain) {\n        Assertion.addProperty(chain, function () {\n          return this;\n        });\n      });\n\n      /**\n       * ### .not\n       *\n       * Negates any of assertions following in the chain.\n       *\n       *     expect(foo).to.not.equal('bar');\n       *     expect(goodFn).to.not.throw(Error);\n       *     expect({ foo: 'baz' }).to.have.property('foo')\n       *       .and.not.equal('bar');\n       *\n       * @name not\n       * @api public\n       */\n\n      Assertion.addProperty('not', function () {\n        flag(this, 'negate', true);\n      });\n\n      /**\n       * ### .deep\n       *\n       * Sets the `deep` flag, later used by the `equal` and\n       * `property` assertions.\n       *\n       *     expect(foo).to.deep.equal({ bar: 'baz' });\n       *     expect({ foo: { bar: { baz: 'quux' } } })\n       *       .to.have.deep.property('foo.bar.baz', 'quux');\n       *\n       * @name deep\n       * @api public\n       */\n\n      Assertion.addProperty('deep', function () {\n        flag(this, 'deep', true);\n      });\n\n      /**\n       * ### .a(type)\n       *\n       * The `a` and `an` assertions are aliases that can be\n       * used either as language chains or to assert a value's\n       * type (as revealed by `Object.prototype.toString`).\n       *\n       *     // typeof\n       *     expect('test').to.be.a('string');\n       *     expect({ foo: 'bar' }).to.be.an('object');\n       *     expect(null).to.be.a('null');\n       *     expect(undefined).to.be.an('undefined');\n       *\n       *     // language chain\n       *     expect(foo).to.be.an.instanceof(Foo);\n       *\n       * @name a\n       * @alias an\n       * @param {String} type\n       * @api public\n       */\n\n      function an(type) {\n        var obj = flag(this, 'object')\n          , klassStart = type.charAt(0).toUpperCase()\n          , klass = klassStart + type.slice(1)\n          , article = ~[ 'A', 'E', 'I', 'O', 'U' ].indexOf(klassStart) ? 'an ' : 'a ';\n\n        this.assert(\n            '[object ' + klass + ']' === toString.call(obj)\n          , 'expected #{this} to be ' + article + type\n          , 'expected #{this} not to be ' + article + type\n        );\n      }\n\n      Assertion.addChainableMethod('an', an);\n      Assertion.addChainableMethod('a', an);\n\n      /**\n       * ### .include(value)\n       *\n       * The `include` and `contain` assertions can be used as either property\n       * based language chains or as methods to assert the inclusion of an object\n       * in an array or a substring in a string. When used as language chains,\n       * they toggle the `contain` flag for the `keys` assertion.\n       *\n       *     expect([1,2,3]).to.include(2);\n       *     expect('foobar').to.contain('foo');\n       *     expect({ foo: 'bar', hello: 'universe' }).to.include.keys('foo');\n       *\n       * @name include\n       * @alias contain\n       * @param {Object|String|Number} obj\n       * @api public\n       */\n\n      function includeChainingBehavior () {\n        flag(this, 'contains', true);\n      }\n\n      function include (val) {\n        var obj = flag(this, 'object')\n        this.assert(\n            ~obj.indexOf(val)\n          , 'expected #{this} to include ' + _.inspect(val)\n          , 'expected #{this} to not include ' + _.inspect(val));\n      }\n\n      Assertion.addChainableMethod('include', include, includeChainingBehavior);\n      Assertion.addChainableMethod('contain', include, includeChainingBehavior);\n\n      /**\n       * ### .ok\n       *\n       * Asserts that the target is truthy.\n       *\n       *     expect('everthing').to.be.ok;\n       *     expect(1).to.be.ok;\n       *     expect(false).to.not.be.ok;\n       *     expect(undefined).to.not.be.ok;\n       *     expect(null).to.not.be.ok;\n       *\n       * @name ok\n       * @api public\n       */\n\n      Assertion.addProperty('ok', function () {\n        this.assert(\n            flag(this, 'object')\n          , 'expected #{this} to be truthy'\n          , 'expected #{this} to be falsy');\n      });\n\n      /**\n       * ### .true\n       *\n       * Asserts that the target is `true`.\n       *\n       *     expect(true).to.be.true;\n       *     expect(1).to.not.be.true;\n       *\n       * @name true\n       * @api public\n       */\n\n      Assertion.addProperty('true', function () {\n        this.assert(\n            true === flag(this, 'object')\n          , 'expected #{this} to be true'\n          , 'expected #{this} to be false'\n          , this.negate ? false : true\n        );\n      });\n\n      /**\n       * ### .false\n       *\n       * Asserts that the target is `false`.\n       *\n       *     expect(false).to.be.false;\n       *     expect(0).to.not.be.false;\n       *\n       * @name false\n       * @api public\n       */\n\n      Assertion.addProperty('false', function () {\n        this.assert(\n            false === flag(this, 'object')\n          , 'expected #{this} to be false'\n          , 'expected #{this} to be true'\n          , this.negate ? true : false\n        );\n      });\n\n      /**\n       * ### .null\n       *\n       * Asserts that the target is `null`.\n       *\n       *     expect(null).to.be.null;\n       *     expect(undefined).not.to.be.null;\n       *\n       * @name null\n       * @api public\n       */\n\n      Assertion.addProperty('null', function () {\n        this.assert(\n            null === flag(this, 'object')\n          , 'expected #{this} to be null'\n          , 'expected #{this} not to be null'\n        );\n      });\n\n      /**\n       * ### .undefined\n       *\n       * Asserts that the target is `undefined`.\n       *\n       *      expect(undefined).to.be.undefined;\n       *      expect(null).to.not.be.undefined;\n       *\n       * @name undefined\n       * @api public\n       */\n\n      Assertion.addProperty('undefined', function () {\n        this.assert(\n            undefined === flag(this, 'object')\n          , 'expected #{this} to be undefined'\n          , 'expected #{this} not to be undefined'\n        );\n      });\n\n      /**\n       * ### .exist\n       *\n       * Asserts that the target is neither `null` nor `undefined`.\n       *\n       *     var foo = 'hi'\n       *       , bar = null\n       *       , baz;\n       *\n       *     expect(foo).to.exist;\n       *     expect(bar).to.not.exist;\n       *     expect(baz).to.not.exist;\n       *\n       * @name exist\n       * @api public\n       */\n\n      Assertion.addProperty('exist', function () {\n        this.assert(\n            null != flag(this, 'object')\n          , 'expected #{this} to exist'\n          , 'expected #{this} to not exist'\n        );\n      });\n\n\n      /**\n       * ### .empty\n       *\n       * Asserts that the target's length is `0`. For arrays, it checks\n       * the `length` property. For objects, it gets the count of\n       * enumerable keys.\n       *\n       *     expect([]).to.be.empty;\n       *     expect('').to.be.empty;\n       *     expect({}).to.be.empty;\n       *\n       * @name empty\n       * @api public\n       */\n\n      Assertion.addProperty('empty', function () {\n        var obj = flag(this, 'object')\n          , expected = obj;\n\n        if (Array.isArray(obj) || 'string' === typeof object) {\n          expected = obj.length;\n        } else if (typeof obj === 'object') {\n          expected = Object.keys(obj).length;\n        }\n\n        this.assert(\n            !expected\n          , 'expected #{this} to be empty'\n          , 'expected #{this} not to be empty'\n        );\n      });\n\n      /**\n       * ### .arguments\n       *\n       * Asserts that the target is an arguments object.\n       *\n       *     function test () {\n       *       expect(arguments).to.be.arguments;\n       *     }\n       *\n       * @name arguments\n       * @alias Arguments\n       * @api public\n       */\n\n      function checkArguments () {\n        var obj = flag(this, 'object')\n          , type = Object.prototype.toString.call(obj);\n        this.assert(\n            '[object Arguments]' === type\n          , 'expected #{this} to be arguments but got ' + type\n          , 'expected #{this} to not be arguments'\n        );\n      }\n\n      Assertion.addProperty('arguments', checkArguments);\n      Assertion.addProperty('Arguments', checkArguments);\n\n      /**\n       * ### .equal(value)\n       *\n       * Asserts that the target is strictly equal (`===`) to `value`.\n       * Alternately, if the `deep` flag is set, asserts that\n       * the target is deeply equal to `value`.\n       *\n       *     expect('hello').to.equal('hello');\n       *     expect(42).to.equal(42);\n       *     expect(1).to.not.equal(true);\n       *     expect({ foo: 'bar' }).to.not.equal({ foo: 'bar' });\n       *     expect({ foo: 'bar' }).to.deep.equal({ foo: 'bar' });\n       *\n       * @name equal\n       * @alias equals\n       * @alias eq\n       * @alias deep.equal\n       * @param {Mixed} value\n       * @api public\n       */\n\n      function assertEqual (val) {\n        var obj = flag(this, 'object');\n        if (flag(this, 'deep')) {\n          return this.eql(val);\n        } else {\n          this.assert(\n              val === obj\n            , 'expected #{this} to equal #{exp}'\n            , 'expected #{this} to not equal #{exp}'\n            , val\n          );\n        }\n      }\n\n      Assertion.addMethod('equal', assertEqual);\n      Assertion.addMethod('equals', assertEqual);\n      Assertion.addMethod('eq', assertEqual);\n\n      /**\n       * ### .eql(value)\n       *\n       * Asserts that the target is deeply equal to `value`.\n       *\n       *     expect({ foo: 'bar' }).to.eql({ foo: 'bar' });\n       *     expect([ 1, 2, 3 ]).to.eql([ 1, 2, 3 ]);\n       *\n       * @name eql\n       * @param {Mixed} value\n       * @api public\n       */\n\n      Assertion.addMethod('eql', function (obj) {\n        this.assert(\n            _.eql(obj, flag(this, 'object'))\n          , 'expected #{this} to deeply equal #{exp}'\n          , 'expected #{this} to not deeply equal #{exp}'\n          , obj\n        );\n      });\n\n      /**\n       * ### .above(value)\n       *\n       * Asserts that the target is greater than `value`.\n       *\n       *     expect(10).to.be.above(5);\n       *\n       * Can also be used in conjunction with `length` to\n       * assert a minimum length. The benefit being a\n       * more informative error message than if the length\n       * was supplied directly.\n       *\n       *     expect('foo').to.have.length.above(2);\n       *     expect([ 1, 2, 3 ]).to.have.length.above(2);\n       *\n       * @name above\n       * @alias gt\n       * @alias greaterThan\n       * @param {Number} value\n       * @api public\n       */\n\n      function assertAbove (n) {\n        var obj = flag(this, 'object');\n        if (flag(this, 'doLength')) {\n          new Assertion(obj).to.have.property('length');\n          var len = obj.length;\n          this.assert(\n              len > n\n            , 'expected #{this} to have a length above #{exp} but got #{act}'\n            , 'expected #{this} to not have a length above #{exp}'\n            , n\n            , len\n          );\n        } else {\n          this.assert(\n              obj > n\n            , 'expected #{this} to be above ' + n\n            , 'expected #{this} to be below ' + n\n          );\n        }\n      }\n\n      Assertion.addMethod('above', assertAbove);\n      Assertion.addMethod('gt', assertAbove);\n      Assertion.addMethod('greaterThan', assertAbove);\n\n      /**\n       * ### .below(value)\n       *\n       * Asserts that the target is less than `value`.\n       *\n       *     expect(5).to.be.below(10);\n       *\n       * Can also be used in conjunction with `length` to\n       * assert a maximum length. The benefit being a\n       * more informative error message than if the length\n       * was supplied directly.\n       *\n       *     expect('foo').to.have.length.below(4);\n       *     expect([ 1, 2, 3 ]).to.have.length.below(4);\n       *\n       * @name below\n       * @alias lt\n       * @alias lessThan\n       * @param {Number} value\n       * @api public\n       */\n\n      function assertBelow (n) {\n        var obj = flag(this, 'object');\n        if (flag(this, 'doLength')) {\n          new Assertion(obj).to.have.property('length');\n          var len = obj.length;\n          this.assert(\n              len < n\n            , 'expected #{this} to have a length below #{exp} but got #{act}'\n            , 'expected #{this} to not have a length below #{exp}'\n            , n\n            , len\n          );\n        } else {\n          this.assert(\n              obj < n\n            , 'expected #{this} to be below ' + n\n            , 'expected #{this} to be above ' + n\n          );\n        }\n      }\n\n      Assertion.addMethod('below', assertBelow);\n      Assertion.addMethod('lt', assertBelow);\n      Assertion.addMethod('lessThan', assertBelow);\n\n      /**\n       * ### .within(start, finish)\n       *\n       * Asserts that the target is within a range.\n       *\n       *     expect(7).to.be.within(5,10);\n       *\n       * Can also be used in conjunction with `length` to\n       * assert a length range. The benefit being a\n       * more informative error message than if the length\n       * was supplied directly.\n       *\n       *     expect('foo').to.have.length.within(2,4);\n       *     expect([ 1, 2, 3 ]).to.have.length.within(2,4);\n       *\n       * @name within\n       * @param {Number} start lowerbound inclusive\n       * @param {Number} finish upperbound inclusive\n       * @api public\n       */\n\n      Assertion.addMethod('within', function (start, finish) {\n        var obj = flag(this, 'object')\n          , range = start + '..' + finish;\n        if (flag(this, 'doLength')) {\n          new Assertion(obj).to.have.property('length');\n          var len = obj.length;\n          this.assert(\n              len >= start && len <= finish\n            , 'expected #{this} to have a length within ' + range\n            , 'expected #{this} to not have a length within ' + range\n          );\n        } else {\n          this.assert(\n              obj >= start && obj <= finish\n            , 'expected #{this} to be within ' + range\n            , 'expected #{this} to not be within ' + range\n          );\n        }\n      });\n\n      /**\n       * ### .instanceof(constructor)\n       *\n       * Asserts that the target is an instance of `constructor`.\n       *\n       *     var Tea = function (name) { this.name = name; }\n       *       , Chai = new Tea('chai');\n       *\n       *     expect(Chai).to.be.an.instanceof(Tea);\n       *     expect([ 1, 2, 3 ]).to.be.instanceof(Array);\n       *\n       * @name instanceof\n       * @param {Constructor} constructor\n       * @alias instanceOf\n       * @api public\n       */\n\n      function assertInstanceOf (constructor) {\n        var name = _.getName(constructor);\n        this.assert(\n            flag(this, 'object') instanceof constructor\n          , 'expected #{this} to be an instance of ' + name\n          , 'expected #{this} to not be an instance of ' + name\n        );\n      };\n\n      Assertion.addMethod('instanceof', assertInstanceOf);\n      Assertion.addMethod('instanceOf', assertInstanceOf);\n\n      /**\n       * ### .property(name, [value])\n       *\n       * Asserts that the target has a property `name`, optionally asserting that\n       * the value of that property is strictly equal to  `value`.\n       * If the `deep` flag is set, you can use dot- and bracket-notation for deep\n       * references into objects and arrays.\n       *\n       *     // simple referencing\n       *     var obj = { foo: 'bar' };\n       *     expect(obj).to.have.property('foo');\n       *     expect(obj).to.have.property('foo', 'bar');\n       *\n       *     // deep referencing\n       *     var deepObj = {\n       *         green: { tea: 'matcha' }\n       *       , teas: [ 'chai', 'matcha', { tea: 'konacha' } ]\n       *     };\n\n       *     expect(deepObj).to.have.deep.property('green.tea', 'matcha');\n       *     expect(deepObj).to.have.deep.property('teas[1]', 'matcha');\n       *     expect(deepObj).to.have.deep.property('teas[2].tea', 'konacha');\n       *\n       * You can also use an array as the starting point of a `deep.property`\n       * assertion, or traverse nested arrays.\n       *\n       *     var arr = [\n       *         [ 'chai', 'matcha', 'konacha' ]\n       *       , [ { tea: 'chai' }\n       *         , { tea: 'matcha' }\n       *         , { tea: 'konacha' } ]\n       *     ];\n       *\n       *     expect(arr).to.have.deep.property('[0][1]', 'matcha');\n       *     expect(arr).to.have.deep.property('[1][2].tea', 'konacha');\n       *\n       * Furthermore, `property` changes the subject of the assertion\n       * to be the value of that property from the original object. This\n       * permits for further chainable assertions on that property.\n       *\n       *     expect(obj).to.have.property('foo')\n       *       .that.is.a('string');\n       *     expect(deepObj).to.have.property('green')\n       *       .that.is.an('object')\n       *       .that.deep.equals({ tea: 'matcha' });\n       *     expect(deepObj).to.have.property('teas')\n       *       .that.is.an('array')\n       *       .with.deep.property('[2]')\n       *         .that.deep.equals({ tea: 'konacha' });\n       *\n       * @name property\n       * @alias deep.property\n       * @param {String} name\n       * @param {Mixed} value (optional)\n       * @returns value of property for chaining\n       * @api public\n       */\n\n      Assertion.addMethod('property', function (name, val) {\n        var descriptor = flag(this, 'deep') ? 'deep property ' : 'property '\n          , negate = flag(this, 'negate')\n          , obj = flag(this, 'object')\n          , value = flag(this, 'deep')\n            ? _.getPathValue(name, obj)\n            : obj[name];\n\n        if (negate && undefined !== val) {\n          if (undefined === value) {\n            throw new Error(_.inspect(obj) + ' has no ' + descriptor + _.inspect(name));\n          }\n        } else {\n          this.assert(\n              undefined !== value\n            , 'expected #{this} to have a ' + descriptor + _.inspect(name)\n            , 'expected #{this} to not have ' + descriptor + _.inspect(name));\n        }\n\n        if (undefined !== val) {\n          this.assert(\n              val === value\n            , 'expected #{this} to have a ' + descriptor + _.inspect(name) + ' of #{exp}, but got #{act}'\n            , 'expected #{this} to not have a ' + descriptor + _.inspect(name) + ' of #{act}'\n            , val\n            , value\n          );\n        }\n\n        flag(this, 'object', value);\n      });\n\n\n      /**\n       * ### .ownProperty(name)\n       *\n       * Asserts that the target has an own property `name`.\n       *\n       *     expect('test').to.have.ownProperty('length');\n       *\n       * @name ownProperty\n       * @alias haveOwnProperty\n       * @param {String} name\n       * @api public\n       */\n\n      function assertOwnProperty (name) {\n        var obj = flag(this, 'object');\n        this.assert(\n            obj.hasOwnProperty(name)\n          , 'expected #{this} to have own property ' + _.inspect(name)\n          , 'expected #{this} to not have own property ' + _.inspect(name)\n        );\n      }\n\n      Assertion.addMethod('ownProperty', assertOwnProperty);\n      Assertion.addMethod('haveOwnProperty', assertOwnProperty);\n\n      /**\n       * ### .length(value)\n       *\n       * Asserts that the target's `length` property has\n       * the expected value.\n       *\n       *     expect([ 1, 2, 3]).to.have.length(3);\n       *     expect('foobar').to.have.length(6);\n       *\n       * Can also be used as a chain precursor to a value\n       * comparison for the length property.\n       *\n       *     expect('foo').to.have.length.above(2);\n       *     expect([ 1, 2, 3 ]).to.have.length.above(2);\n       *     expect('foo').to.have.length.below(4);\n       *     expect([ 1, 2, 3 ]).to.have.length.below(4);\n       *     expect('foo').to.have.length.within(2,4);\n       *     expect([ 1, 2, 3 ]).to.have.length.within(2,4);\n       *\n       * @name length\n       * @alias lengthOf\n       * @param {Number} length\n       * @api public\n       */\n\n      function assertLengthChain () {\n        flag(this, 'doLength', true);\n      }\n\n      function assertLength (n) {\n        var obj = flag(this, 'object');\n        new Assertion(obj).to.have.property('length');\n        var len = obj.length;\n\n        this.assert(\n            len == n\n          , 'expected #{this} to have a length of #{exp} but got #{act}'\n          , 'expected #{this} to not have a length of #{act}'\n          , n\n          , len\n        );\n      }\n\n      Assertion.addChainableMethod('length', assertLength, assertLengthChain);\n      Assertion.addMethod('lengthOf', assertLength, assertLengthChain);\n\n      /**\n       * ### .match(regexp)\n       *\n       * Asserts that the target matches a regular expression.\n       *\n       *     expect('foobar').to.match(/^foo/);\n       *\n       * @name match\n       * @param {RegExp} RegularExpression\n       * @api public\n       */\n\n      Assertion.addMethod('match', function (re) {\n        var obj = flag(this, 'object');\n        this.assert(\n            re.exec(obj)\n          , 'expected #{this} to match ' + re\n          , 'expected #{this} not to match ' + re\n        );\n      });\n\n      /**\n       * ### .string(string)\n       *\n       * Asserts that the string target contains another string.\n       *\n       *     expect('foobar').to.have.string('bar');\n       *\n       * @name string\n       * @param {String} string\n       * @api public\n       */\n\n      Assertion.addMethod('string', function (str) {\n        var obj = flag(this, 'object');\n        new Assertion(obj).is.a('string');\n\n        this.assert(\n            ~obj.indexOf(str)\n          , 'expected #{this} to contain ' + _.inspect(str)\n          , 'expected #{this} to not contain ' + _.inspect(str)\n        );\n      });\n\n\n      /**\n       * ### .keys(key1, [key2], [...])\n       *\n       * Asserts that the target has exactly the given keys, or\n       * asserts the inclusion of some keys when using the\n       * `include` or `contain` modifiers.\n       *\n       *     expect({ foo: 1, bar: 2 }).to.have.keys(['foo', 'bar']);\n       *     expect({ foo: 1, bar: 2, baz: 3 }).to.contain.keys('foo', 'bar');\n       *\n       * @name keys\n       * @alias key\n       * @param {String...|Array} keys\n       * @api public\n       */\n\n      function assertKeys (keys) {\n        var obj = flag(this, 'object')\n          , str\n          , ok = true;\n\n        keys = keys instanceof Array\n          ? keys\n          : Array.prototype.slice.call(arguments);\n\n        if (!keys.length) throw new Error('keys required');\n\n        var actual = Object.keys(obj)\n          , len = keys.length;\n\n        // Inclusion\n        ok = keys.every(function(key){\n          return ~actual.indexOf(key);\n        });\n\n        // Strict\n        if (!flag(this, 'negate') && !flag(this, 'contains')) {\n          ok = ok && keys.length == actual.length;\n        }\n\n        // Key string\n        if (len > 1) {\n          keys = keys.map(function(key){\n            return _.inspect(key);\n          });\n          var last = keys.pop();\n          str = keys.join(', ') + ', and ' + last;\n        } else {\n          str = _.inspect(keys[0]);\n        }\n\n        // Form\n        str = (len > 1 ? 'keys ' : 'key ') + str;\n\n        // Have / include\n        str = (flag(this, 'contains') ? 'contain ' : 'have ') + str;\n\n        // Assertion\n        this.assert(\n            ok\n          , 'expected #{this} to ' + str\n          , 'expected #{this} to not ' + str\n        );\n      }\n\n      Assertion.addMethod('keys', assertKeys);\n      Assertion.addMethod('key', assertKeys);\n\n      /**\n       * ### .throw(constructor)\n       *\n       * Asserts that the function target will throw a specific error, or specific type of error\n       * (as determined using `instanceof`), optionally with a RegExp or string inclusion test\n       * for the error's message.\n       *\n       *     var err = new ReferenceError('This is a bad function.');\n       *     var fn = function () { throw err; }\n       *     expect(fn).to.throw(ReferenceError);\n       *     expect(fn).to.throw(Error);\n       *     expect(fn).to.throw(/bad function/);\n       *     expect(fn).to.not.throw('good function');\n       *     expect(fn).to.throw(ReferenceError, /bad function/);\n       *     expect(fn).to.throw(err);\n       *     expect(fn).to.not.throw(new RangeError('Out of range.'));\n       *\n       * Please note that when a throw expectation is negated, it will check each\n       * parameter independently, starting with error constructor type. The appropriate way\n       * to check for the existence of a type of error but for a message that does not match\n       * is to use `and`.\n       *\n       *     expect(fn).to.throw(ReferenceError)\n       *        .and.not.throw(/good function/);\n       *\n       * @name throw\n       * @alias throws\n       * @alias Throw\n       * @param {ErrorConstructor} constructor\n       * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types\n       * @api public\n       */\n\n      function assertThrows (constructor, msg) {\n        var obj = flag(this, 'object');\n        new Assertion(obj).is.a('function');\n\n        var thrown = false\n          , desiredError = null\n          , name = null;\n\n        if (arguments.length === 0) {\n          msg = null;\n          constructor = null;\n        } else if (constructor && (constructor instanceof RegExp || 'string' === typeof constructor)) {\n          msg = constructor;\n          constructor = null;\n        } else if (constructor && constructor instanceof Error) {\n          desiredError = constructor;\n          constructor = null;\n          msg = null;\n        } else if (typeof constructor === 'function') {\n          name = (new constructor()).name;\n        } else {\n          constructor = null;\n        }\n\n        try {\n          obj();\n        } catch (err) {\n          // first, check desired error\n          if (desiredError) {\n            this.assert(\n                err === desiredError\n              , 'expected #{this} to throw ' + _.inspect(desiredError) + ' but ' + _.inspect(err) + ' was thrown'\n              , 'expected #{this} to not throw ' + _.inspect(desiredError)\n            );\n            return this;\n          }\n          // next, check constructor\n          if (constructor) {\n            this.assert(\n                err instanceof constructor\n              , 'expected #{this} to throw ' + name + ' but a ' + err.name + ' was thrown'\n              , 'expected #{this} to not throw ' + name );\n            if (!msg) return this;\n          }\n          // next, check message\n          if (err.message && msg && msg instanceof RegExp) {\n            this.assert(\n                msg.exec(err.message)\n              , 'expected #{this} to throw error matching ' + msg + ' but got ' + _.inspect(err.message)\n              , 'expected #{this} to throw error not matching ' + msg\n            );\n            return this;\n          } else if (err.message && msg && 'string' === typeof msg) {\n            this.assert(\n                ~err.message.indexOf(msg)\n              , 'expected #{this} to throw error including #{exp} but got #{act}'\n              , 'expected #{this} to throw error not including #{act}'\n              , msg\n              , err.message\n            );\n            return this;\n          } else {\n            thrown = true;\n          }\n        }\n\n        var expectedThrown = name ? name : desiredError ? _.inspect(desiredError) : 'an error';\n\n        this.assert(\n            thrown === true\n          , 'expected #{this} to throw ' + expectedThrown\n          , 'expected #{this} to not throw ' + expectedThrown\n        );\n      };\n\n      Assertion.addMethod('throw', assertThrows);\n      Assertion.addMethod('throws', assertThrows);\n      Assertion.addMethod('Throw', assertThrows);\n\n      /**\n       * ### .respondTo(method)\n       *\n       * Asserts that the object or class target will respond to a method.\n       *\n       *     Klass.prototype.bar = function(){};\n       *     expect(Klass).to.respondTo('bar');\n       *     expect(obj).to.respondTo('bar');\n       *\n       * To check if a constructor will respond to a static function,\n       * set the `itself` flag.\n       *\n       *    Klass.baz = function(){};\n       *    expect(Klass).itself.to.respondTo('baz');\n       *\n       * @name respondTo\n       * @param {String} method\n       * @api public\n       */\n\n      Assertion.addMethod('respondTo', function (method) {\n        var obj = flag(this, 'object')\n          , itself = flag(this, 'itself')\n          , context = ('function' === typeof obj && !itself)\n            ? obj.prototype[method]\n            : obj[method];\n\n        this.assert(\n            'function' === typeof context\n          , 'expected #{this} to respond to ' + _.inspect(method)\n          , 'expected #{this} to not respond to ' + _.inspect(method)\n        );\n      });\n\n      /**\n       * ### .itself\n       *\n       * Sets the `itself` flag, later used by the `respondTo` assertion.\n       *\n       *    function Foo() {}\n       *    Foo.bar = function() {}\n       *    Foo.prototype.baz = function() {}\n       *\n       *    expect(Foo).itself.to.respondTo('bar');\n       *    expect(Foo).itself.not.to.respondTo('baz');\n       *\n       * @name itself\n       * @api public\n       */\n\n      Assertion.addProperty('itself', function () {\n        flag(this, 'itself', true);\n      });\n\n      /**\n       * ### .satisfy(method)\n       *\n       * Asserts that the target passes a given truth test.\n       *\n       *     expect(1).to.satisfy(function(num) { return num > 0; });\n       *\n       * @name satisfy\n       * @param {Function} matcher\n       * @api public\n       */\n\n      Assertion.addMethod('satisfy', function (matcher) {\n        var obj = flag(this, 'object');\n        this.assert(\n            matcher(obj)\n          , 'expected #{this} to satisfy ' + _.inspect(matcher)\n          , 'expected #{this} to not satisfy' + _.inspect(matcher)\n          , this.negate ? false : true\n          , matcher(obj)\n        );\n      });\n\n      /**\n       * ### .closeTo(expected, delta)\n       *\n       * Asserts that the target is equal `expected`, to within a +/- `delta` range.\n       *\n       *     expect(1.5).to.be.closeTo(1, 0.5);\n       *\n       * @name closeTo\n       * @param {Number} expected\n       * @param {Number} delta\n       * @api public\n       */\n\n      Assertion.addMethod('closeTo', function (expected, delta) {\n        var obj = flag(this, 'object');\n        this.assert(\n            Math.abs(obj - expected) <= delta\n          , 'expected #{this} to be close to ' + expected + ' +/- ' + delta\n          , 'expected #{this} not to be close to ' + expected + ' +/- ' + delta\n        );\n      });\n\n    };\n\n  }); // module: chai/core/assertions.js\n\n  require.register(\"chai/interface/assert.js\", function(module, exports, require){\n    /*!\n     * chai\n     * Copyright(c) 2011-2012 Jake Luer <jake@alogicalparadox.com>\n     * MIT Licensed\n     */\n\n\n    module.exports = function (chai, util) {\n\n      /*!\n       * Chai dependencies.\n       */\n\n      var Assertion = chai.Assertion\n        , flag = util.flag;\n\n      /*!\n       * Module export.\n       */\n\n      /**\n       * ### assert(expression, message)\n       *\n       * Write your own test expressions.\n       *\n       *     assert('foo' !== 'bar', 'foo is not bar');\n       *     assert(Array.isArray([]), 'empty arrays are arrays');\n       *\n       * @param {Mixed} expression to test for truthiness\n       * @param {String} message to display on error\n       * @name assert\n       * @api public\n       */\n\n      var assert = chai.assert = function (express, errmsg) {\n        var test = new Assertion(null);\n        test.assert(\n            express\n          , errmsg\n          , '[ negation message unavailable ]'\n        );\n      };\n\n      /**\n       * ### .fail(actual, expected, [message], [operator])\n       *\n       * Throw a failure. Node.js `assert` module-compatible.\n       *\n       * @name fail\n       * @param {Mixed} actual\n       * @param {Mixed} expected\n       * @param {String} message\n       * @param {String} operator\n       * @api public\n       */\n\n      assert.fail = function (actual, expected, message, operator) {\n        throw new chai.AssertionError({\n            actual: actual\n          , expected: expected\n          , message: message\n          , operator: operator\n          , stackStartFunction: assert.fail\n        });\n      };\n\n      /**\n       * ### .ok(object, [message])\n       *\n       * Asserts that `object` is truthy.\n       *\n       *     assert.ok('everything', 'everything is ok');\n       *     assert.ok(false, 'this will fail');\n       *\n       * @name ok\n       * @param {Mixed} object to test\n       * @param {String} message\n       * @api public\n       */\n\n      assert.ok = function (val, msg) {\n        new Assertion(val, msg).is.ok;\n      };\n\n      /**\n       * ### .equal(actual, expected, [message])\n       *\n       * Asserts non-strict equality (`==`) of `actual` and `expected`.\n       *\n       *     assert.equal(3, '3', '== coerces values to strings');\n       *\n       * @name equal\n       * @param {Mixed} actual\n       * @param {Mixed} expected\n       * @param {String} message\n       * @api public\n       */\n\n      assert.equal = function (act, exp, msg) {\n        var test = new Assertion(act, msg);\n\n        test.assert(\n            exp == flag(test, 'object')\n          , 'expected #{this} to equal #{exp}'\n          , 'expected #{this} to not equal #{act}'\n          , exp\n          , act\n        );\n      };\n\n      /**\n       * ### .notEqual(actual, expected, [message])\n       *\n       * Asserts non-strict inequality (`!=`) of `actual` and `expected`.\n       *\n       *     assert.notEqual(3, 4, 'these numbers are not equal');\n       *\n       * @name notEqual\n       * @param {Mixed} actual\n       * @param {Mixed} expected\n       * @param {String} message\n       * @api public\n       */\n\n      assert.notEqual = function (act, exp, msg) {\n        var test = new Assertion(act, msg);\n\n        test.assert(\n            exp != flag(test, 'object')\n          , 'expected #{this} to not equal #{exp}'\n          , 'expected #{this} to equal #{act}'\n          , exp\n          , act\n        );\n      };\n\n      /**\n       * ### .strictEqual(actual, expected, [message])\n       *\n       * Asserts strict equality (`===`) of `actual` and `expected`.\n       *\n       *     assert.strictEqual(true, true, 'these booleans are strictly equal');\n       *\n       * @name strictEqual\n       * @param {Mixed} actual\n       * @param {Mixed} expected\n       * @param {String} message\n       * @api public\n       */\n\n      assert.strictEqual = function (act, exp, msg) {\n        new Assertion(act, msg).to.equal(exp);\n      };\n\n      /**\n       * ### .notStrictEqual(actual, expected, [message])\n       *\n       * Asserts strict inequality (`!==`) of `actual` and `expected`.\n       *\n       *     assert.notStrictEqual(3, '3', 'no coercion for strict equality');\n       *\n       * @name notStrictEqual\n       * @param {Mixed} actual\n       * @param {Mixed} expected\n       * @param {String} message\n       * @api public\n       */\n\n      assert.notStrictEqual = function (act, exp, msg) {\n        new Assertion(act, msg).to.not.equal(exp);\n      };\n\n      /**\n       * ### .deepEqual(actual, expected, [message])\n       *\n       * Asserts that `actual` is deeply equal to `expected`.\n       *\n       *     assert.deepEqual({ tea: 'green' }, { tea: 'green' });\n       *\n       * @name deepEqual\n       * @param {Mixed} actual\n       * @param {Mixed} expected\n       * @param {String} message\n       * @api public\n       */\n\n      assert.deepEqual = function (act, exp, msg) {\n        new Assertion(act, msg).to.eql(exp);\n      };\n\n      /**\n       * ### .notDeepEqual(actual, expected, [message])\n       *\n       * Assert that `actual` is not deeply equal to `expected`.\n       *\n       *     assert.notDeepEqual({ tea: 'green' }, { tea: 'jasmine' });\n       *\n       * @name notDeepEqual\n       * @param {Mixed} actual\n       * @param {Mixed} expected\n       * @param {String} message\n       * @api public\n       */\n\n      assert.notDeepEqual = function (act, exp, msg) {\n        new Assertion(act, msg).to.not.eql(exp);\n      };\n\n      /**\n       * ### .isTrue(value, [message])\n       *\n       * Asserts that `value` is true.\n       *\n       *     var teaServed = true;\n       *     assert.isTrue(teaServed, 'the tea has been served');\n       *\n       * @name isTrue\n       * @param {Mixed} value\n       * @param {String} message\n       * @api public\n       */\n\n      assert.isTrue = function (val, msg) {\n        new Assertion(val, msg).is['true'];\n      };\n\n      /**\n       * ### .isFalse(value, [message])\n       *\n       * Asserts that `value` is false.\n       *\n       *     var teaServed = false;\n       *     assert.isFalse(teaServed, 'no tea yet? hmm...');\n       *\n       * @name isFalse\n       * @param {Mixed} value\n       * @param {String} message\n       * @api public\n       */\n\n      assert.isFalse = function (val, msg) {\n        new Assertion(val, msg).is['false'];\n      };\n\n      /**\n       * ### .isNull(value, [message])\n       *\n       * Asserts that `value` is null.\n       *\n       *     assert.isNull(err, 'there was no error');\n       *\n       * @name isNull\n       * @param {Mixed} value\n       * @param {String} message\n       * @api public\n       */\n\n      assert.isNull = function (val, msg) {\n        new Assertion(val, msg).to.equal(null);\n      };\n\n      /**\n       * ### .isNotNull(value, [message])\n       *\n       * Asserts that `value` is not null.\n       *\n       *     var tea = 'tasty chai';\n       *     assert.isNotNull(tea, 'great, time for tea!');\n       *\n       * @name isNotNull\n       * @param {Mixed} value\n       * @param {String} message\n       * @api public\n       */\n\n      assert.isNotNull = function (val, msg) {\n        new Assertion(val, msg).to.not.equal(null);\n      };\n\n      /**\n       * ### .isUndefined(value, [message])\n       *\n       * Asserts that `value` is `undefined`.\n       *\n       *     var tea;\n       *     assert.isUndefined(tea, 'no tea defined');\n       *\n       * @name isUndefined\n       * @param {Mixed} value\n       * @param {String} message\n       * @api public\n       */\n\n      assert.isUndefined = function (val, msg) {\n        new Assertion(val, msg).to.equal(undefined);\n      };\n\n      /**\n       * ### .isDefined(value, [message])\n       *\n       * Asserts that `value` is not `undefined`.\n       *\n       *     var tea = 'cup of chai';\n       *     assert.isDefined(tea, 'tea has been defined');\n       *\n       * @name isUndefined\n       * @param {Mixed} value\n       * @param {String} message\n       * @api public\n       */\n\n      assert.isDefined = function (val, msg) {\n        new Assertion(val, msg).to.not.equal(undefined);\n      };\n\n      /**\n       * ### .isFunction(value, [message])\n       *\n       * Asserts that `value` is a function.\n       *\n       *     function serveTea() { return 'cup of tea'; };\n       *     assert.isFunction(serveTea, 'great, we can have tea now');\n       *\n       * @name isFunction\n       * @param {Mixed} value\n       * @param {String} message\n       * @api public\n       */\n\n      assert.isFunction = function (val, msg) {\n        new Assertion(val, msg).to.be.a('function');\n      };\n\n      /**\n       * ### .isNotFunction(value, [message])\n       *\n       * Asserts that `value` is _not_ a function.\n       *\n       *     var serveTea = [ 'heat', 'pour', 'sip' ];\n       *     assert.isNotFunction(serveTea, 'great, we have listed the steps');\n       *\n       * @name isNotFunction\n       * @param {Mixed} value\n       * @param {String} message\n       * @api public\n       */\n\n      assert.isNotFunction = function (val, msg) {\n        new Assertion(val, msg).to.not.be.a('function');\n      };\n\n      /**\n       * ### .isObject(value, [message])\n       *\n       * Asserts that `value` is an object (as revealed by\n       * `Object.prototype.toString`).\n       *\n       *     var selection = { name: 'Chai', serve: 'with spices' };\n       *     assert.isObject(selection, 'tea selection is an object');\n       *\n       * @name isObject\n       * @param {Mixed} value\n       * @param {String} message\n       * @api public\n       */\n\n      assert.isObject = function (val, msg) {\n        new Assertion(val, msg).to.be.a('object');\n      };\n\n      /**\n       * ### .isNotObject(value, [message])\n       *\n       * Asserts that `value` is _not_ an object.\n       *\n       *     var selection = 'chai'\n       *     assert.isObject(selection, 'tea selection is not an object');\n       *     assert.isObject(null, 'null is not an object');\n       *\n       * @name isNotObject\n       * @param {Mixed} value\n       * @param {String} message\n       * @api public\n       */\n\n      assert.isNotObject = function (val, msg) {\n        new Assertion(val, msg).to.not.be.a('object');\n      };\n\n      /**\n       * ### .isArray(value, [message])\n       *\n       * Asserts that `value` is an array.\n       *\n       *     var menu = [ 'green', 'chai', 'oolong' ];\n       *     assert.isArray(menu, 'what kind of tea do we want?');\n       *\n       * @name isArray\n       * @param {Mixed} value\n       * @param {String} message\n       * @api public\n       */\n\n      assert.isArray = function (val, msg) {\n        new Assertion(val, msg).to.be.an('array');\n      };\n\n      /**\n       * ### .isNotArray(value, [message])\n       *\n       * Asserts that `value` is _not_ an array.\n       *\n       *     var menu = 'green|chai|oolong';\n       *     assert.isNotArray(menu, 'what kind of tea do we want?');\n       *\n       * @name isNotArray\n       * @param {Mixed} value\n       * @param {String} message\n       * @api public\n       */\n\n      assert.isNotArray = function (val, msg) {\n        new Assertion(val, msg).to.not.be.an('array');\n      };\n\n      /**\n       * ### .isString(value, [message])\n       *\n       * Asserts that `value` is a string.\n       *\n       *     var teaOrder = 'chai';\n       *     assert.isString(teaOrder, 'order placed');\n       *\n       * @name isString\n       * @param {Mixed} value\n       * @param {String} message\n       * @api public\n       */\n\n      assert.isString = function (val, msg) {\n        new Assertion(val, msg).to.be.a('string');\n      };\n\n      /**\n       * ### .isNotString(value, [message])\n       *\n       * Asserts that `value` is _not_ a string.\n       *\n       *     var teaOrder = 4;\n       *     assert.isNotString(teaOrder, 'order placed');\n       *\n       * @name isNotString\n       * @param {Mixed} value\n       * @param {String} message\n       * @api public\n       */\n\n      assert.isNotString = function (val, msg) {\n        new Assertion(val, msg).to.not.be.a('string');\n      };\n\n      /**\n       * ### .isNumber(value, [message])\n       *\n       * Asserts that `value` is a number.\n       *\n       *     var cups = 2;\n       *     assert.isNumber(cups, 'how many cups');\n       *\n       * @name isNumber\n       * @param {Number} value\n       * @param {String} message\n       * @api public\n       */\n\n      assert.isNumber = function (val, msg) {\n        new Assertion(val, msg).to.be.a('number');\n      };\n\n      /**\n       * ### .isNotNumber(value, [message])\n       *\n       * Asserts that `value` is _not_ a number.\n       *\n       *     var cups = '2 cups please';\n       *     assert.isNotNumber(cups, 'how many cups');\n       *\n       * @name isNotNumber\n       * @param {Mixed} value\n       * @param {String} message\n       * @api public\n       */\n\n      assert.isNotNumber = function (val, msg) {\n        new Assertion(val, msg).to.not.be.a('number');\n      };\n\n      /**\n       * ### .isBoolean(value, [message])\n       *\n       * Asserts that `value` is a boolean.\n       *\n       *     var teaReady = true\n       *       , teaServed = false;\n       *\n       *     assert.isBoolean(teaReady, 'is the tea ready');\n       *     assert.isBoolean(teaServed, 'has tea been served');\n       *\n       * @name isBoolean\n       * @param {Mixed} value\n       * @param {String} message\n       * @api public\n       */\n\n      assert.isBoolean = function (val, msg) {\n        new Assertion(val, msg).to.be.a('boolean');\n      };\n\n      /**\n       * ### .isNotBoolean(value, [message])\n       *\n       * Asserts that `value` is _not_ a boolean.\n       *\n       *     var teaReady = 'yep'\n       *       , teaServed = 'nope';\n       *\n       *     assert.isNotBoolean(teaReady, 'is the tea ready');\n       *     assert.isNotBoolean(teaServed, 'has tea been served');\n       *\n       * @name isNotBoolean\n       * @param {Mixed} value\n       * @param {String} message\n       * @api public\n       */\n\n      assert.isNotBoolean = function (val, msg) {\n        new Assertion(val, msg).to.not.be.a('boolean');\n      };\n\n      /**\n       * ### .typeOf(value, name, [message])\n       *\n       * Asserts that `value`'s type is `name`, as determined by\n       * `Object.prototype.toString`.\n       *\n       *     assert.typeOf({ tea: 'chai' }, 'object', 'we have an object');\n       *     assert.typeOf(['chai', 'jasmine'], 'array', 'we have an array');\n       *     assert.typeOf('tea', 'string', 'we have a string');\n       *     assert.typeOf(/tea/, 'regexp', 'we have a regular expression');\n       *     assert.typeOf(null, 'null', 'we have a null');\n       *     assert.typeOf(undefined, 'undefined', 'we have an undefined');\n       *\n       * @name typeOf\n       * @param {Mixed} value\n       * @param {String} name\n       * @param {String} message\n       * @api public\n       */\n\n      assert.typeOf = function (val, type, msg) {\n        new Assertion(val, msg).to.be.a(type);\n      };\n\n      /**\n       * ### .notTypeOf(value, name, [message])\n       *\n       * Asserts that `value`'s type is _not_ `name`, as determined by\n       * `Object.prototype.toString`.\n       *\n       *     assert.notTypeOf('tea', 'number', 'strings are not numbers');\n       *\n       * @name notTypeOf\n       * @param {Mixed} value\n       * @param {String} typeof name\n       * @param {String} message\n       * @api public\n       */\n\n      assert.notTypeOf = function (val, type, msg) {\n        new Assertion(val, msg).to.not.be.a(type);\n      };\n\n      /**\n       * ### .instanceOf(object, constructor, [message])\n       *\n       * Asserts that `value` is an instance of `constructor`.\n       *\n       *     var Tea = function (name) { this.name = name; }\n       *       , chai = new Tea('chai');\n       *\n       *     assert.instanceOf(chai, Tea, 'chai is an instance of tea');\n       *\n       * @name instanceOf\n       * @param {Object} object\n       * @param {Constructor} constructor\n       * @param {String} message\n       * @api public\n       */\n\n      assert.instanceOf = function (val, type, msg) {\n        new Assertion(val, msg).to.be.instanceOf(type);\n      };\n\n      /**\n       * ### .notInstanceOf(object, constructor, [message])\n       *\n       * Asserts `value` is not an instance of `constructor`.\n       *\n       *     var Tea = function (name) { this.name = name; }\n       *       , chai = new String('chai');\n       *\n       *     assert.notInstanceOf(chai, Tea, 'chai is not an instance of tea');\n       *\n       * @name notInstanceOf\n       * @param {Object} object\n       * @param {Constructor} constructor\n       * @param {String} message\n       * @api public\n       */\n\n      assert.notInstanceOf = function (val, type, msg) {\n        new Assertion(val, msg).to.not.be.instanceOf(type);\n      };\n\n      /**\n       * ### .include(haystack, needle, [message])\n       *\n       * Asserts that `haystack` includes `needle`. Works\n       * for strings and arrays.\n       *\n       *     assert.include('foobar', 'bar', 'foobar contains string \"bar\"');\n       *     assert.include([ 1, 2, 3 ], 3, 'array contains value');\n       *\n       * @name include\n       * @param {Array|String} haystack\n       * @param {Mixed} needle\n       * @param {String} message\n       * @api public\n       */\n\n      assert.include = function (exp, inc, msg) {\n        var obj = new Assertion(exp, msg);\n\n        if (Array.isArray(exp)) {\n          obj.to.include(inc);\n        } else if ('string' === typeof exp) {\n          obj.to.contain.string(inc);\n        }\n      };\n\n      /**\n       * ### .match(value, regexp, [message])\n       *\n       * Asserts that `value` matches the regular expression `regexp`.\n       *\n       *     assert.match('foobar', /^foo/, 'regexp matches');\n       *\n       * @name match\n       * @param {Mixed} value\n       * @param {RegExp} regexp\n       * @param {String} message\n       * @api public\n       */\n\n      assert.match = function (exp, re, msg) {\n        new Assertion(exp, msg).to.match(re);\n      };\n\n      /**\n       * ### .notMatch(value, regexp, [message])\n       *\n       * Asserts that `value` does not match the regular expression `regexp`.\n       *\n       *     assert.notMatch('foobar', /^foo/, 'regexp does not match');\n       *\n       * @name notMatch\n       * @param {Mixed} value\n       * @param {RegExp} regexp\n       * @param {String} message\n       * @api public\n       */\n\n      assert.notMatch = function (exp, re, msg) {\n        new Assertion(exp, msg).to.not.match(re);\n      };\n\n      /**\n       * ### .property(object, property, [message])\n       *\n       * Asserts that `object` has a property named by `property`.\n       *\n       *     assert.property({ tea: { green: 'matcha' }}, 'tea');\n       *\n       * @name property\n       * @param {Object} object\n       * @param {String} property\n       * @param {String} message\n       * @api public\n       */\n\n      assert.property = function (obj, prop, msg) {\n        new Assertion(obj, msg).to.have.property(prop);\n      };\n\n      /**\n       * ### .notProperty(object, property, [message])\n       *\n       * Asserts that `object` does _not_ have a property named by `property`.\n       *\n       *     assert.notProperty({ tea: { green: 'matcha' }}, 'coffee');\n       *\n       * @name notProperty\n       * @param {Object} object\n       * @param {String} property\n       * @param {String} message\n       * @api public\n       */\n\n      assert.notProperty = function (obj, prop, msg) {\n        new Assertion(obj, msg).to.not.have.property(prop);\n      };\n\n      /**\n       * ### .deepProperty(object, property, [message])\n       *\n       * Asserts that `object` has a property named by `property`, which can be a\n       * string using dot- and bracket-notation for deep reference.\n       *\n       *     assert.deepProperty({ tea: { green: 'matcha' }}, 'tea.green');\n       *\n       * @name deepProperty\n       * @param {Object} object\n       * @param {String} property\n       * @param {String} message\n       * @api public\n       */\n\n      assert.deepProperty = function (obj, prop, msg) {\n        new Assertion(obj, msg).to.have.deep.property(prop);\n      };\n\n      /**\n       * ### .notDeepProperty(object, property, [message])\n       *\n       * Asserts that `object` does _not_ have a property named by `property`, which\n       * can be a string using dot- and bracket-notation for deep reference.\n       *\n       *     assert.notDeepProperty({ tea: { green: 'matcha' }}, 'tea.oolong');\n       *\n       * @name notDeepProperty\n       * @param {Object} object\n       * @param {String} property\n       * @param {String} message\n       * @api public\n       */\n\n      assert.notDeepProperty = function (obj, prop, msg) {\n        new Assertion(obj, msg).to.not.have.deep.property(prop);\n      };\n\n      /**\n       * ### .propertyVal(object, property, value, [message])\n       *\n       * Asserts that `object` has a property named by `property` with value given\n       * by `value`.\n       *\n       *     assert.propertyVal({ tea: 'is good' }, 'tea', 'is good');\n       *\n       * @name propertyVal\n       * @param {Object} object\n       * @param {String} property\n       * @param {Mixed} value\n       * @param {String} message\n       * @api public\n       */\n\n      assert.propertyVal = function (obj, prop, val, msg) {\n        new Assertion(obj, msg).to.have.property(prop, val);\n      };\n\n      /**\n       * ### .propertyNotVal(object, property, value, [message])\n       *\n       * Asserts that `object` has a property named by `property`, but with a value\n       * different from that given by `value`.\n       *\n       *     assert.propertyNotVal({ tea: 'is good' }, 'tea', 'is bad');\n       *\n       * @name propertyNotVal\n       * @param {Object} object\n       * @param {String} property\n       * @param {Mixed} value\n       * @param {String} message\n       * @api public\n       */\n\n      assert.propertyNotVal = function (obj, prop, val, msg) {\n        new Assertion(obj, msg).to.not.have.property(prop, val);\n      };\n\n      /**\n       * ### .deepPropertyVal(object, property, value, [message])\n       *\n       * Asserts that `object` has a property named by `property` with value given\n       * by `value`. `property` can use dot- and bracket-notation for deep\n       * reference.\n       *\n       *     assert.deepPropertyVal({ tea: { green: 'matcha' }}, 'tea.green', 'matcha');\n       *\n       * @name deepPropertyVal\n       * @param {Object} object\n       * @param {String} property\n       * @param {Mixed} value\n       * @param {String} message\n       * @api public\n       */\n\n      assert.deepPropertyVal = function (obj, prop, val, msg) {\n        new Assertion(obj, msg).to.have.deep.property(prop, val);\n      };\n\n      /**\n       * ### .deepPropertyNotVal(object, property, value, [message])\n       *\n       * Asserts that `object` has a property named by `property`, but with a value\n       * different from that given by `value`. `property` can use dot- and\n       * bracket-notation for deep reference.\n       *\n       *     assert.deepPropertyNotVal({ tea: { green: 'matcha' }}, 'tea.green', 'konacha');\n       *\n       * @name deepPropertyNotVal\n       * @param {Object} object\n       * @param {String} property\n       * @param {Mixed} value\n       * @param {String} message\n       * @api public\n       */\n\n      assert.deepPropertyNotVal = function (obj, prop, val, msg) {\n        new Assertion(obj, msg).to.not.have.deep.property(prop, val);\n      };\n\n      /**\n       * ### .lengthOf(object, length, [message])\n       *\n       * Asserts that `object` has a `length` property with the expected value.\n       *\n       *     assert.lengthOf([1,2,3], 3, 'array has length of 3');\n       *     assert.lengthOf('foobar', 5, 'string has length of 6');\n       *\n       * @name lengthOf\n       * @param {Mixed} object\n       * @param {Number} length\n       * @param {String} message\n       * @api public\n       */\n\n      assert.lengthOf = function (exp, len, msg) {\n        new Assertion(exp, msg).to.have.length(len);\n      };\n\n      /**\n       * ### .throws(function, [constructor/regexp], [message])\n       *\n       * Asserts that `function` will throw an error that is an instance of\n       * `constructor`, or alternately that it will throw an error with message\n       * matching `regexp`.\n       *\n       *     assert.throw(fn, ReferenceError, 'function throws a reference error');\n       *\n       * @name throws\n       * @alias throw\n       * @alias Throw\n       * @param {Function} function\n       * @param {ErrorConstructor} constructor\n       * @param {RegExp} regexp\n       * @param {String} message\n       * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types\n       * @api public\n       */\n\n      assert.Throw = function (fn, type, msg) {\n        if ('string' === typeof type) {\n          msg = type;\n          type = null;\n        }\n\n        new Assertion(fn, msg).to.Throw(type);\n      };\n\n      /**\n       * ### .doesNotThrow(function, [constructor/regexp], [message])\n       *\n       * Asserts that `function` will _not_ throw an error that is an instance of\n       * `constructor`, or alternately that it will not throw an error with message\n       * matching `regexp`.\n       *\n       *     assert.doesNotThrow(fn, Error, 'function does not throw');\n       *\n       * @name doesNotThrow\n       * @param {Function} function\n       * @param {ErrorConstructor} constructor\n       * @param {RegExp} regexp\n       * @param {String} message\n       * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types\n       * @api public\n       */\n\n      assert.doesNotThrow = function (fn, type, msg) {\n        if ('string' === typeof type) {\n          msg = type;\n          type = null;\n        }\n\n        new Assertion(fn, msg).to.not.Throw(type);\n      };\n\n      /**\n       * ### .operator(val1, operator, val2, [message])\n       *\n       * Compares two values using `operator`.\n       *\n       *     assert.operator(1, '<', 2, 'everything is ok');\n       *     assert.operator(1, '>', 2, 'this will fail');\n       *\n       * @name operator\n       * @param {Mixed} val1\n       * @param {String} operator\n       * @param {Mixed} val2\n       * @param {String} message\n       * @api public\n       */\n\n      assert.operator = function (val, operator, val2, msg) {\n        if (!~['==', '===', '>', '>=', '<', '<=', '!=', '!=='].indexOf(operator)) {\n          throw new Error('Invalid operator \"' + operator + '\"');\n        }\n        var test = new Assertion(eval(val + operator + val2), msg);\n        test.assert(\n            true === flag(test, 'object')\n          , 'expected ' + util.inspect(val) + ' to be ' + operator + ' ' + util.inspect(val2)\n          , 'expected ' + util.inspect(val) + ' to not be ' + operator + ' ' + util.inspect(val2) );\n      };\n\n      /**\n       * ### .closeTo(actual, expected, delta, [message])\n       *\n       * Asserts that the target is equal `expected`, to within a +/- `delta` range.\n       *\n       *     assert.closeTo(1.5, 1, 0.5, 'numbers are close');\n       *\n       * @name closeTo\n       * @param {Number} actual\n       * @param {Number} expected\n       * @param {Number} delta\n       * @param {String} message\n       * @api public\n       */\n\n      assert.closeTo = function (act, exp, delta, msg) {\n        new Assertion(act, msg).to.be.closeTo(exp, delta);\n      };\n\n      /*!\n       * Undocumented / untested\n       */\n\n      assert.ifError = function (val, msg) {\n        new Assertion(val, msg).to.not.be.ok;\n      };\n\n      /*!\n       * Aliases.\n       */\n\n      (function alias(name, as){\n        assert[as] = assert[name];\n        return alias;\n      })\n      ('Throw', 'throw')\n      ('Throw', 'throws');\n    };\n\n  }); // module: chai/interface/assert.js\n\n  require.register(\"chai/interface/expect.js\", function(module, exports, require){\n    /*!\n     * chai\n     * Copyright(c) 2011-2012 Jake Luer <jake@alogicalparadox.com>\n     * MIT Licensed\n     */\n\n    module.exports = function (chai, util) {\n      chai.expect = function (val, message) {\n        return new chai.Assertion(val, message);\n      };\n    };\n\n\n  }); // module: chai/interface/expect.js\n\n  require.register(\"chai/interface/should.js\", function(module, exports, require){\n    /*!\n     * chai\n     * Copyright(c) 2011-2012 Jake Luer <jake@alogicalparadox.com>\n     * MIT Licensed\n     */\n\n    module.exports = function (chai, util) {\n      var Assertion = chai.Assertion;\n\n      function loadShould () {\n        // modify Object.prototype to have `should`\n        Object.defineProperty(Object.prototype, 'should',\n          { set: function () {}\n          , get: function(){\n              if (this instanceof String || this instanceof Number) {\n                return new Assertion(this.constructor(this));\n              } else if (this instanceof Boolean) {\n                return new Assertion(this == true);\n              }\n              return new Assertion(this);\n            }\n          , configurable: true\n        });\n\n        var should = {};\n\n        should.equal = function (val1, val2) {\n          new Assertion(val1).to.equal(val2);\n        };\n\n        should.Throw = function (fn, errt, errs) {\n          new Assertion(fn).to.Throw(errt, errs);\n        };\n\n        should.exist = function (val) {\n          new Assertion(val).to.exist;\n        }\n\n        // negation\n        should.not = {}\n\n        should.not.equal = function (val1, val2) {\n          new Assertion(val1).to.not.equal(val2);\n        };\n\n        should.not.Throw = function (fn, errt, errs) {\n          new Assertion(fn).to.not.Throw(errt, errs);\n        };\n\n        should.not.exist = function (val) {\n          new Assertion(val).to.not.exist;\n        }\n\n        should['throw'] = should['Throw'];\n        should.not['throw'] = should.not['Throw'];\n\n        return should;\n      };\n\n      chai.should = loadShould;\n      chai.Should = loadShould;\n    };\n\n  }); // module: chai/interface/should.js\n\n  require.register(\"chai/utils/addChainableMethod.js\", function(module, exports, require){\n    /*!\n     * Chai - addChainingMethod utility\n     * Copyright(c) 2012 Jake Luer <jake@alogicalparadox.com>\n     * MIT Licensed\n     */\n\n    /*!\n     * Module dependencies\n     */\n\n    var transferFlags = require('./transferFlags');\n\n    /**\n     * ### addChainableMethod (ctx, name, method, chainingBehavior)\n     *\n     * Adds a method to an object, such that the method can also be chained.\n     *\n     *     utils.addChainableMethod(chai.Assertion.prototype, 'foo', function (str) {\n     *       var obj = utils.flag(this, 'object');\n     *       new chai.Assertion(obj).to.be.equal(str);\n     *     });\n     *\n     * Can also be accessed directly from `chai.Assertion`.\n     *\n     *     chai.Assertion.addChainableMethod('foo', fn, chainingBehavior);\n     *\n     * The result can then be used as both a method assertion, executing both `method` and\n     * `chainingBehavior`, or as a language chain, which only executes `chainingBehavior`.\n     *\n     *     expect(fooStr).to.be.foo('bar');\n     *     expect(fooStr).to.be.foo.equal('foo');\n     *\n     * @param {Object} ctx object to which the method is added\n     * @param {String} name of method to add\n     * @param {Function} method function to be used for `name`, when called\n     * @param {Function} chainingBehavior function to be called every time the property is accessed\n     * @name addChainableMethod\n     * @api public\n     */\n\n    module.exports = function (ctx, name, method, chainingBehavior) {\n      if (typeof chainingBehavior !== 'function')\n        chainingBehavior = function () { };\n\n      Object.defineProperty(ctx, name,\n        { get: function () {\n            chainingBehavior.call(this);\n\n            var assert = function () {\n              var result = method.apply(this, arguments);\n              return result === undefined ? this : result;\n            };\n\n            // Re-enumerate every time to better accomodate plugins.\n            var asserterNames = Object.getOwnPropertyNames(ctx);\n            asserterNames.forEach(function (asserterName) {\n              var pd = Object.getOwnPropertyDescriptor(ctx, asserterName)\n                , functionProtoPD = Object.getOwnPropertyDescriptor(Function.prototype, asserterName);\n              // Avoid trying to overwrite things that we can't, like `length` and `arguments`.\n              if (functionProtoPD && !functionProtoPD.configurable) return;\n              if (asserterName === 'arguments') return; // @see chaijs/chai/issues/69\n              Object.defineProperty(assert, asserterName, pd);\n            });\n\n            transferFlags(this, assert);\n            return assert;\n          }\n        , configurable: true\n      });\n    };\n\n  }); // module: chai/utils/addChainableMethod.js\n\n  require.register(\"chai/utils/addMethod.js\", function(module, exports, require){\n    /*!\n     * Chai - addMethod utility\n     * Copyright(c) 2012 Jake Luer <jake@alogicalparadox.com>\n     * MIT Licensed\n     */\n\n    /**\n     * ### .addMethod (ctx, name, method)\n     *\n     * Adds a method to the prototype of an object.\n     *\n     *     utils.addMethod(chai.Assertion.prototype, 'foo', function (str) {\n     *       var obj = utils.flag(this, 'object');\n     *       new chai.Assertion(obj).to.be.equal(str);\n     *     });\n     *\n     * Can also be accessed directly from `chai.Assertion`.\n     *\n     *     chai.Assertion.addMethod('foo', fn);\n     *\n     * Then can be used as any other assertion.\n     *\n     *     expect(fooStr).to.be.foo('bar');\n     *\n     * @param {Object} ctx object to which the method is added\n     * @param {String} name of method to add\n     * @param {Function} method function to be used for name\n     * @name addMethod\n     * @api public\n     */\n\n    module.exports = function (ctx, name, method) {\n      ctx[name] = function () {\n        var result = method.apply(this, arguments);\n        return result === undefined ? this : result;\n      };\n    };\n\n  }); // module: chai/utils/addMethod.js\n\n  require.register(\"chai/utils/addProperty.js\", function(module, exports, require){\n    /*!\n     * Chai - addProperty utility\n     * Copyright(c) 2012 Jake Luer <jake@alogicalparadox.com>\n     * MIT Licensed\n     */\n\n    /**\n     * ### addProperty (ctx, name, getter)\n     *\n     * Adds a property to the prototype of an object.\n     *\n     *     utils.addProperty(chai.Assertion.prototype, 'foo', function () {\n     *       var obj = utils.flag(this, 'object');\n     *       new chai.Assertion(obj).to.be.instanceof(Foo);\n     *     });\n     *\n     * Can also be accessed directly from `chai.Assertion`.\n     *\n     *     chai.Assertion.addProperty('foo', fn);\n     *\n     * Then can be used as any other assertion.\n     *\n     *     expect(myFoo).to.be.foo;\n     *\n     * @param {Object} ctx object to which the property is added\n     * @param {String} name of property to add\n     * @param {Function} getter function to be used for name\n     * @name addProperty\n     * @api public\n     */\n\n    module.exports = function (ctx, name, getter) {\n      Object.defineProperty(ctx, name,\n        { get: function () {\n            var result = getter.call(this);\n            return result === undefined ? this : result;\n          }\n        , configurable: true\n      });\n    };\n\n  }); // module: chai/utils/addProperty.js\n\n  require.register(\"chai/utils/eql.js\", function(module, exports, require){\n    // This is directly from Node.js assert\n    // https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/assert.js\n\n\n    module.exports = _deepEqual;\n\n    // For browser implementation\n    if (!Buffer) {\n      var Buffer = {\n        isBuffer: function () {\n          return false;\n        }\n      };\n    }\n\n    function _deepEqual(actual, expected) {\n      // 7.1. All identical values are equivalent, as determined by ===.\n      if (actual === expected) {\n        return true;\n\n      } else if (Buffer.isBuffer(actual) && Buffer.isBuffer(expected)) {\n        if (actual.length != expected.length) return false;\n\n        for (var i = 0; i < actual.length; i++) {\n          if (actual[i] !== expected[i]) return false;\n        }\n\n        return true;\n\n      // 7.2. If the expected value is a Date object, the actual value is\n      // equivalent if it is also a Date object that refers to the same time.\n      } else if (actual instanceof Date && expected instanceof Date) {\n        return actual.getTime() === expected.getTime();\n\n      // 7.3. Other pairs that do not both pass typeof value == 'object',\n      // equivalence is determined by ==.\n      } else if (typeof actual != 'object' && typeof expected != 'object') {\n        return actual === expected;\n\n      // 7.4. For all other Object pairs, including Array objects, equivalence is\n      // determined by having the same number of owned properties (as verified\n      // with Object.prototype.hasOwnProperty.call), the same set of keys\n      // (although not necessarily the same order), equivalent values for every\n      // corresponding key, and an identical 'prototype' property. Note: this\n      // accounts for both named and indexed properties on Arrays.\n      } else {\n        return objEquiv(actual, expected);\n      }\n    }\n\n    function isUndefinedOrNull(value) {\n      return value === null || value === undefined;\n    }\n\n    function isArguments(object) {\n      return Object.prototype.toString.call(object) == '[object Arguments]';\n    }\n\n    function objEquiv(a, b) {\n      if (isUndefinedOrNull(a) || isUndefinedOrNull(b))\n        return false;\n      // an identical 'prototype' property.\n      if (a.prototype !== b.prototype) return false;\n      //~~~I've managed to break Object.keys through screwy arguments passing.\n      //   Converting to array solves the problem.\n      if (isArguments(a)) {\n        if (!isArguments(b)) {\n          return false;\n        }\n        a = pSlice.call(a);\n        b = pSlice.call(b);\n        return _deepEqual(a, b);\n      }\n      try {\n        var ka = Object.keys(a),\n            kb = Object.keys(b),\n            key, i;\n      } catch (e) {//happens when one is a string literal and the other isn't\n        return false;\n      }\n      // having the same number of owned properties (keys incorporates\n      // hasOwnProperty)\n      if (ka.length != kb.length)\n        return false;\n      //the same set of keys (although not necessarily the same order),\n      ka.sort();\n      kb.sort();\n      //~~~cheap key test\n      for (i = ka.length - 1; i >= 0; i--) {\n        if (ka[i] != kb[i])\n          return false;\n      }\n      //equivalent values for every corresponding key, and\n      //~~~possibly expensive deep test\n      for (i = ka.length - 1; i >= 0; i--) {\n        key = ka[i];\n        if (!_deepEqual(a[key], b[key])) return false;\n      }\n      return true;\n    }\n  }); // module: chai/utils/eql.js\n\n  require.register(\"chai/utils/flag.js\", function(module, exports, require){\n    /*!\n     * Chai - flag utility\n     * Copyright(c) 2012 Jake Luer <jake@alogicalparadox.com>\n     * MIT Licensed\n     */\n\n    /**\n     * ### flag(object ,key, [value])\n     *\n     * Get or set a flag value on an object. If a\n     * value is provided it will be set, else it will\n     * return the currently set value or `undefined` if\n     * the value is not set.\n     *\n     *     utils.flag(this, 'foo', 'bar'); // setter\n     *     utils.flag(this, 'foo'); // getter, returns `bar`\n     *\n     * @param {Object} object (constructed Assertion\n     * @param {String} key\n     * @param {Mixed} value (optional)\n     * @name flag\n     * @api private\n     */\n\n    module.exports = function (obj, key, value) {\n      var flags = obj.__flags || (obj.__flags = Object.create(null));\n      if (arguments.length === 3) {\n        flags[key] = value;\n      } else {\n        return flags[key];\n      }\n    };\n\n  }); // module: chai/utils/flag.js\n\n  require.register(\"chai/utils/getActual.js\", function(module, exports, require){\n    /*!\n     * Chai - getActual utility\n     * Copyright(c) 2012 Jake Luer <jake@alogicalparadox.com>\n     * MIT Licensed\n     */\n\n    /**\n     * # getActual(object, [actual])\n     *\n     * Returns the `actual` value for an Assertion\n     *\n     * @param {Object} object (constructed Assertion)\n     * @param {Arguments} chai.Assertion.prototype.assert arguments\n     */\n\n    module.exports = function (obj, args) {\n      var actual = args[4];\n      return 'undefined' !== actual ? actual : obj._obj;\n    };\n\n  }); // module: chai/utils/getActual.js\n\n  require.register(\"chai/utils/getMessage.js\", function(module, exports, require){\n    /*!\n     * Chai - message composition utility\n     * Copyright(c) 2012 Jake Luer <jake@alogicalparadox.com>\n     * MIT Licensed\n     */\n\n    /*!\n     * Module dependancies\n     */\n\n    var flag = require('./flag')\n      , getActual = require('./getActual')\n      , inspect = require('./inspect')\n      , objDisplay = require('./objDisplay');\n\n    /**\n     * ### .getMessage(object, message, negateMessage)\n     *\n     * Construct the error message based on flags\n     * and template tags. Template tags will return\n     * a stringified inspection of the object referenced.\n     *\n     * Messsage template tags:\n     * - `#{this}` current asserted object\n     * - `#{act}` actual value\n     * - `#{exp}` expected value\n     *\n     * @param {Object} object (constructed Assertion)\n     * @param {Arguments} chai.Assertion.prototype.assert arguments\n     * @name getMessage\n     * @api public\n     */\n\n    module.exports = function (obj, args) {\n      var negate = flag(obj, 'negate')\n        , val = flag(obj, 'object')\n        , expected = args[3]\n        , actual = getActual(obj, args)\n        , msg = negate ? args[2] : args[1]\n        , flagMsg = flag(obj, 'message');\n\n      msg = msg || '';\n      msg = msg\n        .replace(/#{this}/g, objDisplay(val))\n        .replace(/#{act}/g, objDisplay(actual))\n        .replace(/#{exp}/g, objDisplay(expected));\n\n      return flagMsg ? flagMsg + ': ' + msg : msg;\n    };\n\n  }); // module: chai/utils/getMessage.js\n\n  require.register(\"chai/utils/getName.js\", function(module, exports, require){\n    /*!\n     * Chai - getName utility\n     * Copyright(c) 2012 Jake Luer <jake@alogicalparadox.com>\n     * MIT Licensed\n     */\n\n    /**\n     * # getName(func)\n     *\n     * Gets the name of a function, in a cross-browser way.\n     *\n     * @param {Function} a function (usually a constructor)\n     */\n\n    module.exports = function (func) {\n      if (func.name) return func.name;\n\n      var match = /^\\s?function ([^(]*)\\(/.exec(func);\n      return match && match[1] ? match[1] : \"\";\n    };\n\n  }); // module: chai/utils/getName.js\n\n  require.register(\"chai/utils/getPathValue.js\", function(module, exports, require){\n    /*!\n     * Chai - getPathValue utility\n     * Copyright(c) 2012 Jake Luer <jake@alogicalparadox.com>\n     * @see https://github.com/logicalparadox/filtr\n     * MIT Licensed\n     */\n\n    /**\n     * ### .getPathValue(path, object)\n     *\n     * This allows the retrieval of values in an\n     * object given a string path.\n     *\n     *     var obj = {\n     *         prop1: {\n     *             arr: ['a', 'b', 'c']\n     *           , str: 'Hello'\n     *         }\n     *       , prop2: {\n     *             arr: [ { nested: 'Universe' } ]\n     *           , str: 'Hello again!'\n     *         }\n     *     }\n     *\n     * The following would be the results.\n     *\n     *     getPathValue('prop1.str', obj); // Hello\n     *     getPathValue('prop1.att[2]', obj); // b\n     *     getPathValue('prop2.arr[0].nested', obj); // Universe\n     *\n     * @param {String} path\n     * @param {Object} object\n     * @returns {Object} value or `undefined`\n     * @name getPathValue\n     * @api public\n     */\n\n    var getPathValue = module.exports = function (path, obj) {\n      var parsed = parsePath(path);\n      return _getPathValue(parsed, obj);\n    };\n\n    /*!\n     * ## parsePath(path)\n     *\n     * Helper function used to parse string object\n     * paths. Use in conjunction with `_getPathValue`.\n     *\n     *      var parsed = parsePath('myobject.property.subprop');\n     *\n     * ### Paths:\n     *\n     * * Can be as near infinitely deep and nested\n     * * Arrays are also valid using the formal `myobject.document[3].property`.\n     *\n     * @param {String} path\n     * @returns {Object} parsed\n     * @api private\n     */\n\n    function parsePath (path) {\n      var str = path.replace(/\\[/g, '.[')\n        , parts = str.match(/(\\\\\\.|[^.]+?)+/g);\n      return parts.map(function (value) {\n        var re = /\\[(\\d+)\\]$/\n          , mArr = re.exec(value)\n        if (mArr) return { i: parseFloat(mArr[1]) };\n        else return { p: value };\n      });\n    };\n\n    /*!\n     * ## _getPathValue(parsed, obj)\n     *\n     * Helper companion function for `.parsePath` that returns\n     * the value located at the parsed address.\n     *\n     *      var value = getPathValue(parsed, obj);\n     *\n     * @param {Object} parsed definition from `parsePath`.\n     * @param {Object} object to search against\n     * @returns {Object|Undefined} value\n     * @api private\n     */\n\n    function _getPathValue (parsed, obj) {\n      var tmp = obj\n        , res;\n      for (var i = 0, l = parsed.length; i < l; i++) {\n        var part = parsed[i];\n        if (tmp) {\n          if ('undefined' !== typeof part.p)\n            tmp = tmp[part.p];\n          else if ('undefined' !== typeof part.i)\n            tmp = tmp[part.i];\n          if (i == (l - 1)) res = tmp;\n        } else {\n          res = undefined;\n        }\n      }\n      return res;\n    };\n\n  }); // module: chai/utils/getPathValue.js\n\n  require.register(\"chai/utils/index.js\", function(module, exports, require){\n    /*!\n     * chai\n     * Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com>\n     * MIT Licensed\n     */\n\n    /*!\n     * Main exports\n     */\n\n    var exports = module.exports = {};\n\n    /*!\n     * test utility\n     */\n\n    exports.test = require('./test');\n\n    /*!\n     * message utility\n     */\n\n    exports.getMessage = require('./getMessage');\n\n    /*!\n     * actual utility\n     */\n\n    exports.getActual = require('./getActual');\n\n    /*!\n     * Inspect util\n     */\n\n    exports.inspect = require('./inspect');\n\n    /*!\n     * Object Display util\n     */\n\n    exports.objDisplay = require('./objDisplay');\n\n    /*!\n     * Flag utility\n     */\n\n    exports.flag = require('./flag');\n\n    /*!\n     * Flag transferring utility\n     */\n\n    exports.transferFlags = require('./transferFlags');\n\n    /*!\n     * Deep equal utility\n     */\n\n    exports.eql = require('./eql');\n\n    /*!\n     * Deep path value\n     */\n\n    exports.getPathValue = require('./getPathValue');\n\n    /*!\n     * Function name\n     */\n\n    exports.getName = require('./getName');\n\n    /*!\n     * add Property\n     */\n\n    exports.addProperty = require('./addProperty');\n\n    /*!\n     * add Method\n     */\n\n    exports.addMethod = require('./addMethod');\n\n    /*!\n     * overwrite Property\n     */\n\n    exports.overwriteProperty = require('./overwriteProperty');\n\n    /*!\n     * overwrite Method\n     */\n\n    exports.overwriteMethod = require('./overwriteMethod');\n\n    /*!\n     * Add a chainable method\n     */\n\n    exports.addChainableMethod = require('./addChainableMethod');\n\n\n  }); // module: chai/utils/index.js\n\n  require.register(\"chai/utils/inspect.js\", function(module, exports, require){\n    // This is (almost) directly from Node.js utils\n    // https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js\n\n    var getName = require('./getName');\n\n    module.exports = inspect;\n\n    /**\n     * Echos the value of a value. Trys to print the value out\n     * in the best way possible given the different types.\n     *\n     * @param {Object} obj The object to print out.\n     * @param {Boolean} showHidden Flag that shows hidden (not enumerable)\n     *    properties of objects.\n     * @param {Number} depth Depth in which to descend in object. Default is 2.\n     * @param {Boolean} colors Flag to turn on ANSI escape codes to color the\n     *    output. Default is false (no coloring).\n     */\n    function inspect(obj, showHidden, depth, colors) {\n      var ctx = {\n        showHidden: showHidden,\n        seen: [],\n        stylize: function (str) { return str; }\n      };\n      return formatValue(ctx, obj, (typeof depth === 'undefined' ? 2 : depth));\n    }\n\n    // https://gist.github.com/1044128/\n    var getOuterHTML = function(element) {\n      if ('outerHTML' in element) return element.outerHTML;\n      var ns = \"http://www.w3.org/1999/xhtml\";\n      var container = document.createElementNS(ns, '_');\n      var elemProto = (window.HTMLElement || window.Element).prototype;\n      var xmlSerializer = new XMLSerializer();\n      var html;\n      if (document.xmlVersion) {\n        return xmlSerializer.serializeToString(element);\n      } else {\n        container.appendChild(element.cloneNode(false));\n        html = container.innerHTML.replace('><', '>' + element.innerHTML + '<');\n        container.innerHTML = '';\n        return html;\n      }\n    };\n      \n    // Returns true if object is a DOM element.\n    var isDOMElement = function (object) {\n      if (typeof HTMLElement === 'object') {\n        return object instanceof HTMLElement;\n      } else {\n        return object &&\n          typeof object === 'object' &&\n          object.nodeType === 1 &&\n          typeof object.nodeName === 'string';\n      }\n    };\n\n    function formatValue(ctx, value, recurseTimes) {\n      // Provide a hook for user-specified inspect functions.\n      // Check that value is an object with an inspect function on it\n      if (value && typeof value.inspect === 'function' &&\n          // Filter out the util module, it's inspect function is special\n          value.inspect !== exports.inspect &&\n          // Also filter out any prototype objects using the circular check.\n          !(value.constructor && value.constructor.prototype === value)) {\n        return value.inspect(recurseTimes);\n      }\n\n      // Primitive types cannot have properties\n      var primitive = formatPrimitive(ctx, value);\n      if (primitive) {\n        return primitive;\n      }\n\n      // If it's DOM elem, get outer HTML.\n      if (isDOMElement(value)) {\n        return getOuterHTML(value);\n      }\n\n      // Look up the keys of the object.\n      var visibleKeys = Object.keys(value);\n      var keys = ctx.showHidden ? Object.getOwnPropertyNames(value) : visibleKeys;\n\n      // Some type of object without properties can be shortcutted.\n      // In IE, errors have a single `stack` property, or if they are vanilla `Error`,\n      // a `stack` plus `description` property; ignore those for consistency.\n      if (keys.length === 0 || (isError(value) && (\n          (keys.length === 1 && keys[0] === 'stack') ||\n          (keys.length === 2 && keys[0] === 'description' && keys[1] === 'stack')\n         ))) {\n        if (typeof value === 'function') {\n          var name = getName(value);\n          var nameSuffix = name ? ': ' + name : '';\n          return ctx.stylize('[Function' + nameSuffix + ']', 'special');\n        }\n        if (isRegExp(value)) {\n          return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n        }\n        if (isDate(value)) {\n          return ctx.stylize(Date.prototype.toUTCString.call(value), 'date');\n        }\n        if (isError(value)) {\n          return formatError(value);\n        }\n      }\n\n      var base = '', array = false, braces = ['{', '}'];\n\n      // Make Array say that they are Array\n      if (isArray(value)) {\n        array = true;\n        braces = ['[', ']'];\n      }\n\n      // Make functions say that they are functions\n      if (typeof value === 'function') {\n        var name = getName(value);\n        var nameSuffix = name ? ': ' + name : '';\n        base = ' [Function' + nameSuffix + ']';\n      }\n\n      // Make RegExps say that they are RegExps\n      if (isRegExp(value)) {\n        base = ' ' + RegExp.prototype.toString.call(value);\n      }\n\n      // Make dates with properties first say the date\n      if (isDate(value)) {\n        base = ' ' + Date.prototype.toUTCString.call(value);\n      }\n\n      // Make error with message first say the error\n      if (isError(value)) {\n        return formatError(value);\n      }\n\n      if (keys.length === 0 && (!array || value.length == 0)) {\n        return braces[0] + base + braces[1];\n      }\n\n      if (recurseTimes < 0) {\n        if (isRegExp(value)) {\n          return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n        } else {\n          return ctx.stylize('[Object]', 'special');\n        }\n      }\n\n      ctx.seen.push(value);\n\n      var output;\n      if (array) {\n        output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n      } else {\n        output = keys.map(function(key) {\n          return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n        });\n      }\n\n      ctx.seen.pop();\n\n      return reduceToSingleString(output, base, braces);\n    }\n\n\n    function formatPrimitive(ctx, value) {\n      switch (typeof value) {\n        case 'undefined':\n          return ctx.stylize('undefined', 'undefined');\n\n        case 'string':\n          var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n                                                   .replace(/'/g, \"\\\\'\")\n                                                   .replace(/\\\\\"/g, '\"') + '\\'';\n          return ctx.stylize(simple, 'string');\n\n        case 'number':\n          return ctx.stylize('' + value, 'number');\n\n        case 'boolean':\n          return ctx.stylize('' + value, 'boolean');\n      }\n      // For some reason typeof null is \"object\", so special case here.\n      if (value === null) {\n        return ctx.stylize('null', 'null');\n      }\n    }\n\n\n    function formatError(value) {\n      return '[' + Error.prototype.toString.call(value) + ']';\n    }\n\n\n    function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n      var output = [];\n      for (var i = 0, l = value.length; i < l; ++i) {\n        if (Object.prototype.hasOwnProperty.call(value, String(i))) {\n          output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n              String(i), true));\n        } else {\n          output.push('');\n        }\n      }\n      keys.forEach(function(key) {\n        if (!key.match(/^\\d+$/)) {\n          output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n              key, true));\n        }\n      });\n      return output;\n    }\n\n\n    function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n      var name, str;\n      if (value.__lookupGetter__) {\n        if (value.__lookupGetter__(key)) {\n          if (value.__lookupSetter__(key)) {\n            str = ctx.stylize('[Getter/Setter]', 'special');\n          } else {\n            str = ctx.stylize('[Getter]', 'special');\n          }\n        } else {\n          if (value.__lookupSetter__(key)) {\n            str = ctx.stylize('[Setter]', 'special');\n          }\n        }\n      }\n      if (visibleKeys.indexOf(key) < 0) {\n        name = '[' + key + ']';\n      }\n      if (!str) {\n        if (ctx.seen.indexOf(value[key]) < 0) {\n          if (recurseTimes === null) {\n            str = formatValue(ctx, value[key], null);\n          } else {\n            str = formatValue(ctx, value[key], recurseTimes - 1);\n          }\n          if (str.indexOf('\\n') > -1) {\n            if (array) {\n              str = str.split('\\n').map(function(line) {\n                return '  ' + line;\n              }).join('\\n').substr(2);\n            } else {\n              str = '\\n' + str.split('\\n').map(function(line) {\n                return '   ' + line;\n              }).join('\\n');\n            }\n          }\n        } else {\n          str = ctx.stylize('[Circular]', 'special');\n        }\n      }\n      if (typeof name === 'undefined') {\n        if (array && key.match(/^\\d+$/)) {\n          return str;\n        }\n        name = JSON.stringify('' + key);\n        if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n          name = name.substr(1, name.length - 2);\n          name = ctx.stylize(name, 'name');\n        } else {\n          name = name.replace(/'/g, \"\\\\'\")\n                     .replace(/\\\\\"/g, '\"')\n                     .replace(/(^\"|\"$)/g, \"'\");\n          name = ctx.stylize(name, 'string');\n        }\n      }\n\n      return name + ': ' + str;\n    }\n\n\n    function reduceToSingleString(output, base, braces) {\n      var numLinesEst = 0;\n      var length = output.reduce(function(prev, cur) {\n        numLinesEst++;\n        if (cur.indexOf('\\n') >= 0) numLinesEst++;\n        return prev + cur.length + 1;\n      }, 0);\n\n      if (length > 60) {\n        return braces[0] +\n               (base === '' ? '' : base + '\\n ') +\n               ' ' +\n               output.join(',\\n  ') +\n               ' ' +\n               braces[1];\n      }\n\n      return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n    }\n\n    function isArray(ar) {\n      return Array.isArray(ar) ||\n             (typeof ar === 'object' && objectToString(ar) === '[object Array]');\n    }\n\n    function isRegExp(re) {\n      return typeof re === 'object' && objectToString(re) === '[object RegExp]';\n    }\n\n    function isDate(d) {\n      return typeof d === 'object' && objectToString(d) === '[object Date]';\n    }\n\n    function isError(e) {\n      return typeof e === 'object' && objectToString(e) === '[object Error]';\n    }\n\n    function objectToString(o) {\n      return Object.prototype.toString.call(o);\n    }\n\n  }); // module: chai/utils/inspect.js\n\n  require.register(\"chai/utils/objDisplay.js\", function(module, exports, require){\n    /*!\n     * Chai - flag utility\n     * Copyright(c) 2012 Jake Luer <jake@alogicalparadox.com>\n     * MIT Licensed\n     */\n\n    /*!\n     * Module dependancies\n     */\n\n    var inspect = require('./inspect');\n\n    /**\n     * ### .objDisplay (object)\n     *\n     * Determines if an object or an array matches\n     * criteria to be inspected in-line for error\n     * messages or should be truncated.\n     *\n     * @param {Mixed} javascript object to inspect\n     * @name objDisplay\n     * @api public\n     */\n\n    module.exports = function (obj) {\n      var str = inspect(obj)\n        , type = Object.prototype.toString.call(obj);\n\n      if (str.length >= 40) {\n        if (type === '[object Array]') {\n          return '[ Array(' + obj.length + ') ]';\n        } else if (type === '[object Object]') {\n          var keys = Object.keys(obj)\n            , kstr = keys.length > 2\n              ? keys.splice(0, 2).join(', ') + ', ...'\n              : keys.join(', ');\n          return '{ Object (' + kstr + ') }';\n        } else {\n          return str;\n        }\n      } else {\n        return str;\n      }\n    };\n\n  }); // module: chai/utils/objDisplay.js\n\n  require.register(\"chai/utils/overwriteMethod.js\", function(module, exports, require){\n    /*!\n     * Chai - overwriteMethod utility\n     * Copyright(c) 2012 Jake Luer <jake@alogicalparadox.com>\n     * MIT Licensed\n     */\n\n    /**\n     * ### overwriteMethod (ctx, name, fn)\n     *\n     * Overwites an already existing method and provides\n     * access to previous function. Must return function\n     * to be used for name.\n     *\n     *     utils.overwriteMethod(chai.Assertion.prototype, 'equal', function (_super) {\n     *       return function (str) {\n     *         var obj = utils.flag(this, 'object');\n     *         if (obj instanceof Foo) {\n     *           new chai.Assertion(obj.value).to.equal(str);\n     *         } else {\n     *           _super.apply(this, arguments);\n     *         }\n     *       }\n     *     });\n     *\n     * Can also be accessed directly from `chai.Assertion`.\n     *\n     *     chai.Assertion.overwriteMethod('foo', fn);\n     *\n     * Then can be used as any other assertion.\n     *\n     *     expect(myFoo).to.equal('bar');\n     *\n     * @param {Object} ctx object whose method is to be overwritten\n     * @param {String} name of method to overwrite\n     * @param {Function} method function that returns a function to be used for name\n     * @name overwriteMethod\n     * @api public\n     */\n\n    module.exports = function (ctx, name, method) {\n      var _method = ctx[name]\n        , _super = function () { return this; };\n\n      if (_method && 'function' === typeof _method)\n        _super = _method;\n\n      ctx[name] = function () {\n        var result = method(_super).apply(this, arguments);\n        return result === undefined ? this : result;\n      }\n    };\n\n  }); // module: chai/utils/overwriteMethod.js\n\n  require.register(\"chai/utils/overwriteProperty.js\", function(module, exports, require){\n    /*!\n     * Chai - overwriteProperty utility\n     * Copyright(c) 2012 Jake Luer <jake@alogicalparadox.com>\n     * MIT Licensed\n     */\n\n    /**\n     * ### overwriteProperty (ctx, name, fn)\n     *\n     * Overwites an already existing property getter and provides\n     * access to previous value. Must return function to use as getter.\n     *\n     *     utils.overwriteProperty(chai.Assertion.prototype, 'ok', function (_super) {\n     *       return function () {\n     *         var obj = utils.flag(this, 'object');\n     *         if (obj instanceof Foo) {\n     *           new chai.Assertion(obj.name).to.equal('bar');\n     *         } else {\n     *           _super.call(this);\n     *         }\n     *       }\n     *     });\n     *\n     *\n     * Can also be accessed directly from `chai.Assertion`.\n     *\n     *     chai.Assertion.overwriteProperty('foo', fn);\n     *\n     * Then can be used as any other assertion.\n     *\n     *     expect(myFoo).to.be.ok;\n     *\n     * @param {Object} ctx object whose property is to be overwritten\n     * @param {String} name of property to overwrite\n     * @param {Function} getter function that returns a getter function to be used for name\n     * @name overwriteProperty\n     * @api public\n     */\n\n    module.exports = function (ctx, name, getter) {\n      var _get = Object.getOwnPropertyDescriptor(ctx, name)\n        , _super = function () {};\n\n      if (_get && 'function' === typeof _get.get)\n        _super = _get.get\n\n      Object.defineProperty(ctx, name,\n        { get: function () {\n            var result = getter(_super).call(this);\n            return result === undefined ? this : result;\n          }\n        , configurable: true\n      });\n    };\n\n  }); // module: chai/utils/overwriteProperty.js\n\n  require.register(\"chai/utils/test.js\", function(module, exports, require){\n    /*!\n     * Chai - test utility\n     * Copyright(c) 2012 Jake Luer <jake@alogicalparadox.com>\n     * MIT Licensed\n     */\n\n    /*!\n     * Module dependancies\n     */\n\n    var flag = require('./flag');\n\n    /**\n     * # test(object, expression)\n     *\n     * Test and object for expression.\n     *\n     * @param {Object} object (constructed Assertion)\n     * @param {Arguments} chai.Assertion.prototype.assert arguments\n     */\n\n    module.exports = function (obj, args) {\n      var negate = flag(obj, 'negate')\n        , expr = args[0];\n      return negate ? !expr : expr;\n    };\n\n  }); // module: chai/utils/test.js\n\n  require.register(\"chai/utils/transferFlags.js\", function(module, exports, require){\n    /*!\n     * Chai - transferFlags utility\n     * Copyright(c) 2012 Jake Luer <jake@alogicalparadox.com>\n     * MIT Licensed\n     */\n\n    /**\n     * ### transferFlags(assertion, object, includeAll = true)\n     *\n     * Transfer all the flags for `assertion` to `object`. If\n     * `includeAll` is set to `false`, then the base Chai\n     * assertion flags (namely `object`, `ssfi`, and `message`)\n     * will not be transferred.\n     *\n     *\n     *     var newAssertion = new Assertion();\n     *     utils.transferFlags(assertion, newAssertion);\n     *\n     *     var anotherAsseriton = new Assertion(myObj);\n     *     utils.transferFlags(assertion, anotherAssertion, false);\n     *\n     * @param {Assertion} assertion the assertion to transfer the flags from\n     * @param {Object} object the object to transfer the flags too; usually a new assertion\n     * @param {Boolean} includeAll\n     * @name getAllFlags\n     * @api private\n     */\n\n    module.exports = function (assertion, object, includeAll) {\n      var flags = assertion.__flags || (assertion.__flags = Object.create(null));\n\n      if (!object.__flags) {\n        object.__flags = Object.create(null);\n      }\n\n      includeAll = arguments.length === 3 ? includeAll : true;\n\n      for (var flag in flags) {\n        if (includeAll ||\n            (flag !== 'object' && flag !== 'ssfi' && flag != 'message')) {\n          object.__flags[flag] = flags[flag];\n        }\n      }\n    };\n\n  }); // module: chai/utils/transferFlags.js\n\n  require.alias(\"./chai.js\", \"chai\");\n\n  return require('chai');\n});"
  },
  {
    "path": "test/vendor/expect.js",
    "content": "\n(function (global, module) {\n\n  if ('undefined' == typeof module) {\n    var module = { exports: {} }\n      , exports = module.exports\n  }\n\n  /**\n   * Exports.\n   */\n\n  module.exports = expect;\n  expect.Assertion = Assertion;\n\n  /**\n   * Exports version.\n   */\n\n  expect.version = '0.1.2';\n\n  /**\n   * Possible assertion flags.\n   */\n\n  var flags = {\n      not: ['to', 'be', 'have', 'include', 'only']\n    , to: ['be', 'have', 'include', 'only', 'not']\n    , only: ['have']\n    , have: ['own']\n    , be: ['an']\n  };\n\n  function expect (obj) {\n    return new Assertion(obj);\n  }\n\n  /**\n   * Constructor\n   *\n   * @api private\n   */\n\n  function Assertion (obj, flag, parent) {\n    this.obj = obj;\n    this.flags = {};\n\n    if (undefined != parent) {\n      this.flags[flag] = true;\n\n      for (var i in parent.flags) {\n        if (parent.flags.hasOwnProperty(i)) {\n          this.flags[i] = true;\n        }\n      }\n    }\n\n    var $flags = flag ? flags[flag] : keys(flags)\n      , self = this\n\n    if ($flags) {\n      for (var i = 0, l = $flags.length; i < l; i++) {\n        // avoid recursion\n        if (this.flags[$flags[i]]) continue;\n\n        var name = $flags[i]\n          , assertion = new Assertion(this.obj, name, this)\n  \n        if ('function' == typeof Assertion.prototype[name]) {\n          // clone the function, make sure we dont touch the prot reference\n          var old = this[name];\n          this[name] = function () {\n            return old.apply(self, arguments);\n          }\n\n          for (var fn in Assertion.prototype) {\n            if (Assertion.prototype.hasOwnProperty(fn) && fn != name) {\n              this[name][fn] = bind(assertion[fn], assertion);\n            }\n          }\n        } else {\n          this[name] = assertion;\n        }\n      }\n    }\n  };\n\n  /**\n   * Performs an assertion\n   *\n   * @api private\n   */\n\n  Assertion.prototype.assert = function (truth, msg, error) {\n    var msg = this.flags.not ? error : msg\n      , ok = this.flags.not ? !truth : truth;\n\n    if (!ok) {\n      throw new Error(msg);\n    }\n\n    this.and = new Assertion(this.obj);\n  };\n\n  /**\n   * Check if the value is truthy\n   *\n   * @api public\n   */\n\n  Assertion.prototype.ok = function () {\n    this.assert(\n        !!this.obj\n      , 'expected ' + i(this.obj) + ' to be truthy'\n      , 'expected ' + i(this.obj) + ' to be falsy');\n  };\n\n  /**\n   * Assert that the function throws.\n   *\n   * @param {Function|RegExp} callback, or regexp to match error string against\n   * @api public\n   */\n\n  Assertion.prototype.throwError =\n  Assertion.prototype.throwException = function (fn) {\n    expect(this.obj).to.be.a('function');\n\n    var thrown = false\n      , not = this.flags.not\n\n    try {\n      this.obj();\n    } catch (e) {\n      if ('function' == typeof fn) {\n        fn(e);\n      } else if ('object' == typeof fn) {\n        var subject = 'string' == typeof e ? e : e.message;\n        if (not) {\n          expect(subject).to.not.match(fn);\n        } else {\n          expect(subject).to.match(fn);\n        }\n      }\n      thrown = true;\n    }\n\n    if ('object' == typeof fn && not) {\n      // in the presence of a matcher, ensure the `not` only applies to\n      // the matching.\n      this.flags.not = false; \n    }\n\n    var name = this.obj.name || 'fn';\n    this.assert(\n        thrown\n      , 'expected ' + name + ' to throw an exception'\n      , 'expected ' + name + ' not to throw an exception');\n  };\n\n  /**\n   * Checks if the array is empty.\n   *\n   * @api public\n   */\n\n  Assertion.prototype.empty = function () {\n    var expectation;\n\n    if ('object' == typeof this.obj && null !== this.obj && !isArray(this.obj)) {\n      if ('number' == typeof this.obj.length) {\n        expectation = !this.obj.length;\n      } else {\n        expectation = !keys(this.obj).length;\n      }\n    } else {\n      if ('string' != typeof this.obj) {\n        expect(this.obj).to.be.an('object');\n      }\n\n      expect(this.obj).to.have.property('length');\n      expectation = !this.obj.length;\n    }\n\n    this.assert(\n        expectation\n      , 'expected ' + i(this.obj) + ' to be empty'\n      , 'expected ' + i(this.obj) + ' to not be empty');\n    return this;\n  };\n\n  /**\n   * Checks if the obj exactly equals another.\n   *\n   * @api public\n   */\n\n  Assertion.prototype.be =\n  Assertion.prototype.equal = function (obj) {\n    this.assert(\n        obj === this.obj\n      , 'expected ' + i(this.obj) + ' to equal ' + i(obj)\n      , 'expected ' + i(this.obj) + ' to not equal ' + i(obj));\n    return this;\n  };\n\n  /**\n   * Checks if the obj sortof equals another.\n   *\n   * @api public\n   */\n\n  Assertion.prototype.eql = function (obj) {\n    this.assert(\n        expect.eql(obj, this.obj)\n      , 'expected ' + i(this.obj) + ' to sort of equal ' + i(obj)\n      , 'expected ' + i(this.obj) + ' to sort of not equal ' + i(obj));\n    return this;\n  };\n\n  /**\n   * Assert within start to finish (inclusive). \n   *\n   * @param {Number} start\n   * @param {Number} finish\n   * @api public\n   */\n\n  Assertion.prototype.within = function (start, finish) {\n    var range = start + '..' + finish;\n    this.assert(\n        this.obj >= start && this.obj <= finish\n      , 'expected ' + i(this.obj) + ' to be within ' + range\n      , 'expected ' + i(this.obj) + ' to not be within ' + range);\n    return this;\n  };\n\n  /**\n   * Assert typeof / instance of\n   *\n   * @api public\n   */\n\n  Assertion.prototype.a =\n  Assertion.prototype.an = function (type) {\n    if ('string' == typeof type) {\n      // proper english in error msg\n      var n = /^[aeiou]/.test(type) ? 'n' : '';\n\n      // typeof with support for 'array'\n      this.assert(\n          'array' == type ? isArray(this.obj) :\n            'object' == type\n              ? 'object' == typeof this.obj && null !== this.obj\n              : type == typeof this.obj\n        , 'expected ' + i(this.obj) + ' to be a' + n + ' ' + type\n        , 'expected ' + i(this.obj) + ' not to be a' + n + ' ' + type);\n    } else {\n      // instanceof\n      var name = type.name || 'supplied constructor';\n      this.assert(\n          this.obj instanceof type\n        , 'expected ' + i(this.obj) + ' to be an instance of ' + name\n        , 'expected ' + i(this.obj) + ' not to be an instance of ' + name);\n    }\n\n    return this;\n  };\n\n  /**\n   * Assert numeric value above _n_.\n   *\n   * @param {Number} n\n   * @api public\n   */\n\n  Assertion.prototype.greaterThan =\n  Assertion.prototype.above = function (n) {\n    this.assert(\n        this.obj > n\n      , 'expected ' + i(this.obj) + ' to be above ' + n\n      , 'expected ' + i(this.obj) + ' to be below ' + n);\n    return this;\n  };\n\n  /**\n   * Assert numeric value below _n_.\n   *\n   * @param {Number} n\n   * @api public\n   */\n\n  Assertion.prototype.lessThan =\n  Assertion.prototype.below = function (n) {\n    this.assert(\n        this.obj < n\n      , 'expected ' + i(this.obj) + ' to be below ' + n\n      , 'expected ' + i(this.obj) + ' to be above ' + n);\n    return this;\n  };\n  \n  /**\n   * Assert string value matches _regexp_.\n   *\n   * @param {RegExp} regexp\n   * @api public\n   */\n\n  Assertion.prototype.match = function (regexp) {\n    this.assert(\n        regexp.exec(this.obj)\n      , 'expected ' + i(this.obj) + ' to match ' + regexp\n      , 'expected ' + i(this.obj) + ' not to match ' + regexp);\n    return this;\n  };\n\n  /**\n   * Assert property \"length\" exists and has value of _n_.\n   *\n   * @param {Number} n\n   * @api public\n   */\n\n  Assertion.prototype.length = function (n) {\n    expect(this.obj).to.have.property('length');\n    var len = this.obj.length;\n    this.assert(\n        n == len\n      , 'expected ' + i(this.obj) + ' to have a length of ' + n + ' but got ' + len\n      , 'expected ' + i(this.obj) + ' to not have a length of ' + len);\n    return this;\n  };\n\n  /**\n   * Assert property _name_ exists, with optional _val_.\n   *\n   * @param {String} name\n   * @param {Mixed} val\n   * @api public\n   */\n\n  Assertion.prototype.property = function (name, val) {\n    if (this.flags.own) {\n      this.assert(\n          Object.prototype.hasOwnProperty.call(this.obj, name)\n        , 'expected ' + i(this.obj) + ' to have own property ' + i(name)\n        , 'expected ' + i(this.obj) + ' to not have own property ' + i(name));\n      return this;\n    }\n\n    if (this.flags.not && undefined !== val) {\n      if (undefined === this.obj[name]) {\n        throw new Error(i(this.obj) + ' has no property ' + i(name));\n      }\n    } else {\n      var hasProp;\n      try {\n        hasProp = name in this.obj\n      } catch (e) {\n        hasProp = undefined !== this.obj[name]\n      }\n      \n      this.assert(\n          hasProp\n        , 'expected ' + i(this.obj) + ' to have a property ' + i(name)\n        , 'expected ' + i(this.obj) + ' to not have a property ' + i(name));\n    }\n    \n    if (undefined !== val) {\n      this.assert(\n          val === this.obj[name]\n        , 'expected ' + i(this.obj) + ' to have a property ' + i(name)\n          + ' of ' + i(val) + ', but got ' + i(this.obj[name])\n        , 'expected ' + i(this.obj) + ' to not have a property ' + i(name)\n          + ' of ' + i(val));\n    }\n\n    this.obj = this.obj[name];\n    return this;\n  };\n\n  /**\n   * Assert that the array contains _obj_ or string contains _obj_.\n   *\n   * @param {Mixed} obj|string\n   * @api public\n   */\n\n  Assertion.prototype.string =\n  Assertion.prototype.contain = function (obj) {\n    if ('string' == typeof this.obj) {\n      this.assert(\n          ~this.obj.indexOf(obj)\n        , 'expected ' + i(this.obj) + ' to contain ' + i(obj)\n        , 'expected ' + i(this.obj) + ' to not contain ' + i(obj));\n    } else {\n      this.assert(\n          ~indexOf(this.obj, obj)\n        , 'expected ' + i(this.obj) + ' to contain ' + i(obj)\n        , 'expected ' + i(this.obj) + ' to not contain ' + i(obj));\n    }\n    return this;\n  };\n\n  /**\n   * Assert exact keys or inclusion of keys by using\n   * the `.own` modifier.\n   *\n   * @param {Array|String ...} keys\n   * @api public\n   */\n\n  Assertion.prototype.key =\n  Assertion.prototype.keys = function ($keys) {\n    var str\n      , ok = true;\n\n    $keys = isArray($keys)\n      ? $keys\n      : Array.prototype.slice.call(arguments);\n\n    if (!$keys.length) throw new Error('keys required');\n\n    var actual = keys(this.obj)\n      , len = $keys.length;\n\n    // Inclusion\n    ok = every($keys, function (key) {\n      return ~indexOf(actual, key);\n    });\n\n    // Strict\n    if (!this.flags.not && this.flags.only) {\n      ok = ok && $keys.length == actual.length;\n    }\n\n    // Key string\n    if (len > 1) {\n      $keys = map($keys, function (key) {\n        return i(key);\n      });\n      var last = $keys.pop();\n      str = $keys.join(', ') + ', and ' + last;\n    } else {\n      str = i($keys[0]);\n    }\n\n    // Form\n    str = (len > 1 ? 'keys ' : 'key ') + str;\n\n    // Have / include\n    str = (!this.flags.only ? 'include ' : 'only have ') + str;\n\n    // Assertion\n    this.assert(\n        ok\n      , 'expected ' + i(this.obj) + ' to ' + str\n      , 'expected ' + i(this.obj) + ' to not ' + str);\n\n    return this;\n  };\n\n  /**\n   * Function bind implementation.\n   */\n\n  function bind (fn, scope) {\n    return function () {\n      return fn.apply(scope, arguments);\n    }\n  }\n\n  /**\n   * Array every compatibility\n   *\n   * @see bit.ly/5Fq1N2\n   * @api public\n   */\n\n  function every (arr, fn, thisObj) {\n    var scope = thisObj || global;\n    for (var i = 0, j = arr.length; i < j; ++i) {\n      if (!fn.call(scope, arr[i], i, arr)) {\n        return false;\n      }\n    }\n    return true;\n  };\n\n  /**\n   * Array indexOf compatibility.\n   *\n   * @see bit.ly/a5Dxa2\n   * @api public\n   */\n\n  function indexOf (arr, o, i) {\n    if (Array.prototype.indexOf) {\n      return Array.prototype.indexOf.call(arr, o, i);\n    }\n\n    if (arr.length === undefined) {\n      return -1;\n    }\n\n    for (var j = arr.length, i = i < 0 ? i + j < 0 ? 0 : i + j : i || 0\n        ; i < j && arr[i] !== o; i++);\n\n    return j <= i ? -1 : i;\n  };\n\n  /**\n   * Inspects an object.\n   *\n   * @see taken from node.js `util` module (copyright Joyent, MIT license)\n   * @api private\n   */\n\n  function i (obj, showHidden, depth) {\n    var seen = [];\n\n    function stylize (str) {\n      return str;\n    };\n\n    function format (value, recurseTimes) {\n      // Provide a hook for user-specified inspect functions.\n      // Check that value is an object with an inspect function on it\n      if (value && typeof value.inspect === 'function' &&\n          // Filter out the util module, it's inspect function is special\n          value !== exports &&\n          // Also filter out any prototype objects using the circular check.\n          !(value.constructor && value.constructor.prototype === value)) {\n        return value.inspect(recurseTimes);\n      }\n\n      // Primitive types cannot have properties\n      switch (typeof value) {\n        case 'undefined':\n          return stylize('undefined', 'undefined');\n\n        case 'string':\n          var simple = '\\'' + json.stringify(value).replace(/^\"|\"$/g, '')\n                                                   .replace(/'/g, \"\\\\'\")\n                                                   .replace(/\\\\\"/g, '\"') + '\\'';\n          return stylize(simple, 'string');\n\n        case 'number':\n          return stylize('' + value, 'number');\n\n        case 'boolean':\n          return stylize('' + value, 'boolean');\n      }\n      // For some reason typeof null is \"object\", so special case here.\n      if (value === null) {\n        return stylize('null', 'null');\n      }\n\n      // Look up the keys of the object.\n      var visible_keys = keys(value);\n      var $keys = showHidden ? Object.getOwnPropertyNames(value) : visible_keys;\n\n      // Functions without properties can be shortcutted.\n      if (typeof value === 'function' && $keys.length === 0) {\n        if (isRegExp(value)) {\n          return stylize('' + value, 'regexp');\n        } else {\n          var name = value.name ? ': ' + value.name : '';\n          return stylize('[Function' + name + ']', 'special');\n        }\n      }\n\n      // Dates without properties can be shortcutted\n      if (isDate(value) && $keys.length === 0) {\n        return stylize(value.toUTCString(), 'date');\n      }\n\n      var base, type, braces;\n      // Determine the object type\n      if (isArray(value)) {\n        type = 'Array';\n        braces = ['[', ']'];\n      } else {\n        type = 'Object';\n        braces = ['{', '}'];\n      }\n\n      // Make functions say that they are functions\n      if (typeof value === 'function') {\n        var n = value.name ? ': ' + value.name : '';\n        base = (isRegExp(value)) ? ' ' + value : ' [Function' + n + ']';\n      } else {\n        base = '';\n      }\n\n      // Make dates with properties first say the date\n      if (isDate(value)) {\n        base = ' ' + value.toUTCString();\n      }\n\n      if ($keys.length === 0) {\n        return braces[0] + base + braces[1];\n      }\n\n      if (recurseTimes < 0) {\n        if (isRegExp(value)) {\n          return stylize('' + value, 'regexp');\n        } else {\n          return stylize('[Object]', 'special');\n        }\n      }\n\n      seen.push(value);\n\n      var output = map($keys, function (key) {\n        var name, str;\n        if (value.__lookupGetter__) {\n          if (value.__lookupGetter__(key)) {\n            if (value.__lookupSetter__(key)) {\n              str = stylize('[Getter/Setter]', 'special');\n            } else {\n              str = stylize('[Getter]', 'special');\n            }\n          } else {\n            if (value.__lookupSetter__(key)) {\n              str = stylize('[Setter]', 'special');\n            }\n          }\n        }\n        if (indexOf(visible_keys, key) < 0) {\n          name = '[' + key + ']';\n        }\n        if (!str) {\n          if (indexOf(seen, value[key]) < 0) {\n            if (recurseTimes === null) {\n              str = format(value[key]);\n            } else {\n              str = format(value[key], recurseTimes - 1);\n            }\n            if (str.indexOf('\\n') > -1) {\n              if (isArray(value)) {\n                str = map(str.split('\\n'), function (line) {\n                  return '  ' + line;\n                }).join('\\n').substr(2);\n              } else {\n                str = '\\n' + map(str.split('\\n'), function (line) {\n                  return '   ' + line;\n                }).join('\\n');\n              }\n            }\n          } else {\n            str = stylize('[Circular]', 'special');\n          }\n        }\n        if (typeof name === 'undefined') {\n          if (type === 'Array' && key.match(/^\\d+$/)) {\n            return str;\n          }\n          name = json.stringify('' + key);\n          if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n            name = name.substr(1, name.length - 2);\n            name = stylize(name, 'name');\n          } else {\n            name = name.replace(/'/g, \"\\\\'\")\n                       .replace(/\\\\\"/g, '\"')\n                       .replace(/(^\"|\"$)/g, \"'\");\n            name = stylize(name, 'string');\n          }\n        }\n\n        return name + ': ' + str;\n      });\n\n      seen.pop();\n\n      var numLinesEst = 0;\n      var length = reduce(output, function (prev, cur) {\n        numLinesEst++;\n        if (indexOf(cur, '\\n') >= 0) numLinesEst++;\n        return prev + cur.length + 1;\n      }, 0);\n\n      if (length > 50) {\n        output = braces[0] +\n                 (base === '' ? '' : base + '\\n ') +\n                 ' ' +\n                 output.join(',\\n  ') +\n                 ' ' +\n                 braces[1];\n\n      } else {\n        output = braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n      }\n\n      return output;\n    }\n    return format(obj, (typeof depth === 'undefined' ? 2 : depth));\n  };\n\n  function isArray (ar) {\n    return Object.prototype.toString.call(ar) == '[object Array]';\n  };\n\n  function isRegExp(re) {\n    var s = '' + re;\n    return re instanceof RegExp || // easy case\n           // duck-type for context-switching evalcx case\n           typeof(re) === 'function' &&\n           re.constructor.name === 'RegExp' &&\n           re.compile &&\n           re.test &&\n           re.exec &&\n           s.match(/^\\/.*\\/[gim]{0,3}$/);\n  };\n\n  function isDate(d) {\n    if (d instanceof Date) return true;\n    return false;\n  };\n\n  function keys (obj) {\n    if (Object.keys) {\n      return Object.keys(obj);\n    }\n\n    var keys = [];\n\n    for (var i in obj) {\n      if (Object.prototype.hasOwnProperty.call(obj, i)) {\n        keys.push(i);\n      }\n    }\n\n    return keys;\n  }\n\n  function map (arr, mapper, that) {\n    if (Array.prototype.map) {\n      return Array.prototype.map.call(arr, mapper, that);\n    }\n\n    var other= new Array(arr.length);\n\n    for (var i= 0, n = arr.length; i<n; i++)\n      if (i in arr)\n        other[i] = mapper.call(that, arr[i], i, arr);\n\n    return other;\n  };\n\n  function reduce (arr, fun) {\n    if (Array.prototype.reduce) {\n      return Array.prototype.reduce.apply(\n          arr\n        , Array.prototype.slice.call(arguments, 1)\n      );\n    }\n\n    var len = +this.length;\n\n    if (typeof fun !== \"function\")\n      throw new TypeError();\n\n    // no value to return if no initial value and an empty array\n    if (len === 0 && arguments.length === 1)\n      throw new TypeError();\n\n    var i = 0;\n    if (arguments.length >= 2) {\n      var rv = arguments[1];\n    } else {\n      do {\n        if (i in this) {\n          rv = this[i++];\n          break;\n        }\n\n        // if array contains no values, no initial value to return\n        if (++i >= len)\n          throw new TypeError();\n      } while (true);\n    }\n\n    for (; i < len; i++) {\n      if (i in this)\n        rv = fun.call(null, rv, this[i], i, this);\n    }\n\n    return rv;\n  };\n\n  /**\n   * Asserts deep equality\n   *\n   * @see taken from node.js `assert` module (copyright Joyent, MIT license)\n   * @api private\n   */\n\n  expect.eql = function eql (actual, expected) {\n    // 7.1. All identical values are equivalent, as determined by ===.\n    if (actual === expected) { \n      return true;\n    } else if ('undefined' != typeof Buffer \n        && Buffer.isBuffer(actual) && Buffer.isBuffer(expected)) {\n      if (actual.length != expected.length) return false;\n\n      for (var i = 0; i < actual.length; i++) {\n        if (actual[i] !== expected[i]) return false;\n      }\n\n      return true;\n\n    // 7.2. If the expected value is a Date object, the actual value is\n    // equivalent if it is also a Date object that refers to the same time.\n    } else if (actual instanceof Date && expected instanceof Date) {\n      return actual.getTime() === expected.getTime();\n\n    // 7.3. Other pairs that do not both pass typeof value == \"object\",\n    // equivalence is determined by ==.\n    } else if (typeof actual != 'object' && typeof expected != 'object') {\n      return actual == expected;\n\n    // 7.4. For all other Object pairs, including Array objects, equivalence is\n    // determined by having the same number of owned properties (as verified\n    // with Object.prototype.hasOwnProperty.call), the same set of keys\n    // (although not necessarily the same order), equivalent values for every\n    // corresponding key, and an identical \"prototype\" property. Note: this\n    // accounts for both named and indexed properties on Arrays.\n    } else {\n      return objEquiv(actual, expected);\n    }\n  }\n\n  function isUndefinedOrNull (value) {\n    return value === null || value === undefined;\n  }\n\n  function isArguments (object) {\n    return Object.prototype.toString.call(object) == '[object Arguments]';\n  }\n\n  function objEquiv (a, b) {\n    if (isUndefinedOrNull(a) || isUndefinedOrNull(b))\n      return false;\n    // an identical \"prototype\" property.\n    if (a.prototype !== b.prototype) return false;\n    //~~~I've managed to break Object.keys through screwy arguments passing.\n    //   Converting to array solves the problem.\n    if (isArguments(a)) {\n      if (!isArguments(b)) {\n        return false;\n      }\n      a = pSlice.call(a);\n      b = pSlice.call(b);\n      return expect.eql(a, b);\n    }\n    try{\n      var ka = keys(a),\n        kb = keys(b),\n        key, i;\n    } catch (e) {//happens when one is a string literal and the other isn't\n      return false;\n    }\n    // having the same number of owned properties (keys incorporates hasOwnProperty)\n    if (ka.length != kb.length)\n      return false;\n    //the same set of keys (although not necessarily the same order),\n    ka.sort();\n    kb.sort();\n    //~~~cheap key test\n    for (i = ka.length - 1; i >= 0; i--) {\n      if (ka[i] != kb[i])\n        return false;\n    }\n    //equivalent values for every corresponding key, and\n    //~~~possibly expensive deep test\n    for (i = ka.length - 1; i >= 0; i--) {\n      key = ka[i];\n      if (!expect.eql(a[key], b[key]))\n         return false;\n    }\n    return true;\n  }\n\n  var json = (function () {\n    \"use strict\";\n\n    if ('object' == typeof JSON && JSON.parse && JSON.stringify) {\n      return {\n          parse: nativeJSON.parse\n        , stringify: nativeJSON.stringify\n      }\n    }\n\n    var JSON = {};\n\n    function f(n) {\n        // Format integers to have at least two digits.\n        return n < 10 ? '0' + n : n;\n    }\n\n    function date(d, key) {\n      return isFinite(d.valueOf()) ?\n          d.getUTCFullYear()     + '-' +\n          f(d.getUTCMonth() + 1) + '-' +\n          f(d.getUTCDate())      + 'T' +\n          f(d.getUTCHours())     + ':' +\n          f(d.getUTCMinutes())   + ':' +\n          f(d.getUTCSeconds())   + 'Z' : null;\n    };\n\n    var cx = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,\n        escapable = /[\\\\\\\"\\x00-\\x1f\\x7f-\\x9f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,\n        gap,\n        indent,\n        meta = {    // table of character substitutions\n            '\\b': '\\\\b',\n            '\\t': '\\\\t',\n            '\\n': '\\\\n',\n            '\\f': '\\\\f',\n            '\\r': '\\\\r',\n            '\"' : '\\\\\"',\n            '\\\\': '\\\\\\\\'\n        },\n        rep;\n\n\n    function quote(string) {\n\n  // If the string contains no control characters, no quote characters, and no\n  // backslash characters, then we can safely slap some quotes around it.\n  // Otherwise we must also replace the offending characters with safe escape\n  // sequences.\n\n        escapable.lastIndex = 0;\n        return escapable.test(string) ? '\"' + string.replace(escapable, function (a) {\n            var c = meta[a];\n            return typeof c === 'string' ? c :\n                '\\\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);\n        }) + '\"' : '\"' + string + '\"';\n    }\n\n\n    function str(key, holder) {\n\n  // Produce a string from holder[key].\n\n        var i,          // The loop counter.\n            k,          // The member key.\n            v,          // The member value.\n            length,\n            mind = gap,\n            partial,\n            value = holder[key];\n\n  // If the value has a toJSON method, call it to obtain a replacement value.\n\n        if (value instanceof Date) {\n            value = date(key);\n        }\n\n  // If we were called with a replacer function, then call the replacer to\n  // obtain a replacement value.\n\n        if (typeof rep === 'function') {\n            value = rep.call(holder, key, value);\n        }\n\n  // What happens next depends on the value's type.\n\n        switch (typeof value) {\n        case 'string':\n            return quote(value);\n\n        case 'number':\n\n  // JSON numbers must be finite. Encode non-finite numbers as null.\n\n            return isFinite(value) ? String(value) : 'null';\n\n        case 'boolean':\n        case 'null':\n\n  // If the value is a boolean or null, convert it to a string. Note:\n  // typeof null does not produce 'null'. The case is included here in\n  // the remote chance that this gets fixed someday.\n\n            return String(value);\n\n  // If the type is 'object', we might be dealing with an object or an array or\n  // null.\n\n        case 'object':\n\n  // Due to a specification blunder in ECMAScript, typeof null is 'object',\n  // so watch out for that case.\n\n            if (!value) {\n                return 'null';\n            }\n\n  // Make an array to hold the partial results of stringifying this object value.\n\n            gap += indent;\n            partial = [];\n\n  // Is the value an array?\n\n            if (Object.prototype.toString.apply(value) === '[object Array]') {\n\n  // The value is an array. Stringify every element. Use null as a placeholder\n  // for non-JSON values.\n\n                length = value.length;\n                for (i = 0; i < length; i += 1) {\n                    partial[i] = str(i, value) || 'null';\n                }\n\n  // Join all of the elements together, separated with commas, and wrap them in\n  // brackets.\n\n                v = partial.length === 0 ? '[]' : gap ?\n                    '[\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + ']' :\n                    '[' + partial.join(',') + ']';\n                gap = mind;\n                return v;\n            }\n\n  // If the replacer is an array, use it to select the members to be stringified.\n\n            if (rep && typeof rep === 'object') {\n                length = rep.length;\n                for (i = 0; i < length; i += 1) {\n                    if (typeof rep[i] === 'string') {\n                        k = rep[i];\n                        v = str(k, value);\n                        if (v) {\n                            partial.push(quote(k) + (gap ? ': ' : ':') + v);\n                        }\n                    }\n                }\n            } else {\n\n  // Otherwise, iterate through all of the keys in the object.\n\n                for (k in value) {\n                    if (Object.prototype.hasOwnProperty.call(value, k)) {\n                        v = str(k, value);\n                        if (v) {\n                            partial.push(quote(k) + (gap ? ': ' : ':') + v);\n                        }\n                    }\n                }\n            }\n\n  // Join all of the member texts together, separated with commas,\n  // and wrap them in braces.\n\n            v = partial.length === 0 ? '{}' : gap ?\n                '{\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + '}' :\n                '{' + partial.join(',') + '}';\n            gap = mind;\n            return v;\n        }\n    }\n\n  // If the JSON object does not yet have a stringify method, give it one.\n\n    JSON.stringify = function (value, replacer, space) {\n\n  // The stringify method takes a value and an optional replacer, and an optional\n  // space parameter, and returns a JSON text. The replacer can be a function\n  // that can replace values, or an array of strings that will select the keys.\n  // A default replacer method can be provided. Use of the space parameter can\n  // produce text that is more easily readable.\n\n        var i;\n        gap = '';\n        indent = '';\n\n  // If the space parameter is a number, make an indent string containing that\n  // many spaces.\n\n        if (typeof space === 'number') {\n            for (i = 0; i < space; i += 1) {\n                indent += ' ';\n            }\n\n  // If the space parameter is a string, it will be used as the indent string.\n\n        } else if (typeof space === 'string') {\n            indent = space;\n        }\n\n  // If there is a replacer, it must be a function or an array.\n  // Otherwise, throw an error.\n\n        rep = replacer;\n        if (replacer && typeof replacer !== 'function' &&\n                (typeof replacer !== 'object' ||\n                typeof replacer.length !== 'number')) {\n            throw new Error('JSON.stringify');\n        }\n\n  // Make a fake root object containing our value under the key of ''.\n  // Return the result of stringifying the value.\n\n        return str('', {'': value});\n    };\n\n  // If the JSON object does not yet have a parse method, give it one.\n\n    JSON.parse = function (text, reviver) {\n    // The parse method takes a text and an optional reviver function, and returns\n    // a JavaScript value if the text is a valid JSON text.\n\n        var j;\n\n        function walk(holder, key) {\n\n    // The walk method is used to recursively walk the resulting structure so\n    // that modifications can be made.\n\n            var k, v, value = holder[key];\n            if (value && typeof value === 'object') {\n                for (k in value) {\n                    if (Object.prototype.hasOwnProperty.call(value, k)) {\n                        v = walk(value, k);\n                        if (v !== undefined) {\n                            value[k] = v;\n                        } else {\n                            delete value[k];\n                        }\n                    }\n                }\n            }\n            return reviver.call(holder, key, value);\n        }\n\n\n    // Parsing happens in four stages. In the first stage, we replace certain\n    // Unicode characters with escape sequences. JavaScript handles many characters\n    // incorrectly, either silently deleting them, or treating them as line endings.\n\n        text = String(text);\n        cx.lastIndex = 0;\n        if (cx.test(text)) {\n            text = text.replace(cx, function (a) {\n                return '\\\\u' +\n                    ('0000' + a.charCodeAt(0).toString(16)).slice(-4);\n            });\n        }\n\n    // In the second stage, we run the text against regular expressions that look\n    // for non-JSON patterns. We are especially concerned with '()' and 'new'\n    // because they can cause invocation, and '=' because it can cause mutation.\n    // But just to be safe, we want to reject all unexpected forms.\n\n    // We split the second stage into 4 regexp operations in order to work around\n    // crippling inefficiencies in IE's and Safari's regexp engines. First we\n    // replace the JSON backslash pairs with '@' (a non-JSON character). Second, we\n    // replace all simple value tokens with ']' characters. Third, we delete all\n    // open brackets that follow a colon or comma or that begin the text. Finally,\n    // we look to see that the remaining characters are only whitespace or ']' or\n    // ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.\n\n        if (/^[\\],:{}\\s]*$/\n                .test(text.replace(/\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')\n                    .replace(/\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g, ']')\n                    .replace(/(?:^|:|,)(?:\\s*\\[)+/g, ''))) {\n\n    // In the third stage we use the eval function to compile the text into a\n    // JavaScript structure. The '{' operator is subject to a syntactic ambiguity\n    // in JavaScript: it can begin a block or an object literal. We wrap the text\n    // in parens to eliminate the ambiguity.\n\n            j = eval('(' + text + ')');\n\n    // In the optional fourth stage, we recursively walk the new structure, passing\n    // each name/value pair to a reviver function for possible transformation.\n\n            return typeof reviver === 'function' ?\n                walk({'': j}, '') : j;\n        }\n\n    // If the text is not JSON parseable, then a SyntaxError is thrown.\n\n        throw new SyntaxError('JSON.parse');\n    };\n\n    return JSON;\n  })();\n\n  if ('undefined' != typeof window) {\n    window.expect = module.exports;\n  }\n\n})(\n    this\n  , 'undefined' != typeof module ? module : {}\n  , 'undefined' != typeof exports ? exports : {}\n);"
  },
  {
    "path": "test/vendor/jquery.js",
    "content": "/*! jQuery v@1.8.0 jquery.com | jquery.org/license */\n(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e=\"data-\"+c.replace(I,\"-$1\").toLowerCase();d=a.getAttribute(e);if(typeof d==\"string\"){try{d=d===\"true\"?!0:d===\"false\"?!1:d===\"null\"?null:+d+\"\"===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b===\"data\"&&p.isEmptyObject(a[b]))continue;if(b!==\"toJSON\")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b==\"string\"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split(\"|\"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d<e;d++)p.event.add(b,c,h[c][d])}g.data&&(g.data=p.extend({},g.data))}function bE(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c===\"object\"?(b.parentNode&&(b.outerHTML=a.outerHTML),p.support.html5Clone&&a.innerHTML&&!p.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):c===\"input\"&&bv.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):c===\"option\"?b.selected=a.defaultSelected:c===\"input\"||c===\"textarea\"?b.defaultValue=a.defaultValue:c===\"script\"&&b.text!==a.text&&(b.text=a.text),b.removeAttribute(p.expando)}function bF(a){return typeof a.getElementsByTagName!=\"undefined\"?a.getElementsByTagName(\"*\"):typeof a.querySelectorAll!=\"undefined\"?a.querySelectorAll(\"*\"):[]}function bG(a){bv.test(a.type)&&(a.defaultChecked=a.checked)}function bX(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=bV.length;while(e--){b=bV[e]+c;if(b in a)return b}return d}function bY(a,b){return a=b||a,p.css(a,\"display\")===\"none\"||!p.contains(a.ownerDocument,a)}function bZ(a,b){var c,d,e=[],f=0,g=a.length;for(;f<g;f++){c=a[f];if(!c.style)continue;e[f]=p._data(c,\"olddisplay\"),b?(!e[f]&&c.style.display===\"none\"&&(c.style.display=\"\"),c.style.display===\"\"&&bY(c)&&(e[f]=p._data(c,\"olddisplay\",cb(c.nodeName)))):(d=bH(c,\"display\"),!e[f]&&d!==\"none\"&&p._data(c,\"olddisplay\",d))}for(f=0;f<g;f++){c=a[f];if(!c.style)continue;if(!b||c.style.display===\"none\"||c.style.display===\"\")c.style.display=b?e[f]||\"\":\"none\"}return a}function b$(a,b,c){var d=bO.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||\"px\"):b}function b_(a,b,c,d){var e=c===(d?\"border\":\"content\")?4:b===\"width\"?1:0,f=0;for(;e<4;e+=2)c===\"margin\"&&(f+=p.css(a,c+bU[e],!0)),d?(c===\"content\"&&(f-=parseFloat(bH(a,\"padding\"+bU[e]))||0),c!==\"margin\"&&(f-=parseFloat(bH(a,\"border\"+bU[e]+\"Width\"))||0)):(f+=parseFloat(bH(a,\"padding\"+bU[e]))||0,c!==\"padding\"&&(f+=parseFloat(bH(a,\"border\"+bU[e]+\"Width\"))||0));return f}function ca(a,b,c){var d=b===\"width\"?a.offsetWidth:a.offsetHeight,e=!0,f=p.support.boxSizing&&p.css(a,\"boxSizing\")===\"border-box\";if(d<=0){d=bH(a,b);if(d<0||d==null)d=a.style[b];if(bP.test(d))return d;e=f&&(p.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return d+b_(a,b,c||(f?\"border\":\"content\"),e)+\"px\"}function cb(a){if(bR[a])return bR[a];var b=p(\"<\"+a+\">\").appendTo(e.body),c=b.css(\"display\");b.remove();if(c===\"none\"||c===\"\"){bI=e.body.appendChild(bI||p.extend(e.createElement(\"iframe\"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write(\"<!doctype html><html><body>\"),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,\"display\"),e.body.removeChild(bI)}return bR[a]=c,c}function ch(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||cd.test(a)?d(a,e):ch(a+\"[\"+(typeof e==\"object\"?b:\"\")+\"]\",e,c,d)});else if(!c&&p.type(b)===\"object\")for(e in b)ch(a+\"[\"+e+\"]\",b[e],c,d);else d(a,b)}function cy(a){return function(b,c){typeof b!=\"string\"&&(c=b,b=\"*\");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h<i;h++)d=g[h],f=/^\\+/.test(d),f&&(d=d.substr(1)||\"*\"),e=a[d]=a[d]||[],e[f?\"unshift\":\"push\"](c)}}function cz(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h,i=a[f],j=0,k=i?i.length:0,l=a===cu;for(;j<k&&(l||!h);j++)h=i[j](c,d,e),typeof h==\"string\"&&(!l||g[h]?h=b:(c.dataTypes.unshift(h),h=cz(a,c,d,e,h,g)));return(l||!h)&&!g[\"*\"]&&(h=cz(a,c,d,e,\"*\",g)),h}function cA(a,c){var d,e,f=p.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((f[d]?a:e||(e={}))[d]=c[d]);e&&p.extend(!0,a,e)}function cB(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(f in k)f in d&&(c[k[f]]=d[f]);while(j[0]===\"*\")j.shift(),e===b&&(e=a.mimeType||c.getResponseHeader(\"content-type\"));if(e)for(f in i)if(i[f]&&i[f].test(e)){j.unshift(f);break}if(j[0]in d)g=j[0];else{for(f in d){if(!j[0]||a.converters[f+\" \"+j[0]]){g=f;break}h||(h=f)}g=g||h}if(g)return g!==j[0]&&j.unshift(g),d[g]}function cC(a,b){var c,d,e,f,g=a.dataTypes.slice(),h=g[0],i={},j=0;a.dataFilter&&(b=a.dataFilter(b,a.dataType));if(g[1])for(c in a.converters)i[c.toLowerCase()]=a.converters[c];for(;e=g[++j];)if(e!==\"*\"){if(h!==\"*\"&&h!==e){c=i[h+\" \"+e]||i[\"* \"+e];if(!c)for(d in i){f=d.split(\" \");if(f[1]===e){c=i[h+\" \"+f[0]]||i[\"* \"+f[0]];if(c){c===!0?c=i[d]:i[d]!==!0&&(e=f[0],g.splice(j--,0,e));break}}}if(c!==!0)if(c&&a[\"throws\"])b=c(b);else try{b=c(b)}catch(k){return{state:\"parsererror\",error:c?k:\"No conversion from \"+h+\" to \"+e}}}h=e}return{state:\"success\",data:b}}function cK(){try{return new a.XMLHttpRequest}catch(b){}}function cL(){try{return new a.ActiveXObject(\"Microsoft.XMLHTTP\")}catch(b){}}function cT(){return setTimeout(function(){cM=b},0),cM=p.now()}function cU(a,b){p.each(b,function(b,c){var d=(cS[b]||[]).concat(cS[\"*\"]),e=0,f=d.length;for(;e<f;e++)if(d[e].call(a,b,c))return})}function cV(a,b,c){var d,e=0,f=0,g=cR.length,h=p.Deferred().always(function(){delete i.elem}),i=function(){var b=cM||cT(),c=Math.max(0,j.startTime+j.duration-b),d=1-(c/j.duration||0),e=0,f=j.tweens.length;for(;e<f;e++)j.tweens[e].run(d);return h.notifyWith(a,[j,d,c]),d<1&&f?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:p.extend({},b),opts:p.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:cM||cT(),duration:c.duration,tweens:[],createTween:function(b,c,d){var e=p.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(e),e},stop:function(b){var c=0,d=b?j.tweens.length:0;for(;c<d;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;cW(k,j.opts.specialEasing);for(;e<g;e++){d=cR[e].call(j,a,k,j.opts);if(d)return d}return cU(j,k),p.isFunction(j.opts.start)&&j.opts.start.call(a,j),p.fx.timer(p.extend(i,{anim:j,queue:j.opts.queue,elem:a})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function cW(a,b){var c,d,e,f,g;for(c in a){d=p.camelCase(c),e=b[d],f=a[c],p.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=p.cssHooks[d];if(g&&\"expand\"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}}function cX(a,b,c){var d,e,f,g,h,i,j,k,l=this,m=a.style,n={},o=[],q=a.nodeType&&bY(a);c.queue||(j=p._queueHooks(a,\"fx\"),j.unqueued==null&&(j.unqueued=0,k=j.empty.fire,j.empty.fire=function(){j.unqueued||k()}),j.unqueued++,l.always(function(){l.always(function(){j.unqueued--,p.queue(a,\"fx\").length||j.empty.fire()})})),a.nodeType===1&&(\"height\"in b||\"width\"in b)&&(c.overflow=[m.overflow,m.overflowX,m.overflowY],p.css(a,\"display\")===\"inline\"&&p.css(a,\"float\")===\"none\"&&(!p.support.inlineBlockNeedsLayout||cb(a.nodeName)===\"inline\"?m.display=\"inline-block\":m.zoom=1)),c.overflow&&(m.overflow=\"hidden\",p.support.shrinkWrapBlocks||l.done(function(){m.overflow=c.overflow[0],m.overflowX=c.overflow[1],m.overflowY=c.overflow[2]}));for(d in b){f=b[d];if(cO.exec(f)){delete b[d];if(f===(q?\"hide\":\"show\"))continue;o.push(d)}}g=o.length;if(g){h=p._data(a,\"fxshow\")||p._data(a,\"fxshow\",{}),q?p(a).show():l.done(function(){p(a).hide()}),l.done(function(){var b;p.removeData(a,\"fxshow\",!0);for(b in n)p.style(a,b,n[b])});for(d=0;d<g;d++)e=o[d],i=l.createTween(e,q?h[e]:0),n[e]=h[e]||p.style(a,e),e in h||(h[e]=i.start,q&&(i.end=i.start,i.start=e===\"width\"||e===\"height\"?1:0))}}function cY(a,b,c,d,e){return new cY.prototype.init(a,b,c,d,e)}function cZ(a,b){var c,d={height:a},e=0;for(;e<4;e+=2-b)c=bU[e],d[\"margin\"+c]=d[\"padding\"+c]=a;return b&&(d.opacity=d.width=a),d}function c_(a){return p.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c,d,e=a.document,f=a.location,g=a.navigator,h=a.jQuery,i=a.$,j=Array.prototype.push,k=Array.prototype.slice,l=Array.prototype.indexOf,m=Object.prototype.toString,n=Object.prototype.hasOwnProperty,o=String.prototype.trim,p=function(a,b){return new p.fn.init(a,b,c)},q=/[\\-+]?(?:\\d*\\.|)\\d+(?:[eE][\\-+]?\\d+|)/.source,r=/\\S/,s=/\\s+/,t=r.test(\"Â \")?/^[\\s\\xA0]+|[\\s\\xA0]+$/g:/^\\s+|\\s+$/g,u=/^(?:[^#<]*(<[\\w\\W]+>)[^>]*$|#([\\w\\-]*)$)/,v=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,w=/^[\\],:{}\\s]*$/,x=/(?:^|:|,)(?:\\s*\\[)+/g,y=/\\\\(?:[\"\\\\\\/bfnrt]|u[\\da-fA-F]{4})/g,z=/\"[^\"\\\\\\r\\n]*\"|true|false|null|-?(?:\\d\\d*\\.|)\\d+(?:[eE][\\-+]?\\d+|)/g,A=/^-ms-/,B=/-([\\da-z])/gi,C=function(a,b){return(b+\"\").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener(\"DOMContentLoaded\",D,!1),p.ready()):e.readyState===\"complete\"&&(e.detachEvent(\"onreadystatechange\",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a==\"string\"){a.charAt(0)===\"<\"&&a.charAt(a.length-1)===\">\"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:\"\",jquery:\"1.8.0\",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b===\"find\"?d.selector=this.selector+(this.selector?\" \":\"\")+c:b&&(d.selector=this.selector+\".\"+b+\"(\"+c+\")\"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),\"slice\",k.call(arguments).join(\",\"))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h==\"boolean\"&&(k=h,h=arguments[1]||{},i=2),typeof h!=\"object\"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i<j;i++)if((a=arguments[i])!=null)for(c in a){d=h[c],e=a[c];if(h===e)continue;k&&e&&(p.isPlainObject(e)||(f=p.isArray(e)))?(f?(f=!1,g=d&&p.isArray(d)?d:[]):g=d&&p.isPlainObject(d)?d:{},h[c]=p.extend(k,g,e)):e!==b&&(h[c]=e)}return h},p.extend({noConflict:function(b){return a.$===p&&(a.$=i),b&&a.jQuery===p&&(a.jQuery=h),p},isReady:!1,readyWait:1,holdReady:function(a){a?p.readyWait++:p.ready(!0)},ready:function(a){if(a===!0?--p.readyWait:p.isReady)return;if(!e.body)return setTimeout(p.ready,1);p.isReady=!0;if(a!==!0&&--p.readyWait>0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger(\"ready\").off(\"ready\")},isFunction:function(a){return p.type(a)===\"function\"},isArray:Array.isArray||function(a){return p.type(a)===\"array\"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||\"object\"},isPlainObject:function(a){if(!a||p.type(a)!==\"object\"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,\"constructor\")&&!n.call(a.constructor.prototype,\"isPrototypeOf\"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!=\"string\"?null:(typeof b==\"boolean\"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!=\"string\")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,\"@\").replace(z,\"]\").replace(x,\"\")))return(new Function(\"return \"+b))();p.error(\"Invalid JSON: \"+b)},parseXML:function(c){var d,e;if(!c||typeof c!=\"string\")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,\"text/xml\")):(d=new ActiveXObject(\"Microsoft.XMLDOM\"),d.async=\"false\",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName(\"parsererror\").length)&&p.error(\"Invalid XML: \"+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,\"ms-\").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f<g;)if(c.apply(a[f++],d)===!1)break}else if(h){for(e in a)if(c.call(a[e],e,a[e])===!1)break}else for(;f<g;)if(c.call(a[f],f,a[f++])===!1)break;return a},trim:o?function(a){return a==null?\"\":o.call(a)}:function(a){return a==null?\"\":a.toString().replace(t,\"\")},makeArray:function(a,b){var c,d=b||[];return a!=null&&(c=p.type(a),a.length==null||c===\"string\"||c===\"function\"||c===\"regexp\"||p.isWindow(a)?j.call(d,a):p.merge(d,a)),d},inArray:function(a,b,c){var d;if(b){if(l)return l.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=c.length,e=a.length,f=0;if(typeof d==\"number\")for(;f<d;f++)a[e++]=c[f];else while(c[f]!==b)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;c=!!c;for(;f<g;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,c,d){var e,f,g=[],h=0,i=a.length,j=a instanceof p||i!==b&&typeof i==\"number\"&&(i>0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h<i;h++)e=c(a[h],h,d),e!=null&&(g[g.length]=e);else for(f in a)e=c(a[f],f,d),e!=null&&(g[g.length]=e);return g.concat.apply([],g)},guid:1,proxy:function(a,c){var d,e,f;return typeof c==\"string\"&&(d=a[c],c=a,a=d),p.isFunction(a)?(e=k.call(arguments,2),f=function(){return a.apply(c,e.concat(k.call(arguments)))},f.guid=a.guid=a.guid||f.guid||p.guid++,f):b},access:function(a,c,d,e,f,g,h){var i,j=d==null,k=0,l=a.length;if(d&&typeof d==\"object\"){for(k in d)p.access(a,c,k,d[k],1,g,e);f=1}else if(e!==b){i=h===b&&p.isFunction(e),j&&(i?(i=c,c=function(a,b,c){return i.call(p(a),c)}):(c.call(a,e),c=null));if(c)for(;k<l;k++)c(a[k],d,i?e.call(a[k],k,c(a[k],d)):e,h);f=1}return f?a:j?c.call(a):l?c(a[0],d):g},now:function(){return(new Date).getTime()}}),p.ready.promise=function(b){if(!d){d=p.Deferred();if(e.readyState===\"complete\"||e.readyState!==\"loading\"&&e.addEventListener)setTimeout(p.ready,1);else if(e.addEventListener)e.addEventListener(\"DOMContentLoaded\",D,!1),a.addEventListener(\"load\",p.ready,!1);else{e.attachEvent(\"onreadystatechange\",D),a.attachEvent(\"onload\",p.ready);var c=!1;try{c=a.frameElement==null&&e.documentElement}catch(f){}c&&c.doScroll&&function g(){if(!p.isReady){try{c.doScroll(\"left\")}catch(a){return setTimeout(g,50)}p.ready()}}()}}return d.promise(b)},p.each(\"Boolean Number String Function Array Date RegExp Object\".split(\" \"),function(a,b){E[\"[object \"+b+\"]\"]=b.toLowerCase()}),c=p(e);var F={};p.Callbacks=function(a){a=typeof a==\"string\"?F[a]||G(a):p.extend({},a);var c,d,e,f,g,h,i=[],j=!a.once&&[],k=function(b){c=a.memory&&b,d=!0,h=f||0,f=0,g=i.length,e=!0;for(;i&&h<g;h++)if(i[h].apply(b[0],b[1])===!1&&a.stopOnFalse){c=!1;break}e=!1,i&&(j?j.length&&k(j.shift()):c?i=[]:l.disable())},l={add:function(){if(i){var b=i.length;(function d(b){p.each(b,function(b,c){p.isFunction(c)&&(!a.unique||!l.has(c))?i.push(c):c&&c.length&&d(c)})})(arguments),e?g=i.length:c&&(f=b,k(c))}return this},remove:function(){return i&&p.each(arguments,function(a,b){var c;while((c=p.inArray(b,i,c))>-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[[\"resolve\",\"done\",p.Callbacks(\"once memory\"),\"resolved\"],[\"reject\",\"fail\",p.Callbacks(\"once memory\"),\"rejected\"],[\"notify\",\"progress\",p.Callbacks(\"memory\")]],c=\"pending\",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+\"With\"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return typeof a==\"object\"?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+\"With\"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b<d;b++)c[b]&&p.isFunction(c[b].promise)?c[b].promise().done(g(b,j,c)).fail(f.reject).progress(g(b,i,h)):--e}return e||f.resolveWith(j,c),f.promise()}}),p.support=function(){var b,c,d,f,g,h,i,j,k,l,m,n=e.createElement(\"div\");n.setAttribute(\"className\",\"t\"),n.innerHTML=\"  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>\",c=n.getElementsByTagName(\"*\"),d=n.getElementsByTagName(\"a\")[0],d.style.cssText=\"top:1px;float:left;opacity:.5\";if(!c||!c.length||!d)return{};f=e.createElement(\"select\"),g=f.appendChild(e.createElement(\"option\")),h=n.getElementsByTagName(\"input\")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName(\"tbody\").length,htmlSerialize:!!n.getElementsByTagName(\"link\").length,style:/top/.test(d.getAttribute(\"style\")),hrefNormalized:d.getAttribute(\"href\")===\"/a\",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value===\"on\",optSelected:g.selected,getSetAttribute:n.className!==\"t\",enctype:!!e.createElement(\"form\").enctype,html5Clone:e.createElement(\"nav\").cloneNode(!0).outerHTML!==\"<:nav></:nav>\",boxModel:e.compatMode===\"CSS1Compat\",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent(\"onclick\",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent(\"onclick\"),n.detachEvent(\"onclick\",m)),h=e.createElement(\"input\"),h.value=\"t\",h.setAttribute(\"type\",\"radio\"),b.radioValue=h.value===\"t\",h.setAttribute(\"checked\",\"checked\"),h.setAttribute(\"name\",\"t\"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j=\"on\"+k,l=j in n,l||(n.setAttribute(j,\"return;\"),l=typeof n[j]==\"function\"),b[k+\"Bubbles\"]=l;return p(function(){var c,d,f,g,h=\"padding:0;margin:0;border:0;display:block;overflow:hidden;\",i=e.getElementsByTagName(\"body\")[0];if(!i)return;c=e.createElement(\"div\"),c.style.cssText=\"visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px\",i.insertBefore(c,i.firstChild),d=e.createElement(\"div\"),c.appendChild(d),d.innerHTML=\"<table><tr><td></td><td>t</td></tr></table>\",f=d.getElementsByTagName(\"td\"),f[0].style.cssText=\"padding:0;margin:0;border:0;display:none\",l=f[0].offsetHeight===0,f[0].style.display=\"\",f[1].style.display=\"none\",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML=\"\",d.style.cssText=\"box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;\",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!==\"1%\",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:\"4px\"}).width===\"4px\",g=e.createElement(\"div\"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width=\"0\",d.style.width=\"1px\",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!=\"undefined\"&&(d.innerHTML=\"\",d.style.cssText=h+\"width:1px;padding:1px;display:inline;zoom:1\",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display=\"block\",d.style.overflow=\"visible\",d.innerHTML=\"<div></div>\",d.firstChild.style.width=\"5px\",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/^(?:\\{.*\\}|\\[.*\\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:\"jQuery\"+(p.fn.jquery+Math.random()).replace(/\\D/g,\"\"),noData:{embed:!0,object:\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c==\"string\",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||++p.uuid:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c==\"object\"||typeof c==\"function\")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(\" \")));for(e=0,f=b.length;e<f;e++)delete d[b[e]];if(!(c?K:p.isEmptyObject)(d))return}}if(!c){delete h[i].data;if(!K(h[i]))return}g?p.cleanData([a],!0):p.support.deleteExpando||h!=h.window?delete h[i]:h[i]=null},_data:function(a,b,c){return p.data(a,b,c,!0)},acceptData:function(a){var b=a.nodeName&&p.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute(\"classid\")===b}}),p.fn.extend({data:function(a,c){var d,e,f,g,h,i=this[0],j=0,k=null;if(a===b){if(this.length){k=p.data(i);if(i.nodeType===1&&!p._data(i,\"parsedAttrs\")){f=i.attributes;for(h=f.length;j<h;j++)g=f[j].name,g.indexOf(\"data-\")===0&&(g=p.camelCase(g.substring(5)),J(i,g,k[g]));p._data(i,\"parsedAttrs\",!0)}}return k}return typeof a==\"object\"?this.each(function(){p.data(this,a)}):(d=a.split(\".\",2),d[1]=d[1]?\".\"+d[1]:\"\",e=d[1]+\"!\",p.access(this,function(c){if(c===b)return k=this.triggerHandler(\"getData\"+e,[d[0]]),k===b&&i&&(k=p.data(i,a),k=J(i,a,k)),k===b&&d[1]?this.data(d[0]):k;d[1]=c,this.each(function(){var b=p(this);b.triggerHandler(\"setData\"+e,d),p.data(this,a,c),b.triggerHandler(\"changeData\"+e,d)})},null,c,arguments.length>1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||\"fx\")+\"queue\",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||\"fx\";var c=p.queue(a,b),d=c.shift(),e=p._queueHooks(a,b),f=function(){p.dequeue(a,b)};d===\"inprogress\"&&(d=c.shift()),d&&(b===\"fx\"&&c.unshift(\"inprogress\"),delete e.stop,d.call(a,f,e)),!c.length&&e&&e.empty.fire()},_queueHooks:function(a,b){var c=b+\"queueHooks\";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks(\"once memory\").add(function(){p.removeData(a,b+\"queue\",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!=\"string\"&&(c=a,a=\"fx\",d--),arguments.length<d?p.queue(this[0],a):c===b?this:this.each(function(){var b=p.queue(this,a,c);p._queueHooks(this,a),a===\"fx\"&&b[0]!==\"inprogress\"&&p.dequeue(this,a)})},dequeue:function(a){return this.each(function(){p.dequeue(this,a)})},delay:function(a,b){return a=p.fx?p.fx.speeds[a]||a:a,b=b||\"fx\",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||\"fx\",[])},promise:function(a,c){var d,e=1,f=p.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};typeof a!=\"string\"&&(c=a,a=b),a=a||\"fx\";while(h--)(d=p._data(g[h],a+\"queueHooks\"))&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var L,M,N,O=/[\\t\\r\\n]/g,P=/\\r/g,Q=/^(?:button|input)$/i,R=/^(?:button|input|object|select|textarea)$/i,S=/^a(?:rea|)$/i,T=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,U=p.support.getSetAttribute;p.fn.extend({attr:function(a,b){return p.access(this,p.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a==\"string\"){b=a.split(s);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{f=\" \"+e.className+\" \";for(g=0,h=b.length;g<h;g++)~f.indexOf(\" \"+b[g]+\" \")||(f+=b[g]+\" \");e.className=p.trim(f)}}}return this},removeClass:function(a){var c,d,e,f,g,h,i;if(p.isFunction(a))return this.each(function(b){p(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a==\"string\"||a===b){c=(a||\"\").split(s);for(h=0,i=this.length;h<i;h++){e=this[h];if(e.nodeType===1&&e.className){d=(\" \"+e.className+\" \").replace(O,\" \");for(f=0,g=c.length;f<g;f++)while(d.indexOf(\" \"+c[f]+\" \")>-1)d=d.replace(\" \"+c[f]+\" \",\" \");e.className=a?p.trim(d):\"\"}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b==\"boolean\";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c===\"string\"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?\"addClass\":\"removeClass\"](e)}else if(c===\"undefined\"||c===\"boolean\")this.className&&p._data(this,\"__className__\",this.className),this.className=this.className||a===!1?\"\":p._data(this,\"__className__\")||\"\"})},hasClass:function(a){var b=\" \"+a+\" \",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(\" \"+this[c].className+\" \").replace(O,\" \").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&\"get\"in c&&(d=c.get(f,\"value\"))!==b?d:(d=f.value,typeof d==\"string\"?d.replace(P,\"\"):d==null?\"\":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f=\"\":typeof f==\"number\"?f+=\"\":p.isArray(f)&&(f=p.map(f,function(a){return a==null?\"\":a+\"\"})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!(\"set\"in c)||c.set(this,f,\"value\")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type===\"select-one\";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c<d;c++){e=h[c];if(e.selected&&(p.support.optDisabled?!e.disabled:e.getAttribute(\"disabled\")===null)&&(!e.parentNode.disabled||!p.nodeName(e.parentNode,\"optgroup\"))){b=p(e).val();if(i)return b;g.push(b)}}return i&&!g.length&&h.length?p(h[f]).val():g},set:function(a,b){var c=p.makeArray(b);return p(a).find(\"option\").each(function(){this.selected=p.inArray(p(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute==\"undefined\")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&\"set\"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,\"\"+d),d)}return g&&\"get\"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g<d.length;g++)e=d[g],e&&(c=p.propFix[e]||e,f=T.test(e),f||p.attr(a,e,\"\"),a.removeAttribute(U?e:c),f&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(Q.test(a.nodeName)&&a.parentNode)p.error(\"type property can't be changed\");else if(!p.support.radioValue&&b===\"radio\"&&p.nodeName(a,\"input\")){var c=a.value;return a.setAttribute(\"type\",b),c&&(a.value=c),b}}},value:{get:function(a,b){return L&&p.nodeName(a,\"button\")?L.get(a,b):b in a?a.value:null},set:function(a,b,c){if(L&&p.nodeName(a,\"button\"))return L.set(a,b,c);a.value=b}}},propFix:{tabindex:\"tabIndex\",readonly:\"readOnly\",\"for\":\"htmlFor\",\"class\":\"className\",maxlength:\"maxLength\",cellspacing:\"cellSpacing\",cellpadding:\"cellPadding\",rowspan:\"rowSpan\",colspan:\"colSpan\",usemap:\"useMap\",frameborder:\"frameBorder\",contenteditable:\"contentEditable\"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(!a||h===3||h===8||h===2)return;return g=h!==1||!p.isXMLDoc(a),g&&(c=p.propFix[c]||c,f=p.propHooks[c]),d!==b?f&&\"set\"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&\"get\"in f&&(e=f.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode(\"tabindex\");return c&&c.specified?parseInt(c.value,10):R.test(a.nodeName)||S.test(a.nodeName)&&a.href?0:b}}}}),M={get:function(a,c){var d,e=p.prop(a,c);return e===!0||typeof e!=\"boolean\"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?p.removeAttr(a,c):(d=p.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},U||(N={name:!0,id:!0,coords:!0},L=p.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(N[c]?d.value!==\"\":d.specified)?d.value:b},set:function(a,b,c){var d=a.getAttributeNode(c);return d||(d=e.createAttribute(c),a.setAttributeNode(d)),d.value=b+\"\"}},p.each([\"width\",\"height\"],function(a,b){p.attrHooks[b]=p.extend(p.attrHooks[b],{set:function(a,c){if(c===\"\")return a.setAttribute(b,\"auto\"),c}})}),p.attrHooks.contenteditable={get:L.get,set:function(a,b,c){b===\"\"&&(b=\"false\"),L.set(a,b,c)}}),p.support.hrefNormalized||p.each([\"href\",\"src\",\"width\",\"height\"],function(a,c){p.attrHooks[c]=p.extend(p.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),p.support.style||(p.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=\"\"+b}}),p.support.optSelected||(p.propHooks.selected=p.extend(p.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),p.support.enctype||(p.propFix.enctype=\"encoding\"),p.support.checkOn||p.each([\"radio\",\"checkbox\"],function(){p.valHooks[this]={get:function(a){return a.getAttribute(\"value\")===null?\"on\":a.value}}}),p.each([\"radio\",\"checkbox\"],function(){p.valHooks[this]=p.extend(p.valHooks[this],{set:function(a,b){if(p.isArray(b))return a.checked=p.inArray(p(a).val(),b)>=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\\.]*|)(?:\\.(.+)|)$/,X=/(?:^|\\s)hover(\\.\\S+|)\\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,\"mouseenter$1 mouseleave$1\")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!=\"undefined\"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(\" \");for(j=0;j<c.length;j++){k=W.exec(c[j])||[],l=k[1],m=(k[2]||\"\").split(\".\").sort(),r=p.event.special[l]||{},l=(f?r.delegateType:r.bindType)||l,r=p.event.special[l]||{},n=p.extend({type:l,origType:k[1],data:e,handler:d,guid:d.guid,selector:f,namespace:m.join(\".\")},o),q=i[l];if(!q){q=i[l]=[],q.delegateCount=0;if(!r.setup||r.setup.call(a,e,m,h)===!1)a.addEventListener?a.addEventListener(l,h,!1):a.attachEvent&&a.attachEvent(\"on\"+l,h)}r.add&&(r.add.call(a,n),n.handler.guid||(n.handler.guid=d.guid)),f?q.splice(q.delegateCount++,0,n):q.push(n),p.event.global[l]=!0}a=null},global:{},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,q,r=p.hasData(a)&&p._data(a);if(!r||!(m=r.events))return;b=p.trim(_(b||\"\")).split(\" \");for(f=0;f<b.length;f++){g=W.exec(b[f])||[],h=i=g[1],j=g[2];if(!h){for(h in m)p.event.remove(a,h+b[f],c,d,!0);continue}n=p.event.special[h]||{},h=(d?n.delegateType:n.bindType)||h,o=m[h]||[],k=o.length,j=j?new RegExp(\"(^|\\\\.)\"+j.split(\".\").sort().join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null;for(l=0;l<o.length;l++)q=o[l],(e||i===q.origType)&&(!c||c.guid===q.guid)&&(!j||j.test(q.namespace))&&(!d||d===q.selector||d===\"**\"&&q.selector)&&(o.splice(l--,1),q.selector&&o.delegateCount--,n.remove&&n.remove.call(a,q));o.length===0&&k!==o.length&&((!n.teardown||n.teardown.call(a,j,r.handle)===!1)&&p.removeEvent(a,h,r.handle),delete m[h])}p.isEmptyObject(m)&&(delete r.handle,p.removeData(a,\"events\",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,f,g){if(!f||f.nodeType!==3&&f.nodeType!==8){var h,i,j,k,l,m,n,o,q,r,s=c.type||c,t=[];if($.test(s+p.event.triggered))return;s.indexOf(\"!\")>=0&&(s=s.slice(0,-1),i=!0),s.indexOf(\".\")>=0&&(t=s.split(\".\"),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c==\"object\"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join(\".\"),c.namespace_re=c.namespace?new RegExp(\"(^|\\\\.)\"+t.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null,m=s.indexOf(\":\")<0?\"on\"+s:\"\";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j<q.length&&!c.isPropagationStopped();j++)k=q[j][0],c.type=q[j][1],o=(p._data(k,\"events\")||{})[c.type]&&p._data(k,\"handle\"),o&&o.apply(k,d),o=m&&k[m],o&&p.acceptData(k)&&o.apply(k,d)===!1&&c.preventDefault();return c.type=s,!g&&!c.isDefaultPrevented()&&(!n._default||n._default.apply(f.ownerDocument,d)===!1)&&(s!==\"click\"||!p.nodeName(f,\"a\"))&&p.acceptData(f)&&m&&f[s]&&(s!==\"focus\"&&s!==\"blur\"||c.target.offsetWidth!==0)&&!p.isWindow(f)&&(l=f[m],l&&(f[m]=null),p.event.triggered=s,f[s](),p.event.triggered=b,l&&(f[m]=l)),c.result}return},dispatch:function(c){c=p.event.fix(c||a.event);var d,e,f,g,h,i,j,k,l,m,n,o=(p._data(this,\"events\")||{})[c.type]||[],q=o.delegateCount,r=[].slice.call(arguments),s=!c.exclusive&&!c.namespace,t=p.event.special[c.type]||{},u=[];r[0]=c,c.delegateTarget=this;if(t.preDispatch&&t.preDispatch.call(this,c)===!1)return;if(q&&(!c.button||c.type!==\"click\")){g=p(this),g.context=this;for(f=c.target;f!=this;f=f.parentNode||this)if(f.disabled!==!0||c.type!==\"click\"){i={},k=[],g[0]=f;for(d=0;d<q;d++)l=o[d],m=l.selector,i[m]===b&&(i[m]=g.is(m)),i[m]&&k.push(l);k.length&&u.push({elem:f,matches:k})}}o.length>q&&u.push({elem:this,matches:o.slice(q)});for(d=0;d<u.length&&!c.isPropagationStopped();d++){j=u[d],c.currentTarget=j.elem;for(e=0;e<j.matches.length&&!c.isImmediatePropagationStopped();e++){l=j.matches[e];if(s||!c.namespace&&!l.namespace||c.namespace_re&&c.namespace_re.test(l.namespace))c.data=l.data,c.handleObj=l,h=((p.event.special[l.origType]||{}).handle||l.handler).apply(j.elem,r),h!==b&&(c.result=h,h===!1&&(c.preventDefault(),c.stopPropagation()))}}return t.postDispatch&&t.postDispatch.call(this,c),c.result},props:\"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which\".split(\" \"),fixHooks:{},keyHooks:{props:\"char charCode key keyCode\".split(\" \"),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:\"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement\".split(\" \"),filter:function(a,c){var d,f,g,h=c.button,i=c.fromElement;return a.pageX==null&&c.clientX!=null&&(d=a.target.ownerDocument||e,f=d.documentElement,g=d.body,a.pageX=c.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=c.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?c.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[p.expando])return a;var b,c,d=a,f=p.event.fixHooks[a.type]||{},g=f.props?this.props.concat(f.props):this.props;a=p.Event(d);for(b=g.length;b;)c=g[--b],a[c]=d[c];return a.target||(a.target=d.srcElement||e),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,f.filter?f.filter(a,d):a},special:{ready:{setup:p.bindReady},load:{noBubble:!0},focus:{delegateType:\"focusin\"},blur:{delegateType:\"focusout\"},beforeunload:{setup:function(a,b,c){p.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=p.extend(new p.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?p.event.trigger(e,null,b):p.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},p.event.handle=p.event.dispatch,p.removeEvent=e.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d=\"on\"+b;a.detachEvent&&(typeof a[d]==\"undefined\"&&(a[d]=null),a.detachEvent(d,c))},p.Event=function(a,b){if(this instanceof p.Event)a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?bb:ba):this.type=a,b&&p.extend(this,b),this.timeStamp=a&&a.timeStamp||p.now(),this[p.expando]=!0;else return new p.Event(a,b)},p.Event.prototype={preventDefault:function(){this.isDefaultPrevented=bb;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=bb;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()},isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba},p.each({mouseenter:\"mouseover\",mouseleave:\"mouseout\"},function(a,b){p.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj,g=f.selector;if(!e||e!==d&&!p.contains(d,e))a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b;return c}}}),p.support.submitBubbles||(p.event.special.submit={setup:function(){if(p.nodeName(this,\"form\"))return!1;p.event.add(this,\"click._submit keypress._submit\",function(a){var c=a.target,d=p.nodeName(c,\"input\")||p.nodeName(c,\"button\")?c.form:b;d&&!p._data(d,\"_submit_attached\")&&(p.event.add(d,\"submit._submit\",function(a){a._submit_bubble=!0}),p._data(d,\"_submit_attached\",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&p.event.simulate(\"submit\",this.parentNode,a,!0))},teardown:function(){if(p.nodeName(this,\"form\"))return!1;p.event.remove(this,\"._submit\")}}),p.support.changeBubbles||(p.event.special.change={setup:function(){if(V.test(this.nodeName)){if(this.type===\"checkbox\"||this.type===\"radio\")p.event.add(this,\"propertychange._change\",function(a){a.originalEvent.propertyName===\"checked\"&&(this._just_changed=!0)}),p.event.add(this,\"click._change\",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),p.event.simulate(\"change\",this,a,!0)});return!1}p.event.add(this,\"beforeactivate._change\",function(a){var b=a.target;V.test(b.nodeName)&&!p._data(b,\"_change_attached\")&&(p.event.add(b,\"change._change\",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&p.event.simulate(\"change\",this.parentNode,a,!0)}),p._data(b,\"_change_attached\",!0))})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!==\"radio\"&&b.type!==\"checkbox\")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return p.event.remove(this,\"._change\"),V.test(this.nodeName)}}),p.support.focusinBubbles||p.each({focus:\"focusin\",blur:\"focusout\"},function(a,b){var c=0,d=function(a){p.event.simulate(b,a.target,p.event.fix(a),!0)};p.event.special[b]={setup:function(){c++===0&&e.addEventListener(a,d,!0)},teardown:function(){--c===0&&e.removeEventListener(a,d,!0)}}}),p.fn.extend({on:function(a,c,d,e,f){var g,h;if(typeof a==\"object\"){typeof c!=\"string\"&&(d=d||c,c=b);for(h in a)this.on(h,c,d,a[h],f);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c==\"string\"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=ba;else if(!e)return this;return f===1&&(g=e,e=function(a){return p().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=p.guid++)),this.each(function(){p.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,p(a.delegateTarget).off(e.namespace?e.origType+\".\"+e.namespace:e.origType,e.selector,e.handler),this;if(typeof a==\"object\"){for(f in a)this.off(f,c,a[f]);return this}if(c===!1||typeof c==\"function\")d=c,c=b;return d===!1&&(d=ba),this.each(function(){p.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return p(this.context).on(a,this.selector,b,c),this},die:function(a,b){return p(this.context).off(a,this.selector||\"**\",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,\"**\"):this.off(b,a||\"**\",c)},trigger:function(a,b){return this.each(function(){p.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return p.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||p.guid++,d=0,e=function(c){var e=(p._data(this,\"lastToggle\"+a.guid)||0)%d;return p._data(this,\"lastToggle\"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),p.each(\"blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu\".split(\" \"),function(a,b){p.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bd(a,b,c,d){var e=0,f=b.length;for(;e<f;e++)Z(a,b[e],c,d)}function be(a,b,c,d,e,f){var g,h=$.setFilters[b.toLowerCase()];return h||Z.error(b),(a||!(g=e))&&bd(a||\"*\",d,g=[],e),g.length>0?h(g,c,f):[]}function bf(a,c,d,e,f){var g,h,i,j,k,l,m,n,p=0,q=f.length,s=L.POS,t=new RegExp(\"^\"+s.source+\"(?!\"+r+\")\",\"i\"),u=function(){var a=1,c=arguments.length-2;for(;a<c;a++)arguments[a]===b&&(g[a]=b)};for(;p<q;p++){s.exec(\"\"),a=f[p],j=[],i=0,k=e;while(g=s.exec(a)){n=s.lastIndex=g.index+g[0].length;if(n>i){m=a.slice(i,g.index),i=n,l=[c],B.test(m)&&(k&&(l=k),k=e);if(h=H.test(m))m=m.slice(0,-5).replace(B,\"$&*\");g.length>1&&g[0].replace(t,u),k=be(m,g[1],g[2],l,k,h)}}k?(j=j.concat(k),(m=a.slice(i))&&m!==\")\"?B.test(m)?bd(m,j,d,e):Z(m,c,d,e?e.concat(k):k):o.apply(d,j)):Z(a,c,d,e)}return q===1?d:Z.uniqueSort(d)}function bg(a,b,c){var d,e,f,g=[],i=0,j=D.exec(a),k=!j.pop()&&!j.pop(),l=k&&a.match(C)||[\"\"],m=$.preFilter,n=$.filter,o=!c&&b!==h;for(;(e=l[i])!=null&&k;i++){g.push(d=[]),o&&(e=\" \"+e);while(e){k=!1;if(j=B.exec(e))e=e.slice(j[0].length),k=d.push({part:j.pop().replace(A,\" \"),captures:j});for(f in n)(j=L[f].exec(e))&&(!m[f]||(j=m[f](j,b,c)))&&(e=e.slice(j.shift().length),k=d.push({part:f,captures:j}));if(!k)break}}return k||Z.error(a),g}function bh(a,b,e){var f=b.dir,g=m++;return a||(a=function(a){return a===e}),b.first?function(b,c){while(b=b[f])if(b.nodeType===1)return a(b,c)&&b}:function(b,e){var h,i=g+\".\"+d,j=i+\".\"+c;while(b=b[f])if(b.nodeType===1){if((h=b[q])===j)return b.sizset;if(typeof h==\"string\"&&h.indexOf(i)===0){if(b.sizset)return b}else{b[q]=j;if(a(b,e))return b.sizset=!0,b;b.sizset=!1}}}}function bi(a,b){return a?function(c,d){var e=b(c,d);return e&&a(e===!0?c:e,d)}:b}function bj(a,b,c){var d,e,f=0;for(;d=a[f];f++)$.relative[d.part]?e=bh(e,$.relative[d.part],b):(d.captures.push(b,c),e=bi(e,$.filter[d.part].apply(null,d.captures)));return e}function bk(a){return function(b,c){var d,e=0;for(;d=a[e];e++)if(d(b,c))return!0;return!1}}var c,d,e,f,g,h=a.document,i=h.documentElement,j=\"undefined\",k=!1,l=!0,m=0,n=[].slice,o=[].push,q=(\"sizcache\"+Math.random()).replace(\".\",\"\"),r=\"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",s=\"(?:\\\\\\\\.|[-\\\\w]|[^\\\\x00-\\\\xa0])+\",t=s.replace(\"w\",\"w#\"),u=\"([*^$|!~]?=)\",v=\"\\\\[\"+r+\"*(\"+s+\")\"+r+\"*(?:\"+u+r+\"*(?:(['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\3|(\"+t+\")|)|)\"+r+\"*\\\\]\",w=\":(\"+s+\")(?:\\\\((?:(['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\2|((?:[^,]|\\\\\\\\,|(?:,(?=[^\\\\[]*\\\\]))|(?:,(?=[^\\\\(]*\\\\))))*))\\\\)|)\",x=\":(nth|eq|gt|lt|first|last|even|odd)(?:\\\\((\\\\d*)\\\\)|)(?=[^-]|$)\",y=r+\"*([\\\\x20\\\\t\\\\r\\\\n\\\\f>+~])\"+r+\"*\",z=\"(?=[^\\\\x20\\\\t\\\\r\\\\n\\\\f])(?:\\\\\\\\.|\"+v+\"|\"+w.replace(2,7)+\"|[^\\\\\\\\(),])+\",A=new RegExp(\"^\"+r+\"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\"+r+\"+$\",\"g\"),B=new RegExp(\"^\"+y),C=new RegExp(z+\"?(?=\"+r+\"*,|$)\",\"g\"),D=new RegExp(\"^(?:(?!,)(?:(?:^|,)\"+r+\"*\"+z+\")*?|\"+r+\"*(.*?))(\\\\)|$)\"),E=new RegExp(z.slice(19,-6)+\"\\\\x20\\\\t\\\\r\\\\n\\\\f>+~])+|\"+y,\"g\"),F=/^(?:#([\\w\\-]+)|(\\w+)|\\.([\\w\\-]+))$/,G=/[\\x20\\t\\r\\n\\f]*[+~]/,H=/:not\\($/,I=/h\\d/i,J=/input|select|textarea|button/i,K=/\\\\(?!\\\\)/g,L={ID:new RegExp(\"^#(\"+s+\")\"),CLASS:new RegExp(\"^\\\\.(\"+s+\")\"),NAME:new RegExp(\"^\\\\[name=['\\\"]?(\"+s+\")['\\\"]?\\\\]\"),TAG:new RegExp(\"^(\"+s.replace(\"[-\",\"[-\\\\*\")+\")\"),ATTR:new RegExp(\"^\"+v),PSEUDO:new RegExp(\"^\"+w),CHILD:new RegExp(\"^:(only|nth|last|first)-child(?:\\\\(\"+r+\"*(even|odd|(([+-]|)(\\\\d*)n|)\"+r+\"*(?:([+-]|)\"+r+\"*(\\\\d+)|))\"+r+\"*\\\\)|)\",\"i\"),POS:new RegExp(x,\"ig\"),needsContext:new RegExp(\"^\"+r+\"*[>+~]|\"+x,\"i\")},M={},N=[],O={},P=[],Q=function(a){return a.sizzleFilter=!0,a},R=function(a){return function(b){return b.nodeName.toLowerCase()===\"input\"&&b.type===a}},S=function(a){return function(b){var c=b.nodeName.toLowerCase();return(c===\"input\"||c===\"button\")&&b.type===a}},T=function(a){var b=!1,c=h.createElement(\"div\");try{b=a(c)}catch(d){}return c=null,b},U=T(function(a){a.innerHTML=\"<select></select>\";var b=typeof a.lastChild.getAttribute(\"multiple\");return b!==\"boolean\"&&b!==\"string\"}),V=T(function(a){a.id=q+0,a.innerHTML=\"<a name='\"+q+\"'></a><div name='\"+q+\"'></div>\",i.insertBefore(a,i.firstChild);var b=h.getElementsByName&&h.getElementsByName(q).length===2+h.getElementsByName(q+0).length;return g=!h.getElementById(q),i.removeChild(a),b}),W=T(function(a){return a.appendChild(h.createComment(\"\")),a.getElementsByTagName(\"*\").length===0}),X=T(function(a){return a.innerHTML=\"<a href='#'></a>\",a.firstChild&&typeof a.firstChild.getAttribute!==j&&a.firstChild.getAttribute(\"href\")===\"#\"}),Y=T(function(a){return a.innerHTML=\"<div class='hidden e'></div><div class='hidden'></div>\",!a.getElementsByClassName||a.getElementsByClassName(\"e\").length===0?!1:(a.lastChild.className=\"e\",a.getElementsByClassName(\"e\").length!==1)}),Z=function(a,b,c,d){c=c||[],b=b||h;var e,f,g,i,j=b.nodeType;if(j!==1&&j!==9)return[];if(!a||typeof a!=\"string\")return c;g=ba(b);if(!g&&!d)if(e=F.exec(a))if(i=e[1]){if(j===9){f=b.getElementById(i);if(!f||!f.parentNode)return c;if(f.id===i)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(i))&&bb(b,f)&&f.id===i)return c.push(f),c}else{if(e[2])return o.apply(c,n.call(b.getElementsByTagName(a),0)),c;if((i=e[3])&&Y&&b.getElementsByClassName)return o.apply(c,n.call(b.getElementsByClassName(i),0)),c}return bm(a,b,c,d,g)},$=Z.selectors={cacheLength:50,match:L,order:[\"ID\",\"TAG\"],attrHandle:{},createPseudo:Q,find:{ID:g?function(a,b,c){if(typeof b.getElementById!==j&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==j&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==j&&e.getAttributeNode(\"id\").value===a?[e]:b:[]}},TAG:W?function(a,b){if(typeof b.getElementsByTagName!==j)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a===\"*\"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c}},relative:{\">\":{dir:\"parentNode\",first:!0},\" \":{dir:\"parentNode\"},\"+\":{dir:\"previousSibling\",first:!0},\"~\":{dir:\"previousSibling\"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(K,\"\"),a[3]=(a[4]||a[5]||\"\").replace(K,\"\"),a[2]===\"~=\"&&(a[3]=\" \"+a[3]+\" \"),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]===\"nth\"?(a[2]||Z.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]===\"even\"||a[2]===\"odd\")),a[4]=+(a[6]+a[7]||a[2]===\"odd\")):a[2]&&Z.error(a[0]),a},PSEUDO:function(a){var b,c=a[4];return L.CHILD.test(a[0])?null:(c&&(b=D.exec(c))&&b.pop()&&(a[0]=a[0].slice(0,b[0].length-c.length-1),c=b[0].slice(0,-1)),a.splice(2,3,c||a[3]),a)}},filter:{ID:g?function(a){return a=a.replace(K,\"\"),function(b){return b.getAttribute(\"id\")===a}}:function(a){return a=a.replace(K,\"\"),function(b){var c=typeof b.getAttributeNode!==j&&b.getAttributeNode(\"id\");return c&&c.value===a}},TAG:function(a){return a===\"*\"?function(){return!0}:(a=a.replace(K,\"\").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=M[a];return b||(b=M[a]=new RegExp(\"(^|\"+r+\")\"+a+\"(\"+r+\"|$)\"),N.push(a),N.length>$.cacheLength&&delete M[N.shift()]),function(a){return b.test(a.className||typeof a.getAttribute!==j&&a.getAttribute(\"class\")||\"\")}},ATTR:function(a,b,c){return b?function(d){var e=Z.attr(d,a),f=e+\"\";if(e==null)return b===\"!=\";switch(b){case\"=\":return f===c;case\"!=\":return f!==c;case\"^=\":return c&&f.indexOf(c)===0;case\"*=\":return c&&f.indexOf(c)>-1;case\"$=\":return c&&f.substr(f.length-c.length)===c;case\"~=\":return(\" \"+f+\" \").indexOf(c)>-1;case\"|=\":return f===c||f.substr(0,c.length+1)===c+\"-\"}}:function(b){return Z.attr(b,a)!=null}},CHILD:function(a,b,c,d){if(a===\"nth\"){var e=m++;return function(a){var b,f,g=0,h=a;if(c===1&&d===0)return!0;b=a.parentNode;if(b&&(b[q]!==e||!a.sizset)){for(h=b.firstChild;h;h=h.nextSibling)if(h.nodeType===1){h.sizset=++g;if(h===a)break}b[q]=e}return f=a.sizset-d,c===0?f===0:f%c===0&&f/c>=0}}return function(b){var c=b;switch(a){case\"only\":case\"first\":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a===\"first\")return!0;c=b;case\"last\":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b,c,d){var e=$.pseudos[a]||$.pseudos[a.toLowerCase()];return e||Z.error(\"unsupported pseudo: \"+a),e.sizzleFilter?e(b,c,d):e}},pseudos:{not:Q(function(a,b,c){var d=bl(a.replace(A,\"$1\"),b,c);return function(a){return!d(a)}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b===\"input\"&&!!a.checked||b===\"option\"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!$.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>\"@\"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},contains:Q(function(a){return function(b){return(b.textContent||b.innerText||bc(b)).indexOf(a)>-1}}),has:Q(function(a){return function(b){return Z(a,b).length>0}}),header:function(a){return I.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()===\"input\"&&(b=a.type)===\"text\"&&((c=a.getAttribute(\"type\"))==null||c.toLowerCase()===b)},radio:R(\"radio\"),checkbox:R(\"checkbox\"),file:R(\"file\"),password:R(\"password\"),image:R(\"image\"),submit:S(\"submit\"),reset:S(\"reset\"),button:function(a){var b=a.nodeName.toLowerCase();return b===\"input\"&&a.type===\"button\"||b===\"button\"},input:function(a){return J.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b,c){return c?a.slice(1):[a[0]]},last:function(a,b,c){var d=a.pop();return c?a:[d]},even:function(a,b,c){var d=[],e=c?1:0,f=a.length;for(;e<f;e=e+2)d.push(a[e]);return d},odd:function(a,b,c){var d=[],e=c?0:1,f=a.length;for(;e<f;e=e+2)d.push(a[e]);return d},lt:function(a,b,c){return c?a.slice(+b):a.slice(0,+b)},gt:function(a,b,c){return c?a.slice(0,+b+1):a.slice(+b+1)},eq:function(a,b,c){var d=a.splice(+b,1);return c?a:d}}};$.setFilters.nth=$.setFilters.eq,$.filters=$.pseudos,X||($.attrHandle={href:function(a){return a.getAttribute(\"href\",2)},type:function(a){return a.getAttribute(\"type\")}}),V&&($.order.push(\"NAME\"),$.find.NAME=function(a,b){if(typeof b.getElementsByName!==j)return b.getElementsByName(a)}),Y&&($.order.splice(1,0,\"CLASS\"),$.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!==j&&!c)return b.getElementsByClassName(a)});try{n.call(i.childNodes,0)[0].nodeType}catch(_){n=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}var ba=Z.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!==\"HTML\":!1},bb=Z.contains=i.compareDocumentPosition?function(a,b){return!!(a.compareDocumentPosition(b)&16)}:i.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},bc=Z.getText=function(a){var b,c=\"\",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent==\"string\")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=bc(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=bc(b);return c};Z.attr=function(a,b){var c,d=ba(a);return d||(b=b.toLowerCase()),$.attrHandle[b]?$.attrHandle[b](a):U||d?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]==\"boolean\"?a[b]?b:null:c.specified?c.value:null:null)},Z.error=function(a){throw new Error(\"Syntax error, unrecognized expression: \"+a)},[0,0].sort(function(){return l=0}),i.compareDocumentPosition?e=function(a,b){return a===b?(k=!0,0):(!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition:a.compareDocumentPosition(b)&4)?-1:1}:(e=function(a,b){if(a===b)return k=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],g=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return f(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)g.unshift(j),j=j.parentNode;c=e.length,d=g.length;for(var l=0;l<c&&l<d;l++)if(e[l]!==g[l])return f(e[l],g[l]);return l===c?f(a,g[l],-1):f(e[l],b,1)},f=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),Z.uniqueSort=function(a){var b,c=1;if(e){k=l,a.sort(e);if(k)for(;b=a[c];c++)b===a[c-1]&&a.splice(c--,1)}return a};var bl=Z.compile=function(a,b,c){var d,e,f,g=O[a];if(g&&g.context===b)return g;e=bg(a,b,c);for(f=0;d=e[f];f++)e[f]=bj(d,b,c);return g=O[a]=bk(e),g.context=b,g.runs=g.dirruns=0,P.push(a),P.length>$.cacheLength&&delete O[P.shift()],g};Z.matches=function(a,b){return Z(a,null,null,b)},Z.matchesSelector=function(a,b){return Z(b,null,null,[a]).length>0};var bm=function(a,b,e,f,g){a=a.replace(A,\"$1\");var h,i,j,k,l,m,p,q,r,s=a.match(C),t=a.match(E),u=b.nodeType;if(L.POS.test(a))return bf(a,b,e,f,s);if(f)h=n.call(f,0);else if(s&&s.length===1){if(t.length>1&&u===9&&!g&&(s=L.ID.exec(t[0]))){b=$.find.ID(s[1],b,g)[0];if(!b)return e;a=a.slice(t.shift().length)}q=(s=G.exec(t[0]))&&!s.index&&b.parentNode||b,r=t.pop(),m=r.split(\":not\")[0];for(j=0,k=$.order.length;j<k;j++){p=$.order[j];if(s=L[p].exec(m)){h=$.find[p]((s[1]||\"\").replace(K,\"\"),q,g);if(h==null)continue;m===r&&(a=a.slice(0,a.length-r.length)+m.replace(L[p],\"\"),a||o.apply(e,n.call(h,0)));break}}}if(a){i=bl(a,b,g),d=i.dirruns++,h==null&&(h=$.find.TAG(\"*\",G.test(a)&&b.parentNode||b));for(j=0;l=h[j];j++)c=i.runs++,i(l,b)&&e.push(l)}return e};h.querySelectorAll&&function(){var a,b=bm,c=/'|\\\\/g,d=/\\=[\\x20\\t\\r\\n\\f]*([^'\"\\]]*)[\\x20\\t\\r\\n\\f]*\\]/g,e=[],f=[\":active\"],g=i.matchesSelector||i.mozMatchesSelector||i.webkitMatchesSelector||i.oMatchesSelector||i.msMatchesSelector;T(function(a){a.innerHTML=\"<select><option selected></option></select>\",a.querySelectorAll(\"[selected]\").length||e.push(\"\\\\[\"+r+\"*(?:checked|disabled|ismap|multiple|readonly|selected|value)\"),a.querySelectorAll(\":checked\").length||e.push(\":checked\")}),T(function(a){a.innerHTML=\"<p test=''></p>\",a.querySelectorAll(\"[test^='']\").length&&e.push(\"[*^$]=\"+r+\"*(?:\\\"\\\"|'')\"),a.innerHTML=\"<input type='hidden'>\",a.querySelectorAll(\":enabled\").length||e.push(\":enabled\",\":disabled\")}),e=e.length&&new RegExp(e.join(\"|\")),bm=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a)))if(d.nodeType===9)try{return o.apply(f,n.call(d.querySelectorAll(a),0)),f}catch(i){}else if(d.nodeType===1&&d.nodeName.toLowerCase()!==\"object\"){var j=d.getAttribute(\"id\"),k=j||q,l=G.test(a)&&d.parentNode||d;j?k=k.replace(c,\"\\\\$&\"):d.setAttribute(\"id\",k);try{return o.apply(f,n.call(l.querySelectorAll(a.replace(C,\"[id='\"+k+\"'] $&\")),0)),f}catch(i){}finally{j||d.removeAttribute(\"id\")}}return b(a,d,f,g,h)},g&&(T(function(b){a=g.call(b,\"div\");try{g.call(b,\"[test!='']:sizzle\"),f.push($.match.PSEUDO)}catch(c){}}),f=new RegExp(f.join(\"|\")),Z.matchesSelector=function(b,c){c=c.replace(d,\"='$1']\");if(!ba(b)&&!f.test(c)&&(!e||!e.test(c)))try{var h=g.call(b,c);if(h||a||b.document&&b.document.nodeType!==11)return h}catch(i){}return Z(c,null,null,[b]).length>0})}(),Z.attr=p.attr,p.find=Z,p.expr=Z.selectors,p.expr[\":\"]=p.expr.pseudos,p.unique=Z.uniqueSort,p.text=Z.getText,p.isXMLDoc=Z.isXML,p.contains=Z.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\\[\\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!=\"string\")return p(a).filter(function(){for(b=0,c=h.length;b<c;b++)if(p.contains(h[b],this))return!0});g=this.pushStack(\"\",\"find\",a);for(b=0,c=this.length;b<c;b++){d=g.length,p.find(a,this[b],g);if(b>0)for(e=d;e<g.length;e++)for(f=0;f<d;f++)if(g[f]===g[e]){g.splice(e--,1);break}}return g},has:function(a){var b,c=p(a,this),d=c.length;return this.filter(function(){for(b=0;b<d;b++)if(p.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(bj(this,a,!1),\"not\",a)},filter:function(a){return this.pushStack(bj(this,a,!0),\"filter\",a)},is:function(a){return!!a&&(typeof a==\"string\"?bf.test(a)?p(a,this.context).index(this[0])>=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!=\"string\"?p(a,b||this.context):0;for(;d<e;d++){c=this[d];while(c&&c.ownerDocument&&c!==b&&c.nodeType!==11){if(g?g.index(c)>-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,\"closest\",a)},index:function(a){return a?typeof a==\"string\"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a==\"string\"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,\"parentNode\")},parentsUntil:function(a,b,c){return p.dir(a,\"parentNode\",c)},next:function(a){return bi(a,\"nextSibling\")},prev:function(a){return bi(a,\"previousSibling\")},nextAll:function(a){return p.dir(a,\"nextSibling\")},prevAll:function(a){return p.dir(a,\"previousSibling\")},nextUntil:function(a,b,c){return p.dir(a,\"nextSibling\",c)},prevUntil:function(a,b,c){return p.dir(a,\"previousSibling\",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,\"iframe\")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d==\"string\"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(\",\"))}}),p.extend({filter:function(a,b,c){return c&&(a=\":not(\"+a+\")\"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl=\"abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video\",bm=/ jQuery\\d+=\"(?:null|\\d+)\"/g,bn=/^\\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,bp=/<([\\w:]+)/,bq=/<tbody/i,br=/<|&#?\\w+;/,bs=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,bu=new RegExp(\"<(?:\"+bl+\")[\\\\s/>]\",\"i\"),bv=/^(?:checkbox|radio)$/,bw=/checked\\s*(?:[^=]|=\\s*.checked.)/i,bx=/\\/(java|ecma)script/i,by=/^\\s*<!(?:\\[CDATA\\[|\\-\\-)|[\\]\\-]{2}>\\s*$/g,bz={option:[1,\"<select multiple='multiple'>\",\"</select>\"],legend:[1,\"<fieldset>\",\"</fieldset>\"],thead:[1,\"<table>\",\"</table>\"],tr:[2,\"<table><tbody>\",\"</tbody></table>\"],td:[3,\"<table><tbody><tr>\",\"</tr></tbody></table>\"],col:[2,\"<table><tbody></tbody><colgroup>\",\"</colgroup></table>\"],area:[1,\"<map>\",\"</map>\"],_default:[0,\"\",\"\"]},bA=bk(e),bB=bA.appendChild(e.createElement(\"div\"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,\"X<div>\",\"</div>\"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,\"body\")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),\"before\",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),\"after\",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName(\"*\")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName(\"*\"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,\"\"):b;if(typeof a==\"string\"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||[\"\",\"\"])[1].toLowerCase()]){a=a.replace(bo,\"<$1></$2>\");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(p.cleanData(c.getElementsByTagName(\"*\")),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){return bh(this[0])?this.length?this.pushStack(p(p.isFunction(a)?a():a),\"replaceWith\",a):this:p.isFunction(a)?this.each(function(b){var c=p(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!=\"string\"&&(a=p(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;p(this).remove(),b?p(b).before(a):p(c).append(a)}))},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){a=[].concat.apply([],a);var e,f,g,h,i=0,j=a[0],k=[],l=this.length;if(!p.support.checkClone&&l>1&&typeof j==\"string\"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,\"tr\");for(h=e.cacheable||l-1;i<l;i++)d.call(c&&p.nodeName(this[i],\"table\")?bC(this[i],\"tbody\"):this[i],i===h?g:p.clone(g,!0,!0))}g=f=null,k.length&&p.each(k,function(a,b){b.src?p.ajax?p.ajax({url:b.src,type:\"GET\",dataType:\"script\",async:!1,global:!1,\"throws\":!0}):p.error(\"no ajax\"):p.globalEval((b.text||b.textContent||b.innerHTML||\"\").replace(by,\"\")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),p.buildFragment=function(a,c,d){var f,g,h,i=a[0];return c=c||e,c=(c[0]||c).ownerDocument||c[0]||c,typeof c.createDocumentFragment==\"undefined\"&&(c=e),a.length===1&&typeof i==\"string\"&&i.length<512&&c===e&&i.charAt(0)===\"<\"&&!bt.test(i)&&(p.support.checkClone||!bw.test(i))&&(p.support.html5Clone||!bu.test(i))&&(g=!0,f=p.fragments[i],h=f!==b),f||(f=c.createDocumentFragment(),p.clean(a,c,f,d),g&&(p.fragments[i]=h&&f)),{fragment:f,cacheable:g}},p.fragments={},p.each({appendTo:\"append\",prependTo:\"prepend\",insertBefore:\"before\",insertAfter:\"after\",replaceAll:\"replaceWith\"},function(a,b){p.fn[a]=function(c){var d,e=0,f=[],g=p(c),h=g.length,i=this.length===1&&this[0].parentNode;if((i==null||i&&i.nodeType===11&&i.childNodes.length===1)&&h===1)return g[b](this[0]),this;for(;e<h;e++)d=(e>0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test(\"<\"+a.nodeName+\">\")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=0,t=[];if(!b||typeof b.createDocumentFragment==\"undefined\")b=e;for(g=b===e&&bA;(h=a[s])!=null;s++){typeof h==\"number\"&&(h+=\"\");if(!h)continue;if(typeof h==\"string\")if(!br.test(h))h=b.createTextNode(h);else{g=g||bk(b),l=l||g.appendChild(b.createElement(\"div\")),h=h.replace(bo,\"<$1></$2>\"),i=(bp.exec(h)||[\"\",\"\"])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i===\"table\"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]===\"<table>\"&&!m?l.childNodes:[];for(f=n.length-1;f>=0;--f)p.nodeName(n[f],\"tbody\")&&!n[f].childNodes.length&&n[f].parentNode.removeChild(n[f])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l=g.lastChild}h.nodeType?t.push(h):t=p.merge(t,h)}l&&(g.removeChild(l),h=l=g=null);if(!p.support.appendChecked)for(s=0;(h=t[s])!=null;s++)p.nodeName(h,\"input\")?bG(h):typeof h.getElementsByTagName!=\"undefined\"&&p.grep(h.getElementsByTagName(\"input\"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(s=0;(h=t[s])!=null;s++)if(!p.nodeName(h,\"script\")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!=\"undefined\"&&(r=p.grep(p.merge([],h.getElementsByTagName(\"script\")),q),t.splice.apply(t,[s+1,0].concat(r)),s+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \\/]([\\w.]+)/.exec(a)||/(webkit)[ \\/]([\\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \\/]([\\w.]+)/.exec(a)||/(msie) ([\\w.]+)/.exec(a)||a.indexOf(\"compatible\")<0&&/(mozilla)(?:.*? rv:([\\w.]+)|)/.exec(a)||[];return{browser:b[1]||\"\",version:b[2]||\"0\"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\\([^)]*\\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^margin/,bO=new RegExp(\"^(\"+q+\")(.*)$\",\"i\"),bP=new RegExp(\"^(\"+q+\")(?!px)[a-z%]+$\",\"i\"),bQ=new RegExp(\"^([-+])=(\"+q+\")\",\"i\"),bR={},bS={position:\"absolute\",visibility:\"hidden\",display:\"block\"},bT={letterSpacing:0,fontWeight:400,lineHeight:1},bU=[\"Top\",\"Right\",\"Bottom\",\"Left\"],bV=[\"Webkit\",\"O\",\"Moz\",\"ms\"],bW=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return bZ(this,!0)},hide:function(){return bZ(this)},toggle:function(a,b){var c=typeof a==\"boolean\";return p.isFunction(a)&&p.isFunction(b)?bW.apply(this,arguments):this.each(function(){(c?a:bY(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,\"opacity\");return c===\"\"?\"1\":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{\"float\":p.support.cssFloat?\"cssFloat\":\"styleFloat\"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bX(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&\"get\"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g===\"string\"&&(f=bQ.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g=\"number\");if(d==null||g===\"number\"&&isNaN(d))return;g===\"number\"&&!p.cssNumber[i]&&(d+=\"px\");if(!h||!(\"set\"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bX(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&\"get\"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f===\"normal\"&&c in bT&&(f=bT[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(a,b){var c,d,e,f,g=getComputedStyle(a,null),h=a.style;return g&&(c=g[b],c===\"\"&&!p.contains(a.ownerDocument.documentElement,a)&&(c=p.style(a,b)),bP.test(c)&&bN.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=c,c=g.width,h.width=d,h.minWidth=e,h.maxWidth=f)),c}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bP.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b===\"fontSize\"?\"1em\":e,e=f.pixelLeft+\"px\",f.left=c,d&&(a.runtimeStyle.left=d)),e===\"\"?\"auto\":e}),p.each([\"height\",\"width\"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0||bH(a,\"display\")!==\"none\"?ca(a,b,d):p.swap(a,bS,function(){return ca(a,b,d)})},set:function(a,c,d){return b$(a,c,d?b_(a,b,d,p.support.boxSizing&&p.css(a,\"boxSizing\")===\"border-box\"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||\"\")?.01*parseFloat(RegExp.$1)+\"\":b?\"1\":\"\"},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?\"alpha(opacity=\"+b*100+\")\":\"\",f=d&&d.filter||c.filter||\"\";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,\"\"))===\"\"&&c.removeAttribute){c.removeAttribute(\"filter\");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+\" \"+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:\"inline-block\"},function(){if(b)return bH(a,\"marginRight\")})}}),!p.support.pixelPosition&&p.fn.position&&p.each([\"top\",\"left\"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bP.test(d)?p(a).position()[b]+\"px\":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,\"display\"))===\"none\"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:\"\",padding:\"\",border:\"Width\"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c==\"string\"?c.split(\" \"):[c],f={};for(d=0;d<4;d++)f[a+bU[d]+b]=e[d]||e[d-2]||e[0];return f}},bN.test(a)||(p.cssHooks[a+b].set=b$)});var cc=/%20/g,cd=/\\[\\]$/,ce=/\\r?\\n/g,cf=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,cg=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||cg.test(this.nodeName)||cf.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(ce,\"\\r\\n\")}}):{name:b.name,value:c.replace(ce,\"\\r\\n\")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?\"\":b,e[e.length]=encodeURIComponent(a)+\"=\"+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ch(d,a[d],c,f);return e.join(\"&\").replace(cc,\"+\")};var ci,cj,ck=/#.*$/,cl=/^(.*?):[ \\t]*([^\\r\\n]*)\\r?$/mg,cm=/^(?:about|app|app\\-storage|.+\\-extension|file|res|widget):$/,cn=/^(?:GET|HEAD)$/,co=/^\\/\\//,cp=/\\?/,cq=/<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi,cr=/([?&])_=[^&]*/,cs=/^([\\w\\+\\.\\-]+:)(?:\\/\\/([^\\/?#:]*)(?::(\\d+)|)|)/,ct=p.fn.load,cu={},cv={},cw=[\"*/\"]+[\"*\"];try{ci=f.href}catch(cx){ci=e.createElement(\"a\"),ci.href=\"\",ci=ci.href}cj=cs.exec(ci.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!=\"string\"&&ct)return ct.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(\" \");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):typeof c==\"object\"&&(f=\"POST\"),p.ajax({url:a,type:f,dataType:\"html\",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p(\"<div>\").append(a.replace(cq,\"\")).find(e):a)}),this},p.each(\"ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend\".split(\" \"),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each([\"get\",\"post\"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,\"script\")},getJSON:function(a,b,c){return p.get(a,b,c,\"json\")},ajaxSetup:function(a,b){return b?cA(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cA(a,b),a},ajaxSettings:{url:ci,isLocal:cm.test(cj[1]),global:!0,type:\"GET\",contentType:\"application/x-www-form-urlencoded; charset=UTF-8\",processData:!0,async:!0,accepts:{xml:\"application/xml, text/xml\",html:\"text/html\",text:\"text/plain\",json:\"application/json, text/javascript\",\"*\":cw},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:\"responseXML\",text:\"responseText\"},converters:{\"* text\":a.String,\"text html\":!0,\"text json\":p.parseJSON,\"text xml\":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cy(cu),ajaxTransport:cy(cv),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||\"\",x.readyState=a>0?4:0,f&&(u=cB(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader(\"Last-Modified\"),w&&(p.lastModified[d]=w),w=x.getResponseHeader(\"Etag\"),w&&(p.etag[d]=w)),a===304?(y=\"notmodified\",k=!0):(k=cC(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y=\"error\",a<0&&(a=0)}x.status=a,x.statusText=\"\"+(c||y),k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger(\"ajax\"+(k?\"Success\":\"Error\"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger(\"ajaxComplete\",[x,l]),--p.active||p.event.trigger(\"ajaxStop\"))}typeof a==\"object\"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks(\"once memory\"),r=l.statusCode||{},t={},u={},v=0,w=\"canceled\",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cl.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+\"\").replace(ck,\"\").replace(co,cj[1]+\"//\"),l.dataTypes=p.trim(l.dataType||\"*\").toLowerCase().split(s),l.crossDomain==null&&(i=cs.exec(l.url.toLowerCase()),l.crossDomain=!(!i||i[1]==cj[1]&&i[2]==cj[2]&&(i[3]||(i[1]===\"http:\"?80:443))==(cj[3]||(cj[1]===\"http:\"?80:443)))),l.data&&l.processData&&typeof l.data!=\"string\"&&(l.data=p.param(l.data,l.traditional)),cz(cu,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!cn.test(l.type),j&&p.active++===0&&p.event.trigger(\"ajaxStart\");if(!l.hasContent){l.data&&(l.url+=(cp.test(l.url)?\"&\":\"?\")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cr,\"$1_=\"+z);l.url=A+(A===l.url?(cp.test(l.url)?\"&\":\"?\")+\"_=\"+z:\"\")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader(\"Content-Type\",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader(\"If-Modified-Since\",p.lastModified[d]),p.etag[d]&&x.setRequestHeader(\"If-None-Match\",p.etag[d])),x.setRequestHeader(\"Accept\",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!==\"*\"?\", \"+cw+\"; q=0.01\":\"\"):l.accepts[\"*\"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w=\"abort\";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cz(cv,l,c,x);if(!g)y(-1,\"No Transport\");else{x.readyState=1,j&&n.trigger(\"ajaxSend\",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort(\"timeout\")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cD=[],cE=/\\?/,cF=/(=)\\?(?=&|$)|\\?\\?/,cG=p.now();p.ajaxSetup({jsonp:\"callback\",jsonpCallback:function(){var a=cD.pop()||p.expando+\"_\"+cG++;return this[a]=!0,a}}),p.ajaxPrefilter(\"json jsonp\",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cF.test(j),m=k&&!l&&typeof i==\"string\"&&!(c.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&cF.test(i);if(c.dataTypes[0]===\"jsonp\"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cF,\"$1\"+f):m?c.data=i.replace(cF,\"$1\"+f):k&&(c.url+=(cE.test(j)?\"&\":\"?\")+c.jsonp+\"=\"+f),c.converters[\"script json\"]=function(){return h||p.error(f+\" was not called\"),h[0]},c.dataTypes[0]=\"json\",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cD.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),\"script\"}),p.ajaxSetup({accepts:{script:\"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"},contents:{script:/javascript|ecmascript/},converters:{\"text script\":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter(\"script\",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type=\"GET\",a.global=!1)}),p.ajaxTransport(\"script\",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName(\"head\")[0]||e.documentElement;return{send:function(f,g){c=e.createElement(\"script\"),c.async=\"async\",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,\"success\")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cH,cI=a.ActiveXObject?function(){for(var a in cH)cH[a](0,1)}:!1,cJ=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cK()||cL()}:cK,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&\"withCredentials\"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e[\"X-Requested-With\"]&&(e[\"X-Requested-With\"]=\"XMLHttpRequest\");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cI&&delete cH[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=\"\"}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cJ,cI&&(cH||(cH={},p(a).unload(cI)),cH[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cM,cN,cO=/^(?:toggle|show|hide)$/,cP=new RegExp(\"^(?:([-+])=|)(\"+q+\")([a-z%]*)$\",\"i\"),cQ=/queueHooks$/,cR=[cX],cS={\"*\":[function(a,b){var c,d,e,f=this.createTween(a,b),g=cP.exec(b),h=f.cur(),i=+h||0,j=1;if(g){c=+g[2],d=g[3]||(p.cssNumber[a]?\"\":\"px\");if(d!==\"px\"&&i){i=p.css(f.elem,a,!0)||c||1;do e=j=j||\".5\",i=i/j,p.style(f.elem,a,i+d),j=f.cur()/h;while(j!==1&&j!==e)}f.unit=d,f.start=i,f.end=g[1]?i+(g[1]+1)*c:c}return f}]};p.Animation=p.extend(cV,{tweener:function(a,b){p.isFunction(a)?(b=a,a=[\"*\"]):a=a.split(\" \");var c,d=0,e=a.length;for(;d<e;d++)c=a[d],cS[c]=cS[c]||[],cS[c].unshift(b)},prefilter:function(a,b){b?cR.unshift(a):cR.push(a)}}),p.Tween=cY,cY.prototype={constructor:cY,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||\"swing\",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(p.cssNumber[c]?\"\":\"px\")},cur:function(){var a=cY.propHooks[this.prop];return a&&a.get?a.get(this):cY.propHooks._default.get(this)},run:function(a){var b,c=cY.propHooks[this.prop];return this.pos=b=p.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration),this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):cY.propHooks._default.set(this),this}},cY.prototype.init.prototype=cY.prototype,cY.propHooks={_default:{get:function(a){var b;return a.elem[a.prop]==null||!!a.elem.style&&a.elem.style[a.prop]!=null?(b=p.css(a.elem,a.prop,!1,\"\"),!b||b===\"auto\"?0:b):a.elem[a.prop]},set:function(a){p.fx.step[a.prop]?p.fx.step[a.prop](a):a.elem.style&&(a.elem.style[p.cssProps[a.prop]]!=null||p.cssHooks[a.prop])?p.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},cY.propHooks.scrollTop=cY.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},p.each([\"toggle\",\"show\",\"hide\"],function(a,b){var c=p.fn[b];p.fn[b]=function(d,e,f){return d==null||typeof d==\"boolean\"||!a&&p.isFunction(d)&&p.isFunction(e)?c.apply(this,arguments):this.animate(cZ(b,!0),d,e,f)}}),p.fn.extend({fadeTo:function(a,b,c,d){return this.filter(bY).css(\"opacity\",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=p.isEmptyObject(a),f=p.speed(b,c,d),g=function(){var b=cV(this,p.extend({},a),f);e&&b.stop(!0)};return e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return typeof a!=\"string\"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||\"fx\",[]),this.each(function(){var b=!0,c=a!=null&&a+\"queueHooks\",f=p.timers,g=p._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&cQ.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem===this&&(a==null||f[c].queue===a)&&(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&p.dequeue(this,a)})}}),p.each({slideDown:cZ(\"show\"),slideUp:cZ(\"hide\"),slideToggle:cZ(\"toggle\"),fadeIn:{opacity:\"show\"},fadeOut:{opacity:\"hide\"},fadeToggle:{opacity:\"toggle\"}},function(a,b){p.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),p.speed=function(a,b,c){var d=a&&typeof a==\"object\"?p.extend({},a):{complete:c||!c&&b||p.isFunction(a)&&a,duration:a,easing:c&&b||b&&!p.isFunction(b)&&b};d.duration=p.fx.off?0:typeof d.duration==\"number\"?d.duration:d.duration in p.fx.speeds?p.fx.speeds[d.duration]:p.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue=\"fx\";return d.old=d.complete,d.complete=function(){p.isFunction(d.old)&&d.old.call(this),d.queue&&p.dequeue(this,d.queue)},d},p.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},p.timers=[],p.fx=cY.prototype.init,p.fx.tick=function(){var a,b=p.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||p.fx.stop()},p.fx.timer=function(a){a()&&p.timers.push(a)&&!cN&&(cN=setInterval(p.fx.tick,p.fx.interval))},p.fx.interval=13,p.fx.stop=function(){clearInterval(cN),cN=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fx.step={},p.expr&&p.expr.filters&&(p.expr.filters.animated=function(a){return p.grep(p.timers,function(b){return a===b.elem}).length});var c$=/^(?:body|html)$/i;p.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){p.offset.setOffset(this,a,b)});var c,d,e,f,g,h,i,j,k,l,m=this[0],n=m&&m.ownerDocument;if(!n)return;return(e=n.body)===m?p.offset.bodyOffset(m):(d=n.documentElement,p.contains(d,m)?(c=m.getBoundingClientRect(),f=c_(n),g=d.clientTop||e.clientTop||0,h=d.clientLeft||e.clientLeft||0,i=f.pageYOffset||d.scrollTop,j=f.pageXOffset||d.scrollLeft,k=c.top+i-g,l=c.left+j-h,{top:k,left:l}):{top:0,left:0})},p.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return p.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(p.css(a,\"marginTop\"))||0,c+=parseFloat(p.css(a,\"marginLeft\"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=p.css(a,\"position\");d===\"static\"&&(a.style.position=\"relative\");var e=p(a),f=e.offset(),g=p.css(a,\"top\"),h=p.css(a,\"left\"),i=(d===\"absolute\"||d===\"fixed\")&&p.inArray(\"auto\",[g,h])>-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),\"using\"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c$.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,\"marginTop\"))||0,c.left-=parseFloat(p.css(a,\"marginLeft\"))||0,d.top+=parseFloat(p.css(b[0],\"borderTopWidth\"))||0,d.left+=parseFloat(p.css(b[0],\"borderLeftWidth\"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c$.test(a.nodeName)&&p.css(a,\"position\")===\"static\")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:\"pageXOffset\",scrollTop:\"pageYOffset\"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=c_(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:\"height\",Width:\"width\"},function(a,c){p.each({padding:\"inner\"+a,content:c,\"\":\"outer\"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!=\"boolean\"),h=d||(e===!0||f===!0?\"margin\":\"border\");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement[\"client\"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body[\"scroll\"+a],f[\"scroll\"+a],c.body[\"offset\"+a],f[\"offset\"+a],f[\"client\"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g)}})}),a.jQuery=a.$=p,typeof define==\"function\"&&define.amd&&define.amd.jQuery&&define(\"jquery\",[],function(){return p})})(window);"
  },
  {
    "path": "test/vendor/mocha.css",
    "content": "body {\n  font: 20px/1.5 \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  padding: 60px 50px;\n}\n\n#mocha h1, h2 {\n  margin: 0;\n}\n\n#mocha h1 {\n  margin-top: 15px;\n  font-size: 1em;\n  font-weight: 200;\n}\n\n#mocha .suite .suite h1 {\n  margin-top: 0;\n  font-size: .8em;\n}\n\n#mocha h2 {\n  font-size: 12px;\n  font-weight: normal;\n  cursor: pointer;\n}\n\n#mocha .suite {\n  margin-left: 15px;\n}\n\n#mocha .test {\n  margin-left: 15px;\n}\n\n#mocha .test:hover h2::after {\n  position: relative;\n  top: 0;\n  right: -10px;\n  content: '(view source)';\n  font-size: 12px;\n  font-family: arial;\n  color: #888;\n}\n\n#mocha .test.pending:hover h2::after {\n  content: '(pending)';\n  font-family: arial;\n}\n\n#mocha .test.pass::before {\n  content: '✓';\n  font-size: 12px;\n  display: block;\n  float: left;\n  margin-right: 5px;\n  color: #00c41c;\n}\n\n#mocha .test.pending {\n  color: #0b97c4;\n}\n\n#mocha .test.pending::before {\n  content: '◦';\n  color: #0b97c4;\n}\n\n#mocha .test.fail {\n  color: #c00;\n}\n\n#mocha .test.fail pre {\n  color: black;\n}\n\n#mocha .test.fail::before {\n  content: '✖';\n  font-size: 12px;\n  display: block;\n  float: left;\n  margin-right: 5px;\n  color: #c00;\n}\n\n#mocha .test pre.error {\n  color: #c00;\n}\n\n#mocha .test pre {\n  display: inline-block;\n  font: 12px/1.5 monaco, monospace;\n  margin: 5px;\n  padding: 15px;\n  border: 1px solid #eee;\n  border-bottom-color: #ddd;\n  -webkit-border-radius: 3px;\n  -webkit-box-shadow: 0 1px 3px #eee;\n}\n\n#error {\n  color: #c00;\n  font-size: 1.5  em;\n  font-weight: 100;\n  letter-spacing: 1px;\n}\n\n#stats {\n  position: fixed;\n  top: 15px;\n  right: 10px;\n  font-size: 12px;\n  margin: 0;\n  color: #888;\n}\n\n#stats .progress {\n  float: right;\n  padding-top: 0;\n}\n\n#stats em {\n  color: black;\n}\n\n#stats li {\n  display: inline-block;\n  margin: 0 5px;\n  list-style: none;\n  padding-top: 11px;\n}\n\ncode .comment { color: #ddd }\ncode .init { color: #2F6FAD }\ncode .string { color: #5890AD }\ncode .keyword { color: #8A6343 }\ncode .number { color: #2F6FAD }"
  },
  {
    "path": "test/vendor/mocha.js",
    "content": ";(function(){\n\n\n// CommonJS require()\n\nfunction require(p){\n    var path = require.resolve(p)\n      , mod = require.modules[path];\n    if (!mod) throw new Error('failed to require \"' + p + '\"');\n    if (!mod.exports) {\n      mod.exports = {};\n      mod.call(mod.exports, mod, mod.exports, require.relative(path));\n    }\n    return mod.exports;\n  }\n\nrequire.modules = {};\n\nrequire.resolve = function (path){\n    var orig = path\n      , reg = path + '.js'\n      , index = path + '/index.js';\n    return require.modules[reg] && reg\n      || require.modules[index] && index\n      || orig;\n  };\n\nrequire.register = function (path, fn){\n    require.modules[path] = fn;\n  };\n\nrequire.relative = function (parent) {\n    return function(p){\n      if ('.' != p.charAt(0)) return require(p);\n      \n      var path = parent.split('/')\n        , segs = p.split('/');\n      path.pop();\n      \n      for (var i = 0; i < segs.length; i++) {\n        var seg = segs[i];\n        if ('..' == seg) path.pop();\n        else if ('.' != seg) path.push(seg);\n      }\n\n      return require(path.join('/'));\n    };\n  };\n\n\nrequire.register(\"browser/debug.js\", function(module, exports, require){\n\nmodule.exports = function(type){\n  return function(){\n    \n  }\n};\n}); // module: browser/debug.js\n\nrequire.register(\"browser/diff.js\", function(module, exports, require){\n\n}); // module: browser/diff.js\n\nrequire.register(\"browser/events.js\", function(module, exports, require){\n\n/**\n * Module exports.\n */\n\nexports.EventEmitter = EventEmitter;\n\n/**\n * Check if `obj` is an array.\n */\n\nfunction isArray(obj) {\n  return '[object Array]' == {}.toString.call(obj);\n}\n\n/**\n * Event emitter constructor.\n *\n * @api public.\n */\n\nfunction EventEmitter(){};\n\n/**\n * Adds a listener.\n *\n * @api public\n */\n\nEventEmitter.prototype.on = function (name, fn) {\n  if (!this.$events) {\n    this.$events = {};\n  }\n\n  if (!this.$events[name]) {\n    this.$events[name] = fn;\n  } else if (isArray(this.$events[name])) {\n    this.$events[name].push(fn);\n  } else {\n    this.$events[name] = [this.$events[name], fn];\n  }\n\n  return this;\n};\n\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n/**\n * Adds a volatile listener.\n *\n * @api public\n */\n\nEventEmitter.prototype.once = function (name, fn) {\n  var self = this;\n\n  function on () {\n    self.removeListener(name, on);\n    fn.apply(this, arguments);\n  };\n\n  on.listener = fn;\n  this.on(name, on);\n\n  return this;\n};\n\n/**\n * Removes a listener.\n *\n * @api public\n */\n\nEventEmitter.prototype.removeListener = function (name, fn) {\n  if (this.$events && this.$events[name]) {\n    var list = this.$events[name];\n\n    if (isArray(list)) {\n      var pos = -1;\n\n      for (var i = 0, l = list.length; i < l; i++) {\n        if (list[i] === fn || (list[i].listener && list[i].listener === fn)) {\n          pos = i;\n          break;\n        }\n      }\n\n      if (pos < 0) {\n        return this;\n      }\n\n      list.splice(pos, 1);\n\n      if (!list.length) {\n        delete this.$events[name];\n      }\n    } else if (list === fn || (list.listener && list.listener === fn)) {\n      delete this.$events[name];\n    }\n  }\n\n  return this;\n};\n\n/**\n * Removes all listeners for an event.\n *\n * @api public\n */\n\nEventEmitter.prototype.removeAllListeners = function (name) {\n  if (name === undefined) {\n    this.$events = {};\n    return this;\n  }\n\n  if (this.$events && this.$events[name]) {\n    this.$events[name] = null;\n  }\n\n  return this;\n};\n\n/**\n * Gets all listeners for a certain event.\n *\n * @api publci\n */\n\nEventEmitter.prototype.listeners = function (name) {\n  if (!this.$events) {\n    this.$events = {};\n  }\n\n  if (!this.$events[name]) {\n    this.$events[name] = [];\n  }\n\n  if (!isArray(this.$events[name])) {\n    this.$events[name] = [this.$events[name]];\n  }\n\n  return this.$events[name];\n};\n\n/**\n * Emits an event.\n *\n * @api public\n */\n\nEventEmitter.prototype.emit = function (name) {\n  if (!this.$events) {\n    return false;\n  }\n\n  var handler = this.$events[name];\n\n  if (!handler) {\n    return false;\n  }\n\n  var args = [].slice.call(arguments, 1);\n\n  if ('function' == typeof handler) {\n    handler.apply(this, args);\n  } else if (isArray(handler)) {\n    var listeners = handler.slice();\n\n    for (var i = 0, l = listeners.length; i < l; i++) {\n      listeners[i].apply(this, args);\n    }\n  } else {\n    return false;\n  }\n\n  return true;\n};\n}); // module: browser/events.js\n\nrequire.register(\"browser/fs.js\", function(module, exports, require){\n\n}); // module: browser/fs.js\n\nrequire.register(\"browser/path.js\", function(module, exports, require){\n\n}); // module: browser/path.js\n\nrequire.register(\"browser/progress.js\", function(module, exports, require){\n\n/**\n * Expose `Progress`.\n */\n\nmodule.exports = Progress;\n\n/**\n * Initialize a new `Progress` indicator.\n */\n\nfunction Progress() {\n  this.percent = 0;\n  this.size(0);\n  this.fontSize(11);\n  this.font('helvetica, arial, sans-serif');\n}\n\n/**\n * Set progress size to `n`.\n *\n * @param {Number} n\n * @return {Progress} for chaining\n * @api public\n */\n\nProgress.prototype.size = function(n){\n  this._size = n;\n  return this;\n};\n\n/**\n * Set text to `str`.\n *\n * @param {String} str\n * @return {Progress} for chaining\n * @api public\n */\n\nProgress.prototype.text = function(str){\n  this._text = str;\n  return this;\n};\n\n/**\n * Set font size to `n`.\n *\n * @param {Number} n\n * @return {Progress} for chaining\n * @api public\n */\n\nProgress.prototype.fontSize = function(n){\n  this._fontSize = n;\n  return this;\n};\n\n/**\n * Set font `family`.\n *\n * @param {String} family\n * @return {Progress} for chaining\n */\n\nProgress.prototype.font = function(family){\n  this._font = family;\n  return this;\n};\n\n/**\n * Update percentage to `n`.\n *\n * @param {Number} n\n * @return {Progress} for chaining\n */\n\nProgress.prototype.update = function(n){\n  this.percent = n;\n  return this;\n};\n\n/**\n * Draw on `ctx`.\n *\n * @param {CanvasRenderingContext2d} ctx\n * @return {Progress} for chaining\n */\n\nProgress.prototype.draw = function(ctx){\n  var percent = Math.min(this.percent, 100)\n    , size = this._size\n    , half = size / 2\n    , x = half\n    , y = half\n    , rad = half - 1\n    , fontSize = this._fontSize;\n\n  ctx.font = fontSize + 'px ' + this._font;\n\n  var angle = Math.PI * 2 * (percent / 100);\n  ctx.clearRect(0, 0, size, size);\n\n  // outer circle\n  ctx.strokeStyle = '#9f9f9f';\n  ctx.beginPath();\n  ctx.arc(x, y, rad, 0, angle, false);\n  ctx.stroke();\n\n  // inner circle\n  ctx.strokeStyle = '#eee';\n  ctx.beginPath();\n  ctx.arc(x, y, rad - 1, 0, angle, true);\n  ctx.stroke();\n\n  // text\n  var text = this._text || (percent | 0) + '%'\n    , w = ctx.measureText(text).width;\n\n  ctx.fillText(\n      text\n    , x - w / 2 + 1\n    , y + fontSize / 2 - 1);\n\n  return this;\n};\n\n}); // module: browser/progress.js\n\nrequire.register(\"browser/tty.js\", function(module, exports, require){\n\nexports.isatty = function(){\n  return true;\n};\n\nexports.getWindowSize = function(){\n  return [window.innerHeight, window.innerWidth];\n};\n}); // module: browser/tty.js\n\nrequire.register(\"context.js\", function(module, exports, require){\n\n/**\n * Expose `Context`.\n */\n\nmodule.exports = Context;\n\n/**\n * Initialize a new `Context`.\n *\n * @api private\n */\n\nfunction Context(){}\n\n/**\n * Set the context `Runnable` to `runnable`.\n *\n * @param {Runnable} runnable\n * @return {Context}\n * @api private\n */\n\nContext.prototype.runnable = function(runnable){\n  this._runnable = runnable;\n  return this;\n};\n\n/**\n * Set test timeout `ms`.\n *\n * @param {Number} ms\n * @return {Context} self\n * @api private\n */\n\nContext.prototype.timeout = function(ms){\n  this._runnable.timeout(ms);\n  return this;\n};\n\n/**\n * Inspect the context void of `._runnable`.\n *\n * @return {String}\n * @api private\n */\n\nContext.prototype.inspect = function(){\n  return JSON.stringify(this, function(key, val){\n    return '_runnable' == key\n      ? undefined\n      : val;\n  }, 2);\n};\n\n}); // module: context.js\n\nrequire.register(\"hook.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar Runnable = require('./runnable');\n\n/**\n * Expose `Hook`.\n */\n\nmodule.exports = Hook;\n\n/**\n * Initialize a new `Hook` with the given `title` and callback `fn`.\n *\n * @param {String} title\n * @param {Function} fn\n * @api private\n */\n\nfunction Hook(title, fn) {\n  Runnable.call(this, title, fn);\n  this.type = 'hook';\n}\n\n/**\n * Inherit from `Runnable.prototype`.\n */\n\nHook.prototype = new Runnable;\nHook.prototype.constructor = Hook;\n\n\n}); // module: hook.js\n\nrequire.register(\"interfaces/bdd.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar Suite = require('../suite')\n  , Test = require('../test');\n\n/**\n * BDD-style interface:\n * \n *      describe('Array', function(){\n *        describe('#indexOf()', function(){\n *          it('should return -1 when not present', function(){\n *\n *          });\n *\n *          it('should return the index when present', function(){\n *\n *          });\n *        });\n *      });\n * \n */\n\nmodule.exports = function(suite){\n  var suites = [suite];\n\n  suite.on('pre-require', function(context){\n\n    // noop variants\n\n    context.xdescribe = function(){};\n    context.xit = function(){};\n\n    /**\n     * Execute before running tests.\n     */\n\n    context.before = function(fn){\n      suites[0].beforeAll(fn);\n    };\n\n    /**\n     * Execute after running tests.\n     */\n\n    context.after = function(fn){\n      suites[0].afterAll(fn);\n    };\n\n    /**\n     * Execute before each test case.\n     */\n\n    context.beforeEach = function(fn){\n      suites[0].beforeEach(fn);\n    };\n\n    /**\n     * Execute after each test case.\n     */\n\n    context.afterEach = function(fn){\n      suites[0].afterEach(fn);\n    };\n\n    /**\n     * Describe a \"suite\" with the given `title`\n     * and callback `fn` containing nested suites\n     * and/or tests.\n     */\n  \n    context.describe = function(title, fn){\n      var suite = Suite.create(suites[0], title);\n      suites.unshift(suite);\n      fn();\n      suites.shift();\n    };\n\n    /**\n     * Describe a specification or test-case\n     * with the given `title` and callback `fn`\n     * acting as a thunk.\n     */\n\n    context.it = function(title, fn){\n      suites[0].addTest(new Test(title, fn));\n    };\n  });\n};\n\n}); // module: interfaces/bdd.js\n\nrequire.register(\"interfaces/exports.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar Suite = require('../suite')\n  , Test = require('../test');\n\n/**\n * TDD-style interface:\n * \n *     exports.Array = {\n *       '#indexOf()': {\n *         'should return -1 when the value is not present': function(){\n *           \n *         },\n *\n *         'should return the correct index when the value is present': function(){\n *           \n *         }\n *       }\n *     };\n * \n */\n\nmodule.exports = function(suite){\n  var suites = [suite];\n\n  suite.on('require', visit);\n\n  function visit(obj) {\n    var suite;\n    for (var key in obj) {\n      if ('function' == typeof obj[key]) {\n        var fn = obj[key];\n        switch (key) {\n          case 'before':\n            suites[0].beforeAll(fn);\n            break;\n          case 'after':\n            suites[0].afterAll(fn);\n            break;\n          case 'beforeEach':\n            suites[0].beforeEach(fn);\n            break;\n          case 'afterEach':\n            suites[0].afterEach(fn);\n            break;\n          default:\n            suites[0].addTest(new Test(key, fn));\n        }\n      } else {\n        var suite = Suite.create(suites[0], key);\n        suites.unshift(suite);\n        visit(obj[key]);\n        suites.shift();\n      }\n    }\n  }\n};\n}); // module: interfaces/exports.js\n\nrequire.register(\"interfaces/index.js\", function(module, exports, require){\n\nexports.bdd = require('./bdd');\nexports.tdd = require('./tdd');\nexports.qunit = require('./qunit');\nexports.exports = require('./exports');\n\n}); // module: interfaces/index.js\n\nrequire.register(\"interfaces/qunit.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar Suite = require('../suite')\n  , Test = require('../test');\n\n/**\n * QUnit-style interface:\n * \n *     suite('Array');\n *     \n *     test('#length', function(){\n *       var arr = [1,2,3];\n *       ok(arr.length == 3);\n *     });\n *     \n *     test('#indexOf()', function(){\n *       var arr = [1,2,3];\n *       ok(arr.indexOf(1) == 0);\n *       ok(arr.indexOf(2) == 1);\n *       ok(arr.indexOf(3) == 2);\n *     });\n *     \n *     suite('String');\n *     \n *     test('#length', function(){\n *       ok('foo'.length == 3);\n *     });\n * \n */\n\nmodule.exports = function(suite){\n  var suites = [suite];\n\n  suite.on('pre-require', function(context){\n\n    /**\n     * Execute before running tests.\n     */\n\n    context.before = function(fn){\n      suites[0].beforeAll(fn);\n    };\n\n    /**\n     * Execute after running tests.\n     */\n\n    context.after = function(fn){\n      suites[0].afterAll(fn);\n    };\n\n    /**\n     * Execute before each test case.\n     */\n\n    context.beforeEach = function(fn){\n      suites[0].beforeEach(fn);\n    };\n\n    /**\n     * Execute after each test case.\n     */\n\n    context.afterEach = function(fn){\n      suites[0].afterEach(fn);\n    };\n\n    /**\n     * Describe a \"suite\" with the given `title`.\n     */\n  \n    context.suite = function(title){\n      if (suites.length > 1) suites.shift();\n      var suite = Suite.create(suites[0], title);\n      suites.unshift(suite);\n    };\n\n    /**\n     * Describe a specification or test-case\n     * with the given `title` and callback `fn`\n     * acting as a thunk.\n     */\n\n    context.test = function(title, fn){\n      suites[0].addTest(new Test(title, fn));\n    };\n  });\n};\n\n}); // module: interfaces/qunit.js\n\nrequire.register(\"interfaces/tdd.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar Suite = require('../suite')\n  , Test = require('../test');\n\n/**\n * TDD-style interface:\n *\n *      suite('Array', function(){\n *        suite('#indexOf()', function(){\n *          suiteSetup(function(){\n *\n *          });\n *          \n *          test('should return -1 when not present', function(){\n *\n *          });\n *\n *          test('should return the index when present', function(){\n *\n *          });\n *\n *          suiteTeardown(function(){\n *\n *          });\n *        });\n *      });\n *\n */\n\nmodule.exports = function(suite){\n  var suites = [suite];\n\n  suite.on('pre-require', function(context){\n\n    /**\n     * Execute before each test case.\n     */\n\n    context.setup = function(fn){\n      suites[0].beforeEach(fn);\n    };\n\n    /**\n     * Execute after each test case.\n     */\n\n    context.teardown = function(fn){\n      suites[0].afterEach(fn);\n    };\n\n    /**\n     * Execute before the suite.\n     */\n\n    context.suiteSetup = function(fn){\n      suites[0].beforeAll(fn);\n    };\n\n    /**\n     * Execute after the suite.\n     */\n\n    context.suiteTeardown = function(fn){\n      suites[0].afterAll(fn);\n    };\n\n    /**\n     * Describe a \"suite\" with the given `title`\n     * and callback `fn` containing nested suites\n     * and/or tests.\n     */\n\n    context.suite = function(title, fn){\n      var suite = Suite.create(suites[0], title);\n      suites.unshift(suite);\n      fn();\n      suites.shift();\n    };\n\n    /**\n     * Describe a specification or test-case\n     * with the given `title` and callback `fn`\n     * acting as a thunk.\n     */\n\n    context.test = function(title, fn){\n      suites[0].addTest(new Test(title, fn));\n    };\n  });\n};\n\n}); // module: interfaces/tdd.js\n\nrequire.register(\"mocha.js\", function(module, exports, require){\n\n/*!\n * mocha\n * Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca>\n * MIT Licensed\n */\n\n/**\n * Module dependencies.\n */\n\nvar path = require('browser/path');\n\n/**\n * Expose `Mocha`.\n */\n\nexports = module.exports = Mocha;\n\n/**\n * Library version.\n */\n\nexports.version = '1.0.1';\n\n/**\n * Expose internals.\n */\n\nexports.utils = require('./utils');\nexports.interfaces = require('./interfaces');\nexports.reporters = require('./reporters');\nexports.Runnable = require('./runnable');\nexports.Context = require('./context');\nexports.Runner = require('./runner');\nexports.Suite = require('./suite');\nexports.Hook = require('./hook');\nexports.Test = require('./test');\n\n/**\n * Return image `name` path.\n *\n * @param {String} name\n * @return {String}\n * @api private\n */\n\nfunction image(name) {\n  return __dirname + '/../images/' + name + '.png';\n}\n\n/**\n * Setup mocha with `options`.\n *\n * Options:\n *\n *   - `ui` name \"bdd\", \"tdd\", \"exports\" etc\n *   - `reporter` reporter instance, defaults to `mocha.reporters.Dot`\n *   - `globals` array of accepted globals\n *   - `timeout` timeout in milliseconds\n *   - `ignoreLeaks` ignore global leaks\n *\n * @param {Object} options\n * @api public\n */\n\nfunction Mocha(options) {\n  options = options || {};\n  this.files = [];\n  this.options = options;\n  this.suite = new exports.Suite('', new exports.Context);\n  this.ui(options.ui);\n  this.reporter(options.reporter);\n  if (options.timeout) this.suite.timeout(options.timeout);\n}\n\n/**\n * Add test `file`.\n *\n * @param {String} file\n * @api public\n */\n\nMocha.prototype.addFile = function(file){\n  this.files.push(file);\n  return this;\n};\n\n/**\n * Set reporter to `name`, defaults to \"dot\".\n *\n * @param {String} name\n * @api public\n */\n\nMocha.prototype.reporter = function(name){\n  name = name || 'dot';\n  this._reporter = require('./reporters/' + name);\n  if (!this._reporter) throw new Error('invalid reporter \"' + name + '\"');\n  return this;\n};\n\n/**\n * Set test UI `name`, defaults to \"bdd\".\n *\n * @param {String} bdd\n * @api public\n */\n\nMocha.prototype.ui = function(name){\n  name = name || 'bdd';\n  this._ui = exports.interfaces[name];\n  if (!this._ui) throw new Error('invalid interface \"' + name + '\"');\n  this._ui = this._ui(this.suite);\n  return this;\n};\n\n/**\n * Load registered files.\n *\n * @api private\n */\n\nMocha.prototype.loadFiles = function(){\n  var suite = this.suite;\n  this.files.forEach(function(file){\n    file = path.resolve(file);\n    suite.emit('pre-require', global, file);\n    suite.emit('require', require(file), file);\n    suite.emit('post-require', global, file);\n  });\n};\n\n/**\n * Enable growl support.\n *\n * @api private\n */\n\nMocha.prototype.growl = function(runner, reporter) {\n  var notify = require('growl');\n\n  runner.on('end', function(){\n    var stats = reporter.stats;\n    if (stats.failures) {\n      var msg = stats.failures + ' of ' + runner.total + ' tests failed';\n      notify(msg, { title: 'Failed', image: image('fail') });\n    } else {\n      notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', {\n          title: 'Passed'\n        , image: image('pass')\n      });\n    }\n  });\n};\n\n/**\n * Run tests and invoke `fn()` when complete.\n *\n * @param {Function} fn\n * @return {Runner}\n * @api public\n */\n\nMocha.prototype.run = function(fn){\n  this.loadFiles();\n  var suite = this.suite;\n  var options = this.options;\n  var runner = new exports.Runner(suite);\n  var reporter = new this._reporter(runner);\n  runner.ignoreLeaks = options.ignoreLeaks;\n  if (options.grep) runner.grep(options.grep);\n  if (options.globals) runner.globals(options.globals);\n  if (options.growl) this.growl(runner, reporter);\n  return runner.run(fn);\n};\n\n}); // module: mocha.js\n\nrequire.register(\"reporters/base.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar tty = require('browser/tty')\n  , diff = require('browser/diff');\n\n/**\n * Check if both stdio streams are associated with a tty.\n */\n\nvar isatty = tty.isatty(1) && tty.isatty(2);\n\n/**\n * Expose `Base`.\n */\n\nexports = module.exports = Base;\n\n/**\n * Enable coloring by default.\n */\n\nexports.useColors = isatty;\n\n/**\n * Default color map.\n */\n\nexports.colors = {\n    'pass': 90\n  , 'fail': 31\n  , 'bright pass': 92\n  , 'bright fail': 91\n  , 'bright yellow': 93\n  , 'pending': 36\n  , 'suite': 0\n  , 'error title': 0\n  , 'error message': 31\n  , 'error stack': 90\n  , 'checkmark': 32\n  , 'fast': 90\n  , 'medium': 33\n  , 'slow': 31\n  , 'green': 32\n  , 'light': 90\n  , 'diff gutter': 90\n  , 'diff added': 42\n  , 'diff removed': 41\n};\n\n/**\n * Color `str` with the given `type`,\n * allowing colors to be disabled,\n * as well as user-defined color\n * schemes.\n *\n * @param {String} type\n * @param {String} str\n * @return {String}\n * @api private\n */\n\nvar color = exports.color = function(type, str) {\n  if (!exports.useColors) return str;\n  return '\\033[' + exports.colors[type] + 'm' + str + '\\033[0m';\n};\n\n/**\n * Expose term window size, with some\n * defaults for when stderr is not a tty.\n */\n\nexports.window = {\n  width: isatty\n    ? process.stdout.getWindowSize\n      ? process.stdout.getWindowSize(1)[0]\n      : tty.getWindowSize()[1]\n    : 75\n};\n\n/**\n * Expose some basic cursor interactions\n * that are common among reporters.\n */\n\nexports.cursor = {\n  hide: function(){\n    process.stdout.write('\\033[?25l');\n  },\n\n  show: function(){\n    process.stdout.write('\\033[?25h');\n  },\n\n  deleteLine: function(){\n    process.stdout.write('\\033[2K');\n  },\n\n  beginningOfLine: function(){\n    process.stdout.write('\\033[0G');\n  },\n\n  CR: function(){\n    exports.cursor.deleteLine();\n    exports.cursor.beginningOfLine();\n  }\n};\n\n/**\n * A test is considered slow if it\n * exceeds the following value in milliseconds.\n */\n\nexports.slow = 75;\n\n/**\n * Outut the given `failures` as a list.\n *\n * @param {Array} failures\n * @api public\n */\n\nexports.list = function(failures){\n  console.error();\n  failures.forEach(function(test, i){\n    // format\n    var fmt = color('error title', '  %s) %s:\\n')\n      + color('error message', '     %s')\n      + color('error stack', '\\n%s\\n');\n\n    // msg\n    var err = test.err\n      , message = err.message || ''\n      , stack = err.stack || message\n      , index = stack.indexOf(message) + message.length\n      , msg = stack.slice(0, index)\n      , actual = err.actual\n      , expected = err.expected;\n\n    // actual / expected diff\n    if ('string' == typeof actual && 'string' == typeof expected) {\n      var len = Math.max(actual.length, expected.length);\n\n      if (len < 20) msg = errorDiff(err, 'Chars');\n      else msg = errorDiff(err, 'Words');\n\n      // linenos\n      var lines = msg.split('\\n');\n      if (lines.length > 4) {\n        var width = String(lines.length).length;\n        msg = lines.map(function(str, i){\n          return pad(++i, width) + ' |' + ' ' + str;\n        }).join('\\n');\n      }\n\n      // legend\n      msg = '\\n'\n        + color('diff removed', 'actual')\n        + ' '\n        + color('diff added', 'expected')\n        + '\\n\\n'\n        + msg\n        + '\\n';\n\n      // indent\n      msg = msg.replace(/^/gm, '      ');\n\n      fmt = color('error title', '  %s) %s:\\n%s')\n        + color('error stack', '\\n%s\\n');\n    }\n\n    // indent stack trace without msg\n    stack = stack.slice(index ? index + 1 : index)\n      .replace(/^/gm, '  ');\n\n    console.error(fmt, (i + 1), test.fullTitle(), msg, stack);\n  });\n};\n\n/**\n * Initialize a new `Base` reporter.\n *\n * All other reporters generally\n * inherit from this reporter, providing\n * stats such as test duration, number\n * of tests passed / failed etc.\n *\n * @param {Runner} runner\n * @api public\n */\n\nfunction Base(runner) {\n  var self = this\n    , stats = this.stats = { suites: 0, tests: 0, passes: 0, failures: 0 }\n    , failures = this.failures = [];\n\n  if (!runner) return;\n  this.runner = runner;\n\n  runner.on('start', function(){\n    stats.start = new Date;\n  });\n\n  runner.on('suite', function(suite){\n    stats.suites = stats.suites || 0;\n    suite.root || stats.suites++;\n  });\n\n  runner.on('test end', function(test){\n    stats.tests = stats.tests || 0;\n    stats.tests++;\n  });\n\n  runner.on('pass', function(test){\n    stats.passes = stats.passes || 0;\n\n    var medium = exports.slow / 2;\n    test.speed = test.duration > exports.slow\n      ? 'slow'\n      : test.duration > medium\n        ? 'medium'\n        : 'fast';\n\n    stats.passes++;\n  });\n\n  runner.on('fail', function(test, err){\n    stats.failures = stats.failures || 0;\n    stats.failures++;\n    test.err = err;\n    failures.push(test);\n  });\n\n  runner.on('end', function(){\n    stats.end = new Date;\n    stats.duration = new Date - stats.start;\n  });\n}\n\n/**\n * Output common epilogue used by many of\n * the bundled reporters.\n *\n * @api public\n */\n\nBase.prototype.epilogue = function(){\n  var stats = this.stats\n    , fmt;\n\n  console.log();\n\n  // failure\n  if (stats.failures) {\n    fmt = color('bright fail', '  ✖')\n      + color('fail', ' %d of %d tests failed')\n      + color('light', ':')\n\n    console.error(fmt, stats.failures, this.runner.total);\n    Base.list(this.failures);\n    console.error();\n    return;\n  }\n\n  // pass\n  fmt = color('bright pass', '  ✔')\n    + color('green', ' %d tests complete')\n    + color('light', ' (%dms)');\n\n  console.log(fmt, stats.tests || 0, stats.duration);\n  console.log();\n};\n\n/**\n * Pad the given `str` to `len`.\n *\n * @param {String} str\n * @param {String} len\n * @return {String}\n * @api private\n */\n\nfunction pad(str, len) {\n  str = String(str);\n  return Array(len - str.length + 1).join(' ') + str;\n}\n\n/**\n * Return a character diff for `err`.\n *\n * @param {Error} err\n * @return {String}\n * @api private\n */\n\nfunction errorDiff(err, type) {\n  return diff['diff' + type](err.actual, err.expected).map(function(str){\n    if (str.added) return colorLines('diff added', str.value);\n    if (str.removed) return colorLines('diff removed', str.value);\n    return str.value;\n  }).join('');\n}\n\n/**\n * Color lines for `str`, using the color `name`.\n *\n * @param {String} name\n * @param {String} str\n * @return {String}\n * @api private\n */\n\nfunction colorLines(name, str) {\n  return str.split('\\n').map(function(str){\n    return color(name, str);\n  }).join('\\n');\n}\n\n}); // module: reporters/base.js\n\nrequire.register(\"reporters/doc.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base')\n  , utils = require('../utils');\n\n/**\n * Expose `Doc`.\n */\n\nexports = module.exports = Doc;\n\n/**\n * Initialize a new `Doc` reporter.\n *\n * @param {Runner} runner\n * @api public\n */\n\nfunction Doc(runner) {\n  Base.call(this, runner);\n\n  var self = this\n    , stats = this.stats\n    , total = runner.total\n    , indents = 2;\n\n  function indent() {\n    return Array(indents).join('  ');\n  }\n\n  runner.on('suite', function(suite){\n    if (suite.root) return;\n    ++indents;\n    console.log('%s<section class=\"suite\">', indent());\n    ++indents;\n    console.log('%s<h1>%s</h1>', indent(), suite.title);\n    console.log('%s<dl>', indent());\n  });\n\n  runner.on('suite end', function(suite){\n    if (suite.root) return;\n    console.log('%s</dl>', indent());\n    --indents;\n    console.log('%s</section>', indent());\n    --indents;\n  });\n\n  runner.on('pass', function(test){\n    console.log('%s  <dt>%s</dt>', indent(), test.title);\n    var code = utils.escape(clean(test.fn.toString()));\n    console.log('%s  <dd><pre><code>%s</code></pre></dd>', indent(), code);\n  });\n}\n\n/**\n * Strip the function definition from `str`,\n * and re-indent for pre whitespace.\n */\n\nfunction clean(str) {\n  str = str\n    .replace(/^function *\\(.*\\) *{/, '')\n    .replace(/\\s+\\}$/, '');\n\n  var spaces = str.match(/^\\n?( *)/)[1].length\n    , re = new RegExp('^ {' + spaces + '}', 'gm');\n\n  str = str.replace(re, '');\n\n  return str;\n}\n}); // module: reporters/doc.js\n\nrequire.register(\"reporters/dot.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base')\n  , color = Base.color;\n\n/**\n * Expose `Dot`.\n */\n\nexports = module.exports = Dot;\n\n/**\n * Initialize a new `Dot` matrix test reporter.\n *\n * @param {Runner} runner\n * @api public\n */\n\nfunction Dot(runner) {\n  Base.call(this, runner);\n\n  var self = this\n    , stats = this.stats\n    , width = Base.window.width * .75 | 0\n    , n = 0;\n\n  runner.on('start', function(){\n    process.stdout.write('\\n  ');\n  });\n\n  runner.on('pending', function(test){\n    process.stdout.write(color('pending', '.'));\n  });\n\n  runner.on('pass', function(test){\n    if (++n % width == 0) process.stdout.write('\\n  ');\n    if ('slow' == test.speed) {\n      process.stdout.write(color('bright yellow', '.'));\n    } else {\n      process.stdout.write(color(test.speed, '.'));\n    }\n  });\n\n  runner.on('fail', function(test, err){\n    if (++n % width == 0) process.stdout.write('\\n  ');\n    process.stdout.write(color('fail', '.'));\n  });\n\n  runner.on('end', function(){\n    console.log();\n    self.epilogue();\n  });\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\n\nDot.prototype = new Base;\nDot.prototype.constructor = Dot;\n\n}); // module: reporters/dot.js\n\nrequire.register(\"reporters/html-cov.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar JSONCov = require('./json-cov')\n  , fs = require('browser/fs');\n\n/**\n * Expose `HTMLCov`.\n */\n\nexports = module.exports = HTMLCov;\n\n/**\n * Initialize a new `JsCoverage` reporter.\n *\n * @param {Runner} runner\n * @api public\n */\n\nfunction HTMLCov(runner) {\n  var jade = require('jade')\n    , file = __dirname + '/templates/coverage.jade'\n    , str = fs.readFileSync(file, 'utf8')\n    , fn = jade.compile(str, { filename: file })\n    , self = this;\n\n  JSONCov.call(this, runner, false);\n\n  runner.on('end', function(){\n    process.stdout.write(fn({\n        cov: self.cov\n      , coverageClass: coverageClass\n    }));\n  });\n}\n\nfunction coverageClass(n) {\n  if (n >= 75) return 'high';\n  if (n >= 50) return 'medium';\n  if (n >= 25) return 'low';\n  return 'terrible';\n}\n}); // module: reporters/html-cov.js\n\nrequire.register(\"reporters/html.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base')\n  , utils = require('../utils')\n  , Progress = require('../browser/progress')\n  , escape = utils.escape;\n\n/**\n * Expose `Doc`.\n */\n\nexports = module.exports = HTML;\n\n/**\n * Stats template.\n */\n\nvar statsTemplate = '<ul id=\"stats\">'\n  + '<li class=\"progress\"><canvas width=\"40\" height=\"40\"></canvas></li>'\n  + '<li class=\"passes\">passes: <em>0</em></li>'\n  + '<li class=\"failures\">failures: <em>0</em></li>'\n  + '<li class=\"duration\">duration: <em>0</em>s</li>'\n  + '</ul>';\n\n/**\n * Initialize a new `Doc` reporter.\n *\n * @param {Runner} runner\n * @api public\n */\n\nfunction HTML(runner) {\n  Base.call(this, runner);\n\n  var self = this\n    , stats = this.stats\n    , total = runner.total\n    , root = document.getElementById('mocha')\n    , stat = fragment(statsTemplate)\n    , items = stat.getElementsByTagName('li')\n    , passes = items[1].getElementsByTagName('em')[0]\n    , failures = items[2].getElementsByTagName('em')[0]\n    , duration = items[3].getElementsByTagName('em')[0]\n    , canvas = stat.getElementsByTagName('canvas')[0]\n    , stack = [root]\n    , progress\n    , ctx\n\n  if (canvas.getContext) {\n    ctx = canvas.getContext('2d');\n    progress = new Progress;\n  }\n\n  if (!root) return error('#mocha div missing, add it to your document');\n\n  root.appendChild(stat);\n\n  if (progress) progress.size(40);\n\n  runner.on('suite', function(suite){\n    if (suite.root) return;\n\n    // suite\n    var el = fragment('<div class=\"suite\"><h1>%s</h1></div>', suite.title);\n\n    // container\n    stack[0].appendChild(el);\n    stack.unshift(document.createElement('div'));\n    el.appendChild(stack[0]);\n  });\n\n  runner.on('suite end', function(suite){\n    if (suite.root) return;\n    stack.shift();\n  });\n\n  runner.on('fail', function(test, err){\n    if ('hook' == test.type || err.uncaught) runner.emit('test end', test);\n  });\n\n  runner.on('test end', function(test){\n    // TODO: add to stats\n    var percent = stats.tests / total * 100 | 0;\n    if (progress) progress.update(percent).draw(ctx);\n\n    // update stats\n    var ms = new Date - stats.start;\n    text(passes, stats.passes);\n    text(failures, stats.failures);\n    text(duration, (ms / 1000).toFixed(2));\n\n    // test\n    if ('passed' == test.state) {\n      var el = fragment('<div class=\"test pass\"><h2>%e</h2></div>', test.title);\n    } else if (test.pending) {\n      var el = fragment('<div class=\"test pass pending\"><h2>%e</h2></div>', test.title);\n    } else {\n      var el = fragment('<div class=\"test fail\"><h2>%e</h2></div>', test.title);\n      var str = test.err.stack || test.err.toString();\n\n      // FF / Opera do not add the message\n      if (!~str.indexOf(test.err.message)) {\n        str = test.err.message + '\\n' + str;\n      }\n\n      // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we\n      // check for the result of the stringifying.\n      if ('[object Error]' == str) str = test.err.message;\n\n      // Safari doesn't give you a stack. Let's at least provide a source line.\n      if (!test.err.stack && test.err.sourceURL && test.err.line !== undefined) {\n        str += \"\\n(\" + test.err.sourceURL + \":\" + test.err.line + \")\";\n      }\n\n      el.appendChild(fragment('<pre class=\"error\">%e</pre>', str));\n    }\n\n    // toggle code\n    var h2 = el.getElementsByTagName('h2')[0];\n\n    on(h2, 'click', function(){\n      pre.style.display = 'none' == pre.style.display\n        ? 'block'\n        : 'none';\n    });\n\n    // code\n    // TODO: defer\n    if (!test.pending) {\n      var pre = fragment('<pre><code>%e</code></pre>', clean(test.fn.toString()));\n      el.appendChild(pre);\n      pre.style.display = 'none';\n    }\n\n    stack[0].appendChild(el);\n  });\n}\n\n/**\n * Display error `msg`.\n */\n\nfunction error(msg) {\n  document.body.appendChild(fragment('<div id=\"error\">%s</div>', msg));\n}\n\n/**\n * Return a DOM fragment from `html`.\n */\n\nfunction fragment(html) {\n  var args = arguments\n    , div = document.createElement('div')\n    , i = 1;\n\n  div.innerHTML = html.replace(/%([se])/g, function(_, type){\n    switch (type) {\n      case 's': return String(args[i++]);\n      case 'e': return escape(args[i++]);\n    }\n  });\n\n  return div.firstChild;\n}\n\n/**\n * Set `el` text to `str`.\n */\n\nfunction text(el, str) {\n  if (el.textContent) {\n    el.textContent = str;\n  } else {\n    el.innerText = str;\n  }\n}\n\n/**\n * Listen on `event` with callback `fn`.\n */\n\nfunction on(el, event, fn) {\n  if (el.addEventListener) {\n    el.addEventListener(event, fn, false);\n  } else {\n    el.attachEvent('on' + event, fn);\n  }\n}\n\n/**\n * Strip the function definition from `str`,\n * and re-indent for pre whitespace.\n */\n\nfunction clean(str) {\n  str = str\n    .replace(/^function *\\(.*\\) *{/, '')\n    .replace(/\\s+\\}$/, '');\n\n  var spaces = str.match(/^\\n?( *)/)[1].length\n    , re = new RegExp('^ {' + spaces + '}', 'gm');\n\n  str = str\n    .replace(re, '')\n    .replace(/^\\s+/, '');\n\n  return str;\n}\n\n}); // module: reporters/html.js\n\nrequire.register(\"reporters/index.js\", function(module, exports, require){\n\nexports.Base = require('./base');\nexports.Dot = require('./dot');\nexports.Doc = require('./doc');\nexports.TAP = require('./tap');\nexports.JSON = require('./json');\nexports.HTML = require('./html');\nexports.List = require('./list');\nexports.Min = require('./min');\nexports.Spec = require('./spec');\nexports.Progress = require('./progress');\nexports.Landing = require('./landing');\nexports.JSONCov = require('./json-cov');\nexports.HTMLCov = require('./html-cov');\nexports.JSONStream = require('./json-stream');\nexports.XUnit = require('./xunit')\nexports.Teamcity = require('./teamcity')\n\n}); // module: reporters/index.js\n\nrequire.register(\"reporters/json-cov.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base');\n\n/**\n * Expose `JSONCov`.\n */\n\nexports = module.exports = JSONCov;\n\n/**\n * Initialize a new `JsCoverage` reporter.\n *\n * @param {Runner} runner\n * @param {Boolean} output\n * @api public\n */\n\nfunction JSONCov(runner, output) {\n  var self = this\n    , output = 1 == arguments.length ? true : output;\n\n  Base.call(this, runner);\n\n  var tests = []\n    , failures = []\n    , passes = [];\n\n  runner.on('test end', function(test){\n    tests.push(test);\n  });\n\n  runner.on('pass', function(test){\n    passes.push(test);\n  });\n\n  runner.on('fail', function(test){\n    failures.push(test);\n  });\n\n  runner.on('end', function(){\n    var cov = global._$jscoverage || {};\n    var result = self.cov = map(cov);\n    result.stats = self.stats;\n    result.tests = tests.map(clean);\n    result.failures = failures.map(clean);\n    result.passes = passes.map(clean);\n    if (!output) return;\n    process.stdout.write(JSON.stringify(result, null, 2 ));\n  });\n}\n\n/**\n * Map jscoverage data to a JSON structure\n * suitable for reporting.\n *\n * @param {Object} cov\n * @return {Object}\n * @api private\n */\n\nfunction map(cov) {\n  var ret = {\n      instrumentation: 'node-jscoverage'\n    , sloc: 0\n    , hits: 0\n    , misses: 0\n    , coverage: 0\n    , files: []\n  };\n\n  for (var filename in cov) {\n    var data = coverage(filename, cov[filename]);\n    ret.files.push(data);\n    ret.hits += data.hits;\n    ret.misses += data.misses;\n    ret.sloc += data.sloc;\n  }\n\n  if (ret.sloc > 0) {\n    ret.coverage = (ret.hits / ret.sloc) * 100;\n  }\n\n  return ret;\n};\n\n/**\n * Map jscoverage data for a single source file\n * to a JSON structure suitable for reporting.\n *\n * @param {String} filename name of the source file\n * @param {Object} data jscoverage coverage data\n * @return {Object}\n * @api private\n */\n\nfunction coverage(filename, data) {\n  var ret = {\n    filename: filename,\n    coverage: 0,\n    hits: 0,\n    misses: 0,\n    sloc: 0,\n    source: {}\n  };\n\n  data.source.forEach(function(line, num){\n    num++;\n\n    if (data[num] === 0) {\n      ret.misses++;\n      ret.sloc++;\n    } else if (data[num] !== undefined) {\n      ret.hits++;\n      ret.sloc++;\n    }\n\n    ret.source[num] = {\n        source: line\n      , coverage: data[num] === undefined\n        ? ''\n        : data[num]\n    };\n  });\n\n  ret.coverage = ret.hits / ret.sloc * 100;\n\n  return ret;\n}\n\n/**\n * Return a plain-object representation of `test`\n * free of cyclic properties etc.\n *\n * @param {Object} test\n * @return {Object}\n * @api private\n */\n\nfunction clean(test) {\n  return {\n      title: test.title\n    , fullTitle: test.fullTitle()\n    , duration: test.duration\n  }\n}\n\n}); // module: reporters/json-cov.js\n\nrequire.register(\"reporters/json-stream.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base')\n  , color = Base.color;\n\n/**\n * Expose `List`.\n */\n\nexports = module.exports = List;\n\n/**\n * Initialize a new `List` test reporter.\n *\n * @param {Runner} runner\n * @api public\n */\n\nfunction List(runner) {\n  Base.call(this, runner);\n\n  var self = this\n    , stats = this.stats\n    , total = runner.total;\n\n  runner.on('start', function(){\n    console.log(JSON.stringify(['start', { total: total }]));\n  });\n\n  runner.on('pass', function(test){\n    console.log(JSON.stringify(['pass', clean(test)]));\n  });\n\n  runner.on('fail', function(test, err){\n    console.log(JSON.stringify(['fail', clean(test)]));\n  });\n\n  runner.on('end', function(){\n    process.stdout.write(JSON.stringify(['end', self.stats]));\n  });\n}\n\n/**\n * Return a plain-object representation of `test`\n * free of cyclic properties etc.\n *\n * @param {Object} test\n * @return {Object}\n * @api private\n */\n\nfunction clean(test) {\n  return {\n      title: test.title\n    , fullTitle: test.fullTitle()\n    , duration: test.duration\n  }\n}\n}); // module: reporters/json-stream.js\n\nrequire.register(\"reporters/json.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base')\n  , cursor = Base.cursor\n  , color = Base.color;\n\n/**\n * Expose `JSON`.\n */\n\nexports = module.exports = JSONReporter;\n\n/**\n * Initialize a new `JSON` reporter.\n *\n * @param {Runner} runner\n * @api public\n */\n\nfunction JSONReporter(runner) {\n  var self = this;\n  Base.call(this, runner);\n\n  var tests = []\n    , failures = []\n    , passes = [];\n\n  runner.on('test end', function(test){\n    tests.push(test);\n  });\n\n  runner.on('pass', function(test){\n    passes.push(test);\n  });\n\n  runner.on('fail', function(test){\n    failures.push(test);\n  });\n\n  runner.on('end', function(){\n    var obj = {\n        stats: self.stats\n      , tests: tests.map(clean)\n      , failures: failures.map(clean)\n      , passes: passes.map(clean)\n    };\n\n    process.stdout.write(JSON.stringify(obj, null, 2));\n  });\n}\n\n/**\n * Return a plain-object representation of `test`\n * free of cyclic properties etc.\n *\n * @param {Object} test\n * @return {Object}\n * @api private\n */\n\nfunction clean(test) {\n  return {\n      title: test.title\n    , fullTitle: test.fullTitle()\n    , duration: test.duration\n  }\n}\n}); // module: reporters/json.js\n\nrequire.register(\"reporters/landing.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base')\n  , cursor = Base.cursor\n  , color = Base.color;\n\n/**\n * Expose `Landing`.\n */\n\nexports = module.exports = Landing;\n\n/**\n * Airplane color.\n */\n\nBase.colors.plane = 0;\n\n/**\n * Airplane crash color.\n */\n\nBase.colors['plane crash'] = 31;\n\n/**\n * Runway color.\n */\n\nBase.colors.runway = 90;\n\n/**\n * Initialize a new `Landing` reporter.\n *\n * @param {Runner} runner\n * @api public\n */\n\nfunction Landing(runner) {\n  Base.call(this, runner);\n\n  var self = this\n    , stats = this.stats\n    , width = Base.window.width * .75 | 0\n    , total = runner.total\n    , stream = process.stdout\n    , plane = color('plane', '✈')\n    , crashed = -1\n    , n = 0;\n\n  function runway() {\n    var buf = Array(width).join('-');\n    return '  ' + color('runway', buf);\n  }\n\n  runner.on('start', function(){\n    stream.write('\\n  ');\n    cursor.hide();\n  });\n\n  runner.on('test end', function(test){\n    // check if the plane crashed\n    var col = -1 == crashed\n      ? width * ++n / total | 0\n      : crashed;\n\n    // show the crash\n    if ('failed' == test.state) {\n      plane = color('plane crash', '✈');\n      crashed = col;\n    }\n\n    // render landing strip\n    stream.write('\\033[4F\\n\\n');\n    stream.write(runway());\n    stream.write('\\n  ');\n    stream.write(color('runway', Array(col).join('⋅')));\n    stream.write(plane)\n    stream.write(color('runway', Array(width - col).join('⋅') + '\\n'));\n    stream.write(runway());\n    stream.write('\\033[0m');\n  });\n\n  runner.on('end', function(){\n    cursor.show();\n    console.log();\n    self.epilogue();\n  });\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\n\nLanding.prototype = new Base;\nLanding.prototype.constructor = Landing;\n\n}); // module: reporters/landing.js\n\nrequire.register(\"reporters/list.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base')\n  , cursor = Base.cursor\n  , color = Base.color;\n\n/**\n * Expose `List`.\n */\n\nexports = module.exports = List;\n\n/**\n * Initialize a new `List` test reporter.\n *\n * @param {Runner} runner\n * @api public\n */\n\nfunction List(runner) {\n  Base.call(this, runner);\n\n  var self = this\n    , stats = this.stats\n    , n = 0;\n\n  runner.on('start', function(){\n    console.log();\n  });\n\n  runner.on('test', function(test){\n    process.stdout.write(color('pass', '    ' + test.fullTitle() + ': '));\n  });\n\n  runner.on('pending', function(test){\n    var fmt = color('checkmark', '  -')\n      + color('pending', ' %s');\n    console.log(fmt, test.fullTitle());\n  });\n\n  runner.on('pass', function(test){\n    var fmt = color('checkmark', '  ✓')\n      + color('pass', ' %s: ')\n      + color(test.speed, '%dms');\n    cursor.CR();\n    console.log(fmt, test.fullTitle(), test.duration);\n  });\n\n  runner.on('fail', function(test, err){\n    cursor.CR();\n    console.log(color('fail', '  %d) %s'), ++n, test.fullTitle());\n  });\n\n  runner.on('end', self.epilogue.bind(self));\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\n\nList.prototype = new Base;\nList.prototype.constructor = List;\n\n\n}); // module: reporters/list.js\n\nrequire.register(\"reporters/markdown.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base')\n  , utils = require('../utils');\n\n/**\n * Expose `Markdown`.\n */\n\nexports = module.exports = Markdown;\n\n/**\n * Initialize a new `Markdown` reporter.\n *\n * @param {Runner} runner\n * @api public\n */\n\nfunction Markdown(runner) {\n  Base.call(this, runner);\n\n  var self = this\n    , stats = this.stats\n    , total = runner.total\n    , level = 0\n    , buf = '';\n\n  function title(str) {\n    return Array(level).join('#') + ' ' + str;\n  }\n\n  function indent() {\n    return Array(level).join('  ');\n  }\n\n  function mapTOC(suite, obj) {\n    var ret = obj;\n    obj = obj[suite.title] = obj[suite.title] || { suite: suite };\n    suite.suites.forEach(function(suite){\n      mapTOC(suite, obj);\n    });\n    return ret;\n  }\n\n  function stringifyTOC(obj, level) {\n    ++level;\n    var buf = '';\n    var link;\n    for (var key in obj) {\n      if ('suite' == key) continue;\n      if (key) link = ' - [' + key + '](#' + utils.slug(obj[key].suite.fullTitle()) + ')\\n';\n      if (key) buf += Array(level).join('  ') + link;\n      buf += stringifyTOC(obj[key], level);\n    }\n    --level;\n    return buf;\n  }\n\n  function generateTOC(suite) {\n    var obj = mapTOC(suite, {});\n    return stringifyTOC(obj, 0);\n  }\n\n  generateTOC(runner.suite);\n\n  runner.on('suite', function(suite){\n    ++level;\n    var slug = utils.slug(suite.fullTitle());\n    buf += '<a name=\"' + slug + '\" />' + '\\n';\n    buf += title(suite.title) + '\\n';\n  });\n\n  runner.on('suite end', function(suite){\n    --level;\n  });\n\n  runner.on('pass', function(test){\n    var code = clean(test.fn.toString());\n    buf += test.title + '.\\n';\n    buf += '\\n```js';\n    buf += code + '\\n';\n    buf += '```\\n\\n';\n  });\n\n  runner.on('end', function(){\n    process.stdout.write('# TOC\\n');\n    process.stdout.write(generateTOC(runner.suite));\n    process.stdout.write(buf);\n  });\n}\n\n/**\n * Strip the function definition from `str`,\n * and re-indent for pre whitespace.\n */\n\nfunction clean(str) {\n  str = str\n    .replace(/^function *\\(.*\\) *{/, '')\n    .replace(/\\s+\\}$/, '');\n\n  var spaces = str.match(/^\\n?( *)/)[1].length\n    , re = new RegExp('^ {' + spaces + '}', 'gm');\n\n  str = str.replace(re, '');\n\n  return str;\n}\n}); // module: reporters/markdown.js\n\nrequire.register(\"reporters/min.js\", function(module, exports, require){\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base');\n\n/**\n * Expose `Min`.\n */\n\nexports = module.exports = Min;\n\n/**\n * Initialize a new `Min` minimal test reporter (best used with --watch).\n *\n * @param {Runner} runner\n * @api public\n */\n\nfunction Min(runner) {\n  Base.call(this, runner);\n  \n  runner.on('start', function(){\n    // clear screen\n    process.stdout.write('\\033[2J');\n    // set cursor position\n    process.stdout.write('\\033[1;3H');\n  });\n\n  runner.on('end', this.epilogue.bind(this));\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\n\nMin.prototype = new Base;\nMin.prototype.constructor = Min;\n\n}); // module: reporters/min.js\n\nrequire.register(\"reporters/progress.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base')\n  , cursor = Base.cursor\n  , color = Base.color;\n\n/**\n * Expose `Progress`.\n */\n\nexports = module.exports = Progress;\n\n/**\n * General progress bar color.\n */\n\nBase.colors.progress = 90;\n\n/**\n * Initialize a new `Progress` bar test reporter.\n *\n * @param {Runner} runner\n * @param {Object} options\n * @api public\n */\n\nfunction Progress(runner, options) {\n  Base.call(this, runner);\n\n  var self = this\n    , options = options || {}\n    , stats = this.stats\n    , width = Base.window.width * .50 | 0\n    , total = runner.total\n    , complete = 0\n    , max = Math.max;\n\n  // default chars\n  options.open = options.open || '[';\n  options.complete = options.complete || '▬';\n  options.incomplete = options.incomplete || '⋅';\n  options.close = options.close || ']';\n  options.verbose = false;\n\n  // tests started\n  runner.on('start', function(){\n    console.log();\n    cursor.hide();\n  });\n\n  // tests complete\n  runner.on('test end', function(){\n    var incomplete = total - complete\n      , percent = complete++ / total\n      , n = width * percent | 0\n      , i = width - n;\n\n    cursor.CR();\n    process.stdout.write('\\033[J');\n    process.stdout.write(color('progress', '  ' + options.open));\n    process.stdout.write(Array(n).join(options.complete));\n    process.stdout.write(Array(i).join(options.incomplete));\n    process.stdout.write(color('progress', options.close));\n    if (options.verbose) {\n      process.stdout.write(color('progress', ' ' + complete + ' of ' + total));\n    }\n  });\n\n  // tests are complete, output some stats\n  // and the failures if any\n  runner.on('end', function(){\n    cursor.show();\n    console.log();\n    self.epilogue();\n  });\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\n\nProgress.prototype = new Base;\nProgress.prototype.constructor = Progress;\n\n\n}); // module: reporters/progress.js\n\nrequire.register(\"reporters/spec.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base')\n  , cursor = Base.cursor\n  , color = Base.color;\n\n/**\n * Expose `Spec`.\n */\n\nexports = module.exports = Spec;\n\n/**\n * Initialize a new `Spec` test reporter.\n *\n * @param {Runner} runner\n * @api public\n */\n\nfunction Spec(runner) {\n  Base.call(this, runner);\n\n  var self = this\n    , stats = this.stats\n    , indents = 0\n    , n = 0;\n\n  function indent() {\n    return Array(indents).join('  ')\n  }\n\n  runner.on('start', function(){\n    console.log();\n  });\n\n  runner.on('suite', function(suite){\n    ++indents;\n    console.log(color('suite', '%s%s'), indent(), suite.title);\n  });\n\n  runner.on('suite end', function(suite){\n    --indents;\n    if (1 == indents) console.log();\n  });\n\n  runner.on('test', function(test){\n    process.stdout.write(indent() + color('pass', '  ◦ ' + test.title + ': '));\n  });\n\n  runner.on('pending', function(test){\n    var fmt = indent() + color('pending', '  - %s');\n    console.log(fmt, test.title);\n  });\n\n  runner.on('pass', function(test){\n    if ('fast' == test.speed) {\n      var fmt = indent()\n        + color('checkmark', '  ✓')\n        + color('pass', ' %s ');\n      cursor.CR();\n      console.log(fmt, test.title);\n    } else {\n      var fmt = indent()\n        + color('checkmark', '  ✓')\n        + color('pass', ' %s ')\n        + color(test.speed, '(%dms)');\n      cursor.CR();\n      console.log(fmt, test.title, test.duration);\n    }\n  });\n\n  runner.on('fail', function(test, err){\n    cursor.CR();\n    console.log(indent() + color('fail', '  %d) %s'), ++n, test.title);\n  });\n\n  runner.on('end', self.epilogue.bind(self));\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\n\nSpec.prototype = new Base;\nSpec.prototype.constructor = Spec;\n\n\n}); // module: reporters/spec.js\n\nrequire.register(\"reporters/tap.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base')\n  , cursor = Base.cursor\n  , color = Base.color;\n\n/**\n * Expose `TAP`.\n */\n\nexports = module.exports = TAP;\n\n/**\n * Initialize a new `TAP` reporter.\n *\n * @param {Runner} runner\n * @api public\n */\n\nfunction TAP(runner) {\n  Base.call(this, runner);\n\n  var self = this\n    , stats = this.stats\n    , total = runner.total\n    , n = 1;\n\n  runner.on('start', function(){\n    console.log('%d..%d', 1, total);\n  });\n\n  runner.on('test end', function(){\n    ++n;\n  });\n\n  runner.on('pending', function(test){\n    console.log('ok %d %s # SKIP -', n, title(test));\n  });\n\n  runner.on('pass', function(test){\n    console.log('ok %d %s', n, title(test));\n  });\n\n  runner.on('fail', function(test, err){\n    console.log('not ok %d %s', n, title(test));\n    console.log(err.stack.replace(/^/gm, '  '));\n  });\n}\n\n/**\n * Return a TAP-safe title of `test`\n *\n * @param {Object} test\n * @return {String}\n * @api private\n */\n\nfunction title(test) {\n  return test.fullTitle().replace(/#/g, '');\n}\n\n}); // module: reporters/tap.js\n\nrequire.register(\"reporters/teamcity.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base');\n\n/**\n * Expose `Teamcity`.\n */\n\nexports = module.exports = Teamcity;\n\n/**\n * Initialize a new `Teamcity` reporter.\n *\n * @param {Runner} runner\n * @api public\n */\n\nfunction Teamcity(runner) {\n  Base.call(this, runner);\n  var stats = this.stats;\n\n  runner.on('start', function() {\n    console.log(\"##teamcity[testSuiteStarted name='mocha.suite']\");\n  });\n\n  runner.on('test', function(test) {\n    console.log(\"##teamcity[testStarted name='%s']\", escape(test.fullTitle()));\n  });\n\n  runner.on('fail', function(test, err) {\n    console.log(\"##teamcity[testFailed name='%s' message='%s']\", escape(test.fullTitle()), escape(err.message));\n  });\n\n  runner.on('pending', function(test) {\n    console.log(\"##teamcity[testIgnored name='%s' message='pending']\", escape(test.fullTitle()));\n  });\n\n  runner.on('test end', function(test) {\n    console.log(\"##teamcity[testFinished name='%s' duration='%s']\", escape(test.fullTitle()), test.duration);\n  });\n\n  runner.on('end', function() {\n    console.log(\"##teamcity[testSuiteFinished name='mocha.suite' duration='%s']\", stats.duration);\n  });\n}\n\n/**\n * Escape the given `str`.\n */\n\nfunction escape(str) {\n  return str.replace(/'/g, \"|'\");\n}\n}); // module: reporters/teamcity.js\n\nrequire.register(\"reporters/xunit.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base')\n  , utils = require('../utils')\n  , escape = utils.escape;\n\n/**\n * Expose `XUnit`.\n */\n\nexports = module.exports = XUnit;\n\n/**\n * Initialize a new `XUnit` reporter.\n *\n * @param {Runner} runner\n * @api public\n */\n\nfunction XUnit(runner) {\n  Base.call(this, runner);\n  var stats = this.stats\n    , tests = []\n    , self = this;\n\n  runner.on('test end', function(test){\n    tests.push(test);\n  });\n\n  runner.on('end', function(){\n    console.log(tag('testsuite', {\n        name: 'Mocha Tests'\n      , tests: stats.tests\n      , failures: stats.failures\n      , errors: stats.failures\n      , skip: stats.tests - stats.failures - stats.passes\n      , timestamp: (new Date).toUTCString()\n      , time: stats.duration / 1000\n    }, false));\n\n    tests.forEach(test);\n    console.log('</testsuite>');    \n  });\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\n\nXUnit.prototype = new Base;\nXUnit.prototype.constructor = XUnit;\n\n\n/**\n * Output tag for the given `test.`\n */\n\nfunction test(test) {\n  var attrs = {\n      classname: test.parent.fullTitle()\n    , name: test.title\n    , time: test.duration / 1000\n  };\n\n  if ('failed' == test.state) {\n    var err = test.err;\n    attrs.message = escape(err.message);\n    console.log(tag('testcase', attrs, false, tag('failure', attrs, false, cdata(err.stack))));\n  } else if (test.pending) {\n    console.log(tag('testcase', attrs, false, tag('skipped', {}, true)));\n  } else {\n    console.log(tag('testcase', attrs, true) );\n  }\n}\n\n/**\n * HTML tag helper.\n */\n\nfunction tag(name, attrs, close, content) {\n  var end = close ? '/>' : '>'\n    , pairs = []\n    , tag;\n\n  for (var key in attrs) {\n    pairs.push(key + '=\"' + escape(attrs[key]) + '\"');\n  }\n\n  tag = '<' + name + (pairs.length ? ' ' + pairs.join(' ') : '') + end;\n  if (content) tag += content + '</' + name + end;\n  return tag;\n}\n\n/**\n * Return cdata escaped CDATA `str`.\n */\n\nfunction cdata(str) {\n  return '<![CDATA[' + escape(str) + ']]>';\n}\n\n}); // module: reporters/xunit.js\n\nrequire.register(\"runnable.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar EventEmitter = require('browser/events').EventEmitter\n  , debug = require('browser/debug')('runnable');\n\n/**\n * Expose `Runnable`.\n */\n\nmodule.exports = Runnable;\n\n/**\n * Initialize a new `Runnable` with the given `title` and callback `fn`.\n *\n * @param {String} title\n * @param {Function} fn\n * @api private\n */\n\nfunction Runnable(title, fn) {\n  this.title = title;\n  this.fn = fn;\n  this.async = fn && fn.length;\n  this.sync = ! this.async;\n  this._timeout = 2000;\n  this.timedOut = false;\n}\n\n/**\n * Inherit from `EventEmitter.prototype`.\n */\n\nRunnable.prototype = new EventEmitter;\nRunnable.prototype.constructor = Runnable;\n\n\n/**\n * Set & get timeout `ms`.\n *\n * @param {Number} ms\n * @return {Runnable|Number} ms or self\n * @api private\n */\n\nRunnable.prototype.timeout = function(ms){\n  if (0 == arguments.length) return this._timeout;\n  debug('timeout %d', ms);\n  this._timeout = ms;\n  if (this.timer) this.resetTimeout();\n  return this;\n};\n\n/**\n * Return the full title generated by recursively\n * concatenating the parent's full title.\n *\n * @return {String}\n * @api public\n */\n\nRunnable.prototype.fullTitle = function(){\n  return this.parent.fullTitle() + ' ' + this.title;\n};\n\n/**\n * Clear the timeout.\n *\n * @api private\n */\n\nRunnable.prototype.clearTimeout = function(){\n  clearTimeout(this.timer);\n};\n\n/**\n * Reset the timeout.\n *\n * @api private\n */\n\nRunnable.prototype.resetTimeout = function(){\n  var self = this\n    , ms = this.timeout();\n\n  this.clearTimeout();\n  if (ms) {\n    this.timer = setTimeout(function(){\n      self.callback(new Error('timeout of ' + ms + 'ms exceeded'));\n      self.timedOut = true;\n    }, ms);\n  }\n};\n\n/**\n * Run the test and invoke `fn(err)`.\n *\n * @param {Function} fn\n * @api private\n */\n\nRunnable.prototype.run = function(fn){\n  var self = this\n    , ms = this.timeout()\n    , start = new Date\n    , ctx = this.ctx\n    , finished\n    , emitted;\n\n  if (ctx) ctx.runnable(this);\n\n  // timeout\n  if (this.async) {\n    if (ms) {\n      this.timer = setTimeout(function(){\n        done(new Error('timeout of ' + ms + 'ms exceeded'));\n        self.timedOut = true;\n      }, ms);\n    }\n  }\n\n  // called multiple times\n  function multiple() {\n    if (emitted) return;\n    emitted = true;\n    self.emit('error', new Error('done() called multiple times'));\n  }\n\n  // finished\n  function done(err) {\n    if (self.timedOut) return;\n    if (finished) return multiple();\n    self.clearTimeout();\n    self.duration = new Date - start;\n    finished = true;\n    fn(err);\n  }\n\n  // for .resetTimeout()\n  this.callback = done;\n\n  // async\n  if (this.async) {\n    try {\n      this.fn.call(ctx, function(err){\n        if (err instanceof Error) return done(err);\n        if (null != err) return done(new Error('done() invoked with non-Error: ' + err));\n        done();\n      });\n    } catch (err) {\n      done(err);\n    }\n    return;\n  }\n  \n  // sync\n  try {\n    if (!this.pending) this.fn.call(ctx);\n    this.duration = new Date - start;\n    fn();\n  } catch (err) {\n    fn(err);\n  }\n};\n\n}); // module: runnable.js\n\nrequire.register(\"runner.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar EventEmitter = require('browser/events').EventEmitter\n  , debug = require('browser/debug')('runner')\n  , Test = require('./test')\n  , utils = require('./utils')\n  , noop = function(){};\n\n/**\n * Expose `Runner`.\n */\n\nmodule.exports = Runner;\n\n/**\n * Initialize a `Runner` for the given `suite`.\n *\n * Events:\n *\n *   - `start`  execution started\n *   - `end`  execution complete\n *   - `suite`  (suite) test suite execution started\n *   - `suite end`  (suite) all tests (and sub-suites) have finished\n *   - `test`  (test) test execution started\n *   - `test end`  (test) test completed\n *   - `hook`  (hook) hook execution started\n *   - `hook end`  (hook) hook complete\n *   - `pass`  (test) test passed\n *   - `fail`  (test, err) test failed\n *\n * @api public\n */\n\nfunction Runner(suite) {\n  var self = this;\n  this._globals = [];\n  this.suite = suite;\n  this.total = suite.total();\n  this.failures = 0;\n  this.on('test end', function(test){ self.checkGlobals(test); });\n  this.on('hook end', function(hook){ self.checkGlobals(hook); });\n  this.grep(/.*/);\n  this.globals(utils.keys(global).concat(['errno']));\n}\n\n/**\n * Inherit from `EventEmitter.prototype`.\n */\n\nRunner.prototype = new EventEmitter;\nRunner.prototype.constructor = Runner;\n\n\n/**\n * Run tests with full titles matching `re`.\n *\n * @param {RegExp} re\n * @return {Runner} for chaining\n * @api public\n */\n\nRunner.prototype.grep = function(re){\n  debug('grep %s', re);\n  this._grep = re;\n  return this;\n};\n\n/**\n * Allow the given `arr` of globals.\n *\n * @param {Array} arr\n * @return {Runner} for chaining\n * @api public\n */\n\nRunner.prototype.globals = function(arr){\n  if (0 == arguments.length) return this._globals;\n  debug('globals %j', arr);\n  utils.forEach(arr, function(arr){\n    this._globals.push(arr);\n  }, this);\n  return this;\n};\n\n/**\n * Check for global variable leaks.\n *\n * @api private\n */\n\nRunner.prototype.checkGlobals = function(test){\n  if (this.ignoreLeaks) return;\n\n  var leaks = utils.filter(utils.keys(global), function(key){\n    return !~utils.indexOf(this._globals, key) && (!global.navigator || 'onerror' !== key);\n  }, this);\n\n  this._globals = this._globals.concat(leaks);\n\n  if (leaks.length > 1) {\n    this.fail(test, new Error('global leaks detected: ' + leaks.join(', ') + ''));\n  } else if (leaks.length) {\n    this.fail(test, new Error('global leak detected: ' + leaks[0]));\n  }\n};\n\n/**\n * Fail the given `test`.\n *\n * @param {Test} test\n * @param {Error} err\n * @api private\n */\n\nRunner.prototype.fail = function(test, err){\n  ++this.failures;\n  test.state = 'failed';\n  this.emit('fail', test, err);\n};\n\n/**\n * Fail the given `hook` with `err`.\n *\n * Hook failures (currently) hard-end due\n * to that fact that a failing hook will\n * surely cause subsequent tests to fail,\n * causing jumbled reporting.\n *\n * @param {Hook} hook\n * @param {Error} err\n * @api private\n */\n\nRunner.prototype.failHook = function(hook, err){\n  this.fail(hook, err);\n  this.emit('end');\n};\n\n/**\n * Run hook `name` callbacks and then invoke `fn()`.\n *\n * @param {String} name\n * @param {Function} function\n * @api private\n */\n\nRunner.prototype.hook = function(name, fn){\n  var suite = this.suite\n    , hooks = suite['_' + name]\n    , ms = suite._timeout\n    , self = this\n    , timer;\n\n  function next(i) {\n    var hook = hooks[i];\n    if (!hook) return fn();\n    self.currentRunnable = hook;\n\n    self.emit('hook', hook);\n\n    hook.on('error', function(err){\n      self.failHook(hook, err);\n    });\n\n    hook.run(function(err){\n      hook.removeAllListeners('error');\n      if (err) return self.failHook(hook, err);\n      self.emit('hook end', hook);\n      next(++i);\n    });\n  }\n\n  process.nextTick(function(){\n    next(0);\n  });\n};\n\n/**\n * Run hook `name` for the given array of `suites`\n * in order, and callback `fn(err)`.\n *\n * @param {String} name\n * @param {Array} suites\n * @param {Function} fn\n * @api private\n */\n\nRunner.prototype.hooks = function(name, suites, fn){\n  var self = this\n    , orig = this.suite;\n\n  function next(suite) {\n    self.suite = suite;\n\n    if (!suite) {\n      self.suite = orig;\n      return fn();\n    }\n\n    self.hook(name, function(err){\n      if (err) {\n        self.suite = orig;\n        return fn(err);\n      }\n\n      next(suites.pop());\n    });\n  }\n\n  next(suites.pop());\n};\n\n/**\n * Run hooks from the top level down.\n *\n * @param {String} name\n * @param {Function} fn\n * @api private\n */\n\nRunner.prototype.hookUp = function(name, fn){\n  var suites = [this.suite].concat(this.parents()).reverse();\n  this.hooks(name, suites, fn);\n};\n\n/**\n * Run hooks from the bottom up.\n *\n * @param {String} name\n * @param {Function} fn\n * @api private\n */\n\nRunner.prototype.hookDown = function(name, fn){\n  var suites = [this.suite].concat(this.parents());\n  this.hooks(name, suites, fn);\n};\n\n/**\n * Return an array of parent Suites from\n * closest to furthest.\n *\n * @return {Array}\n * @api private\n */\n\nRunner.prototype.parents = function(){\n  var suite = this.suite\n    , suites = [];\n  while (suite = suite.parent) suites.push(suite);\n  return suites;\n};\n\n/**\n * Run the current test and callback `fn(err)`.\n *\n * @param {Function} fn\n * @api private\n */\n\nRunner.prototype.runTest = function(fn){\n  var test = this.test\n    , self = this;\n\n  try {\n    test.on('error', function(err){\n      self.fail(test, err);\n    });\n    test.run(fn);\n  } catch (err) {\n    fn(err);\n  }\n};\n\n/**\n * Run tests in the given `suite` and invoke\n * the callback `fn()` when complete.\n *\n * @param {Suite} suite\n * @param {Function} fn\n * @api private\n */\n\nRunner.prototype.runTests = function(suite, fn){\n  var self = this\n    , tests = suite.tests\n    , test;\n\n  function next(err) {\n    // if we bail after first err\n    if (self.failures && suite._bail) return fn();\n\n    // next test\n    test = tests.shift();\n\n    // all done\n    if (!test) return fn();\n\n    // grep\n    if (!self._grep.test(test.fullTitle())) return next();\n\n    // pending\n    if (test.pending) {\n      self.emit('pending', test);\n      self.emit('test end', test);\n      return next();\n    }\n\n    // execute test and hook(s)\n    self.emit('test', self.test = test);\n    self.hookDown('beforeEach', function(){\n      self.currentRunnable = self.test;\n      self.runTest(function(err){\n        test = self.test;\n\n        if (err) {\n          self.fail(test, err);\n          self.emit('test end', test);\n          return self.hookUp('afterEach', next);\n        }\n\n        test.state = 'passed';\n        self.emit('pass', test);\n        self.emit('test end', test);\n        self.hookUp('afterEach', next);\n      });\n    });\n  }\n\n  this.next = next;\n  next();\n};\n\n/**\n * Run the given `suite` and invoke the\n * callback `fn()` when complete.\n *\n * @param {Suite} suite\n * @param {Function} fn\n * @api private\n */\n\nRunner.prototype.runSuite = function(suite, fn){\n  var self = this\n    , i = 0;\n\n  debug('run suite %s', suite.fullTitle());\n  this.emit('suite', this.suite = suite);\n\n  function next() {\n    var curr = suite.suites[i++];\n    if (!curr) return done();\n    self.runSuite(curr, next);\n  }\n\n  function done() {\n    self.suite = suite;\n    self.hook('afterAll', function(){\n      self.emit('suite end', suite);\n      fn();\n    });\n  }\n\n  this.hook('beforeAll', function(){\n    self.runTests(suite, next);\n  });\n};\n\n/**\n * Handle uncaught exceptions.\n *\n * @param {Error} err\n * @api private\n */\n\nRunner.prototype.uncaught = function(err){\n  debug('uncaught exception');\n  var runnable = this.currentRunnable;\n  if ('failed' == runnable.state) return;\n  runnable.clearTimeout();\n  err.uncaught = true;\n  this.fail(runnable, err);\n\n  // recover from test\n  if ('test' == runnable.type) {\n    this.emit('test end', runnable);\n    this.hookUp('afterEach', this.next);\n    return;\n  }\n\n  // bail on hooks\n  this.emit('end');\n};\n\n/**\n * Run the root suite and invoke `fn(failures)`\n * on completion.\n *\n * @param {Function} fn\n * @return {Runner} for chaining\n * @api public\n */\n\nRunner.prototype.run = function(fn){\n  var self = this\n    , fn = fn || function(){};\n\n  debug('start');\n\n  // callback\n  this.on('end', function(){\n    debug('end');\n    process.removeListener('uncaughtException', this.uncaught);\n    fn(self.failures);\n  });\n\n  // run suites\n  this.emit('start');\n  this.runSuite(this.suite, function(){\n    debug('finished running');\n    self.emit('end');\n  });\n\n  // uncaught exception\n  process.on('uncaughtException', function(err){\n    self.uncaught(err);\n  });\n\n  return this;\n};\n\n}); // module: runner.js\n\nrequire.register(\"suite.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar EventEmitter = require('browser/events').EventEmitter\n  , debug = require('browser/debug')('suite')\n  , utils = require('./utils')\n  , Hook = require('./hook');\n\n/**\n * Expose `Suite`.\n */\n\nexports = module.exports = Suite;\n\n/**\n * Create a new `Suite` with the given `title`\n * and parent `Suite`. When a suite with the\n * same title is already present, that suite\n * is returned to provide nicer reporter\n * and more flexible meta-testing.\n *\n * @param {Suite} parent\n * @param {String} title\n * @return {Suite}\n * @api public\n */\n\nexports.create = function(parent, title){\n  var suite = new Suite(title, parent.ctx);\n  suite.parent = parent;\n  title = suite.fullTitle();\n  parent.addSuite(suite);\n  return suite;\n};\n\n/**\n * Initialize a new `Suite` with the given\n * `title` and `ctx`.\n *\n * @param {String} title\n * @param {Context} ctx\n * @api private\n */\n\nfunction Suite(title, ctx) {\n  this.title = title;\n  this.ctx = ctx;\n  this.suites = [];\n  this.tests = [];\n  this._beforeEach = [];\n  this._beforeAll = [];\n  this._afterEach = [];\n  this._afterAll = [];\n  this.root = !title;\n  this._timeout = 2000;\n  this._bail = false;\n}\n\n/**\n * Inherit from `EventEmitter.prototype`.\n */\n\nSuite.prototype = new EventEmitter;\nSuite.prototype.constructor = Suite;\n\n\n/**\n * Return a clone of this `Suite`.\n *\n * @return {Suite}\n * @api private\n */\n\nSuite.prototype.clone = function(){\n  var suite = new Suite(this.title);\n  debug('clone');\n  suite.ctx = this.ctx;\n  suite.timeout(this.timeout());\n  suite.bail(this.bail());\n  return suite;\n};\n\n/**\n * Set timeout `ms` or short-hand such as \"2s\".\n *\n * @param {Number|String} ms\n * @return {Suite|Number} for chaining\n * @api private\n */\n\nSuite.prototype.timeout = function(ms){\n  if (0 == arguments.length) return this._timeout;\n  if (String(ms).match(/s$/)) ms = parseFloat(ms) * 1000;\n  debug('timeout %d', ms);\n  this._timeout = parseInt(ms, 10);\n  return this;\n};\n\n/**\n * Sets whether to bail after first error.\n *\n * @parma {Boolean} bail\n * @return {Suite|Number} for chaining\n * @api private\n */\n\nSuite.prototype.bail = function(bail){\n  if (0 == arguments.length) return this._bail;\n  debug('bail %s', bail);\n  this._bail = bail;\n  return this;\n};\n\n/**\n * Run `fn(test[, done])` before running tests.\n *\n * @param {Function} fn\n * @return {Suite} for chaining\n * @api private\n */\n\nSuite.prototype.beforeAll = function(fn){\n  var hook = new Hook('\"before all\" hook', fn);\n  hook.parent = this;\n  hook.timeout(this.timeout());\n  hook.ctx = this.ctx;\n  this._beforeAll.push(hook);\n  this.emit('beforeAll', hook);\n  return this;\n};\n\n/**\n * Run `fn(test[, done])` after running tests.\n *\n * @param {Function} fn\n * @return {Suite} for chaining\n * @api private\n */\n\nSuite.prototype.afterAll = function(fn){\n  var hook = new Hook('\"after all\" hook', fn);\n  hook.parent = this;\n  hook.timeout(this.timeout());\n  hook.ctx = this.ctx;\n  this._afterAll.push(hook);\n  this.emit('afterAll', hook);\n  return this;\n};\n\n/**\n * Run `fn(test[, done])` before each test case.\n *\n * @param {Function} fn\n * @return {Suite} for chaining\n * @api private\n */\n\nSuite.prototype.beforeEach = function(fn){\n  var hook = new Hook('\"before each\" hook', fn);\n  hook.parent = this;\n  hook.timeout(this.timeout());\n  hook.ctx = this.ctx;\n  this._beforeEach.push(hook);\n  this.emit('beforeEach', hook);\n  return this;\n};\n\n/**\n * Run `fn(test[, done])` after each test case.\n *\n * @param {Function} fn\n * @return {Suite} for chaining\n * @api private\n */\n\nSuite.prototype.afterEach = function(fn){\n  var hook = new Hook('\"after each\" hook', fn);\n  hook.parent = this;\n  hook.timeout(this.timeout());\n  hook.ctx = this.ctx;\n  this._afterEach.push(hook);\n  this.emit('afterEach', hook);\n  return this;\n};\n\n/**\n * Add a test `suite`.\n *\n * @param {Suite} suite\n * @return {Suite} for chaining\n * @api private\n */\n\nSuite.prototype.addSuite = function(suite){\n  suite.parent = this;\n  suite.timeout(this.timeout());\n  suite.bail(this.bail());\n  this.suites.push(suite);\n  this.emit('suite', suite);\n  return this;\n};\n\n/**\n * Add a `test` to this suite.\n *\n * @param {Test} test\n * @return {Suite} for chaining\n * @api private\n */\n\nSuite.prototype.addTest = function(test){\n  test.parent = this;\n  test.timeout(this.timeout());\n  test.ctx = this.ctx;\n  this.tests.push(test);\n  this.emit('test', test);\n  return this;\n};\n\n/**\n * Return the full title generated by recursively\n * concatenating the parent's full title.\n *\n * @return {String}\n * @api public\n */\n\nSuite.prototype.fullTitle = function(){\n  if (this.parent) {\n    var full = this.parent.fullTitle();\n    if (full) return full + ' ' + this.title;\n  }\n  return this.title;\n};\n\n/**\n * Return the total number of tests.\n *\n * @return {Number}\n * @api public\n */\n\nSuite.prototype.total = function(){\n  return utils.reduce(this.suites, function(sum, suite){\n    return sum + suite.total();\n  }, 0) + this.tests.length;\n};\n\n}); // module: suite.js\n\nrequire.register(\"test.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar Runnable = require('./runnable');\n\n/**\n * Expose `Test`.\n */\n\nmodule.exports = Test;\n\n/**\n * Initialize a new `Test` with the given `title` and callback `fn`.\n *\n * @param {String} title\n * @param {Function} fn\n * @api private\n */\n\nfunction Test(title, fn) {\n  Runnable.call(this, title, fn);\n  this.pending = !fn;\n  this.type = 'test';\n}\n\n/**\n * Inherit from `Runnable.prototype`.\n */\n\nTest.prototype = new Runnable;\nTest.prototype.constructor = Test;\n\n\n/**\n * Inspect the context void of private properties.\n *\n * @return {String}\n * @api private\n */\n\nTest.prototype.inspect = function(){\n  return JSON.stringify(this, function(key, val){\n    return '_' == key[0]\n      ? undefined\n      : 'parent' == key\n        ? '#<Suite>'\n        : val;\n  }, 2);\n};\n}); // module: test.js\n\nrequire.register(\"utils.js\", function(module, exports, require){\n\n/**\n * Module dependencies.\n */\n\nvar fs = require('browser/fs')\n  , path = require('browser/path')\n  , join = path.join\n  , debug = require('browser/debug')('watch');\n\n/**\n * Ignored directories.\n */\n\nvar ignore = ['node_modules', '.git'];\n\n/**\n * Escape special characters in the given string of html.\n *\n * @param  {String} html\n * @return {String}\n * @api private\n */\n\nexports.escape = function(html) {\n  return String(html)\n    .replace(/&/g, '&amp;')\n    .replace(/\"/g, '&quot;')\n    .replace(/</g, '&lt;')\n    .replace(/>/g, '&gt;');\n};\n\n/**\n * Array#forEach (<=IE8)\n *\n * @param {Array} array\n * @param {Function} fn\n * @param {Object} scope\n * @api private\n */\n\nexports.forEach = function(arr, fn, scope) {\n  for (var i = 0, l = arr.length; i < l; i++)\n    fn.call(scope, arr[i], i);\n};\n\n/**\n * Array#indexOf (<=IE8)\n *\n * @parma {Array} arr\n * @param {Object} obj to find index of\n * @param {Number} start\n * @api private\n */\n\nexports.indexOf = function (arr, obj, start) {\n  for (var i = start || 0, l = arr.length; i < l; i++) {\n    if (arr[i] === obj)\n      return i;\n  }\n  return -1;\n};\n\n/**\n * Array#reduce (<=IE8)\n * \n * @param {Array} array\n * @param {Function} fn\n * @param {Object} initial value\n * @param {Object} scope\n * @api private\n */\n\nexports.reduce = function(arr, fn, val, scope) {\n  var rval = val;\n\n  for (var i = 0, l = arr.length; i < l; i++) {\n    rval = fn.call(scope, rval, arr[i], i, arr);\n  }\n\n  return rval;\n};\n\n/**\n * Array#filter (<=IE8)\n *\n * @param {Array} array\n * @param {Function} fn\n * @param {Object} scope\n * @api private\n */\n\nexports.filter = function(arr, fn, scope) {\n  var ret = [];\n\n  for (var i = 0, l = arr.length; i < l; i++) {\n    var val = arr[i];\n    if (fn.call(scope, val, i, arr))\n      ret.push(val);\n  }\n\n  return ret;\n};\n\n/**\n * Object.keys (<=IE8)\n *\n * @param {Object} obj\n * @return {Array} keys\n * @api private\n */\n\nexports.keys = Object.keys || function(obj) {\n  var keys = []\n    , has = Object.prototype.hasOwnProperty // for `window` on <=IE8\n\n  for (var key in obj) {\n    if (has.call(obj, key)) {\n      keys.push(key);\n    }\n  }\n\n  return keys;\n};\n\n/**\n * Watch the given `files` for changes\n * and invoke `fn(file)` on modification.\n *\n * @param {Array} files\n * @param {Function} fn\n * @api private\n */\n\nexports.watch = function(files, fn){\n  var options = { interval: 100 };\n  files.forEach(function(file){\n    debug('file %s', file);\n    fs.watchFile(file, options, function(curr, prev){\n      if (prev.mtime < curr.mtime) fn(file);\n    });\n  });\n};\n\n/**\n * Ignored files.\n */\n\nfunction ignored(path){\n  return !~ignore.indexOf(path);\n}\n\n/**\n * Lookup files in the given `dir`.\n *\n * @return {Array}\n * @api private\n */\n\nexports.files = function(dir, ret){\n  ret = ret || [];\n\n  fs.readdirSync(dir)\n  .filter(ignored)\n  .forEach(function(path){\n    path = join(dir, path);\n    if (fs.statSync(path).isDirectory()) {\n      exports.files(path, ret);\n    } else if (path.match(/\\.(js|coffee)$/)) {\n      ret.push(path);\n    }\n  });\n\n  return ret;\n};\n\n/**\n * Compute a slug from the given `str`.\n *\n * @param {String} str\n * @return {String}\n */\n\nexports.slug = function(str){\n  return str\n    .toLowerCase()\n    .replace(/ +/g, '-')\n    .replace(/[^-\\w]/g, '');\n};\n}); // module: utils.js\n/**\n * Node shims.\n *\n * These are meant only to allow\n * mocha.js to run untouched, not\n * to allow running node code in\n * the browser.\n */\n\nprocess = {};\nprocess.exit = function(status){};\nprocess.stdout = {};\nglobal = window;\n\n/**\n * next tick implementation.\n */\n\nprocess.nextTick = (function(){\n  // postMessage behaves badly on IE8\n  if (window.ActiveXObject || !window.postMessage) {\n    return function(fn){ fn() };\n  }\n\n  // based on setZeroTimeout by David Baron\n  // - http://dbaron.org/log/20100309-faster-timeouts\n  var timeouts = []\n    , name = 'mocha-zero-timeout'\n\n  return function(fn){\n    timeouts.push(fn);\n    window.postMessage(name, '*');\n    window.addEventListener('message', function(e){\n      if (e.source == window && e.data == name) {\n        if (e.stopPropagation) e.stopPropagation();\n        if (timeouts.length) timeouts.shift()();\n      }\n    }, true);\n  }\n})();\n\n/**\n * Remove uncaughtException listener.\n */\n\nprocess.removeListener = function(e){\n  if ('uncaughtException' == e) {\n    window.onerror = null;\n  }\n};\n\n/**\n * Implements uncaughtException listener.\n */\n\nprocess.on = function(e, fn){\n  if ('uncaughtException' == e) {\n    window.onerror = fn;\n  }\n};\n\n/**\n * Expose mocha.\n */\n\nwindow.mocha = require('mocha');\n\n// boot\n;(function(){\n  var suite = new mocha.Suite('', new mocha.Context)\n    , utils = mocha.utils\n    , options = {}\n\n  /**\n   * Highlight the given string of `js`.\n   */\n\n  function highlight(js) {\n    return js\n      .replace(/</g, '&lt;')\n      .replace(/>/g, '&gt;')\n      .replace(/\\/\\/(.*)/gm, '<span class=\"comment\">//$1</span>')\n      .replace(/('.*?')/gm, '<span class=\"string\">$1</span>')\n      .replace(/(\\d+\\.\\d+)/gm, '<span class=\"number\">$1</span>')\n      .replace(/(\\d+)/gm, '<span class=\"number\">$1</span>')\n      .replace(/\\bnew *(\\w+)/gm, '<span class=\"keyword\">new</span> <span class=\"init\">$1</span>')\n      .replace(/\\b(function|new|throw|return|var|if|else)\\b/gm, '<span class=\"keyword\">$1</span>')\n  }\n\n  /**\n   * Highlight code contents.\n   */\n\n  function highlightCode() {\n    var code = document.getElementsByTagName('code');\n    for (var i = 0, len = code.length; i < len; ++i) {\n      code[i].innerHTML = highlight(code[i].innerHTML);\n    }\n  }\n\n  /**\n   * Parse the given `qs`.\n   */\n\n  function parse(qs) {\n    return utils.reduce(qs.replace('?', '').split('&'), function(obj, pair){\n        var i = pair.indexOf('=')\n          , key = pair.slice(0, i)\n          , val = pair.slice(++i);\n\n        obj[key] = decodeURIComponent(val);\n        return obj;\n      }, {});\n  }\n\n  /**\n   * Setup mocha with the given setting options.\n   */\n\n  mocha.setup = function(opts){\n    if ('string' === typeof opts) options.ui = opts;\n    else options = opts;\n\n    ui = mocha.interfaces[options.ui];\n    if (!ui) throw new Error('invalid mocha interface \"' + ui + '\"');\n    if (options.timeout) suite.timeout(options.timeout);\n    ui(suite);\n    suite.emit('pre-require', window);\n  };\n\n  /**\n   * Run mocha, returning the Runner.\n   */\n\n  mocha.run = function(fn){\n    suite.emit('run');\n    var runner = new mocha.Runner(suite);\n    var Reporter = options.reporter || mocha.reporters.HTML;\n    var reporter = new Reporter(runner);\n    var query = parse(window.location.search || \"\");\n    if (query.grep) runner.grep(new RegExp(query.grep));\n    if (options.ignoreLeaks) runner.ignoreLeaks = true;\n    if (options.globals) runner.globals(options.globals);\n    runner.globals(['location']);\n    runner.on('end', highlightCode);\n    return runner.run(fn);\n  };\n})();\n})();"
  },
  {
    "path": "test/vendor/require.js",
    "content": "/*\n RequireJS 2.0.5 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.\n Available via the MIT or new BSD license.\n see: http://github.com/jrburke/requirejs for details\n*/\nvar requirejs,require,define;\n(function(Y){function w(b){return I.call(b)===\"[object Function]\"}function D(b){return I.call(b)===\"[object Array]\"}function o(b,c){if(b){var d;for(d=0;d<b.length;d+=1)if(b[d]&&c(b[d],d,b))break}}function M(b,c){if(b){var d;for(d=b.length-1;d>-1;d-=1)if(b[d]&&c(b[d],d,b))break}}function x(b,c){for(var d in b)if(b.hasOwnProperty(d)&&c(b[d],d))break}function J(b,c,d,g){c&&x(c,function(c,j){if(d||!E.call(b,j))g&&typeof c!==\"string\"?(b[j]||(b[j]={}),J(b[j],c,d,g)):b[j]=c});return b}function t(b,c){return function(){return c.apply(b,\narguments)}}function Z(b){if(!b)return b;var c=Y;o(b.split(\".\"),function(b){c=c[b]});return c}function $(b,c,d){return function(){var g=ga.call(arguments,0),f;if(d&&w(f=g[g.length-1]))f.__requireJsBuild=!0;g.push(c);return b.apply(null,g)}}function aa(b,c,d){o([[\"toUrl\"],[\"undef\"],[\"defined\",\"requireDefined\"],[\"specified\",\"requireSpecified\"]],function(g){var f=g[1]||g[0];b[g[0]]=c?$(c[f],d):function(){var b=y[N];return b[f].apply(b,arguments)}})}function F(b,c,d,g){c=Error(c+\"\\nhttp://requirejs.org/docs/errors.html#\"+\nb);c.requireType=b;c.requireModules=g;if(d)c.originalError=d;return c}function ha(){if(G&&G.readyState===\"interactive\")return G;M(document.getElementsByTagName(\"script\"),function(b){if(b.readyState===\"interactive\")return G=b});return G}var j,p,u,A,s,B,G,H,ba,ca,ia=/(\\/\\*([\\s\\S]*?)\\*\\/|([^:]|^)\\/\\/(.*)$)/mg,ja=/[^.]\\s*require\\s*\\(\\s*[\"']([^'\"\\s]+)[\"']\\s*\\)/g,da=/\\.js$/,ka=/^\\.\\//;p=Object.prototype;var I=p.toString,E=p.hasOwnProperty;p=Array.prototype;var ga=p.slice,la=p.splice,v=!!(typeof window!==\n\"undefined\"&&navigator&&document),ea=!v&&typeof importScripts!==\"undefined\",ma=v&&navigator.platform===\"PLAYSTATION 3\"?/^complete$/:/^(complete|loaded)$/,N=\"_\",R=typeof opera!==\"undefined\"&&opera.toString()===\"[object Opera]\",y={},r={},O=[],K=!1;if(typeof define===\"undefined\"){if(typeof requirejs!==\"undefined\"){if(w(requirejs))return;r=requirejs;requirejs=void 0}typeof require!==\"undefined\"&&!w(require)&&(r=require,require=void 0);j=requirejs=function(b,c,d,g){var f,o=N;!D(b)&&typeof b!==\"string\"&&\n(f=b,D(c)?(b=c,c=d,d=g):b=[]);if(f&&f.context)o=f.context;(g=y[o])||(g=y[o]=j.s.newContext(o));f&&g.configure(f);return g.require(b,c,d)};j.config=function(b){return j(b)};require||(require=j);j.version=\"2.0.5\";j.jsExtRegExp=/^\\/|:|\\?|\\.js$/;j.isBrowser=v;p=j.s={contexts:y,newContext:function(b){function c(a,e,k){var m,b,n,c,f,d,h,g=e&&e.split(\"/\");m=g;var j=l.map,i=j&&j[\"*\"];if(a&&a.charAt(0)===\".\")if(e){m=l.pkgs[e]?g=[e]:g.slice(0,g.length-1);e=a=m.concat(a.split(\"/\"));for(m=0;e[m];m+=1)if(b=e[m],\nb===\".\")e.splice(m,1),m-=1;else if(b===\"..\")if(m===1&&(e[2]===\"..\"||e[0]===\"..\"))break;else m>0&&(e.splice(m-1,2),m-=2);m=l.pkgs[e=a[0]];a=a.join(\"/\");m&&a===e+\"/\"+m.main&&(a=e)}else a.indexOf(\"./\")===0&&(a=a.substring(2));if(k&&(g||i)&&j){e=a.split(\"/\");for(m=e.length;m>0;m-=1){n=e.slice(0,m).join(\"/\");if(g)for(b=g.length;b>0;b-=1)if(k=j[g.slice(0,b).join(\"/\")])if(k=k[n]){c=k;f=m;break}if(c)break;!d&&i&&i[n]&&(d=i[n],h=m)}!c&&d&&(c=d,f=h);c&&(e.splice(0,f,c),a=e.join(\"/\"))}return a}function d(a){v&&\no(document.getElementsByTagName(\"script\"),function(e){if(e.getAttribute(\"data-requiremodule\")===a&&e.getAttribute(\"data-requirecontext\")===h.contextName)return e.parentNode.removeChild(e),!0})}function g(a){var e=l.paths[a];if(e&&D(e)&&e.length>1)return d(a),e.shift(),h.undef(a),h.require([a]),!0}function f(a,e,k,m){var b,n,f=a?a.indexOf(\"!\"):-1,d=null,g=e?e.name:null,j=a,l=!0,i=\"\";a||(l=!1,a=\"_@r\"+(M+=1));f!==-1&&(d=a.substring(0,f),a=a.substring(f+1,a.length));d&&(d=c(d,g,m),n=q[d]);a&&(d?i=n&&\nn.normalize?n.normalize(a,function(a){return c(a,g,m)}):c(a,g,m):(i=c(a,g,m),b=h.nameToUrl(i)));a=d&&!n&&!k?\"_unnormalized\"+(N+=1):\"\";return{prefix:d,name:i,parentMap:e,unnormalized:!!a,url:b,originalName:j,isDefine:l,id:(d?d+\"!\"+i:i)+a}}function p(a){var e=a.id,k=i[e];k||(k=i[e]=new h.Module(a));return k}function r(a,e,k){var b=a.id,c=i[b];if(E.call(q,b)&&(!c||c.defineEmitComplete))e===\"defined\"&&k(q[b]);else p(a).on(e,k)}function z(a,e){var k=a.requireModules,b=!1;if(e)e(a);else if(o(k,function(e){if(e=\ni[e])e.error=a,e.events.error&&(b=!0,e.emit(\"error\",a))}),!b)j.onError(a)}function s(){O.length&&(la.apply(C,[C.length-1,0].concat(O)),O=[])}function u(a,e,k){a=a&&a.map;e=$(k||h.require,a,e);aa(e,h,a);e.isBrowser=v;return e}function y(a){delete i[a];o(L,function(e,k){if(e.map.id===a)return L.splice(k,1),e.defined||(h.waitCount-=1),!0})}function A(a,e){var k=a.map.id,b=a.depMaps,c;if(a.inited){if(e[k])return a;e[k]=!0;o(b,function(a){if(a=i[a.id])return!a.inited||!a.enabled?(c=null,delete e[k],!0):\nc=A(a,J({},e))});return c}}function B(a,e,k){var b=a.map.id,c=a.depMaps;if(a.inited&&a.map.isDefine){if(e[b])return q[b];e[b]=a;o(c,function(c){var c=c.id,d=i[c];!P[c]&&d&&(!d.inited||!d.enabled?k[b]=!0:(d=B(d,e,k),k[c]||a.defineDepById(c,d)))});a.check(!0);return q[b]}}function H(a){a.check()}function S(){var a,e,b,c,f=(b=l.waitSeconds*1E3)&&h.startTime+b<(new Date).getTime(),n=[],j=!1,fa=!0;if(!T){T=!0;x(i,function(b){a=b.map;e=a.id;if(b.enabled&&!b.error)if(!b.inited&&f)g(e)?j=c=!0:(n.push(e),\nd(e));else if(!b.inited&&b.fetched&&a.isDefine&&(j=!0,!a.prefix))return fa=!1});if(f&&n.length)return b=F(\"timeout\",\"Load timeout for modules: \"+n,null,n),b.contextName=h.contextName,z(b);fa&&(o(L,function(a){if(!a.defined){var a=A(a,{}),e={};a&&(B(a,e,{}),x(e,H))}}),x(i,H));if((!f||c)&&j)if((v||ea)&&!U)U=setTimeout(function(){U=0;S()},50);T=!1}}function V(a){p(f(a[0],null,!0)).init(a[1],a[2])}function I(a){var a=a.currentTarget||a.srcElement,e=h.onScriptLoad;a.detachEvent&&!R?a.detachEvent(\"onreadystatechange\",\ne):a.removeEventListener(\"load\",e,!1);e=h.onScriptError;a.detachEvent&&!R||a.removeEventListener(\"error\",e,!1);return{node:a,id:a&&a.getAttribute(\"data-requiremodule\")}}var T,W,h,P,U,l={waitSeconds:7,baseUrl:\"./\",paths:{},pkgs:{},shim:{}},i={},X={},C=[],q={},Q={},M=1,N=1,L=[];P={require:function(a){return u(a)},exports:function(a){a.usingExports=!0;if(a.map.isDefine)return a.exports=q[a.map.id]={}},module:function(a){return a.module={id:a.map.id,uri:a.map.url,config:function(){return l.config&&l.config[a.map.id]||\n{}},exports:q[a.map.id]}}};W=function(a){this.events=X[a.id]||{};this.map=a;this.shim=l.shim[a.id];this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};W.prototype={init:function(a,e,b,c){c=c||{};if(!this.inited){this.factory=e;if(b)this.on(\"error\",b);else this.events.error&&(b=t(this,function(a){this.emit(\"error\",a)}));this.depMaps=a&&a.slice(0);this.depMaps.rjsSkipMap=a.rjsSkipMap;this.errback=b;this.inited=!0;this.ignore=c.ignore;c.enabled||this.enabled?this.enable():\nthis.check()}},defineDepById:function(a,e){var b;o(this.depMaps,function(e,c){if(e.id===a)return b=c,!0});return this.defineDep(b,e)},defineDep:function(a,e){this.depMatched[a]||(this.depMatched[a]=!0,this.depCount-=1,this.depExports[a]=e)},fetch:function(){if(!this.fetched){this.fetched=!0;h.startTime=(new Date).getTime();var a=this.map;if(this.shim)u(this,!0)(this.shim.deps||[],t(this,function(){return a.prefix?this.callPlugin():this.load()}));else return a.prefix?this.callPlugin():this.load()}},\nload:function(){var a=this.map.url;Q[a]||(Q[a]=!0,h.load(this.map.id,a))},check:function(a){if(this.enabled&&!this.enabling){var e,b,c=this.map.id;b=this.depExports;var d=this.exports,n=this.factory;if(this.inited)if(this.error)this.emit(\"error\",this.error);else{if(!this.defining){this.defining=!0;if(this.depCount<1&&!this.defined){if(w(n)){if(this.events.error)try{d=h.execCb(c,n,b,d)}catch(f){e=f}else d=h.execCb(c,n,b,d);if(this.map.isDefine)if((b=this.module)&&b.exports!==void 0&&b.exports!==this.exports)d=\nb.exports;else if(d===void 0&&this.usingExports)d=this.exports;if(e)return e.requireMap=this.map,e.requireModules=[this.map.id],e.requireType=\"define\",z(this.error=e)}else d=n;this.exports=d;if(this.map.isDefine&&!this.ignore&&(q[c]=d,j.onResourceLoad))j.onResourceLoad(h,this.map,this.depMaps);delete i[c];this.defined=!0;h.waitCount-=1;h.waitCount===0&&(L=[])}this.defining=!1;if(!a&&this.defined&&!this.defineEmitted)this.defineEmitted=!0,this.emit(\"defined\",this.exports),this.defineEmitComplete=!0}}else this.fetch()}},\ncallPlugin:function(){var a=this.map,e=a.id,b=f(a.prefix,null,!1,!0);r(b,\"defined\",t(this,function(b){var d;d=this.map.name;var k=this.map.parentMap?this.map.parentMap.name:null;if(this.map.unnormalized){if(b.normalize&&(d=b.normalize(d,function(a){return c(a,k,!0)})||\"\"),b=f(a.prefix+\"!\"+d,this.map.parentMap,!1,!0),r(b,\"defined\",t(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),b=i[b.id]){if(this.events.error)b.on(\"error\",t(this,function(a){this.emit(\"error\",a)}));\nb.enable()}}else d=t(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),d.error=t(this,function(a){this.inited=!0;this.error=a;a.requireModules=[e];x(i,function(a){a.map.id.indexOf(e+\"_unnormalized\")===0&&y(a.map.id)});z(a)}),d.fromText=function(a,b){var e=K;e&&(K=!1);p(f(a));j.exec(b);e&&(K=!0);h.completeLoad(a)},b.load(a.name,u(a.parentMap,!0,function(a,b,e){a.rjsSkipMap=!0;return h.require(a,b,e)}),d,l)}));h.enable(b,this);this.pluginMaps[b.id]=b},enable:function(){this.enabled=\n!0;if(!this.waitPushed)L.push(this),h.waitCount+=1,this.waitPushed=!0;this.enabling=!0;o(this.depMaps,t(this,function(a,b){var c,d;if(typeof a===\"string\"){a=f(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.depMaps.rjsSkipMap);this.depMaps[b]=a;if(c=P[a.id]){this.depExports[b]=c(this);return}this.depCount+=1;r(a,\"defined\",t(this,function(a){this.defineDep(b,a);this.check()}));this.errback&&r(a,\"error\",this.errback)}c=a.id;d=i[c];!P[c]&&d&&!d.enabled&&h.enable(a,this)}));x(this.pluginMaps,\nt(this,function(a){var b=i[a.id];b&&!b.enabled&&h.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){o(this.events[a],function(a){a(b)});a===\"error\"&&delete this.events[a]}};return h={config:l,contextName:b,registry:i,defined:q,urlFetched:Q,waitCount:0,defQueue:C,Module:W,makeModuleMap:f,configure:function(a){a.baseUrl&&a.baseUrl.charAt(a.baseUrl.length-1)!==\"/\"&&(a.baseUrl+=\"/\");var b=l.pkgs,c=l.shim,d=l.paths,\ng=l.map;J(l,a,!0);l.paths=J(d,a.paths,!0);if(a.map)l.map=J(g||{},a.map,!0,!0);if(a.shim)x(a.shim,function(a,b){D(a)&&(a={deps:a});if(a.exports&&!a.exports.__buildReady)a.exports=h.makeShimExports(a.exports);c[b]=a}),l.shim=c;if(a.packages)o(a.packages,function(a){a=typeof a===\"string\"?{name:a}:a;b[a.name]={name:a.name,location:a.location||a.name,main:(a.main||\"main\").replace(ka,\"\").replace(da,\"\")}}),l.pkgs=b;x(i,function(a,b){if(!a.inited&&!a.map.unnormalized)a.map=f(b)});if(a.deps||a.callback)h.require(a.deps||\n[],a.callback)},makeShimExports:function(a){var b;return typeof a===\"string\"?(b=function(){return Z(a)},b.exports=a,b):function(){return a.apply(Y,arguments)}},requireDefined:function(a,b){var c=f(a,b,!1,!0).id;return E.call(q,c)},requireSpecified:function(a,b){a=f(a,b,!1,!0).id;return E.call(q,a)||E.call(i,a)},require:function(a,e,c,d){var g;if(typeof a===\"string\"){if(w(e))return z(F(\"requireargs\",\"Invalid require call\"),c);if(j.get)return j.get(h,a,e);a=f(a,e,!1,!0);a=a.id;return!E.call(q,a)?z(F(\"notloaded\",\n'Module name \"'+a+'\" has not been loaded yet for context: '+b)):q[a]}c&&!w(c)&&(d=c,c=void 0);e&&!w(e)&&(d=e,e=void 0);for(s();C.length;)if(g=C.shift(),g[0]===null)return z(F(\"mismatch\",\"Mismatched anonymous define() module: \"+g[g.length-1]));else V(g);p(f(null,d)).init(a,e,c,{enabled:!0});S();return h.require},undef:function(a){s();var b=f(a,null,!0),c=i[a];delete q[a];delete Q[b.url];delete X[a];if(c){if(c.events.defined)X[a]=c.events;y(a)}},enable:function(a){i[a.id]&&p(a).enable()},completeLoad:function(a){var b,\nc,d=l.shim[a]||{},f=d.exports&&d.exports.exports;for(s();C.length;){c=C.shift();if(c[0]===null){c[0]=a;if(b)break;b=!0}else c[0]===a&&(b=!0);V(c)}c=i[a];if(!b&&!q[a]&&c&&!c.inited)if(l.enforceDefine&&(!f||!Z(f)))if(g(a))return;else return z(F(\"nodefine\",\"No define call for \"+a,null,[a]));else V([a,d.deps||[],d.exports]);S()},toUrl:function(a,b){var d=a.lastIndexOf(\".\"),f=null;d!==-1&&(f=a.substring(d,a.length),a=a.substring(0,d));return h.nameToUrl(c(a,b&&b.id,!0),f)},nameToUrl:function(a,b){var c,\nd,f,g,h,i;if(j.jsExtRegExp.test(a))g=a+(b||\"\");else{c=l.paths;d=l.pkgs;g=a.split(\"/\");for(h=g.length;h>0;h-=1)if(i=g.slice(0,h).join(\"/\"),f=d[i],i=c[i]){D(i)&&(i=i[0]);g.splice(0,h,i);break}else if(f){c=a===f.name?f.location+\"/\"+f.main:f.location;g.splice(0,h,c);break}g=g.join(\"/\");g+=b||(/\\?/.test(g)?\"\":\".js\");g=(g.charAt(0)===\"/\"||g.match(/^[\\w\\+\\.\\-]+:/)?\"\":l.baseUrl)+g}return l.urlArgs?g+((g.indexOf(\"?\")===-1?\"?\":\"&\")+l.urlArgs):g},load:function(a,b){j.load(h,a,b)},execCb:function(a,b,c,d){return b.apply(d,\nc)},onScriptLoad:function(a){if(a.type===\"load\"||ma.test((a.currentTarget||a.srcElement).readyState))G=null,a=I(a),h.completeLoad(a.id)},onScriptError:function(a){var b=I(a);if(!g(b.id))return z(F(\"scripterror\",\"Script error\",a,[b.id]))}}}};j({});aa(j);if(v&&(u=p.head=document.getElementsByTagName(\"head\")[0],A=document.getElementsByTagName(\"base\")[0]))u=p.head=A.parentNode;j.onError=function(b){throw b;};j.load=function(b,c,d){var g=b&&b.config||{},f;if(v)return f=g.xhtml?document.createElementNS(\"http://www.w3.org/1999/xhtml\",\n\"html:script\"):document.createElement(\"script\"),f.type=g.scriptType||\"text/javascript\",f.charset=\"utf-8\",f.async=!0,f.setAttribute(\"data-requirecontext\",b.contextName),f.setAttribute(\"data-requiremodule\",c),f.attachEvent&&!(f.attachEvent.toString&&f.attachEvent.toString().indexOf(\"[native code\")<0)&&!R?(K=!0,f.attachEvent(\"onreadystatechange\",b.onScriptLoad)):(f.addEventListener(\"load\",b.onScriptLoad,!1),f.addEventListener(\"error\",b.onScriptError,!1)),f.src=d,H=f,A?u.insertBefore(f,A):u.appendChild(f),\nH=null,f;else ea&&(importScripts(d),b.completeLoad(c))};v&&M(document.getElementsByTagName(\"script\"),function(b){if(!u)u=b.parentNode;if(s=b.getAttribute(\"data-main\")){if(!r.baseUrl)B=s.split(\"/\"),ba=B.pop(),ca=B.length?B.join(\"/\")+\"/\":\"./\",r.baseUrl=ca,s=ba;s=s.replace(da,\"\");r.deps=r.deps?r.deps.concat(s):[s];return!0}});define=function(b,c,d){var g,f;typeof b!==\"string\"&&(d=c,c=b,b=null);D(c)||(d=c,c=[]);!c.length&&w(d)&&d.length&&(d.toString().replace(ia,\"\").replace(ja,function(b,d){c.push(d)}),\nc=(d.length===1?[\"require\"]:[\"require\",\"exports\",\"module\"]).concat(c));if(K&&(g=H||ha()))b||(b=g.getAttribute(\"data-requiremodule\")),f=y[g.getAttribute(\"data-requirecontext\")];(f?f.defQueue:O).push([b,c,d])};define.amd={jQuery:!0};j.exec=function(b){return eval(b)};j(r)}})(this);"
  },
  {
    "path": "test/vendor/sinon.js",
    "content": "/**\n * Sinon.JS 1.4.2, 2012/07/11\n *\n * @author Christian Johansen (christian@cjohansen.no)\n * @author Contributors: https://github.com/cjohansen/Sinon.JS/blob/master/AUTHORS\n *\n * (The BSD License)\n *\n * Copyright (c) 2010-2012, Christian Johansen, christian@cjohansen.no\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n *     * Redistributions of source code must retain the above copyright notice,\n *       this list of conditions and the following disclaimer.\n *     * Redistributions in binary form must reproduce the above copyright notice,\n *       this list of conditions and the following disclaimer in the documentation\n *       and/or other materials provided with the distribution.\n *     * Neither the name of Christian Johansen nor the names of his contributors\n *       may be used to endorse or promote products derived from this software\n *       without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n\"use strict\";\nvar sinon = (function () {\nvar buster = (function (setTimeout, B) {\n    var isNode = typeof require == \"function\" && typeof module == \"object\";\n    var div = typeof document != \"undefined\" && document.createElement(\"div\");\n    var F = function () {};\n\n    var buster = {\n        bind: function bind(obj, methOrProp) {\n            var method = typeof methOrProp == \"string\" ? obj[methOrProp] : methOrProp;\n            var args = Array.prototype.slice.call(arguments, 2);\n            return function () {\n                var allArgs = args.concat(Array.prototype.slice.call(arguments));\n                return method.apply(obj, allArgs);\n            };\n        },\n\n        partial: function partial(fn) {\n            var args = [].slice.call(arguments, 1);\n            return function () {\n                return fn.apply(this, args.concat([].slice.call(arguments)));\n            };\n        },\n\n        create: function create(object) {\n            F.prototype = object;\n            return new F();\n        },\n\n        extend: function extend(target) {\n            if (!target) { return; }\n            for (var i = 1, l = arguments.length, prop; i < l; ++i) {\n                for (prop in arguments[i]) {\n                    target[prop] = arguments[i][prop];\n                }\n            }\n            return target;\n        },\n\n        nextTick: function nextTick(callback) {\n            if (typeof process != \"undefined\" && process.nextTick) {\n                return process.nextTick(callback);\n            }\n            setTimeout(callback, 0);\n        },\n\n        functionName: function functionName(func) {\n            if (!func) return \"\";\n            if (func.displayName) return func.displayName;\n            if (func.name) return func.name;\n            var matches = func.toString().match(/function\\s+([^\\(]+)/m);\n            return matches && matches[1] || \"\";\n        },\n\n        isNode: function isNode(obj) {\n            if (!div) return false;\n            try {\n                obj.appendChild(div);\n                obj.removeChild(div);\n            } catch (e) {\n                return false;\n            }\n            return true;\n        },\n\n        isElement: function isElement(obj) {\n            return obj && obj.nodeType === 1 && buster.isNode(obj);\n        },\n\n        isArray: function isArray(arr) {\n            return Object.prototype.toString.call(arr) == \"[object Array]\";\n        },\n\n        flatten: function flatten(arr) {\n            var result = [], arr = arr || [];\n            for (var i = 0, l = arr.length; i < l; ++i) {\n                result = result.concat(buster.isArray(arr[i]) ? flatten(arr[i]) : arr[i]);\n            }\n            return result;\n        },\n\n        each: function each(arr, callback) {\n            for (var i = 0, l = arr.length; i < l; ++i) {\n                callback(arr[i]);\n            }\n        },\n\n        map: function map(arr, callback) {\n            var results = [];\n            for (var i = 0, l = arr.length; i < l; ++i) {\n                results.push(callback(arr[i]));\n            }\n            return results;\n        },\n\n        parallel: function parallel(fns, callback) {\n            function cb(err, res) {\n                if (typeof callback == \"function\") {\n                    callback(err, res);\n                    callback = null;\n                }\n            }\n            if (fns.length == 0) { return cb(null, []); }\n            var remaining = fns.length, results = [];\n            function makeDone(num) {\n                return function done(err, result) {\n                    if (err) { return cb(err); }\n                    results[num] = result;\n                    if (--remaining == 0) { cb(null, results); }\n                };\n            }\n            for (var i = 0, l = fns.length; i < l; ++i) {\n                fns[i](makeDone(i));\n            }\n        },\n\n        series: function series(fns, callback) {\n            function cb(err, res) {\n                if (typeof callback == \"function\") {\n                    callback(err, res);\n                }\n            }\n            var remaining = fns.slice();\n            var results = [];\n            function callNext() {\n                if (remaining.length == 0) return cb(null, results);\n                var promise = remaining.shift()(next);\n                if (promise && typeof promise.then == \"function\") {\n                    promise.then(buster.partial(next, null), next);\n                }\n            }\n            function next(err, result) {\n                if (err) return cb(err);\n                results.push(result);\n                callNext();\n            }\n            callNext();\n        },\n\n        countdown: function countdown(num, done) {\n            return function () {\n                if (--num == 0) done();\n            };\n        }\n    };\n\n    if (typeof process === \"object\" &&\n        typeof require === \"function\" && typeof module === \"object\") {\n        var crypto = require(\"crypto\");\n        var path = require(\"path\");\n\n        buster.tmpFile = function (fileName) {\n            var hashed = crypto.createHash(\"sha1\");\n            hashed.update(fileName);\n            var tmpfileName = hashed.digest(\"hex\");\n\n            if (process.platform == \"win32\") {\n                return path.join(process.env[\"TEMP\"], tmpfileName);\n            } else {\n                return path.join(\"/tmp\", tmpfileName);\n            }\n        };\n    }\n\n    if (Array.prototype.some) {\n        buster.some = function (arr, fn, thisp) {\n            return arr.some(fn, thisp);\n        };\n    } else {\n        // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some\n        buster.some = function (arr, fun, thisp) {\n                        if (arr == null) { throw new TypeError(); }\n            arr = Object(arr);\n            var len = arr.length >>> 0;\n            if (typeof fun !== \"function\") { throw new TypeError(); }\n\n            for (var i = 0; i < len; i++) {\n                if (arr.hasOwnProperty(i) && fun.call(thisp, arr[i], i, arr)) {\n                    return true;\n                }\n            }\n\n            return false;\n        };\n    }\n\n    if (Array.prototype.filter) {\n        buster.filter = function (arr, fn, thisp) {\n            return arr.filter(fn, thisp);\n        };\n    } else {\n        // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/filter\n        buster.filter = function (fn, thisp) {\n                        if (this == null) { throw new TypeError(); }\n\n            var t = Object(this);\n            var len = t.length >>> 0;\n            if (typeof fn != \"function\") { throw new TypeError(); }\n\n            var res = [];\n            for (var i = 0; i < len; i++) {\n                if (i in t) {\n                    var val = t[i]; // in case fun mutates this\n                    if (fn.call(thisp, val, i, t)) { res.push(val); }\n                }\n            }\n\n            return res;\n        };\n    }\n\n    if (isNode) {\n        module.exports = buster;\n        buster.eventEmitter = require(\"./buster-event-emitter\");\n        Object.defineProperty(buster, \"defineVersionGetter\", {\n            get: function () {\n                return require(\"./define-version-getter\");\n            }\n        });\n    }\n\n    return buster.extend(B || {}, buster);\n}(setTimeout, buster));\nif (typeof buster === \"undefined\") {\n    var buster = {};\n}\n\nif (typeof module === \"object\" && typeof require === \"function\") {\n    buster = require(\"buster-core\");\n}\n\nbuster.format = buster.format || {};\nbuster.format.excludeConstructors = [\"Object\", /^.$/];\nbuster.format.quoteStrings = true;\n\nbuster.format.ascii = (function () {\n\n    var hasOwn = Object.prototype.hasOwnProperty;\n\n    var specialObjects = [];\n    if (typeof global != \"undefined\") {\n        specialObjects.push({ obj: global, value: \"[object global]\" });\n    }\n    if (typeof document != \"undefined\") {\n        specialObjects.push({ obj: document, value: \"[object HTMLDocument]\" });\n    }\n    if (typeof window != \"undefined\") {\n        specialObjects.push({ obj: window, value: \"[object Window]\" });\n    }\n\n    function keys(object) {\n        var k = Object.keys && Object.keys(object) || [];\n\n        if (k.length == 0) {\n            for (var prop in object) {\n                if (hasOwn.call(object, prop)) {\n                    k.push(prop);\n                }\n            }\n        }\n\n        return k.sort();\n    }\n\n    function isCircular(object, objects) {\n        if (typeof object != \"object\") {\n            return false;\n        }\n\n        for (var i = 0, l = objects.length; i < l; ++i) {\n            if (objects[i] === object) {\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    function ascii(object, processed, indent) {\n        if (typeof object == \"string\") {\n            var quote = typeof this.quoteStrings != \"boolean\" || this.quoteStrings;\n            return processed || quote ? '\"' + object + '\"' : object;\n        }\n\n        if (typeof object == \"function\" && !(object instanceof RegExp)) {\n            return ascii.func(object);\n        }\n\n        processed = processed || [];\n\n        if (isCircular(object, processed)) {\n            return \"[Circular]\";\n        }\n\n        if (Object.prototype.toString.call(object) == \"[object Array]\") {\n            return ascii.array.call(this, object, processed);\n        }\n\n        if (!object) {\n            return \"\" + object;\n        }\n\n        if (buster.isElement(object)) {\n            return ascii.element(object);\n        }\n\n        if (typeof object.toString == \"function\" &&\n            object.toString !== Object.prototype.toString) {\n            return object.toString();\n        }\n\n        for (var i = 0, l = specialObjects.length; i < l; i++) {\n            if (object === specialObjects[i].obj) {\n                return specialObjects[i].value;\n            }\n        }\n\n        return ascii.object.call(this, object, processed, indent);\n    }\n\n    ascii.func = function (func) {\n        return \"function \" + buster.functionName(func) + \"() {}\";\n    };\n\n    ascii.array = function (array, processed) {\n        processed = processed || [];\n        processed.push(array);\n        var pieces = [];\n\n        for (var i = 0, l = array.length; i < l; ++i) {\n            pieces.push(ascii.call(this, array[i], processed));\n        }\n\n        return \"[\" + pieces.join(\", \") + \"]\";\n    };\n\n    ascii.object = function (object, processed, indent) {\n        processed = processed || [];\n        processed.push(object);\n        indent = indent || 0;\n        var pieces = [], properties = keys(object), prop, str, obj;\n        var is = \"\";\n        var length = 3;\n\n        for (var i = 0, l = indent; i < l; ++i) {\n            is += \" \";\n        }\n\n        for (i = 0, l = properties.length; i < l; ++i) {\n            prop = properties[i];\n            obj = object[prop];\n\n            if (isCircular(obj, processed)) {\n                str = \"[Circular]\";\n            } else {\n                str = ascii.call(this, obj, processed, indent + 2);\n            }\n\n            str = (/\\s/.test(prop) ? '\"' + prop + '\"' : prop) + \": \" + str;\n            length += str.length;\n            pieces.push(str);\n        }\n\n        var cons = ascii.constructorName.call(this, object);\n        var prefix = cons ? \"[\" + cons + \"] \" : \"\"\n\n        return (length + indent) > 80 ?\n            prefix + \"{\\n  \" + is + pieces.join(\",\\n  \" + is) + \"\\n\" + is + \"}\" :\n            prefix + \"{ \" + pieces.join(\", \") + \" }\";\n    };\n\n    ascii.element = function (element) {\n        var tagName = element.tagName.toLowerCase();\n        var attrs = element.attributes, attribute, pairs = [], attrName;\n\n        for (var i = 0, l = attrs.length; i < l; ++i) {\n            attribute = attrs.item(i);\n            attrName = attribute.nodeName.toLowerCase().replace(\"html:\", \"\");\n\n            if (attrName == \"contenteditable\" && attribute.nodeValue == \"inherit\") {\n                continue;\n            }\n\n            if (!!attribute.nodeValue) {\n                pairs.push(attrName + \"=\\\"\" + attribute.nodeValue + \"\\\"\");\n            }\n        }\n\n        var formatted = \"<\" + tagName + (pairs.length > 0 ? \" \" : \"\");\n        var content = element.innerHTML;\n\n        if (content.length > 20) {\n            content = content.substr(0, 20) + \"[...]\";\n        }\n\n        var res = formatted + pairs.join(\" \") + \">\" + content + \"</\" + tagName + \">\";\n\n        return res.replace(/ contentEditable=\"inherit\"/, \"\");\n    };\n\n    ascii.constructorName = function (object) {\n        var name = buster.functionName(object && object.constructor);\n        var excludes = this.excludeConstructors || buster.format.excludeConstructors || [];\n\n        for (var i = 0, l = excludes.length; i < l; ++i) {\n            if (typeof excludes[i] == \"string\" && excludes[i] == name) {\n                return \"\";\n            } else if (excludes[i].test && excludes[i].test(name)) {\n                return \"\";\n            }\n        }\n\n        return name;\n    };\n\n    return ascii;\n}());\n\nif (typeof module != \"undefined\") {\n    module.exports = buster.format;\n}\n/*jslint eqeqeq: false, onevar: false, forin: true, nomen: false, regexp: false, plusplus: false*/\n/*global module, require, __dirname, document*/\n/**\n * Sinon core utilities. For internal use only.\n *\n * @author Christian Johansen (christian@cjohansen.no)\n * @license BSD\n *\n * Copyright (c) 2010-2011 Christian Johansen\n */\n\nvar sinon = (function (buster) {\n    var div = typeof document != \"undefined\" && document.createElement(\"div\");\n    var hasOwn = Object.prototype.hasOwnProperty;\n\n    function isDOMNode(obj) {\n        var success = false;\n\n        try {\n            obj.appendChild(div);\n            success = div.parentNode == obj;\n        } catch (e) {\n            return false;\n        } finally {\n            try {\n                obj.removeChild(div);\n            } catch (e) {\n                // Remove failed, not much we can do about that\n            }\n        }\n\n        return success;\n    }\n\n    function isElement(obj) {\n        return div && obj && obj.nodeType === 1 && isDOMNode(obj);\n    }\n\n    function isFunction(obj) {\n        return !!(obj && obj.constructor && obj.call && obj.apply);\n    }\n\n    function mirrorProperties(target, source) {\n        for (var prop in source) {\n            if (!hasOwn.call(target, prop)) {\n                target[prop] = source[prop];\n            }\n        }\n    }\n\n    var sinon = {\n        wrapMethod: function wrapMethod(object, property, method) {\n            if (!object) {\n                throw new TypeError(\"Should wrap property of object\");\n            }\n\n            if (typeof method != \"function\") {\n                throw new TypeError(\"Method wrapper should be function\");\n            }\n\n            var wrappedMethod = object[property];\n\n            if (!isFunction(wrappedMethod)) {\n                throw new TypeError(\"Attempted to wrap \" + (typeof wrappedMethod) + \" property \" +\n                                    property + \" as function\");\n            }\n\n            if (wrappedMethod.restore && wrappedMethod.restore.sinon) {\n                throw new TypeError(\"Attempted to wrap \" + property + \" which is already wrapped\");\n            }\n\n            if (wrappedMethod.calledBefore) {\n                var verb = !!wrappedMethod.returns ? \"stubbed\" : \"spied on\";\n                throw new TypeError(\"Attempted to wrap \" + property + \" which is already \" + verb);\n            }\n\n            // IE 8 does not support hasOwnProperty on the window object.\n            var owned = hasOwn.call(object, property);\n            object[property] = method;\n            method.displayName = property;\n\n            method.restore = function () {\n                // For prototype properties try to reset by delete first.\n                // If this fails (ex: localStorage on mobile safari) then force a reset\n                // via direct assignment.\n                if (!owned) {\n                    delete object[property];\n                }\n                if (object[property] === method) {\n                    object[property] = wrappedMethod;\n                }\n            };\n\n            method.restore.sinon = true;\n            mirrorProperties(method, wrappedMethod);\n\n            return method;\n        },\n\n        extend: function extend(target) {\n            for (var i = 1, l = arguments.length; i < l; i += 1) {\n                for (var prop in arguments[i]) {\n                    if (arguments[i].hasOwnProperty(prop)) {\n                        target[prop] = arguments[i][prop];\n                    }\n\n                    // DONT ENUM bug, only care about toString\n                    if (arguments[i].hasOwnProperty(\"toString\") &&\n                        arguments[i].toString != target.toString) {\n                        target.toString = arguments[i].toString;\n                    }\n                }\n            }\n\n            return target;\n        },\n\n        create: function create(proto) {\n            var F = function () {};\n            F.prototype = proto;\n            return new F();\n        },\n\n        deepEqual: function deepEqual(a, b) {\n            if (sinon.match && sinon.match.isMatcher(a)) {\n                return a.test(b);\n            }\n            if (typeof a != \"object\" || typeof b != \"object\") {\n                return a === b;\n            }\n\n            if (isElement(a) || isElement(b)) {\n                return a === b;\n            }\n\n            if (a === b) {\n                return true;\n            }\n\n            var aString = Object.prototype.toString.call(a);\n            if (aString != Object.prototype.toString.call(b)) {\n                return false;\n            }\n\n            if (aString == \"[object Array]\") {\n                if (a.length !== b.length) {\n                    return false;\n                }\n\n                for (var i = 0, l = a.length; i < l; i += 1) {\n                    if (!deepEqual(a[i], b[i])) {\n                        return false;\n                    }\n                }\n\n                return true;\n            }\n\n            var prop, aLength = 0, bLength = 0;\n\n            for (prop in a) {\n                aLength += 1;\n\n                if (!deepEqual(a[prop], b[prop])) {\n                    return false;\n                }\n            }\n\n            for (prop in b) {\n                bLength += 1;\n            }\n\n            if (aLength != bLength) {\n                return false;\n            }\n\n            return true;\n        },\n\n        functionName: function functionName(func) {\n            var name = func.displayName || func.name;\n\n            // Use function decomposition as a last resort to get function\n            // name. Does not rely on function decomposition to work - if it\n            // doesn't debugging will be slightly less informative\n            // (i.e. toString will say 'spy' rather than 'myFunc').\n            if (!name) {\n                var matches = func.toString().match(/function ([^\\s\\(]+)/);\n                name = matches && matches[1];\n            }\n\n            return name;\n        },\n\n        functionToString: function toString() {\n            if (this.getCall && this.callCount) {\n                var thisValue, prop, i = this.callCount;\n\n                while (i--) {\n                    thisValue = this.getCall(i).thisValue;\n\n                    for (prop in thisValue) {\n                        if (thisValue[prop] === this) {\n                            return prop;\n                        }\n                    }\n                }\n            }\n\n            return this.displayName || \"sinon fake\";\n        },\n\n        getConfig: function (custom) {\n            var config = {};\n            custom = custom || {};\n            var defaults = sinon.defaultConfig;\n\n            for (var prop in defaults) {\n                if (defaults.hasOwnProperty(prop)) {\n                    config[prop] = custom.hasOwnProperty(prop) ? custom[prop] : defaults[prop];\n                }\n            }\n\n            return config;\n        },\n\n        format: function (val) {\n            return \"\" + val;\n        },\n\n        defaultConfig: {\n            injectIntoThis: true,\n            injectInto: null,\n            properties: [\"spy\", \"stub\", \"mock\", \"clock\", \"server\", \"requests\"],\n            useFakeTimers: true,\n            useFakeServer: true\n        },\n\n        timesInWords: function timesInWords(count) {\n            return count == 1 && \"once\" ||\n                count == 2 && \"twice\" ||\n                count == 3 && \"thrice\" ||\n                (count || 0) + \" times\";\n        },\n\n        calledInOrder: function (spies) {\n            for (var i = 1, l = spies.length; i < l; i++) {\n                if (!spies[i - 1].calledBefore(spies[i])) {\n                    return false;\n                }\n            }\n\n            return true;\n        },\n\n        orderByFirstCall: function (spies) {\n            return spies.sort(function (a, b) {\n                // uuid, won't ever be equal\n                var aCall = a.getCall(0);\n                var bCall = b.getCall(0);\n                var aId = aCall && aCall.callId || -1;\n                var bId = bCall && bCall.callId || -1;\n\n                return aId < bId ? -1 : 1;\n            });\n        },\n\n        log: function () {},\n\n        logError: function (label, err) {\n            var msg = label + \" threw exception: \"\n            sinon.log(msg + \"[\" + err.name + \"] \" + err.message);\n            if (err.stack) { sinon.log(err.stack); }\n\n            setTimeout(function () {\n                err.message = msg + err.message;\n                throw err;\n            }, 0);\n        },\n\n        typeOf: function (value) {\n            if (value === null) {\n              return \"null\";\n            }\n            var string = Object.prototype.toString.call(value);\n            return string.substring(8, string.length - 1).toLowerCase();\n        }\n    };\n\n    var isNode = typeof module == \"object\" && typeof require == \"function\";\n\n    if (isNode) {\n        try {\n            buster = { format: require(\"buster-format\") };\n        } catch (e) {}\n        module.exports = sinon;\n        module.exports.spy = require(\"./sinon/spy\");\n        module.exports.stub = require(\"./sinon/stub\");\n        module.exports.mock = require(\"./sinon/mock\");\n        module.exports.collection = require(\"./sinon/collection\");\n        module.exports.assert = require(\"./sinon/assert\");\n        module.exports.sandbox = require(\"./sinon/sandbox\");\n        module.exports.test = require(\"./sinon/test\");\n        module.exports.testCase = require(\"./sinon/test_case\");\n        module.exports.assert = require(\"./sinon/assert\");\n        module.exports.match = require(\"./sinon/match\");\n    }\n\n    if (buster) {\n        var formatter = sinon.create(buster.format);\n        formatter.quoteStrings = false;\n        sinon.format = function () {\n            return formatter.ascii.apply(formatter, arguments);\n        };\n    } else if (isNode) {\n        try {\n            var util = require(\"util\");\n            sinon.format = function (value) {\n                return typeof value == \"object\" && value.toString === Object.prototype.toString ? util.inspect(value) : value;\n            };\n        } catch (e) {\n            /* Node, but no util module - would be very old, but better safe than\n             sorry */\n        }\n    }\n\n    return sinon;\n}(typeof buster == \"object\" && buster));\n\n/* @depend ../sinon.js */\n/*jslint eqeqeq: false, onevar: false, plusplus: false*/\n/*global module, require, sinon*/\n/**\n * Match functions\n *\n * @author Maximilian Antoni (mail@maxantoni.de)\n * @license BSD\n *\n * Copyright (c) 2012 Maximilian Antoni\n */\n\n(function (sinon) {\n    var commonJSModule = typeof module == \"object\" && typeof require == \"function\";\n\n    if (!sinon && commonJSModule) {\n        sinon = require(\"../sinon\");\n    }\n\n    if (!sinon) {\n        return;\n    }\n\n    function assertType(value, type, name) {\n        var actual = sinon.typeOf(value);\n        if (actual !== type) {\n            throw new TypeError(\"Expected type of \" + name + \" to be \" +\n                type + \", but was \" + actual);\n        }\n    }\n\n    var matcher = {\n        toString: function () {\n            return this.message;\n        }\n    };\n\n    function isMatcher(object) {\n        return matcher.isPrototypeOf(object);\n    }\n\n    function matchObject(expectation, actual) {\n        if (actual === null || actual === undefined) {\n            return false;\n        }\n        for (var key in expectation) {\n            if (expectation.hasOwnProperty(key)) {\n                var exp = expectation[key];\n                var act = actual[key];\n                if (match.isMatcher(exp)) {\n                    if (!exp.test(act)) {\n                        return false;\n                    }\n                } else if (sinon.typeOf(exp) === \"object\") {\n                    if (!matchObject(exp, act)) {\n                        return false;\n                    }\n                } else if (!sinon.deepEqual(exp, act)) {\n                    return false;\n                }\n            }\n        }\n        return true;\n    }\n\n    matcher.or = function (m2) {\n        if (!isMatcher(m2)) {\n            throw new TypeError(\"Matcher expected\");\n        }\n        var m1 = this;\n        var or = sinon.create(matcher);\n        or.test = function (actual) {\n            return m1.test(actual) || m2.test(actual);\n        };\n        or.message = m1.message + \".or(\" + m2.message + \")\";\n        return or;\n    };\n\n    matcher.and = function (m2) {\n        if (!isMatcher(m2)) {\n            throw new TypeError(\"Matcher expected\");\n        }\n        var m1 = this;\n        var and = sinon.create(matcher);\n        and.test = function (actual) {\n            return m1.test(actual) && m2.test(actual);\n        };\n        and.message = m1.message + \".and(\" + m2.message + \")\";\n        return and;\n    };\n\n    var match = function (expectation, message) {\n        var m = sinon.create(matcher);\n        var type = sinon.typeOf(expectation);\n        switch (type) {\n        case \"object\":\n            if (typeof expectation.test === \"function\") {\n                m.test = function (actual) {\n                    return expectation.test(actual) === true;\n                };\n                m.message = \"match(\" + sinon.functionName(expectation.test) + \")\";\n                return m;\n            }\n            var str = [];\n            for (var key in expectation) {\n                if (expectation.hasOwnProperty(key)) {\n                    str.push(key + \": \" + expectation[key]);\n                }\n            }\n            m.test = function (actual) {\n                return matchObject(expectation, actual);\n            };\n            m.message = \"match(\" + str.join(\", \") + \")\";\n            break;\n        case \"number\":\n            m.test = function (actual) {\n                return expectation == actual;\n            };\n            break;\n        case \"string\":\n            m.test = function (actual) {\n                if (typeof actual !== \"string\") {\n                    return false;\n                }\n                return actual.indexOf(expectation) !== -1;\n            };\n            m.message = \"match(\\\"\" + expectation + \"\\\")\";\n            break;\n        case \"regexp\":\n            m.test = function (actual) {\n                if (typeof actual !== \"string\") {\n                    return false;\n                }\n                return expectation.test(actual);\n            };\n            break;\n        case \"function\":\n            m.test = expectation;\n            if (message) {\n                m.message = message;\n            } else {\n                m.message = \"match(\" + sinon.functionName(expectation) + \")\";\n            }\n            break;\n        default:\n            m.test = function (actual) {\n              return sinon.deepEqual(expectation, actual);\n            };\n        }\n        if (!m.message) {\n            m.message = \"match(\" + expectation + \")\";\n        }\n        return m;\n    };\n\n    match.isMatcher = isMatcher;\n\n    match.any = match(function () {\n        return true;\n    }, \"any\");\n\n    match.defined = match(function (actual) {\n        return actual !== null && actual !== undefined;\n    }, \"defined\");\n\n    match.truthy = match(function (actual) {\n        return !!actual;\n    }, \"truthy\");\n\n    match.falsy = match(function (actual) {\n        return !actual;\n    }, \"falsy\");\n\n    match.same = function (expectation) {\n        return match(function (actual) {\n            return expectation === actual;\n        }, \"same(\" + expectation + \")\");\n    };\n\n    match.typeOf = function (type) {\n        assertType(type, \"string\", \"type\");\n        return match(function (actual) {\n            return sinon.typeOf(actual) === type;\n        }, \"typeOf(\\\"\" + type + \"\\\")\");\n    };\n\n    match.instanceOf = function (type) {\n        assertType(type, \"function\", \"type\");\n        return match(function (actual) {\n            return actual instanceof type;\n        }, \"instanceOf(\" + sinon.functionName(type) + \")\");\n    };\n\n    function createPropertyMatcher(propertyTest, messagePrefix) {\n        return function (property, value) {\n            assertType(property, \"string\", \"property\");\n            var onlyProperty = arguments.length === 1;\n            var message = messagePrefix + \"(\\\"\" + property + \"\\\"\";\n            if (!onlyProperty) {\n                message += \", \" + value;\n            }\n            message += \")\";\n            return match(function (actual) {\n                if (actual === undefined || actual === null ||\n                        !propertyTest(actual, property)) {\n                    return false;\n                }\n                return onlyProperty || sinon.deepEqual(value, actual[property]);\n            }, message);\n        };\n    }\n\n    match.has = createPropertyMatcher(function (actual, property) {\n        if (typeof actual === \"object\") {\n            return property in actual;\n        }\n        return actual[property] !== undefined;\n    }, \"has\");\n\n    match.hasOwn = createPropertyMatcher(function (actual, property) {\n        return actual.hasOwnProperty(property);\n    }, \"hasOwn\");\n\n    match.bool = match.typeOf(\"boolean\");\n    match.number = match.typeOf(\"number\");\n    match.string = match.typeOf(\"string\");\n    match.object = match.typeOf(\"object\");\n    match.func = match.typeOf(\"function\");\n    match.array = match.typeOf(\"array\");\n    match.regexp = match.typeOf(\"regexp\");\n    match.date = match.typeOf(\"date\");\n\n    if (commonJSModule) {\n        module.exports = match;\n    } else {\n        sinon.match = match;\n    }\n}(typeof sinon == \"object\" && sinon || null));\n\n/**\n * @depend ../sinon.js\n * @depend match.js\n */\n/*jslint eqeqeq: false, onevar: false, plusplus: false*/\n/*global module, require, sinon*/\n/**\n * Spy functions\n *\n * @author Christian Johansen (christian@cjohansen.no)\n * @license BSD\n *\n * Copyright (c) 2010-2011 Christian Johansen\n */\n\n(function (sinon) {\n    var commonJSModule = typeof module == \"object\" && typeof require == \"function\";\n    var spyCall;\n    var callId = 0;\n    var push = [].push;\n    var slice = Array.prototype.slice;\n\n    if (!sinon && commonJSModule) {\n        sinon = require(\"../sinon\");\n    }\n\n    if (!sinon) {\n        return;\n    }\n\n    function spy(object, property) {\n        if (!property && typeof object == \"function\") {\n            return spy.create(object);\n        }\n\n        if (!object && !property) {\n            return spy.create(function () {});\n        }\n\n        var method = object[property];\n        return sinon.wrapMethod(object, property, spy.create(method));\n    }\n\n    sinon.extend(spy, (function () {\n\n        function delegateToCalls(api, method, matchAny, actual, notCalled) {\n            api[method] = function () {\n                if (!this.called) {\n                    if (notCalled) {\n                        return notCalled.apply(this, arguments);\n                    }\n                    return false;\n                }\n\n                var currentCall;\n                var matches = 0;\n\n                for (var i = 0, l = this.callCount; i < l; i += 1) {\n                    currentCall = this.getCall(i);\n\n                    if (currentCall[actual || method].apply(currentCall, arguments)) {\n                        matches += 1;\n\n                        if (matchAny) {\n                            return true;\n                        }\n                    }\n                }\n\n                return matches === this.callCount;\n            };\n        }\n\n        function matchingFake(fakes, args, strict) {\n            if (!fakes) {\n                return;\n            }\n\n            var alen = args.length;\n\n            for (var i = 0, l = fakes.length; i < l; i++) {\n                if (fakes[i].matches(args, strict)) {\n                    return fakes[i];\n                }\n            }\n        }\n\n        function incrementCallCount() {\n            this.called = true;\n            this.callCount += 1;\n            this.notCalled = false;\n            this.calledOnce = this.callCount == 1;\n            this.calledTwice = this.callCount == 2;\n            this.calledThrice = this.callCount == 3;\n        }\n\n        function createCallProperties() {\n            this.firstCall = this.getCall(0);\n            this.secondCall = this.getCall(1);\n            this.thirdCall = this.getCall(2);\n            this.lastCall = this.getCall(this.callCount - 1);\n        }\n\n        var uuid = 0;\n\n        // Public API\n        var spyApi = {\n            reset: function () {\n                this.called = false;\n                this.notCalled = true;\n                this.calledOnce = false;\n                this.calledTwice = false;\n                this.calledThrice = false;\n                this.callCount = 0;\n                this.firstCall = null;\n                this.secondCall = null;\n                this.thirdCall = null;\n                this.lastCall = null;\n                this.args = [];\n                this.returnValues = [];\n                this.thisValues = [];\n                this.exceptions = [];\n                this.callIds = [];\n                if (this.fakes) {\n                    for (var i = 0; i < this.fakes.length; i++) {\n                        this.fakes[i].reset();\n                    }\n                }\n            },\n\n            create: function create(func) {\n                var name;\n\n                if (typeof func != \"function\") {\n                    func = function () {};\n                } else {\n                    name = sinon.functionName(func);\n                }\n\n                function proxy() {\n                    return proxy.invoke(func, this, slice.call(arguments));\n                }\n\n                sinon.extend(proxy, spy);\n                delete proxy.create;\n                sinon.extend(proxy, func);\n\n                proxy.reset();\n                proxy.prototype = func.prototype;\n                proxy.displayName = name || \"spy\";\n                proxy.toString = sinon.functionToString;\n                proxy._create = sinon.spy.create;\n                proxy.id = \"spy#\" + uuid++;\n\n                return proxy;\n            },\n\n            invoke: function invoke(func, thisValue, args) {\n                var matching = matchingFake(this.fakes, args);\n                var exception, returnValue;\n\n                incrementCallCount.call(this);\n                push.call(this.thisValues, thisValue);\n                push.call(this.args, args);\n                push.call(this.callIds, callId++);\n\n                try {\n                    if (matching) {\n                        returnValue = matching.invoke(func, thisValue, args);\n                    } else {\n                        returnValue = (this.func || func).apply(thisValue, args);\n                    }\n                } catch (e) {\n                    push.call(this.returnValues, undefined);\n                    exception = e;\n                    throw e;\n                } finally {\n                    push.call(this.exceptions, exception);\n                }\n\n                push.call(this.returnValues, returnValue);\n\n                createCallProperties.call(this);\n\n                return returnValue;\n            },\n\n            getCall: function getCall(i) {\n                if (i < 0 || i >= this.callCount) {\n                    return null;\n                }\n\n                return spyCall.create(this, this.thisValues[i], this.args[i],\n                                      this.returnValues[i], this.exceptions[i],\n                                      this.callIds[i]);\n            },\n\n            calledBefore: function calledBefore(spyFn) {\n                if (!this.called) {\n                    return false;\n                }\n\n                if (!spyFn.called) {\n                    return true;\n                }\n\n                return this.callIds[0] < spyFn.callIds[spyFn.callIds.length - 1];\n            },\n\n            calledAfter: function calledAfter(spyFn) {\n                if (!this.called || !spyFn.called) {\n                    return false;\n                }\n\n                return this.callIds[this.callCount - 1] > spyFn.callIds[spyFn.callCount - 1];\n            },\n\n            withArgs: function () {\n                var args = slice.call(arguments);\n\n                if (this.fakes) {\n                    var match = matchingFake(this.fakes, args, true);\n\n                    if (match) {\n                        return match;\n                    }\n                } else {\n                    this.fakes = [];\n                }\n\n                var original = this;\n                var fake = this._create();\n                fake.matchingAguments = args;\n                push.call(this.fakes, fake);\n\n                fake.withArgs = function () {\n                    return original.withArgs.apply(original, arguments);\n                };\n\n                for (var i = 0; i < this.args.length; i++) {\n                    if (fake.matches(this.args[i])) {\n                        incrementCallCount.call(fake);\n                        push.call(fake.thisValues, this.thisValues[i]);\n                        push.call(fake.args, this.args[i]);\n                        push.call(fake.returnValues, this.returnValues[i]);\n                        push.call(fake.exceptions, this.exceptions[i]);\n                        push.call(fake.callIds, this.callIds[i]);\n                    }\n                }\n                createCallProperties.call(fake);\n\n                return fake;\n            },\n\n            matches: function (args, strict) {\n                var margs = this.matchingAguments;\n\n                if (margs.length <= args.length &&\n                    sinon.deepEqual(margs, args.slice(0, margs.length))) {\n                    return !strict || margs.length == args.length;\n                }\n            },\n\n            printf: function (format) {\n                var spy = this;\n                var args = slice.call(arguments, 1);\n                var formatter;\n\n                return (format || \"\").replace(/%(.)/g, function (match, specifyer) {\n                    formatter = spyApi.formatters[specifyer];\n\n                    if (typeof formatter == \"function\") {\n                        return formatter.call(null, spy, args);\n                    } else if (!isNaN(parseInt(specifyer), 10)) {\n                        return sinon.format(args[specifyer - 1]);\n                    }\n\n                    return \"%\" + specifyer;\n                });\n            }\n        };\n\n        delegateToCalls(spyApi, \"calledOn\", true);\n        delegateToCalls(spyApi, \"alwaysCalledOn\", false, \"calledOn\");\n        delegateToCalls(spyApi, \"calledWith\", true);\n        delegateToCalls(spyApi, \"calledWithMatch\", true);\n        delegateToCalls(spyApi, \"alwaysCalledWith\", false, \"calledWith\");\n        delegateToCalls(spyApi, \"alwaysCalledWithMatch\", false, \"calledWithMatch\");\n        delegateToCalls(spyApi, \"calledWithExactly\", true);\n        delegateToCalls(spyApi, \"alwaysCalledWithExactly\", false, \"calledWithExactly\");\n        delegateToCalls(spyApi, \"neverCalledWith\", false, \"notCalledWith\",\n            function () { return true; });\n        delegateToCalls(spyApi, \"neverCalledWithMatch\", false, \"notCalledWithMatch\",\n            function () { return true; });\n        delegateToCalls(spyApi, \"threw\", true);\n        delegateToCalls(spyApi, \"alwaysThrew\", false, \"threw\");\n        delegateToCalls(spyApi, \"returned\", true);\n        delegateToCalls(spyApi, \"alwaysReturned\", false, \"returned\");\n        delegateToCalls(spyApi, \"calledWithNew\", true);\n        delegateToCalls(spyApi, \"alwaysCalledWithNew\", false, \"calledWithNew\");\n        delegateToCalls(spyApi, \"callArg\", false, \"callArgWith\", function () {\n            throw new Error(this.toString() + \" cannot call arg since it was not yet invoked.\");\n        });\n        spyApi.callArgWith = spyApi.callArg;\n        delegateToCalls(spyApi, \"yield\", false, \"yield\", function () {\n            throw new Error(this.toString() + \" cannot yield since it was not yet invoked.\");\n        });\n        // \"invokeCallback\" is an alias for \"yield\" since \"yield\" is invalid in strict mode.\n        spyApi.invokeCallback = spyApi.yield;\n        delegateToCalls(spyApi, \"yieldTo\", false, \"yieldTo\", function (property) {\n            throw new Error(this.toString() + \" cannot yield to '\" + property +\n                \"' since it was not yet invoked.\");\n        });\n\n        spyApi.formatters = {\n            \"c\": function (spy) {\n                return sinon.timesInWords(spy.callCount);\n            },\n\n            \"n\": function (spy) {\n                return spy.toString();\n            },\n\n            \"C\": function (spy) {\n                var calls = [];\n\n                for (var i = 0, l = spy.callCount; i < l; ++i) {\n                    push.call(calls, \"    \" + spy.getCall(i).toString());\n                }\n\n                return calls.length > 0 ? \"\\n\" + calls.join(\"\\n\") : \"\";\n            },\n\n            \"t\": function (spy) {\n                var objects = [];\n\n                for (var i = 0, l = spy.callCount; i < l; ++i) {\n                    push.call(objects, sinon.format(spy.thisValues[i]));\n                }\n\n                return objects.join(\", \");\n            },\n\n            \"*\": function (spy, args) {\n                var formatted = [];\n\n                for (var i = 0, l = args.length; i < l; ++i) {\n                    push.call(formatted, sinon.format(args[i]));\n                }\n\n                return formatted.join(\", \");\n            }\n        };\n\n        return spyApi;\n    }()));\n\n    spyCall = (function () {\n\n        function throwYieldError(proxy, text, args) {\n            var msg = sinon.functionName(proxy) + text;\n            if (args.length) {\n                msg += \" Received [\" + slice.call(args).join(\", \") + \"]\";\n            }\n            throw new Error(msg);\n        }\n\n        return {\n            create: function create(spy, thisValue, args, returnValue, exception, id) {\n                var proxyCall = sinon.create(spyCall);\n                delete proxyCall.create;\n                proxyCall.proxy = spy;\n                proxyCall.thisValue = thisValue;\n                proxyCall.args = args;\n                proxyCall.returnValue = returnValue;\n                proxyCall.exception = exception;\n                proxyCall.callId = typeof id == \"number\" && id || callId++;\n\n                return proxyCall;\n            },\n\n            calledOn: function calledOn(thisValue) {\n                return this.thisValue === thisValue;\n            },\n\n            calledWith: function calledWith() {\n                for (var i = 0, l = arguments.length; i < l; i += 1) {\n                    if (!sinon.deepEqual(arguments[i], this.args[i])) {\n                        return false;\n                    }\n                }\n\n                return true;\n            },\n\n            calledWithMatch: function calledWithMatch() {\n              for (var i = 0, l = arguments.length; i < l; i += 1) {\n                  var actual = this.args[i];\n                  var expectation = arguments[i];\n                  if (!sinon.match || !sinon.match(expectation).test(actual)) {\n                      return false;\n                  }\n              }\n              return true;\n            },\n\n            calledWithExactly: function calledWithExactly() {\n                return arguments.length == this.args.length &&\n                    this.calledWith.apply(this, arguments);\n            },\n\n            notCalledWith: function notCalledWith() {\n                return !this.calledWith.apply(this, arguments);\n            },\n\n            notCalledWithMatch: function notCalledWithMatch() {\n              return !this.calledWithMatch.apply(this, arguments);\n            },\n\n            returned: function returned(value) {\n                return sinon.deepEqual(value, this.returnValue);\n            },\n\n            threw: function threw(error) {\n                if (typeof error == \"undefined\" || !this.exception) {\n                    return !!this.exception;\n                }\n\n                if (typeof error == \"string\") {\n                    return this.exception.name == error;\n                }\n\n                return this.exception === error;\n            },\n\n            calledWithNew: function calledWithNew(thisValue) {\n                return this.thisValue instanceof this.proxy;\n            },\n\n            calledBefore: function (other) {\n                return this.callId < other.callId;\n            },\n\n            calledAfter: function (other) {\n                return this.callId > other.callId;\n            },\n\n            callArg: function (pos) {\n                this.args[pos]();\n            },\n\n            callArgWith: function (pos) {\n                var args = slice.call(arguments, 1);\n                this.args[pos].apply(null, args);\n            },\n\n            \"yield\": function () {\n                var args = this.args;\n                for (var i = 0, l = args.length; i < l; ++i) {\n                    if (typeof args[i] === \"function\") {\n                        args[i].apply(null, slice.call(arguments));\n                        return;\n                    }\n                }\n                throwYieldError(this.proxy, \" cannot yield since no callback was passed.\", args);\n            },\n\n            yieldTo: function (prop) {\n                var args = this.args;\n                for (var i = 0, l = args.length; i < l; ++i) {\n                    if (args[i] && typeof args[i][prop] === \"function\") {\n                        args[i][prop].apply(null, slice.call(arguments, 1));\n                        return;\n                    }\n                }\n                throwYieldError(this.proxy, \" cannot yield to '\" + prop +\n                    \"' since no callback was passed.\", args);\n            },\n\n            toString: function () {\n                var callStr = this.proxy.toString() + \"(\";\n                var args = [];\n\n                for (var i = 0, l = this.args.length; i < l; ++i) {\n                    push.call(args, sinon.format(this.args[i]));\n                }\n\n                callStr = callStr + args.join(\", \") + \")\";\n\n                if (typeof this.returnValue != \"undefined\") {\n                    callStr += \" => \" + sinon.format(this.returnValue);\n                }\n\n                if (this.exception) {\n                    callStr += \" !\" + this.exception.name;\n\n                    if (this.exception.message) {\n                        callStr += \"(\" + this.exception.message + \")\";\n                    }\n                }\n\n                return callStr;\n            }\n        };\n    }());\n\n    spy.spyCall = spyCall;\n\n    // This steps outside the module sandbox and will be removed\n    sinon.spyCall = spyCall;\n\n    if (commonJSModule) {\n        module.exports = spy;\n    } else {\n        sinon.spy = spy;\n    }\n}(typeof sinon == \"object\" && sinon || null));\n\n/**\n * @depend ../sinon.js\n * @depend spy.js\n */\n/*jslint eqeqeq: false, onevar: false*/\n/*global module, require, sinon*/\n/**\n * Stub functions\n *\n * @author Christian Johansen (christian@cjohansen.no)\n * @license BSD\n *\n * Copyright (c) 2010-2011 Christian Johansen\n */\n\n(function (sinon) {\n    var commonJSModule = typeof module == \"object\" && typeof require == \"function\";\n\n    if (!sinon && commonJSModule) {\n        sinon = require(\"../sinon\");\n    }\n\n    if (!sinon) {\n        return;\n    }\n\n    function stub(object, property, func) {\n        if (!!func && typeof func != \"function\") {\n            throw new TypeError(\"Custom stub should be function\");\n        }\n\n        var wrapper;\n\n        if (func) {\n            wrapper = sinon.spy && sinon.spy.create ? sinon.spy.create(func) : func;\n        } else {\n            wrapper = stub.create();\n        }\n\n        if (!object && !property) {\n            return sinon.stub.create();\n        }\n\n        if (!property && !!object && typeof object == \"object\") {\n            for (var prop in object) {\n                if (typeof object[prop] === \"function\") {\n                    stub(object, prop);\n                }\n            }\n\n            return object;\n        }\n\n        return sinon.wrapMethod(object, property, wrapper);\n    }\n\n    function getCallback(stub, args) {\n        if (stub.callArgAt < 0) {\n            for (var i = 0, l = args.length; i < l; ++i) {\n                if (!stub.callArgProp && typeof args[i] == \"function\") {\n                    return args[i];\n                }\n\n                if (stub.callArgProp && args[i] &&\n                    typeof args[i][stub.callArgProp] == \"function\") {\n                    return args[i][stub.callArgProp];\n                }\n            }\n\n            return null;\n        }\n\n        return args[stub.callArgAt];\n    }\n\n    var join = Array.prototype.join;\n\n    function getCallbackError(stub, func, args) {\n        if (stub.callArgAt < 0) {\n            var msg;\n\n            if (stub.callArgProp) {\n                msg = sinon.functionName(stub) +\n                    \" expected to yield to '\" + stub.callArgProp +\n                    \"', but no object with such a property was passed.\"\n            } else {\n                msg = sinon.functionName(stub) +\n                            \" expected to yield, but no callback was passed.\"\n            }\n\n            if (args.length > 0) {\n                msg += \" Received [\" + join.call(args, \", \") + \"]\";\n            }\n\n            return msg;\n        }\n\n        return \"argument at index \" + stub.callArgAt + \" is not a function: \" + func;\n    }\n\n    var nextTick = (function () {\n        if (typeof process === \"object\" && typeof process.nextTick === \"function\") {\n            return process.nextTick;\n        } else if (typeof msSetImmediate === \"function\") {\n            return msSetImmediate.bind(window);\n        } else if (typeof setImmediate === \"function\") {\n            return setImmediate;\n        } else {\n            return function (callback) {\n                setTimeout(callback, 0);\n            };\n        }\n    })();\n\n    function callCallback(stub, args) {\n        if (typeof stub.callArgAt == \"number\") {\n            var func = getCallback(stub, args);\n\n            if (typeof func != \"function\") {\n                throw new TypeError(getCallbackError(stub, func, args));\n            }\n\n            if (stub.callbackAsync) {\n                nextTick(function() {\n                    func.apply(stub.callbackContext, stub.callbackArguments);\n                });\n            } else {\n                func.apply(stub.callbackContext, stub.callbackArguments);\n            }\n        }\n    }\n\n    var uuid = 0;\n\n    sinon.extend(stub, (function () {\n        var slice = Array.prototype.slice, proto;\n\n        function throwsException(error, message) {\n            if (typeof error == \"string\") {\n                this.exception = new Error(message || \"\");\n                this.exception.name = error;\n            } else if (!error) {\n                this.exception = new Error(\"Error\");\n            } else {\n                this.exception = error;\n            }\n\n            return this;\n        }\n\n        proto = {\n            create: function create() {\n                var functionStub = function () {\n\n                    callCallback(functionStub, arguments);\n\n                    if (functionStub.exception) {\n                        throw functionStub.exception;\n                    } else if (typeof functionStub.returnArgAt == 'number') {\n                        return arguments[functionStub.returnArgAt];\n                    } else if (functionStub.returnThis) {\n                        return this;\n                    }\n                    return functionStub.returnValue;\n                };\n\n                functionStub.id = \"stub#\" + uuid++;\n                var orig = functionStub;\n                functionStub = sinon.spy.create(functionStub);\n                functionStub.func = orig;\n\n                sinon.extend(functionStub, stub);\n                functionStub._create = sinon.stub.create;\n                functionStub.displayName = \"stub\";\n                functionStub.toString = sinon.functionToString;\n\n                return functionStub;\n            },\n\n            returns: function returns(value) {\n                this.returnValue = value;\n\n                return this;\n            },\n\n            returnsArg: function returnsArg(pos) {\n                if (typeof pos != \"number\") {\n                    throw new TypeError(\"argument index is not number\");\n                }\n\n                this.returnArgAt = pos;\n\n                return this;\n            },\n\n            returnsThis: function returnsThis() {\n                this.returnThis = true;\n\n                return this;\n            },\n\n            \"throws\": throwsException,\n            throwsException: throwsException,\n\n            callsArg: function callsArg(pos) {\n                if (typeof pos != \"number\") {\n                    throw new TypeError(\"argument index is not number\");\n                }\n\n                this.callArgAt = pos;\n                this.callbackArguments = [];\n\n                return this;\n            },\n\n            callsArgOn: function callsArgOn(pos, context) {\n                if (typeof pos != \"number\") {\n                    throw new TypeError(\"argument index is not number\");\n                }\n                if (typeof context != \"object\") {\n                    throw new TypeError(\"argument context is not an object\");\n                }\n\n                this.callArgAt = pos;\n                this.callbackArguments = [];\n                this.callbackContext = context;\n\n                return this;\n            },\n\n            callsArgWith: function callsArgWith(pos) {\n                if (typeof pos != \"number\") {\n                    throw new TypeError(\"argument index is not number\");\n                }\n\n                this.callArgAt = pos;\n                this.callbackArguments = slice.call(arguments, 1);\n\n                return this;\n            },\n\n            callsArgOnWith: function callsArgWith(pos, context) {\n                if (typeof pos != \"number\") {\n                    throw new TypeError(\"argument index is not number\");\n                }\n                if (typeof context != \"object\") {\n                    throw new TypeError(\"argument context is not an object\");\n                }\n\n                this.callArgAt = pos;\n                this.callbackArguments = slice.call(arguments, 2);\n                this.callbackContext = context;\n\n                return this;\n            },\n\n            yields: function () {\n                this.callArgAt = -1;\n                this.callbackArguments = slice.call(arguments, 0);\n\n                return this;\n            },\n\n            yieldsOn: function (context) {\n                if (typeof context != \"object\") {\n                    throw new TypeError(\"argument context is not an object\");\n                }\n\n                this.callArgAt = -1;\n                this.callbackArguments = slice.call(arguments, 1);\n                this.callbackContext = context;\n\n                return this;\n            },\n\n            yieldsTo: function (prop) {\n                this.callArgAt = -1;\n                this.callArgProp = prop;\n                this.callbackArguments = slice.call(arguments, 1);\n\n                return this;\n            },\n\n            yieldsToOn: function (prop, context) {\n                if (typeof context != \"object\") {\n                    throw new TypeError(\"argument context is not an object\");\n                }\n\n                this.callArgAt = -1;\n                this.callArgProp = prop;\n                this.callbackArguments = slice.call(arguments, 2);\n                this.callbackContext = context;\n\n                return this;\n            }\n        };\n\n        // create asynchronous versions of callsArg* and yields* methods\n        for (var method in proto) {\n            if (proto.hasOwnProperty(method) && method.match(/^(callsArg|yields)/)) {\n                proto[method + 'Async'] = (function (syncFnName) {\n                    return function () {\n                        this.callbackAsync = true;\n                        return this[syncFnName].apply(this, arguments);\n                    };\n                })(method);\n            }\n        }\n\n        return proto;\n\n    }()));\n\n    if (commonJSModule) {\n        module.exports = stub;\n    } else {\n        sinon.stub = stub;\n    }\n}(typeof sinon == \"object\" && sinon || null));\n\n/**\n * @depend ../sinon.js\n * @depend stub.js\n */\n/*jslint eqeqeq: false, onevar: false, nomen: false*/\n/*global module, require, sinon*/\n/**\n * Mock functions.\n *\n * @author Christian Johansen (christian@cjohansen.no)\n * @license BSD\n *\n * Copyright (c) 2010-2011 Christian Johansen\n */\n\n(function (sinon) {\n    var commonJSModule = typeof module == \"object\" && typeof require == \"function\";\n    var push = [].push;\n\n    if (!sinon && commonJSModule) {\n        sinon = require(\"../sinon\");\n    }\n\n    if (!sinon) {\n        return;\n    }\n\n    function mock(object) {\n        if (!object) {\n            return sinon.expectation.create(\"Anonymous mock\");\n        }\n\n        return mock.create(object);\n    }\n\n    sinon.mock = mock;\n\n    sinon.extend(mock, (function () {\n        function each(collection, callback) {\n            if (!collection) {\n                return;\n            }\n\n            for (var i = 0, l = collection.length; i < l; i += 1) {\n                callback(collection[i]);\n            }\n        }\n\n        return {\n            create: function create(object) {\n                if (!object) {\n                    throw new TypeError(\"object is null\");\n                }\n\n                var mockObject = sinon.extend({}, mock);\n                mockObject.object = object;\n                delete mockObject.create;\n\n                return mockObject;\n            },\n\n            expects: function expects(method) {\n                if (!method) {\n                    throw new TypeError(\"method is falsy\");\n                }\n\n                if (!this.expectations) {\n                    this.expectations = {};\n                    this.proxies = [];\n                }\n\n                if (!this.expectations[method]) {\n                    this.expectations[method] = [];\n                    var mockObject = this;\n\n                    sinon.wrapMethod(this.object, method, function () {\n                        return mockObject.invokeMethod(method, this, arguments);\n                    });\n\n                    push.call(this.proxies, method);\n                }\n\n                var expectation = sinon.expectation.create(method);\n                push.call(this.expectations[method], expectation);\n\n                return expectation;\n            },\n\n            restore: function restore() {\n                var object = this.object;\n\n                each(this.proxies, function (proxy) {\n                    if (typeof object[proxy].restore == \"function\") {\n                        object[proxy].restore();\n                    }\n                });\n            },\n\n            verify: function verify() {\n                var expectations = this.expectations || {};\n                var messages = [], met = [];\n\n                each(this.proxies, function (proxy) {\n                    each(expectations[proxy], function (expectation) {\n                        if (!expectation.met()) {\n                            push.call(messages, expectation.toString());\n                        } else {\n                            push.call(met, expectation.toString());\n                        }\n                    });\n                });\n\n                this.restore();\n\n                if (messages.length > 0) {\n                    sinon.expectation.fail(messages.concat(met).join(\"\\n\"));\n                } else {\n                    sinon.expectation.pass(messages.concat(met).join(\"\\n\"));\n                }\n\n                return true;\n            },\n\n            invokeMethod: function invokeMethod(method, thisValue, args) {\n                var expectations = this.expectations && this.expectations[method];\n                var length = expectations && expectations.length || 0, i;\n\n                for (i = 0; i < length; i += 1) {\n                    if (!expectations[i].met() &&\n                        expectations[i].allowsCall(thisValue, args)) {\n                        return expectations[i].apply(thisValue, args);\n                    }\n                }\n\n                var messages = [], available, exhausted = 0;\n\n                for (i = 0; i < length; i += 1) {\n                    if (expectations[i].allowsCall(thisValue, args)) {\n                        available = available || expectations[i];\n                    } else {\n                        exhausted += 1;\n                    }\n                    push.call(messages, \"    \" + expectations[i].toString());\n                }\n\n                if (exhausted === 0) {\n                    return available.apply(thisValue, args);\n                }\n\n                messages.unshift(\"Unexpected call: \" + sinon.spyCall.toString.call({\n                    proxy: method,\n                    args: args\n                }));\n\n                sinon.expectation.fail(messages.join(\"\\n\"));\n            }\n        };\n    }()));\n\n    var times = sinon.timesInWords;\n\n    sinon.expectation = (function () {\n        var slice = Array.prototype.slice;\n        var _invoke = sinon.spy.invoke;\n\n        function callCountInWords(callCount) {\n            if (callCount == 0) {\n                return \"never called\";\n            } else {\n                return \"called \" + times(callCount);\n            }\n        }\n\n        function expectedCallCountInWords(expectation) {\n            var min = expectation.minCalls;\n            var max = expectation.maxCalls;\n\n            if (typeof min == \"number\" && typeof max == \"number\") {\n                var str = times(min);\n\n                if (min != max) {\n                    str = \"at least \" + str + \" and at most \" + times(max);\n                }\n\n                return str;\n            }\n\n            if (typeof min == \"number\") {\n                return \"at least \" + times(min);\n            }\n\n            return \"at most \" + times(max);\n        }\n\n        function receivedMinCalls(expectation) {\n            var hasMinLimit = typeof expectation.minCalls == \"number\";\n            return !hasMinLimit || expectation.callCount >= expectation.minCalls;\n        }\n\n        function receivedMaxCalls(expectation) {\n            if (typeof expectation.maxCalls != \"number\") {\n                return false;\n            }\n\n            return expectation.callCount == expectation.maxCalls;\n        }\n\n        return {\n            minCalls: 1,\n            maxCalls: 1,\n\n            create: function create(methodName) {\n                var expectation = sinon.extend(sinon.stub.create(), sinon.expectation);\n                delete expectation.create;\n                expectation.method = methodName;\n\n                return expectation;\n            },\n\n            invoke: function invoke(func, thisValue, args) {\n                this.verifyCallAllowed(thisValue, args);\n\n                return _invoke.apply(this, arguments);\n            },\n\n            atLeast: function atLeast(num) {\n                if (typeof num != \"number\") {\n                    throw new TypeError(\"'\" + num + \"' is not number\");\n                }\n\n                if (!this.limitsSet) {\n                    this.maxCalls = null;\n                    this.limitsSet = true;\n                }\n\n                this.minCalls = num;\n\n                return this;\n            },\n\n            atMost: function atMost(num) {\n                if (typeof num != \"number\") {\n                    throw new TypeError(\"'\" + num + \"' is not number\");\n                }\n\n                if (!this.limitsSet) {\n                    this.minCalls = null;\n                    this.limitsSet = true;\n                }\n\n                this.maxCalls = num;\n\n                return this;\n            },\n\n            never: function never() {\n                return this.exactly(0);\n            },\n\n            once: function once() {\n                return this.exactly(1);\n            },\n\n            twice: function twice() {\n                return this.exactly(2);\n            },\n\n            thrice: function thrice() {\n                return this.exactly(3);\n            },\n\n            exactly: function exactly(num) {\n                if (typeof num != \"number\") {\n                    throw new TypeError(\"'\" + num + \"' is not a number\");\n                }\n\n                this.atLeast(num);\n                return this.atMost(num);\n            },\n\n            met: function met() {\n                return !this.failed && receivedMinCalls(this);\n            },\n\n            verifyCallAllowed: function verifyCallAllowed(thisValue, args) {\n                if (receivedMaxCalls(this)) {\n                    this.failed = true;\n                    sinon.expectation.fail(this.method + \" already called \" + times(this.maxCalls));\n                }\n\n                if (\"expectedThis\" in this && this.expectedThis !== thisValue) {\n                    sinon.expectation.fail(this.method + \" called with \" + thisValue + \" as thisValue, expected \" +\n                        this.expectedThis);\n                }\n\n                if (!(\"expectedArguments\" in this)) {\n                    return;\n                }\n\n                if (!args) {\n                    sinon.expectation.fail(this.method + \" received no arguments, expected \" +\n                        this.expectedArguments.join());\n                }\n\n                if (args.length < this.expectedArguments.length) {\n                    sinon.expectation.fail(this.method + \" received too few arguments (\" + args.join() +\n                        \"), expected \" + this.expectedArguments.join());\n                }\n\n                if (this.expectsExactArgCount &&\n                    args.length != this.expectedArguments.length) {\n                    sinon.expectation.fail(this.method + \" received too many arguments (\" + args.join() +\n                        \"), expected \" + this.expectedArguments.join());\n                }\n\n                for (var i = 0, l = this.expectedArguments.length; i < l; i += 1) {\n                    if (!sinon.deepEqual(this.expectedArguments[i], args[i])) {\n                        sinon.expectation.fail(this.method + \" received wrong arguments (\" + args.join() +\n                            \"), expected \" + this.expectedArguments.join());\n                    }\n                }\n            },\n\n            allowsCall: function allowsCall(thisValue, args) {\n                if (this.met() && receivedMaxCalls(this)) {\n                    return false;\n                }\n\n                if (\"expectedThis\" in this && this.expectedThis !== thisValue) {\n                    return false;\n                }\n\n                if (!(\"expectedArguments\" in this)) {\n                    return true;\n                }\n\n                args = args || [];\n\n                if (args.length < this.expectedArguments.length) {\n                    return false;\n                }\n\n                if (this.expectsExactArgCount &&\n                    args.length != this.expectedArguments.length) {\n                    return false;\n                }\n\n                for (var i = 0, l = this.expectedArguments.length; i < l; i += 1) {\n                    if (!sinon.deepEqual(this.expectedArguments[i], args[i])) {\n                        return false;\n                    }\n                }\n\n                return true;\n            },\n\n            withArgs: function withArgs() {\n                this.expectedArguments = slice.call(arguments);\n                return this;\n            },\n\n            withExactArgs: function withExactArgs() {\n                this.withArgs.apply(this, arguments);\n                this.expectsExactArgCount = true;\n                return this;\n            },\n\n            on: function on(thisValue) {\n                this.expectedThis = thisValue;\n                return this;\n            },\n\n            toString: function () {\n                var args = (this.expectedArguments || []).slice();\n\n                if (!this.expectsExactArgCount) {\n                    push.call(args, \"[...]\");\n                }\n\n                var callStr = sinon.spyCall.toString.call({\n                    proxy: this.method, args: args\n                });\n\n                var message = callStr.replace(\", [...\", \"[, ...\") + \" \" +\n                    expectedCallCountInWords(this);\n\n                if (this.met()) {\n                    return \"Expectation met: \" + message;\n                }\n\n                return \"Expected \" + message + \" (\" +\n                    callCountInWords(this.callCount) + \")\";\n            },\n\n            verify: function verify() {\n                if (!this.met()) {\n                    sinon.expectation.fail(this.toString());\n                } else {\n                    sinon.expectation.pass(this.toString());\n                }\n\n                return true;\n            },\n\n            pass: function(message) {\n              sinon.assert.pass(message);\n            },\n            fail: function (message) {\n                var exception = new Error(message);\n                exception.name = \"ExpectationError\";\n\n                throw exception;\n            }\n        };\n    }());\n\n    if (commonJSModule) {\n        module.exports = mock;\n    } else {\n        sinon.mock = mock;\n    }\n}(typeof sinon == \"object\" && sinon || null));\n\n/**\n * @depend ../sinon.js\n * @depend stub.js\n * @depend mock.js\n */\n/*jslint eqeqeq: false, onevar: false, forin: true*/\n/*global module, require, sinon*/\n/**\n * Collections of stubs, spies and mocks.\n *\n * @author Christian Johansen (christian@cjohansen.no)\n * @license BSD\n *\n * Copyright (c) 2010-2011 Christian Johansen\n */\n\n(function (sinon) {\n    var commonJSModule = typeof module == \"object\" && typeof require == \"function\";\n    var push = [].push;\n\n    if (!sinon && commonJSModule) {\n        sinon = require(\"../sinon\");\n    }\n\n    if (!sinon) {\n        return;\n    }\n\n    function getFakes(fakeCollection) {\n        if (!fakeCollection.fakes) {\n            fakeCollection.fakes = [];\n        }\n\n        return fakeCollection.fakes;\n    }\n\n    function each(fakeCollection, method) {\n        var fakes = getFakes(fakeCollection);\n\n        for (var i = 0, l = fakes.length; i < l; i += 1) {\n            if (typeof fakes[i][method] == \"function\") {\n                fakes[i][method]();\n            }\n        }\n    }\n\n    function compact(fakeCollection) {\n        var fakes = getFakes(fakeCollection);\n        var i = 0;\n        while (i < fakes.length) {\n          fakes.splice(i, 1);\n        }\n    }\n\n    var collection = {\n        verify: function resolve() {\n            each(this, \"verify\");\n        },\n\n        restore: function restore() {\n            each(this, \"restore\");\n            compact(this);\n        },\n\n        verifyAndRestore: function verifyAndRestore() {\n            var exception;\n\n            try {\n                this.verify();\n            } catch (e) {\n                exception = e;\n            }\n\n            this.restore();\n\n            if (exception) {\n                throw exception;\n            }\n        },\n\n        add: function add(fake) {\n            push.call(getFakes(this), fake);\n            return fake;\n        },\n\n        spy: function spy() {\n            return this.add(sinon.spy.apply(sinon, arguments));\n        },\n\n        stub: function stub(object, property, value) {\n            if (property) {\n                var original = object[property];\n\n                if (typeof original != \"function\") {\n                    if (!object.hasOwnProperty(property)) {\n                        throw new TypeError(\"Cannot stub non-existent own property \" + property);\n                    }\n\n                    object[property] = value;\n\n                    return this.add({\n                        restore: function () {\n                            object[property] = original;\n                        }\n                    });\n                }\n            }\n            if (!property && !!object && typeof object == \"object\") {\n                var stubbedObj = sinon.stub.apply(sinon, arguments);\n\n                for (var prop in stubbedObj) {\n                    if (typeof stubbedObj[prop] === \"function\") {\n                        this.add(stubbedObj[prop]);\n                    }\n                }\n\n                return stubbedObj;\n            }\n\n            return this.add(sinon.stub.apply(sinon, arguments));\n        },\n\n        mock: function mock() {\n            return this.add(sinon.mock.apply(sinon, arguments));\n        },\n\n        inject: function inject(obj) {\n            var col = this;\n\n            obj.spy = function () {\n                return col.spy.apply(col, arguments);\n            };\n\n            obj.stub = function () {\n                return col.stub.apply(col, arguments);\n            };\n\n            obj.mock = function () {\n                return col.mock.apply(col, arguments);\n            };\n\n            return obj;\n        }\n    };\n\n    if (commonJSModule) {\n        module.exports = collection;\n    } else {\n        sinon.collection = collection;\n    }\n}(typeof sinon == \"object\" && sinon || null));\n\n/*jslint eqeqeq: false, plusplus: false, evil: true, onevar: false, browser: true, forin: false*/\n/*global module, require, window*/\n/**\n * Fake timer API\n * setTimeout\n * setInterval\n * clearTimeout\n * clearInterval\n * tick\n * reset\n * Date\n *\n * Inspired by jsUnitMockTimeOut from JsUnit\n *\n * @author Christian Johansen (christian@cjohansen.no)\n * @license BSD\n *\n * Copyright (c) 2010-2011 Christian Johansen\n */\n\nif (typeof sinon == \"undefined\") {\n    var sinon = {};\n}\n\n(function (global) {\n    var id = 1;\n\n    function addTimer(args, recurring) {\n        if (args.length === 0) {\n            throw new Error(\"Function requires at least 1 parameter\");\n        }\n\n        var toId = id++;\n        var delay = args[1] || 0;\n\n        if (!this.timeouts) {\n            this.timeouts = {};\n        }\n\n        this.timeouts[toId] = {\n            id: toId,\n            func: args[0],\n            callAt: this.now + delay,\n            invokeArgs: Array.prototype.slice.call(args, 2)\n        };\n\n        if (recurring === true) {\n            this.timeouts[toId].interval = delay;\n        }\n\n        return toId;\n    }\n\n    function parseTime(str) {\n        if (!str) {\n            return 0;\n        }\n\n        var strings = str.split(\":\");\n        var l = strings.length, i = l;\n        var ms = 0, parsed;\n\n        if (l > 3 || !/^(\\d\\d:){0,2}\\d\\d?$/.test(str)) {\n            throw new Error(\"tick only understands numbers and 'h:m:s'\");\n        }\n\n        while (i--) {\n            parsed = parseInt(strings[i], 10);\n\n            if (parsed >= 60) {\n                throw new Error(\"Invalid time \" + str);\n            }\n\n            ms += parsed * Math.pow(60, (l - i - 1));\n        }\n\n        return ms * 1000;\n    }\n\n    function createObject(object) {\n        var newObject;\n\n        if (Object.create) {\n            newObject = Object.create(object);\n        } else {\n            var F = function () {};\n            F.prototype = object;\n            newObject = new F();\n        }\n\n        newObject.Date.clock = newObject;\n        return newObject;\n    }\n\n    sinon.clock = {\n        now: 0,\n\n        create: function create(now) {\n            var clock = createObject(this);\n\n            if (typeof now == \"number\") {\n                clock.now = now;\n            }\n\n            if (!!now && typeof now == \"object\") {\n                throw new TypeError(\"now should be milliseconds since UNIX epoch\");\n            }\n\n            return clock;\n        },\n\n        setTimeout: function setTimeout(callback, timeout) {\n            return addTimer.call(this, arguments, false);\n        },\n\n        clearTimeout: function clearTimeout(timerId) {\n            if (!this.timeouts) {\n                this.timeouts = [];\n            }\n\n            if (timerId in this.timeouts) {\n                delete this.timeouts[timerId];\n            }\n        },\n\n        setInterval: function setInterval(callback, timeout) {\n            return addTimer.call(this, arguments, true);\n        },\n\n        clearInterval: function clearInterval(timerId) {\n            this.clearTimeout(timerId);\n        },\n\n        tick: function tick(ms) {\n            ms = typeof ms == \"number\" ? ms : parseTime(ms);\n            var tickFrom = this.now, tickTo = this.now + ms, previous = this.now;\n            var timer = this.firstTimerInRange(tickFrom, tickTo);\n\n            var firstException;\n            while (timer && tickFrom <= tickTo) {\n                if (this.timeouts[timer.id]) {\n                    tickFrom = this.now = timer.callAt;\n                    try {\n                      this.callTimer(timer);\n                    } catch (e) {\n                      firstException = firstException || e;\n                    }\n                }\n\n                timer = this.firstTimerInRange(previous, tickTo);\n                previous = tickFrom;\n            }\n\n            this.now = tickTo;\n\n            if (firstException) {\n              throw firstException;\n            }\n        },\n\n        firstTimerInRange: function (from, to) {\n            var timer, smallest, originalTimer;\n\n            for (var id in this.timeouts) {\n                if (this.timeouts.hasOwnProperty(id)) {\n                    if (this.timeouts[id].callAt < from || this.timeouts[id].callAt > to) {\n                        continue;\n                    }\n\n                    if (!smallest || this.timeouts[id].callAt < smallest) {\n                        originalTimer = this.timeouts[id];\n                        smallest = this.timeouts[id].callAt;\n\n                        timer = {\n                            func: this.timeouts[id].func,\n                            callAt: this.timeouts[id].callAt,\n                            interval: this.timeouts[id].interval,\n                            id: this.timeouts[id].id,\n                            invokeArgs: this.timeouts[id].invokeArgs\n                        };\n                    }\n                }\n            }\n\n            return timer || null;\n        },\n\n        callTimer: function (timer) {\n            if (typeof timer.interval == \"number\") {\n                this.timeouts[timer.id].callAt += timer.interval;\n            } else {\n                delete this.timeouts[timer.id];\n            }\n\n            try {\n                if (typeof timer.func == \"function\") {\n                    timer.func.apply(null, timer.invokeArgs);\n                } else {\n                    eval(timer.func);\n                }\n            } catch (e) {\n              var exception = e;\n            }\n\n            if (!this.timeouts[timer.id]) {\n                if (exception) {\n                  throw exception;\n                }\n                return;\n            }\n\n            if (exception) {\n              throw exception;\n            }\n        },\n\n        reset: function reset() {\n            this.timeouts = {};\n        },\n\n        Date: (function () {\n            var NativeDate = Date;\n\n            function ClockDate(year, month, date, hour, minute, second, ms) {\n                // Defensive and verbose to avoid potential harm in passing\n                // explicit undefined when user does not pass argument\n                switch (arguments.length) {\n                case 0:\n                    return new NativeDate(ClockDate.clock.now);\n                case 1:\n                    return new NativeDate(year);\n                case 2:\n                    return new NativeDate(year, month);\n                case 3:\n                    return new NativeDate(year, month, date);\n                case 4:\n                    return new NativeDate(year, month, date, hour);\n                case 5:\n                    return new NativeDate(year, month, date, hour, minute);\n                case 6:\n                    return new NativeDate(year, month, date, hour, minute, second);\n                default:\n                    return new NativeDate(year, month, date, hour, minute, second, ms);\n                }\n            }\n\n            return mirrorDateProperties(ClockDate, NativeDate);\n        }())\n    };\n\n    function mirrorDateProperties(target, source) {\n        if (source.now) {\n            target.now = function now() {\n                return target.clock.now;\n            };\n        } else {\n            delete target.now;\n        }\n\n        if (source.toSource) {\n            target.toSource = function toSource() {\n                return source.toSource();\n            };\n        } else {\n            delete target.toSource;\n        }\n\n        target.toString = function toString() {\n            return source.toString();\n        };\n\n        target.prototype = source.prototype;\n        target.parse = source.parse;\n        target.UTC = source.UTC;\n        target.prototype.toUTCString = source.prototype.toUTCString;\n        return target;\n    }\n\n    var methods = [\"Date\", \"setTimeout\", \"setInterval\",\n                   \"clearTimeout\", \"clearInterval\"];\n\n    function restore() {\n        var method;\n\n        for (var i = 0, l = this.methods.length; i < l; i++) {\n            method = this.methods[i];\n            if (global[method].hadOwnProperty) {\n                global[method] = this[\"_\" + method];\n            } else {\n                delete global[method];\n            }\n        }\n\n        // Prevent multiple executions which will completely remove these props\n        this.methods = [];\n    }\n\n    function stubGlobal(method, clock) {\n        clock[method].hadOwnProperty = Object.prototype.hasOwnProperty.call(global, method);\n        clock[\"_\" + method] = global[method];\n\n        if (method == \"Date\") {\n            var date = mirrorDateProperties(clock[method], global[method]);\n            global[method] = date;\n        } else {\n            global[method] = function () {\n                return clock[method].apply(clock, arguments);\n            };\n\n            for (var prop in clock[method]) {\n                if (clock[method].hasOwnProperty(prop)) {\n                    global[method][prop] = clock[method][prop];\n                }\n            }\n        }\n\n        global[method].clock = clock;\n    }\n\n    sinon.useFakeTimers = function useFakeTimers(now) {\n        var clock = sinon.clock.create(now);\n        clock.restore = restore;\n        clock.methods = Array.prototype.slice.call(arguments,\n                                                   typeof now == \"number\" ? 1 : 0);\n\n        if (clock.methods.length === 0) {\n            clock.methods = methods;\n        }\n\n        for (var i = 0, l = clock.methods.length; i < l; i++) {\n            stubGlobal(clock.methods[i], clock);\n        }\n\n        return clock;\n    };\n}(typeof global != \"undefined\" && typeof global !== \"function\" ? global : this));\n\nsinon.timers = {\n    setTimeout: setTimeout,\n    clearTimeout: clearTimeout,\n    setInterval: setInterval,\n    clearInterval: clearInterval,\n    Date: Date\n};\n\nif (typeof module == \"object\" && typeof require == \"function\") {\n    module.exports = sinon;\n}\n\n/*jslint eqeqeq: false, onevar: false*/\n/*global sinon, module, require, ActiveXObject, XMLHttpRequest, DOMParser*/\n/**\n * Minimal Event interface implementation\n *\n * Original implementation by Sven Fuchs: https://gist.github.com/995028\n * Modifications and tests by Christian Johansen.\n *\n * @author Sven Fuchs (svenfuchs@artweb-design.de)\n * @author Christian Johansen (christian@cjohansen.no)\n * @license BSD\n *\n * Copyright (c) 2011 Sven Fuchs, Christian Johansen\n */\n\nif (typeof sinon == \"undefined\") {\n    this.sinon = {};\n}\n\n(function () {\n    var push = [].push;\n\n    sinon.Event = function Event(type, bubbles, cancelable) {\n        this.initEvent(type, bubbles, cancelable);\n    };\n\n    sinon.Event.prototype = {\n        initEvent: function(type, bubbles, cancelable) {\n            this.type = type;\n            this.bubbles = bubbles;\n            this.cancelable = cancelable;\n        },\n\n        stopPropagation: function () {},\n\n        preventDefault: function () {\n            this.defaultPrevented = true;\n        }\n    };\n\n    sinon.EventTarget = {\n        addEventListener: function addEventListener(event, listener, useCapture) {\n            this.eventListeners = this.eventListeners || {};\n            this.eventListeners[event] = this.eventListeners[event] || [];\n            push.call(this.eventListeners[event], listener);\n        },\n\n        removeEventListener: function removeEventListener(event, listener, useCapture) {\n            var listeners = this.eventListeners && this.eventListeners[event] || [];\n\n            for (var i = 0, l = listeners.length; i < l; ++i) {\n                if (listeners[i] == listener) {\n                    return listeners.splice(i, 1);\n                }\n            }\n        },\n\n        dispatchEvent: function dispatchEvent(event) {\n            var type = event.type;\n            var listeners = this.eventListeners && this.eventListeners[type] || [];\n\n            for (var i = 0; i < listeners.length; i++) {\n                if (typeof listeners[i] == \"function\") {\n                    listeners[i].call(this, event);\n                } else {\n                    listeners[i].handleEvent(event);\n                }\n            }\n\n            return !!event.defaultPrevented;\n        }\n    };\n}());\n\n/**\n * @depend event.js\n */\n/*jslint eqeqeq: false, onevar: false*/\n/*global sinon, module, require, ActiveXObject, XMLHttpRequest, DOMParser*/\n/**\n * Fake XMLHttpRequest object\n *\n * @author Christian Johansen (christian@cjohansen.no)\n * @license BSD\n *\n * Copyright (c) 2010-2011 Christian Johansen\n */\n\nif (typeof sinon == \"undefined\") {\n    this.sinon = {};\n}\nsinon.xhr = { XMLHttpRequest: this.XMLHttpRequest };\n\n// wrapper for global\n(function(global) {\n    var xhr = sinon.xhr;\n    xhr.GlobalXMLHttpRequest = global.XMLHttpRequest;\n    xhr.GlobalActiveXObject = global.ActiveXObject;\n    xhr.supportsActiveX = typeof xhr.GlobalActiveXObject != \"undefined\";\n    xhr.supportsXHR = typeof xhr.GlobalXMLHttpRequest != \"undefined\";\n    xhr.workingXHR = xhr.supportsXHR ? xhr.GlobalXMLHttpRequest : xhr.supportsActiveX\n                                     ? function() { return new xhr.GlobalActiveXObject(\"MSXML2.XMLHTTP.3.0\") } : false;\n\n    /*jsl:ignore*/\n    var unsafeHeaders = {\n        \"Accept-Charset\": true,\n        \"Accept-Encoding\": true,\n        \"Connection\": true,\n        \"Content-Length\": true,\n        \"Cookie\": true,\n        \"Cookie2\": true,\n        \"Content-Transfer-Encoding\": true,\n        \"Date\": true,\n        \"Expect\": true,\n        \"Host\": true,\n        \"Keep-Alive\": true,\n        \"Referer\": true,\n        \"TE\": true,\n        \"Trailer\": true,\n        \"Transfer-Encoding\": true,\n        \"Upgrade\": true,\n        \"User-Agent\": true,\n        \"Via\": true\n    };\n    /*jsl:end*/\n\n    function FakeXMLHttpRequest() {\n        this.readyState = FakeXMLHttpRequest.UNSENT;\n        this.requestHeaders = {};\n        this.requestBody = null;\n        this.status = 0;\n        this.statusText = \"\";\n\n        if (typeof FakeXMLHttpRequest.onCreate == \"function\") {\n            FakeXMLHttpRequest.onCreate(this);\n        }\n    }\n\n    function verifyState(xhr) {\n        if (xhr.readyState !== FakeXMLHttpRequest.OPENED) {\n            throw new Error(\"INVALID_STATE_ERR\");\n        }\n\n        if (xhr.sendFlag) {\n            throw new Error(\"INVALID_STATE_ERR\");\n        }\n    }\n\n    // filtering to enable a white-list version of Sinon FakeXhr,\n    // where whitelisted requests are passed through to real XHR\n    function each(collection, callback) {\n        if (!collection) return;\n        for (var i = 0, l = collection.length; i < l; i += 1) {\n            callback(collection[i]);\n        }\n    }\n    function some(collection, callback) {\n        for (var index = 0; index < collection.length; index++) {\n            if(callback(collection[index]) === true) return true;\n        };\n        return false;\n    }\n    // largest arity in XHR is 5 - XHR#open\n    var apply = function(obj,method,args) {\n        switch(args.length) {\n        case 0: return obj[method]();\n        case 1: return obj[method](args[0]);\n        case 2: return obj[method](args[0],args[1]);\n        case 3: return obj[method](args[0],args[1],args[2]);\n        case 4: return obj[method](args[0],args[1],args[2],args[3]);\n        case 5: return obj[method](args[0],args[1],args[2],args[3],args[4]);\n        };\n    };\n\n    FakeXMLHttpRequest.filters = [];\n    FakeXMLHttpRequest.addFilter = function(fn) {\n        this.filters.push(fn)\n    };\n    var IE6Re = /MSIE 6/;\n    FakeXMLHttpRequest.defake = function(fakeXhr,xhrArgs) {\n        var xhr = new sinon.xhr.workingXHR();\n        each([\"open\",\"setRequestHeader\",\"send\",\"abort\",\"getResponseHeader\",\n              \"getAllResponseHeaders\",\"addEventListener\",\"overrideMimeType\",\"removeEventListener\"],\n             function(method) {\n                 fakeXhr[method] = function() {\n                   return apply(xhr,method,arguments);\n                 };\n             });\n\n        var copyAttrs = function(args) {\n            each(args, function(attr) {\n              try {\n                fakeXhr[attr] = xhr[attr]\n              } catch(e) {\n                if(!IE6Re.test(navigator.userAgent)) throw e;\n              }\n            });\n        };\n\n        var stateChange = function() {\n            fakeXhr.readyState = xhr.readyState;\n            if(xhr.readyState >= FakeXMLHttpRequest.HEADERS_RECEIVED) {\n                copyAttrs([\"status\",\"statusText\"]);\n            }\n            if(xhr.readyState >= FakeXMLHttpRequest.LOADING) {\n                copyAttrs([\"responseText\"]);\n            }\n            if(xhr.readyState === FakeXMLHttpRequest.DONE) {\n                copyAttrs([\"responseXML\"]);\n            }\n            if(fakeXhr.onreadystatechange) fakeXhr.onreadystatechange.call(fakeXhr);\n        };\n        if(xhr.addEventListener) {\n          for(var event in fakeXhr.eventListeners) {\n              if(fakeXhr.eventListeners.hasOwnProperty(event)) {\n                  each(fakeXhr.eventListeners[event],function(handler) {\n                      xhr.addEventListener(event, handler);\n                  });\n              }\n          }\n          xhr.addEventListener(\"readystatechange\",stateChange);\n        } else {\n          xhr.onreadystatechange = stateChange;\n        }\n        apply(xhr,\"open\",xhrArgs);\n    };\n    FakeXMLHttpRequest.useFilters = false;\n\n    function verifyRequestSent(xhr) {\n        if (xhr.readyState == FakeXMLHttpRequest.DONE) {\n            throw new Error(\"Request done\");\n        }\n    }\n\n    function verifyHeadersReceived(xhr) {\n        if (xhr.async && xhr.readyState != FakeXMLHttpRequest.HEADERS_RECEIVED) {\n            throw new Error(\"No headers received\");\n        }\n    }\n\n    function verifyResponseBodyType(body) {\n        if (typeof body != \"string\") {\n            var error = new Error(\"Attempted to respond to fake XMLHttpRequest with \" +\n                                 body + \", which is not a string.\");\n            error.name = \"InvalidBodyException\";\n            throw error;\n        }\n    }\n\n    sinon.extend(FakeXMLHttpRequest.prototype, sinon.EventTarget, {\n        async: true,\n\n        open: function open(method, url, async, username, password) {\n            this.method = method;\n            this.url = url;\n            this.async = typeof async == \"boolean\" ? async : true;\n            this.username = username;\n            this.password = password;\n            this.responseText = null;\n            this.responseXML = null;\n            this.requestHeaders = {};\n            this.sendFlag = false;\n            if(sinon.FakeXMLHttpRequest.useFilters === true) {\n                var xhrArgs = arguments;\n                var defake = some(FakeXMLHttpRequest.filters,function(filter) {\n                    return filter.apply(this,xhrArgs)\n                });\n                if (defake) {\n                  return sinon.FakeXMLHttpRequest.defake(this,arguments);\n                }\n            }\n            this.readyStateChange(FakeXMLHttpRequest.OPENED);\n        },\n\n        readyStateChange: function readyStateChange(state) {\n            this.readyState = state;\n\n            if (typeof this.onreadystatechange == \"function\") {\n                try {\n                    this.onreadystatechange();\n                } catch (e) {\n                    sinon.logError(\"Fake XHR onreadystatechange handler\", e);\n                }\n            }\n\n            this.dispatchEvent(new sinon.Event(\"readystatechange\"));\n        },\n\n        setRequestHeader: function setRequestHeader(header, value) {\n            verifyState(this);\n\n            if (unsafeHeaders[header] || /^(Sec-|Proxy-)/.test(header)) {\n                throw new Error(\"Refused to set unsafe header \\\"\" + header + \"\\\"\");\n            }\n\n            if (this.requestHeaders[header]) {\n                this.requestHeaders[header] += \",\" + value;\n            } else {\n                this.requestHeaders[header] = value;\n            }\n        },\n\n        // Helps testing\n        setResponseHeaders: function setResponseHeaders(headers) {\n            this.responseHeaders = {};\n\n            for (var header in headers) {\n                if (headers.hasOwnProperty(header)) {\n                    this.responseHeaders[header] = headers[header];\n                }\n            }\n\n            if (this.async) {\n                this.readyStateChange(FakeXMLHttpRequest.HEADERS_RECEIVED);\n            }\n        },\n\n        // Currently treats ALL data as a DOMString (i.e. no Document)\n        send: function send(data) {\n            verifyState(this);\n\n            if (!/^(get|head)$/i.test(this.method)) {\n                if (this.requestHeaders[\"Content-Type\"]) {\n                    var value = this.requestHeaders[\"Content-Type\"].split(\";\");\n                    this.requestHeaders[\"Content-Type\"] = value[0] + \";charset=utf-8\";\n                } else {\n                    this.requestHeaders[\"Content-Type\"] = \"text/plain;charset=utf-8\";\n                }\n\n                this.requestBody = data;\n            }\n\n            this.errorFlag = false;\n            this.sendFlag = this.async;\n            this.readyStateChange(FakeXMLHttpRequest.OPENED);\n\n            if (typeof this.onSend == \"function\") {\n                this.onSend(this);\n            }\n        },\n\n        abort: function abort() {\n            this.aborted = true;\n            this.responseText = null;\n            this.errorFlag = true;\n            this.requestHeaders = {};\n\n            if (this.readyState > sinon.FakeXMLHttpRequest.UNSENT && this.sendFlag) {\n                this.readyStateChange(sinon.FakeXMLHttpRequest.DONE);\n                this.sendFlag = false;\n            }\n\n            this.readyState = sinon.FakeXMLHttpRequest.UNSENT;\n        },\n\n        getResponseHeader: function getResponseHeader(header) {\n            if (this.readyState < FakeXMLHttpRequest.HEADERS_RECEIVED) {\n                return null;\n            }\n\n            if (/^Set-Cookie2?$/i.test(header)) {\n                return null;\n            }\n\n            header = header.toLowerCase();\n\n            for (var h in this.responseHeaders) {\n                if (h.toLowerCase() == header) {\n                    return this.responseHeaders[h];\n                }\n            }\n\n            return null;\n        },\n\n        getAllResponseHeaders: function getAllResponseHeaders() {\n            if (this.readyState < FakeXMLHttpRequest.HEADERS_RECEIVED) {\n                return \"\";\n            }\n\n            var headers = \"\";\n\n            for (var header in this.responseHeaders) {\n                if (this.responseHeaders.hasOwnProperty(header) &&\n                    !/^Set-Cookie2?$/i.test(header)) {\n                    headers += header + \": \" + this.responseHeaders[header] + \"\\r\\n\";\n                }\n            }\n\n            return headers;\n        },\n\n        setResponseBody: function setResponseBody(body) {\n            verifyRequestSent(this);\n            verifyHeadersReceived(this);\n            verifyResponseBodyType(body);\n\n            var chunkSize = this.chunkSize || 10;\n            var index = 0;\n            this.responseText = \"\";\n\n            do {\n                if (this.async) {\n                    this.readyStateChange(FakeXMLHttpRequest.LOADING);\n                }\n\n                this.responseText += body.substring(index, index + chunkSize);\n                index += chunkSize;\n            } while (index < body.length);\n\n            var type = this.getResponseHeader(\"Content-Type\");\n\n            if (this.responseText &&\n                (!type || /(text\\/xml)|(application\\/xml)|(\\+xml)/.test(type))) {\n                try {\n                    this.responseXML = FakeXMLHttpRequest.parseXML(this.responseText);\n                } catch (e) {\n                    // Unable to parse XML - no biggie\n                }\n            }\n\n            if (this.async) {\n                this.readyStateChange(FakeXMLHttpRequest.DONE);\n            } else {\n                this.readyState = FakeXMLHttpRequest.DONE;\n            }\n        },\n\n        respond: function respond(status, headers, body) {\n            this.setResponseHeaders(headers || {});\n            this.status = typeof status == \"number\" ? status : 200;\n            this.statusText = FakeXMLHttpRequest.statusCodes[this.status];\n            this.setResponseBody(body || \"\");\n        }\n    });\n\n    sinon.extend(FakeXMLHttpRequest, {\n        UNSENT: 0,\n        OPENED: 1,\n        HEADERS_RECEIVED: 2,\n        LOADING: 3,\n        DONE: 4\n    });\n\n    // Borrowed from JSpec\n    FakeXMLHttpRequest.parseXML = function parseXML(text) {\n        var xmlDoc;\n\n        if (typeof DOMParser != \"undefined\") {\n            var parser = new DOMParser();\n            xmlDoc = parser.parseFromString(text, \"text/xml\");\n        } else {\n            xmlDoc = new ActiveXObject(\"Microsoft.XMLDOM\");\n            xmlDoc.async = \"false\";\n            xmlDoc.loadXML(text);\n        }\n\n        return xmlDoc;\n    };\n\n    FakeXMLHttpRequest.statusCodes = {\n        100: \"Continue\",\n        101: \"Switching Protocols\",\n        200: \"OK\",\n        201: \"Created\",\n        202: \"Accepted\",\n        203: \"Non-Authoritative Information\",\n        204: \"No Content\",\n        205: \"Reset Content\",\n        206: \"Partial Content\",\n        300: \"Multiple Choice\",\n        301: \"Moved Permanently\",\n        302: \"Found\",\n        303: \"See Other\",\n        304: \"Not Modified\",\n        305: \"Use Proxy\",\n        307: \"Temporary Redirect\",\n        400: \"Bad Request\",\n        401: \"Unauthorized\",\n        402: \"Payment Required\",\n        403: \"Forbidden\",\n        404: \"Not Found\",\n        405: \"Method Not Allowed\",\n        406: \"Not Acceptable\",\n        407: \"Proxy Authentication Required\",\n        408: \"Request Timeout\",\n        409: \"Conflict\",\n        410: \"Gone\",\n        411: \"Length Required\",\n        412: \"Precondition Failed\",\n        413: \"Request Entity Too Large\",\n        414: \"Request-URI Too Long\",\n        415: \"Unsupported Media Type\",\n        416: \"Requested Range Not Satisfiable\",\n        417: \"Expectation Failed\",\n        422: \"Unprocessable Entity\",\n        500: \"Internal Server Error\",\n        501: \"Not Implemented\",\n        502: \"Bad Gateway\",\n        503: \"Service Unavailable\",\n        504: \"Gateway Timeout\",\n        505: \"HTTP Version Not Supported\"\n    };\n\n    sinon.useFakeXMLHttpRequest = function () {\n        sinon.FakeXMLHttpRequest.restore = function restore(keepOnCreate) {\n            if (xhr.supportsXHR) {\n                global.XMLHttpRequest = xhr.GlobalXMLHttpRequest;\n            }\n\n            if (xhr.supportsActiveX) {\n                global.ActiveXObject = xhr.GlobalActiveXObject;\n            }\n\n            delete sinon.FakeXMLHttpRequest.restore;\n\n            if (keepOnCreate !== true) {\n                delete sinon.FakeXMLHttpRequest.onCreate;\n            }\n        };\n        if (xhr.supportsXHR) {\n            global.XMLHttpRequest = sinon.FakeXMLHttpRequest;\n        }\n\n        if (xhr.supportsActiveX) {\n            global.ActiveXObject = function ActiveXObject(objId) {\n                if (objId == \"Microsoft.XMLHTTP\" || /^Msxml2\\.XMLHTTP/i.test(objId)) {\n\n                    return new sinon.FakeXMLHttpRequest();\n                }\n\n                return new xhr.GlobalActiveXObject(objId);\n            };\n        }\n\n        return sinon.FakeXMLHttpRequest;\n    };\n\n    sinon.FakeXMLHttpRequest = FakeXMLHttpRequest;\n})(this);\n\nif (typeof module == \"object\" && typeof require == \"function\") {\n    module.exports = sinon;\n}\n\n/**\n * @depend fake_xml_http_request.js\n */\n/*jslint eqeqeq: false, onevar: false, regexp: false, plusplus: false*/\n/*global module, require, window*/\n/**\n * The Sinon \"server\" mimics a web server that receives requests from\n * sinon.FakeXMLHttpRequest and provides an API to respond to those requests,\n * both synchronously and asynchronously. To respond synchronuously, canned\n * answers have to be provided upfront.\n *\n * @author Christian Johansen (christian@cjohansen.no)\n * @license BSD\n *\n * Copyright (c) 2010-2011 Christian Johansen\n */\n\nif (typeof sinon == \"undefined\") {\n    var sinon = {};\n}\n\nsinon.fakeServer = (function () {\n    var push = [].push;\n    function F() {}\n\n    function create(proto) {\n        F.prototype = proto;\n        return new F();\n    }\n\n    function responseArray(handler) {\n        var response = handler;\n\n        if (Object.prototype.toString.call(handler) != \"[object Array]\") {\n            response = [200, {}, handler];\n        }\n\n        if (typeof response[2] != \"string\") {\n            throw new TypeError(\"Fake server response body should be string, but was \" +\n                                typeof response[2]);\n        }\n\n        return response;\n    }\n\n    var wloc = typeof window !== \"undefined\" ? window.location : {};\n    var rCurrLoc = new RegExp(\"^\" + wloc.protocol + \"//\" + wloc.host);\n\n    function matchOne(response, reqMethod, reqUrl) {\n        var rmeth = response.method;\n        var matchMethod = !rmeth || rmeth.toLowerCase() == reqMethod.toLowerCase();\n        var url = response.url;\n        var matchUrl = !url || url == reqUrl || (typeof url.test == \"function\" && url.test(reqUrl));\n\n        return matchMethod && matchUrl;\n    }\n\n    function match(response, request) {\n        var requestMethod = this.getHTTPMethod(request);\n        var requestUrl = request.url;\n\n        if (!/^https?:\\/\\//.test(requestUrl) || rCurrLoc.test(requestUrl)) {\n            requestUrl = requestUrl.replace(rCurrLoc, \"\");\n        }\n\n        if (matchOne(response, this.getHTTPMethod(request), requestUrl)) {\n            if (typeof response.response == \"function\") {\n                var ru = response.url;\n                var args = [request].concat(!ru ? [] : requestUrl.match(ru).slice(1));\n                return response.response.apply(response, args);\n            }\n\n            return true;\n        }\n\n        return false;\n    }\n\n    return {\n        create: function () {\n            var server = create(this);\n            this.xhr = sinon.useFakeXMLHttpRequest();\n            server.requests = [];\n\n            this.xhr.onCreate = function (xhrObj) {\n                server.addRequest(xhrObj);\n            };\n\n            return server;\n        },\n\n        addRequest: function addRequest(xhrObj) {\n            var server = this;\n            push.call(this.requests, xhrObj);\n\n            xhrObj.onSend = function () {\n                server.handleRequest(this);\n            };\n\n            if (this.autoRespond && !this.responding) {\n                setTimeout(function () {\n                    server.responding = false;\n                    server.respond();\n                }, this.autoRespondAfter || 10);\n\n                this.responding = true;\n            }\n        },\n\n        getHTTPMethod: function getHTTPMethod(request) {\n            if (this.fakeHTTPMethods && /post/i.test(request.method)) {\n                var matches = (request.requestBody || \"\").match(/_method=([^\\b;]+)/);\n                return !!matches ? matches[1] : request.method;\n            }\n\n            return request.method;\n        },\n\n        handleRequest: function handleRequest(xhr) {\n            if (xhr.async) {\n                if (!this.queue) {\n                    this.queue = [];\n                }\n\n                push.call(this.queue, xhr);\n            } else {\n                this.processRequest(xhr);\n            }\n        },\n\n        respondWith: function respondWith(method, url, body) {\n            if (arguments.length == 1 && typeof method != \"function\") {\n                this.response = responseArray(method);\n                return;\n            }\n\n            if (!this.responses) { this.responses = []; }\n\n            if (arguments.length == 1) {\n                body = method;\n                url = method = null;\n            }\n\n            if (arguments.length == 2) {\n                body = url;\n                url = method;\n                method = null;\n            }\n\n            push.call(this.responses, {\n                method: method,\n                url: url,\n                response: typeof body == \"function\" ? body : responseArray(body)\n            });\n        },\n\n        respond: function respond() {\n            if (arguments.length > 0) this.respondWith.apply(this, arguments);\n            var queue = this.queue || [];\n            var request;\n\n            while(request = queue.shift()) {\n                this.processRequest(request);\n            }\n        },\n\n        processRequest: function processRequest(request) {\n            try {\n                if (request.aborted) {\n                    return;\n                }\n\n                var response = this.response || [404, {}, \"\"];\n\n                if (this.responses) {\n                    for (var i = 0, l = this.responses.length; i < l; i++) {\n                        if (match.call(this, this.responses[i], request)) {\n                            response = this.responses[i].response;\n                            break;\n                        }\n                    }\n                }\n\n                if (request.readyState != 4) {\n                    request.respond(response[0], response[1], response[2]);\n                }\n            } catch (e) {\n                sinon.logError(\"Fake server request processing\", e);\n            }\n        },\n\n        restore: function restore() {\n            return this.xhr.restore && this.xhr.restore.apply(this.xhr, arguments);\n        }\n    };\n}());\n\nif (typeof module == \"object\" && typeof require == \"function\") {\n    module.exports = sinon;\n}\n\n/**\n * @depend fake_server.js\n * @depend fake_timers.js\n */\n/*jslint browser: true, eqeqeq: false, onevar: false*/\n/*global sinon*/\n/**\n * Add-on for sinon.fakeServer that automatically handles a fake timer along with\n * the FakeXMLHttpRequest. The direct inspiration for this add-on is jQuery\n * 1.3.x, which does not use xhr object's onreadystatehandler at all - instead,\n * it polls the object for completion with setInterval. Dispite the direct\n * motivation, there is nothing jQuery-specific in this file, so it can be used\n * in any environment where the ajax implementation depends on setInterval or\n * setTimeout.\n *\n * @author Christian Johansen (christian@cjohansen.no)\n * @license BSD\n *\n * Copyright (c) 2010-2011 Christian Johansen\n */\n\n(function () {\n    function Server() {}\n    Server.prototype = sinon.fakeServer;\n\n    sinon.fakeServerWithClock = new Server();\n\n    sinon.fakeServerWithClock.addRequest = function addRequest(xhr) {\n        if (xhr.async) {\n            if (typeof setTimeout.clock == \"object\") {\n                this.clock = setTimeout.clock;\n            } else {\n                this.clock = sinon.useFakeTimers();\n                this.resetClock = true;\n            }\n\n            if (!this.longestTimeout) {\n                var clockSetTimeout = this.clock.setTimeout;\n                var clockSetInterval = this.clock.setInterval;\n                var server = this;\n\n                this.clock.setTimeout = function (fn, timeout) {\n                    server.longestTimeout = Math.max(timeout, server.longestTimeout || 0);\n\n                    return clockSetTimeout.apply(this, arguments);\n                };\n\n                this.clock.setInterval = function (fn, timeout) {\n                    server.longestTimeout = Math.max(timeout, server.longestTimeout || 0);\n\n                    return clockSetInterval.apply(this, arguments);\n                };\n            }\n        }\n\n        return sinon.fakeServer.addRequest.call(this, xhr);\n    };\n\n    sinon.fakeServerWithClock.respond = function respond() {\n        var returnVal = sinon.fakeServer.respond.apply(this, arguments);\n\n        if (this.clock) {\n            this.clock.tick(this.longestTimeout || 0);\n            this.longestTimeout = 0;\n\n            if (this.resetClock) {\n                this.clock.restore();\n                this.resetClock = false;\n            }\n        }\n\n        return returnVal;\n    };\n\n    sinon.fakeServerWithClock.restore = function restore() {\n        if (this.clock) {\n            this.clock.restore();\n        }\n\n        return sinon.fakeServer.restore.apply(this, arguments);\n    };\n}());\n\n/**\n * @depend ../sinon.js\n * @depend collection.js\n * @depend util/fake_timers.js\n * @depend util/fake_server_with_clock.js\n */\n/*jslint eqeqeq: false, onevar: false, plusplus: false*/\n/*global require, module*/\n/**\n * Manages fake collections as well as fake utilities such as Sinon's\n * timers and fake XHR implementation in one convenient object.\n *\n * @author Christian Johansen (christian@cjohansen.no)\n * @license BSD\n *\n * Copyright (c) 2010-2011 Christian Johansen\n */\n\nif (typeof module == \"object\" && typeof require == \"function\") {\n    var sinon = require(\"../sinon\");\n    sinon.extend(sinon, require(\"./util/fake_timers\"));\n}\n\n(function () {\n    var push = [].push;\n\n    function exposeValue(sandbox, config, key, value) {\n        if (!value) {\n            return;\n        }\n\n        if (config.injectInto) {\n            config.injectInto[key] = value;\n        } else {\n            push.call(sandbox.args, value);\n        }\n    }\n\n    function prepareSandboxFromConfig(config) {\n        var sandbox = sinon.create(sinon.sandbox);\n\n        if (config.useFakeServer) {\n            if (typeof config.useFakeServer == \"object\") {\n                sandbox.serverPrototype = config.useFakeServer;\n            }\n\n            sandbox.useFakeServer();\n        }\n\n        if (config.useFakeTimers) {\n            if (typeof config.useFakeTimers == \"object\") {\n                sandbox.useFakeTimers.apply(sandbox, config.useFakeTimers);\n            } else {\n                sandbox.useFakeTimers();\n            }\n        }\n\n        return sandbox;\n    }\n\n    sinon.sandbox = sinon.extend(sinon.create(sinon.collection), {\n        useFakeTimers: function useFakeTimers() {\n            this.clock = sinon.useFakeTimers.apply(sinon, arguments);\n\n            return this.add(this.clock);\n        },\n\n        serverPrototype: sinon.fakeServer,\n\n        useFakeServer: function useFakeServer() {\n            var proto = this.serverPrototype || sinon.fakeServer;\n\n            if (!proto || !proto.create) {\n                return null;\n            }\n\n            this.server = proto.create();\n            return this.add(this.server);\n        },\n\n        inject: function (obj) {\n            sinon.collection.inject.call(this, obj);\n\n            if (this.clock) {\n                obj.clock = this.clock;\n            }\n\n            if (this.server) {\n                obj.server = this.server;\n                obj.requests = this.server.requests;\n            }\n\n            return obj;\n        },\n\n        create: function (config) {\n            if (!config) {\n                return sinon.create(sinon.sandbox);\n            }\n\n            var sandbox = prepareSandboxFromConfig(config);\n            sandbox.args = sandbox.args || [];\n            var prop, value, exposed = sandbox.inject({});\n\n            if (config.properties) {\n                for (var i = 0, l = config.properties.length; i < l; i++) {\n                    prop = config.properties[i];\n                    value = exposed[prop] || prop == \"sandbox\" && sandbox;\n                    exposeValue(sandbox, config, prop, value);\n                }\n            } else {\n                exposeValue(sandbox, config, \"sandbox\", value);\n            }\n\n            return sandbox;\n        }\n    });\n\n    sinon.sandbox.useFakeXMLHttpRequest = sinon.sandbox.useFakeServer;\n\n    if (typeof module == \"object\" && typeof require == \"function\") {\n        module.exports = sinon.sandbox;\n    }\n}());\n\n/**\n * @depend ../sinon.js\n * @depend stub.js\n * @depend mock.js\n * @depend sandbox.js\n */\n/*jslint eqeqeq: false, onevar: false, forin: true, plusplus: false*/\n/*global module, require, sinon*/\n/**\n * Test function, sandboxes fakes\n *\n * @author Christian Johansen (christian@cjohansen.no)\n * @license BSD\n *\n * Copyright (c) 2010-2011 Christian Johansen\n */\n\n(function (sinon) {\n    var commonJSModule = typeof module == \"object\" && typeof require == \"function\";\n\n    if (!sinon && commonJSModule) {\n        sinon = require(\"../sinon\");\n    }\n\n    if (!sinon) {\n        return;\n    }\n\n    function test(callback) {\n        var type = typeof callback;\n\n        if (type != \"function\") {\n            throw new TypeError(\"sinon.test needs to wrap a test function, got \" + type);\n        }\n\n        return function () {\n            var config = sinon.getConfig(sinon.config);\n            config.injectInto = config.injectIntoThis && this || config.injectInto;\n            var sandbox = sinon.sandbox.create(config);\n            var exception, result;\n            var args = Array.prototype.slice.call(arguments).concat(sandbox.args);\n\n            try {\n                result = callback.apply(this, args);\n            } finally {\n                sandbox.verifyAndRestore();\n            }\n\n            return result;\n        };\n    }\n\n    test.config = {\n        injectIntoThis: true,\n        injectInto: null,\n        properties: [\"spy\", \"stub\", \"mock\", \"clock\", \"server\", \"requests\"],\n        useFakeTimers: true,\n        useFakeServer: true\n    };\n\n    if (commonJSModule) {\n        module.exports = test;\n    } else {\n        sinon.test = test;\n    }\n}(typeof sinon == \"object\" && sinon || null));\n\n/**\n * @depend ../sinon.js\n * @depend test.js\n */\n/*jslint eqeqeq: false, onevar: false, eqeqeq: false*/\n/*global module, require, sinon*/\n/**\n * Test case, sandboxes all test functions\n *\n * @author Christian Johansen (christian@cjohansen.no)\n * @license BSD\n *\n * Copyright (c) 2010-2011 Christian Johansen\n */\n\n(function (sinon) {\n    var commonJSModule = typeof module == \"object\" && typeof require == \"function\";\n\n    if (!sinon && commonJSModule) {\n        sinon = require(\"../sinon\");\n    }\n\n    if (!sinon || !Object.prototype.hasOwnProperty) {\n        return;\n    }\n\n    function createTest(property, setUp, tearDown) {\n        return function () {\n            if (setUp) {\n                setUp.apply(this, arguments);\n            }\n\n            var exception, result;\n\n            try {\n                result = property.apply(this, arguments);\n            } catch (e) {\n                exception = e;\n            }\n\n            if (tearDown) {\n                tearDown.apply(this, arguments);\n            }\n\n            if (exception) {\n                throw exception;\n            }\n\n            return result;\n        };\n    }\n\n    function testCase(tests, prefix) {\n        /*jsl:ignore*/\n        if (!tests || typeof tests != \"object\") {\n            throw new TypeError(\"sinon.testCase needs an object with test functions\");\n        }\n        /*jsl:end*/\n\n        prefix = prefix || \"test\";\n        var rPrefix = new RegExp(\"^\" + prefix);\n        var methods = {}, testName, property, method;\n        var setUp = tests.setUp;\n        var tearDown = tests.tearDown;\n\n        for (testName in tests) {\n            if (tests.hasOwnProperty(testName)) {\n                property = tests[testName];\n\n                if (/^(setUp|tearDown)$/.test(testName)) {\n                    continue;\n                }\n\n                if (typeof property == \"function\" && rPrefix.test(testName)) {\n                    method = property;\n\n                    if (setUp || tearDown) {\n                        method = createTest(property, setUp, tearDown);\n                    }\n\n                    methods[testName] = sinon.test(method);\n                } else {\n                    methods[testName] = tests[testName];\n                }\n            }\n        }\n\n        return methods;\n    }\n\n    if (commonJSModule) {\n        module.exports = testCase;\n    } else {\n        sinon.testCase = testCase;\n    }\n}(typeof sinon == \"object\" && sinon || null));\n\n/**\n * @depend ../sinon.js\n * @depend stub.js\n */\n/*jslint eqeqeq: false, onevar: false, nomen: false, plusplus: false*/\n/*global module, require, sinon*/\n/**\n * Assertions matching the test spy retrieval interface.\n *\n * @author Christian Johansen (christian@cjohansen.no)\n * @license BSD\n *\n * Copyright (c) 2010-2011 Christian Johansen\n */\n\n(function (sinon, global) {\n    var commonJSModule = typeof module == \"object\" && typeof require == \"function\";\n    var slice = Array.prototype.slice;\n    var assert;\n\n    if (!sinon && commonJSModule) {\n        sinon = require(\"../sinon\");\n    }\n\n    if (!sinon) {\n        return;\n    }\n\n    function verifyIsStub() {\n        var method;\n\n        for (var i = 0, l = arguments.length; i < l; ++i) {\n            method = arguments[i];\n\n            if (!method) {\n                assert.fail(\"fake is not a spy\");\n            }\n\n            if (typeof method != \"function\") {\n                assert.fail(method + \" is not a function\");\n            }\n\n            if (typeof method.getCall != \"function\") {\n                assert.fail(method + \" is not stubbed\");\n            }\n        }\n    }\n\n    function failAssertion(object, msg) {\n        object = object || global;\n        var failMethod = object.fail || assert.fail;\n        failMethod.call(object, msg);\n    }\n\n    function mirrorPropAsAssertion(name, method, message) {\n        if (arguments.length == 2) {\n            message = method;\n            method = name;\n        }\n\n        assert[name] = function (fake) {\n            verifyIsStub(fake);\n\n            var args = slice.call(arguments, 1);\n            var failed = false;\n\n            if (typeof method == \"function\") {\n                failed = !method(fake);\n            } else {\n                failed = typeof fake[method] == \"function\" ?\n                    !fake[method].apply(fake, args) : !fake[method];\n            }\n\n            if (failed) {\n                failAssertion(this, fake.printf.apply(fake, [message].concat(args)));\n            } else {\n                assert.pass(name);\n            }\n        };\n    }\n\n    function exposedName(prefix, prop) {\n        return !prefix || /^fail/.test(prop) ? prop :\n            prefix + prop.slice(0, 1).toUpperCase() + prop.slice(1);\n    };\n\n    assert = {\n        failException: \"AssertError\",\n\n        fail: function fail(message) {\n            var error = new Error(message);\n            error.name = this.failException || assert.failException;\n\n            throw error;\n        },\n\n        pass: function pass(assertion) {},\n\n        callOrder: function assertCallOrder() {\n            verifyIsStub.apply(null, arguments);\n            var expected = \"\", actual = \"\";\n\n            if (!sinon.calledInOrder(arguments)) {\n                try {\n                    expected = [].join.call(arguments, \", \");\n                    actual = sinon.orderByFirstCall(slice.call(arguments)).join(\", \");\n                } catch (e) {\n                    // If this fails, we'll just fall back to the blank string\n                }\n\n                failAssertion(this, \"expected \" + expected + \" to be \" +\n                              \"called in order but were called as \" + actual);\n            } else {\n                assert.pass(\"callOrder\");\n            }\n        },\n\n        callCount: function assertCallCount(method, count) {\n            verifyIsStub(method);\n\n            if (method.callCount != count) {\n                var msg = \"expected %n to be called \" + sinon.timesInWords(count) +\n                    \" but was called %c%C\";\n                failAssertion(this, method.printf(msg));\n            } else {\n                assert.pass(\"callCount\");\n            }\n        },\n\n        expose: function expose(target, options) {\n            if (!target) {\n                throw new TypeError(\"target is null or undefined\");\n            }\n\n            var o = options || {};\n            var prefix = typeof o.prefix == \"undefined\" && \"assert\" || o.prefix;\n            var includeFail = typeof o.includeFail == \"undefined\" || !!o.includeFail;\n\n            for (var method in this) {\n                if (method != \"export\" && (includeFail || !/^(fail)/.test(method))) {\n                    target[exposedName(prefix, method)] = this[method];\n                }\n            }\n\n            return target;\n        }\n    };\n\n    mirrorPropAsAssertion(\"called\", \"expected %n to have been called at least once but was never called\");\n    mirrorPropAsAssertion(\"notCalled\", function (spy) { return !spy.called; },\n                          \"expected %n to not have been called but was called %c%C\");\n    mirrorPropAsAssertion(\"calledOnce\", \"expected %n to be called once but was called %c%C\");\n    mirrorPropAsAssertion(\"calledTwice\", \"expected %n to be called twice but was called %c%C\");\n    mirrorPropAsAssertion(\"calledThrice\", \"expected %n to be called thrice but was called %c%C\");\n    mirrorPropAsAssertion(\"calledOn\", \"expected %n to be called with %1 as this but was called with %t\");\n    mirrorPropAsAssertion(\"alwaysCalledOn\", \"expected %n to always be called with %1 as this but was called with %t\");\n    mirrorPropAsAssertion(\"calledWithNew\", \"expected %n to be called with new\");\n    mirrorPropAsAssertion(\"alwaysCalledWithNew\", \"expected %n to always be called with new\");\n    mirrorPropAsAssertion(\"calledWith\", \"expected %n to be called with arguments %*%C\");\n    mirrorPropAsAssertion(\"calledWithMatch\", \"expected %n to be called with match %*%C\");\n    mirrorPropAsAssertion(\"alwaysCalledWith\", \"expected %n to always be called with arguments %*%C\");\n    mirrorPropAsAssertion(\"alwaysCalledWithMatch\", \"expected %n to always be called with match %*%C\");\n    mirrorPropAsAssertion(\"calledWithExactly\", \"expected %n to be called with exact arguments %*%C\");\n    mirrorPropAsAssertion(\"alwaysCalledWithExactly\", \"expected %n to always be called with exact arguments %*%C\");\n    mirrorPropAsAssertion(\"neverCalledWith\", \"expected %n to never be called with arguments %*%C\");\n    mirrorPropAsAssertion(\"neverCalledWithMatch\", \"expected %n to never be called with match %*%C\");\n    mirrorPropAsAssertion(\"threw\", \"%n did not throw exception%C\");\n    mirrorPropAsAssertion(\"alwaysThrew\", \"%n did not always throw exception%C\");\n\n    if (commonJSModule) {\n        module.exports = assert;\n    } else {\n        sinon.assert = assert;\n    }\n}(typeof sinon == \"object\" && sinon || null, typeof window != \"undefined\" ? window : global));\n\nreturn sinon;}.call(typeof window != 'undefined' && window || {}));"
  },
  {
    "path": "test/widgets/editor.js",
    "content": "define([ 'widgets/editor' ], function(Editor) {\n  suite('widgets/editor', function() {\n\n  });\n});"
  },
  {
    "path": "test/widgets/example.js",
    "content": "define([ 'widgets/example' ], function(Example) {\n  suite('widgets/example', function() {\n\n  });\n});"
  },
  {
    "path": "test/widgets/results.js",
    "content": "define([ 'widgets/results' ], function(Results) {\n  suite('widgets/results', function() {\n\n  });\n});"
  },
  {
    "path": "testimonials.md",
    "content": "Hacker News: http://news.ycombinator.com/item?id=4500090\n\nReddit: http://www.reddit.com/r/javascript/comments/znlhb/jquery_fundamentals_the_online_jquery_guide_gets/\n\nMan, @bocoup hit it out of the park with jqfundamentals.com - a great way to learn about JS and jQuery. - @rupl https://twitter.com/rupl/statuses/245509000202969088\n\nThis is the basics guide that the main jQuery site desperately needs on theirs. Great job. - http://news.ycombinator.org/item?id=4501285\n\njQuery fundamentals was part of my core learning years ago and helped me score my first front end developer job. So glad to see it get updated. - http://www.reddit.com/r/javascript/comments/znlhb/jquery_fundamentals_the_online_jquery_guide_gets/c668tg0\n\nWow, just peeked inside and already learned something new about jQuery (admittedly I should've already known about has(), but I didn't) and also some features of Chrome's dev tools that I didn't know before. - http://www.reddit.com/r/javascript/comments/znlhb/jquery_fundamentals_the_online_jquery_guide_gets/c666ltu\n\njqfundamentals is where I learned jquery. Keep up the good work! - @faruzzy https://twitter.com/Faruzzy/statuses/245214106469158914\n\nTo everybody who's ever asked me how to get started with jQuery, attn: RT @rmurphey: ohai new jqfundamentals.com bit.ly/Nkon7x - @kadamwhite\n\nI’ve been working with JavaScript and jQuery on and off for many years and even with that background experience I still found your tutorial to be excellent. Being able to run (and fiddle) with each example in context was really helpful in understanding how some of them worked. I’m not ashamed to say I’ve learned some stuff today that I didn’t know or had forgotten :) - carl.revell@aylnews.com\n\njqFundamentals is easily the best jQuery (and JavaScript) primer that I've seen\nin a long time. - https://twitter.com/stephenmurdoch/statuses/245659981892952064\n"
  }
]