diff --git a/.eslintrc b/.eslintrc
index 7eb57fb00..42e6738b4 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -76,7 +76,8 @@
"var": 2,
"let": 2,
"const": 3
- }
+ },
+ "SwitchCase": 1
}],
"init-declarations": 2,
"key-spacing": 2,
@@ -115,7 +116,7 @@
"max": 1
}],
"no-nested-ternary": 2,
- "no-new": 2,
+ "no-new": 0,
"no-new-object": 2,
"no-param-reassign": 2,
"no-prototype-builtins": 2,
@@ -142,7 +143,6 @@
"no-whitespace-before-property": 2,
"no-with": 2,
"object-curly-spacing": [2, "always"],
- "object-property-newline": 2,
"object-shorthand": 2,
"one-var-declaration-per-line": 2,
"operator-assignment": 2,
diff --git a/.sass-lint.yml b/.sass-lint.yml
index e4d70f397..499c17f6c 100644
--- a/.sass-lint.yml
+++ b/.sass-lint.yml
@@ -21,6 +21,8 @@
files:
ignore:
- node_modules/**
+ - src/assets/stylesheets/extensions/pymdown/_arithmatex.scss
+ - src/assets/stylesheets/extensions/pymdown/_inlinehilite.scss
- src/assets/stylesheets/_shame.scss
options:
diff --git a/CHANGELOG b/CHANGELOG
index 59933a652..5223bd020 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -32,11 +32,12 @@ mkdocs-material-1.0.0-rc.1 (2016-XX-XX)
* Added more detailed documentation on specimen, extensions etc.
* Added a 404.html error page for deployment on GitHub Pages
* Fixed live reload chain in watch mode when saving a template
+ * Fixed variable references to work with mkdocs 0.16
mkdocs-material-0.2.4 (2016-06-26)
* Fixed improperly set default favicon
- * Fixed #33: Protocol relative URL for web fonts doesn't work with file://
+ * Fixed #33: Protocol relative URL for webfonts doesn't work with file://
* Fixed #34: IE11 on Windows 7 doesn't honor max-width on main tag
* Fixed #35: Add styling for blockquotes
@@ -95,4 +96,4 @@ mkdocs-material-0.1.1 (2016-02-11)
mkdocs-material-0.1.0 (2016-02-09)
- * Initial release
\ No newline at end of file
+ * Initial release
diff --git a/Gulpfile.babel.js b/Gulpfile.babel.js
index 38beb8fce..658f4278e 100755
--- a/Gulpfile.babel.js
+++ b/Gulpfile.babel.js
@@ -130,7 +130,7 @@ gulp.task("assets:images:clean",
load("assets/images/clean"))
/* ----------------------------------------------------------------------------
- * Javascripts
+ * JavaScript
* ------------------------------------------------------------------------- */
/*
@@ -161,13 +161,13 @@ gulp.task("assets:javascripts:build", (args.clean ? [
})
/*
- * Clean javascripts generated by build
+ * Clean JavaScript generated by build
*/
gulp.task("assets:javascripts:clean",
load("assets/javascripts/clean"))
/*
- * Lint javascripts
+ * Lint JavaScript
*/
gulp.task("assets:javascripts:lint",
load("assets/javascripts/lint"))
@@ -321,7 +321,7 @@ gulp.task("watch", [
`${config.assets.src}/stylesheets/**/*.scss`
], ["assets:stylesheets:build"])
- /* Rebuild javascripts */
+ /* Rebuild JavaScript */
gulp.watch([
`${config.assets.src}/javascripts/**/*.{js,jsx}`
], ["assets:javascripts:build:application"])
diff --git a/README.md b/README.md
index b5b7e91d7..0f4205ffd 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
[![PyPI Downloads][pypi-dl-image]][pypi-dl-link]
[![PyPI Version][pypi-v-image]][pypi-v-link]
-A material design theme for [MkDocs](http://www.mkdocs.org).
+A material design theme for [MkDocs 0.16](http://www.mkdocs.org).
[![iOS](docs/images/screen.png)](http://squidfunk.github.io/mkdocs-material/)
diff --git a/docs/extensions/admonition.md b/docs/extensions/admonition.md
index ccb8dc967..64176bc1c 100644
--- a/docs/extensions/admonition.md
+++ b/docs/extensions/admonition.md
@@ -85,7 +85,8 @@ paragraphs and other blocks – except code blocks, because the parser from the
standard Markdown library does not account for those.
However, the [PyMdown Extensions][] package adds an extension called
-`superfences`, which makes it possible to nest code blocks within other blocks.
+[SuperFences][], which makes it possible to nest code blocks within other
+blocks.
Example:
@@ -310,3 +311,4 @@ Qualifiers:
[Admonition]: https://pythonhosted.org/Markdown/extensions/admonition.html
[PyMdown Extensions]: https://facelessuser.github.io/pymdown-extensions
+[SuperFences]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/
diff --git a/docs/extensions/codehilite.md b/docs/extensions/codehilite.md
index 7f58b4c10..76acd0e10 100644
--- a/docs/extensions/codehilite.md
+++ b/docs/extensions/codehilite.md
@@ -6,8 +6,8 @@ executed during compilation of the Markdown file.
## Installation
-CodeHilite parses code blocks and wraps them in `pre` tags. If [Pygments][] is
-installed, which is a generic syntax highlighter with support for over
+CodeHilite parses code blocks and wraps them in `
` tags. If [Pygments][]
+is installed, which is a generic syntax highlighter with support for over
[300 languages][], CodeHilite will also highlight the code block. Pygments can
be installed with the following command:
diff --git a/docs/extensions/metadata.md b/docs/extensions/metadata.md
index 6828e5918..33666487f 100644
--- a/docs/extensions/metadata.md
+++ b/docs/extensions/metadata.md
@@ -1,3 +1 @@
# Metadata
-
-Foobar
diff --git a/docs/extensions/permalinks.md b/docs/extensions/permalinks.md
index 784daf4bc..4ffd089cc 100644
--- a/docs/extensions/permalinks.md
+++ b/docs/extensions/permalinks.md
@@ -14,7 +14,7 @@ markdown_extensions:
- toc(permalink=true)
```
-This will add a link containing the paragraph symbol "¶" at the end of each
+This will add a link containing the paragraph symbol `¶` at the end of each
headline (exactly like on the page you're currently viewing), which the
Material theme will make appear on hover. In order to change the text of the
permalink, a string can be passed, e.g.:
diff --git a/docs/extensions/pymdown/arithmatex.md b/docs/extensions/pymdown/arithmatex.md
index e69de29bb..a42d472bb 100644
--- a/docs/extensions/pymdown/arithmatex.md
+++ b/docs/extensions/pymdown/arithmatex.md
@@ -0,0 +1,63 @@
+# Arithmatex MathJax
+
+[Arithmatex][] integrates [MathJax][] with Markdown and is included in the
+[PyMdown Extensions][] package. It parses block-style and inline equations
+written in TeX markup and outputs them in mathematical notation.
+
+## Installation
+
+Make sure that the PyMdown Extensions package [is installed][] and add the
+following lines to your `mkdocs.yml`:
+
+``` yaml
+markdown_extensions:
+ - pymdownx.arithmatex
+```
+
+The MathJax runtime is automatically included if the extension is enabled, so
+there is no need for extra JavaScript.
+
+## Usage
+
+MathJax searches for `:::tex $$...$$` (blocks) and `:::tex $...$` (inline)
+equations, parses their contents and renders them in mathematical notation.
+See [this thread][] on StackExchange for a short introduction and quick
+reference on how to write equations in TeX syntax.
+
+### Blocks
+
+Blocks are enclosed in `:::tex $$...$$` which are placed on separate lines.
+
+Example:
+
+``` tex
+$$
+\frac{n!}{k!(n-k)!} = \binom{n}{k}
+$$
+```
+
+Result:
+
+$$
+\frac{n!}{k!(n-k)!} = \binom{n}{k}
+$$
+
+### Inline
+
+Inline equations need to be enclosed in `:::tex $...$`:
+
+Example:
+
+``` tex
+Lorem ipsum dolor sit amet: $p(x|y) = \frac{p(y|x)p(x)}{p(y)}$
+```
+
+Result:
+
+Lorem ipsum dolor sit amet: $p(x|y) = \frac{p(y|x)p(x)}{p(y)}$
+
+[Arithmatex]: https://facelessuser.github.io/pymdown-extensions/extensions/arithmatex/
+[MathJax]: https://www.mathjax.org/
+[PyMdown Extensions]: https://facelessuser.github.io/pymdown-extensions
+[is installed]: /extensions/pymdown/overview/#installation
+[this thread]: http://meta.math.stackexchange.com/questions/5020/
diff --git a/docs/extensions/pymdown/overview.md b/docs/extensions/pymdown/overview.md
index ea17b6202..778dd781b 100644
--- a/docs/extensions/pymdown/overview.md
+++ b/docs/extensions/pymdown/overview.md
@@ -1,37 +1,92 @@
# PyMdown Extensions
[PyMdown Extensions][] is a collection of Markdown extensions that add some
-great and missing features to the standard Markdown library. For this reason,
-the **installation of this package is highly recommended** as it's
-well-integrated with the Material theme.
+great features to the standard Markdown library. For this reason, the
+**installation of this package is highly recommended** as it's well-integrated
+with the Material theme.
## Installation
-The Pymdown Extensions can be installed with the following command:
+The PyMdown Extensions package can be installed with the following command:
``` sh
pip install pymdown-extensions
```
-## Usage
+## Extensions
-### Improvements on existing Markdown
+### GitHub Flavored Markdown
-- BetterEm
-- SuperFences
-- MagicLink
+Most of the extensions included in the PyMdown Extensions package try to bring
+the Markdown experience closer to GitHub Flavored Markdown (GFM):
+
+- [BetterEm][] improves the handling of emphasis markup (**bold** and *italic*)
+ within Markdown by providing a more sophisticated parser for better detecting
+ start and end tokens. Read the documentation for usage notes.
+
+- [MagicLink][] detects links in Markdown and auto-generates the necessary
+ markup, so no special syntax is required. It auto-links HTTP(S) and FTP
+ links, as well as references to email addresses.
+
+- [GitHub Emoji][] adds the ability to insert emojis, which does not only
+ include the :octocat: emojis, but also a :shit:-load of emojis that we use in
+ our daily lives. See the [Emoji Cheat Sheet][] for a list of all available
+ emojis. Happy scrolling :tada:
+
+- [SuperFences][] provides the ability to nest code blocks under blockquotes,
+ lists and other block elements, which the [Fenced Code Blocks][] extension
+ from the standard Markdown library doesn't parse correctly.
+
+- [Tasklist][] adds support for styled checkbox lists. This is useful for
+ keeping track of tasks and showing what has been done and has yet to be done.
+ The usage of this extension is documented [here][].
+
+- [Tilde][] provides an easy way to ~~strike through~~ cross out text.
+ The portion of text that should be erased must be enclosed in two tildes
+ `~~...~~`, and the extension will take care of the rest.
+
+The PyMdown Extensions package adds a shorthand to enable all of the included
+extensions that provide the GFM experience. However, usage of the shorthand is
+discouraged, because some extensions are not supported, as the Material theme
+uses the counterparts included in the standard Markdown library.
+
+To enable all extensions add the following lines to your `mkdocs.yml`:
+
+``` yaml
+markdown_extensions:
+ - pymdownx.betterem
+ - pymdownx.githubemoji
+ - pymdownx.magiclink
+ - pymdownx.superfences
+ - pymdownx.tasklist(custom_checkbox=true)
+ - pymdownx.tilde
+```
+
+### Syntactic Sugar
+
+There are three other extensions that add further syntactic sugar:
+
+- [Caret][] is the sister extension of [Tilde][] and makes it possible to
+ highlight ^^inserted text^^. The portion of text that should be marked as
+ added must be enclosed in two carets `^^...^^`, the extension will do the
+ rest.
+
+- [Mark][] add the ability to ==mark text==.
- SmartSymbols
-### New Syntax for...
-
-- Caret
-- Mark
-- Tilde
-
-### New features
-
-- Arithmatex
-- [Inlinehilite](inlinehilite.md)
-- [Tasklist](tasklist.md)
+- Inlinehilite --- own documentation file
+- Critic --- own documentation file
[PyMdown Extensions]: http://facelessuser.github.io/pymdown-extensions/
+[usage notes]: https://facelessuser.github.io/pymdown-extensions/usage_notes/
+[BetterEm]: https://facelessuser.github.io/pymdown-extensions/extensions/betterem/
+[MagicLink]: https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/
+[GitHub Emoji]: https://facelessuser.github.io/pymdown-extensions/extensions/githubemoji/
+[Emoji Cheat Sheet]: http://www.webpagefx.com/tools/emoji-cheat-sheet/
+[SuperFences]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/
+[Fenced Code Blocks]: https://pythonhosted.org/Markdown/extensions/fenced_code_blocks.html
+[Tasklist]: https://facelessuser.github.io/pymdown-extensions/extensions/tasklist/
+[here]: /extensions/pymdown/tasklist
+[Tilde]: https://facelessuser.github.io/pymdown-extensions/extensions/tilde/
+[Caret]: https://facelessuser.github.io/pymdown-extensions/extensions/caret/
+[Mark]: https://facelessuser.github.io/pymdown-extensions/extensions/mark/
diff --git a/lib/tasks/assets/javascripts/clean.js b/lib/tasks/assets/javascripts/clean.js
index 664c06f2a..2d9526fa8 100644
--- a/lib/tasks/assets/javascripts/clean.js
+++ b/lib/tasks/assets/javascripts/clean.js
@@ -24,7 +24,7 @@ import clean from "del"
import vinyl from "vinyl-paths"
/* ----------------------------------------------------------------------------
- * Task: clean javascripts generated by build
+ * Task: clean JavaScript generated by build
* ------------------------------------------------------------------------- */
export default (gulp, config) => {
diff --git a/material/404.html b/material/404.html
index 3bbe15915..67cfc1126 100644
--- a/material/404.html
+++ b/material/404.html
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "main.html" %}
{% block content %}
404 - Not found
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/material/assets/images/icons/bitbucket-black-850dc5f8b2.svg b/material/assets/images/icons/bitbucket-black-850dc5f8b2.svg
deleted file mode 100644
index 8f79a03b7..000000000
--- a/material/assets/images/icons/bitbucket-black-850dc5f8b2.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/material/assets/images/icons/bitbucket-black.svg b/material/assets/images/icons/bitbucket-black.svg
new file mode 100644
index 000000000..0ab16772c
--- /dev/null
+++ b/material/assets/images/icons/bitbucket-black.svg
@@ -0,0 +1,20 @@
+
diff --git a/material/assets/images/icons/bitbucket-white-42306ad0de.svg b/material/assets/images/icons/bitbucket-white-42306ad0de.svg
deleted file mode 100644
index 1ddc25338..000000000
--- a/material/assets/images/icons/bitbucket-white-42306ad0de.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/material/assets/images/icons/bitbucket-white.svg b/material/assets/images/icons/bitbucket-white.svg
new file mode 100644
index 000000000..1a8210a4a
--- /dev/null
+++ b/material/assets/images/icons/bitbucket-white.svg
@@ -0,0 +1,20 @@
+
diff --git a/material/assets/images/icons/github-black-da331b3ec4.svg b/material/assets/images/icons/github-black-da331b3ec4.svg
deleted file mode 100644
index 169d723f9..000000000
--- a/material/assets/images/icons/github-black-da331b3ec4.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/material/assets/images/icons/github-black.svg b/material/assets/images/icons/github-black.svg
new file mode 100644
index 000000000..843e3ac14
--- /dev/null
+++ b/material/assets/images/icons/github-black.svg
@@ -0,0 +1,18 @@
+
diff --git a/material/assets/images/icons/github-white-1cfc8ff99e.svg b/material/assets/images/icons/github-white-1cfc8ff99e.svg
deleted file mode 100644
index 45fbc8291..000000000
--- a/material/assets/images/icons/github-white-1cfc8ff99e.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/material/assets/images/icons/github-white.svg b/material/assets/images/icons/github-white.svg
new file mode 100644
index 000000000..b475cdf2c
--- /dev/null
+++ b/material/assets/images/icons/github-white.svg
@@ -0,0 +1,18 @@
+
diff --git a/material/assets/images/icons/gitlab-black-81ba4a278f.svg b/material/assets/images/icons/gitlab-black-81ba4a278f.svg
deleted file mode 100644
index fc533874e..000000000
--- a/material/assets/images/icons/gitlab-black-81ba4a278f.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/material/assets/images/icons/gitlab-black.svg b/material/assets/images/icons/gitlab-black.svg
new file mode 100644
index 000000000..bd082aeb9
--- /dev/null
+++ b/material/assets/images/icons/gitlab-black.svg
@@ -0,0 +1,31 @@
+
\ No newline at end of file
diff --git a/material/assets/images/icons/gitlab-white-d65054b8fe.svg b/material/assets/images/icons/gitlab-white-d65054b8fe.svg
deleted file mode 100644
index 1e922a9a4..000000000
--- a/material/assets/images/icons/gitlab-white-d65054b8fe.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/material/assets/images/icons/gitlab-white.svg b/material/assets/images/icons/gitlab-white.svg
new file mode 100644
index 000000000..b8e34209e
--- /dev/null
+++ b/material/assets/images/icons/gitlab-white.svg
@@ -0,0 +1,32 @@
+
\ No newline at end of file
diff --git a/material/assets/javascripts/application-d59af56763.js b/material/assets/javascripts/application-d59af56763.js
deleted file mode 100644
index b825e3092..000000000
--- a/material/assets/javascripts/application-d59af56763.js
+++ /dev/null
@@ -1,58 +0,0 @@
-var Application=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){n(1),e.exports=n(2)},function(e,t){"use strict";!function(e){function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function r(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return y.iterable&&(t[Symbol.iterator]=function(){return t}),t}function o(e){this.map={},e instanceof o?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function i(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function s(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function a(e){var t=new FileReader;return t.readAsArrayBuffer(e),s(t)}function u(e){var t=new FileReader;return t.readAsText(e),s(t)}function l(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(y.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(y.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(y.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(e){if(!y.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):y.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},y.blob?(this.blob=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(a)},this.text=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return u(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=i(this);return e?e:Promise.resolve(this._bodyText)},y.formData&&(this.formData=function(){return this.text().then(h)}),this.json=function(){return this.text().then(JSON.parse)},this}function c(e){var t=e.toUpperCase();return m.indexOf(t)>-1?t:e}function f(e,t){t=t||{};var n=t.body;if(f.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,n||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=c(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function h(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function d(e){var t=new o,n=(e.getAllResponseHeaders()||"").trim().split("\n");return n.forEach(function(e){var n=e.trim().split(":"),r=n.shift().trim(),o=n.join(":").trim();t.append(r,o)}),t}function p(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof o?t.headers:new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var y={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};o.prototype.append=function(e,r){e=t(e),r=n(r);var o=this.map[e];o||(o=[],this.map[e]=o),o.push(r)},o.prototype["delete"]=function(e){delete this.map[t(e)]},o.prototype.get=function(e){var n=this.map[t(e)];return n?n[0]:null},o.prototype.getAll=function(e){return this.map[t(e)]||[]},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,r){this.map[t(e)]=[n(r)]},o.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(r){e.call(t,r,n,this)},this)},this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},y.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];f.prototype.clone=function(){return new f(this)},l.call(f.prototype),l.call(p.prototype),p.prototype.clone=function(){return new p(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},p.error=function(){var e=new p(null,{status:0,statusText:""});return e.type="error",e};var v=[301,302,303,307,308];p.redirect=function(e,t){if(v.indexOf(t)===-1)throw new RangeError("Invalid status code");return new p(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=f,e.Response=p,e.fetch=function(e,t){return new Promise(function(n,r){function o(){return"responseURL"in s?s.responseURL:/^X-Request-URL:/m.test(s.getAllResponseHeaders())?s.getResponseHeader("X-Request-URL"):void 0}var i;i=f.prototype.isPrototypeOf(e)&&!t?e:new f(e,t);var s=new XMLHttpRequest;s.onload=function(){var e={status:s.status,statusText:s.statusText,headers:d(s),url:o()},t="response"in s?s.response:s.responseText;n(new p(t,e))},s.onerror=function(){r(new TypeError("Network request failed"))},s.ontimeout=function(){r(new TypeError("Network request failed"))},s.open(i.method,i.url,!0),"include"===i.credentials&&(s.withCredentials=!0),"responseType"in s&&y.blob&&(s.responseType="blob"),i.headers.forEach(function(e,t){s.setRequestHeader(t,e)}),s.send("undefined"==typeof i._bodyInit?null:i._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:void 0)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null,n=new f["default"].Sidebar(e),r=[new f["default"].Listener.Viewport.Offset(function(){return n.update()}),new f["default"].Listener.Viewport.Resize(function(){return n.update()})];if("string"==typeof t&&t.length)new f["default"].Listener.Viewport.Media(t,function(e){if(e.matches){n.update();var t=!0,o=!1,i=void 0;try{for(var s,a=r[Symbol.iterator]();!(t=(s=a.next()).done);t=!0){var u=s.value;u.listen()}}catch(l){o=!0,i=l}finally{try{!t&&a["return"]&&a["return"]()}finally{if(o)throw i}}}else{n.reset();var c=!0,f=!1,h=void 0;try{for(var d,p=r[Symbol.iterator]();!(c=(d=p.next()).done);c=!0){var y=d.value;y.unlisten()}}catch(l){f=!0,h=l}finally{try{!c&&p["return"]&&p["return"]()}finally{if(f)throw h}}}}).listen();else{n.update();var o=!0,i=!1,s=void 0;try{for(var a,u=r[Symbol.iterator]();!(o=(a=u.next()).done);o=!0){var l=a.value;l.listen()}}catch(c){i=!0,s=c}finally{try{!o&&u["return"]&&u["return"]()}finally{if(i)throw s}}}}},{key:"initializeNavBlur",value:function(e){var t=new f["default"].Nav.Blur(e),n=[new f["default"].Listener.Viewport.Offset(function(){return t.update()})];t.update();var r=!0,o=!1,i=void 0;try{for(var s,a=n[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=s.value;u.listen()}}catch(l){o=!0,i=l}finally{try{!r&&a["return"]&&a["return"]()}finally{if(o)throw i}}}},{key:"initializeNavCollapse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=document.querySelectorAll(e),r=!0,o=!1,i=void 0;try{for(var s,a=function(){var e=s.value,n=new f["default"].Nav.Collapse(e),r=new f["default"].Listener.Toggle(e.previousElementSibling,function(){return n.update()});new f["default"].Listener.Viewport.Media(t,function(e){e.matches?r.listen():(n.reset(),r.unlisten())}).listen()},u=n[Symbol.iterator]();!(r=(s=u.next()).done);r=!0)a()}catch(l){o=!0,i=l}finally{try{!r&&u["return"]&&u["return"]()}finally{if(o)throw i}}}},{key:"hasGithubRepo",value:function(){return"github"===this.config_.repo.icon||this.config_.repo.url.includes("github")}}]),e}();t["default"]=h,document.addEventListener("DOMContentLoaded",function(){Modernizr.addTest("ios",function(){return!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)}),Modernizr.addTest("standalone",function(){return!!navigator.standalone}),a["default"].attach(document.body),document.getElementById("query").addEventListener("focus",function(){document.getElementById("search").checked=!0}),document.querySelector(".md-container").addEventListener("click",function(){document.getElementById("search").checked&&(document.getElementById("search").checked=!1)}),document.querySelector(".md-search").addEventListener("click",function(e){e.stopPropagation()}),fetch("https://api.github.com/repos/squidfunk/mkdocs-material/releases/latest").then(function(e){return e.json()})}),e.exports=t["default"]},function(e,t,n){var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(){"use strict";/**
- * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
- *
- * @codingstandard ftlabs-jsv2
- * @copyright The Financial Times Limited [All Rights Reserved]
- * @license MIT License (see LICENSE.txt)
- */
-function i(e,t){function n(e,t){return function(){return e.apply(t,arguments)}}var r;if(t=t||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=t.touchBoundary||10,this.layer=e,this.tapDelay=t.tapDelay||200,this.tapTimeout=t.tapTimeout||700,!i.notNeeded(e)){for(var o=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],s=this,u=0,l=o.length;u=0,a=navigator.userAgent.indexOf("Android")>0&&!s,u=/iP(ad|hone|od)/.test(navigator.userAgent)&&!s,l=u&&/OS 4_\d(_\d)?/.test(navigator.userAgent),c=u&&/OS [6-7]_\d/.test(navigator.userAgent),f=navigator.userAgent.indexOf("BB10")>0;i.prototype.needsClick=function(e){switch(e.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(e.disabled)return!0;break;case"input":if(u&&"file"===e.type||e.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(e.className)},i.prototype.needsFocus=function(e){switch(e.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!a;case"input":switch(e.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!e.disabled&&!e.readOnly;default:return/\bneedsfocus\b/.test(e.className)}},i.prototype.sendClick=function(e,t){var n,r;document.activeElement&&document.activeElement!==e&&document.activeElement.blur(),r=t.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(e),!0,!0,window,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,e.dispatchEvent(n)},i.prototype.determineEventType=function(e){return a&&"select"===e.tagName.toLowerCase()?"mousedown":"click"},i.prototype.focus=function(e){var t;u&&e.setSelectionRange&&0!==e.type.indexOf("date")&&"time"!==e.type&&"month"!==e.type?(t=e.value.length,e.setSelectionRange(t,t)):e.focus()},i.prototype.updateScrollParent=function(e){var t,n;if(t=e.fastClickScrollParent,!t||!t.contains(e)){n=e;do{if(n.scrollHeight>n.offsetHeight){t=n,e.fastClickScrollParent=n;break}n=n.parentElement}while(n)}t&&(t.fastClickLastScrollTop=t.scrollTop)},i.prototype.getTargetElementFromEventTarget=function(e){return e.nodeType===Node.TEXT_NODE?e.parentNode:e},i.prototype.onTouchStart=function(e){var t,n,r;if(e.targetTouches.length>1)return!0;if(t=this.getTargetElementFromEventTarget(e.target),n=e.targetTouches[0],u){if(r=window.getSelection(),r.rangeCount&&!r.isCollapsed)return!0;if(!l){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return e.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(t)}}return this.trackingClick=!0,this.trackingClickStart=e.timeStamp,this.targetElement=t,this.touchStartX=n.pageX,this.touchStartY=n.pageY,e.timeStamp-this.lastClickTimen||Math.abs(t.pageY-this.touchStartY)>n},i.prototype.onTouchMove=function(e){return!this.trackingClick||((this.targetElement!==this.getTargetElementFromEventTarget(e.target)||this.touchHasMoved(e))&&(this.trackingClick=!1,this.targetElement=null),!0)},i.prototype.findControl=function(e){return void 0!==e.control?e.control:e.htmlFor?document.getElementById(e.htmlFor):e.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},i.prototype.onTouchEnd=function(e){var t,n,r,o,i,s=this.targetElement;if(!this.trackingClick)return!0;if(e.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=e.timeStamp,n=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,c&&(i=e.changedTouches[0],s=document.elementFromPoint(i.pageX-window.pageXOffset,i.pageY-window.pageYOffset)||s,s.fastClickScrollParent=this.targetElement.fastClickScrollParent),r=s.tagName.toLowerCase(),"label"===r){if(t=this.findControl(s)){if(this.focus(s),a)return!1;s=t}}else if(this.needsFocus(s))return e.timeStamp-n>100||u&&window.top!==window&&"input"===r?(this.targetElement=null,!1):(this.focus(s),this.sendClick(s,e),u&&"select"===r||(this.targetElement=null,e.preventDefault()),!1);return!(!u||l||(o=s.fastClickScrollParent,!o||o.fastClickLastScrollTop===o.scrollTop))||(this.needsClick(s)||(e.preventDefault(),this.sendClick(s,e)),!1)},i.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},i.prototype.onMouse=function(e){return!this.targetElement||(!!e.forwardedTouchEvent||(!e.cancelable||(!(!this.needsClick(this.targetElement)||this.cancelNextClick)||(e.stopImmediatePropagation?e.stopImmediatePropagation():e.propagationStopped=!0,e.stopPropagation(),e.preventDefault(),!1))))},i.prototype.onClick=function(e){var t;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===e.target.type&&0===e.detail||(t=this.onMouse(e),t||(this.targetElement=null),t)},i.prototype.destroy=function(){var e=this.layer;a&&(e.removeEventListener("mouseover",this.onMouse,!0),e.removeEventListener("mousedown",this.onMouse,!0),e.removeEventListener("mouseup",this.onMouse,!0)),e.removeEventListener("click",this.onClick,!0),e.removeEventListener("touchstart",this.onTouchStart,!1),e.removeEventListener("touchmove",this.onTouchMove,!1),e.removeEventListener("touchend",this.onTouchEnd,!1),e.removeEventListener("touchcancel",this.onTouchCancel,!1)},i.notNeeded=function(e){var t,n,r,o;if("undefined"==typeof window.ontouchstart)return!0;if(n=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!a)return!0;if(t=document.querySelector("meta[name=viewport]")){if(t.content.indexOf("user-scalable=no")!==-1)return!0;if(n>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(f&&(r=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),r[1]>=10&&r[2]>=3&&(t=document.querySelector("meta[name=viewport]")))){if(t.content.indexOf("user-scalable=no")!==-1)return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===e.style.msTouchAction||"manipulation"===e.style.touchAction||(o=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],!!(o>=27&&(t=document.querySelector("meta[name=viewport]"),t&&(t.content.indexOf("user-scalable=no")!==-1||document.documentElement.scrollWidth<=window.outerWidth)))||("none"===e.style.touchAction||"manipulation"===e.style.touchAction))},i.attach=function(e,t){return new i(e,t)},"object"===o(n(4))&&n(4)?(r=function(){return i}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))):"undefined"!=typeof e&&e.exports?(e.exports=i.attach,e.exports.FastClick=i):window.FastClick=i}()},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,n){(function(n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n2?f-2:0),d=2;d0&&(this.els_[t-1].dataset.mdBlurred=""),this.index_=t;else for(var n=this.index_;n>=0;n--){if(!(this.anchors_[n].offsetTop>e)){this.index_=n;break}n>0&&delete this.els_[n-1].dataset.mdBlurred}this.offset_=e}},{key:"reset",value:function(){[].forEach.call(this.els_,function(e){delete e.dataset.mdBlurred})}}]),e}();t["default"]=o,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;nn){for(;" "!==e[n]&&--n>0;);return e.substring(0,n)+"…"}return e},s=document.getElementById("query");s.addEventListener("keyup",function(){for(var t=document.querySelector(".md-search-result__list");t.firstChild;)t.removeChild(t.firstChild);var s=n.search(e.value);s.forEach(function(e){var n=o[e.ref];t.appendChild(r.createElement("li",{"class":"md-search-result__item"},r.createElement("a",{href:n.location,title:n.title,"class":"md-search-result__link"},r.createElement("article",{"class":"md-search-result__article"},r.createElement("h1",{"class":"md-search-result__title"},n.title),r.createElement("p",{"class":"md-search-result__teaser"},i(n.text,140))))))});var a=document.querySelector(".md-search-result__meta");a.innerHTML=s.length+" search result"+(1!==s.length?"s":"")})})["catch"](function(){})};t["default"]=u,e.exports=t["default"]}).call(t,n(6))},function(e,t,n){var r,o;"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(){var i=function s(e){var t=new s.Index;return t.pipeline.add(s.trimmer,s.stopWordFilter,s.stemmer),e&&e.call(t,t),t};i.version="0.7.1",/*!
- * lunr.utils
- * Copyright (C) 2016 Oliver Nightingale
- */
-i.utils={},i.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),i.utils.asString=function(e){return void 0===e||null===e?"":e.toString()},/*!
- * lunr.EventEmitter
- * Copyright (C) 2016 Oliver Nightingale
- */
-i.EventEmitter=function(){this.events={}},i.EventEmitter.prototype.addListener=function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),n=e;if("function"!=typeof t)throw new TypeError("last argument must be a function");n.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},i.EventEmitter.prototype.removeListener=function(e,t){if(this.hasHandler(e)){var n=this.events[e].indexOf(t);this.events[e].splice(n,1),this.events[e].length||delete this.events[e]}},i.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){var t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)})}},i.EventEmitter.prototype.hasHandler=function(e){return e in this.events},/*!
- * lunr.tokenizer
- * Copyright (C) 2016 Oliver Nightingale
- */
-i.tokenizer=function(e){return arguments.length&&null!=e&&void 0!=e?Array.isArray(e)?e.map(function(e){return i.utils.asString(e).toLowerCase()}):e.toString().trim().toLowerCase().split(i.tokenizer.seperator):[]},i.tokenizer.seperator=/[\s\-]+/,i.tokenizer.load=function(e){var t=this.registeredFunctions[e];if(!t)throw new Error("Cannot load un-registered function: "+e);return t},i.tokenizer.label="default",i.tokenizer.registeredFunctions={"default":i.tokenizer},i.tokenizer.registerFunction=function(e,t){t in this.registeredFunctions&&i.utils.warn("Overwriting existing tokenizer: "+t),e.label=t,this.registeredFunctions[t]=e},/*!
- * lunr.Pipeline
- * Copyright (C) 2016 Oliver Nightingale
- */
-i.Pipeline=function(){this._stack=[]},i.Pipeline.registeredFunctions={},i.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&i.utils.warn("Overwriting existing registered function: "+t),e.label=t,i.Pipeline.registeredFunctions[e.label]=e},i.Pipeline.warnIfFunctionNotRegistered=function(e){var t=e.label&&e.label in this.registeredFunctions;t||i.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},i.Pipeline.load=function(e){var t=new i.Pipeline;return e.forEach(function(e){var n=i.Pipeline.registeredFunctions[e];if(!n)throw new Error("Cannot load un-registered function: "+e);t.add(n)}),t},i.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){i.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},i.Pipeline.prototype.after=function(e,t){i.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(n==-1)throw new Error("Cannot find existingFn");n+=1,this._stack.splice(n,0,t)},i.Pipeline.prototype.before=function(e,t){i.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(n==-1)throw new Error("Cannot find existingFn");this._stack.splice(n,0,t)},i.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},i.Pipeline.prototype.run=function(e){for(var t=[],n=e.length,r=this._stack.length,o=0;on.idx?n=n.next:(r+=t.val*n.val,t=t.next,n=n.next);return r},i.Vector.prototype.similarity=function(e){return this.dot(e)/(this.magnitude()*e.magnitude())},/*!
- * lunr.SortedSet
- * Copyright (C) 2016 Oliver Nightingale
- */
-i.SortedSet=function(){this.length=0,this.elements=[]},i.SortedSet.load=function(e){var t=new this;return t.elements=e,t.length=e.length,t},i.SortedSet.prototype.add=function(){var e,t;for(e=0;e1;){if(i===e)return o;ie&&(n=o),r=n-t,o=t+Math.floor(r/2),i=this.elements[o]}return i===e?o:-1},i.SortedSet.prototype.locationFor=function(e){for(var t=0,n=this.elements.length,r=n-t,o=t+Math.floor(r/2),i=this.elements[o];r>1;)ie&&(n=o),r=n-t,o=t+Math.floor(r/2),i=this.elements[o];return i>e?o:io-1||r>s-1)break;a[n]!==u[r]?a[n]u[r]&&r++:(t.add(a[n]),n++,r++)}return t},i.SortedSet.prototype.clone=function(){var e=new i.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},i.SortedSet.prototype.union=function(e){var t,n,r;this.length>=e.length?(t=this,n=e):(t=e,n=this),r=t.clone();for(var o=0,i=n.toArray();o0&&(r=1+Math.log(this.documentStore.length/n)),this._idfCache[t]=r},i.Index.prototype.search=function(e){var t=this.pipeline.run(this.tokenizerFn(e)),n=new i.Vector,r=[],o=this._fields.reduce(function(e,t){return e+t.boost},0),s=t.some(function(e){return this.tokenStore.has(e)},this);if(!s)return[];t.forEach(function(e,t,s){var a=1/s.length*this._fields.length*o,u=this,l=this.tokenStore.expand(e).reduce(function(t,r){var o=u.corpusTokens.indexOf(r),s=u.idf(r),l=1,c=new i.SortedSet;if(r!==e){var f=Math.max(3,r.length-e.length);l=1/Math.log(f)}o>-1&&n.insert(o,a*s*l);for(var h=u.tokenStore.get(r),d=Object.keys(h),p=d.length,y=0;y
-1 ? upcased : method;
+ }
+
+ function Request(input, options) {
+ options = options || {};
+ var body = options.body;
+ if (Request.prototype.isPrototypeOf(input)) {
+ if (input.bodyUsed) {
+ throw new TypeError('Already read');
+ }
+ this.url = input.url;
+ this.credentials = input.credentials;
+ if (!options.headers) {
+ this.headers = new Headers(input.headers);
+ }
+ this.method = input.method;
+ this.mode = input.mode;
+ if (!body) {
+ body = input._bodyInit;
+ input.bodyUsed = true;
+ }
+ } else {
+ this.url = input;
+ }
+
+ this.credentials = options.credentials || this.credentials || 'omit';
+ if (options.headers || !this.headers) {
+ this.headers = new Headers(options.headers);
+ }
+ this.method = normalizeMethod(options.method || this.method || 'GET');
+ this.mode = options.mode || this.mode || null;
+ this.referrer = null;
+
+ if ((this.method === 'GET' || this.method === 'HEAD') && body) {
+ throw new TypeError('Body not allowed for GET or HEAD requests');
+ }
+ this._initBody(body);
+ }
+
+ Request.prototype.clone = function () {
+ return new Request(this);
+ };
+
+ function decode(body) {
+ var form = new FormData();
+ body.trim().split('&').forEach(function (bytes) {
+ if (bytes) {
+ var split = bytes.split('=');
+ var name = split.shift().replace(/\+/g, ' ');
+ var value = split.join('=').replace(/\+/g, ' ');
+ form.append(decodeURIComponent(name), decodeURIComponent(value));
+ }
+ });
+ return form;
+ }
+
+ function headers(xhr) {
+ var head = new Headers();
+ var pairs = (xhr.getAllResponseHeaders() || '').trim().split('\n');
+ pairs.forEach(function (header) {
+ var split = header.trim().split(':');
+ var key = split.shift().trim();
+ var value = split.join(':').trim();
+ head.append(key, value);
+ });
+ return head;
+ }
+
+ Body.call(Request.prototype);
+
+ function Response(bodyInit, options) {
+ if (!options) {
+ options = {};
+ }
+
+ this.type = 'default';
+ this.status = options.status;
+ this.ok = this.status >= 200 && this.status < 300;
+ this.statusText = options.statusText;
+ this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers);
+ this.url = options.url || '';
+ this._initBody(bodyInit);
+ }
+
+ Body.call(Response.prototype);
+
+ Response.prototype.clone = function () {
+ return new Response(this._bodyInit, {
+ status: this.status,
+ statusText: this.statusText,
+ headers: new Headers(this.headers),
+ url: this.url
+ });
+ };
+
+ Response.error = function () {
+ var response = new Response(null, { status: 0, statusText: '' });
+ response.type = 'error';
+ return response;
+ };
+
+ var redirectStatuses = [301, 302, 303, 307, 308];
+
+ Response.redirect = function (url, status) {
+ if (redirectStatuses.indexOf(status) === -1) {
+ throw new RangeError('Invalid status code');
+ }
+
+ return new Response(null, { status: status, headers: { location: url } });
+ };
+
+ self.Headers = Headers;
+ self.Request = Request;
+ self.Response = Response;
+
+ self.fetch = function (input, init) {
+ return new Promise(function (resolve, reject) {
+ var request;
+ if (Request.prototype.isPrototypeOf(input) && !init) {
+ request = input;
+ } else {
+ request = new Request(input, init);
+ }
+
+ var xhr = new XMLHttpRequest();
+
+ function responseURL() {
+ if ('responseURL' in xhr) {
+ return xhr.responseURL;
+ }
+
+ // Avoid security warnings on getResponseHeader when not allowed by CORS
+ if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {
+ return xhr.getResponseHeader('X-Request-URL');
+ }
+
+ return;
+ }
+
+ xhr.onload = function () {
+ var options = {
+ status: xhr.status,
+ statusText: xhr.statusText,
+ headers: headers(xhr),
+ url: responseURL()
+ };
+ var body = 'response' in xhr ? xhr.response : xhr.responseText;
+ resolve(new Response(body, options));
+ };
+
+ xhr.onerror = function () {
+ reject(new TypeError('Network request failed'));
+ };
+
+ xhr.ontimeout = function () {
+ reject(new TypeError('Network request failed'));
+ };
+
+ xhr.open(request.method, request.url, true);
+
+ if (request.credentials === 'include') {
+ xhr.withCredentials = true;
+ }
+
+ if ('responseType' in xhr && support.blob) {
+ xhr.responseType = 'blob';
+ }
+
+ request.headers.forEach(function (value, name) {
+ xhr.setRequestHeader(name, value);
+ });
+
+ xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);
+ });
+ };
+ self.fetch.polyfill = true;
+ })(typeof self !== 'undefined' ? self : undefined);
+
+/***/ },
+/* 2 */
+/***/ function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*
+ * Copyright (c) 2016 Martin Donath
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 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.
+ */
+
+ var _fastclick = __webpack_require__(3);
+
+ var _fastclick2 = _interopRequireDefault(_fastclick);
+
+ var _Material = __webpack_require__(5);
+
+ var _Material2 = _interopRequireDefault(_Material);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ /* ----------------------------------------------------------------------------
+ * Application
+ * ------------------------------------------------------------------------- */
+
+ var Application = function () {
+
+ /**
+ * Create the application
+ *
+ * @constructor
+ * @param {object} config Configuration object
+ */
+ function Application(config) {
+ _classCallCheck(this, Application);
+
+ this.config_ = config;
+ }
+
+ /**
+ * Initialize all components and listeners
+ */
+
+
+ _createClass(Application, [{
+ key: "initialize",
+ value: function initialize() {
+ var _this = this;
+
+ /* Initialize Modernizr and Fastclick */
+ new _Material2.default.Event.Listener(document, "DOMContentLoaded", function () {
+
+ /* Test for iOS */
+ Modernizr.addTest("ios", function () {
+ return !!navigator.userAgent.match(/(iPad|iPhone|iPod)/g);
+ });
+
+ /* Test for web application context */
+ Modernizr.addTest("standalone", function () {
+ return !!navigator.standalone;
+ });
+
+ /* Attack FastClick to mitigate 300ms delay on touch devices */
+ _fastclick2.default.attach(document.body);
+ }).listen();
+
+ /* Cross-browser helper to dispatch/fire an event */
+ var dispatch = function dispatch(el, event) {
+ return document.createEvent ? el.dispatchEvent(new Event(event)) : el.fireEvent("on" + event, document.createEventObject());
+ };
+
+ /* Truncate a string after the given number of characters - this is not
+ a reasonable approach, since the summaries kind of suck. It would be
+ better to create something more intelligent, highlighting the search
+ occurrences and making a better summary out of it */
+ var truncate = function truncate(string, n) {
+ var i = n;
+ if (string.length > i) {
+ while (string[i] !== " " && --i > 0) {}
+ return string.substring(0, i) + "...";
+ }
+ return string;
+ };
+
+ /* Component: sidebar with navigation */
+ new _Material2.default.Event.MatchMedia("(min-width: 1200px)", new _Material2.default.Event.Listener(window, ["scroll", "resize", "orientationchange"], new _Material2.default.Sidebar("[data-md-sidebar=primary]")));
+
+ /* Component: sidebar with table of contents */
+ new _Material2.default.Event.MatchMedia("(min-width: 960px)", new _Material2.default.Event.Listener(window, ["scroll", "resize", "orientationchange"], new _Material2.default.Sidebar("[data-md-sidebar=secondary]")));
+
+ /* Component: link blurring for table of contents */
+ new _Material2.default.Event.MatchMedia("(min-width: 960px)", new _Material2.default.Event.Listener(window, "scroll", new _Material2.default.Nav.Blur("[data-md-sidebar=secondary] .md-nav__link")));
+
+ /* Component: collapsible elements for navigation */
+ var collapsibles = document.querySelectorAll("[data-md-collapse]");
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+
+ try {
+ for (var _iterator = collapsibles[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var collapse = _step.value;
+
+ new _Material2.default.Event.MatchMedia("(min-width: 1200px)", new _Material2.default.Event.Listener(collapse.previousElementSibling, "click", new _Material2.default.Nav.Collapse(collapse)));
+ } /* Component: search body lock for mobile */
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
+
+ new _Material2.default.Event.MatchMedia("(max-width: 959px)", new _Material2.default.Event.Listener("[data-md-toggle=search]", "change", new _Material2.default.Search.Lock("[data-md-toggle=search]")));
+
+ /* Component: search results */
+ new _Material2.default.Event.Listener(document.forms.search.query, ["focus", "keyup"], new _Material2.default.Search.Result("[data-md-search-result]", function () {
+ return fetch(_this.config_.url.base + "/mkdocs/search_index.json").then(function (response) {
+ return response.json();
+ }).then(function (data) {
+ return data.docs.map(function (doc) {
+ doc.location = _this.config_.url.base + doc.location;
+ doc.text = truncate(doc.text, 140);
+ return doc;
+ });
+ });
+ })).listen();
+
+ /* Listener: prevent touches on overlay if navigation is active */
+ new _Material2.default.Event.MatchMedia("(max-width: 1199px)", new _Material2.default.Event.Listener("[data-md-overlay]", "touchstart", function (ev) {
+ return ev.preventDefault();
+ }));
+
+ /* Listener: close drawer when anchor links are clicked */
+ new _Material2.default.Event.MatchMedia("(max-width: 959px)", new _Material2.default.Event.Listener("[data-md-sidebar=primary] [href^='#']", "click", function () {
+ var toggle = document.querySelector("[data-md-toggle=drawer]");
+ if (toggle.checked) {
+ toggle.checked = false;
+ dispatch(toggle, "change");
+ }
+ }));
+
+ /* Listener: focus input after activating search */
+ new _Material2.default.Event.Listener("[data-md-toggle=search]", "change", function (ev) {
+ setTimeout(function (toggle) {
+ var query = document.forms.search.query;
+ if (toggle.checked) query.focus();
+ }, 400, ev.target);
+ }).listen();
+
+ /* Listener: activate search on focus */
+ new _Material2.default.Event.MatchMedia("(min-width: 960px)", new _Material2.default.Event.Listener(document.forms.search.query, "focus", function () {
+ var toggle = document.querySelector("[data-md-toggle=search]");
+ if (!toggle.checked) {
+ toggle.checked = true;
+ dispatch(toggle, "change");
+ }
+ }));
+
+ /* Listener: disable search when clicking outside */
+ new _Material2.default.Event.MatchMedia("(min-width: 960px)", new _Material2.default.Event.Listener(document.body, "click", function () {
+ var toggle = document.querySelector("[data-md-toggle=search]");
+ if (toggle.checked) {
+ toggle.checked = false;
+ dispatch(toggle, "change");
+ }
+ }));
+
+ /* Listener: fix unclickable toggle due to blur handler */
+ new _Material2.default.Event.MatchMedia("(min-width: 960px)", new _Material2.default.Event.Listener("[data-md-toggle=search]", "click", function (ev) {
+ return ev.stopPropagation();
+ }));
+
+ /* Listener: prevent search from closing when clicking */
+ new _Material2.default.Event.MatchMedia("(min-width: 960px)", new _Material2.default.Event.Listener("[data-md-search]", "click", function (ev) {
+ return ev.stopPropagation();
+ }))
+
+ /* Retrieve the facts for the given repository type */
+ ;(function () {
+ var el = document.querySelector("[data-md-source]");
+ switch (el.dataset.mdSource) {
+ case "github":
+ return new _Material2.default.Source.Adapter.GitHub(el).fetch();
+ default:
+ return Promise.resolve([]);
+ }
+
+ /* Render repository source information */
+ })().then(function (facts) {
+ var sources = document.querySelectorAll("[data-md-source]");
+ var _iteratorNormalCompletion2 = true;
+ var _didIteratorError2 = false;
+ var _iteratorError2 = undefined;
+
+ try {
+ for (var _iterator2 = sources[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+ var source = _step2.value;
+
+ new _Material2.default.Source.Repository(source).initialize(facts);
+ }
+ } catch (err) {
+ _didIteratorError2 = true;
+ _iteratorError2 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion2 && _iterator2.return) {
+ _iterator2.return();
+ }
+ } finally {
+ if (_didIteratorError2) {
+ throw _iteratorError2;
+ }
+ }
+ }
+ });
+ }
+ }]);
+
+ return Application;
+ }();
+
+ exports.default = Application;
+ module.exports = exports["default"];
+
+/***/ },
+/* 3 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
+
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+ ;(function () {
+ 'use strict';
+
+ /**
+ * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
+ *
+ * @codingstandard ftlabs-jsv2
+ * @copyright The Financial Times Limited [All Rights Reserved]
+ * @license MIT License (see LICENSE.txt)
+ */
+
+ /*jslint browser:true, node:true*/
+ /*global define, Event, Node*/
+
+ /**
+ * Instantiate fast-clicking listeners on the specified layer.
+ *
+ * @constructor
+ * @param {Element} layer The layer to listen on
+ * @param {Object} [options={}] The options to override the defaults
+ */
+
+ function FastClick(layer, options) {
+ var oldOnClick;
+
+ options = options || {};
+
+ /**
+ * Whether a click is currently being tracked.
+ *
+ * @type boolean
+ */
+ this.trackingClick = false;
+
+ /**
+ * Timestamp for when click tracking started.
+ *
+ * @type number
+ */
+ this.trackingClickStart = 0;
+
+ /**
+ * The element being tracked for a click.
+ *
+ * @type EventTarget
+ */
+ this.targetElement = null;
+
+ /**
+ * X-coordinate of touch start event.
+ *
+ * @type number
+ */
+ this.touchStartX = 0;
+
+ /**
+ * Y-coordinate of touch start event.
+ *
+ * @type number
+ */
+ this.touchStartY = 0;
+
+ /**
+ * ID of the last touch, retrieved from Touch.identifier.
+ *
+ * @type number
+ */
+ this.lastTouchIdentifier = 0;
+
+ /**
+ * Touchmove boundary, beyond which a click will be cancelled.
+ *
+ * @type number
+ */
+ this.touchBoundary = options.touchBoundary || 10;
+
+ /**
+ * The FastClick layer.
+ *
+ * @type Element
+ */
+ this.layer = layer;
+
+ /**
+ * The minimum time between tap(touchstart and touchend) events
+ *
+ * @type number
+ */
+ this.tapDelay = options.tapDelay || 200;
+
+ /**
+ * The maximum time for a tap
+ *
+ * @type number
+ */
+ this.tapTimeout = options.tapTimeout || 700;
+
+ if (FastClick.notNeeded(layer)) {
+ return;
+ }
+
+ // Some old versions of Android don't have Function.prototype.bind
+ function bind(method, context) {
+ return function () {
+ return method.apply(context, arguments);
+ };
+ }
+
+ var methods = ['onMouse', 'onClick', 'onTouchStart', 'onTouchMove', 'onTouchEnd', 'onTouchCancel'];
+ var context = this;
+ for (var i = 0, l = methods.length; i < l; i++) {
+ context[methods[i]] = bind(context[methods[i]], context);
+ }
+
+ // Set up event handlers as required
+ if (deviceIsAndroid) {
+ layer.addEventListener('mouseover', this.onMouse, true);
+ layer.addEventListener('mousedown', this.onMouse, true);
+ layer.addEventListener('mouseup', this.onMouse, true);
+ }
+
+ layer.addEventListener('click', this.onClick, true);
+ layer.addEventListener('touchstart', this.onTouchStart, false);
+ layer.addEventListener('touchmove', this.onTouchMove, false);
+ layer.addEventListener('touchend', this.onTouchEnd, false);
+ layer.addEventListener('touchcancel', this.onTouchCancel, false);
+
+ // Hack is required for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
+ // which is how FastClick normally stops click events bubbling to callbacks registered on the FastClick
+ // layer when they are cancelled.
+ if (!Event.prototype.stopImmediatePropagation) {
+ layer.removeEventListener = function (type, callback, capture) {
+ var rmv = Node.prototype.removeEventListener;
+ if (type === 'click') {
+ rmv.call(layer, type, callback.hijacked || callback, capture);
+ } else {
+ rmv.call(layer, type, callback, capture);
+ }
+ };
+
+ layer.addEventListener = function (type, callback, capture) {
+ var adv = Node.prototype.addEventListener;
+ if (type === 'click') {
+ adv.call(layer, type, callback.hijacked || (callback.hijacked = function (event) {
+ if (!event.propagationStopped) {
+ callback(event);
+ }
+ }), capture);
+ } else {
+ adv.call(layer, type, callback, capture);
+ }
+ };
+ }
+
+ // If a handler is already declared in the element's onclick attribute, it will be fired before
+ // FastClick's onClick handler. Fix this by pulling out the user-defined handler function and
+ // adding it as listener.
+ if (typeof layer.onclick === 'function') {
+
+ // Android browser on at least 3.2 requires a new reference to the function in layer.onclick
+ // - the old one won't work if passed to addEventListener directly.
+ oldOnClick = layer.onclick;
+ layer.addEventListener('click', function (event) {
+ oldOnClick(event);
+ }, false);
+ layer.onclick = null;
+ }
+ }
+
+ /**
+ * Windows Phone 8.1 fakes user agent string to look like Android and iPhone.
+ *
+ * @type boolean
+ */
+ var deviceIsWindowsPhone = navigator.userAgent.indexOf("Windows Phone") >= 0;
+
+ /**
+ * Android requires exceptions.
+ *
+ * @type boolean
+ */
+ var deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0 && !deviceIsWindowsPhone;
+
+ /**
+ * iOS requires exceptions.
+ *
+ * @type boolean
+ */
+ var deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent) && !deviceIsWindowsPhone;
+
+ /**
+ * iOS 4 requires an exception for select elements.
+ *
+ * @type boolean
+ */
+ var deviceIsIOS4 = deviceIsIOS && /OS 4_\d(_\d)?/.test(navigator.userAgent);
+
+ /**
+ * iOS 6.0-7.* requires the target element to be manually derived
+ *
+ * @type boolean
+ */
+ var deviceIsIOSWithBadTarget = deviceIsIOS && /OS [6-7]_\d/.test(navigator.userAgent);
+
+ /**
+ * BlackBerry requires exceptions.
+ *
+ * @type boolean
+ */
+ var deviceIsBlackBerry10 = navigator.userAgent.indexOf('BB10') > 0;
+
+ /**
+ * Determine whether a given element requires a native click.
+ *
+ * @param {EventTarget|Element} target Target DOM element
+ * @returns {boolean} Returns true if the element needs a native click
+ */
+ FastClick.prototype.needsClick = function (target) {
+ switch (target.nodeName.toLowerCase()) {
+
+ // Don't send a synthetic click to disabled inputs (issue #62)
+ case 'button':
+ case 'select':
+ case 'textarea':
+ if (target.disabled) {
+ return true;
+ }
+
+ break;
+ case 'input':
+
+ // File inputs need real clicks on iOS 6 due to a browser bug (issue #68)
+ if (deviceIsIOS && target.type === 'file' || target.disabled) {
+ return true;
+ }
+
+ break;
+ case 'label':
+ case 'iframe': // iOS8 homescreen apps can prevent events bubbling into frames
+ case 'video':
+ return true;
+ }
+
+ return (/\bneedsclick\b/.test(target.className)
+ );
+ };
+
+ /**
+ * Determine whether a given element requires a call to focus to simulate click into element.
+ *
+ * @param {EventTarget|Element} target Target DOM element
+ * @returns {boolean} Returns true if the element requires a call to focus to simulate native click.
+ */
+ FastClick.prototype.needsFocus = function (target) {
+ switch (target.nodeName.toLowerCase()) {
+ case 'textarea':
+ return true;
+ case 'select':
+ return !deviceIsAndroid;
+ case 'input':
+ switch (target.type) {
+ case 'button':
+ case 'checkbox':
+ case 'file':
+ case 'image':
+ case 'radio':
+ case 'submit':
+ return false;
+ }
+
+ // No point in attempting to focus disabled inputs
+ return !target.disabled && !target.readOnly;
+ default:
+ return (/\bneedsfocus\b/.test(target.className)
+ );
+ }
+ };
+
+ /**
+ * Send a click event to the specified element.
+ *
+ * @param {EventTarget|Element} targetElement
+ * @param {Event} event
+ */
+ FastClick.prototype.sendClick = function (targetElement, event) {
+ var clickEvent, touch;
+
+ // On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24)
+ if (document.activeElement && document.activeElement !== targetElement) {
+ document.activeElement.blur();
+ }
+
+ touch = event.changedTouches[0];
+
+ // Synthesise a click event, with an extra attribute so it can be tracked
+ clickEvent = document.createEvent('MouseEvents');
+ clickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);
+ clickEvent.forwardedTouchEvent = true;
+ targetElement.dispatchEvent(clickEvent);
+ };
+
+ FastClick.prototype.determineEventType = function (targetElement) {
+
+ //Issue #159: Android Chrome Select Box does not open with a synthetic click event
+ if (deviceIsAndroid && targetElement.tagName.toLowerCase() === 'select') {
+ return 'mousedown';
+ }
+
+ return 'click';
+ };
+
+ /**
+ * @param {EventTarget|Element} targetElement
+ */
+ FastClick.prototype.focus = function (targetElement) {
+ var length;
+
+ // Issue #160: on iOS 7, some input elements (e.g. date datetime month) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724.
+ if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') {
+ length = targetElement.value.length;
+ targetElement.setSelectionRange(length, length);
+ } else {
+ targetElement.focus();
+ }
+ };
+
+ /**
+ * Check whether the given target element is a child of a scrollable layer and if so, set a flag on it.
+ *
+ * @param {EventTarget|Element} targetElement
+ */
+ FastClick.prototype.updateScrollParent = function (targetElement) {
+ var scrollParent, parentElement;
+
+ scrollParent = targetElement.fastClickScrollParent;
+
+ // Attempt to discover whether the target element is contained within a scrollable layer. Re-check if the
+ // target element was moved to another parent.
+ if (!scrollParent || !scrollParent.contains(targetElement)) {
+ parentElement = targetElement;
+ do {
+ if (parentElement.scrollHeight > parentElement.offsetHeight) {
+ scrollParent = parentElement;
+ targetElement.fastClickScrollParent = parentElement;
+ break;
+ }
+
+ parentElement = parentElement.parentElement;
+ } while (parentElement);
+ }
+
+ // Always update the scroll top tracker if possible.
+ if (scrollParent) {
+ scrollParent.fastClickLastScrollTop = scrollParent.scrollTop;
+ }
+ };
+
+ /**
+ * @param {EventTarget} targetElement
+ * @returns {Element|EventTarget}
+ */
+ FastClick.prototype.getTargetElementFromEventTarget = function (eventTarget) {
+
+ // On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node.
+ if (eventTarget.nodeType === Node.TEXT_NODE) {
+ return eventTarget.parentNode;
+ }
+
+ return eventTarget;
+ };
+
+ /**
+ * On touch start, record the position and scroll offset.
+ *
+ * @param {Event} event
+ * @returns {boolean}
+ */
+ FastClick.prototype.onTouchStart = function (event) {
+ var targetElement, touch, selection;
+
+ // Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
+ if (event.targetTouches.length > 1) {
+ return true;
+ }
+
+ targetElement = this.getTargetElementFromEventTarget(event.target);
+ touch = event.targetTouches[0];
+
+ if (deviceIsIOS) {
+
+ // Only trusted events will deselect text on iOS (issue #49)
+ selection = window.getSelection();
+ if (selection.rangeCount && !selection.isCollapsed) {
+ return true;
+ }
+
+ if (!deviceIsIOS4) {
+
+ // Weird things happen on iOS when an alert or confirm dialog is opened from a click event callback (issue #23):
+ // when the user next taps anywhere else on the page, new touchstart and touchend events are dispatched
+ // with the same identifier as the touch event that previously triggered the click that triggered the alert.
+ // Sadly, there is an issue on iOS 4 that causes some normal touch events to have the same identifier as an
+ // immediately preceeding touch event (issue #52), so this fix is unavailable on that platform.
+ // Issue 120: touch.identifier is 0 when Chrome dev tools 'Emulate touch events' is set with an iOS device UA string,
+ // which causes all touch events to be ignored. As this block only applies to iOS, and iOS identifiers are always long,
+ // random integers, it's safe to to continue if the identifier is 0 here.
+ if (touch.identifier && touch.identifier === this.lastTouchIdentifier) {
+ event.preventDefault();
+ return false;
+ }
+
+ this.lastTouchIdentifier = touch.identifier;
+
+ // If the target element is a child of a scrollable layer (using -webkit-overflow-scrolling: touch) and:
+ // 1) the user does a fling scroll on the scrollable layer
+ // 2) the user stops the fling scroll with another tap
+ // then the event.target of the last 'touchend' event will be the element that was under the user's finger
+ // when the fling scroll was started, causing FastClick to send a click event to that layer - unless a check
+ // is made to ensure that a parent layer was not scrolled before sending a synthetic click (issue #42).
+ this.updateScrollParent(targetElement);
+ }
+ }
+
+ this.trackingClick = true;
+ this.trackingClickStart = event.timeStamp;
+ this.targetElement = targetElement;
+
+ this.touchStartX = touch.pageX;
+ this.touchStartY = touch.pageY;
+
+ // Prevent phantom clicks on fast double-tap (issue #36)
+ if (event.timeStamp - this.lastClickTime < this.tapDelay) {
+ event.preventDefault();
+ }
+
+ return true;
+ };
+
+ /**
+ * Based on a touchmove event object, check whether the touch has moved past a boundary since it started.
+ *
+ * @param {Event} event
+ * @returns {boolean}
+ */
+ FastClick.prototype.touchHasMoved = function (event) {
+ var touch = event.changedTouches[0],
+ boundary = this.touchBoundary;
+
+ if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) {
+ return true;
+ }
+
+ return false;
+ };
+
+ /**
+ * Update the last position.
+ *
+ * @param {Event} event
+ * @returns {boolean}
+ */
+ FastClick.prototype.onTouchMove = function (event) {
+ if (!this.trackingClick) {
+ return true;
+ }
+
+ // If the touch has moved, cancel the click tracking
+ if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) {
+ this.trackingClick = false;
+ this.targetElement = null;
+ }
+
+ return true;
+ };
+
+ /**
+ * Attempt to find the labelled control for the given label element.
+ *
+ * @param {EventTarget|HTMLLabelElement} labelElement
+ * @returns {Element|null}
+ */
+ FastClick.prototype.findControl = function (labelElement) {
+
+ // Fast path for newer browsers supporting the HTML5 control attribute
+ if (labelElement.control !== undefined) {
+ return labelElement.control;
+ }
+
+ // All browsers under test that support touch events also support the HTML5 htmlFor attribute
+ if (labelElement.htmlFor) {
+ return document.getElementById(labelElement.htmlFor);
+ }
+
+ // If no for attribute exists, attempt to retrieve the first labellable descendant element
+ // the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label
+ return labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea');
+ };
+
+ /**
+ * On touch end, determine whether to send a click event at once.
+ *
+ * @param {Event} event
+ * @returns {boolean}
+ */
+ FastClick.prototype.onTouchEnd = function (event) {
+ var forElement,
+ trackingClickStart,
+ targetTagName,
+ scrollParent,
+ touch,
+ targetElement = this.targetElement;
+
+ if (!this.trackingClick) {
+ return true;
+ }
+
+ // Prevent phantom clicks on fast double-tap (issue #36)
+ if (event.timeStamp - this.lastClickTime < this.tapDelay) {
+ this.cancelNextClick = true;
+ return true;
+ }
+
+ if (event.timeStamp - this.trackingClickStart > this.tapTimeout) {
+ return true;
+ }
+
+ // Reset to prevent wrong click cancel on input (issue #156).
+ this.cancelNextClick = false;
+
+ this.lastClickTime = event.timeStamp;
+
+ trackingClickStart = this.trackingClickStart;
+ this.trackingClick = false;
+ this.trackingClickStart = 0;
+
+ // On some iOS devices, the targetElement supplied with the event is invalid if the layer
+ // is performing a transition or scroll, and has to be re-detected manually. Note that
+ // for this to function correctly, it must be called *after* the event target is checked!
+ // See issue #57; also filed as rdar://13048589 .
+ if (deviceIsIOSWithBadTarget) {
+ touch = event.changedTouches[0];
+
+ // In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null
+ targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement;
+ targetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent;
+ }
+
+ targetTagName = targetElement.tagName.toLowerCase();
+ if (targetTagName === 'label') {
+ forElement = this.findControl(targetElement);
+ if (forElement) {
+ this.focus(targetElement);
+ if (deviceIsAndroid) {
+ return false;
+ }
+
+ targetElement = forElement;
+ }
+ } else if (this.needsFocus(targetElement)) {
+
+ // Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through.
+ // Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37).
+ if (event.timeStamp - trackingClickStart > 100 || deviceIsIOS && window.top !== window && targetTagName === 'input') {
+ this.targetElement = null;
+ return false;
+ }
+
+ this.focus(targetElement);
+ this.sendClick(targetElement, event);
+
+ // Select elements need the event to go through on iOS 4, otherwise the selector menu won't open.
+ // Also this breaks opening selects when VoiceOver is active on iOS6, iOS7 (and possibly others)
+ if (!deviceIsIOS || targetTagName !== 'select') {
+ this.targetElement = null;
+ event.preventDefault();
+ }
+
+ return false;
+ }
+
+ if (deviceIsIOS && !deviceIsIOS4) {
+
+ // Don't send a synthetic click event if the target element is contained within a parent layer that was scrolled
+ // and this tap is being used to stop the scrolling (usually initiated by a fling - issue #42).
+ scrollParent = targetElement.fastClickScrollParent;
+ if (scrollParent && scrollParent.fastClickLastScrollTop !== scrollParent.scrollTop) {
+ return true;
+ }
+ }
+
+ // Prevent the actual click from going though - unless the target node is marked as requiring
+ // real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted.
+ if (!this.needsClick(targetElement)) {
+ event.preventDefault();
+ this.sendClick(targetElement, event);
+ }
+
+ return false;
+ };
+
+ /**
+ * On touch cancel, stop tracking the click.
+ *
+ * @returns {void}
+ */
+ FastClick.prototype.onTouchCancel = function () {
+ this.trackingClick = false;
+ this.targetElement = null;
+ };
+
+ /**
+ * Determine mouse events which should be permitted.
+ *
+ * @param {Event} event
+ * @returns {boolean}
+ */
+ FastClick.prototype.onMouse = function (event) {
+
+ // If a target element was never set (because a touch event was never fired) allow the event
+ if (!this.targetElement) {
+ return true;
+ }
+
+ if (event.forwardedTouchEvent) {
+ return true;
+ }
+
+ // Programmatically generated events targeting a specific element should be permitted
+ if (!event.cancelable) {
+ return true;
+ }
+
+ // Derive and check the target element to see whether the mouse event needs to be permitted;
+ // unless explicitly enabled, prevent non-touch click events from triggering actions,
+ // to prevent ghost/doubleclicks.
+ if (!this.needsClick(this.targetElement) || this.cancelNextClick) {
+
+ // Prevent any user-added listeners declared on FastClick element from being fired.
+ if (event.stopImmediatePropagation) {
+ event.stopImmediatePropagation();
+ } else {
+
+ // Part of the hack for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
+ event.propagationStopped = true;
+ }
+
+ // Cancel the event
+ event.stopPropagation();
+ event.preventDefault();
+
+ return false;
+ }
+
+ // If the mouse event is permitted, return true for the action to go through.
+ return true;
+ };
+
+ /**
+ * On actual clicks, determine whether this is a touch-generated click, a click action occurring
+ * naturally after a delay after a touch (which needs to be cancelled to avoid duplication), or
+ * an actual click which should be permitted.
+ *
+ * @param {Event} event
+ * @returns {boolean}
+ */
+ FastClick.prototype.onClick = function (event) {
+ var permitted;
+
+ // It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early.
+ if (this.trackingClick) {
+ this.targetElement = null;
+ this.trackingClick = false;
+ return true;
+ }
+
+ // Very odd behaviour on iOS (issue #18): if a submit element is present inside a form and the user hits enter in the iOS simulator or clicks the Go button on the pop-up OS keyboard the a kind of 'fake' click event will be triggered with the submit-type input element as the target.
+ if (event.target.type === 'submit' && event.detail === 0) {
+ return true;
+ }
+
+ permitted = this.onMouse(event);
+
+ // Only unset targetElement if the click is not permitted. This will ensure that the check for !targetElement in onMouse fails and the browser's click doesn't go through.
+ if (!permitted) {
+ this.targetElement = null;
+ }
+
+ // If clicks are permitted, return true for the action to go through.
+ return permitted;
+ };
+
+ /**
+ * Remove all FastClick's event listeners.
+ *
+ * @returns {void}
+ */
+ FastClick.prototype.destroy = function () {
+ var layer = this.layer;
+
+ if (deviceIsAndroid) {
+ layer.removeEventListener('mouseover', this.onMouse, true);
+ layer.removeEventListener('mousedown', this.onMouse, true);
+ layer.removeEventListener('mouseup', this.onMouse, true);
+ }
+
+ layer.removeEventListener('click', this.onClick, true);
+ layer.removeEventListener('touchstart', this.onTouchStart, false);
+ layer.removeEventListener('touchmove', this.onTouchMove, false);
+ layer.removeEventListener('touchend', this.onTouchEnd, false);
+ layer.removeEventListener('touchcancel', this.onTouchCancel, false);
+ };
+
+ /**
+ * Check whether FastClick is needed.
+ *
+ * @param {Element} layer The layer to listen on
+ */
+ FastClick.notNeeded = function (layer) {
+ var metaViewport;
+ var chromeVersion;
+ var blackberryVersion;
+ var firefoxVersion;
+
+ // Devices that don't support touch don't need FastClick
+ if (typeof window.ontouchstart === 'undefined') {
+ return true;
+ }
+
+ // Chrome version - zero for other browsers
+ chromeVersion = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [, 0])[1];
+
+ if (chromeVersion) {
+
+ if (deviceIsAndroid) {
+ metaViewport = document.querySelector('meta[name=viewport]');
+
+ if (metaViewport) {
+ // Chrome on Android with user-scalable="no" doesn't need FastClick (issue #89)
+ if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
+ return true;
+ }
+ // Chrome 32 and above with width=device-width or less don't need FastClick
+ if (chromeVersion > 31 && document.documentElement.scrollWidth <= window.outerWidth) {
+ return true;
+ }
+ }
+
+ // Chrome desktop doesn't need FastClick (issue #15)
+ } else {
+ return true;
+ }
+ }
+
+ if (deviceIsBlackBerry10) {
+ blackberryVersion = navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/);
+
+ // BlackBerry 10.3+ does not require Fastclick library.
+ // https://github.com/ftlabs/fastclick/issues/251
+ if (blackberryVersion[1] >= 10 && blackberryVersion[2] >= 3) {
+ metaViewport = document.querySelector('meta[name=viewport]');
+
+ if (metaViewport) {
+ // user-scalable=no eliminates click delay.
+ if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
+ return true;
+ }
+ // width=device-width (or less than device-width) eliminates click delay.
+ if (document.documentElement.scrollWidth <= window.outerWidth) {
+ return true;
+ }
+ }
+ }
+ }
+
+ // IE10 with -ms-touch-action: none or manipulation, which disables double-tap-to-zoom (issue #97)
+ if (layer.style.msTouchAction === 'none' || layer.style.touchAction === 'manipulation') {
+ return true;
+ }
+
+ // Firefox version - zero for other browsers
+ firefoxVersion = +(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [, 0])[1];
+
+ if (firefoxVersion >= 27) {
+ // Firefox 27+ does not have tap delay if the content is not zoomable - https://bugzilla.mozilla.org/show_bug.cgi?id=922896
+
+ metaViewport = document.querySelector('meta[name=viewport]');
+ if (metaViewport && (metaViewport.content.indexOf('user-scalable=no') !== -1 || document.documentElement.scrollWidth <= window.outerWidth)) {
+ return true;
+ }
+ }
+
+ // IE11: prefixed -ms-touch-action is no longer supported and it's recomended to use non-prefixed version
+ // http://msdn.microsoft.com/en-us/library/windows/apps/Hh767313.aspx
+ if (layer.style.touchAction === 'none' || layer.style.touchAction === 'manipulation') {
+ return true;
+ }
+
+ return false;
+ };
+
+ /**
+ * Factory method for creating a FastClick object
+ *
+ * @param {Element} layer The layer to listen on
+ * @param {Object} [options={}] The options to override the defaults
+ */
+ FastClick.attach = function (layer, options) {
+ return new FastClick(layer, options);
+ };
+
+ if ("function" === 'function' && _typeof(__webpack_require__(4)) === 'object' && __webpack_require__(4)) {
+
+ // AMD. Register as an anonymous module.
+ !(__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return FastClick;
+ }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ } else if (typeof module !== 'undefined' && module.exports) {
+ module.exports = FastClick.attach;
+ module.exports.FastClick = FastClick;
+ } else {
+ window.FastClick = FastClick;
+ }
+ })();
+
+/***/ },
+/* 4 */
+/***/ function(module, exports) {
+
+ /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {module.exports = __webpack_amd_options__;
+
+ /* WEBPACK VAR INJECTION */}.call(exports, {}))
+
+/***/ },
+/* 5 */
+/***/ function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _Event = __webpack_require__(6);
+
+ var _Event2 = _interopRequireDefault(_Event);
+
+ var _Nav = __webpack_require__(9);
+
+ var _Nav2 = _interopRequireDefault(_Nav);
+
+ var _Search = __webpack_require__(12);
+
+ var _Search2 = _interopRequireDefault(_Search);
+
+ var _Sidebar = __webpack_require__(17);
+
+ var _Sidebar2 = _interopRequireDefault(_Sidebar);
+
+ var _Source = __webpack_require__(18);
+
+ var _Source2 = _interopRequireDefault(_Source);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ /* ----------------------------------------------------------------------------
+ * Module
+ * ------------------------------------------------------------------------- */
+
+ exports.default = {
+ Event: _Event2.default,
+ Nav: _Nav2.default,
+ Search: _Search2.default,
+ Sidebar: _Sidebar2.default,
+ Source: _Source2.default
+ }; /*
+ * Copyright (c) 2016 Martin Donath
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 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.
+ */
+
+ module.exports = exports["default"];
+
+/***/ },
+/* 6 */
+/***/ function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _Listener = __webpack_require__(7);
+
+ var _Listener2 = _interopRequireDefault(_Listener);
+
+ var _MatchMedia = __webpack_require__(8);
+
+ var _MatchMedia2 = _interopRequireDefault(_MatchMedia);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ /* ----------------------------------------------------------------------------
+ * Module
+ * ------------------------------------------------------------------------- */
+
+ /*
+ * Copyright (c) 2016 Martin Donath
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 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.
+ */
+
+ exports.default = {
+ Listener: _Listener2.default,
+ MatchMedia: _MatchMedia2.default
+ };
+ module.exports = exports["default"];
+
+/***/ },
+/* 7 */
+/***/ function(module, exports) {
+
+ "use strict";
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ /*
+ * Copyright (c) 2016 Martin Donath
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 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.
+ */
+
+ /* ----------------------------------------------------------------------------
+ * Class
+ * ------------------------------------------------------------------------- */
+
+ var Listener = function () {
+
+ /**
+ * Generic event listener
+ *
+ * @constructor
+ * @param {(string|NodeList)} els - Selector or HTML elements
+ * @param {Array.} events - Event names
+ * @param {(object|function)} handler - Handler to be invoked
+ */
+ function Listener(els, events, handler) {
+ var _this = this;
+
+ _classCallCheck(this, Listener);
+
+ this.els_ = typeof els === "string" ? document.querySelectorAll(els) : [].concat(els);
+
+ /* Set handler as function or directly as object */
+ this.handler_ = typeof handler === "function" ? { update: handler } : handler;
+
+ /* Initialize event names and update handler */
+ this.events_ = [].concat(events);
+ this.update_ = function (ev) {
+ return _this.handler_.update(ev);
+ };
+ }
+
+ /**
+ * Register listener for all relevant events
+ */
+
+
+ _createClass(Listener, [{
+ key: "listen",
+ value: function listen() {
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+
+ try {
+ for (var _iterator = this.els_[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var el = _step.value;
+ var _iteratorNormalCompletion2 = true;
+ var _didIteratorError2 = false;
+ var _iteratorError2 = undefined;
+
+ try {
+ for (var _iterator2 = this.events_[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+ var event = _step2.value;
+
+ el.addEventListener(event, this.update_, false);
+ }
+ } catch (err) {
+ _didIteratorError2 = true;
+ _iteratorError2 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion2 && _iterator2.return) {
+ _iterator2.return();
+ }
+ } finally {
+ if (_didIteratorError2) {
+ throw _iteratorError2;
+ }
+ }
+ }
+ } /* Execute setup handler, if implemented */
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
+
+ if (typeof this.handler_.setup === "function") this.handler_.setup();
+ }
+
+ /**
+ * Unregister listener for all relevant events
+ */
+
+ }, {
+ key: "unlisten",
+ value: function unlisten() {
+ var _iteratorNormalCompletion3 = true;
+ var _didIteratorError3 = false;
+ var _iteratorError3 = undefined;
+
+ try {
+ for (var _iterator3 = this.els_[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
+ var el = _step3.value;
+ var _iteratorNormalCompletion4 = true;
+ var _didIteratorError4 = false;
+ var _iteratorError4 = undefined;
+
+ try {
+ for (var _iterator4 = this.events_[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
+ var event = _step4.value;
+
+ el.removeEventListener(event, this.update_);
+ }
+ } catch (err) {
+ _didIteratorError4 = true;
+ _iteratorError4 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion4 && _iterator4.return) {
+ _iterator4.return();
+ }
+ } finally {
+ if (_didIteratorError4) {
+ throw _iteratorError4;
+ }
+ }
+ }
+ } /* Execute reset handler, if implemented */
+ } catch (err) {
+ _didIteratorError3 = true;
+ _iteratorError3 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion3 && _iterator3.return) {
+ _iterator3.return();
+ }
+ } finally {
+ if (_didIteratorError3) {
+ throw _iteratorError3;
+ }
+ }
+ }
+
+ if (typeof this.handler_.reset === "function") this.handler_.reset();
+ }
+ }]);
+
+ return Listener;
+ }();
+
+ exports.default = Listener;
+ module.exports = exports["default"];
+
+/***/ },
+/* 8 */
+/***/ function(module, exports) {
+
+ "use strict";
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ /*
+ * Copyright (c) 2016 Martin Donath
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 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.
+ */
+
+ /* ----------------------------------------------------------------------------
+ * Class
+ * ------------------------------------------------------------------------- */
+
+ var MatchMedia =
+
+ /**
+ * Media query listener
+ *
+ * This class listens for state changes of media queries and automatically
+ * switches the given listeners on or off.
+ *
+ * @constructor
+ * @param {string} query - Media query to test for
+ * @param {Listener} listener - Event listener
+ */
+ function MatchMedia(query, listener) {
+ _classCallCheck(this, MatchMedia);
+
+ this.handler_ = function (mq) {
+ if (mq.matches) listener.listen();else listener.unlisten();
+ };
+
+ /* Initialize media query listener */
+ var media = window.matchMedia(query);
+ media.addListener(this.handler_);
+
+ /* Always check at initialization */
+ this.handler_(media);
+ };
+
+ exports.default = MatchMedia;
+ module.exports = exports["default"];
+
+/***/ },
+/* 9 */
+/***/ function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _Blur = __webpack_require__(10);
+
+ var _Blur2 = _interopRequireDefault(_Blur);
+
+ var _Collapse = __webpack_require__(11);
+
+ var _Collapse2 = _interopRequireDefault(_Collapse);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ /* ----------------------------------------------------------------------------
+ * Module
+ * ------------------------------------------------------------------------- */
+
+ /*
+ * Copyright (c) 2016 Martin Donath
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 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.
+ */
+
+ exports.default = {
+ Blur: _Blur2.default,
+ Collapse: _Collapse2.default
+ };
+ module.exports = exports["default"];
+
+/***/ },
+/* 10 */
+/***/ function(module, exports) {
+
+ "use strict";
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ /*
+ * Copyright (c) 2016 Martin Donath
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 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.
+ */
+
+ /* ----------------------------------------------------------------------------
+ * Class
+ * ------------------------------------------------------------------------- */
+
+ var Blur = function () {
+
+ /**
+ * Blur anchors within the navigation above current page y-offset
+ *
+ * @constructor
+ * @param {(string|NodeList)} els - Selector or HTML elements
+ */
+ function Blur(els) {
+ _classCallCheck(this, Blur);
+
+ this.els_ = typeof els === "string" ? document.querySelectorAll(els) : els;
+
+ /* Initialize index and page y-offset */
+ this.index_ = 0;
+ this.offset_ = window.pageYOffset;
+
+ /* Index anchor nodes for fast lookup */
+ this.anchors_ = [].map.call(this.els_, function (el) {
+ return document.querySelector(el.hash);
+ });
+ }
+
+ /**
+ * Initialize anchor states
+ */
+
+
+ _createClass(Blur, [{
+ key: "setup",
+ value: function setup() {
+ this.update();
+ }
+
+ /**
+ * Update anchor states
+ */
+
+ }, {
+ key: "update",
+ value: function update() {
+ var offset = window.pageYOffset;
+
+ /* Scroll direction is down */
+ if (this.offset_ <= offset) {
+ for (var i = this.index_ + 1; i < this.els_.length; i++) {
+ if (this.anchors_[i].offsetTop <= offset) {
+ if (i > 0) this.els_[i - 1].dataset.mdState = "blur";
+ this.index_ = i;
+ } else {
+ break;
+ }
+ }
+
+ /* Scroll direction is up */
+ } else {
+ for (var _i = this.index_; _i >= 0; _i--) {
+ if (this.anchors_[_i].offsetTop > offset) {
+ if (_i > 0) delete this.els_[_i - 1].dataset.mdState;
+ } else {
+ this.index_ = _i;
+ break;
+ }
+ }
+ }
+
+ /* Remember current offset for next iteration */
+ this.offset_ = offset;
+ }
+
+ /**
+ * Reset anchor states
+ */
+
+ }, {
+ key: "reset",
+ value: function reset() {
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+
+ try {
+ for (var _iterator = this.els_[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var el = _step.value;
+
+ delete el.dataset.mdState;
+ } /* Reset index and page y-offset */
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
+
+ this.index_ = 0;
+ this.offset_ = window.pageYOffset;
+ }
+ }]);
+
+ return Blur;
+ }();
+
+ exports.default = Blur;
+ module.exports = exports["default"];
+
+/***/ },
+/* 11 */
+/***/ function(module, exports) {
+
+ "use strict";
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ /*
+ * Copyright (c) 2016 Martin Donath
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 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.
+ */
+
+ /* ----------------------------------------------------------------------------
+ * Class
+ * ------------------------------------------------------------------------- */
+
+ var Collapse = function () {
+
+ /**
+ * Expand or collapse navigation on toggle
+ *
+ * @constructor
+ * @param {(string|HTMLElement)} el - Selector or HTML element
+ */
+ function Collapse(el) {
+ _classCallCheck(this, Collapse);
+
+ this.el_ = typeof el === "string" ? document.querySelector(el) : el;
+ }
+
+ /**
+ * Animate expand and collapse smoothly
+ */
+
+
+ _createClass(Collapse, [{
+ key: "update",
+ value: function update() {
+ var _this = this;
+
+ var current = this.el_.getBoundingClientRect().height;
+
+ /* Expanded, so collapse */
+ if (current) {
+ this.el_.style.maxHeight = current + "px";
+ requestAnimationFrame(function () {
+ _this.el_.dataset.mdState = "animate";
+ _this.el_.style.maxHeight = "0px";
+ });
+
+ /* Collapsed, so expand */
+ } else {
+ (function () {
+ _this.el_.dataset.mdState = "expand";
+ _this.el_.style.maxHeight = "";
+
+ /* Read height and unset pseudo-toggled state */
+ var height = _this.el_.getBoundingClientRect().height;
+ delete _this.el_.dataset.mdState;
+
+ /* Set initial state and animate */
+ _this.el_.style.maxHeight = "0px";
+ requestAnimationFrame(function () {
+ _this.el_.dataset.mdState = "animate";
+ _this.el_.style.maxHeight = height + "px";
+ });
+ })();
+ }
+
+ /* Remove state on end of transition */
+ var end = function end(ev) {
+ delete ev.target.dataset.mdState;
+ ev.target.style.maxHeight = "";
+
+ /* Only fire once, so directly remove event listener */
+ ev.target.removeEventListener("transitionend", end, false);
+ };
+ this.el_.addEventListener("transitionend", end, false);
+ }
+
+ /**
+ * Reset height and pseudo-toggled state
+ */
+
+ }, {
+ key: "reset",
+ value: function reset() {
+ delete this.el_.dataset.mdState;
+ this.el_.style.maxHeight = "";
+ }
+ }]);
+
+ return Collapse;
+ }();
+
+ exports.default = Collapse;
+ module.exports = exports["default"];
+
+/***/ },
+/* 12 */
+/***/ function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _Lock = __webpack_require__(13);
+
+ var _Lock2 = _interopRequireDefault(_Lock);
+
+ var _Result = __webpack_require__(14);
+
+ var _Result2 = _interopRequireDefault(_Result);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ /* ----------------------------------------------------------------------------
+ * Module
+ * ------------------------------------------------------------------------- */
+
+ /*
+ * Copyright (c) 2016 Martin Donath
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 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.
+ */
+
+ exports.default = {
+ Lock: _Lock2.default,
+ Result: _Result2.default
+ };
+ module.exports = exports["default"];
+
+/***/ },
+/* 13 */
+/***/ function(module, exports) {
+
+ "use strict";
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ /*
+ * Copyright (c) 2016 Martin Donath
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 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.
+ */
+
+ /* ----------------------------------------------------------------------------
+ * Class
+ * ------------------------------------------------------------------------- */
+
+ var Lock = function () {
+
+ /**
+ * Lock body for full-screen search modal
+ *
+ * @constructor
+ * @param {(string|HTMLElement)} el - Selector or HTML element
+ */
+ function Lock(el) {
+ _classCallCheck(this, Lock);
+
+ this.el_ = typeof el === "string" ? document.querySelector(el) : el;
+ }
+
+ /**
+ * Setup locked state
+ */
+
+
+ _createClass(Lock, [{
+ key: "setup",
+ value: function setup() {
+ this.update();
+ }
+
+ /**
+ * Update locked state
+ */
+
+ }, {
+ key: "update",
+ value: function update() {
+ var _this = this;
+
+ /* Entering search mode */
+ if (this.el_.checked) {
+ this.offset_ = window.pageYOffset;
+
+ /* Scroll to top after transition, to omit flickering */
+ setTimeout(function () {
+ window.scrollTo(0, 0);
+
+ /* Lock body after finishing transition */
+ if (_this.el_.checked) {
+ document.body.dataset.mdState = "lock";
+ }
+ }, 400);
+
+ /* Exiting search mode */
+ } else {
+ delete document.body.dataset.mdState;
+
+ /* Scroll to former position, but wait for 100ms to prevent flashes on
+ iOS. A short timeout seems to do the trick */
+ setTimeout(function () {
+ if (typeof _this.offset_ !== "undefined") window.scrollTo(0, _this.offset_);
+ }, 100);
+ }
+ }
+
+ /**
+ * Reset locked state and page y-offset
+ */
+
+ }, {
+ key: "reset",
+ value: function reset() {
+ if (document.body.dataset.mdState) window.scrollTo(0, this.offset_);
+ delete document.body.dataset.mdState;
+ }
+ }]);
+
+ return Lock;
+ }();
+
+ exports.default = Lock;
+ module.exports = exports["default"];
+
+/***/ },
+/* 14 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(JSX) {"use strict";
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*
+ * Copyright (c) 2016 Martin Donath
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 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.
+ */
+
+ var _lunr = __webpack_require__(16);
+
+ var _lunr2 = _interopRequireDefault(_lunr);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ /* ----------------------------------------------------------------------------
+ * Class
+ * ------------------------------------------------------------------------- */
+
+ var Result = function () {
+
+ /**
+ * Perform search and update results on keyboard events
+ *
+ * @constructor
+ * @param {(string|HTMLElement)} el - Selector or HTML element
+ * @param {(Array.