[
  {
    "path": "CNAME",
    "content": "elasticsearch-cheatsheet.jolicode.com"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2016 JoliCode\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 all\ncopies 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 THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# Elasticsearch Cheatsheet for developpers\n\nhttps://elasticsearch-cheatsheet.jolicode.com/\n\n# License\n\nMIT, see LICENSE file."
  },
  {
    "path": "index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"utf-8\" />\n  <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0\">\n\n  <title>Elasticsearch Cheat Sheet for developers</title>\n  <meta name=\"description\" content=\"Elasticsearch API cheatsheet for developers with copy and paste example for the most useful APIs\">\n  <link rel=\"shortcut icon\" href=\"./favicon.ico\"/>\n  <link rel=\"canonical\" href=\"https://elasticsearch-cheatsheet.jolicode.com/\" />\n  <link rel=\"stylesheet\" type=\"text/css\" href=\"./semantic-UI/semantic.min.css\">\n  <script src=\"./javascripts/jquery-2.2.4.min.js\"></script>\n  <script src=\"./javascripts/clipboard.min.js\"></script>\n  <script src=\"./semantic-UI/semantic.min.js\"></script>\n  <link href=\"./stylesheets/prism.css\" rel=\"stylesheet\" />\n  <style type=\"text/css\">\n    .toolbar-item button {\n      color: #EEE !important;\n      background-color: #333 !important;\n      padding: 5px !important;;\n    }\n    pre[class*=\"language-\"] {\n      padding-bottom: 0.5em;\n      padding-top: 0.5em;\n    }\n  </style>\n\n  <script>\n  $(document)\n    .ready(function() {\n      // fix main menu to page on passing\n      $('.main.menu').visibility({\n        type: 'fixed'\n      });\n\n      // show dropdown on hover\n      $('.main.menu  .ui.dropdown').dropdown({\n        on: 'hover'\n      });\n\n      function updateElasticsearchVersion() {\n        if (location.hash.match(/#es[0-9]+/) !== null) {\n          var className = location.hash.replace('#', '');\n          document.body.className = className;\n          //window.scrollTo(0, 0);\n        }\n      }\n\n      window.onhashchange = updateElasticsearchVersion;\n\n      updateElasticsearchVersion();\n    })\n  ;\n  </script>\n  <style type=\"text/css\">\n    body {\n      background-color: #FFFFFF;\n    }\n    .main.container {\n      margin-top: 2em;\n    }\n\n    /*See https://github.com/Semantic-Org/Semantic-UI/issues/4342*/\n    .divider-column {\n      position: relative;\n      padding: 0 !important;\n    }\n\n    pre code { display: block; }\n    pre + pre { padding-top: 0 !important; }\n    pre[class*=\"language-\"] { padding-bottom: 0.5em; }\n    code.language-json:not(.json-only):first-line { font-weight: bold; color: black; }\n\n    body.es1 .es2:not(.es1), body.es1 .es5:not(.es1), body.es1 .es6:not(.es1), body.es1 .es7:not(.es1), body.es1 .es8:not(.es1) {\n      display: none!important;\n    }\n    body.es2 .es1:not(.es2), body.es2 .es5:not(.es2), body.es2 .es6:not(.es2), body.es2 .es7:not(.es2), body.es2 .es8:not(.es2) {\n      display: none!important;\n    }\n    body.es5 .es1:not(.es5), body.es5 .es2:not(.es5), body.es5 .es6:not(.es5), body.es5 .es7:not(.es5), body.es5 .es8:not(.es5) {\n      display: none!important;\n    }\n    body.es6 .es1:not(.es6), body.es6 .es2:not(.es6), body.es6 .es5:not(.es6), body.es6 .es7:not(.es6), body.es6 .es8:not(.es6) {\n      display: none!important;\n    }\n    body.es7 .es1:not(.es7), body.es7 .es2:not(.es7), body.es7 .es5:not(.es7), body.es7 .es6:not(.es7), body.es7 .es8:not(.es7) {\n      display: none!important;\n    }\n    body.es8 .es1:not(.es8), body.es8 .es2:not(.es8), body.es8 .es5:not(.es8), body.es8 .es6:not(.es8), body.es8 .es7:not(.es8) {\n      display: none!important;\n    }\n  </style>\n</head>\n<body class=\"es8\">\n    <div class=\"ui main text container\">\n      <img class=\"es2 es5 es6 es7 es8 ui tiny right floated image\" src=\"./images/Elasticsearch-Logo-Color-V-sm.png\">\n      <img class=\"es1 ui tiny right floated image\" src=\"./images/Elasticsearch1-Logo-Color-V-sm.png\">\n      <h1 class=\"ui header\">🔎 Elasticsearch\n        <span class=\"es1\">1.x</span>\n        <span class=\"es2\">2.x</span>\n        <span class=\"es5\">5.x</span>\n        <span class=\"es6\">6.x</span>\n        <span class=\"es7\">7.x</span>\n        <span class=\"es8\">8.x</span>\n        Cheatsheet 🔍</h1>\n      <p>\n        All the API endpoints and pro-tips you always forgot about in one place!<br />\n        Built by developers for developers. Hosted on <a href=\"https://github.com/jolicode/elasticsearch-sheatsheet\">GitHub</a>, contributions welcome.\n      </p>\n    </div>\n\n    <div class=\"ui borderless main menu\">\n      <div class=\"ui text container\">\n        <a href=\"#links\" class=\"item\">Links</a>\n        <a href=\"#queries\" class=\"item\">Queries</a>\n        <a href=\"#indexes\" class=\"item\">Indexes</a>\n        <a href=\"#debug\" class=\"item\">Debug</a>\n        <a href=\"#cluster\" class=\"item\">Cluster &amp; Plugins</a>\n\n        <div class=\"ui right floated dropdown item js-version-selector\">\n          <span class=\"es1\">Elasticsearch 1.X</span>\n          <span class=\"es2\">Elasticsearch 2.X</span>\n          <span class=\"es5\">Elasticsearch 5.X</span>\n          <span class=\"es6\">Elasticsearch 6.X</span>\n          <span class=\"es7\">Elasticsearch 7.X</span>\n          <span class=\"es8\">Elasticsearch 8.X</span>\n          <i class=\"dropdown icon\"></i>\n          <div class=\"menu\">\n            <div class=\"item es2 es5 es6 es7 es8\"><a href=\"#es1\">Elasticsearch 1.X</a></div>\n            <div class=\"item es1 es5 es6 es7 es8\"><a href=\"#es2\">Elasticsearch 2.X</a></div>\n            <div class=\"item es1 es2 es6 es7 es8\"><a href=\"#es5\">Elasticsearch 5.X</a></div>\n            <div class=\"item es1 es2 es5 es7 es8\"><a href=\"#es6\">Elasticsearch 6.X</a></div>\n            <div class=\"item es1 es2 es5 es6 es8\"><a href=\"#es7\">Elasticsearch 7.X</a></div>\n            <div class=\"item es1 es2 es5 es6 es7\"><a href=\"#es8\">Elasticsearch 8.X</a></div>\n          </div>\n        </div>\n      </div>\n    </div>\n\n    <div class=\"ui text container language-json\">\n\n      <div class=\"es1 ui secondary orange segment\">\n        <p>Elasticsearch 1.7 is End Of Life. Consider upgrading.\n        <a href=\"https://www.elastic.co/support/eol\">More information about supported versions</a>.</p>\n      </div>\n\n      <div class=\"es2 ui secondary orange segment\">\n        <p>Elasticsearch 2.4 is End Of Life. Consider upgrading.\n        <a href=\"https://www.elastic.co/support/eol\">More information about supported versions</a>.</p>\n      </div>\n\n      <div class=\"es5 ui secondary orange segment\">\n        <p>Elasticsearch 5.6 is End Of Life. Consider upgrading.\n        <a href=\"https://www.elastic.co/support/eol\">More information about supported versions</a>.</p>\n      </div>\n\n      <div class=\"es6 ui secondary orange segment\">\n        <p>Elasticsearch 6.8 is End Of Life. Consider upgrading.\n        <a href=\"https://www.elastic.co/support/eol\">More information about supported versions</a>.</p>\n      </div>\n\n      <a name=\"links\"></a>\n      <h2 class=\"ui dividing header\">Links</h2>\n        <p class=\"es2\">\n          First thing, forget about your <code>curl</code> calls and <strong>install <a href=\"https://www.elastic.co/guide/en/sense/current/installing.html\">Sense</a> please!</strong>\n        </p>\n        <p class=\"es5 es6 es7 es8\">\n          First thing, forget about your <code>curl</code> calls and <strong>install <a href=\"https://www.elastic.co/products/kibana\">Kibana</a> please!</strong>\n        </p>\n\n        <ul>\n          <li class=\"es1\"><a href=\"https://www.elastic.co/guide/en/elasticsearch/guide/1.x/index.html\">Elasticsearch: The Definitive Guide</a>, official book;</li>\n          <li class=\"es2\"><a href=\"https://www.elastic.co/guide/en/elasticsearch/guide/2.x/index.html\">Elasticsearch: The Definitive Guide</a>, official book;</li>\n          <li class=\"es5 es6\"><a href=\"https://www.elastic.co/guide/en/elasticsearch/guide/master/index.html\">Elasticsearch: The Definitive Guide</a>, official book (not up to date);</li>\n\n          <li class=\"es1 es2 es5 es6\"><a href=\"https://www.elastic.co/downloads/past-releases/#elasticsearch\">Download Elasticsearch</a>, official download page;</li>\n          <li class=\"es7 es8\"><a href=\"https://www.elastic.co/downloads/elasticsearch\">Download Elasticsearch</a>, official download page;</li>\n\n          <li class=\"es6 es7\"><a href=\"https://www.elastic.co/downloads/past-releases#elasticsearch-oss\">Download pure OSS Elasticsearch</a> (<= 7.10.2 only), Apache licensed download page;</li>\n\n          <li class=\"es1\"><a href=\"https://www.elastic.co/guide/en/elasticsearch/reference/1.7/index.html\">Elasticsearch Reference</a>, official documentation;</li>\n          <li class=\"es2\"><a href=\"https://www.elastic.co/guide/en/elasticsearch/reference/2.3/index.html\">Elasticsearch Reference</a>, official documentation;</li>\n          <li class=\"es5\"><a href=\"https://www.elastic.co/guide/en/elasticsearch/reference/5.6/index.html\">Elasticsearch Reference</a>, official documentation;</li>\n          <li class=\"es6\"><a href=\"https://www.elastic.co/guide/en/elasticsearch/reference/6.x/index.html\">Elasticsearch Reference</a>, official documentation;</li>\n          <li class=\"es7\"><a href=\"https://www.elastic.co/guide/en/elasticsearch/reference/7.x/index.html\">Elasticsearch Reference</a>, official documentation;</li>\n          <li class=\"es8\"><a href=\"https://www.elastic.co/guide/en/elasticsearch/reference/8.1/index.html\">Elasticsearch Reference</a>, official documentation;</li>\n          <li class=\"es5 es6 es7 es8\"><a href=\"https://www.docker.elastic.co/\">Docker repository</a>, quick start any Elastic software;</li>\n          <li><a href=\"https://dev.to/t/elasticsearch\">Dev.to Elasticsearch</a>, great source of content about Elastic;</li>\n          <li><a href=\"https://discuss.elastic.co/\">Official forum</a> and <a href=\"http://stackoverflow.com/questions/tagged/elasticsearch\">StackOverflow</a> for support;</li>\n          <li class=\"es5\"><a href=\"https://www.elastic.co/products/upgrade_guide\">Official online migration tool</a> to help upgrading the stack to 6.x;</li>\n          <li class=\"es5 es6 es7\"><a href=\"https://github.com/moshe/elasticsearch-comrade\">Comrade</a>: a Python based Elasticsearch web admin and monitoring panel;</li>\n          <li class=\"es2 es5 es6 es7\"><a href=\"https://github.com/lmenezes/cerebro\">Cerebro</a>: a Java based Elasticsearch web admin;</li>\n        </ul>\n\n\n\n\n\n\n      <a name=\"queries\"></a>\n      <h2 class=\"ui dividing header\">Queries</h2>\n\n        <p>\n          There are two syntaxes for the basic queries: a simple one on the left, where you can't use any option,\n          and an extended one on the right. Most of the beginner headache with the DSL come from this:\n        </p>\n        <div class=\"ui two column very relaxed grid\" style=\"position:relative;\">\n          <div class=\"column\">\n            <pre><code>GET _search\n{\n  \"query\": {\n    \"match\": {\n      \"FIELD\": \"TEXT\"\n    }\n  }\n}</code></pre>\n          </div>\n          <div class=\"divider-column\">\n            <div class=\"ui vertical divider\">\n              to\n            </div>\n          </div>\n\n          <div class=\"column\">\n            <pre><code>GET _search\n{\n  \"query\": {\n    \"match\": {\n      \"FIELD\": {\n        \"query\": \"TEXT\",\n        \"OPTION\": \"VALUE\"\n      }\n    }\n  }\n}</code></pre>\n          </div>\n        </div>\n\n\n        <h3 class=\"ui header\">Full search example with aggregation, highlight, filter...</h3>\n\n        <pre class=\"es1\"><code>GET /_search\n{\n  \"query\": {\n    \"filtered\": {\n      \"query\": {\n        \"bool\": {\n          \"must\": [\n            {\n              \"match\": {\n                \"title\": \"smith\"\n              }\n            }\n          ],\n          \"must_not\": [\n            {\n              \"match_phrase\": {\n                \"title\": \"granny smith\"\n              }\n            }\n          ]\n        }\n      },\n      \"filter\": {\n        \"bool\": {\n          \"must_not\": [\n            {\n              \"missing\": {\n                \"field\": \"title\"\n              }\n            }\n          ]\n        }\n      }\n    }\n  },\n  \"aggs\": {\n    \"my_agg\": {\n      \"terms\": {\n        \"field\": \"user\",\n        \"size\": 10\n      }\n    }\n  },\n  \"highlight\": {\n    \"pre_tags\" : [\"&lt;em&gt;\"],\n    \"post_tags\" : [\"&lt;/em&gt;\"],\n    \"fields\": {\n      \"body\" : {\n        \"number_of_fragments\": 1,\n        \"fragment_size\": 20\n      },\n      \"title\": {}\n    }\n  },\n  \"size\": 20,\n  \"from\": 100,\n  \"_source\": [\"title\", \"id\"],\n  \"sort\": [\n    { \"_id\" : {\"order\" : \"desc\"}}\n  ]\n}</code></pre>\n\n        <pre class=\"es2 es5 es6 es7 es8\"><code>GET /_search\n{\n  \"query\": {\n    \"bool\": {\n      \"must\": [\n        {\n          \"match\": {\n            \"title\": \"smith\"\n          }\n        }\n      ],\n      \"must_not\": [\n        {\n          \"match_phrase\": {\n            \"title\": \"granny smith\"\n          }\n        }\n      ],\n      \"filter\": [\n        {\n          \"exists\": {\n            \"field\": \"title\"\n          }\n        }\n      ]\n    }\n  },\n  \"aggs\": {\n    \"my_agg\": {\n      \"terms\": {\n        \"field\": \"user\",\n        \"size\": 10\n      }\n    }\n  },\n  \"highlight\": {\n    \"pre_tags\": [\n      \"&lt;em&gt;\"\n    ],\n    \"post_tags\": [\n      \"&lt;/em&gt;\"\n    ],\n    \"fields\": {\n      \"body\": {\n        \"number_of_fragments\": 1,\n        \"fragment_size\": 20\n      },\n      \"title\": {}\n    }\n  },\n  \"size\": 20,\n  \"from\": 100,\n  \"_source\": [\n    \"title\",\n    \"id\"\n  ],\n  \"sort\": [\n    {\n      \"_id\": {\n        \"order\": \"desc\"\n      }\n    }\n  ]\n}</code></pre>\n\n      <h3 class=\"ui header es7 es8\">Control total hit count</h3>\n      <p class=\"es7 es8\">Accept true, false or a fixed number, default to 10000.</p>\n      <pre class=\"es7 es8\"><code>GET /_search\n{\n  \"track_total_hits\": true,\n  \"query\": {}\n}</code></pre>\n\n        <h3 class=\"ui header\">Common queries</h3>\n\n        <div class=\"ui grid\">\n          <div class=\"eight wide column\"><pre><code class=\"json-only\">\"multi_match\": {\n  \"query\": \"Elastic\",\n  \"fields\": [\"user.*\", \"title^3\"],\n  \"type\": \"best_fields\"\n}</code></pre></div>\n          <div class=\"eight wide column es2 es5 es6 es7 es8\"><pre><code class=\"json-only\">\"bool\": {\n  \"must\": [],\n  \"must_not\": [],\n  \"filter\": [],\n  \"should\": [],\n  \"minimum_should_match\" : 1\n}</code></pre></div>\n          <div class=\"eight wide column es1\"><pre><code class=\"json-only\">\"bool\": {\n  \"must\": [],\n  \"must_not\": [],\n  \"should\": [],\n  \"minimum_should_match\" : 1\n}</code></pre></div>\n          <div class=\"eight wide column es1\"><pre><code class=\"json-only\">\"filtered\": {\n  \"query\": {\n    \"match_all\": {}\n  },\n  \"filter\": {\n    \"range\": {...}\n  }\n}\n</code></pre></div>\n          <div class=\"eight wide column\"><pre><code class=\"json-only\">\"range\": {\n  \"age\": {\n    \"gte\": 10,\n    \"lte\": 20,\n    \"boost\": 2\n  }\n}</code></pre></div>\n\n        </div>\n\n\n        <h3 class=\"ui header\">QueryString syntax</h3>\n\n        <p>\n          Search in the default <code>_all</code> field:\n        </p>\n        <pre><code>GET /_search?q=pony</code></pre>\n\n        <p>\n          Complex search with operator and exact phrase search with boost:\n        </p>\n        <pre><code>GET /_search?q=title:(joli OR code) AND author:\"Damien Alexandre\"^2</code></pre>\n\n        <p>\n          Search with wildcard and special queries:\n        </p>\n        <pre><code>GET /_search?q=_exists_:title OR title:singl? noneOrAnyChar*cter</code></pre>\n\n        <p>\n          Search with fuzzyness and range:\n        </p>\n        <pre><code>GET /_search?q=title:elastichurch~3 AND date:[2016-01-01 TO 2018-12-31]</code></pre>\n\n        <p>\n          Use in Query DSL (not recommended for user search):\n        </p>\n        <pre><code>GET /_search\n{\n  \"query\": {\n    \"query_string\": {\n      \"default_field\": \"content\",\n      \"query\": \"elastic AND (title:lucene OR title:solr)\"\n    }\n  }\n}</code></pre>\n\n        <h3 class=\"ui header\">Search After - Pagination cursor</h3>\n\n        <p>\n          Search with a custom sort:\n        </p>\n        <pre><code>GET products/_search\n{\n    \"size\": 10,\n    \"sort\": [\n        {\"date\": \"asc\"},\n        {\"_id\": \"desc\"}\n    ]\n}</code></pre>\n        <p>\n          On the next \"page\", pass the sort values from the last result:\n        </p>\n        <pre><code>GET product/_search\n{\n    \"size\": 10,\n    \"search_after\": [1463538857, \"654323\"],\n    \"sort\": [\n        {\"date\": \"asc\"},\n        {\"_id\": \"desc\"}\n    ]\n}</code></pre>\n\n\n\n\n\n\n\n\n\n\n\n    <a name=\"indexes\"></a>\n    <h2 class=\"ui dividing header\">Indexes and mapping</h2>\n\n\n    <h3 class=\"ui header\">Create an index with settings and mapping</h3>\n\n    <pre class=\"es1 es2\"><code>PUT /my_index_name\n{\n  \"settings\": {\n    \"number_of_replicas\": 1,\n    \"number_of_shards\": 3,\n    \"analysis\": {},\n    \"refresh_interval\": \"1s\"\n  },\n  \"mappings\": {\n    \"my_type_name\": {\n      \"dynamic\": false,\n      \"properties\": {\n        \"title\": {\n          \"type\": \"string\",\n          \"analyzer\": \"english\"\n        }\n      }\n    }\n  }\n}</code></pre>\n\n    <pre class=\"es5 es6\"><code>PUT /my_index_name\n{\n  \"settings\": {\n    \"number_of_replicas\": 1,\n    \"number_of_shards\": 3,\n    \"analysis\": {},\n    \"refresh_interval\": \"1s\"\n  },\n  \"mappings\": {\n    \"my_type_name\": {\n      \"dynamic\": false,\n      \"properties\": {\n        \"title\": {\n          \"type\": \"text\",\n          \"analyzer\": \"english\"\n        }\n      }\n    }\n  }\n}</code></pre>\n\n    <pre class=\"es7 es8\"><code>PUT /my_index_name\n{\n  \"settings\": {\n    \"number_of_replicas\": 1,\n    \"number_of_shards\": 3,\n    \"analysis\": {},\n    \"refresh_interval\": \"1s\"\n  },\n  \"mappings\": {\n    \"dynamic\": false,\n    \"properties\": {\n      \"title\": {\n        \"type\": \"text\",\n        \"analyzer\": \"english\"\n      }\n    }\n  }\n}</code></pre>\n\n      <div class=\"es6 es7 ui secondary orange segment\">\n        <p><a href=\"https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html\">Types are deprecated</a>, you can only use one in Elasticsearch 6.</p>\n      </div>\n\n    <h3 class=\"ui header\">Update index settings dynamically</h3>\n\n    <pre><code>PUT /my_index_name/_settings\n{\n  \"index\": {\n    \"refresh_interval\": \"-1\",\n    \"number_of_replicas\": 0\n  }\n}</code></pre>\n\n\n    <h3 class=\"ui header\">Update an index by adding a field to a type</h3>\n\n    <pre class=\"es1 es2\"><code>PUT /my_index_name/_mapping/my_type_name\n{\n  \"my_type_name\": {\n    \"properties\": {\n      \"tag\": {\n        \"type\": \"string\",\n        \"index\": \"not_analyzed\"\n      }\n    }\n  }\n}</code></pre>\n\n    <pre class=\"es5 es6\"><code>PUT /my_index_name/_mapping/my_type_name\n{\n  \"my_type_name\": {\n    \"properties\": {\n      \"tag\": {\n        \"type\": \"keyword\"\n      }\n    }\n  }\n}</code></pre>\n\n    <pre class=\"es7 es8\"><code>PUT /my_index_name/_mapping\n{\n  \"properties\": {\n    \"tag\": {\n      \"type\": \"keyword\"\n    }\n  }\n}</code></pre>\n\n\n    <h3 class=\"ui header\">Get the mapping and the settings</h3>\n\n    <pre><code>GET /my_index_name</code></pre>\n    <pre><code>GET /my_index_name/_mapping</code></pre>\n    <pre><code>GET /my_index_name/_settings</code></pre>\n\n\n    <h3 class=\"ui header\">Create a document (auto-generated ID)</h3>\n\n    <pre class=\"es1 es2 es5 es6\"><code>POST /my_index_name/my_type_name\n{\n  \"title\": \"Elastic is funny\",\n  \"tag\": [\n    \"lucene\"\n  ]\n}</code></pre>\n    <pre class=\"es7 es8\"><code>POST /my_index_name/_doc\n{\n  \"title\": \"Elastic is funny\",\n  \"tag\": [\n    \"lucene\"\n  ]\n}</code></pre>\n\n    <h3 class=\"ui header\">Get a document</h3>\n\n    <pre class=\"es1 es2 es5 es6\"><code>GET /my_index_name/my_type_name/12abc</code></pre>\n    <pre class=\"es7 es8\"><code>GET /my_index_name/_doc/12abc</code></pre>\n\n    <h3 class=\"ui header\">Create or update a document</h3>\n\n    <pre class=\"es1 es2 es5 es6\"><code>PUT /my_index_name/my_type_name/12abc\n{\n  \"title\": \"Elastic is funny\",\n  \"tag\": [\n    \"lucene\"\n  ]\n}</code></pre>\n\n    <pre class=\"es7 es8\"><code>PUT /my_index_name/_doc/12abc\n{\n  \"title\": \"Elastic is funny\",\n  \"tag\": [\n    \"lucene\"\n  ]\n}</code></pre>\n\n    <h3 class=\"ui header\">Delete a document</h3>\n\n    <pre class=\"es1 es2 es5 es6\"><code>DELETE /my_index_name/my_type_name/12abc</code></pre>\n    <pre class=\"es7 es8\"><code>DELETE /my_index_name/_doc/12abc</code></pre>\n\n    <h3 class=\"ui header\">Open and close indexes to save memory and CPU</h3>\n\n    <pre><code>POST /my_index_name/_close</code></pre>\n    <pre><code>POST /my_index_name/_open</code></pre>\n\n    <h3 class=\"ui header\">Remove and create aliases</h3>\n\n    <pre><code>POST /_aliases\n{\n  \"actions\": [\n    {\n      \"remove\": {\n        \"index\": \"my_index_name\",\n        \"alias\": \"foo\"\n      }\n    },\n    {\n      \"add\": {\n        \"index\": \"my_index_name\",\n        \"alias\": \"bar\",\n        \"filter\" : { \"term\" : { \"user\" : \"damien\" } }\n      }\n    }\n  ]\n}</code></pre>\n\n    <h3 class=\"ui header\">List aliases</h3>\n\n    <pre><code>GET /_aliases</code></pre>\n    <pre><code>GET /my_index_name/_alias/*</code></pre>\n    <pre><code>GET /*/_alias/*</code></pre>\n    <pre><code>GET /*/_alias/foo</code></pre>\n\n\n\n      <h3 class=\"ui header\">Full custom analyzer declaration</h3>\n\n      <pre><code>PUT /english_example\n{\n  \"settings\": {\n    \"analysis\": {\n      \"filter\": {\n        \"english_stop\": {\n          \"type\":       \"stop\",\n          \"stopwords\":  \"_english_\"\n        },\n        \"english_stemmer\": {\n          \"type\":       \"stemmer\",\n          \"language\":   \"english\"\n        }\n      },\n      \"analyzer\": {\n        \"my_english\": {\n          \"char_filter\":  [\"html_strip\"],\n          \"tokenizer\":  \"standard\",\n          \"filter\": [\n            \"lowercase\",\n            \"english_stop\",\n            \"english_stemmer\"\n          ]\n        }\n      }\n    }\n  }\n}</code></pre>\n\n    <h3 class=\"ui header es1 es2\">Create and list index warmer</h3>\n\n    <p class=\"es1 es2\">\n      Create a query that will be played on every new document:\n    </p>\n    <pre class=\"es1 es2\"><code>PUT /my_index_name/_warmer/my_warmer\n{\n  \"query\": {\n    \"match_all\": {}\n  },\n  \"aggs\": {\n    \"costly_aggs\": {\n      \"terms\": {\n        \"field\": \"title\"\n      }\n    }\n  }\n}</code></pre>\n    <pre class=\"es1 es2\"><code>GET /my_index_name/_warmer</code></pre>\n    <pre class=\"es1 es2\"><code>GET /my_index_name/_warmer/*</code></pre>\n\n    <h3 class=\"ui header\">Indices monitoring and information</h3>\n\n    <pre><code>GET /my_index_name/_stats</code></pre>\n    <pre><code>GET /my_index_name/_segments</code></pre>\n    <pre><code>GET /my_index_name/_recovery?pretty&amp;human</code></pre>\n    <pre class=\"es1 es2\"><code>GET /my_index_name/_warmer/*</code></pre>\n\n    <h3 class=\"ui header\">Indices status and management</h3>\n\n    <pre><code>POST /my_index_name/_cache/clear</code></pre>\n    <pre><code>POST /my_index_name/_refresh</code></pre>\n    <pre><code>POST /my_index_name/_flush</code></pre>\n    <pre class=\"es1\"><code>POST /my_index_name/_optimize</code></pre>\n    <pre class=\"es2 es5 es6 es7 es8\"><code>POST /my_index_name/_forcemerge</code></pre>\n\n\n\t<div class=\"es2 es5 es6 es7 es8\">\n\t    <h2 class=\"ui dividing header\">Reindex API</h2>\n\t    <h3 class=\"ui header\">Simple Reindex Operation</h3>\n\n<pre class=\"\"><code>POST /_reindex\n{\n  \"source\": {\n    \"index\": \"test-index\"\n  },\n  \"dest\": {\n    \"index\": \"test-index-new\"\n  }\n}</code></pre>\n\n    <h3 class=\"ui header\">Selective Reindex Operation</h3>\n\n<pre><code>POST /_reindex\n{\n  \"source\": {\n    \"index\": \"test-index\",\n    \"query\": {\n      \"match\": {\n        \"gender\": \"female\"\n      }\n    }\n  },\n  \"dest\": {\n    \"index\": \"test-index-new\",\n    \"type\": \"female\"\n  }\n}</code></pre>\n  </div>\n\n\n\n        <a name=\"debug\"></a>\n        <h2 class=\"ui dividing header\">Debug and development</h2>\n        <h3 class=\"ui header\">Queries</h3>\n        <p>Get a detailed view of what a query do:</p>\n\n        <pre><code>GET /blog/_validate/query?explain=true\n{\n  \"query\": {\n    \"match\": {\n      \"title\": \"Smith\"\n    }\n  }\n}</code></pre>\n\n        <p>Get an explanation about a document matching or not:</p>\n\n        <pre class=\"es1 es2 es5 es6\"><code>GET /blog/post/1/_explain\n{\n  \"query\": {\n    \"match\": {\n      \"title\": \"Smith\"\n    }\n  }\n}</code></pre>\n        <pre class=\"es7 es8\"><code>GET /blog/_explain/1\n{\n  \"query\": {\n    \"match\": {\n      \"title\": \"Smith\"\n    }\n  }\n}</code></pre>\n\n          <h3 class=\"ui header\">Analysis</h3>\n\n          <p>Test how a content is tokenized in a field:</p>\n\t\t  <pre><code>GET /blog/_analyze\n{\n  \"field\": \"title\",\n  \"text\": \"powerful\"\n}</code></pre>\n\n          <p>Test analyzer token output by analyzer:</p>\n\t\t  <pre><code>GET /blog/_analyze\n{\n  \"analyzer\": \"english\",\n  \"text\": \"powerful\"\n}</code></pre>\n\n          <h3 class=\"ui header\">Slowlog</h3>\n\n          <p>Lower the slowlog threshold to see all the search queries in the logs:</p>\n\t\t  <pre><code>PUT /blog/_settings\n{\n  \"index.search.slowlog.threshold.query.trace\": \"0s\",\n  \"index.search.slowlog.level\": \"trace\"\n}</code></pre>\n\n          <p>Go back to the default configuration:</p>\n\t\t  <pre><code>PUT /blog/_settings\n{\n  \"index.search.slowlog.threshold.query.trace\": \"500ms\",\n  \"index.search.slowlog.level\": \"info\"\n}</code></pre>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n    <a name=\"cluster\"></a>\n    <h2 class=\"ui dividing header\">Cluster management and plugins</h2>\n\n    <div class=\"es5 es6 es7 es8\">\n      <h3 class=\"ui header\">Running with Docker</h3>\n        <p>Elasticsearch:</p>\n      <pre class=\"es8\"><code>docker network create elastic\ndocker run --rm -it --name \"elastically_es\" -e \"discovery.type=single-node\" --net elastic docker.elastic.co/elasticsearch/elasticsearch:8.1.2</code></pre>\n      <p class=\"es8\">Have a look at the output for password and enrollment token!</p>\n      <pre class=\"es7\"><code>docker run --rm -it --name \"elastically_es\" -p 9200:9200 -e \"discovery.type=single-node\" docker.elastic.co/elasticsearch/elasticsearch:7.17.2</code></pre>\n      <pre class=\"es6\"><code>docker run -d --name \"elastically_es\" -p 9200:9200 -e \"discovery.type=single-node\" docker.elastic.co/elasticsearch/elasticsearch:6.8.6</code></pre>\n      <pre class=\"es5\"><code>docker run -d --name \"elastically_es\" -p 9200:9200 -e \"discovery.type=single-node\" docker.elastic.co/elasticsearch/elasticsearch:5.6.16</code></pre>\n        <p>Kibana:</p>\n      <pre class=\"es8\"><code>docker run --rm -it --name \"elastically_kibana\" --net elastic -p 5601:5601 docker.elastic.co/kibana/kibana:8.1.2</code></pre>\n      <pre class=\"es7\"><code>docker run -e \"ELASTICSEARCH_HOSTS=http://127.0.0.1:9200/\" --network host docker.elastic.co/kibana/kibana:7.17.2</code></pre>\n      <pre class=\"es6\"><code>docker run -e \"ELASTICSEARCH_HOSTS=http://127.0.0.1:9200/\" --network host docker.elastic.co/kibana/kibana:6.8.6</code></pre>\n      <pre class=\"es5\"><code>docker run -e \"ELASTICSEARCH_HOSTS=http://127.0.0.1:9200/\" --network host docker.elastic.co/kibana/kibana:5.6.16</code></pre>\n    </div>\n\n    <h3 class=\"ui header\">Cluster and node information</h3>\n    <pre><code>GET /_cluster/health?pretty</code></pre>\n    <pre><code>GET /_cluster/health?wait_for_status=yellow&amp;timeout=50s</code></pre>\n    <pre><code>GET /_cluster/state</code></pre>\n    <pre><code>GET /_cluster/stats?human&amp;pretty</code></pre>\n    <pre><code>GET /_cluster/pending_tasks</code></pre>\n    <pre><code>GET /_nodes</code></pre>\n    <pre><code>GET /_nodes/stats</code></pre>\n    <pre><code>GET /_nodes/nodeId1,nodeId2/stats</code></pre>\n    <pre class=\"es1\"><code>GET /_shutdown 😱</code></pre>\n\n      <p>Get the full reference of <strong>all</strong> the settings:</p>\n      <pre><code>GET /_cluster/settings?include_defaults=true&flat_settings=true</code></pre>\n\n    <h3 class=\"ui header\">Moving shards manually</h3>\n\n    <p>\n      Ask the index my_index_name shard 0 of node1 to go to node2:\n    </p>\n    <pre><code>POST /_cluster/reroute\n{\n  \"commands\": [\n    {\n      \"move\": {\n        \"index\": \"my_index_name\",\n        \"shard\": 0,\n        \"from_node\": \"node1\",\n        \"to_node\": \"node2\"\n      }\n    },\n    {\n      \"allocate\": {\n        \"index\": \"my_index_name\",\n        \"shard\": 1,\n        \"node\": \"node3\"\n      }\n    }\n  ]\n}</code></pre>\n\n    <h3 class=\"ui header\">Updating settings</h3>\n\n    <div class=\"es1 es2 es5 es6\">\n        <p>\n          Change dynamically the minimum number of nodes to allow a master election, both persistent or not:\n        </p>\n        <pre><code>PUT /_cluster/settings\n{\n  \"persistent\": {\n    \"discovery.zen.minimum_master_nodes\": 3\n  }\n}</code></pre>\n\n        <pre><code>PUT /_cluster/settings\n{\n  \"transient\": {\n    \"discovery.zen.minimum_master_nodes\": 2\n  }\n}</code></pre>\n    </div>\n\n    <p>\n      Disable shard allocation, useful before a rolling restart:\n    </p>\n    <pre><code>PUT /_cluster/settings\n{\n    \"transient\" : {\n        \"cluster.routing.allocation.enable\" : \"none\"\n    }\n}</code></pre>\n    <pre><code>PUT /_cluster/settings\n{\n    \"transient\" : {\n        \"cluster.routing.allocation.enable\" : \"all\"\n    }\n}</code></pre>\n\n    <h3 class=\"ui header\">Snapshots and Restore</h3>\n\n    <pre><code>PUT /_snapshot/my_backup\n{\n  \"type\": \"fs\",\n  \"settings\": {\n    \"location\": \"my_backup_location\"\n  }\n}</code></pre>\n    <pre><code>PUT /_snapshot/my_backup/snapshot_a\n{\n  \"indices\": \"index_1,index_2\",\n  \"ignore_unavailable\": \"true\",\n  \"include_global_state\": false\n}</code></pre>\n    <pre><code>POST /_snapshot/my_backup/snapshot_a/_restore\n{\n  \"indices\": \"index_1,index_2\",\n  \"ignore_unavailable\": \"true\",\n  \"include_global_state\": false,\n  \"rename_pattern\": \"index_(.+)\",\n  \"rename_replacement\": \"restored_index_$1\"\n}</code></pre>\n\n    <h3 class=\"ui header\">Most useful plugins</h3>\n\n    <div class=\"es5 es6 es7 es8 ui secondary orange segment\">\n      <p>Site plugins are no longer supported, look at Kibana applications or other standalone app like <a href=\"https://github.com/lmenezes/cerebro\">Cerebro</a> for basic management.</p>\n    </div>\n\n    <div class=\"ui celled list\">\n      <div class=\"item es1 es2\">\n        <div class=\"content\">\n          <div class=\"header\">Kopf</div>\n          <div class=\"description\"><p>Nice and easy user interface to manage Elasticsearch, with forms for a lots of API.</p></div>\n          <div class=\"extra\">\n            <code class=\"es1\">bin/plugin --install lmenezes/elasticsearch-kopf/1.0</code>\n            <code class=\"es2\">bin/plugin install lmenezes/elasticsearch-kopf/2.0</code>\n          </div>\n        </div>\n      </div>\n      <div class=\"item es1\">\n        <div class=\"content\">\n          <div class=\"header\">Marvel</div>\n          <div class=\"description\"><p>Official monitoring solution.</p></div>\n          <div class=\"extra\">\n            <code>bin/plugin --install elasticsearch/marvel/1.3</code>\n          </div>\n        </div>\n      </div>\n      <div class=\"item es1 es2\">\n        <div class=\"content\">\n          <div class=\"header\">Elasticsearch-HQ</div>\n          <div class=\"description\"><p>Monitoring, Management, and statistics analysis.</p></div>\n          <div class=\"extra\">\n            <code class=\"es1\">bin/plugin --install royrusso/elasticsearch-HQ/v1.0.0</code>\n            <code class=\"es2\">bin/plugin install royrusso/elasticsearch-HQ</code>\n          </div>\n        </div>\n      </div>\n      <div class=\"item es1 es2\">\n        <div class=\"content\">\n          <div class=\"header\">Mapper-Attachments</div>\n          <div class=\"description\"><p>Index file attachments in over a thousand formats (such as PPT, XLS, PDF) using the Apache text extraction library Tika.</p></div>\n          <div class=\"extra\">\n            <code class=\"es1\">bin/plugin --install elasticsearch/elasticsearch-mapper-attachments/2.7.1</code>\n            <code class=\"es2\">bin/plugin install elasticsearch/elasticsearch-mapper-attachments</code>\n          </div>\n        </div>\n      </div>\n      <div class=\"item\">\n        <div class=\"content\">\n          <div class=\"header\">Analysis ICU</div>\n          <div class=\"description\"><p>Adding useful tokenizer and token filters from the Unicode ICU library.</p></div>\n          <div class=\"extra\">\n            <code class=\"es1\">bin/plugin --install elasticsearch/elasticsearch-analysis-icu/2.7.0</code>\n            <code class=\"es2\">bin/plugin install analysis-icu</code>\n            <code class=\"es5 es6 es7 es8\">bin/elasticsearch-plugin install analysis-icu</code>\n          </div>\n        </div>\n      </div>\n      <div class=\"item\">\n        <div class=\"content\">\n          <div class=\"header\">AWS Cloud</div>\n          <div class=\"description\"><p>Allow discovery and storage in Amazon cloud (EC2 and S3).</p></div>\n          <div class=\"extra\">\n            <code class=\"es1\">bin/plugin --install elasticsearch/elasticsearch-cloud-aws/2.7.1</code>\n            <code class=\"es2\">bin/plugin install cloud-aws</code>\n            <code class=\"es5 es6 es7 es8\">bin/elasticsearch-plugin install discovery-ec2</code>\n            <code class=\"es5 es6 es7 es8\">bin/elasticsearch-plugin install repository-s3</code>\n          </div>\n        </div>\n      </div>\n      <div class=\"item\">\n        <div class=\"content\">\n          <div class=\"header\">Azure Cloud</div>\n          <div class=\"description\"><p>Allow discovery and storage in Microsoft Azure cloud.</p></div>\n          <div class=\"extra\">\n            <code class=\"es1\">bin/plugin --install elasticsearch/elasticsearch-cloud-azure/2.8.3</code>\n            <code class=\"es2\">bin/plugin install cloud-azure</code>\n            <code class=\"es5 es6 es7 es8\">bin/elasticsearch-plugin install discovery-azure-classic</code>\n            <code class=\"es5 es6 es7 es8\">bin/elasticsearch-plugin install repository-azure</code>\n          </div>\n        </div>\n      </div>\n    </div>\n\n    <h3 class=\"ui header\">Plugins management</h3>\n\n    <pre class=\"es1\"><code>bin/plugin --url file:///path/to/plugin --install plugin-name</code></pre>\n    <pre class=\"es1\"><code>bin/plugin --remove [pluginname]</code></pre>\n    <pre class=\"es2\"><code>bin/plugin install file:///path/to/plugin</code></pre>\n    <pre class=\"es2\"><code>bin/plugin list</code></pre>\n    <pre class=\"es2\"><code>bin/plugin remove [pluginname]</code></pre>\n    <pre class=\"es5 es6 es7 es8\"><code>bin/elasticsearch-plugin install file:///path/to/plugin</code></pre>\n    <pre class=\"es5 es6 es7 es8\"><code>bin/elasticsearch-plugin list</code></pre>\n    <pre class=\"es5 es6 es7 es8\"><code>bin/elasticsearch-plugin remove [pluginname]</code></pre>\n\n\n\n\n\n\n    <h2 class=\"ui dividing header\">Other information</h2>\n\n        <h3 class=\"ui header\">Where to find the plugin binary?</h3>\n\n        <p>RPM: <code>/usr/share/elasticsearch/bin</code></p>\n        <p>Debian: <code>/usr/share/elasticsearch/bin</code></p>\n\n        <h3 class=\"ui header\">What are the default ports?</h3>\n\n        <p>Kibana: <a href=\"http://localhost:5601/\">http://localhost:5601/</a>.</p>\n        <p>Elasticsearch: <a href=\"http://localhost:9200/\">http://localhost:9200/</a>.</p>\n\n        <h3 class=\"ui header\">How to set the correct HEAP SIZE value?</h3>\n\n        <p>The best value for a single purpose Elasticsearch server is <strong>about 50% of available RAM but under 32g</strong>.\n        <br>Assuming Ubuntu / Debian server, you can change those files:</p>\n\n        <h4>/etc/security/limits.conf</h4>\n\n        <pre class=\"language-none\"><code>elasticsearch - nofile 65535\nelasticsearch - memlock unlimited</code></pre>\n\n        <h4>/etc/default/elasticsearch (on CentOS/RH: /etc/sysconfig/elasticsearch)</h4>\n\n        <pre class=\"language-none\"><code>ES_HEAP_SIZE=20g\nMAX_OPEN_FILES=65535\nMAX_LOCKED_MEMORY=unlimited</code></pre>\n\n\n\n        <h3 class=\"ui header\">Useful settings to change in elasticsearch.yml</h3>\n\n        <pre class=\"es1 language-none\"><code>cluster.name: jolicluster\nnode.name: ${HOSTNAME}\nplugin.mandatory: marvel-agent,analysis-icu,license\nnode.data: true\nnode.master: true\nbootstrap.mlockall: true\naction.auto_create_index: +aaa*,-bbb*,+ccc*,-*</code></pre>\n        <pre class=\"es2 language-none\"><code>cluster.name: jolicluster\nnode.name: ${HOSTNAME}\ndiscovery.zen.ping.unicast.hosts: [\"front01\", \"front02\"]\ndiscovery.zen.minimum_master_nodes: 2\nnetwork.host: _site_\nnetwork.bind_host: [_site_, _local_]\nplugin.mandatory: analysis-icu, marvel-agent\nnode.data: true\nnode.master: true\nbootstrap.mlockall: true\naction.auto_create_index: +aaa*,-bbb*,+ccc*,-*</code></pre>\n        <pre class=\"es5 es6 language-none\"><code>cluster.name: jolicluster\nnode.name: ${HOSTNAME}\ndiscovery.zen.ping.unicast.hosts: [\"front01\", \"front02\"]\ndiscovery.zen.minimum_master_nodes: 2\nnetwork.host: _site_\nnetwork.bind_host: [_site_, _local_]\nplugin.mandatory: analysis-icu\nnode.data: true\nnode.master: true\nbootstrap.memory_lock: true\naction.auto_create_index: +aaa*,-bbb*,+ccc*,-*\n\n# Disable X-Pack features\nxpack.security.enabled: false\nxpack.monitoring.enabled: false\nxpack.ml.enabled: false\nxpack.watcher.enabled: false\nxpack.sql.enabled: false\nxpack.graph.enabled: false\n\n# Only for XPack plugin for ES <= 6.2\n#xpack.reporting.enabled: false\n</code></pre>\n        <pre class=\"es7 es8 language-yaml\"><code>cluster.name: jolicluster\nnode.name: ${HOSTNAME} # by default\n\nnetwork.host: [_local_, _site_]\nplugin.mandatory: analysis-icu\nnode.data: true\nnode.master: true\nnode.ingest: true\nbootstrap.memory_lock: true\naction.auto_create_index: +aaa*,-bbb*,+ccc*,-*\n\ndiscovery.seed_hosts:\n  - 192.168.1.10:9300\n  - 192.168.1.11\n  - seeds.mydomain.com\n\n# Needed for first cluster boot\ncluster.initial_master_nodes:\n  - 10.0.10.101\n  - 10.0.10.102:9300\n  - 10.0.10.102:9301\n  - master-node-name\n\n# Disable X-Pack features, choose wisely\nxpack.ccr.enabled: false\nxpack.data_frame.enabled: false\nxpack.enrich.enabled: false\nxpack.flattened.enabled: false\nxpack.graph.enabled: false\nxpack.ilm.enabled: false\nxpack.logstash.enabled: false\nxpack.ml.enabled: false\nxpack.monitoring.enabled: false\nxpack.rollup.enabled: false\nxpack.security.enabled: false\nxpack.slm.enabled: false\nxpack.sql.enabled: false\nxpack.transform.enabled: false\nxpack.vectors.enabled: false\nxpack.watcher.enabled: false</code></pre>\n    </div>\n\n    <div class=\"ui inverted vertical footer segment\">\n      <div class=\"ui container\">\n        <p>Hosted on <a href=\"http://pages.github.com\">GitHub Pages</a>. Elasticsearch is a trademark of Elasticsearch BV, registered in the U.S. and in other countries.</p>\n        <p>This website is not endorsed of affiliated with Elasticsearch. Brought to you by <a href=\"https://jolicode.com/\">JoliCode</a>.</p>\n      </div>\n    </div>\n\n    <script>\n      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n      ga('create', 'UA-29696798-6', 'auto');\n      ga('send', 'pageview');\n    </script>\n\n    <script src=\"./javascripts/prism.js\"></script>\n\n    <!-- From http://tholman.com/github-corners/ -->\n    <a href=\"https://github.com/jolicode/elasticsearch-sheatsheet\" class=\"github-corner\" aria-label=\"View source on GitHub\"><svg width=\"80\" height=\"80\" viewBox=\"0 0 250 250\" style=\"fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;\" aria-hidden=\"true\"><path d=\"M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z\"></path><path d=\"M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2\" fill=\"currentColor\" style=\"transform-origin: 130px 106px;\" class=\"octo-arm\"></path><path d=\"M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z\" fill=\"currentColor\" class=\"octo-body\"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>\n  </body>\n</html>\n"
  },
  {
    "path": "javascripts/prism.js",
    "content": "/* PrismJS 1.19.0\nhttps://prismjs.com/download.html?#themes=prism-solarizedlight&languages=markup+clike+javascript+json+yaml&plugins=toolbar+copy-to-clipboard */\nvar _self=\"undefined\"!=typeof window?window:\"undefined\"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\\blang(?:uage)?-([\\w-]+)\\b/i,n=0,C={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof _?new _(e.type,C.util.encode(e.content),e.alias):Array.isArray(e)?e.map(C.util.encode):e.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/\\u00a0/g,\" \")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,\"__id\",{value:++n}),e.__id},clone:function r(e,t){var a,n,i=C.util.type(e);switch(t=t||{},i){case\"Object\":if(n=C.util.objId(e),t[n])return t[n];for(var o in a={},t[n]=a,e)e.hasOwnProperty(o)&&(a[o]=r(e[o],t));return a;case\"Array\":return n=C.util.objId(e),t[n]?t[n]:(a=[],t[n]=a,e.forEach(function(e,n){a[n]=r(e,t)}),a);default:return e}},getLanguage:function(e){for(;e&&!c.test(e.className);)e=e.parentElement;return e?(e.className.match(c)||[,\"none\"])[1].toLowerCase():\"none\"},currentScript:function(){if(\"undefined\"==typeof document)return null;if(\"currentScript\"in document)return document.currentScript;try{throw new Error}catch(e){var n=(/at [^(\\r\\n]*\\((.*):.+:.+\\)$/i.exec(e.stack)||[])[1];if(n){var r=document.getElementsByTagName(\"script\");for(var t in r)if(r[t].src==n)return r[t]}return null}}},languages:{extend:function(e,n){var r=C.util.clone(C.languages[e]);for(var t in n)r[t]=n[t];return r},insertBefore:function(r,e,n,t){var a=(t=t||C.languages)[r],i={};for(var o in a)if(a.hasOwnProperty(o)){if(o==e)for(var l in n)n.hasOwnProperty(l)&&(i[l]=n[l]);n.hasOwnProperty(o)||(i[o]=a[o])}var s=t[r];return t[r]=i,C.languages.DFS(C.languages,function(e,n){n===s&&e!=r&&(this[e]=i)}),i},DFS:function e(n,r,t,a){a=a||{};var i=C.util.objId;for(var o in n)if(n.hasOwnProperty(o)){r.call(n,o,n[o],t||o);var l=n[o],s=C.util.type(l);\"Object\"!==s||a[i(l)]?\"Array\"!==s||a[i(l)]||(a[i(l)]=!0,e(l,r,o,a)):(a[i(l)]=!0,e(l,r,null,a))}}},plugins:{},highlightAll:function(e,n){C.highlightAllUnder(document,e,n)},highlightAllUnder:function(e,n,r){var t={callback:r,container:e,selector:'code[class*=\"language-\"], [class*=\"language-\"] code, code[class*=\"lang-\"], [class*=\"lang-\"] code'};C.hooks.run(\"before-highlightall\",t),t.elements=Array.prototype.slice.apply(t.container.querySelectorAll(t.selector)),C.hooks.run(\"before-all-elements-highlight\",t);for(var a,i=0;a=t.elements[i++];)C.highlightElement(a,!0===n,t.callback)},highlightElement:function(e,n,r){var t=C.util.getLanguage(e),a=C.languages[t];e.className=e.className.replace(c,\"\").replace(/\\s+/g,\" \")+\" language-\"+t;var i=e.parentNode;i&&\"pre\"===i.nodeName.toLowerCase()&&(i.className=i.className.replace(c,\"\").replace(/\\s+/g,\" \")+\" language-\"+t);var o={element:e,language:t,grammar:a,code:e.textContent};function l(e){o.highlightedCode=e,C.hooks.run(\"before-insert\",o),o.element.innerHTML=o.highlightedCode,C.hooks.run(\"after-highlight\",o),C.hooks.run(\"complete\",o),r&&r.call(o.element)}if(C.hooks.run(\"before-sanity-check\",o),!o.code)return C.hooks.run(\"complete\",o),void(r&&r.call(o.element));if(C.hooks.run(\"before-highlight\",o),o.grammar)if(n&&u.Worker){var s=new Worker(C.filename);s.onmessage=function(e){l(e.data)},s.postMessage(JSON.stringify({language:o.language,code:o.code,immediateClose:!0}))}else l(C.highlight(o.code,o.grammar,o.language));else l(C.util.encode(o.code))},highlight:function(e,n,r){var t={code:e,grammar:n,language:r};return C.hooks.run(\"before-tokenize\",t),t.tokens=C.tokenize(t.code,t.grammar),C.hooks.run(\"after-tokenize\",t),_.stringify(C.util.encode(t.tokens),t.language)},matchGrammar:function(e,n,r,t,a,i,o){for(var l in r)if(r.hasOwnProperty(l)&&r[l]){var s=r[l];s=Array.isArray(s)?s:[s];for(var u=0;u<s.length;++u){if(o&&o==l+\",\"+u)return;var c=s[u],g=c.inside,f=!!c.lookbehind,h=!!c.greedy,d=0,m=c.alias;if(h&&!c.pattern.global){var p=c.pattern.toString().match(/[imsuy]*$/)[0];c.pattern=RegExp(c.pattern.source,p+\"g\")}c=c.pattern||c;for(var y=t,v=a;y<n.length;v+=n[y].length,++y){var k=n[y];if(n.length>e.length)return;if(!(k instanceof _)){if(h&&y!=n.length-1){if(c.lastIndex=v,!(O=c.exec(e)))break;for(var b=O.index+(f&&O[1]?O[1].length:0),w=O.index+O[0].length,A=y,P=v,x=n.length;A<x&&(P<w||!n[A].type&&!n[A-1].greedy);++A)(P+=n[A].length)<=b&&(++y,v=P);if(n[y]instanceof _)continue;S=A-y,k=e.slice(v,P),O.index-=v}else{c.lastIndex=0;var O=c.exec(k),S=1}if(O){f&&(d=O[1]?O[1].length:0);w=(b=O.index+d)+(O=O[0].slice(d)).length;var j=k.slice(0,b),N=k.slice(w),E=[y,S];j&&(++y,v+=j.length,E.push(j));var L=new _(l,g?C.tokenize(O,g):O,m,O,h);if(E.push(L),N&&E.push(N),Array.prototype.splice.apply(n,E),1!=S&&C.matchGrammar(e,n,r,y,v,!0,l+\",\"+u),i)break}else if(i)break}}}}},tokenize:function(e,n){var r=[e],t=n.rest;if(t){for(var a in t)n[a]=t[a];delete n.rest}return C.matchGrammar(e,r,n,0,0,!1),r},hooks:{all:{},add:function(e,n){var r=C.hooks.all;r[e]=r[e]||[],r[e].push(n)},run:function(e,n){var r=C.hooks.all[e];if(r&&r.length)for(var t,a=0;t=r[a++];)t(n)}},Token:_};function _(e,n,r,t,a){this.type=e,this.content=n,this.alias=r,this.length=0|(t||\"\").length,this.greedy=!!a}if(u.Prism=C,_.stringify=function(e,n){if(\"string\"==typeof e)return e;if(Array.isArray(e))return e.map(function(e){return _.stringify(e,n)}).join(\"\");var r={type:e.type,content:_.stringify(e.content,n),tag:\"span\",classes:[\"token\",e.type],attributes:{},language:n};if(e.alias){var t=Array.isArray(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(r.classes,t)}C.hooks.run(\"wrap\",r);var a=Object.keys(r.attributes).map(function(e){return e+'=\"'+(r.attributes[e]||\"\").replace(/\"/g,\"&quot;\")+'\"'}).join(\" \");return\"<\"+r.tag+' class=\"'+r.classes.join(\" \")+'\"'+(a?\" \"+a:\"\")+\">\"+r.content+\"</\"+r.tag+\">\"},!u.document)return u.addEventListener&&(C.disableWorkerMessageHandler||u.addEventListener(\"message\",function(e){var n=JSON.parse(e.data),r=n.language,t=n.code,a=n.immediateClose;u.postMessage(C.highlight(t,C.languages[r],r)),a&&u.close()},!1)),C;var e=C.util.currentScript();if(e&&(C.filename=e.src,e.hasAttribute(\"data-manual\")&&(C.manual=!0)),!C.manual){function r(){C.manual||C.highlightAll()}var t=document.readyState;\"loading\"===t||\"interactive\"===t&&e&&e.defer?document.addEventListener(\"DOMContentLoaded\",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)}return C}(_self);\"undefined\"!=typeof module&&module.exports&&(module.exports=Prism),\"undefined\"!=typeof global&&(global.Prism=Prism);\nPrism.languages.markup={comment:/<!--[\\s\\S]*?-->/,prolog:/<\\?[\\s\\S]+?\\?>/,doctype:{pattern:/<!DOCTYPE(?:[^>\"'[\\]]|\"[^\"]*\"|'[^']*')+(?:\\[(?:(?!<!--)[^\"'\\]]|\"[^\"]*\"|'[^']*'|<!--[\\s\\S]*?-->)*\\]\\s*)?>/i,greedy:!0},cdata:/<!\\[CDATA\\[[\\s\\S]*?]]>/i,tag:{pattern:/<\\/?(?!\\d)[^\\s>\\/=$<%]+(?:\\s(?:\\s*[^\\s>\\/=]+(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))|(?=[\\s/>])))+)?\\s*\\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\\/?[^\\s>\\/]+/i,inside:{punctuation:/^<\\/?/,namespace:/^[^\\s>\\/:]+:/}},\"attr-value\":{pattern:/=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\\s*)[\"']|[\"']$/,lookbehind:!0}]}},punctuation:/\\/?>/,\"attr-name\":{pattern:/[^\\s>\\/]+/,inside:{namespace:/^[^\\s>\\/:]+:/}}}},entity:/&#?[\\da-z]{1,8};/i},Prism.languages.markup.tag.inside[\"attr-value\"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add(\"wrap\",function(a){\"entity\"===a.type&&(a.attributes.title=a.content.replace(/&amp;/,\"&\"))}),Object.defineProperty(Prism.languages.markup.tag,\"addInlined\",{value:function(a,e){var s={};s[\"language-\"+e]={pattern:/(^<!\\[CDATA\\[)[\\s\\S]+?(?=\\]\\]>$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^<!\\[CDATA\\[|\\]\\]>$/i;var n={\"included-cdata\":{pattern:/<!\\[CDATA\\[[\\s\\S]*?\\]\\]>/i,inside:s}};n[\"language-\"+e]={pattern:/[\\s\\S]+/,inside:Prism.languages[e]};var t={};t[a]={pattern:RegExp(\"(<__[\\\\s\\\\S]*?>)(?:<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>\\\\s*|[\\\\s\\\\S])*?(?=<\\\\/__>)\".replace(/__/g,a),\"i\"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore(\"markup\",\"cdata\",t)}}),Prism.languages.xml=Prism.languages.extend(\"markup\",{}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup;\nPrism.languages.clike={comment:[{pattern:/(^|[^\\\\])\\/\\*[\\s\\S]*?(?:\\*\\/|$)/,lookbehind:!0},{pattern:/(^|[^\\\\:])\\/\\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/([\"'])(?:\\\\(?:\\r\\n|[\\s\\S])|(?!\\1)[^\\\\\\r\\n])*\\1/,greedy:!0},\"class-name\":{pattern:/(\\b(?:class|interface|extends|implements|trait|instanceof|new)\\s+|\\bcatch\\s+\\()[\\w.\\\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\\\]/}},keyword:/\\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\\b/,boolean:/\\b(?:true|false)\\b/,function:/\\w+(?=\\()/,number:/\\b0x[\\da-f]+\\b|(?:\\b\\d+\\.?\\d*|\\B\\.\\d+)(?:e[+-]?\\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\\+\\+?|&&?|\\|\\|?|[?*/~^%]/,punctuation:/[{}[\\];(),.:]/};\nPrism.languages.javascript=Prism.languages.extend(\"clike\",{\"class-name\":[Prism.languages.clike[\"class-name\"],{pattern:/(^|[^$\\w\\xA0-\\uFFFF])[_$A-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*(?=\\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\\s*)(?:catch|finally)\\b/,lookbehind:!0},{pattern:/(^|[^.]|\\.\\.\\.\\s*)\\b(?:as|async(?=\\s*(?:function\\b|\\(|[$\\w\\xA0-\\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\\b/,lookbehind:!0}],number:/\\b(?:(?:0[xX](?:[\\dA-Fa-f](?:_[\\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\\d(?:_\\d)?)+n|NaN|Infinity)\\b|(?:\\b(?:\\d(?:_\\d)?)+\\.?(?:\\d(?:_\\d)?)*|\\B\\.(?:\\d(?:_\\d)?)+)(?:[Ee][+-]?(?:\\d(?:_\\d)?)+)?/,function:/#?[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*(?=\\s*(?:\\.\\s*(?:apply|bind|call)\\s*)?\\()/,operator:/--|\\+\\+|\\*\\*=?|=>|&&|\\|\\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\\.{3}|\\?[.?]?|[~:]/}),Prism.languages.javascript[\"class-name\"][0].pattern=/(\\b(?:class|interface|extends|implements|instanceof|new)\\s+)[\\w.\\\\]+/,Prism.languages.insertBefore(\"javascript\",\"keyword\",{regex:{pattern:/((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s])\\s*)\\/(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[gimyus]{0,6}(?=(?:\\s|\\/\\*[\\s\\S]*?\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))/,lookbehind:!0,greedy:!0},\"function-variable\":{pattern:/#?[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*(?=\\s*[=:]\\s*(?:async\\s*)?(?:\\bfunction\\b|(?:\\((?:[^()]|\\([^()]*\\))*\\)|[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*)\\s*=>))/,alias:\"function\"},parameter:[{pattern:/(function(?:\\s+[_$A-Za-z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*)?\\s*\\(\\s*)(?!\\s)(?:[^()]|\\([^()]*\\))+?(?=\\s*\\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*(?=\\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\\(\\s*)(?!\\s)(?:[^()]|\\([^()]*\\))+?(?=\\s*\\)\\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\\b|\\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\\w\\xA0-\\uFFFF]))(?:[_$A-Za-z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*\\s*)\\(\\s*)(?!\\s)(?:[^()]|\\([^()]*\\))+?(?=\\s*\\)\\s*\\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\\b[A-Z](?:[A-Z_]|\\dx?)*\\b/}),Prism.languages.insertBefore(\"javascript\",\"string\",{\"template-string\":{pattern:/`(?:\\\\[\\s\\S]|\\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\\${)[^\\\\`])*`/,greedy:!0,inside:{\"template-punctuation\":{pattern:/^`|`$/,alias:\"string\"},interpolation:{pattern:/((?:^|[^\\\\])(?:\\\\{2})*)\\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{\"interpolation-punctuation\":{pattern:/^\\${|}$/,alias:\"punctuation\"},rest:Prism.languages.javascript}},string:/[\\s\\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined(\"script\",\"javascript\"),Prism.languages.js=Prism.languages.javascript;\nPrism.languages.json={property:{pattern:/\"(?:\\\\.|[^\\\\\"\\r\\n])*\"(?=\\s*:)/,greedy:!0},string:{pattern:/\"(?:\\\\.|[^\\\\\"\\r\\n])*\"(?!\\s*:)/,greedy:!0},comment:/\\/\\/.*|\\/\\*[\\s\\S]*?(?:\\*\\/|$)/,number:/-?\\d+\\.?\\d*(?:e[+-]?\\d+)?/i,punctuation:/[{}[\\],]/,operator:/:/,boolean:/\\b(?:true|false)\\b/,null:{pattern:/\\bnull\\b/,alias:\"keyword\"}};\nPrism.languages.yaml={scalar:{pattern:/([\\-:]\\s*(?:![^\\s]+)?[ \\t]*[|>])[ \\t]*(?:((?:\\r?\\n|\\r)[ \\t]+)[^\\r\\n]+(?:\\2[^\\r\\n]+)*)/,lookbehind:!0,alias:\"string\"},comment:/#.*/,key:{pattern:/(\\s*(?:^|[:\\-,[{\\r\\n?])[ \\t]*(?:![^\\s]+)?[ \\t]*)[^\\r\\n{[\\]},#\\s]+?(?=\\s*:\\s)/,lookbehind:!0,alias:\"atrule\"},directive:{pattern:/(^[ \\t]*)%.+/m,lookbehind:!0,alias:\"important\"},datetime:{pattern:/([:\\-,[{]\\s*(?:![^\\s]+)?[ \\t]*)(?:\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \\t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?[ \\t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?)?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?)(?=[ \\t]*(?:$|,|]|}))/m,lookbehind:!0,alias:\"number\"},boolean:{pattern:/([:\\-,[{]\\s*(?:![^\\s]+)?[ \\t]*)(?:true|false)[ \\t]*(?=$|,|]|})/im,lookbehind:!0,alias:\"important\"},null:{pattern:/([:\\-,[{]\\s*(?:![^\\s]+)?[ \\t]*)(?:null|~)[ \\t]*(?=$|,|]|})/im,lookbehind:!0,alias:\"important\"},string:{pattern:/([:\\-,[{]\\s*(?:![^\\s]+)?[ \\t]*)(\"|')(?:(?!\\2)[^\\\\\\r\\n]|\\\\.)*\\2(?=[ \\t]*(?:$|,|]|}|\\s*#))/m,lookbehind:!0,greedy:!0},number:{pattern:/([:\\-,[{]\\s*(?:![^\\s]+)?[ \\t]*)[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+\\.?\\d*|\\.?\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)[ \\t]*(?=$|,|]|})/im,lookbehind:!0},tag:/![^\\s]+/,important:/[&*][\\w]+/,punctuation:/---|[:[\\]{}\\-,|>?]|\\.\\.\\./},Prism.languages.yml=Prism.languages.yaml;\n!function(){if(\"undefined\"!=typeof self&&self.Prism&&self.document){var r=[],i={},a=function(){};Prism.plugins.toolbar={};var t=Prism.plugins.toolbar.registerButton=function(t,a){var e;e=\"function\"==typeof a?a:function(t){var e;return\"function\"==typeof a.onClick?((e=document.createElement(\"button\")).type=\"button\",e.addEventListener(\"click\",function(){a.onClick.call(this,t)})):\"string\"==typeof a.url?(e=document.createElement(\"a\")).href=a.url:e=document.createElement(\"span\"),a.className&&e.classList.add(a.className),e.textContent=a.text,e},t in i?console.warn('There is a button with the key \"'+t+'\" registered already.'):r.push(i[t]=e)},e=Prism.plugins.toolbar.hook=function(n){var t=n.element.parentNode;if(t&&/pre/i.test(t.nodeName)&&!t.parentNode.classList.contains(\"code-toolbar\")){var e=document.createElement(\"div\");e.classList.add(\"code-toolbar\"),t.parentNode.insertBefore(e,t),e.appendChild(t);var o=document.createElement(\"div\");o.classList.add(\"toolbar\"),document.body.hasAttribute(\"data-toolbar-order\")&&(r=document.body.getAttribute(\"data-toolbar-order\").split(\",\").map(function(t){return i[t]||a})),r.forEach(function(t){var e=t(n);if(e){var a=document.createElement(\"div\");a.classList.add(\"toolbar-item\"),a.appendChild(e),o.appendChild(a)}}),e.appendChild(o)}};t(\"label\",function(t){var e=t.element.parentNode;if(e&&/pre/i.test(e.nodeName)&&e.hasAttribute(\"data-label\")){var a,n,o=e.getAttribute(\"data-label\");try{n=document.querySelector(\"template#\"+o)}catch(t){}return n?a=n.content:(e.hasAttribute(\"data-url\")?(a=document.createElement(\"a\")).href=e.getAttribute(\"data-url\"):a=document.createElement(\"span\"),a.textContent=o),a}}),Prism.hooks.add(\"complete\",e)}}();\n!function(){if(\"undefined\"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r=window.ClipboardJS||void 0;r||\"function\"!=typeof require||(r=require(\"clipboard\"));var i=[];if(!r){var o=document.createElement(\"script\"),e=document.querySelector(\"head\");o.onload=function(){if(r=window.ClipboardJS)for(;i.length;)i.pop()()},o.src=\"https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js\",e.appendChild(o)}Prism.plugins.toolbar.registerButton(\"copy-to-clipboard\",function(e){var t=document.createElement(\"button\");return t.textContent=\"Copy\",r?o():i.push(o),t;function o(){var o=new r(t,{text:function(){return e.code}});o.on(\"success\",function(){t.textContent=\"Copied!\",n()}),o.on(\"error\",function(){t.textContent=\"Press Ctrl+C to copy\",n()})}function n(){setTimeout(function(){t.textContent=\"Copy\"},5e3)}})}else console.warn(\"Copy to Clipboard plugin loaded before Toolbar plugin.\")}();\n"
  },
  {
    "path": "semantic-UI/LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2015 Semantic Org\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 all\ncopies 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 THE\nSOFTWARE.\n\n"
  },
  {
    "path": "stylesheets/prism.css",
    "content": "/* PrismJS 1.19.0\nhttps://prismjs.com/download.html?#themes=prism-solarizedlight&languages=markup+clike+javascript+json+yaml&plugins=toolbar+copy-to-clipboard */\n/*\n Solarized Color Schemes originally by Ethan Schoonover\n http://ethanschoonover.com/solarized\n\n Ported for PrismJS by Hector Matos\n Website: https://krakendev.io\n Twitter Handle: https://twitter.com/allonsykraken)\n*/\n\n/*\nSOLARIZED HEX\n--------- -------\nbase03    #002b36\nbase02    #073642\nbase01    #586e75\nbase00    #657b83\nbase0     #839496\nbase1     #93a1a1\nbase2     #eee8d5\nbase3     #fdf6e3\nyellow    #b58900\norange    #cb4b16\nred       #dc322f\nmagenta   #d33682\nviolet    #6c71c4\nblue      #268bd2\ncyan      #2aa198\ngreen     #859900\n*/\n\ncode[class*=\"language-\"],\npre[class*=\"language-\"] {\n\tcolor: #657b83; /* base00 */\n\tfont-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;\n\tfont-size: 1em;\n\ttext-align: left;\n\twhite-space: pre;\n\tword-spacing: normal;\n\tword-break: normal;\n\tword-wrap: normal;\n\n\tline-height: 1.5;\n\n\t-moz-tab-size: 4;\n\t-o-tab-size: 4;\n\ttab-size: 4;\n\n\t-webkit-hyphens: none;\n\t-moz-hyphens: none;\n\t-ms-hyphens: none;\n\thyphens: none;\n}\n\npre[class*=\"language-\"]::-moz-selection, pre[class*=\"language-\"] ::-moz-selection,\ncode[class*=\"language-\"]::-moz-selection, code[class*=\"language-\"] ::-moz-selection {\n\tbackground: #073642; /* base02 */\n}\n\npre[class*=\"language-\"]::selection, pre[class*=\"language-\"] ::selection,\ncode[class*=\"language-\"]::selection, code[class*=\"language-\"] ::selection {\n\tbackground: #073642; /* base02 */\n}\n\n/* Code blocks */\npre[class*=\"language-\"] {\n\tpadding: 1em;\n\tmargin: .5em 0;\n\toverflow: auto;\n\tborder-radius: 0.3em;\n}\n\n:not(pre) > code[class*=\"language-\"],\npre[class*=\"language-\"] {\n\tbackground-color: #fdf6e3; /* base3 */\n}\n\n/* Inline code */\n:not(pre) > code[class*=\"language-\"] {\n\tpadding: .1em;\n\tborder-radius: .3em;\n}\n\n.token.comment,\n.token.prolog,\n.token.doctype,\n.token.cdata {\n\tcolor: #93a1a1; /* base1 */\n}\n\n.token.punctuation {\n\tcolor: #586e75; /* base01 */\n}\n\n.token.namespace {\n\topacity: .7;\n}\n\n.token.property,\n.token.tag,\n.token.boolean,\n.token.number,\n.token.constant,\n.token.symbol,\n.token.deleted {\n\tcolor: #268bd2; /* blue */\n}\n\n.token.selector,\n.token.attr-name,\n.token.string,\n.token.char,\n.token.builtin,\n.token.url,\n.token.inserted {\n\tcolor: #2aa198; /* cyan */\n}\n\n.token.entity {\n\tcolor: #657b83; /* base00 */\n\tbackground: #eee8d5; /* base2 */\n}\n\n.token.atrule,\n.token.attr-value,\n.token.keyword {\n\tcolor: #859900; /* green */\n}\n\n.token.function,\n.token.class-name {\n\tcolor: #b58900; /* yellow */\n}\n\n.token.regex,\n.token.important,\n.token.variable {\n\tcolor: #cb4b16; /* orange */\n}\n\n.token.important,\n.token.bold {\n\tfont-weight: bold;\n}\n.token.italic {\n\tfont-style: italic;\n}\n\n.token.entity {\n\tcursor: help;\n}\n\ndiv.code-toolbar {\n\tposition: relative;\n}\n\ndiv.code-toolbar > .toolbar {\n\tposition: absolute;\n\ttop: .3em;\n\tright: .2em;\n\ttransition: opacity 0.3s ease-in-out;\n\topacity: 0;\n}\n\ndiv.code-toolbar:hover > .toolbar {\n\topacity: 1;\n}\n\n/* Separate line b/c rules are thrown out if selector is invalid.\n   IE11 and old Edge versions don't support :focus-within. */\ndiv.code-toolbar:focus-within > .toolbar {\n\topacity: 1;\n}\n\ndiv.code-toolbar > .toolbar .toolbar-item {\n\tdisplay: inline-block;\n}\n\ndiv.code-toolbar > .toolbar a {\n\tcursor: pointer;\n}\n\ndiv.code-toolbar > .toolbar button {\n\tbackground: none;\n\tborder: 0;\n\tcolor: inherit;\n\tfont: inherit;\n\tline-height: normal;\n\toverflow: visible;\n\tpadding: 0;\n\t-webkit-user-select: none; /* for button */\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n}\n\ndiv.code-toolbar > .toolbar a,\ndiv.code-toolbar > .toolbar button,\ndiv.code-toolbar > .toolbar span {\n\tcolor: #bbb;\n\tfont-size: .8em;\n\tpadding: 0 .5em;\n\tbackground: #f5f2f0;\n\tbackground: rgba(224, 224, 224, 0.2);\n\tbox-shadow: 0 2px 0 0 rgba(0,0,0,0.2);\n\tborder-radius: .5em;\n}\n\ndiv.code-toolbar > .toolbar a:hover,\ndiv.code-toolbar > .toolbar a:focus,\ndiv.code-toolbar > .toolbar button:hover,\ndiv.code-toolbar > .toolbar button:focus,\ndiv.code-toolbar > .toolbar span:hover,\ndiv.code-toolbar > .toolbar span:focus {\n\tcolor: inherit;\n\ttext-decoration: none;\n}\n\n"
  }
]