mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
1 line
170 KiB
Plaintext
1 line
170 KiB
Plaintext
{"version":3,"sources":["webpack:///webpack/bootstrap 97ae729e1a23bf686599","webpack:///./src/assets/javascripts/application.js","webpack:///./~/fastclick/lib/fastclick.js","webpack:///(webpack)/buildin/amd-options.js","webpack:///./~/lunr/lunr.js","webpack:///./src/assets/javascripts/components/Material.js","webpack:///./src/assets/javascripts/components/Material/Sidebar.js","webpack:///./src/assets/javascripts/components/Material/Sidebar/Marker.js","webpack:///./src/assets/javascripts/components/Material/Sidebar/Abstract.js","webpack:///./src/assets/javascripts/components/Material/Sidebar/Position.js"],"names":["Application","material","initialize","document","addEventListener","Modernizr","addTest","navigator","userAgent","match","standalone","attach","body","query","getElementById","querySelector","dataset","mdLocked","offset","toggle","list","lock","matchMedia","matches","setTimeout","window","scrollTo","scrollY","focus","toggleSearchClose","setAttribute","toggles","querySelectorAll","forEach","call","nav","togglex","nextElementSibling","style","maxHeight","getBoundingClientRect","height","first","requestAnimationFrame","classList","add","last","remove","ev","target","fetch","then","response","json","stars","data","stargazers_count","forks","forks_count","lists","li","createElement","className","innerText","appendChild","lix","catch","index","field","boost","ref","articles","docs","article","text","replace","string","g1","location","baseUrl","queryx","container","firstChild","removeChild","results","search","value","result","link","href","title","innerHTML","truncate","n","i","length","substring","meta","FastClick","layer","options","oldOnClick","trackingClick","trackingClickStart","targetElement","touchStartX","touchStartY","lastTouchIdentifier","touchBoundary","tapDelay","tapTimeout","notNeeded","bind","method","context","apply","arguments","methods","l","deviceIsAndroid","onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel","Event","prototype","stopImmediatePropagation","removeEventListener","type","callback","capture","rmv","Node","hijacked","adv","event","propagationStopped","onclick","deviceIsWindowsPhone","indexOf","deviceIsIOS","test","deviceIsIOS4","deviceIsIOSWithBadTarget","deviceIsBlackBerry10","needsClick","nodeName","toLowerCase","disabled","needsFocus","readOnly","sendClick","clickEvent","touch","activeElement","blur","changedTouches","createEvent","initMouseEvent","determineEventType","screenX","screenY","clientX","clientY","forwardedTouchEvent","dispatchEvent","tagName","setSelectionRange","updateScrollParent","scrollParent","parentElement","fastClickScrollParent","contains","scrollHeight","offsetHeight","fastClickLastScrollTop","scrollTop","getTargetElementFromEventTarget","eventTarget","nodeType","TEXT_NODE","parentNode","selection","targetTouches","getSelection","rangeCount","isCollapsed","identifier","preventDefault","timeStamp","pageX","pageY","lastClickTime","touchHasMoved","boundary","Math","abs","findControl","labelElement","control","undefined","htmlFor","forElement","targetTagName","cancelNextClick","elementFromPoint","pageXOffset","pageYOffset","top","cancelable","stopPropagation","permitted","detail","destroy","metaViewport","chromeVersion","blackberryVersion","firefoxVersion","ontouchstart","exec","content","documentElement","scrollWidth","outerWidth","msTouchAction","touchAction","define","module","exports","lunr","config","idx","Index","pipeline","trimmer","stopWordFilter","stemmer","version","utils","warn","global","message","console","asString","obj","toString","EventEmitter","events","addListener","args","Array","slice","fn","pop","names","TypeError","name","hasHandler","push","removeListener","fnIndex","splice","emit","tokenizer","isArray","map","t","trim","split","seperator","load","label","registeredFunctions","Error","registerFunction","Pipeline","_stack","warnIfFunctionNotRegistered","isRegistered","serialised","fnName","fns","after","existingFn","newFn","pos","before","run","tokens","out","tokenLength","stackLength","token","j","reset","toJSON","Vector","_magnitude","val","next","insert","prev","magnitude","node","sumOfSquares","sqrt","dot","otherVector","otherNode","dotProduct","similarity","SortedSet","elements","serialisedData","set","element","locationFor","toArray","ctx","elem","start","end","sectionLength","pivot","floor","pivotElem","intersect","otherSet","intersectSet","a_len","b_len","a","b","clone","union","longSet","shortSet","unionSet","shortSetElements","_fields","_ref","documentStore","Store","tokenStore","TokenStore","corpusTokens","eventEmitter","tokenizerFn","_idfCache","on","off","fields","fieldName","opts","refName","doc","emitEvent","docTokens","allDocumentTokens","docRef","fieldTokens","tf","fieldLength","tokenCount","k","has","get","update","idf","term","cacheKey","Object","hasOwnProperty","documentFrequency","count","log","queryTokens","queryVector","documentSets","fieldBoosts","reduce","memo","f","hasSomeToken","some","self","expand","key","similarityBoost","diff","max","matchingDocuments","refs","keys","refsLen","documentSet","score","documentVector","sort","documentRef","documentTokens","documentTokensLength","use","plugin","unshift","store","id","step2list","step3list","c","v","C","V","mgr0","meq1","mgr1","s_v","re_mgr0","RegExp","re_mgr1","re_meq1","re_s_v","re_1a","re2_1a","re_1b","re2_1b","re_1b_2","re2_1b_2","re3_1b_2","re4_1b_2","re_1c","re_2","re_3","re_4","re2_4","re_5","re_5_1","re3_5","porterStemmer","w","stem","suffix","firstch","re","re2","re3","re4","substr","toUpperCase","fp","generateStopWordFilter","stopWords","words","stopWord","root","charAt","rest","getNode","concat","factory","Material","width","sidebar","Position","handler","listen","unlisten","toc","marker","Marker","els","els_","index_","offset_","anchors_","el","hash","offsetTop","mdMarked","Abstract","handler_","el_","inner","outer","bounds_","bottom","height_","scroll","innerHeight"],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;sjBCtCA;;;;;;;;;;;;;;;;;;;;;;AAsBA;;;;AAOA;;AAHA;;;;AACA;;;;AAIA;;;;;;;;AAEA;;AAEA;;;;KAIMA,W;;;;;;;;;AAEJ;;;kCAGa;AACX,WAAMC,WAAW,wBAAjB;AACAA,gBAASC,UAAT;AACD;;;;;;mBAGYF,W;;AAEf;AACA;;AAEA;;AACAG,UAASC,gBAAT,CAA0B,kBAA1B,EAA8C,YAAM;;AAElD;AACAC,aAAUC,OAAV,CAAkB,KAAlB,EAAyB,YAAM;AAC7B,YAAO,CAAC,CAACC,UAAUC,SAAV,CAAoBC,KAApB,CAA0B,qBAA1B,CAAT;AACD,IAFD;;AAIA;AACAJ,aAAUC,OAAV,CAAkB,YAAlB,EAAgC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Q,eAAQH,MAAML,SAAN,GAAkBK,MAAMpT;AAFnB,MAAf;;AAKA;AACA,WAAKwT,OAAL,GAAe,CAAf;AApBc;AAqBf;;AAED;;;;;;;;;8BAKS;AACP,WAAMC,SAAShd,OAAOwL,WAAtB;AACA,WAAMmL,SAAS3W,OAAOid,WAAtB;;AAEA;AACA,WAAMxd,SAAS,KAAKod,OAAL,CAAapR,GAAb,GAAmBuR,MAAlC;AACA,WAAMhc,SAAS2V,SACA/L,KAAKmM,GAAL,CAAS,CAAT,EAAYiG,SAASrG,MAAT,GAAkB,KAAKkG,OAAL,CAAaC,MAA3C,CADA,GAEAlS,KAAKmM,GAAL,CAAStX,MAAT,EAAiB,KAAKyc,OAAtB,CAFf;;AAIA;AACA,WAAIlb,WAAW,KAAK+b,OAApB,EACE,KAAKL,GAAL,CAAS7b,KAAT,CAAeG,MAAf,IAA2B,KAAK+b,OAAL,GAAe/b,MAA1C;;AAEF;AACA,WAAIvB,SAAS,KAAKyc,OAAlB,EAA2B;AACzB,aAAI,CAAC,KAAKQ,GAAL,CAASnd,OAAT,CAAiBC,QAAtB,EACE,KAAKkd,GAAL,CAASnd,OAAT,CAAiBC,QAAjB,GAA4B,EAA5B;;AAEJ;AACC,QALD,MAKO,IAAI,OAAO,KAAKkd,GAAL,CAASnd,OAAT,CAAiBC,QAAxB,KAAqC,QAAzC,EAAmD;AACxD,gBAAO,KAAKkd,GAAL,CAASnd,OAAT,CAAiBC,QAAxB;AACD;AACF;;AAED;;;;;;6BAGQ;AACN,cAAO,KAAKkd,GAAL,CAASnd,OAAT,CAAiBC,QAAxB;AACA,YAAKkd,GAAL,CAAS7b,KAAT,CAAeG,MAAf,GAAwB,EAAxB;AACA,YAAK+b,OAAL,GAAe,CAAf;AACD;;;;;;mBApEkBvB,Q","file":"application.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 97ae729e1a23bf686599\n **/","/*\n * Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\n/* ----------------------------------------------------------------------------\n * Imports\n * ------------------------------------------------------------------------- */\n\nimport FastClick from \"fastclick\"\nimport lunr from \"lunr\"\n\n// import Expander from \"./components/expander\"\n\nimport Material from \"./components/Material\"\n\n// import Search from './components/search';\n\n/* ----------------------------------------------------------------------------\n * Application\n * ------------------------------------------------------------------------- */\n\nclass Application {\n\n /**\n * @return {void}\n */\n initialize() {\n const material = new Material()\n material.initialize()\n }\n}\n\nexport default Application\n\n// TODO: wrap in function call\n// application module export\n\n/* Initialize application upon DOM ready */\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n\n /* Test for iOS */\n Modernizr.addTest(\"ios\", () => {\n return !!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)\n })\n\n /* Test for web application context */\n Modernizr.addTest(\"standalone\", () => {\n return !!navigator.standalone\n })\n\n /* Attack FastClick to mitigate 300ms delay on touch devices */\n FastClick.attach(document.body)\n\n const query = document.getElementById(\"query\")\n query.addEventListener(\"focus\", () => {\n document.querySelector(\".md-search\").dataset.mdLocked = \"\"\n })\n\n /* Intercept click on search mode toggle */\n let offset = 0\n const toggle = document.getElementById(\"search\")\n toggle.addEventListener(\"click\", ev => { // TODO: click may be the wrong event...\n const list = document.body // classList md bla\n const lock = !matchMedia(\"only screen and (min-width: 960px)\").matches\n\n /* Exiting search mode */\n if (list.dataset.mdLocked) {\n delete list.dataset.mdLocked\n\n /* Scroll to former position, but wait for 100ms to prevent flashes\n on iOS. A short timeout seems to do the trick */\n if (lock)\n setTimeout(() => {\n window.scrollTo(0, offset)\n }, 100)\n\n /* Entering search mode */\n } else {\n offset = window.scrollY\n\n /* First timeout: scroll to top after transition, to omit flickering */\n if (lock)\n setTimeout(() => {\n window.scrollTo(0, 0)\n }, 400)\n\n /* Second timeout: Lock body after finishing transition and scrolling to\n top and focus input field. Sadly, the focus event is not dispatched\n on iOS Safari and there's nothing we can do about it. */\n setTimeout(() => {\n\n /* This additional check is necessary to handle fast subsequent clicks\n on the toggle and the timeout to lock the body must be cancelled */\n // if (ev.target.checked) {\n if (lock)\n list.dataset.mdLocked = \"\"\n setTimeout(() => {\n document.getElementById(\"query\").focus()\n }, 200)\n // }\n }, 450)\n }\n })\n\n // TODO: only do this on MOBILE and TABLET\n const toggleSearchClose = document.querySelector(\".md-search__icon\")\n toggleSearchClose.setAttribute(\"for\", \"search\") // override query with search, when on mobile!!!\n // toggleSearchClose.addEventListener(\"click\", ev => {\n // ev.preventDefault()\n // // ev.target\n //\n // const search = document.getElementById(\"search\")\n // search.checked = false\n // })\n\n // var toc = new Sidebar('.md-sidebar--secondary');\n // toc.listen();\n\n const toggles =\n document.querySelectorAll(\".md-nav__item--nested > .md-nav__link\");\n [].forEach.call(toggles, togglex => {\n const nav = togglex.nextElementSibling\n\n // 1.\n\n nav.style.maxHeight = `${nav.getBoundingClientRect().height}px`\n\n togglex.addEventListener(\"click\", () => {\n const first = nav.getBoundingClientRect().height\n if (first) {\n // console.log('closing');\n nav.style.maxHeight = `${first}px` // reset!\n requestAnimationFrame(() => {\n\n nav.classList.add(\"md-nav--transitioning\")\n nav.style.maxHeight = \"0px\"\n })\n } else {\n // console.log('opening');\n\n /* Toggle and read height */\n nav.style.maxHeight = \"\"\n\n nav.classList.add(\"md-nav--toggled\")\n const last = nav.getBoundingClientRect().height\n nav.classList.remove(\"md-nav--toggled\")\n\n // Initial state\n nav.style.maxHeight = \"0px\"\n\n /* Enable animations */\n requestAnimationFrame(() => {\n nav.classList.add(\"md-nav--transitioning\")\n nav.style.maxHeight = `${last}px`\n })\n }\n\n })\n\n // Capture the end with transitionend\n nav.addEventListener(\"transitionend\", ev => {\n ev.target.classList.remove(\"md-nav--transitioning\")\n if (ev.target.getBoundingClientRect().height > 0) {\n ev.target.style.maxHeight = \"100%\"\n }\n })\n })\n\n// setTimeout(function() {\n fetch(\"https://api.github.com/repos/squidfunk/mkdocs-material\")\n .then(response => {\n return response.json()\n })\n .then(data => {\n // console.log(data)\n const stars = data.stargazers_count\n const forks = data.forks_count\n // store in session!!!\n const lists = document.querySelectorAll(\".md-source__facts\"); // TODO 2x list in drawer and header\n [].forEach.call(lists, list => {\n\n let li = document.createElement(\"li\")\n li.className = \"md-source__fact md-source__fact--hidden\"\n li.innerText = `${stars} Stars`\n list.appendChild(li)\n\n setTimeout(lix => {\n lix.classList.remove(\"md-source__fact--hidden\")\n }, 100, li)\n\n li = document.createElement(\"li\")\n li.className = \"md-source__fact md-source__fact--hidden\"\n li.innerText = `${forks} Forks`\n list.appendChild(li)\n\n setTimeout(lix => {\n lix.classList.remove(\"md-source__fact--hidden\")\n }, 500, li)\n })\n\n // setTimeout(function() {\n // li.classList.remove('md-source__fact--hidden');\n // }, 100);\n\n })\n .catch(() => {\n // console.log(\"parsing failed\", ex)\n\n })\n\n // setTimeout(function() {\n fetch(\"/mkdocs/search_index.json\") // TODO: prepend BASE URL!!!\n .then(response => {\n return response.json()\n })\n .then(data => {\n // console.log(data)\n\n /* Create index */\n const index = lunr(function() {\n /* eslint-disable no-invalid-this, lines-around-comment */\n this.field(\"title\", { boost: 10 })\n this.field(\"text\")\n this.ref(\"location\")\n /* eslint-enable no-invalid-this, lines-around-comment */\n })\n\n /* Index articles */\n const articles = {}\n data.docs.forEach(article => {\n\n // TODO: match for two whitespaces, then replace unnecessary whitespace after string\n article.text = article.text.replace(/\\s(\\.,\\:)\\s/gi, (string, g1) => {\n return `${g1} `\n })\n // TODO: window.baseUrl sucks...\n article.location = window.baseUrl + article.location\n articles[article.location] = article\n index.add(article)\n })\n\n /* Register keyhandler to execute search on key up */\n const queryx = document.getElementById(\"query\")\n queryx.addEventListener(\"keyup\", () => {\n const container = document.querySelector(\".md-search-result__list\")\n while (container.firstChild)\n container.removeChild(container.firstChild)\n\n // /* Abort, if the query is empty */\n // var bar = document.querySelector('.bar.search');\n // if (!query.value.length) {\n // while (meta.firstChild)\n // meta.removeChild(meta.firstChild);\n //\n // /* Restore state */\n // bar.classList.remove('non-empty');\n // return;\n // }\n\n /* Show reset button */\n // bar.classList.add('non-empty');\n\n /* Execute search */\n const results = index.search(query.value)\n results.forEach(result => {\n const article = articles[result.ref]\n\n /* Create a link referring to the article */\n const link = document.createElement(\"a\")\n link.classList.add(\"md-search-result__link\")\n link.href = article.location\n\n // /* Create article container */\n const li = document.createElement(\"li\")\n li.classList.add(\"md-search-result__item\")\n li.appendChild(link)\n\n /* Create title element */\n const title = document.createElement(\"div\")\n title.classList.add(\"md-search-result__title\")\n\n // article.title.split(//)\n\n title.innerHTML = article.title\n link.appendChild(title)\n\n /* Truncate a string after the given number of characters */\n const truncate = function(string, n) {\n let i = n\n if (string.length > i) {\n while (string[i] !== \" \" && --i > 0);\n return `${string.substring(0, i)}…`\n }\n return string\n }\n\n /* Create text element */\n const text = document.createElement(\"p\")\n text.classList.add(\"md-search-result__description\")\n text.innerHTML = truncate(article.text) // .truncate(140);\n text.innerHTML = truncate(article.text, 140) // .truncate(140);\n link.appendChild(text)\n\n container.appendChild(li)\n })\n\n /* Show number of search results */\n // var number = document.createElement('strong');\n\n const meta = document.querySelector(\".md-search-result__meta\")\n meta.innerHTML = `${results.length} search result${\n results.length !== 1\n ? \"s\"\n : \"\"}`\n\n /* Update number */\n // while (meta.firstChild)\n // meta.removeChild(meta.firstChild);\n // meta.appendChild(number);\n })\n\n // setTimeout(function() {\n // li.classList.remove('md-source__fact--hidden');\n // }, 100);\n\n })\n .catch(() => {\n // console.log(\"parsing failed\", ex)\n })\n// }, 1000);\n\n fetch(\n \"https://api.github.com/repos/squidfunk/mkdocs-material/releases/latest\")\n .then(response => {\n return response.json()\n })\n // .then(data => {\n // // console.log(data)\n // })\n\n})\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/assets/javascripts/application.js\n **/",";(function () {\n\t'use strict';\n\n\t/**\n\t * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.\n\t *\n\t * @codingstandard ftlabs-jsv2\n\t * @copyright The Financial Times Limited [All Rights Reserved]\n\t * @license MIT License (see LICENSE.txt)\n\t */\n\n\t/*jslint browser:true, node:true*/\n\t/*global define, Event, Node*/\n\n\n\t/**\n\t * Instantiate fast-clicking listeners on the specified layer.\n\t *\n\t * @constructor\n\t * @param {Element} layer The layer to listen on\n\t * @param {Object} [options={}] The options to override the defaults\n\t */\n\tfunction FastClick(layer, options) {\n\t\tvar oldOnClick;\n\n\t\toptions = options || {};\n\n\t\t/**\n\t\t * Whether a click is currently being tracked.\n\t\t *\n\t\t * @type boolean\n\t\t */\n\t\tthis.trackingClick = false;\n\n\n\t\t/**\n\t\t * Timestamp for when click tracking started.\n\t\t *\n\t\t * @type number\n\t\t */\n\t\tthis.trackingClickStart = 0;\n\n\n\t\t/**\n\t\t * The element being tracked for a click.\n\t\t *\n\t\t * @type EventTarget\n\t\t */\n\t\tthis.targetElement = null;\n\n\n\t\t/**\n\t\t * X-coordinate of touch start event.\n\t\t *\n\t\t * @type number\n\t\t */\n\t\tthis.touchStartX = 0;\n\n\n\t\t/**\n\t\t * Y-coordinate of touch start event.\n\t\t *\n\t\t * @type number\n\t\t */\n\t\tthis.touchStartY = 0;\n\n\n\t\t/**\n\t\t * ID of the last touch, retrieved from Touch.identifier.\n\t\t *\n\t\t * @type number\n\t\t */\n\t\tthis.lastTouchIdentifier = 0;\n\n\n\t\t/**\n\t\t * Touchmove boundary, beyond which a click will be cancelled.\n\t\t *\n\t\t * @type number\n\t\t */\n\t\tthis.touchBoundary = options.touchBoundary || 10;\n\n\n\t\t/**\n\t\t * The FastClick layer.\n\t\t *\n\t\t * @type Element\n\t\t */\n\t\tthis.layer = layer;\n\n\t\t/**\n\t\t * The minimum time between tap(touchstart and touchend) events\n\t\t *\n\t\t * @type number\n\t\t */\n\t\tthis.tapDelay = options.tapDelay || 200;\n\n\t\t/**\n\t\t * The maximum time for a tap\n\t\t *\n\t\t * @type number\n\t\t */\n\t\tthis.tapTimeout = options.tapTimeout || 700;\n\n\t\tif (FastClick.notNeeded(layer)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Some old versions of Android don't have Function.prototype.bind\n\t\tfunction bind(method, context) {\n\t\t\treturn function() { return method.apply(context, arguments); };\n\t\t}\n\n\n\t\tvar methods = ['onMouse', 'onClick', 'onTouchStart', 'onTouchMove', 'onTouchEnd', 'onTouchCancel'];\n\t\tvar context = this;\n\t\tfor (var i = 0, l = methods.length; i < l; i++) {\n\t\t\tcontext[methods[i]] = bind(context[methods[i]], context);\n\t\t}\n\n\t\t// Set up event handlers as required\n\t\tif (deviceIsAndroid) {\n\t\t\tlayer.addEventListener('mouseover', this.onMouse, true);\n\t\t\tlayer.addEventListener('mousedown', this.onMouse, true);\n\t\t\tlayer.addEventListener('mouseup', this.onMouse, true);\n\t\t}\n\n\t\tlayer.addEventListener('click', this.onClick, true);\n\t\tlayer.addEventListener('touchstart', this.onTouchStart, false);\n\t\tlayer.addEventListener('touchmove', this.onTouchMove, false);\n\t\tlayer.addEventListener('touchend', this.onTouchEnd, false);\n\t\tlayer.addEventListener('touchcancel', this.onTouchCancel, false);\n\n\t\t// Hack is required for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)\n\t\t// which is how FastClick normally stops click events bubbling to callbacks registered on the FastClick\n\t\t// layer when they are cancelled.\n\t\tif (!Event.prototype.stopImmediatePropagation) {\n\t\t\tlayer.removeEventListener = function(type, callback, capture) {\n\t\t\t\tvar rmv = Node.prototype.removeEventListener;\n\t\t\t\tif (type === 'click') {\n\t\t\t\t\trmv.call(layer, type, callback.hijacked || callback, capture);\n\t\t\t\t} else {\n\t\t\t\t\trmv.call(layer, type, callback, capture);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tlayer.addEventListener = function(type, callback, capture) {\n\t\t\t\tvar adv = Node.prototype.addEventListener;\n\t\t\t\tif (type === 'click') {\n\t\t\t\t\tadv.call(layer, type, callback.hijacked || (callback.hijacked = function(event) {\n\t\t\t\t\t\tif (!event.propagationStopped) {\n\t\t\t\t\t\t\tcallback(event);\n\t\t\t\t\t\t}\n\t\t\t\t\t}), capture);\n\t\t\t\t} else {\n\t\t\t\t\tadv.call(layer, type, callback, capture);\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\t// If a handler is already declared in the element's onclick attribute, it will be fired before\n\t\t// FastClick's onClick handler. Fix this by pulling out the user-defined handler function and\n\t\t// adding it as listener.\n\t\tif (typeof layer.onclick === 'function') {\n\n\t\t\t// Android browser on at least 3.2 requires a new reference to the function in layer.onclick\n\t\t\t// - the old one won't work if passed to addEventListener directly.\n\t\t\toldOnClick = layer.onclick;\n\t\t\tlayer.addEventListener('click', function(event) {\n\t\t\t\toldOnClick(event);\n\t\t\t}, false);\n\t\t\tlayer.onclick = null;\n\t\t}\n\t}\n\n\t/**\n\t* Windows Phone 8.1 fakes user agent string to look like Android and iPhone.\n\t*\n\t* @type boolean\n\t*/\n\tvar deviceIsWindowsPhone = navigator.userAgent.indexOf(\"Windows Phone\") >= 0;\n\n\t/**\n\t * Android requires exceptions.\n\t *\n\t * @type boolean\n\t */\n\tvar deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0 && !deviceIsWindowsPhone;\n\n\n\t/**\n\t * iOS requires exceptions.\n\t *\n\t * @type boolean\n\t */\n\tvar deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent) && !deviceIsWindowsPhone;\n\n\n\t/**\n\t * iOS 4 requires an exception for select elements.\n\t *\n\t * @type boolean\n\t */\n\tvar deviceIsIOS4 = deviceIsIOS && (/OS 4_\\d(_\\d)?/).test(navigator.userAgent);\n\n\n\t/**\n\t * iOS 6.0-7.* requires the target element to be manually derived\n\t *\n\t * @type boolean\n\t */\n\tvar deviceIsIOSWithBadTarget = deviceIsIOS && (/OS [6-7]_\\d/).test(navigator.userAgent);\n\n\t/**\n\t * BlackBerry requires exceptions.\n\t *\n\t * @type boolean\n\t */\n\tvar deviceIsBlackBerry10 = navigator.userAgent.indexOf('BB10') > 0;\n\n\t/**\n\t * Determine whether a given element requires a native click.\n\t *\n\t * @param {EventTarget|Element} target Target DOM element\n\t * @returns {boolean} Returns true if the element needs a native click\n\t */\n\tFastClick.prototype.needsClick = function(target) {\n\t\tswitch (target.nodeName.toLowerCase()) {\n\n\t\t// Don't send a synthetic click to disabled inputs (issue #62)\n\t\tcase 'button':\n\t\tcase 'select':\n\t\tcase 'textarea':\n\t\t\tif (target.disabled) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tbreak;\n\t\tcase 'input':\n\n\t\t\t// File inputs need real clicks on iOS 6 due to a browser bug (issue #68)\n\t\t\tif ((deviceIsIOS && target.type === 'file') || target.disabled) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tbreak;\n\t\tcase 'label':\n\t\tcase 'iframe': // iOS8 homescreen apps can prevent events bubbling into frames\n\t\tcase 'video':\n\t\t\treturn true;\n\t\t}\n\n\t\treturn (/\\bneedsclick\\b/).test(target.className);\n\t};\n\n\n\t/**\n\t * Determine whether a given element requires a call to focus to simulate click into element.\n\t *\n\t * @param {EventTarget|Element} target Target DOM element\n\t * @returns {boolean} Returns true if the element requires a call to focus to simulate native click.\n\t */\n\tFastClick.prototype.needsFocus = function(target) {\n\t\tswitch (target.nodeName.toLowerCase()) {\n\t\tcase 'textarea':\n\t\t\treturn true;\n\t\tcase 'select':\n\t\t\treturn !deviceIsAndroid;\n\t\tcase 'input':\n\t\t\tswitch (target.type) {\n\t\t\tcase 'button':\n\t\t\tcase 'checkbox':\n\t\t\tcase 'file':\n\t\t\tcase 'image':\n\t\t\tcase 'radio':\n\t\t\tcase 'submit':\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// No point in attempting to focus disabled inputs\n\t\t\treturn !target.disabled && !target.readOnly;\n\t\tdefault:\n\t\t\treturn (/\\bneedsfocus\\b/).test(target.className);\n\t\t}\n\t};\n\n\n\t/**\n\t * Send a click event to the specified element.\n\t *\n\t * @param {EventTarget|Element} targetElement\n\t * @param {Event} event\n\t */\n\tFastClick.prototype.sendClick = function(targetElement, event) {\n\t\tvar clickEvent, touch;\n\n\t\t// On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24)\n\t\tif (document.activeElement && document.activeElement !== targetElement) {\n\t\t\tdocument.activeElement.blur();\n\t\t}\n\n\t\ttouch = event.changedTouches[0];\n\n\t\t// Synthesise a click event, with an extra attribute so it can be tracked\n\t\tclickEvent = document.createEvent('MouseEvents');\n\t\tclickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);\n\t\tclickEvent.forwardedTouchEvent = true;\n\t\ttargetElement.dispatchEvent(clickEvent);\n\t};\n\n\tFastClick.prototype.determineEventType = function(targetElement) {\n\n\t\t//Issue #159: Android Chrome Select Box does not open with a synthetic click event\n\t\tif (deviceIsAndroid && targetElement.tagName.toLowerCase() === 'select') {\n\t\t\treturn 'mousedown';\n\t\t}\n\n\t\treturn 'click';\n\t};\n\n\n\t/**\n\t * @param {EventTarget|Element} targetElement\n\t */\n\tFastClick.prototype.focus = function(targetElement) {\n\t\tvar length;\n\n\t\t// 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.\n\t\tif (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') {\n\t\t\tlength = targetElement.value.length;\n\t\t\ttargetElement.setSelectionRange(length, length);\n\t\t} else {\n\t\t\ttargetElement.focus();\n\t\t}\n\t};\n\n\n\t/**\n\t * Check whether the given target element is a child of a scrollable layer and if so, set a flag on it.\n\t *\n\t * @param {EventTarget|Element} targetElement\n\t */\n\tFastClick.prototype.updateScrollParent = function(targetElement) {\n\t\tvar scrollParent, parentElement;\n\n\t\tscrollParent = targetElement.fastClickScrollParent;\n\n\t\t// Attempt to discover whether the target element is contained within a scrollable layer. Re-check if the\n\t\t// target element was moved to another parent.\n\t\tif (!scrollParent || !scrollParent.contains(targetElement)) {\n\t\t\tparentElement = targetElement;\n\t\t\tdo {\n\t\t\t\tif (parentElement.scrollHeight > parentElement.offsetHeight) {\n\t\t\t\t\tscrollParent = parentElement;\n\t\t\t\t\ttargetElement.fastClickScrollParent = parentElement;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tparentElement = parentElement.parentElement;\n\t\t\t} while (parentElement);\n\t\t}\n\n\t\t// Always update the scroll top tracker if possible.\n\t\tif (scrollParent) {\n\t\t\tscrollParent.fastClickLastScrollTop = scrollParent.scrollTop;\n\t\t}\n\t};\n\n\n\t/**\n\t * @param {EventTarget} targetElement\n\t * @returns {Element|EventTarget}\n\t */\n\tFastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) {\n\n\t\t// On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node.\n\t\tif (eventTarget.nodeType === Node.TEXT_NODE) {\n\t\t\treturn eventTarget.parentNode;\n\t\t}\n\n\t\treturn eventTarget;\n\t};\n\n\n\t/**\n\t * On touch start, record the position and scroll offset.\n\t *\n\t * @param {Event} event\n\t * @returns {boolean}\n\t */\n\tFastClick.prototype.onTouchStart = function(event) {\n\t\tvar targetElement, touch, selection;\n\n\t\t// Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).\n\t\tif (event.targetTouches.length > 1) {\n\t\t\treturn true;\n\t\t}\n\n\t\ttargetElement = this.getTargetElementFromEventTarget(event.target);\n\t\ttouch = event.targetTouches[0];\n\n\t\tif (deviceIsIOS) {\n\n\t\t\t// Only trusted events will deselect text on iOS (issue #49)\n\t\t\tselection = window.getSelection();\n\t\t\tif (selection.rangeCount && !selection.isCollapsed) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (!deviceIsIOS4) {\n\n\t\t\t\t// Weird things happen on iOS when an alert or confirm dialog is opened from a click event callback (issue #23):\n\t\t\t\t// when the user next taps anywhere else on the page, new touchstart and touchend events are dispatched\n\t\t\t\t// with the same identifier as the touch event that previously triggered the click that triggered the alert.\n\t\t\t\t// Sadly, there is an issue on iOS 4 that causes some normal touch events to have the same identifier as an\n\t\t\t\t// immediately preceeding touch event (issue #52), so this fix is unavailable on that platform.\n\t\t\t\t// Issue 120: touch.identifier is 0 when Chrome dev tools 'Emulate touch events' is set with an iOS device UA string,\n\t\t\t\t// which causes all touch events to be ignored. As this block only applies to iOS, and iOS identifiers are always long,\n\t\t\t\t// random integers, it's safe to to continue if the identifier is 0 here.\n\t\t\t\tif (touch.identifier && touch.identifier === this.lastTouchIdentifier) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tthis.lastTouchIdentifier = touch.identifier;\n\n\t\t\t\t// If the target element is a child of a scrollable layer (using -webkit-overflow-scrolling: touch) and:\n\t\t\t\t// 1) the user does a fling scroll on the scrollable layer\n\t\t\t\t// 2) the user stops the fling scroll with another tap\n\t\t\t\t// then the event.target of the last 'touchend' event will be the element that was under the user's finger\n\t\t\t\t// when the fling scroll was started, causing FastClick to send a click event to that layer - unless a check\n\t\t\t\t// is made to ensure that a parent layer was not scrolled before sending a synthetic click (issue #42).\n\t\t\t\tthis.updateScrollParent(targetElement);\n\t\t\t}\n\t\t}\n\n\t\tthis.trackingClick = true;\n\t\tthis.trackingClickStart = event.timeStamp;\n\t\tthis.targetElement = targetElement;\n\n\t\tthis.touchStartX = touch.pageX;\n\t\tthis.touchStartY = touch.pageY;\n\n\t\t// Prevent phantom clicks on fast double-tap (issue #36)\n\t\tif ((event.timeStamp - this.lastClickTime) < this.tapDelay) {\n\t\t\tevent.preventDefault();\n\t\t}\n\n\t\treturn true;\n\t};\n\n\n\t/**\n\t * Based on a touchmove event object, check whether the touch has moved past a boundary since it started.\n\t *\n\t * @param {Event} event\n\t * @returns {boolean}\n\t */\n\tFastClick.prototype.touchHasMoved = function(event) {\n\t\tvar touch = event.changedTouches[0], boundary = this.touchBoundary;\n\n\t\tif (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t};\n\n\n\t/**\n\t * Update the last position.\n\t *\n\t * @param {Event} event\n\t * @returns {boolean}\n\t */\n\tFastClick.prototype.onTouchMove = function(event) {\n\t\tif (!this.trackingClick) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// If the touch has moved, cancel the click tracking\n\t\tif (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) {\n\t\t\tthis.trackingClick = false;\n\t\t\tthis.targetElement = null;\n\t\t}\n\n\t\treturn true;\n\t};\n\n\n\t/**\n\t * Attempt to find the labelled control for the given label element.\n\t *\n\t * @param {EventTarget|HTMLLabelElement} labelElement\n\t * @returns {Element|null}\n\t */\n\tFastClick.prototype.findControl = function(labelElement) {\n\n\t\t// Fast path for newer browsers supporting the HTML5 control attribute\n\t\tif (labelElement.control !== undefined) {\n\t\t\treturn labelElement.control;\n\t\t}\n\n\t\t// All browsers under test that support touch events also support the HTML5 htmlFor attribute\n\t\tif (labelElement.htmlFor) {\n\t\t\treturn document.getElementById(labelElement.htmlFor);\n\t\t}\n\n\t\t// If no for attribute exists, attempt to retrieve the first labellable descendant element\n\t\t// the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label\n\t\treturn labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea');\n\t};\n\n\n\t/**\n\t * On touch end, determine whether to send a click event at once.\n\t *\n\t * @param {Event} event\n\t * @returns {boolean}\n\t */\n\tFastClick.prototype.onTouchEnd = function(event) {\n\t\tvar forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;\n\n\t\tif (!this.trackingClick) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Prevent phantom clicks on fast double-tap (issue #36)\n\t\tif ((event.timeStamp - this.lastClickTime) < this.tapDelay) {\n\t\t\tthis.cancelNextClick = true;\n\t\t\treturn true;\n\t\t}\n\n\t\tif ((event.timeStamp - this.trackingClickStart) > this.tapTimeout) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Reset to prevent wrong click cancel on input (issue #156).\n\t\tthis.cancelNextClick = false;\n\n\t\tthis.lastClickTime = event.timeStamp;\n\n\t\ttrackingClickStart = this.trackingClickStart;\n\t\tthis.trackingClick = false;\n\t\tthis.trackingClickStart = 0;\n\n\t\t// On some iOS devices, the targetElement supplied with the event is invalid if the layer\n\t\t// is performing a transition or scroll, and has to be re-detected manually. Note that\n\t\t// for this to function correctly, it must be called *after* the event target is checked!\n\t\t// See issue #57; also filed as rdar://13048589 .\n\t\tif (deviceIsIOSWithBadTarget) {\n\t\t\ttouch = event.changedTouches[0];\n\n\t\t\t// In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null\n\t\t\ttargetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement;\n\t\t\ttargetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent;\n\t\t}\n\n\t\ttargetTagName = targetElement.tagName.toLowerCase();\n\t\tif (targetTagName === 'label') {\n\t\t\tforElement = this.findControl(targetElement);\n\t\t\tif (forElement) {\n\t\t\t\tthis.focus(targetElement);\n\t\t\t\tif (deviceIsAndroid) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\ttargetElement = forElement;\n\t\t\t}\n\t\t} else if (this.needsFocus(targetElement)) {\n\n\t\t\t// 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.\n\t\t\t// 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).\n\t\t\tif ((event.timeStamp - trackingClickStart) > 100 || (deviceIsIOS && window.top !== window && targetTagName === 'input')) {\n\t\t\t\tthis.targetElement = null;\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tthis.focus(targetElement);\n\t\t\tthis.sendClick(targetElement, event);\n\n\t\t\t// Select elements need the event to go through on iOS 4, otherwise the selector menu won't open.\n\t\t\t// Also this breaks opening selects when VoiceOver is active on iOS6, iOS7 (and possibly others)\n\t\t\tif (!deviceIsIOS || targetTagName !== 'select') {\n\t\t\t\tthis.targetElement = null;\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\tif (deviceIsIOS && !deviceIsIOS4) {\n\n\t\t\t// Don't send a synthetic click event if the target element is contained within a parent layer that was scrolled\n\t\t\t// and this tap is being used to stop the scrolling (usually initiated by a fling - issue #42).\n\t\t\tscrollParent = targetElement.fastClickScrollParent;\n\t\t\tif (scrollParent && scrollParent.fastClickLastScrollTop !== scrollParent.scrollTop) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// Prevent the actual click from going though - unless the target node is marked as requiring\n\t\t// real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted.\n\t\tif (!this.needsClick(targetElement)) {\n\t\t\tevent.preventDefault();\n\t\t\tthis.sendClick(targetElement, event);\n\t\t}\n\n\t\treturn false;\n\t};\n\n\n\t/**\n\t * On touch cancel, stop tracking the click.\n\t *\n\t * @returns {void}\n\t */\n\tFastClick.prototype.onTouchCancel = function() {\n\t\tthis.trackingClick = false;\n\t\tthis.targetElement = null;\n\t};\n\n\n\t/**\n\t * Determine mouse events which should be permitted.\n\t *\n\t * @param {Event} event\n\t * @returns {boolean}\n\t */\n\tFastClick.prototype.onMouse = function(event) {\n\n\t\t// If a target element was never set (because a touch event was never fired) allow the event\n\t\tif (!this.targetElement) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (event.forwardedTouchEvent) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Programmatically generated events targeting a specific element should be permitted\n\t\tif (!event.cancelable) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Derive and check the target element to see whether the mouse event needs to be permitted;\n\t\t// unless explicitly enabled, prevent non-touch click events from triggering actions,\n\t\t// to prevent ghost/doubleclicks.\n\t\tif (!this.needsClick(this.targetElement) || this.cancelNextClick) {\n\n\t\t\t// Prevent any user-added listeners declared on FastClick element from being fired.\n\t\t\tif (event.stopImmediatePropagation) {\n\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t} else {\n\n\t\t\t\t// Part of the hack for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)\n\t\t\t\tevent.propagationStopped = true;\n\t\t\t}\n\n\t\t\t// Cancel the event\n\t\t\tevent.stopPropagation();\n\t\t\tevent.preventDefault();\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// If the mouse event is permitted, return true for the action to go through.\n\t\treturn true;\n\t};\n\n\n\t/**\n\t * On actual clicks, determine whether this is a touch-generated click, a click action occurring\n\t * naturally after a delay after a touch (which needs to be cancelled to avoid duplication), or\n\t * an actual click which should be permitted.\n\t *\n\t * @param {Event} event\n\t * @returns {boolean}\n\t */\n\tFastClick.prototype.onClick = function(event) {\n\t\tvar permitted;\n\n\t\t// 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.\n\t\tif (this.trackingClick) {\n\t\t\tthis.targetElement = null;\n\t\t\tthis.trackingClick = false;\n\t\t\treturn true;\n\t\t}\n\n\t\t// 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.\n\t\tif (event.target.type === 'submit' && event.detail === 0) {\n\t\t\treturn true;\n\t\t}\n\n\t\tpermitted = this.onMouse(event);\n\n\t\t// 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.\n\t\tif (!permitted) {\n\t\t\tthis.targetElement = null;\n\t\t}\n\n\t\t// If clicks are permitted, return true for the action to go through.\n\t\treturn permitted;\n\t};\n\n\n\t/**\n\t * Remove all FastClick's event listeners.\n\t *\n\t * @returns {void}\n\t */\n\tFastClick.prototype.destroy = function() {\n\t\tvar layer = this.layer;\n\n\t\tif (deviceIsAndroid) {\n\t\t\tlayer.removeEventListener('mouseover', this.onMouse, true);\n\t\t\tlayer.removeEventListener('mousedown', this.onMouse, true);\n\t\t\tlayer.removeEventListener('mouseup', this.onMouse, true);\n\t\t}\n\n\t\tlayer.removeEventListener('click', this.onClick, true);\n\t\tlayer.removeEventListener('touchstart', this.onTouchStart, false);\n\t\tlayer.removeEventListener('touchmove', this.onTouchMove, false);\n\t\tlayer.removeEventListener('touchend', this.onTouchEnd, false);\n\t\tlayer.removeEventListener('touchcancel', this.onTouchCancel, false);\n\t};\n\n\n\t/**\n\t * Check whether FastClick is needed.\n\t *\n\t * @param {Element} layer The layer to listen on\n\t */\n\tFastClick.notNeeded = function(layer) {\n\t\tvar metaViewport;\n\t\tvar chromeVersion;\n\t\tvar blackberryVersion;\n\t\tvar firefoxVersion;\n\n\t\t// Devices that don't support touch don't need FastClick\n\t\tif (typeof window.ontouchstart === 'undefined') {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Chrome version - zero for other browsers\n\t\tchromeVersion = +(/Chrome\\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];\n\n\t\tif (chromeVersion) {\n\n\t\t\tif (deviceIsAndroid) {\n\t\t\t\tmetaViewport = document.querySelector('meta[name=viewport]');\n\n\t\t\t\tif (metaViewport) {\n\t\t\t\t\t// Chrome on Android with user-scalable=\"no\" doesn't need FastClick (issue #89)\n\t\t\t\t\tif (metaViewport.content.indexOf('user-scalable=no') !== -1) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t// Chrome 32 and above with width=device-width or less don't need FastClick\n\t\t\t\t\tif (chromeVersion > 31 && document.documentElement.scrollWidth <= window.outerWidth) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Chrome desktop doesn't need FastClick (issue #15)\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\tif (deviceIsBlackBerry10) {\n\t\t\tblackberryVersion = navigator.userAgent.match(/Version\\/([0-9]*)\\.([0-9]*)/);\n\n\t\t\t// BlackBerry 10.3+ does not require Fastclick library.\n\t\t\t// https://github.com/ftlabs/fastclick/issues/251\n\t\t\tif (blackberryVersion[1] >= 10 && blackberryVersion[2] >= 3) {\n\t\t\t\tmetaViewport = document.querySelector('meta[name=viewport]');\n\n\t\t\t\tif (metaViewport) {\n\t\t\t\t\t// user-scalable=no eliminates click delay.\n\t\t\t\t\tif (metaViewport.content.indexOf('user-scalable=no') !== -1) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t// width=device-width (or less than device-width) eliminates click delay.\n\t\t\t\t\tif (document.documentElement.scrollWidth <= window.outerWidth) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// IE10 with -ms-touch-action: none or manipulation, which disables double-tap-to-zoom (issue #97)\n\t\tif (layer.style.msTouchAction === 'none' || layer.style.touchAction === 'manipulation') {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Firefox version - zero for other browsers\n\t\tfirefoxVersion = +(/Firefox\\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];\n\n\t\tif (firefoxVersion >= 27) {\n\t\t\t// Firefox 27+ does not have tap delay if the content is not zoomable - https://bugzilla.mozilla.org/show_bug.cgi?id=922896\n\n\t\t\tmetaViewport = document.querySelector('meta[name=viewport]');\n\t\t\tif (metaViewport && (metaViewport.content.indexOf('user-scalable=no') !== -1 || document.documentElement.scrollWidth <= window.outerWidth)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// IE11: prefixed -ms-touch-action is no longer supported and it's recomended to use non-prefixed version\n\t\t// http://msdn.microsoft.com/en-us/library/windows/apps/Hh767313.aspx\n\t\tif (layer.style.touchAction === 'none' || layer.style.touchAction === 'manipulation') {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t};\n\n\n\t/**\n\t * Factory method for creating a FastClick object\n\t *\n\t * @param {Element} layer The layer to listen on\n\t * @param {Object} [options={}] The options to override the defaults\n\t */\n\tFastClick.attach = function(layer, options) {\n\t\treturn new FastClick(layer, options);\n\t};\n\n\n\tif (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine(function() {\n\t\t\treturn FastClick;\n\t\t});\n\t} else if (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = FastClick.attach;\n\t\tmodule.exports.FastClick = FastClick;\n\t} else {\n\t\twindow.FastClick = FastClick;\n\t}\n}());\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/fastclick/lib/fastclick.js\n **/","module.exports = __webpack_amd_options__;\r\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** (webpack)/buildin/amd-options.js\n ** module id = 2\n ** module chunks = 0\n **/","/**\n * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.7.1\n * Copyright (C) 2016 Oliver Nightingale\n * @license MIT\n */\n\n;(function(){\n\n/**\n * Convenience function for instantiating a new lunr index and configuring it\n * with the default pipeline functions and the passed config function.\n *\n * When using this convenience function a new index will be created with the\n * following functions already in the pipeline:\n *\n * lunr.StopWordFilter - filters out any stop words before they enter the\n * index\n *\n * lunr.stemmer - stems the tokens before entering the index.\n *\n * Example:\n *\n * var idx = lunr(function () {\n * this.field('title', 10)\n * this.field('tags', 100)\n * this.field('body')\n * \n * this.ref('cid')\n * \n * this.pipeline.add(function () {\n * // some custom pipeline function\n * })\n * \n * })\n *\n * @param {Function} config A function that will be called with the new instance\n * of the lunr.Index as both its context and first parameter. It can be used to\n * customize the instance of new lunr.Index.\n * @namespace\n * @module\n * @returns {lunr.Index}\n *\n */\nvar lunr = function (config) {\n var idx = new lunr.Index\n\n idx.pipeline.add(\n lunr.trimmer,\n lunr.stopWordFilter,\n lunr.stemmer\n )\n\n if (config) config.call(idx, idx)\n\n return idx\n}\n\nlunr.version = \"0.7.1\"\n/*!\n * lunr.utils\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * A namespace containing utils for the rest of the lunr library\n */\nlunr.utils = {}\n\n/**\n * Print a warning message to the console.\n *\n * @param {String} message The message to be printed.\n * @memberOf Utils\n */\nlunr.utils.warn = (function (global) {\n return function (message) {\n if (global.console && console.warn) {\n console.warn(message)\n }\n }\n})(this)\n\n/**\n * Convert an object to a string.\n *\n * In the case of `null` and `undefined` the function returns\n * the empty string, in all other cases the result of calling\n * `toString` on the passed object is returned.\n *\n * @param {Any} obj The object to convert to a string.\n * @return {String} string representation of the passed object.\n * @memberOf Utils\n */\nlunr.utils.asString = function (obj) {\n if (obj === void 0 || obj === null) {\n return \"\"\n } else {\n return obj.toString()\n }\n}\n/*!\n * lunr.EventEmitter\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.EventEmitter is an event emitter for lunr. It manages adding and removing event handlers and triggering events and their handlers.\n *\n * @constructor\n */\nlunr.EventEmitter = function () {\n this.events = {}\n}\n\n/**\n * Binds a handler function to a specific event(s).\n *\n * Can bind a single function to many different events in one call.\n *\n * @param {String} [eventName] The name(s) of events to bind this function to.\n * @param {Function} fn The function to call when an event is fired.\n * @memberOf EventEmitter\n */\nlunr.EventEmitter.prototype.addListener = function () {\n var args = Array.prototype.slice.call(arguments),\n fn = args.pop(),\n names = args\n\n if (typeof fn !== \"function\") throw new TypeError (\"last argument must be a function\")\n\n names.forEach(function (name) {\n if (!this.hasHandler(name)) this.events[name] = []\n this.events[name].push(fn)\n }, this)\n}\n\n/**\n * Removes a handler function from a specific event.\n *\n * @param {String} eventName The name of the event to remove this function from.\n * @param {Function} fn The function to remove from an event.\n * @memberOf EventEmitter\n */\nlunr.EventEmitter.prototype.removeListener = function (name, fn) {\n if (!this.hasHandler(name)) return\n\n var fnIndex = this.events[name].indexOf(fn)\n this.events[name].splice(fnIndex, 1)\n\n if (!this.events[name].length) delete this.events[name]\n}\n\n/**\n * Calls all functions bound to the given event.\n *\n * Additional data can be passed to the event handler as arguments to `emit`\n * after the event name.\n *\n * @param {String} eventName The name of the event to emit.\n * @memberOf EventEmitter\n */\nlunr.EventEmitter.prototype.emit = function (name) {\n if (!this.hasHandler(name)) return\n\n var args = Array.prototype.slice.call(arguments, 1)\n\n this.events[name].forEach(function (fn) {\n fn.apply(undefined, args)\n })\n}\n\n/**\n * Checks whether a handler has ever been stored against an event.\n *\n * @param {String} eventName The name of the event to check.\n * @private\n * @memberOf EventEmitter\n */\nlunr.EventEmitter.prototype.hasHandler = function (name) {\n return name in this.events\n}\n\n/*!\n * lunr.tokenizer\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * A function for splitting a string into tokens ready to be inserted into\n * the search index. Uses `lunr.tokenizer.seperator` to split strings, change\n * the value of this property to change how strings are split into tokens.\n *\n * @module\n * @param {String} obj The string to convert into tokens\n * @see lunr.tokenizer.seperator\n * @returns {Array}\n */\nlunr.tokenizer = function (obj) {\n if (!arguments.length || obj == null || obj == undefined) return []\n if (Array.isArray(obj)) return obj.map(function (t) { return lunr.utils.asString(t).toLowerCase() })\n\n return obj.toString().trim().toLowerCase().split(lunr.tokenizer.seperator)\n}\n\n/**\n * The sperator used to split a string into tokens. Override this property to change the behaviour of\n * `lunr.tokenizer` behaviour when tokenizing strings. By default this splits on whitespace and hyphens.\n *\n * @static\n * @see lunr.tokenizer\n */\nlunr.tokenizer.seperator = /[\\s\\-]+/\n\n/**\n * Loads a previously serialised tokenizer.\n *\n * A tokenizer function to be loaded must already be registered with lunr.tokenizer.\n * If the serialised tokenizer has not been registered then an error will be thrown.\n *\n * @param {String} label The label of the serialised tokenizer.\n * @returns {Function}\n * @memberOf tokenizer\n */\nlunr.tokenizer.load = function (label) {\n var fn = this.registeredFunctions[label]\n\n if (!fn) {\n throw new Error('Cannot load un-registered function: ' + label)\n }\n\n return fn\n}\n\nlunr.tokenizer.label = 'default'\n\nlunr.tokenizer.registeredFunctions = {\n 'default': lunr.tokenizer\n}\n\n/**\n * Register a tokenizer function.\n *\n * Functions that are used as tokenizers should be registered if they are to be used with a serialised index.\n *\n * Registering a function does not add it to an index, functions must still be associated with a specific index for them to be used when indexing and searching documents.\n *\n * @param {Function} fn The function to register.\n * @param {String} label The label to register this function with\n * @memberOf tokenizer\n */\nlunr.tokenizer.registerFunction = function (fn, label) {\n if (label in this.registeredFunctions) {\n lunr.utils.warn('Overwriting existing tokenizer: ' + label)\n }\n\n fn.label = label\n this.registeredFunctions[label] = fn\n}\n/*!\n * lunr.Pipeline\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.Pipelines maintain an ordered list of functions to be applied to all\n * tokens in documents entering the search index and queries being ran against\n * the index.\n *\n * An instance of lunr.Index created with the lunr shortcut will contain a\n * pipeline with a stop word filter and an English language stemmer. Extra\n * functions can be added before or after either of these functions or these\n * default functions can be removed.\n *\n * When run the pipeline will call each function in turn, passing a token, the\n * index of that token in the original list of all tokens and finally a list of\n * all the original tokens.\n *\n * The output of functions in the pipeline will be passed to the next function\n * in the pipeline. To exclude a token from entering the index the function\n * should return undefined, the rest of the pipeline will not be called with\n * this token.\n *\n * For serialisation of pipelines to work, all functions used in an instance of\n * a pipeline should be registered with lunr.Pipeline. Registered functions can\n * then be loaded. If trying to load a serialised pipeline that uses functions\n * that are not registered an error will be thrown.\n *\n * If not planning on serialising the pipeline then registering pipeline functions\n * is not necessary.\n *\n * @constructor\n */\nlunr.Pipeline = function () {\n this._stack = []\n}\n\nlunr.Pipeline.registeredFunctions = {}\n\n/**\n * Register a function with the pipeline.\n *\n * Functions that are used in the pipeline should be registered if the pipeline\n * needs to be serialised, or a serialised pipeline needs to be loaded.\n *\n * Registering a function does not add it to a pipeline, functions must still be\n * added to instances of the pipeline for them to be used when running a pipeline.\n *\n * @param {Function} fn The function to check for.\n * @param {String} label The label to register this function with\n * @memberOf Pipeline\n */\nlunr.Pipeline.registerFunction = function (fn, label) {\n if (label in this.registeredFunctions) {\n lunr.utils.warn('Overwriting existing registered function: ' + label)\n }\n\n fn.label = label\n lunr.Pipeline.registeredFunctions[fn.label] = fn\n}\n\n/**\n * Warns if the function is not registered as a Pipeline function.\n *\n * @param {Function} fn The function to check for.\n * @private\n * @memberOf Pipeline\n */\nlunr.Pipeline.warnIfFunctionNotRegistered = function (fn) {\n var isRegistered = fn.label && (fn.label in this.registeredFunctions)\n\n if (!isRegistered) {\n lunr.utils.warn('Function is not registered with pipeline. This may cause problems when serialising the index.\\n', fn)\n }\n}\n\n/**\n * Loads a previously serialised pipeline.\n *\n * All functions to be loaded must already be registered with lunr.Pipeline.\n * If any function from the serialised data has not been registered then an\n * error will be thrown.\n *\n * @param {Object} serialised The serialised pipeline to load.\n * @returns {lunr.Pipeline}\n * @memberOf Pipeline\n */\nlunr.Pipeline.load = function (serialised) {\n var pipeline = new lunr.Pipeline\n\n serialised.forEach(function (fnName) {\n var fn = lunr.Pipeline.registeredFunctions[fnName]\n\n if (fn) {\n pipeline.add(fn)\n } else {\n throw new Error('Cannot load un-registered function: ' + fnName)\n }\n })\n\n return pipeline\n}\n\n/**\n * Adds new functions to the end of the pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {Function} functions Any number of functions to add to the pipeline.\n * @memberOf Pipeline\n */\nlunr.Pipeline.prototype.add = function () {\n var fns = Array.prototype.slice.call(arguments)\n\n fns.forEach(function (fn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(fn)\n this._stack.push(fn)\n }, this)\n}\n\n/**\n * Adds a single function after a function that already exists in the\n * pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {Function} existingFn A function that already exists in the pipeline.\n * @param {Function} newFn The new function to add to the pipeline.\n * @memberOf Pipeline\n */\nlunr.Pipeline.prototype.after = function (existingFn, newFn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(newFn)\n\n var pos = this._stack.indexOf(existingFn)\n if (pos == -1) {\n throw new Error('Cannot find existingFn')\n }\n\n pos = pos + 1\n this._stack.splice(pos, 0, newFn)\n}\n\n/**\n * Adds a single function before a function that already exists in the\n * pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {Function} existingFn A function that already exists in the pipeline.\n * @param {Function} newFn The new function to add to the pipeline.\n * @memberOf Pipeline\n */\nlunr.Pipeline.prototype.before = function (existingFn, newFn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(newFn)\n\n var pos = this._stack.indexOf(existingFn)\n if (pos == -1) {\n throw new Error('Cannot find existingFn')\n }\n\n this._stack.splice(pos, 0, newFn)\n}\n\n/**\n * Removes a function from the pipeline.\n *\n * @param {Function} fn The function to remove from the pipeline.\n * @memberOf Pipeline\n */\nlunr.Pipeline.prototype.remove = function (fn) {\n var pos = this._stack.indexOf(fn)\n if (pos == -1) {\n return\n }\n\n this._stack.splice(pos, 1)\n}\n\n/**\n * Runs the current list of functions that make up the pipeline against the\n * passed tokens.\n *\n * @param {Array} tokens The tokens to run through the pipeline.\n * @returns {Array}\n * @memberOf Pipeline\n */\nlunr.Pipeline.prototype.run = function (tokens) {\n var out = [],\n tokenLength = tokens.length,\n stackLength = this._stack.length\n\n for (var i = 0; i < tokenLength; i++) {\n var token = tokens[i]\n\n for (var j = 0; j < stackLength; j++) {\n token = this._stack[j](token, i, tokens)\n if (token === void 0 || token === '') break\n };\n\n if (token !== void 0 && token !== '') out.push(token)\n };\n\n return out\n}\n\n/**\n * Resets the pipeline by removing any existing processors.\n *\n * @memberOf Pipeline\n */\nlunr.Pipeline.prototype.reset = function () {\n this._stack = []\n}\n\n/**\n * Returns a representation of the pipeline ready for serialisation.\n *\n * Logs a warning if the function has not been registered.\n *\n * @returns {Array}\n * @memberOf Pipeline\n */\nlunr.Pipeline.prototype.toJSON = function () {\n return this._stack.map(function (fn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(fn)\n\n return fn.label\n })\n}\n/*!\n * lunr.Vector\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.Vectors implement vector related operations for\n * a series of elements.\n *\n * @constructor\n */\nlunr.Vector = function () {\n this._magnitude = null\n this.list = undefined\n this.length = 0\n}\n\n/**\n * lunr.Vector.Node is a simple struct for each node\n * in a lunr.Vector.\n *\n * @private\n * @param {Number} The index of the node in the vector.\n * @param {Object} The data at this node in the vector.\n * @param {lunr.Vector.Node} The node directly after this node in the vector.\n * @constructor\n * @memberOf Vector\n */\nlunr.Vector.Node = function (idx, val, next) {\n this.idx = idx\n this.val = val\n this.next = next\n}\n\n/**\n * Inserts a new value at a position in a vector.\n *\n * @param {Number} The index at which to insert a value.\n * @param {Object} The object to insert in the vector.\n * @memberOf Vector.\n */\nlunr.Vector.prototype.insert = function (idx, val) {\n this._magnitude = undefined;\n var list = this.list\n\n if (!list) {\n this.list = new lunr.Vector.Node (idx, val, list)\n return this.length++\n }\n\n if (idx < list.idx) {\n this.list = new lunr.Vector.Node (idx, val, list)\n return this.length++\n }\n\n var prev = list,\n next = list.next\n\n while (next != undefined) {\n if (idx < next.idx) {\n prev.next = new lunr.Vector.Node (idx, val, next)\n return this.length++\n }\n\n prev = next, next = next.next\n }\n\n prev.next = new lunr.Vector.Node (idx, val, next)\n return this.length++\n}\n\n/**\n * Calculates the magnitude of this vector.\n *\n * @returns {Number}\n * @memberOf Vector\n */\nlunr.Vector.prototype.magnitude = function () {\n if (this._magnitude) return this._magnitude\n var node = this.list,\n sumOfSquares = 0,\n val\n\n while (node) {\n val = node.val\n sumOfSquares += val * val\n node = node.next\n }\n\n return this._magnitude = Math.sqrt(sumOfSquares)\n}\n\n/**\n * Calculates the dot product of this vector and another vector.\n *\n * @param {lunr.Vector} otherVector The vector to compute the dot product with.\n * @returns {Number}\n * @memberOf Vector\n */\nlunr.Vector.prototype.dot = function (otherVector) {\n var node = this.list,\n otherNode = otherVector.list,\n dotProduct = 0\n\n while (node && otherNode) {\n if (node.idx < otherNode.idx) {\n node = node.next\n } else if (node.idx > otherNode.idx) {\n otherNode = otherNode.next\n } else {\n dotProduct += node.val * otherNode.val\n node = node.next\n otherNode = otherNode.next\n }\n }\n\n return dotProduct\n}\n\n/**\n * Calculates the cosine similarity between this vector and another\n * vector.\n *\n * @param {lunr.Vector} otherVector The other vector to calculate the\n * similarity with.\n * @returns {Number}\n * @memberOf Vector\n */\nlunr.Vector.prototype.similarity = function (otherVector) {\n return this.dot(otherVector) / (this.magnitude() * otherVector.magnitude())\n}\n/*!\n * lunr.SortedSet\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.SortedSets are used to maintain an array of uniq values in a sorted\n * order.\n *\n * @constructor\n */\nlunr.SortedSet = function () {\n this.length = 0\n this.elements = []\n}\n\n/**\n * Loads a previously serialised sorted set.\n *\n * @param {Array} serialisedData The serialised set to load.\n * @returns {lunr.SortedSet}\n * @memberOf SortedSet\n */\nlunr.SortedSet.load = function (serialisedData) {\n var set = new this\n\n set.elements = serialisedData\n set.length = serialisedData.length\n\n return set\n}\n\n/**\n * Inserts new items into the set in the correct position to maintain the\n * order.\n *\n * @param {Object} The objects to add to this set.\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.add = function () {\n var i, element\n\n for (i = 0; i < arguments.length; i++) {\n element = arguments[i]\n if (~this.indexOf(element)) continue\n this.elements.splice(this.locationFor(element), 0, element)\n }\n\n this.length = this.elements.length\n}\n\n/**\n * Converts this sorted set into an array.\n *\n * @returns {Array}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.toArray = function () {\n return this.elements.slice()\n}\n\n/**\n * Creates a new array with the results of calling a provided function on every\n * element in this sorted set.\n *\n * Delegates to Array.prototype.map and has the same signature.\n *\n * @param {Function} fn The function that is called on each element of the\n * set.\n * @param {Object} ctx An optional object that can be used as the context\n * for the function fn.\n * @returns {Array}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.map = function (fn, ctx) {\n return this.elements.map(fn, ctx)\n}\n\n/**\n * Executes a provided function once per sorted set element.\n *\n * Delegates to Array.prototype.forEach and has the same signature.\n *\n * @param {Function} fn The function that is called on each element of the\n * set.\n * @param {Object} ctx An optional object that can be used as the context\n * @memberOf SortedSet\n * for the function fn.\n */\nlunr.SortedSet.prototype.forEach = function (fn, ctx) {\n return this.elements.forEach(fn, ctx)\n}\n\n/**\n * Returns the index at which a given element can be found in the\n * sorted set, or -1 if it is not present.\n *\n * @param {Object} elem The object to locate in the sorted set.\n * @returns {Number}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.indexOf = function (elem) {\n var start = 0,\n end = this.elements.length,\n sectionLength = end - start,\n pivot = start + Math.floor(sectionLength / 2),\n pivotElem = this.elements[pivot]\n\n while (sectionLength > 1) {\n if (pivotElem === elem) return pivot\n\n if (pivotElem < elem) start = pivot\n if (pivotElem > elem) end = pivot\n\n sectionLength = end - start\n pivot = start + Math.floor(sectionLength / 2)\n pivotElem = this.elements[pivot]\n }\n\n if (pivotElem === elem) return pivot\n\n return -1\n}\n\n/**\n * Returns the position within the sorted set that an element should be\n * inserted at to maintain the current order of the set.\n *\n * This function assumes that the element to search for does not already exist\n * in the sorted set.\n *\n * @param {Object} elem The elem to find the position for in the set\n * @returns {Number}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.locationFor = function (elem) {\n var start = 0,\n end = this.elements.length,\n sectionLength = end - start,\n pivot = start + Math.floor(sectionLength / 2),\n pivotElem = this.elements[pivot]\n\n while (sectionLength > 1) {\n if (pivotElem < elem) start = pivot\n if (pivotElem > elem) end = pivot\n\n sectionLength = end - start\n pivot = start + Math.floor(sectionLength / 2)\n pivotElem = this.elements[pivot]\n }\n\n if (pivotElem > elem) return pivot\n if (pivotElem < elem) return pivot + 1\n}\n\n/**\n * Creates a new lunr.SortedSet that contains the elements in the intersection\n * of this set and the passed set.\n *\n * @param {lunr.SortedSet} otherSet The set to intersect with this set.\n * @returns {lunr.SortedSet}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.intersect = function (otherSet) {\n var intersectSet = new lunr.SortedSet,\n i = 0, j = 0,\n a_len = this.length, b_len = otherSet.length,\n a = this.elements, b = otherSet.elements\n\n while (true) {\n if (i > a_len - 1 || j > b_len - 1) break\n\n if (a[i] === b[j]) {\n intersectSet.add(a[i])\n i++, j++\n continue\n }\n\n if (a[i] < b[j]) {\n i++\n continue\n }\n\n if (a[i] > b[j]) {\n j++\n continue\n }\n };\n\n return intersectSet\n}\n\n/**\n * Makes a copy of this set\n *\n * @returns {lunr.SortedSet}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.clone = function () {\n var clone = new lunr.SortedSet\n\n clone.elements = this.toArray()\n clone.length = clone.elements.length\n\n return clone\n}\n\n/**\n * Creates a new lunr.SortedSet that contains the elements in the union\n * of this set and the passed set.\n *\n * @param {lunr.SortedSet} otherSet The set to union with this set.\n * @returns {lunr.SortedSet}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.union = function (otherSet) {\n var longSet, shortSet, unionSet\n\n if (this.length >= otherSet.length) {\n longSet = this, shortSet = otherSet\n } else {\n longSet = otherSet, shortSet = this\n }\n\n unionSet = longSet.clone()\n\n for(var i = 0, shortSetElements = shortSet.toArray(); i < shortSetElements.length; i++){\n unionSet.add(shortSetElements[i])\n }\n\n return unionSet\n}\n\n/**\n * Returns a representation of the sorted set ready for serialisation.\n *\n * @returns {Array}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.toJSON = function () {\n return this.toArray()\n}\n/*!\n * lunr.Index\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.Index is object that manages a search index. It contains the indexes\n * and stores all the tokens and document lookups. It also provides the main\n * user facing API for the library.\n *\n * @constructor\n */\nlunr.Index = function () {\n this._fields = []\n this._ref = 'id'\n this.pipeline = new lunr.Pipeline\n this.documentStore = new lunr.Store\n this.tokenStore = new lunr.TokenStore\n this.corpusTokens = new lunr.SortedSet\n this.eventEmitter = new lunr.EventEmitter\n this.tokenizerFn = lunr.tokenizer\n\n this._idfCache = {}\n\n this.on('add', 'remove', 'update', (function () {\n this._idfCache = {}\n }).bind(this))\n}\n\n/**\n * Bind a handler to events being emitted by the index.\n *\n * The handler can be bound to many events at the same time.\n *\n * @param {String} [eventName] The name(s) of events to bind the function to.\n * @param {Function} fn The serialised set to load.\n * @memberOf Index\n */\nlunr.Index.prototype.on = function () {\n var args = Array.prototype.slice.call(arguments)\n return this.eventEmitter.addListener.apply(this.eventEmitter, args)\n}\n\n/**\n * Removes a handler from an event being emitted by the index.\n *\n * @param {String} eventName The name of events to remove the function from.\n * @param {Function} fn The serialised set to load.\n * @memberOf Index\n */\nlunr.Index.prototype.off = function (name, fn) {\n return this.eventEmitter.removeListener(name, fn)\n}\n\n/**\n * Loads a previously serialised index.\n *\n * Issues a warning if the index being imported was serialised\n * by a different version of lunr.\n *\n * @param {Object} serialisedData The serialised set to load.\n * @returns {lunr.Index}\n * @memberOf Index\n */\nlunr.Index.load = function (serialisedData) {\n if (serialisedData.version !== lunr.version) {\n lunr.utils.warn('version mismatch: current ' + lunr.version + ' importing ' + serialisedData.version)\n }\n\n var idx = new this\n\n idx._fields = serialisedData.fields\n idx._ref = serialisedData.ref\n\n idx.tokenizer = lunr.tokenizer.load(serialisedData.tokenizer)\n idx.documentStore = lunr.Store.load(serialisedData.documentStore)\n idx.tokenStore = lunr.TokenStore.load(serialisedData.tokenStore)\n idx.corpusTokens = lunr.SortedSet.load(serialisedData.corpusTokens)\n idx.pipeline = lunr.Pipeline.load(serialisedData.pipeline)\n\n return idx\n}\n\n/**\n * Adds a field to the list of fields that will be searchable within documents\n * in the index.\n *\n * An optional boost param can be passed to affect how much tokens in this field\n * rank in search results, by default the boost value is 1.\n *\n * Fields should be added before any documents are added to the index, fields\n * that are added after documents are added to the index will only apply to new\n * documents added to the index.\n *\n * @param {String} fieldName The name of the field within the document that\n * should be indexed\n * @param {Number} boost An optional boost that can be applied to terms in this\n * field.\n * @returns {lunr.Index}\n * @memberOf Index\n */\nlunr.Index.prototype.field = function (fieldName, opts) {\n var opts = opts || {},\n field = { name: fieldName, boost: opts.boost || 1 }\n\n this._fields.push(field)\n return this\n}\n\n/**\n * Sets the property used to uniquely identify documents added to the index,\n * by default this property is 'id'.\n *\n * This should only be changed before adding documents to the index, changing\n * the ref property without resetting the index can lead to unexpected results.\n *\n * The value of ref can be of any type but it _must_ be stably comparable and\n * orderable.\n *\n * @param {String} refName The property to use to uniquely identify the\n * documents in the index.\n * @param {Boolean} emitEvent Whether to emit add events, defaults to true\n * @returns {lunr.Index}\n * @memberOf Index\n */\nlunr.Index.prototype.ref = function (refName) {\n this._ref = refName\n return this\n}\n\n/**\n * Sets the tokenizer used for this index.\n *\n * By default the index will use the default tokenizer, lunr.tokenizer. The tokenizer\n * should only be changed before adding documents to the index. Changing the tokenizer\n * without re-building the index can lead to unexpected results.\n *\n * @param {Function} fn The function to use as a tokenizer.\n * @returns {lunr.Index}\n * @memberOf Index\n */\nlunr.Index.prototype.tokenizer = function (fn) {\n var isRegistered = fn.label && (fn.label in lunr.tokenizer.registeredFunctions)\n\n if (!isRegistered) {\n lunr.utils.warn('Function is not a registered tokenizer. This may cause problems when serialising the index')\n }\n\n this.tokenizerFn = fn\n return this\n}\n\n/**\n * Add a document to the index.\n *\n * This is the way new documents enter the index, this function will run the\n * fields from the document through the index's pipeline and then add it to\n * the index, it will then show up in search results.\n *\n * An 'add' event is emitted with the document that has been added and the index\n * the document has been added to. This event can be silenced by passing false\n * as the second argument to add.\n *\n * @param {Object} doc The document to add to the index.\n * @param {Boolean} emitEvent Whether or not to emit events, default true.\n * @memberOf Index\n */\nlunr.Index.prototype.add = function (doc, emitEvent) {\n var docTokens = {},\n allDocumentTokens = new lunr.SortedSet,\n docRef = doc[this._ref],\n emitEvent = emitEvent === undefined ? true : emitEvent\n\n this._fields.forEach(function (field) {\n var fieldTokens = this.pipeline.run(this.tokenizerFn(doc[field.name]))\n\n docTokens[field.name] = fieldTokens\n\n for (var i = 0; i < fieldTokens.length; i++) {\n var token = fieldTokens[i]\n allDocumentTokens.add(token)\n this.corpusTokens.add(token)\n }\n }, this)\n\n this.documentStore.set(docRef, allDocumentTokens)\n\n for (var i = 0; i < allDocumentTokens.length; i++) {\n var token = allDocumentTokens.elements[i]\n var tf = 0;\n\n for (var j = 0; j < this._fields.length; j++){\n var field = this._fields[j]\n var fieldTokens = docTokens[field.name]\n var fieldLength = fieldTokens.length\n\n if (!fieldLength) continue\n\n var tokenCount = 0\n for (var k = 0; k < fieldLength; k++){\n if (fieldTokens[k] === token){\n tokenCount++\n }\n }\n\n tf += (tokenCount / fieldLength * field.boost)\n }\n\n this.tokenStore.add(token, { ref: docRef, tf: tf })\n };\n\n if (emitEvent) this.eventEmitter.emit('add', doc, this)\n}\n\n/**\n * Removes a document from the index.\n *\n * To make sure documents no longer show up in search results they can be\n * removed from the index using this method.\n *\n * The document passed only needs to have the same ref property value as the\n * document that was added to the index, they could be completely different\n * objects.\n *\n * A 'remove' event is emitted with the document that has been removed and the index\n * the document has been removed from. This event can be silenced by passing false\n * as the second argument to remove.\n *\n * @param {Object} doc The document to remove from the index.\n * @param {Boolean} emitEvent Whether to emit remove events, defaults to true\n * @memberOf Index\n */\nlunr.Index.prototype.remove = function (doc, emitEvent) {\n var docRef = doc[this._ref],\n emitEvent = emitEvent === undefined ? true : emitEvent\n\n if (!this.documentStore.has(docRef)) return\n\n var docTokens = this.documentStore.get(docRef)\n\n this.documentStore.remove(docRef)\n\n docTokens.forEach(function (token) {\n this.tokenStore.remove(token, docRef)\n }, this)\n\n if (emitEvent) this.eventEmitter.emit('remove', doc, this)\n}\n\n/**\n * Updates a document in the index.\n *\n * When a document contained within the index gets updated, fields changed,\n * added or removed, to make sure it correctly matched against search queries,\n * it should be updated in the index.\n *\n * This method is just a wrapper around `remove` and `add`\n *\n * An 'update' event is emitted with the document that has been updated and the index.\n * This event can be silenced by passing false as the second argument to update. Only\n * an update event will be fired, the 'add' and 'remove' events of the underlying calls\n * are silenced.\n *\n * @param {Object} doc The document to update in the index.\n * @param {Boolean} emitEvent Whether to emit update events, defaults to true\n * @see Index.prototype.remove\n * @see Index.prototype.add\n * @memberOf Index\n */\nlunr.Index.prototype.update = function (doc, emitEvent) {\n var emitEvent = emitEvent === undefined ? true : emitEvent\n\n this.remove(doc, false)\n this.add(doc, false)\n\n if (emitEvent) this.eventEmitter.emit('update', doc, this)\n}\n\n/**\n * Calculates the inverse document frequency for a token within the index.\n *\n * @param {String} token The token to calculate the idf of.\n * @see Index.prototype.idf\n * @private\n * @memberOf Index\n */\nlunr.Index.prototype.idf = function (term) {\n var cacheKey = \"@\" + term\n if (Object.prototype.hasOwnProperty.call(this._idfCache, cacheKey)) return this._idfCache[cacheKey]\n\n var documentFrequency = this.tokenStore.count(term),\n idf = 1\n\n if (documentFrequency > 0) {\n idf = 1 + Math.log(this.documentStore.length / documentFrequency)\n }\n\n return this._idfCache[cacheKey] = idf\n}\n\n/**\n * Searches the index using the passed query.\n *\n * Queries should be a string, multiple words are allowed and will lead to an\n * AND based query, e.g. `idx.search('foo bar')` will run a search for\n * documents containing both 'foo' and 'bar'.\n *\n * All query tokens are passed through the same pipeline that document tokens\n * are passed through, so any language processing involved will be run on every\n * query term.\n *\n * Each query term is expanded, so that the term 'he' might be expanded to\n * 'hello' and 'help' if those terms were already included in the index.\n *\n * Matching documents are returned as an array of objects, each object contains\n * the matching document ref, as set for this index, and the similarity score\n * for this document against the query.\n *\n * @param {String} query The query to search the index with.\n * @returns {Object}\n * @see Index.prototype.idf\n * @see Index.prototype.documentVector\n * @memberOf Index\n */\nlunr.Index.prototype.search = function (query) {\n var queryTokens = this.pipeline.run(this.tokenizerFn(query)),\n queryVector = new lunr.Vector,\n documentSets = [],\n fieldBoosts = this._fields.reduce(function (memo, f) { return memo + f.boost }, 0)\n\n var hasSomeToken = queryTokens.some(function (token) {\n return this.tokenStore.has(token)\n }, this)\n\n if (!hasSomeToken) return []\n\n queryTokens\n .forEach(function (token, i, tokens) {\n var tf = 1 / tokens.length * this._fields.length * fieldBoosts,\n self = this\n\n var set = this.tokenStore.expand(token).reduce(function (memo, key) {\n var pos = self.corpusTokens.indexOf(key),\n idf = self.idf(key),\n similarityBoost = 1,\n set = new lunr.SortedSet\n\n // if the expanded key is not an exact match to the token then\n // penalise the score for this key by how different the key is\n // to the token.\n if (key !== token) {\n var diff = Math.max(3, key.length - token.length)\n similarityBoost = 1 / Math.log(diff)\n }\n\n // calculate the query tf-idf score for this token\n // applying an similarityBoost to ensure exact matches\n // these rank higher than expanded terms\n if (pos > -1) queryVector.insert(pos, tf * idf * similarityBoost)\n\n // add all the documents that have this key into a set\n // ensuring that the type of key is preserved\n var matchingDocuments = self.tokenStore.get(key),\n refs = Object.keys(matchingDocuments),\n refsLen = refs.length\n\n for (var i = 0; i < refsLen; i++) {\n set.add(matchingDocuments[refs[i]].ref)\n }\n\n return memo.union(set)\n }, new lunr.SortedSet)\n\n documentSets.push(set)\n }, this)\n\n var documentSet = documentSets.reduce(function (memo, set) {\n return memo.intersect(set)\n })\n\n return documentSet\n .map(function (ref) {\n return { ref: ref, score: queryVector.similarity(this.documentVector(ref)) }\n }, this)\n .sort(function (a, b) {\n return b.score - a.score\n })\n}\n\n/**\n * Generates a vector containing all the tokens in the document matching the\n * passed documentRef.\n *\n * The vector contains the tf-idf score for each token contained in the\n * document with the passed documentRef. The vector will contain an element\n * for every token in the indexes corpus, if the document does not contain that\n * token the element will be 0.\n *\n * @param {Object} documentRef The ref to find the document with.\n * @returns {lunr.Vector}\n * @private\n * @memberOf Index\n */\nlunr.Index.prototype.documentVector = function (documentRef) {\n var documentTokens = this.documentStore.get(documentRef),\n documentTokensLength = documentTokens.length,\n documentVector = new lunr.Vector\n\n for (var i = 0; i < documentTokensLength; i++) {\n var token = documentTokens.elements[i],\n tf = this.tokenStore.get(token)[documentRef].tf,\n idf = this.idf(token)\n\n documentVector.insert(this.corpusTokens.indexOf(token), tf * idf)\n };\n\n return documentVector\n}\n\n/**\n * Returns a representation of the index ready for serialisation.\n *\n * @returns {Object}\n * @memberOf Index\n */\nlunr.Index.prototype.toJSON = function () {\n return {\n version: lunr.version,\n fields: this._fields,\n ref: this._ref,\n tokenizer: this.tokenizerFn.label,\n documentStore: this.documentStore.toJSON(),\n tokenStore: this.tokenStore.toJSON(),\n corpusTokens: this.corpusTokens.toJSON(),\n pipeline: this.pipeline.toJSON()\n }\n}\n\n/**\n * Applies a plugin to the current index.\n *\n * A plugin is a function that is called with the index as its context.\n * Plugins can be used to customise or extend the behaviour the index\n * in some way. A plugin is just a function, that encapsulated the custom\n * behaviour that should be applied to the index.\n *\n * The plugin function will be called with the index as its argument, additional\n * arguments can also be passed when calling use. The function will be called\n * with the index as its context.\n *\n * Example:\n *\n * var myPlugin = function (idx, arg1, arg2) {\n * // `this` is the index to be extended\n * // apply any extensions etc here.\n * }\n *\n * var idx = lunr(function () {\n * this.use(myPlugin, 'arg1', 'arg2')\n * })\n *\n * @param {Function} plugin The plugin to apply.\n * @memberOf Index\n */\nlunr.Index.prototype.use = function (plugin) {\n var args = Array.prototype.slice.call(arguments, 1)\n args.unshift(this)\n plugin.apply(this, args)\n}\n/*!\n * lunr.Store\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.Store is a simple key-value store used for storing sets of tokens for\n * documents stored in index.\n *\n * @constructor\n * @module\n */\nlunr.Store = function () {\n this.store = {}\n this.length = 0\n}\n\n/**\n * Loads a previously serialised store\n *\n * @param {Object} serialisedData The serialised store to load.\n * @returns {lunr.Store}\n * @memberOf Store\n */\nlunr.Store.load = function (serialisedData) {\n var store = new this\n\n store.length = serialisedData.length\n store.store = Object.keys(serialisedData.store).reduce(function (memo, key) {\n memo[key] = lunr.SortedSet.load(serialisedData.store[key])\n return memo\n }, {})\n\n return store\n}\n\n/**\n * Stores the given tokens in the store against the given id.\n *\n * @param {Object} id The key used to store the tokens against.\n * @param {Object} tokens The tokens to store against the key.\n * @memberOf Store\n */\nlunr.Store.prototype.set = function (id, tokens) {\n if (!this.has(id)) this.length++\n this.store[id] = tokens\n}\n\n/**\n * Retrieves the tokens from the store for a given key.\n *\n * @param {Object} id The key to lookup and retrieve from the store.\n * @returns {Object}\n * @memberOf Store\n */\nlunr.Store.prototype.get = function (id) {\n return this.store[id]\n}\n\n/**\n * Checks whether the store contains a key.\n *\n * @param {Object} id The id to look up in the store.\n * @returns {Boolean}\n * @memberOf Store\n */\nlunr.Store.prototype.has = function (id) {\n return id in this.store\n}\n\n/**\n * Removes the value for a key in the store.\n *\n * @param {Object} id The id to remove from the store.\n * @memberOf Store\n */\nlunr.Store.prototype.remove = function (id) {\n if (!this.has(id)) return\n\n delete this.store[id]\n this.length--\n}\n\n/**\n * Returns a representation of the store ready for serialisation.\n *\n * @returns {Object}\n * @memberOf Store\n */\nlunr.Store.prototype.toJSON = function () {\n return {\n store: this.store,\n length: this.length\n }\n}\n\n/*!\n * lunr.stemmer\n * Copyright (C) 2016 Oliver Nightingale\n * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt\n */\n\n/**\n * lunr.stemmer is an english language stemmer, this is a JavaScript\n * implementation of the PorterStemmer taken from http://tartarus.org/~martin\n *\n * @module\n * @param {String} str The string to stem\n * @returns {String}\n * @see lunr.Pipeline\n */\nlunr.stemmer = (function(){\n var step2list = {\n \"ational\" : \"ate\",\n \"tional\" : \"tion\",\n \"enci\" : \"ence\",\n \"anci\" : \"ance\",\n \"izer\" : \"ize\",\n \"bli\" : \"ble\",\n \"alli\" : \"al\",\n \"entli\" : \"ent\",\n \"eli\" : \"e\",\n \"ousli\" : \"ous\",\n \"ization\" : \"ize\",\n \"ation\" : \"ate\",\n \"ator\" : \"ate\",\n \"alism\" : \"al\",\n \"iveness\" : \"ive\",\n \"fulness\" : \"ful\",\n \"ousness\" : \"ous\",\n \"aliti\" : \"al\",\n \"iviti\" : \"ive\",\n \"biliti\" : \"ble\",\n \"logi\" : \"log\"\n },\n\n step3list = {\n \"icate\" : \"ic\",\n \"ative\" : \"\",\n \"alize\" : \"al\",\n \"iciti\" : \"ic\",\n \"ical\" : \"ic\",\n \"ful\" : \"\",\n \"ness\" : \"\"\n },\n\n c = \"[^aeiou]\", // consonant\n v = \"[aeiouy]\", // vowel\n C = c + \"[^aeiouy]*\", // consonant sequence\n V = v + \"[aeiou]*\", // vowel sequence\n\n mgr0 = \"^(\" + C + \")?\" + V + C, // [C]VC... is m>0\n meq1 = \"^(\" + C + \")?\" + V + C + \"(\" + V + \")?$\", // [C]VC[V] is m=1\n mgr1 = \"^(\" + C + \")?\" + V + C + V + C, // [C]VCVC... is m>1\n s_v = \"^(\" + C + \")?\" + v; // vowel in stem\n\n var re_mgr0 = new RegExp(mgr0);\n var re_mgr1 = new RegExp(mgr1);\n var re_meq1 = new RegExp(meq1);\n var re_s_v = new RegExp(s_v);\n\n var re_1a = /^(.+?)(ss|i)es$/;\n var re2_1a = /^(.+?)([^s])s$/;\n var re_1b = /^(.+?)eed$/;\n var re2_1b = /^(.+?)(ed|ing)$/;\n var re_1b_2 = /.$/;\n var re2_1b_2 = /(at|bl|iz)$/;\n var re3_1b_2 = new RegExp(\"([^aeiouylsz])\\\\1$\");\n var re4_1b_2 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n\n var re_1c = /^(.+?[^aeiou])y$/;\n var re_2 = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;\n\n var re_3 = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;\n\n var re_4 = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;\n var re2_4 = /^(.+?)(s|t)(ion)$/;\n\n var re_5 = /^(.+?)e$/;\n var re_5_1 = /ll$/;\n var re3_5 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n\n var porterStemmer = function porterStemmer(w) {\n var stem,\n suffix,\n firstch,\n re,\n re2,\n re3,\n re4;\n\n if (w.length < 3) { return w; }\n\n firstch = w.substr(0,1);\n if (firstch == \"y\") {\n w = firstch.toUpperCase() + w.substr(1);\n }\n\n // Step 1a\n re = re_1a\n re2 = re2_1a;\n\n if (re.test(w)) { w = w.replace(re,\"$1$2\"); }\n else if (re2.test(w)) { w = w.replace(re2,\"$1$2\"); }\n\n // Step 1b\n re = re_1b;\n re2 = re2_1b;\n if (re.test(w)) {\n var fp = re.exec(w);\n re = re_mgr0;\n if (re.test(fp[1])) {\n re = re_1b_2;\n w = w.replace(re,\"\");\n }\n } else if (re2.test(w)) {\n var fp = re2.exec(w);\n stem = fp[1];\n re2 = re_s_v;\n if (re2.test(stem)) {\n w = stem;\n re2 = re2_1b_2;\n re3 = re3_1b_2;\n re4 = re4_1b_2;\n if (re2.test(w)) { w = w + \"e\"; }\n else if (re3.test(w)) { re = re_1b_2; w = w.replace(re,\"\"); }\n else if (re4.test(w)) { w = w + \"e\"; }\n }\n }\n\n // Step 1c - replace suffix y or Y by i if preceded by a non-vowel which is not the first letter of the word (so cry -> cri, by -> by, say -> say)\n re = re_1c;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n w = stem + \"i\";\n }\n\n // Step 2\n re = re_2;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n suffix = fp[2];\n re = re_mgr0;\n if (re.test(stem)) {\n w = stem + step2list[suffix];\n }\n }\n\n // Step 3\n re = re_3;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n suffix = fp[2];\n re = re_mgr0;\n if (re.test(stem)) {\n w = stem + step3list[suffix];\n }\n }\n\n // Step 4\n re = re_4;\n re2 = re2_4;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = re_mgr1;\n if (re.test(stem)) {\n w = stem;\n }\n } else if (re2.test(w)) {\n var fp = re2.exec(w);\n stem = fp[1] + fp[2];\n re2 = re_mgr1;\n if (re2.test(stem)) {\n w = stem;\n }\n }\n\n // Step 5\n re = re_5;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = re_mgr1;\n re2 = re_meq1;\n re3 = re3_5;\n if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) {\n w = stem;\n }\n }\n\n re = re_5_1;\n re2 = re_mgr1;\n if (re.test(w) && re2.test(w)) {\n re = re_1b_2;\n w = w.replace(re,\"\");\n }\n\n // and turn initial Y back to y\n\n if (firstch == \"y\") {\n w = firstch.toLowerCase() + w.substr(1);\n }\n\n return w;\n };\n\n return porterStemmer;\n})();\n\nlunr.Pipeline.registerFunction(lunr.stemmer, 'stemmer')\n/*!\n * lunr.stopWordFilter\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.generateStopWordFilter builds a stopWordFilter function from the provided\n * list of stop words.\n *\n * The built in lunr.stopWordFilter is built using this generator and can be used\n * to generate custom stopWordFilters for applications or non English languages.\n *\n * @module\n * @param {Array} token The token to pass through the filter\n * @returns {Function}\n * @see lunr.Pipeline\n * @see lunr.stopWordFilter\n */\nlunr.generateStopWordFilter = function (stopWords) {\n var words = stopWords.reduce(function (memo, stopWord) {\n memo[stopWord] = stopWord\n return memo\n }, {})\n\n return function (token) {\n if (token && words[token] !== token) return token\n }\n}\n\n/**\n * lunr.stopWordFilter is an English language stop word list filter, any words\n * contained in the list will not be passed through the filter.\n *\n * This is intended to be used in the Pipeline. If the token does not pass the\n * filter then undefined will be returned.\n *\n * @module\n * @param {String} token The token to pass through the filter\n * @returns {String}\n * @see lunr.Pipeline\n */\nlunr.stopWordFilter = lunr.generateStopWordFilter([\n 'a',\n 'able',\n 'about',\n 'across',\n 'after',\n 'all',\n 'almost',\n 'also',\n 'am',\n 'among',\n 'an',\n 'and',\n 'any',\n 'are',\n 'as',\n 'at',\n 'be',\n 'because',\n 'been',\n 'but',\n 'by',\n 'can',\n 'cannot',\n 'could',\n 'dear',\n 'did',\n 'do',\n 'does',\n 'either',\n 'else',\n 'ever',\n 'every',\n 'for',\n 'from',\n 'get',\n 'got',\n 'had',\n 'has',\n 'have',\n 'he',\n 'her',\n 'hers',\n 'him',\n 'his',\n 'how',\n 'however',\n 'i',\n 'if',\n 'in',\n 'into',\n 'is',\n 'it',\n 'its',\n 'just',\n 'least',\n 'let',\n 'like',\n 'likely',\n 'may',\n 'me',\n 'might',\n 'most',\n 'must',\n 'my',\n 'neither',\n 'no',\n 'nor',\n 'not',\n 'of',\n 'off',\n 'often',\n 'on',\n 'only',\n 'or',\n 'other',\n 'our',\n 'own',\n 'rather',\n 'said',\n 'say',\n 'says',\n 'she',\n 'should',\n 'since',\n 'so',\n 'some',\n 'than',\n 'that',\n 'the',\n 'their',\n 'them',\n 'then',\n 'there',\n 'these',\n 'they',\n 'this',\n 'tis',\n 'to',\n 'too',\n 'twas',\n 'us',\n 'wants',\n 'was',\n 'we',\n 'were',\n 'what',\n 'when',\n 'where',\n 'which',\n 'while',\n 'who',\n 'whom',\n 'why',\n 'will',\n 'with',\n 'would',\n 'yet',\n 'you',\n 'your'\n])\n\nlunr.Pipeline.registerFunction(lunr.stopWordFilter, 'stopWordFilter')\n/*!\n * lunr.trimmer\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.trimmer is a pipeline function for trimming non word\n * characters from the begining and end of tokens before they\n * enter the index.\n *\n * This implementation may not work correctly for non latin\n * characters and should either be removed or adapted for use\n * with languages with non-latin characters.\n *\n * @module\n * @param {String} token The token to pass through the filter\n * @returns {String}\n * @see lunr.Pipeline\n */\nlunr.trimmer = function (token) {\n return token.replace(/^\\W+/, '').replace(/\\W+$/, '')\n}\n\nlunr.Pipeline.registerFunction(lunr.trimmer, 'trimmer')\n/*!\n * lunr.stemmer\n * Copyright (C) 2016 Oliver Nightingale\n * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt\n */\n\n/**\n * lunr.TokenStore is used for efficient storing and lookup of the reverse\n * index of token to document ref.\n *\n * @constructor\n */\nlunr.TokenStore = function () {\n this.root = { docs: {} }\n this.length = 0\n}\n\n/**\n * Loads a previously serialised token store\n *\n * @param {Object} serialisedData The serialised token store to load.\n * @returns {lunr.TokenStore}\n * @memberOf TokenStore\n */\nlunr.TokenStore.load = function (serialisedData) {\n var store = new this\n\n store.root = serialisedData.root\n store.length = serialisedData.length\n\n return store\n}\n\n/**\n * Adds a new token doc pair to the store.\n *\n * By default this function starts at the root of the current store, however\n * it can start at any node of any token store if required.\n *\n * @param {String} token The token to store the doc under\n * @param {Object} doc The doc to store against the token\n * @param {Object} root An optional node at which to start looking for the\n * correct place to enter the doc, by default the root of this lunr.TokenStore\n * is used.\n * @memberOf TokenStore\n */\nlunr.TokenStore.prototype.add = function (token, doc, root) {\n var root = root || this.root,\n key = token.charAt(0),\n rest = token.slice(1)\n\n if (!(key in root)) root[key] = {docs: {}}\n\n if (rest.length === 0) {\n root[key].docs[doc.ref] = doc\n this.length += 1\n return\n } else {\n return this.add(rest, doc, root[key])\n }\n}\n\n/**\n * Checks whether this key is contained within this lunr.TokenStore.\n *\n * By default this function starts at the root of the current store, however\n * it can start at any node of any token store if required.\n *\n * @param {String} token The token to check for\n * @param {Object} root An optional node at which to start\n * @memberOf TokenStore\n */\nlunr.TokenStore.prototype.has = function (token) {\n if (!token) return false\n\n var node = this.root\n\n for (var i = 0; i < token.length; i++) {\n if (!node[token.charAt(i)]) return false\n\n node = node[token.charAt(i)]\n }\n\n return true\n}\n\n/**\n * Retrieve a node from the token store for a given token.\n *\n * By default this function starts at the root of the current store, however\n * it can start at any node of any token store if required.\n *\n * @param {String} token The token to get the node for.\n * @param {Object} root An optional node at which to start.\n * @returns {Object}\n * @see TokenStore.prototype.get\n * @memberOf TokenStore\n */\nlunr.TokenStore.prototype.getNode = function (token) {\n if (!token) return {}\n\n var node = this.root\n\n for (var i = 0; i < token.length; i++) {\n if (!node[token.charAt(i)]) return {}\n\n node = node[token.charAt(i)]\n }\n\n return node\n}\n\n/**\n * Retrieve the documents for a node for the given token.\n *\n * By default this function starts at the root of the current store, however\n * it can start at any node of any token store if required.\n *\n * @param {String} token The token to get the documents for.\n * @param {Object} root An optional node at which to start.\n * @returns {Object}\n * @memberOf TokenStore\n */\nlunr.TokenStore.prototype.get = function (token, root) {\n return this.getNode(token, root).docs || {}\n}\n\nlunr.TokenStore.prototype.count = function (token, root) {\n return Object.keys(this.get(token, root)).length\n}\n\n/**\n * Remove the document identified by ref from the token in the store.\n *\n * By default this function starts at the root of the current store, however\n * it can start at any node of any token store if required.\n *\n * @param {String} token The token to get the documents for.\n * @param {String} ref The ref of the document to remove from this token.\n * @param {Object} root An optional node at which to start.\n * @returns {Object}\n * @memberOf TokenStore\n */\nlunr.TokenStore.prototype.remove = function (token, ref) {\n if (!token) return\n var node = this.root\n\n for (var i = 0; i < token.length; i++) {\n if (!(token.charAt(i) in node)) return\n node = node[token.charAt(i)]\n }\n\n delete node.docs[ref]\n}\n\n/**\n * Find all the possible suffixes of the passed token using tokens\n * currently in the store.\n *\n * @param {String} token The token to expand.\n * @returns {Array}\n * @memberOf TokenStore\n */\nlunr.TokenStore.prototype.expand = function (token, memo) {\n var root = this.getNode(token),\n docs = root.docs || {},\n memo = memo || []\n\n if (Object.keys(docs).length) memo.push(token)\n\n Object.keys(root)\n .forEach(function (key) {\n if (key === 'docs') return\n\n memo.concat(this.expand(token + key, memo))\n }, this)\n\n return memo\n}\n\n/**\n * Returns a representation of the token store ready for serialisation.\n *\n * @returns {Object}\n * @memberOf TokenStore\n */\nlunr.TokenStore.prototype.toJSON = function () {\n return {\n root: this.root,\n length: this.length\n }\n}\n\n /**\n * export the module via AMD, CommonJS or as a browser global\n * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js\n */\n ;(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(factory)\n } else if (typeof exports === 'object') {\n /**\n * Node. Does not work with strict CommonJS, but\n * only CommonJS-like enviroments that support module.exports,\n * like Node.\n */\n module.exports = factory()\n } else {\n // Browser globals (root is window)\n root.lunr = factory()\n }\n }(this, function () {\n /**\n * Just return a value to define the module export.\n * This example returns an object, but the module\n * can return a function as the exported value.\n */\n return lunr\n }))\n})();\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/lunr/lunr.js\n **/","/*\n * Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport Sidebar from \"./Material/Sidebar\"\n\n/* ----------------------------------------------------------------------------\n * Material application\n * ------------------------------------------------------------------------- */\n\nexport default\nclass Material {\n\n /**\n * Constructor\n *\n * @constructor\n */\n // constructor() {\n //\n // }\n\n /**\n * @return {void}\n */\n initialize() {\n\n // class AnchorMarker extends PageYOffsetListener\n // class SidebarConstrainer extends PageYOffsetListener\n\n // MatchMedia!?\n\n const width = window.matchMedia(\"(min-width: 1200px)\")\n\n // separate function in application.js --> initSidebar()\n const sidebar = new Sidebar.Position(\"[data-md-sidebar=primary]\")\n const handler = function() {\n if (width.matches) {\n sidebar.listen()\n } else {\n sidebar.unlisten()\n }\n }\n handler() // check listen!\n\n const toc = new Sidebar.Position(\"[data-md-sidebar=secondary]\")\n toc.listen()\n\n window.addEventListener(\"resize\", handler) // TODO: orientation change etc...\n\n const marker =\n new Sidebar.Marker(\"[data-md-sidebar=secondary] .md-nav__link\")\n marker.listen()\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/assets/javascripts/components/Material.js\n **/","/*\n * Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport Marker from \"./Sidebar/Marker\"\nimport Position from \"./Sidebar/Position\"\n\n/* ----------------------------------------------------------------------------\n * Definition\n * ------------------------------------------------------------------------- */\n\nexport default {\n Marker,\n Position\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/assets/javascripts/components/Material/Sidebar.js\n **/","/*\n * Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport Abstract from \"./Abstract\"\n\n/* ----------------------------------------------------------------------------\n * Definition\n * ------------------------------------------------------------------------- */\n\nexport default class Marker extends Abstract {\n\n /**\n * Mark anchors within the table of contents above current page y-offset\n *\n * @constructor\n * @param {(string|NodeList<HTMLElement>)} els - Selector or HTML elements\n */\n constructor(els) {\n super()\n\n /* Resolve elements */\n this.els_ = (typeof els === \"string\")\n ? document.querySelectorAll(els)\n : els\n\n /* Initialize index and page y-offset */\n this.index_ = 0\n this.offset_ = window.pageYOffset\n\n /* Index anchor nodes for fast lookup */\n this.anchors_ = [].map.call(this.els_, el => {\n return document.querySelector(el.hash)\n })\n }\n\n /**\n * Update anchor states\n *\n * @param {Event} ev - Event (omitted)\n */\n update() {\n const offset = window.pageYOffset\n\n /* Scroll direction is down */\n if (this.offset_ <= offset) {\n for (let i = this.index_ + 1; i < this.els_.length; i++) {\n if (this.anchors_[i].offsetTop <= offset) {\n if (i > 0)\n this.els_[i - 1].dataset.mdMarked = \"\"\n this.index_ = i\n } else {\n break\n }\n }\n\n /* Scroll direction is up */\n } else {\n for (let i = this.index_; i >= 0; i--) {\n if (this.anchors_[i].offsetTop > offset) {\n if (i > 0)\n delete this.els_[i - 1].dataset.mdMarked\n } else {\n this.index_ = i\n break\n }\n }\n }\n\n /* Remember current offset for next iteration */\n this.offset_ = offset\n }\n\n /**\n * Reset anchor states\n */\n reset() {\n [].forEach.call(this.els_, el => {\n delete el.dataset.mdMarked\n })\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/assets/javascripts/components/Material/Sidebar/Marker.js\n **/","/*\n * Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\n/* ----------------------------------------------------------------------------\n * Definition\n * ------------------------------------------------------------------------- */\n\nexport default class Abstract {\n\n /**\n * Dispatch update on next repaint\n *\n * @constructor\n */\n constructor() {\n if (this === Abstract)\n throw new TypeError(\"Cannot construct abstract instance\")\n\n /* Dispatch update on next repaint */\n this.handler_ = ev => {\n window.requestAnimationFrame(() => {\n this.update(ev)\n })\n }\n }\n\n /**\n * Update state\n *\n * @abstract\n */\n update() {\n throw new Error(\"update(): not implemented\")\n }\n\n /**\n * Reset state\n *\n * @abstract\n */\n reset() {\n throw new Error(\"reset(): not implemented\")\n }\n\n /**\n * Register listener for all relevant events\n */\n listen() {\n [\"scroll\", \"resize\", \"orientationchange\"].forEach(name => {\n window.addEventListener(name, this.handler_, false)\n })\n\n /* Initial update */\n this.update()\n }\n\n /**\n * Unregister listener for all relevant events\n */\n unlisten() {\n [\"scroll\", \"resize\", \"orientationchange\"].forEach(name => {\n window.removeEventListener(name, this.handler_, false)\n })\n\n /* Final reset */\n this.reset()\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/assets/javascripts/components/Material/Sidebar/Abstract.js\n **/","/*\n * Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport Abstract from \"./Abstract\"\n\n/* ----------------------------------------------------------------------------\n * Definition\n * ------------------------------------------------------------------------- */\n\nexport default class Position extends Abstract {\n\n /**\n * Set sidebars to locked state and limit height to parent node\n *\n * @constructor\n * @param {(string|HTMLElement)} el - Selector or HTML element\n */\n constructor(el) {\n super()\n\n /* Resolve elements */\n this.el_ = (typeof el === \"string\")\n ? document.querySelector(el)\n : el\n\n /* Index inner and outer container */\n const inner = this.el_.parentNode\n const outer = this.el_.parentNode.parentNode\n\n /* Get top and bottom bounds */\n this.offset_ = outer.offsetTop\n this.bounds_ = {\n top: inner.offsetTop,\n bottom: inner.offsetTop + inner.offsetHeight\n }\n\n /* Initialize current height */\n this.height_ = 0\n }\n\n /**\n * Update locked state and height\n *\n * @param {Event} ev - Event (omitted)\n */\n update() {\n const scroll = window.pageYOffset\n const expand = window.innerHeight\n\n /* Calculate new bounds */\n const offset = this.bounds_.top - scroll\n const height = expand\n - Math.max(0, scroll + expand - this.bounds_.bottom)\n - Math.max(offset, this.offset_)\n\n /* If height changed, update element */\n if (height !== this.height_)\n this.el_.style.height = `${this.height_ = height}px`\n\n /* Sidebar should be locked, as we're below parent offset */\n if (offset < this.offset_) {\n if (!this.el_.dataset.mdLocked)\n this.el_.dataset.mdLocked = \"\"\n\n /* Sidebar should be unlocked, if locked */\n } else if (typeof this.el_.dataset.mdLocked === \"string\") {\n delete this.el_.dataset.mdLocked\n }\n }\n\n /**\n * Reset locked state and height\n */\n reset() {\n delete this.el_.dataset.mdLocked\n this.el_.style.height = \"\"\n this.height_ = 0\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/assets/javascripts/components/Material/Sidebar/Position.js\n **/"],"sourceRoot":""} |