-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathd9f8c927ec667e17f2268abf6061dd74c94ec1bc-6a15cd98e659877f77b8.js.map
1 lines (1 loc) · 174 KB
/
d9f8c927ec667e17f2268abf6061dd74c94ec1bc-6a15cd98e659877f77b8.js.map
1
{"version":3,"sources":["webpack:///./node_modules/react-side-effect/lib/index.js","webpack:///./node_modules/shallowequal/index.js","webpack:///./static/New Patient Form.pdf","webpack:///./node_modules/react-helmet/lib/Helmet.js","webpack:///./node_modules/elasticlunr/elasticlunr.js","webpack:///./src/components/SearchBox/index.js","webpack:///./src/components/NavBar/index.js","webpack:///./src/components/Layout/index.js","webpack:///./node_modules/react-fast-compare/index.js","webpack:///./node_modules/react-helmet/lib/HelmetConstants.js","webpack:///./config.js","webpack:///./node_modules/gatsby/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack:///./node_modules/react-helmet/lib/HelmetUtils.js","webpack:///(webpack)/buildin/global.js"],"names":["_interopDefault","ex","React","React__default","shallowEqual","_defineProperty","obj","key","value","Object","defineProperty","enumerable","configurable","writable","canUseDOM","window","document","createElement","module","exports","reducePropsToState","handleStateChangeOnClient","mapStateOnServer","Error","WrappedComponent","state","mountedInstances","emitChange","map","instance","props","SideEffect","_Component","subClass","superClass","apply","this","arguments","prototype","create","constructor","__proto__","peek","rewind","recordedState","undefined","_proto","shouldComponentUpdate","nextProps","componentWillMount","push","componentDidUpdate","componentWillUnmount","index","indexOf","splice","render","Component","displayName","name","getDisplayName","objA","objB","compare","compareContext","ret","call","keysA","keys","keysB","length","bHasOwnProperty","hasOwnProperty","bind","idx","valueA","valueB","__esModule","Helmet","_extends","assign","target","i","source","_createClass","defineProperties","descriptor","Constructor","protoProps","staticProps","_react2","_interopRequireDefault","_propTypes2","_reactSideEffect2","_reactFastCompare2","_HelmetUtils","_HelmetConstants","default","_objectWithoutProperties","_classCallCheck","TypeError","_possibleConstructorReturn","self","ReferenceError","_class","_temp","HelmetSideEffects","handleClientStateChange","HelmetExport","_React$Component","HelmetWrapper","setPrototypeOf","_inherits","mapNestedChildrenToProps","child","nestedChildren","type","TAG_NAMES","SCRIPT","NOSCRIPT","innerHTML","STYLE","cssText","flattenArrayTypeChildren","_ref","_extends2","arrayTypeChildren","newChildProps","concat","mapObjectTypeChildren","_ref2","_extends3","_extends4","newProps","TITLE","titleAttributes","BODY","bodyAttributes","HTML","htmlAttributes","mapArrayTypeChildrenToProps","newFlattenedProps","forEach","arrayChildName","_extends5","warnOnInvalidChildren","mapChildrenToProps","children","_this2","Children","_child$props","childProps","convertReactPropstoHtmlAttributes","LINK","META","_props","set","propTypes","base","object","oneOfType","arrayOf","node","defaultTitle","string","defer","bool","encodeSpecialCharacters","link","meta","noscript","onChangeClientState","func","script","style","title","titleTemplate","defaultProps","mappedState","baseTag","linkTags","metaTags","noscriptTags","scriptTags","styleTags","renderStatic","global","step2list","step3list","v","C","re_mgr0","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","elasticlunr","config","Index","pipeline","add","trimmer","stopWordFilter","stemmer","version","lunr","utils","warn","message","console","toString","EventEmitter","events","addListener","args","Array","slice","fn","pop","names","hasHandler","removeListener","fnIndex","emit","tokenizer","str","isArray","arr","filter","token","t","toLowerCase","out","item","tokens","split","seperator","trim","defaultSeperator","setSeperator","sep","resetSeperator","getSeperator","Pipeline","_queue","registeredFunctions","registerFunction","label","getRegisteredFunction","warnIfFunctionNotRegistered","load","serialised","fnName","fns","after","existingFn","newFn","pos","before","remove","run","tokenLength","pipelineLength","j","reset","get","toJSON","_fields","documentStore","DocumentStore","eventEmitter","_idfCache","on","off","serialisedData","field","fields","ref","InvertedIndex","addField","fieldName","setRef","refName","saveDocument","save","addDoc","doc","emitEvent","docRef","fieldTokens","addFieldLength","tokenCount","termFrequency","Math","sqrt","addToken","tf","removeDocByRef","isDocStored","hasDoc","getDoc","removeDoc","removeToken","updateDoc","idf","term","cacheKey","df","getDocFreq","log","getFields","search","query","userConfig","configStr","JSON","stringify","Configuration","queryTokens","queryResults","fieldSearchResults","fieldSearch","fieldBoost","boost","results","score","sort","a","b","booleanType","expand","scores","docTokens","expandToken","queryTokenScores","docs","getDocs","filteredDocs","fieldSearchStats","getTermFrequency","fieldLength","getFieldLength","fieldLengthNorm","penality","mergeScores","coordNorm","accumScores","op","intersection","n","indexJson","use","plugin","unshift","_save","docInfo","store","copy","attr","clone","updateFieldLength","c","RegExp","w","stem","suffix","firstch","re","re2","re3","re4","substr","toUpperCase","test","replace","fp","exec","stopWords","clearStopWords","addStopWords","words","word","resetStopWords","defaultStopWords","root","tokenInfo","hasToken","getNode","memo","parse","buildUserConfig","error","buildDefaultConfig","global_bool","global_expand","field_config","field_expand","addAllFields2UserConfig","SortedSet","elements","element","locationFor","toArray","ctx","elem","start","end","sectionLength","pivot","floor","pivotElem","intersect","otherSet","intersectSet","a_len","b_len","union","longSet","shortSet","unionSet","shortSetElements","NavBar","toggleNavbar","isActive","data","className","aria-label","to","data-target","onClick","id","href","newpatientform","download","Layout","setState","siteTitle","content","siteDescription","keyList","hasProp","hasElementType","Element","equal","arrA","arrB","dateA","Date","dateB","getTime","regexpA","regexpB","$$typeof","match","number","ATTRIBUTE_NAMES","BASE","HEAD","REACT_TAG_MAP","VALID_TAG_NAMES","TAG_PROPERTIES","CHARSET","CSS_TEXT","HREF","HTTPEQUIV","INNER_HTML","ITEM_PROP","NAME","PROPERTY","REL","SRC","accesskey","charset","class","contenteditable","contextmenu","itemprop","tabindex","HELMET_PROPS","DEFAULT_TITLE","DEFER","ENCODE_SPECIAL_CHARACTERS","ON_CHANGE_CLIENT_STATE","TITLE_TEMPLATE","HTML_TAG_MAP","reduce","SELF_CLOSING_TAGS","HELMET_ATTRIBUTE","siteTitleAlt","siteLogo","siteUrl","pathPrefix","siteRss","siteFBAppID","googleTagManagerID","disqusShortname","userName","userTwitter","userLocation","userDescription","copyright","themeColor","backgroundColor","_assertThisInitialized","requestAnimationFrame","_typeof","Symbol","iterator","_objectAssign2","clock","encode","String","getTitleFromPropsList","propsList","innermostTitle","getInnermostProperty","innermostTemplate","innermostDefaultTitle","getOnChangeClientState","getAttributesFromPropsList","tagType","tagAttrs","current","getBaseTagFromPropsList","primaryAttributes","reverse","innermostBaseTag","tag","lowerCaseAttributeKey","getTagsFromPropsList","tagName","approvedSeenTags","approvedTags","instanceTags","instanceSeenTags","primaryAttributeKey","attributeKey","tagUnion","property","rafPolyfill","now","callback","currentTime","setTimeout","cafPolyfill","clearTimeout","webkitRequestAnimationFrame","mozRequestAnimationFrame","cancelAnimationFrame","webkitCancelAnimationFrame","mozCancelAnimationFrame","msg","_helmetCallback","commitTagChanges","newState","cb","updateAttributes","updateTitle","tagUpdates","updateTags","addedTags","removedTags","_tagUpdates$tagType","newTags","oldTags","flattenArray","possibleArray","join","attributes","elementTag","getElementsByTagName","helmetAttributeString","getAttribute","helmetAttributes","attributesToRemove","attributeKeys","attribute","setAttribute","indexToSave","_i","removeAttribute","tags","headElement","head","querySelector","tagNodes","querySelectorAll","indexToDelete","newElement","styleSheet","appendChild","createTextNode","some","existingTag","isEqualNode","parentNode","removeChild","generateElementAttributesAsString","convertElementAttributestoReactProps","initProps","getMethodsForTag","toComponent","_initProps","attributeString","flattenedTitle","generateTitleAsString","_mappedTag","mappedTag","mappedAttribute","dangerouslySetInnerHTML","__html","generateTagsAsReactComponent","attributeHtml","tagContent","isSelfClosing","generateTagsAsString","initAttributes","_ref$title","g","Function","e"],"mappings":"6FAEA,SAASA,EAAgBC,GACvB,OAAOA,GAAoB,iBAAPA,GAAmB,YAAaA,EAAKA,EAAY,QAAIA,EAG3E,IAAIC,EAAQ,EAAQ,QAEhBC,EAAiBH,EAAgBE,GAEjCE,EAAeJ,EAAgB,EAAQ,SAE3C,SAASK,EAAgBC,EAAKC,EAAKC,GAYjC,OAXID,KAAOD,EACTG,OAAOC,eAAeJ,EAAK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BsX,gBAAgBhV,MAAO0Y,KAwVxF7f,EAAQof,sBAAwBA,EAChCpf,EAAQ2M,KAAOA,I,yCC/hBf,IAAI2Z,EAGJA,EAAI,WACH,OAAOrlB,KADJ,GAIJ,IAECqlB,EAAIA,GAAK,IAAIC,SAAS,cAAb,GACR,MAAOC,GAEc,iBAAX5mB,SAAqB0mB,EAAI1mB,QAOrCG,EAAOC,QAAUsmB","file":"d9f8c927ec667e17f2268abf6061dd74c94ec1bc-6a15cd98e659877f77b8.js","sourcesContent":["'use strict';\n\nfunction _interopDefault(ex) {\n return ex && typeof ex === 'object' && 'default' in ex ? ex['default'] : ex;\n}\n\nvar React = require('react');\n\nvar React__default = _interopDefault(React);\n\nvar shallowEqual = _interopDefault(require('shallowequal'));\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nfunction withSideEffect(reducePropsToState, handleStateChangeOnClient, mapStateOnServer) {\n if (typeof reducePropsToState !== 'function') {\n throw new Error('Expected reducePropsToState to be a function.');\n }\n\n if (typeof handleStateChangeOnClient !== 'function') {\n throw new Error('Expected handleStateChangeOnClient to be a function.');\n }\n\n if (typeof mapStateOnServer !== 'undefined' && typeof mapStateOnServer !== 'function') {\n throw new Error('Expected mapStateOnServer to either be undefined or a function.');\n }\n\n function getDisplayName(WrappedComponent) {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n }\n\n return function wrap(WrappedComponent) {\n if (typeof WrappedComponent !== 'function') {\n throw new Error('Expected WrappedComponent to be a React component.');\n }\n\n var mountedInstances = [];\n var state;\n\n function emitChange() {\n state = reducePropsToState(mountedInstances.map(function (instance) {\n return instance.props;\n }));\n\n if (SideEffect.canUseDOM) {\n handleStateChangeOnClient(state);\n } else if (mapStateOnServer) {\n state = mapStateOnServer(state);\n }\n }\n\n var SideEffect = /*#__PURE__*/function (_Component) {\n _inheritsLoose(SideEffect, _Component);\n\n function SideEffect() {\n return _Component.apply(this, arguments) || this;\n } // Try to use displayName of wrapped component\n // Expose canUseDOM so tests can monkeypatch it\n\n\n SideEffect.peek = function peek() {\n return state;\n };\n\n SideEffect.rewind = function rewind() {\n if (SideEffect.canUseDOM) {\n throw new Error('You may only call rewind() on the server. Call peek() to read the current state.');\n }\n\n var recordedState = state;\n state = undefined;\n mountedInstances = [];\n return recordedState;\n };\n\n var _proto = SideEffect.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return !shallowEqual(nextProps, this.props);\n };\n\n _proto.componentWillMount = function componentWillMount() {\n mountedInstances.push(this);\n emitChange();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n emitChange();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n var index = mountedInstances.indexOf(this);\n mountedInstances.splice(index, 1);\n emitChange();\n };\n\n _proto.render = function render() {\n return React__default.createElement(WrappedComponent, this.props);\n };\n\n return SideEffect;\n }(React.Component);\n\n _defineProperty(SideEffect, \"displayName\", \"SideEffect(\" + getDisplayName(WrappedComponent) + \")\");\n\n _defineProperty(SideEffect, \"canUseDOM\", canUseDOM);\n\n return SideEffect;\n };\n}\n\nmodule.exports = withSideEffect;","//\nmodule.exports = function shallowEqual(objA, objB, compare, compareContext) {\n var ret = compare ? compare.call(compareContext, objA, objB) : void 0;\n\n if (ret !== void 0) {\n return !!ret;\n }\n\n if (objA === objB) {\n return true;\n }\n\n if (typeof objA !== \"object\" || !objA || typeof objB !== \"object\" || !objB) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB); // Test for A's keys different from B.\n\n for (var idx = 0; idx < keysA.length; idx++) {\n var key = keysA[idx];\n\n if (!bHasOwnProperty(key)) {\n return false;\n }\n\n var valueA = objA[key];\n var valueB = objB[key];\n ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;\n\n if (ret === false || ret === void 0 && valueA !== valueB) {\n return false;\n }\n }\n\n return true;\n};","module.exports = __webpack_public_path__ + \"static/New Patient Form-ba326b63f77c41be6522177be5bbcaf0.pdf\";","exports.__esModule = true;\nexports.Helmet = undefined;\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar _react = require(\"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require(\"prop-types\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _reactSideEffect = require(\"react-side-effect\");\n\nvar _reactSideEffect2 = _interopRequireDefault(_reactSideEffect);\n\nvar _reactFastCompare = require(\"react-fast-compare\");\n\nvar _reactFastCompare2 = _interopRequireDefault(_reactFastCompare);\n\nvar _HelmetUtils = require(\"./HelmetUtils.js\");\n\nvar _HelmetConstants = require(\"./HelmetConstants.js\");\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction _objectWithoutProperties(obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nvar Helmet = function Helmet(Component) {\n var _class, _temp;\n\n return _temp = _class = function (_React$Component) {\n _inherits(HelmetWrapper, _React$Component);\n\n function HelmetWrapper() {\n _classCallCheck(this, HelmetWrapper);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n HelmetWrapper.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return !(0, _reactFastCompare2.default)(this.props, nextProps);\n };\n\n HelmetWrapper.prototype.mapNestedChildrenToProps = function mapNestedChildrenToProps(child, nestedChildren) {\n if (!nestedChildren) {\n return null;\n }\n\n switch (child.type) {\n case _HelmetConstants.TAG_NAMES.SCRIPT:\n case _HelmetConstants.TAG_NAMES.NOSCRIPT:\n return {\n innerHTML: nestedChildren\n };\n\n case _HelmetConstants.TAG_NAMES.STYLE:\n return {\n cssText: nestedChildren\n };\n }\n\n throw new Error(\"<\" + child.type + \" /> elements are self-closing and can not contain children. Refer to our API for more information.\");\n };\n\n HelmetWrapper.prototype.flattenArrayTypeChildren = function flattenArrayTypeChildren(_ref) {\n var _extends2;\n\n var child = _ref.child,\n arrayTypeChildren = _ref.arrayTypeChildren,\n newChildProps = _ref.newChildProps,\n nestedChildren = _ref.nestedChildren;\n return _extends({}, arrayTypeChildren, (_extends2 = {}, _extends2[child.type] = [].concat(arrayTypeChildren[child.type] || [], [_extends({}, newChildProps, this.mapNestedChildrenToProps(child, nestedChildren))]), _extends2));\n };\n\n HelmetWrapper.prototype.mapObjectTypeChildren = function mapObjectTypeChildren(_ref2) {\n var _extends3, _extends4;\n\n var child = _ref2.child,\n newProps = _ref2.newProps,\n newChildProps = _ref2.newChildProps,\n nestedChildren = _ref2.nestedChildren;\n\n switch (child.type) {\n case _HelmetConstants.TAG_NAMES.TITLE:\n return _extends({}, newProps, (_extends3 = {}, _extends3[child.type] = nestedChildren, _extends3.titleAttributes = _extends({}, newChildProps), _extends3));\n\n case _HelmetConstants.TAG_NAMES.BODY:\n return _extends({}, newProps, {\n bodyAttributes: _extends({}, newChildProps)\n });\n\n case _HelmetConstants.TAG_NAMES.HTML:\n return _extends({}, newProps, {\n htmlAttributes: _extends({}, newChildProps)\n });\n }\n\n return _extends({}, newProps, (_extends4 = {}, _extends4[child.type] = _extends({}, newChildProps), _extends4));\n };\n\n HelmetWrapper.prototype.mapArrayTypeChildrenToProps = function mapArrayTypeChildrenToProps(arrayTypeChildren, newProps) {\n var newFlattenedProps = _extends({}, newProps);\n\n Object.keys(arrayTypeChildren).forEach(function (arrayChildName) {\n var _extends5;\n\n newFlattenedProps = _extends({}, newFlattenedProps, (_extends5 = {}, _extends5[arrayChildName] = arrayTypeChildren[arrayChildName], _extends5));\n });\n return newFlattenedProps;\n };\n\n HelmetWrapper.prototype.warnOnInvalidChildren = function warnOnInvalidChildren(child, nestedChildren) {\n if (process.env.NODE_ENV !== \"production\") {\n if (!_HelmetConstants.VALID_TAG_NAMES.some(function (name) {\n return child.type === name;\n })) {\n if (typeof child.type === \"function\") {\n return (0, _HelmetUtils.warn)(\"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.\");\n }\n\n return (0, _HelmetUtils.warn)(\"Only elements types \" + _HelmetConstants.VALID_TAG_NAMES.join(\", \") + \" are allowed. Helmet does not support rendering <\" + child.type + \"> elements. Refer to our API for more information.\");\n }\n\n if (nestedChildren && typeof nestedChildren !== \"string\" && (!Array.isArray(nestedChildren) || nestedChildren.some(function (nestedChild) {\n return typeof nestedChild !== \"string\";\n }))) {\n throw new Error(\"Helmet expects a string as a child of <\" + child.type + \">. Did you forget to wrap your children in braces? ( <\" + child.type + \">{``}</\" + child.type + \"> ) Refer to our API for more information.\");\n }\n }\n\n return true;\n };\n\n HelmetWrapper.prototype.mapChildrenToProps = function mapChildrenToProps(children, newProps) {\n var _this2 = this;\n\n var arrayTypeChildren = {};\n\n _react2.default.Children.forEach(children, function (child) {\n if (!child || !child.props) {\n return;\n }\n\n var _child$props = child.props,\n nestedChildren = _child$props.children,\n childProps = _objectWithoutProperties(_child$props, [\"children\"]);\n\n var newChildProps = (0, _HelmetUtils.convertReactPropstoHtmlAttributes)(childProps);\n\n _this2.warnOnInvalidChildren(child, nestedChildren);\n\n switch (child.type) {\n case _HelmetConstants.TAG_NAMES.LINK:\n case _HelmetConstants.TAG_NAMES.META:\n case _HelmetConstants.TAG_NAMES.NOSCRIPT:\n case _HelmetConstants.TAG_NAMES.SCRIPT:\n case _HelmetConstants.TAG_NAMES.STYLE:\n arrayTypeChildren = _this2.flattenArrayTypeChildren({\n child: child,\n arrayTypeChildren: arrayTypeChildren,\n newChildProps: newChildProps,\n nestedChildren: nestedChildren\n });\n break;\n\n default:\n newProps = _this2.mapObjectTypeChildren({\n child: child,\n newProps: newProps,\n newChildProps: newChildProps,\n nestedChildren: nestedChildren\n });\n break;\n }\n });\n\n newProps = this.mapArrayTypeChildrenToProps(arrayTypeChildren, newProps);\n return newProps;\n };\n\n HelmetWrapper.prototype.render = function render() {\n var _props = this.props,\n children = _props.children,\n props = _objectWithoutProperties(_props, [\"children\"]);\n\n var newProps = _extends({}, props);\n\n if (children) {\n newProps = this.mapChildrenToProps(children, newProps);\n }\n\n return _react2.default.createElement(Component, newProps);\n };\n\n _createClass(HelmetWrapper, null, [{\n key: \"canUseDOM\",\n // Component.peek comes from react-side-effect:\n // For testing, you may use a static peek() method available on the returned component.\n // It lets you get the current state without resetting the mounted instance stack.\n // Don’t use it for anything other than testing.\n\n /**\n * @param {Object} base: {\"target\": \"_blank\", \"href\": \"http://mysite.com/\"}\n * @param {Object} bodyAttributes: {\"className\": \"root\"}\n * @param {String} defaultTitle: \"Default Title\"\n * @param {Boolean} defer: true\n * @param {Boolean} encodeSpecialCharacters: true\n * @param {Object} htmlAttributes: {\"lang\": \"en\", \"amp\": undefined}\n * @param {Array} link: [{\"rel\": \"canonical\", \"href\": \"http://mysite.com/example\"}]\n * @param {Array} meta: [{\"name\": \"description\", \"content\": \"Test description\"}]\n * @param {Array} noscript: [{\"innerHTML\": \"<img src='http://mysite.com/js/test.js'\"}]\n * @param {Function} onChangeClientState: \"(newState) => console.log(newState)\"\n * @param {Array} script: [{\"type\": \"text/javascript\", \"src\": \"http://mysite.com/js/test.js\"}]\n * @param {Array} style: [{\"type\": \"text/css\", \"cssText\": \"div { display: block; color: blue; }\"}]\n * @param {String} title: \"Title\"\n * @param {Object} titleAttributes: {\"itemprop\": \"name\"}\n * @param {String} titleTemplate: \"MySite.com - %s\"\n */\n set: function set(canUseDOM) {\n Component.canUseDOM = canUseDOM;\n }\n }]);\n\n return HelmetWrapper;\n }(_react2.default.Component), _class.propTypes = {\n base: _propTypes2.default.object,\n bodyAttributes: _propTypes2.default.object,\n children: _propTypes2.default.oneOfType([_propTypes2.default.arrayOf(_propTypes2.default.node), _propTypes2.default.node]),\n defaultTitle: _propTypes2.default.string,\n defer: _propTypes2.default.bool,\n encodeSpecialCharacters: _propTypes2.default.bool,\n htmlAttributes: _propTypes2.default.object,\n link: _propTypes2.default.arrayOf(_propTypes2.default.object),\n meta: _propTypes2.default.arrayOf(_propTypes2.default.object),\n noscript: _propTypes2.default.arrayOf(_propTypes2.default.object),\n onChangeClientState: _propTypes2.default.func,\n script: _propTypes2.default.arrayOf(_propTypes2.default.object),\n style: _propTypes2.default.arrayOf(_propTypes2.default.object),\n title: _propTypes2.default.string,\n titleAttributes: _propTypes2.default.object,\n titleTemplate: _propTypes2.default.string\n }, _class.defaultProps = {\n defer: true,\n encodeSpecialCharacters: true\n }, _class.peek = Component.peek, _class.rewind = function () {\n var mappedState = Component.rewind();\n\n if (!mappedState) {\n // provide fallback if mappedState is undefined\n mappedState = (0, _HelmetUtils.mapStateOnServer)({\n baseTag: [],\n bodyAttributes: {},\n encodeSpecialCharacters: true,\n htmlAttributes: {},\n linkTags: [],\n metaTags: [],\n noscriptTags: [],\n scriptTags: [],\n styleTags: [],\n title: \"\",\n titleAttributes: {}\n });\n }\n\n return mappedState;\n }, _temp;\n};\n\nvar NullComponent = function NullComponent() {\n return null;\n};\n\nvar HelmetSideEffects = (0, _reactSideEffect2.default)(_HelmetUtils.reducePropsToState, _HelmetUtils.handleClientStateChange, _HelmetUtils.mapStateOnServer)(NullComponent);\nvar HelmetExport = Helmet(HelmetSideEffects);\nHelmetExport.renderStatic = HelmetExport.rewind;\nexports.Helmet = HelmetExport;\nexports.default = HelmetExport;","/**\n * elasticlunr - http://weixsong.github.io\n * Lightweight full-text search engine in Javascript for browser search and offline search. - 0.9.5\n *\n * Copyright (C) 2016 Oliver Nightingale\n * Copyright (C) 2016 Wei Song\n * MIT Licensed\n * @license\n */\n(function () {\n /*!\n * elasticlunr.js\n * Copyright (C) 2016 Oliver Nightingale\n * Copyright (C) 2016 Wei Song\n */\n\n /**\n * Convenience function for instantiating a new elasticlunr 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 * 1. elasticlunr.trimmer - trim non-word character\n * 2. elasticlunr.StopWordFilter - filters out any stop words before they enter the\n * index\n * 3. elasticlunr.stemmer - stems the tokens before entering the index.\n *\n *\n * Example:\n *\n * var idx = elasticlunr(function () {\n * this.addField('id');\n * this.addField('title');\n * this.addField('body');\n * \n * //this.setRef('id'); // default ref is 'id'\n *\n * this.pipeline.add(function () {\n * // some custom pipeline function\n * });\n * });\n * \n * idx.addDoc({\n * id: 1, \n * title: 'Oracle released database 12g',\n * body: 'Yestaday, Oracle has released their latest database, named 12g, more robust. this product will increase Oracle profit.'\n * });\n * \n * idx.addDoc({\n * id: 2, \n * title: 'Oracle released annual profit report',\n * body: 'Yestaday, Oracle has released their annual profit report of 2015, total profit is 12.5 Billion.'\n * });\n * \n * # simple search\n * idx.search('oracle database');\n * \n * # search with query-time boosting\n * idx.search('oracle database', {fields: {title: {boost: 2}, body: {boost: 1}}});\n *\n * @param {Function} config A function that will be called with the new instance\n * of the elasticlunr.Index as both its context and first parameter. It can be used to\n * customize the instance of new elasticlunr.Index.\n * @namespace\n * @module\n * @return {elasticlunr.Index}\n *\n */\n var elasticlunr = function elasticlunr(config) {\n var idx = new elasticlunr.Index();\n idx.pipeline.add(elasticlunr.trimmer, elasticlunr.stopWordFilter, elasticlunr.stemmer);\n if (config) config.call(idx, idx);\n return idx;\n };\n\n elasticlunr.version = \"0.9.5\"; // only used this to make elasticlunr.js compatible with lunr-languages\n // this is a trick to define a global alias of elasticlunr\n\n lunr = elasticlunr;\n /*!\n * elasticlunr.utils\n * Copyright (C) 2016 Oliver Nightingale\n * Copyright (C) 2016 Wei Song\n */\n\n /**\n * A namespace containing utils for the rest of the elasticlunr library\n */\n\n elasticlunr.utils = {};\n /**\n * Print a warning message to the console.\n *\n * @param {String} message The message to be printed.\n * @memberOf Utils\n */\n\n elasticlunr.utils.warn = function (global) {\n return function (message) {\n if (global.console && console.warn) {\n console.warn(message);\n }\n };\n }(this);\n /**\n * Convert an object to string.\n *\n * In the case of `null` and `undefined` the function returns\n * an empty string, in all other cases the result of calling\n * `toString` on the passed object is returned.\n *\n * @param {object} obj The object to convert to a string.\n * @return {String} string representation of the passed object.\n * @memberOf Utils\n */\n\n\n elasticlunr.utils.toString = function (obj) {\n if (obj === void 0 || obj === null) {\n return \"\";\n }\n\n return obj.toString();\n };\n /*!\n * elasticlunr.EventEmitter\n * Copyright (C) 2016 Oliver Nightingale\n * Copyright (C) 2016 Wei Song\n */\n\n /**\n * elasticlunr.EventEmitter is an event emitter for elasticlunr.\n * It manages adding and removing event handlers and triggering events and their handlers.\n *\n * Each event could has multiple corresponding functions,\n * these functions will be called as the sequence that they are added into the event.\n * \n * @constructor\n */\n\n\n elasticlunr.EventEmitter = function () {\n this.events = {};\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 */\n\n\n elasticlunr.EventEmitter.prototype.addListener = function () {\n var args = Array.prototype.slice.call(arguments),\n fn = args.pop(),\n names = args;\n if (typeof fn !== \"function\") throw new TypeError(\"last argument must be a function\");\n names.forEach(function (name) {\n if (!this.hasHandler(name)) this.events[name] = [];\n this.events[name].push(fn);\n }, this);\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 */\n\n\n elasticlunr.EventEmitter.prototype.removeListener = function (name, fn) {\n if (!this.hasHandler(name)) return;\n var fnIndex = this.events[name].indexOf(fn);\n if (fnIndex === -1) return;\n this.events[name].splice(fnIndex, 1);\n if (this.events[name].length == 0) delete this.events[name];\n };\n /**\n * Call all functions that bounded 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 */\n\n\n elasticlunr.EventEmitter.prototype.emit = function (name) {\n if (!this.hasHandler(name)) return;\n var args = Array.prototype.slice.call(arguments, 1);\n this.events[name].forEach(function (fn) {\n fn.apply(undefined, args);\n }, this);\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 */\n\n\n elasticlunr.EventEmitter.prototype.hasHandler = function (name) {\n return name in this.events;\n };\n /*!\n * elasticlunr.tokenizer\n * Copyright (C) 2016 Oliver Nightingale\n * Copyright (C) 2016 Wei Song\n */\n\n /**\n * A function for splitting a string into tokens.\n * Currently English is supported as default.\n * Uses `elasticlunr.tokenizer.seperator` to split strings, you could change\n * the value of this property to set how you want strings are split into tokens.\n * IMPORTANT: use elasticlunr.tokenizer.seperator carefully, if you are not familiar with\n * text process, then you'd better not change it.\n *\n * @module\n * @param {String} str The string that you want to tokenize.\n * @see elasticlunr.tokenizer.seperator\n * @return {Array}\n */\n\n\n elasticlunr.tokenizer = function (str) {\n if (!arguments.length || str === null || str === undefined) return [];\n\n if (Array.isArray(str)) {\n var arr = str.filter(function (token) {\n if (token === null || token === undefined) {\n return false;\n }\n\n return true;\n });\n arr = arr.map(function (t) {\n return elasticlunr.utils.toString(t).toLowerCase();\n });\n var out = [];\n arr.forEach(function (item) {\n var tokens = item.split(elasticlunr.tokenizer.seperator);\n out = out.concat(tokens);\n }, this);\n return out;\n }\n\n return str.toString().trim().toLowerCase().split(elasticlunr.tokenizer.seperator);\n };\n /**\n * Default string seperator.\n */\n\n\n elasticlunr.tokenizer.defaultSeperator = /[\\s\\-]+/;\n /**\n * The sperator used to split a string into tokens. Override this property to change the behaviour of\n * `elasticlunr.tokenizer` behaviour when tokenizing strings. By default this splits on whitespace and hyphens.\n *\n * @static\n * @see elasticlunr.tokenizer\n */\n\n elasticlunr.tokenizer.seperator = elasticlunr.tokenizer.defaultSeperator;\n /**\n * Set up customized string seperator\n *\n * @param {Object} sep The customized seperator that you want to use to tokenize a string.\n */\n\n elasticlunr.tokenizer.setSeperator = function (sep) {\n if (sep !== null && sep !== undefined && typeof sep === 'object') {\n elasticlunr.tokenizer.seperator = sep;\n }\n };\n /**\n * Reset string seperator\n *\n */\n\n\n elasticlunr.tokenizer.resetSeperator = function () {\n elasticlunr.tokenizer.seperator = elasticlunr.tokenizer.defaultSeperator;\n };\n /**\n * Get string seperator\n *\n */\n\n\n elasticlunr.tokenizer.getSeperator = function () {\n return elasticlunr.tokenizer.seperator;\n };\n /*!\n * elasticlunr.Pipeline\n * Copyright (C) 2016 Oliver Nightingale\n * Copyright (C) 2016 Wei Song\n */\n\n /**\n * elasticlunr.Pipelines maintain an ordered list of functions to be applied to \n * both documents tokens and query tokens.\n *\n * An instance of elasticlunr.Index will contain a pipeline\n * with a trimmer, a stop word filter, an English 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, it will call each function in turn.\n *\n * The output of the 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 elasticlunr.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 */\n\n\n elasticlunr.Pipeline = function () {\n this._queue = [];\n };\n\n elasticlunr.Pipeline.registeredFunctions = {};\n /**\n * Register a function in 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 register.\n * @param {String} label The label to register this function with\n * @memberOf Pipeline\n */\n\n elasticlunr.Pipeline.registerFunction = function (fn, label) {\n if (label in elasticlunr.Pipeline.registeredFunctions) {\n elasticlunr.utils.warn('Overwriting existing registered function: ' + label);\n }\n\n fn.label = label;\n elasticlunr.Pipeline.registeredFunctions[label] = fn;\n };\n /**\n * Get a registered function in the pipeline.\n *\n * @param {String} label The label of registered function.\n * @return {Function}\n * @memberOf Pipeline\n */\n\n\n elasticlunr.Pipeline.getRegisteredFunction = function (label) {\n if (label in elasticlunr.Pipeline.registeredFunctions !== true) {\n return null;\n }\n\n return elasticlunr.Pipeline.registeredFunctions[label];\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 */\n\n\n elasticlunr.Pipeline.warnIfFunctionNotRegistered = function (fn) {\n var isRegistered = fn.label && fn.label in this.registeredFunctions;\n\n if (!isRegistered) {\n elasticlunr.utils.warn('Function is not registered with pipeline. This may cause problems when serialising the index.\\n', fn);\n }\n };\n /**\n * Loads a previously serialised pipeline.\n *\n * All functions to be loaded must already be registered with elasticlunr.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 * @return {elasticlunr.Pipeline}\n * @memberOf Pipeline\n */\n\n\n elasticlunr.Pipeline.load = function (serialised) {\n var pipeline = new elasticlunr.Pipeline();\n serialised.forEach(function (fnName) {\n var fn = elasticlunr.Pipeline.getRegisteredFunction(fnName);\n\n if (fn) {\n pipeline.add(fn);\n } else {\n throw new Error('Cannot load un-registered function: ' + fnName);\n }\n });\n return pipeline;\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 */\n\n\n elasticlunr.Pipeline.prototype.add = function () {\n var fns = Array.prototype.slice.call(arguments);\n fns.forEach(function (fn) {\n elasticlunr.Pipeline.warnIfFunctionNotRegistered(fn);\n\n this._queue.push(fn);\n }, this);\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 * If existingFn is not found, throw an Exception.\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 */\n\n\n elasticlunr.Pipeline.prototype.after = function (existingFn, newFn) {\n elasticlunr.Pipeline.warnIfFunctionNotRegistered(newFn);\n\n var pos = this._queue.indexOf(existingFn);\n\n if (pos === -1) {\n throw new Error('Cannot find existingFn');\n }\n\n this._queue.splice(pos + 1, 0, newFn);\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 * If existingFn is not found, throw an Exception.\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 */\n\n\n elasticlunr.Pipeline.prototype.before = function (existingFn, newFn) {\n elasticlunr.Pipeline.warnIfFunctionNotRegistered(newFn);\n\n var pos = this._queue.indexOf(existingFn);\n\n if (pos === -1) {\n throw new Error('Cannot find existingFn');\n }\n\n this._queue.splice(pos, 0, newFn);\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 */\n\n\n elasticlunr.Pipeline.prototype.remove = function (fn) {\n var pos = this._queue.indexOf(fn);\n\n if (pos === -1) {\n return;\n }\n\n this._queue.splice(pos, 1);\n };\n /**\n * Runs the current list of functions that registered in the pipeline against the\n * input tokens.\n *\n * @param {Array} tokens The tokens to run through the pipeline.\n * @return {Array}\n * @memberOf Pipeline\n */\n\n\n elasticlunr.Pipeline.prototype.run = function (tokens) {\n var out = [],\n tokenLength = tokens.length,\n pipelineLength = this._queue.length;\n\n for (var i = 0; i < tokenLength; i++) {\n var token = tokens[i];\n\n for (var j = 0; j < pipelineLength; j++) {\n token = this._queue[j](token, i, tokens);\n if (token === void 0 || token === null) break;\n }\n\n ;\n if (token !== void 0 && token !== null) out.push(token);\n }\n\n ;\n return out;\n };\n /**\n * Resets the pipeline by removing any existing processors.\n *\n * @memberOf Pipeline\n */\n\n\n elasticlunr.Pipeline.prototype.reset = function () {\n this._queue = [];\n };\n /**\n * Get the pipeline if user want to check the pipeline.\n *\n * @memberOf Pipeline\n */\n\n\n elasticlunr.Pipeline.prototype.get = function () {\n return this._queue;\n };\n /**\n * Returns a representation of the pipeline ready for serialisation.\n * Only serialize pipeline function's name. Not storing function, so when\n * loading the archived JSON index file, corresponding pipeline function is \n * added by registered function of elasticlunr.Pipeline.registeredFunctions\n *\n * Logs a warning if the function has not been registered.\n *\n * @return {Array}\n * @memberOf Pipeline\n */\n\n\n elasticlunr.Pipeline.prototype.toJSON = function () {\n return this._queue.map(function (fn) {\n elasticlunr.Pipeline.warnIfFunctionNotRegistered(fn);\n return fn.label;\n });\n };\n /*!\n * elasticlunr.Index\n * Copyright (C) 2016 Oliver Nightingale\n * Copyright (C) 2016 Wei Song\n */\n\n /**\n * elasticlunr.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 */\n\n\n elasticlunr.Index = function () {\n this._fields = [];\n this._ref = 'id';\n this.pipeline = new elasticlunr.Pipeline();\n this.documentStore = new elasticlunr.DocumentStore();\n this.index = {};\n this.eventEmitter = new elasticlunr.EventEmitter();\n this._idfCache = {};\n this.on('add', 'remove', 'update', function () {\n this._idfCache = {};\n }.bind(this));\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 */\n\n\n elasticlunr.Index.prototype.on = function () {\n var args = Array.prototype.slice.call(arguments);\n return this.eventEmitter.addListener.apply(this.eventEmitter, args);\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 */\n\n\n elasticlunr.Index.prototype.off = function (name, fn) {\n return this.eventEmitter.removeListener(name, fn);\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 elasticlunr.\n *\n * @param {Object} serialisedData The serialised set to load.\n * @return {elasticlunr.Index}\n * @memberOf Index\n */\n\n\n elasticlunr.Index.load = function (serialisedData) {\n if (serialisedData.version !== elasticlunr.version) {\n elasticlunr.utils.warn('version mismatch: current ' + elasticlunr.version + ' importing ' + serialisedData.version);\n }\n\n var idx = new this();\n idx._fields = serialisedData.fields;\n idx._ref = serialisedData.ref;\n idx.documentStore = elasticlunr.DocumentStore.load(serialisedData.documentStore);\n idx.pipeline = elasticlunr.Pipeline.load(serialisedData.pipeline);\n idx.index = {};\n\n for (var field in serialisedData.index) {\n idx.index[field] = elasticlunr.InvertedIndex.load(serialisedData.index[field]);\n }\n\n return idx;\n };\n /**\n * Adds a field to the list of fields that will be searchable within documents in the index.\n *\n * Remember that inner index is build based on field, which means each field has one inverted index.\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 should be indexed\n * @return {elasticlunr.Index}\n * @memberOf Index\n */\n\n\n elasticlunr.Index.prototype.addField = function (fieldName) {\n this._fields.push(fieldName);\n\n this.index[fieldName] = new elasticlunr.InvertedIndex();\n return this;\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 * @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 * @return {elasticlunr.Index}\n * @memberOf Index\n */\n\n\n elasticlunr.Index.prototype.setRef = function (refName) {\n this._ref = refName;\n return this;\n };\n /**\n *\n * Set if the JSON format original documents are save into elasticlunr.DocumentStore\n *\n * Defaultly save all the original JSON documents.\n *\n * @param {Boolean} save Whether to save the original JSON documents.\n * @return {elasticlunr.Index}\n * @memberOf Index\n */\n\n\n elasticlunr.Index.prototype.saveDocument = function (save) {\n this.documentStore = new elasticlunr.DocumentStore(save);\n return this;\n };\n /**\n * Add a JSON format 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 JSON format document to add to the index.\n * @param {Boolean} emitEvent Whether or not to emit events, default true.\n * @memberOf Index\n */\n\n\n elasticlunr.Index.prototype.addDoc = function (doc, emitEvent) {\n if (!doc) return;\n var emitEvent = emitEvent === undefined ? true : emitEvent;\n var docRef = doc[this._ref];\n this.documentStore.addDoc(docRef, doc);\n\n this._fields.forEach(function (field) {\n var fieldTokens = this.pipeline.run(elasticlunr.tokenizer(doc[field]));\n this.documentStore.addFieldLength(docRef, field, fieldTokens.length);\n var tokenCount = {};\n fieldTokens.forEach(function (token) {\n if (token in tokenCount) tokenCount[token] += 1;else tokenCount[token] = 1;\n }, this);\n\n for (var token in tokenCount) {\n var termFrequency = tokenCount[token];\n termFrequency = Math.sqrt(termFrequency);\n this.index[field].addToken(token, {\n ref: docRef,\n tf: termFrequency\n });\n }\n }, this);\n\n if (emitEvent) this.eventEmitter.emit('add', doc, this);\n };\n /**\n * Removes a document from the index by doc ref.\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 * 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 * If user setting DocumentStore not storing the documents, then remove doc by docRef is not allowed.\n *\n * @param {String|Integer} docRef The document ref to remove from the index.\n * @param {Boolean} emitEvent Whether to emit remove events, defaults to true\n * @memberOf Index\n */\n\n\n elasticlunr.Index.prototype.removeDocByRef = function (docRef, emitEvent) {\n if (!docRef) return;\n\n if (this.documentStore.isDocStored() === false) {\n return;\n }\n\n if (!this.documentStore.hasDoc(docRef)) return;\n var doc = this.documentStore.getDoc(docRef);\n this.removeDoc(doc, false);\n };\n /**\n * Removes a document from the index.\n * This remove operation could work even the original doc is not store in the DocumentStore.\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 * 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 *\n * @param {Object} doc The document ref to remove from the index.\n * @param {Boolean} emitEvent Whether to emit remove events, defaults to true\n * @memberOf Index\n */\n\n\n elasticlunr.Index.prototype.removeDoc = function (doc, emitEvent) {\n if (!doc) return;\n var emitEvent = emitEvent === undefined ? true : emitEvent;\n var docRef = doc[this._ref];\n if (!this.documentStore.hasDoc(docRef)) return;\n this.documentStore.removeDoc(docRef);\n\n this._fields.forEach(function (field) {\n var fieldTokens = this.pipeline.run(elasticlunr.tokenizer(doc[field]));\n fieldTokens.forEach(function (token) {\n this.index[field].removeToken(token, docRef);\n }, this);\n }, this);\n\n if (emitEvent) this.eventEmitter.emit('remove', doc, this);\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 */\n\n\n elasticlunr.Index.prototype.updateDoc = function (doc, emitEvent) {\n var emitEvent = emitEvent === undefined ? true : emitEvent;\n this.removeDocByRef(doc[this._ref], false);\n this.addDoc(doc, false);\n if (emitEvent) this.eventEmitter.emit('update', doc, this);\n };\n /**\n * Calculates the inverse document frequency for a token within the index of a field.\n *\n * @param {String} token The token to calculate the idf of.\n * @param {String} field The field to compute idf.\n * @see Index.prototype.idf\n * @private\n * @memberOf Index\n */\n\n\n elasticlunr.Index.prototype.idf = function (term, field) {\n var cacheKey = \"@\" + field + '/' + term;\n if (Object.prototype.hasOwnProperty.call(this._idfCache, cacheKey)) return this._idfCache[cacheKey];\n var df = this.index[field].getDocFreq(term);\n var idf = 1 + Math.log(this.documentStore.length / (df + 1));\n this._idfCache[cacheKey] = idf;\n return idf;\n };\n /**\n * get fields of current index instance\n *\n * @return {Array}\n */\n\n\n elasticlunr.Index.prototype.getFields = function () {\n return this._fields.slice();\n };\n /**\n * Searches the index using the passed query.\n * Queries should be a string, multiple words are allowed.\n *\n * If config is null, will search all fields defaultly, and lead to OR based query.\n * If config is specified, will search specified with query time boosting.\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 * @param {JSON} userConfig The user query config, JSON format.\n * @return {Object}\n * @see Index.prototype.idf\n * @see Index.prototype.documentVector\n * @memberOf Index\n */\n\n\n elasticlunr.Index.prototype.search = function (query, userConfig) {\n if (!query) return [];\n var configStr = null;\n\n if (userConfig != null) {\n configStr = JSON.stringify(userConfig);\n }\n\n var config = new elasticlunr.Configuration(configStr, this.getFields()).get();\n var queryTokens = this.pipeline.run(elasticlunr.tokenizer(query));\n var queryResults = {};\n\n for (var field in config) {\n var fieldSearchResults = this.fieldSearch(queryTokens, field, config);\n var fieldBoost = config[field].boost;\n\n for (var docRef in fieldSearchResults) {\n fieldSearchResults[docRef] = fieldSearchResults[docRef] * fieldBoost;\n }\n\n for (var docRef in fieldSearchResults) {\n if (docRef in queryResults) {\n queryResults[docRef] += fieldSearchResults[docRef];\n } else {\n queryResults[docRef] = fieldSearchResults[docRef];\n }\n }\n }\n\n var results = [];\n\n for (var docRef in queryResults) {\n results.push({\n ref: docRef,\n score: queryResults[docRef]\n });\n }\n\n results.sort(function (a, b) {\n return b.score - a.score;\n });\n return results;\n };\n /**\n * search queryTokens in specified field.\n *\n * @param {Array} queryTokens The query tokens to query in this field.\n * @param {String} field Field to query in.\n * @param {elasticlunr.Configuration} config The user query config, JSON format.\n * @return {Object}\n */\n\n\n elasticlunr.Index.prototype.fieldSearch = function (queryTokens, fieldName, config) {\n var booleanType = config[fieldName].bool;\n var expand = config[fieldName].expand;\n var boost = config[fieldName].boost;\n var scores = null;\n var docTokens = {}; // Do nothing if the boost is 0\n\n if (boost === 0) {\n return;\n }\n\n queryTokens.forEach(function (token) {\n var tokens = [token];\n\n if (expand == true) {\n tokens = this.index[fieldName].expandToken(token);\n } // Consider every query token in turn. If expanded, each query token\n // corresponds to a set of tokens, which is all tokens in the \n // index matching the pattern queryToken* .\n // For the set of tokens corresponding to a query token, find and score\n // all matching documents. Store those scores in queryTokenScores, \n // keyed by docRef.\n // Then, depending on the value of booleanType, combine the scores\n // for this query token with previous scores. If booleanType is OR,\n // then merge the scores by summing into the accumulated total, adding\n // new document scores are required (effectively a union operator). \n // If booleanType is AND, accumulate scores only if the document \n // has previously been scored by another query token (an intersection\n // operation0. \n // Furthermore, since when booleanType is AND, additional \n // query tokens can't add new documents to the result set, use the\n // current document set to limit the processing of each new query \n // token for efficiency (i.e., incremental intersection).\n\n\n var queryTokenScores = {};\n tokens.forEach(function (key) {\n var docs = this.index[fieldName].getDocs(key);\n var idf = this.idf(key, fieldName);\n\n if (scores && booleanType == 'AND') {\n // special case, we can rule out documents that have been\n // already been filtered out because they weren't scored\n // by previous query token passes.\n var filteredDocs = {};\n\n for (var docRef in scores) {\n if (docRef in docs) {\n filteredDocs[docRef] = docs[docRef];\n }\n }\n\n docs = filteredDocs;\n } // only record appeared token for retrieved documents for the\n // original token, not for expaned token.\n // beause for doing coordNorm for a retrieved document, coordNorm only care how many\n // query token appear in that document.\n // so expanded token should not be added into docTokens, if added, this will pollute the\n // coordNorm\n\n\n if (key == token) {\n this.fieldSearchStats(docTokens, key, docs);\n }\n\n for (var docRef in docs) {\n var tf = this.index[fieldName].getTermFrequency(key, docRef);\n var fieldLength = this.documentStore.getFieldLength(docRef, fieldName);\n var fieldLengthNorm = 1;\n\n if (fieldLength != 0) {\n fieldLengthNorm = 1 / Math.sqrt(fieldLength);\n }\n\n var penality = 1;\n\n if (key != token) {\n // currently I'm not sure if this penality is enough,\n // need to do verification\n penality = (1 - (key.length - token.length) / key.length) * 0.15;\n }\n\n var score = tf * idf * fieldLengthNorm * penality;\n\n if (docRef in queryTokenScores) {\n queryTokenScores[docRef] += score;\n } else {\n queryTokenScores[docRef] = score;\n }\n }\n }, this);\n scores = this.mergeScores(scores, queryTokenScores, booleanType);\n }, this);\n scores = this.coordNorm(scores, docTokens, queryTokens.length);\n return scores;\n };\n /**\n * Merge the scores from one set of tokens into an accumulated score table.\n * Exact operation depends on the op parameter. If op is 'AND', then only the\n * intersection of the two score lists is retained. Otherwise, the union of\n * the two score lists is returned. For internal use only.\n *\n * @param {Object} bool accumulated scores. Should be null on first call.\n * @param {String} scores new scores to merge into accumScores.\n * @param {Object} op merge operation (should be 'AND' or 'OR').\n *\n */\n\n\n elasticlunr.Index.prototype.mergeScores = function (accumScores, scores, op) {\n if (!accumScores) {\n return scores;\n }\n\n if (op == 'AND') {\n var intersection = {};\n\n for (var docRef in scores) {\n if (docRef in accumScores) {\n intersection[docRef] = accumScores[docRef] + scores[docRef];\n }\n }\n\n return intersection;\n } else {\n for (var docRef in scores) {\n if (docRef in accumScores) {\n accumScores[docRef] += scores[docRef];\n } else {\n accumScores[docRef] = scores[docRef];\n }\n }\n\n return accumScores;\n }\n };\n /**\n * Record the occuring query token of retrieved doc specified by doc field.\n * Only for inner user.\n *\n * @param {Object} docTokens a data structure stores which token appears in the retrieved doc.\n * @param {String} token query token\n * @param {Object} docs the retrieved documents of the query token\n *\n */\n\n\n elasticlunr.Index.prototype.fieldSearchStats = function (docTokens, token, docs) {\n for (var doc in docs) {\n if (doc in docTokens) {\n docTokens[doc].push(token);\n } else {\n docTokens[doc] = [token];\n }\n }\n };\n /**\n * coord norm the score of a doc.\n * if a doc contain more query tokens, then the score will larger than the doc\n * contains less query tokens.\n *\n * only for inner use.\n *\n * @param {Object} results first results\n * @param {Object} docs field search results of a token\n * @param {Integer} n query token number\n * @return {Object}\n */\n\n\n elasticlunr.Index.prototype.coordNorm = function (scores, docTokens, n) {\n for (var doc in scores) {\n if (!(doc in docTokens)) continue;\n var tokens = docTokens[doc].length;\n scores[doc] = scores[doc] * tokens / n;\n }\n\n return scores;\n };\n /**\n * Returns a representation of the index ready for serialisation.\n *\n * @return {Object}\n * @memberOf Index\n */\n\n\n elasticlunr.Index.prototype.toJSON = function () {\n var indexJson = {};\n\n this._fields.forEach(function (field) {\n indexJson[field] = this.index[field].toJSON();\n }, this);\n\n return {\n version: elasticlunr.version,\n fields: this._fields,\n ref: this._ref,\n documentStore: this.documentStore.toJSON(),\n index: indexJson,\n pipeline: this.pipeline.toJSON()\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 = elasticlunr(function () {\n * this.use(myPlugin, 'arg1', 'arg2')\n * })\n *\n * @param {Function} plugin The plugin to apply.\n * @memberOf Index\n */\n\n\n elasticlunr.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 * elasticlunr.DocumentStore\n * Copyright (C) 2016 Wei Song\n */\n\n /**\n * elasticlunr.DocumentStore is a simple key-value document store used for storing sets of tokens for\n * documents stored in index.\n *\n * elasticlunr.DocumentStore store original JSON format documents that you could build search snippet by this original JSON document.\n *\n * user could choose whether original JSON format document should be store, if no configuration then document will be stored defaultly.\n * If user care more about the index size, user could select not store JSON documents, then this will has some defects, such as user\n * could not use JSON document to generate snippets of search results.\n *\n * @param {Boolean} save If the original JSON document should be stored.\n * @constructor\n * @module\n */\n\n\n elasticlunr.DocumentStore = function (save) {\n if (save === null || save === undefined) {\n this._save = true;\n } else {\n this._save = save;\n }\n\n this.docs = {};\n this.docInfo = {};\n this.length = 0;\n };\n /**\n * Loads a previously serialised document store\n *\n * @param {Object} serialisedData The serialised document store to load.\n * @return {elasticlunr.DocumentStore}\n */\n\n\n elasticlunr.DocumentStore.load = function (serialisedData) {\n var store = new this();\n store.length = serialisedData.length;\n store.docs = serialisedData.docs;\n store.docInfo = serialisedData.docInfo;\n store._save = serialisedData.save;\n return store;\n };\n /**\n * check if current instance store the original doc\n *\n * @return {Boolean}\n */\n\n\n elasticlunr.DocumentStore.prototype.isDocStored = function () {\n return this._save;\n };\n /**\n * Stores the given doc in the document store against the given id.\n * If docRef already exist, then update doc.\n *\n * Document is store by original JSON format, then you could use original document to generate search snippets.\n *\n * @param {Integer|String} docRef The key used to store the JSON format doc.\n * @param {Object} doc The JSON format doc.\n */\n\n\n elasticlunr.DocumentStore.prototype.addDoc = function (docRef, doc) {\n if (!this.hasDoc(docRef)) this.length++;\n\n if (this._save === true) {\n this.docs[docRef] = clone(doc);\n } else {\n this.docs[docRef] = null;\n }\n };\n /**\n * Retrieves the JSON doc from the document store for a given key.\n *\n * If docRef not found, return null.\n * If user set not storing the documents, return null.\n *\n * @param {Integer|String} docRef The key to lookup and retrieve from the document store.\n * @return {Object}\n * @memberOf DocumentStore\n */\n\n\n elasticlunr.DocumentStore.prototype.getDoc = function (docRef) {\n if (this.hasDoc(docRef) === false) return null;\n return this.docs[docRef];\n };\n /**\n * Checks whether the document store contains a key (docRef).\n *\n * @param {Integer|String} docRef The id to look up in the document store.\n * @return {Boolean}\n * @memberOf DocumentStore\n */\n\n\n elasticlunr.DocumentStore.prototype.hasDoc = function (docRef) {\n return docRef in this.docs;\n };\n /**\n * Removes the value for a key in the document store.\n *\n * @param {Integer|String} docRef The id to remove from the document store.\n * @memberOf DocumentStore\n */\n\n\n elasticlunr.DocumentStore.prototype.removeDoc = function (docRef) {\n if (!this.hasDoc(docRef)) return;\n delete this.docs[docRef];\n delete this.docInfo[docRef];\n this.length--;\n };\n /**\n * Add field length of a document's field tokens from pipeline results.\n * The field length of a document is used to do field length normalization even without the original JSON document stored.\n *\n * @param {Integer|String} docRef document's id or reference\n * @param {String} fieldName field name\n * @param {Integer} length field length\n */\n\n\n elasticlunr.DocumentStore.prototype.addFieldLength = function (docRef, fieldName, length) {\n if (docRef === null || docRef === undefined) return;\n if (this.hasDoc(docRef) == false) return;\n if (!this.docInfo[docRef]) this.docInfo[docRef] = {};\n this.docInfo[docRef][fieldName] = length;\n };\n /**\n * Update field length of a document's field tokens from pipeline results.\n * The field length of a document is used to do field length normalization even without the original JSON document stored.\n *\n * @param {Integer|String} docRef document's id or reference\n * @param {String} fieldName field name\n * @param {Integer} length field length\n */\n\n\n elasticlunr.DocumentStore.prototype.updateFieldLength = function (docRef, fieldName, length) {\n if (docRef === null || docRef === undefined) return;\n if (this.hasDoc(docRef) == false) return;\n this.addFieldLength(docRef, fieldName, length);\n };\n /**\n * get field length of a document by docRef\n *\n * @param {Integer|String} docRef document id or reference\n * @param {String} fieldName field name\n * @return {Integer} field length\n */\n\n\n elasticlunr.DocumentStore.prototype.getFieldLength = function (docRef, fieldName) {\n if (docRef === null || docRef === undefined) return 0;\n if (!(docRef in this.docs)) return 0;\n if (!(fieldName in this.docInfo[docRef])) return 0;\n return this.docInfo[docRef][fieldName];\n };\n /**\n * Returns a JSON representation of the document store used for serialisation.\n *\n * @return {Object} JSON format\n * @memberOf DocumentStore\n */\n\n\n elasticlunr.DocumentStore.prototype.toJSON = function () {\n return {\n docs: this.docs,\n docInfo: this.docInfo,\n length: this.length,\n save: this._save\n };\n };\n /**\n * Cloning object\n *\n * @param {Object} object in JSON format\n * @return {Object} copied object\n */\n\n\n function clone(obj) {\n if (null === obj || \"object\" !== typeof obj) return obj;\n var copy = obj.constructor();\n\n for (var attr in obj) {\n if (obj.hasOwnProperty(attr)) copy[attr] = obj[attr];\n }\n\n return copy;\n }\n /*!\n * elasticlunr.stemmer\n * Copyright (C) 2016 Oliver Nightingale\n * Copyright (C) 2016 Wei Song\n * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt\n */\n\n /**\n * elasticlunr.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 * @return {String}\n * @see elasticlunr.Pipeline\n */\n\n\n elasticlunr.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 step3list = {\n \"icate\": \"ic\",\n \"ative\": \"\",\n \"alize\": \"al\",\n \"iciti\": \"ic\",\n \"ical\": \"ic\",\n \"ful\": \"\",\n \"ness\": \"\"\n },\n c = \"[^aeiou]\",\n // consonant\n v = \"[aeiouy]\",\n // vowel\n C = c + \"[^aeiouy]*\",\n // consonant sequence\n V = v + \"[aeiou]*\",\n // vowel sequence\n mgr0 = \"^(\" + C + \")?\" + V + C,\n // [C]VC... is m>0\n meq1 = \"^(\" + C + \")?\" + V + C + \"(\" + V + \")?$\",\n // [C]VC[V] is m=1\n mgr1 = \"^(\" + C + \")?\" + V + C + V + C,\n // [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 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 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 var re_3 = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;\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 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, suffix, firstch, re, re2, re3, re4;\n\n if (w.length < 3) {\n return w;\n }\n\n firstch = w.substr(0, 1);\n\n if (firstch == \"y\") {\n w = firstch.toUpperCase() + w.substr(1);\n } // Step 1a\n\n\n re = re_1a;\n re2 = re2_1a;\n\n if (re.test(w)) {\n w = w.replace(re, \"$1$2\");\n } else if (re2.test(w)) {\n w = w.replace(re2, \"$1$2\");\n } // Step 1b\n\n\n re = re_1b;\n re2 = re2_1b;\n\n if (re.test(w)) {\n var fp = re.exec(w);\n re = re_mgr0;\n\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\n if (re2.test(stem)) {\n w = stem;\n re2 = re2_1b_2;\n re3 = re3_1b_2;\n re4 = re4_1b_2;\n\n if (re2.test(w)) {\n w = w + \"e\";\n } else if (re3.test(w)) {\n re = re_1b_2;\n w = w.replace(re, \"\");\n } else if (re4.test(w)) {\n w = w + \"e\";\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\n\n re = re_1c;\n\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n w = stem + \"i\";\n } // Step 2\n\n\n re = re_2;\n\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n suffix = fp[2];\n re = re_mgr0;\n\n if (re.test(stem)) {\n w = stem + step2list[suffix];\n }\n } // Step 3\n\n\n re = re_3;\n\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n suffix = fp[2];\n re = re_mgr0;\n\n if (re.test(stem)) {\n w = stem + step3list[suffix];\n }\n } // Step 4\n\n\n re = re_4;\n re2 = re2_4;\n\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = re_mgr1;\n\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\n if (re2.test(stem)) {\n w = stem;\n }\n } // Step 5\n\n\n re = re_5;\n\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\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\n if (re.test(w) && re2.test(w)) {\n re = re_1b_2;\n w = w.replace(re, \"\");\n } // and turn initial Y back to y\n\n\n if (firstch == \"y\") {\n w = firstch.toLowerCase() + w.substr(1);\n }\n\n return w;\n };\n\n return porterStemmer;\n }();\n\n elasticlunr.Pipeline.registerFunction(elasticlunr.stemmer, 'stemmer');\n /*!\n * elasticlunr.stopWordFilter\n * Copyright (C) 2016 Oliver Nightingale\n * Copyright (C) 2016 Wei Song\n */\n\n /**\n * elasticlunr.stopWordFilter is an English language stop words filter, any words\n * contained in the stop word 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 * Currently this StopwordFilter using dictionary to do O(1) time complexity stop word filtering.\n *\n * @module\n * @param {String} token The token to pass through the filter\n * @return {String}\n * @see elasticlunr.Pipeline\n */\n\n elasticlunr.stopWordFilter = function (token) {\n if (token && elasticlunr.stopWordFilter.stopWords[token] !== true) {\n return token;\n }\n };\n /**\n * Remove predefined stop words\n * if user want to use customized stop words, user could use this function to delete\n * all predefined stopwords.\n *\n * @return {null}\n */\n\n\n elasticlunr.clearStopWords = function () {\n elasticlunr.stopWordFilter.stopWords = {};\n };\n /**\n * Add customized stop words\n * user could use this function to add customized stop words\n * \n * @params {Array} words customized stop words\n * @return {null}\n */\n\n\n elasticlunr.addStopWords = function (words) {\n if (words == null || Array.isArray(words) === false) return;\n words.forEach(function (word) {\n elasticlunr.stopWordFilter.stopWords[word] = true;\n }, this);\n };\n /**\n * Reset to default stop words\n * user could use this function to restore default stop words\n *\n * @return {null}\n */\n\n\n elasticlunr.resetStopWords = function () {\n elasticlunr.stopWordFilter.stopWords = elasticlunr.defaultStopWords;\n };\n\n elasticlunr.defaultStopWords = {\n \"\": true,\n \"a\": true,\n \"able\": true,\n \"about\": true,\n \"across\": true,\n \"after\": true,\n \"all\": true,\n \"almost\": true,\n \"also\": true,\n \"am\": true,\n \"among\": true,\n \"an\": true,\n \"and\": true,\n \"any\": true,\n \"are\": true,\n \"as\": true,\n \"at\": true,\n \"be\": true,\n \"because\": true,\n \"been\": true,\n \"but\": true,\n \"by\": true,\n \"can\": true,\n \"cannot\": true,\n \"could\": true,\n \"dear\": true,\n \"did\": true,\n \"do\": true,\n \"does\": true,\n \"either\": true,\n \"else\": true,\n \"ever\": true,\n \"every\": true,\n \"for\": true,\n \"from\": true,\n \"get\": true,\n \"got\": true,\n \"had\": true,\n \"has\": true,\n \"have\": true,\n \"he\": true,\n \"her\": true,\n \"hers\": true,\n \"him\": true,\n \"his\": true,\n \"how\": true,\n \"however\": true,\n \"i\": true,\n \"if\": true,\n \"in\": true,\n \"into\": true,\n \"is\": true,\n \"it\": true,\n \"its\": true,\n \"just\": true,\n \"least\": true,\n \"let\": true,\n \"like\": true,\n \"likely\": true,\n \"may\": true,\n \"me\": true,\n \"might\": true,\n \"most\": true,\n \"must\": true,\n \"my\": true,\n \"neither\": true,\n \"no\": true,\n \"nor\": true,\n \"not\": true,\n \"of\": true,\n \"off\": true,\n \"often\": true,\n \"on\": true,\n \"only\": true,\n \"or\": true,\n \"other\": true,\n \"our\": true,\n \"own\": true,\n \"rather\": true,\n \"said\": true,\n \"say\": true,\n \"says\": true,\n \"she\": true,\n \"should\": true,\n \"since\": true,\n \"so\": true,\n \"some\": true,\n \"than\": true,\n \"that\": true,\n \"the\": true,\n \"their\": true,\n \"them\": true,\n \"then\": true,\n \"there\": true,\n \"these\": true,\n \"they\": true,\n \"this\": true,\n \"tis\": true,\n \"to\": true,\n \"too\": true,\n \"twas\": true,\n \"us\": true,\n \"wants\": true,\n \"was\": true,\n \"we\": true,\n \"were\": true,\n \"what\": true,\n \"when\": true,\n \"where\": true,\n \"which\": true,\n \"while\": true,\n \"who\": true,\n \"whom\": true,\n \"why\": true,\n \"will\": true,\n \"with\": true,\n \"would\": true,\n \"yet\": true,\n \"you\": true,\n \"your\": true\n };\n elasticlunr.stopWordFilter.stopWords = elasticlunr.defaultStopWords;\n elasticlunr.Pipeline.registerFunction(elasticlunr.stopWordFilter, 'stopWordFilter');\n /*!\n * elasticlunr.trimmer\n * Copyright (C) 2016 Oliver Nightingale\n * Copyright (C) 2016 Wei Song\n */\n\n /**\n * elasticlunr.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 * @return {String}\n * @see elasticlunr.Pipeline\n */\n\n elasticlunr.trimmer = function (token) {\n if (token === null || token === undefined) {\n throw new Error('token should not be undefined');\n }\n\n return token.replace(/^\\W+/, '').replace(/\\W+$/, '');\n };\n\n elasticlunr.Pipeline.registerFunction(elasticlunr.trimmer, 'trimmer');\n /*!\n * elasticlunr.InvertedIndex\n * Copyright (C) 2016 Wei Song\n * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt\n */\n\n /**\n * elasticlunr.InvertedIndex is used for efficiently storing and\n * lookup of documents that contain a given token.\n *\n * @constructor\n */\n\n elasticlunr.InvertedIndex = function () {\n this.root = {\n docs: {},\n df: 0\n };\n };\n /**\n * Loads a previously serialised inverted index.\n *\n * @param {Object} serialisedData The serialised inverted index to load.\n * @return {elasticlunr.InvertedIndex}\n */\n\n\n elasticlunr.InvertedIndex.load = function (serialisedData) {\n var idx = new this();\n idx.root = serialisedData.root;\n return idx;\n };\n /**\n * Adds a {token: tokenInfo} pair to the inverted index.\n * If the token already exist, then update the tokenInfo.\n *\n * tokenInfo format: { ref: 1, tf: 2}\n * tokenInfor should contains the document's ref and the tf(token frequency) of that token in\n * the document.\n *\n * By default this function starts at the root of the current inverted index, however\n * it can start at any node of the inverted index if required.\n *\n * @param {String} token \n * @param {Object} tokenInfo format: { ref: 1, tf: 2}\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 elasticlunr.InvertedIndex\n * is used.\n * @memberOf InvertedIndex\n */\n\n\n elasticlunr.InvertedIndex.prototype.addToken = function (token, tokenInfo, root) {\n var root = root || this.root,\n idx = 0;\n\n while (idx <= token.length - 1) {\n var key = token[idx];\n if (!(key in root)) root[key] = {\n docs: {},\n df: 0\n };\n idx += 1;\n root = root[key];\n }\n\n var docRef = tokenInfo.ref;\n\n if (!root.docs[docRef]) {\n // if this doc not exist, then add this doc\n root.docs[docRef] = {\n tf: tokenInfo.tf\n };\n root.df += 1;\n } else {\n // if this doc already exist, then update tokenInfo\n root.docs[docRef] = {\n tf: tokenInfo.tf\n };\n }\n };\n /**\n * Checks whether a token is in this elasticlunr.InvertedIndex.\n * \n *\n * @param {String} token The token to be checked\n * @return {Boolean}\n * @memberOf InvertedIndex\n */\n\n\n elasticlunr.InvertedIndex.prototype.hasToken = function (token) {\n if (!token) return false;\n var node = this.root;\n\n for (var i = 0; i < token.length; i++) {\n if (!node[token[i]]) return false;\n node = node[token[i]];\n }\n\n return true;\n };\n /**\n * Retrieve a node from the inverted index for a given token.\n * If token not found in this InvertedIndex, return null.\n * \n *\n * @param {String} token The token to get the node for.\n * @return {Object}\n * @see InvertedIndex.prototype.get\n * @memberOf InvertedIndex\n */\n\n\n elasticlunr.InvertedIndex.prototype.getNode = function (token) {\n if (!token) return null;\n var node = this.root;\n\n for (var i = 0; i < token.length; i++) {\n if (!node[token[i]]) return null;\n node = node[token[i]];\n }\n\n return node;\n };\n /**\n * Retrieve the documents of a given token.\n * If token not found, return {}.\n *\n *\n * @param {String} token The token to get the documents for.\n * @return {Object}\n * @memberOf InvertedIndex\n */\n\n\n elasticlunr.InvertedIndex.prototype.getDocs = function (token) {\n var node = this.getNode(token);\n\n if (node == null) {\n return {};\n }\n\n return node.docs;\n };\n /**\n * Retrieve term frequency of given token in given docRef.\n * If token or docRef not found, return 0.\n *\n *\n * @param {String} token The token to get the documents for.\n * @param {String|Integer} docRef\n * @return {Integer}\n * @memberOf InvertedIndex\n */\n\n\n elasticlunr.InvertedIndex.prototype.getTermFrequency = function (token, docRef) {\n var node = this.getNode(token);\n\n if (node == null) {\n return 0;\n }\n\n if (!(docRef in node.docs)) {\n return 0;\n }\n\n return node.docs[docRef].tf;\n };\n /**\n * Retrieve the document frequency of given token.\n * If token not found, return 0.\n *\n *\n * @param {String} token The token to get the documents for.\n * @return {Object}\n * @memberOf InvertedIndex\n */\n\n\n elasticlunr.InvertedIndex.prototype.getDocFreq = function (token) {\n var node = this.getNode(token);\n\n if (node == null) {\n return 0;\n }\n\n return node.df;\n };\n /**\n * Remove the document identified by document's ref from the token in the inverted index.\n *\n *\n * @param {String} token Remove the document from which token.\n * @param {String} ref The ref of the document to remove from given token.\n * @memberOf InvertedIndex\n */\n\n\n elasticlunr.InvertedIndex.prototype.removeToken = function (token, ref) {\n if (!token) return;\n var node = this.getNode(token);\n if (node == null) return;\n\n if (ref in node.docs) {\n delete node.docs[ref];\n node.df -= 1;\n }\n };\n /**\n * Find all the possible suffixes of given token using tokens currently in the inverted index.\n * If token not found, return empty Array.\n *\n * @param {String} token The token to expand.\n * @return {Array}\n * @memberOf InvertedIndex\n */\n\n\n elasticlunr.InvertedIndex.prototype.expandToken = function (token, memo, root) {\n if (token == null || token == '') return [];\n var memo = memo || [];\n\n if (root == void 0) {\n root = this.getNode(token);\n if (root == null) return memo;\n }\n\n if (root.df > 0) memo.push(token);\n\n for (var key in root) {\n if (key === 'docs') continue;\n if (key === 'df') continue;\n this.expandToken(token + key, memo, root[key]);\n }\n\n return memo;\n };\n /**\n * Returns a representation of the inverted index ready for serialisation.\n *\n * @return {Object}\n * @memberOf InvertedIndex\n */\n\n\n elasticlunr.InvertedIndex.prototype.toJSON = function () {\n return {\n root: this.root\n };\n };\n /*!\n * elasticlunr.Configuration\n * Copyright (C) 2016 Wei Song\n */\n\n /** \n * elasticlunr.Configuration is used to analyze the user search configuration.\n * \n * By elasticlunr.Configuration user could set query-time boosting, boolean model in each field.\n * \n * Currently configuration supports:\n * 1. query-time boosting, user could set how to boost each field.\n * 2. boolean model chosing, user could choose which boolean model to use for each field.\n * 3. token expandation, user could set token expand to True to improve Recall. Default is False.\n * \n * Query time boosting must be configured by field category, \"boolean\" model could be configured \n * by both field category or globally as the following example. Field configuration for \"boolean\"\n * will overwrite global configuration.\n * Token expand could be configured both by field category or golbally. Local field configuration will\n * overwrite global configuration.\n * \n * configuration example:\n * {\n * fields:{ \n * title: {boost: 2},\n * body: {boost: 1}\n * },\n * bool: \"OR\"\n * }\n * \n * \"bool\" field configuation overwrite global configuation example:\n * {\n * fields:{ \n * title: {boost: 2, bool: \"AND\"},\n * body: {boost: 1}\n * },\n * bool: \"OR\"\n * }\n * \n * \"expand\" example:\n * {\n * fields:{ \n * title: {boost: 2, bool: \"AND\"},\n * body: {boost: 1}\n * },\n * bool: \"OR\",\n * expand: true\n * }\n * \n * \"expand\" example for field category:\n * {\n * fields:{ \n * title: {boost: 2, bool: \"AND\", expand: true},\n * body: {boost: 1}\n * },\n * bool: \"OR\"\n * }\n * \n * setting the boost to 0 ignores the field (this will only search the title):\n * {\n * fields:{\n * title: {boost: 1},\n * body: {boost: 0}\n * }\n * }\n *\n * then, user could search with configuration to do query-time boosting.\n * idx.search('oracle database', {fields: {title: {boost: 2}, body: {boost: 1}}});\n * \n * \n * @constructor\n * \n * @param {String} config user configuration\n * @param {Array} fields fields of index instance\n * @module\n */\n\n\n elasticlunr.Configuration = function (config, fields) {\n var config = config || '';\n\n if (fields == undefined || fields == null) {\n throw new Error('fields should not be null');\n }\n\n this.config = {};\n var userConfig;\n\n try {\n userConfig = JSON.parse(config);\n this.buildUserConfig(userConfig, fields);\n } catch (error) {\n elasticlunr.utils.warn('user configuration parse failed, will use default configuration');\n this.buildDefaultConfig(fields);\n }\n };\n /**\n * Build default search configuration.\n * \n * @param {Array} fields fields of index instance\n */\n\n\n elasticlunr.Configuration.prototype.buildDefaultConfig = function (fields) {\n this.reset();\n fields.forEach(function (field) {\n this.config[field] = {\n boost: 1,\n bool: \"OR\",\n expand: false\n };\n }, this);\n };\n /**\n * Build user configuration.\n * \n * @param {JSON} config User JSON configuratoin\n * @param {Array} fields fields of index instance\n */\n\n\n elasticlunr.Configuration.prototype.buildUserConfig = function (config, fields) {\n var global_bool = \"OR\";\n var global_expand = false;\n this.reset();\n\n if ('bool' in config) {\n global_bool = config['bool'] || global_bool;\n }\n\n if ('expand' in config) {\n global_expand = config['expand'] || global_expand;\n }\n\n if ('fields' in config) {\n for (var field in config['fields']) {\n if (fields.indexOf(field) > -1) {\n var field_config = config['fields'][field];\n var field_expand = global_expand;\n\n if (field_config.expand != undefined) {\n field_expand = field_config.expand;\n }\n\n this.config[field] = {\n boost: field_config.boost || field_config.boost === 0 ? field_config.boost : 1,\n bool: field_config.bool || global_bool,\n expand: field_expand\n };\n } else {\n elasticlunr.utils.warn('field name in user configuration not found in index instance fields');\n }\n }\n } else {\n this.addAllFields2UserConfig(global_bool, global_expand, fields);\n }\n };\n /**\n * Add all fields to user search configuration.\n * \n * @param {String} bool Boolean model\n * @param {String} expand Expand model\n * @param {Array} fields fields of index instance\n */\n\n\n elasticlunr.Configuration.prototype.addAllFields2UserConfig = function (bool, expand, fields) {\n fields.forEach(function (field) {\n this.config[field] = {\n boost: 1,\n bool: bool,\n expand: expand\n };\n }, this);\n };\n /**\n * get current user configuration\n */\n\n\n elasticlunr.Configuration.prototype.get = function () {\n return this.config;\n };\n /**\n * reset user search configuration.\n */\n\n\n elasticlunr.Configuration.prototype.reset = function () {\n this.config = {};\n };\n /**\n * sorted_set.js is added only to make elasticlunr.js compatible with lunr-languages.\n * if elasticlunr.js support different languages by default, this will make elasticlunr.js\n * much bigger that not good for browser usage.\n *\n */\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 */\n\n\n lunr.SortedSet = function () {\n this.length = 0;\n this.elements = [];\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 */\n\n\n lunr.SortedSet.load = function (serialisedData) {\n var set = new this();\n set.elements = serialisedData;\n set.length = serialisedData.length;\n return set;\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 */\n\n\n lunr.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 * Converts this sorted set into an array.\n *\n * @returns {Array}\n * @memberOf SortedSet\n */\n\n\n lunr.SortedSet.prototype.toArray = function () {\n return this.elements.slice();\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 */\n\n\n lunr.SortedSet.prototype.map = function (fn, ctx) {\n return this.elements.map(fn, ctx);\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 */\n\n\n lunr.SortedSet.prototype.forEach = function (fn, ctx) {\n return this.elements.forEach(fn, ctx);\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 */\n\n\n lunr.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 if (pivotElem < elem) start = pivot;\n if (pivotElem > elem) end = pivot;\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 return -1;\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 */\n\n\n lunr.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 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 * 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 */\n\n\n lunr.SortedSet.prototype.intersect = function (otherSet) {\n var intersectSet = new lunr.SortedSet(),\n i = 0,\n j = 0,\n a_len = this.length,\n b_len = otherSet.length,\n a = this.elements,\n 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 ;\n return intersectSet;\n };\n /**\n * Makes a copy of this set\n *\n * @returns {lunr.SortedSet}\n * @memberOf SortedSet\n */\n\n\n lunr.SortedSet.prototype.clone = function () {\n var clone = new lunr.SortedSet();\n clone.elements = this.toArray();\n clone.length = clone.elements.length;\n return clone;\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 */\n\n\n lunr.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 * Returns a representation of the sorted set ready for serialisation.\n *\n * @returns {Array}\n * @memberOf SortedSet\n */\n\n\n lunr.SortedSet.prototype.toJSON = function () {\n return this.toArray();\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 ;\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.elasticlunr = 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 elasticlunr;\n });\n})();","import React, { Component } from 'react'\r\nimport { Link } from 'gatsby'\r\nimport { Index } from 'elasticlunr'\r\n\r\nexport default class SearchBox extends Component {\r\n constructor (props) {\r\n super(props)\r\n this.state = {\r\n query: ``,\r\n results: [],\r\n isActive: false,\r\n }\r\n }\r\n\r\n render () {\r\n return (\r\n <div className={`navbar-item ${this.state.isActive ? 'is-active' : ''}`}>\r\n <input\r\n className='input navbar-link is-rounded is-primary'\r\n type='text'\r\n value={this.state.query}\r\n onChange={this.search}\r\n placeholder='Search'\r\n />\r\n <div className='navbar-dropdown'>\r\n {this.state.results.map(page => (\r\n <Link className='navbar-item' key={page.id} to={page.slug}>{page.title}</Link>\r\n ))}\r\n </div>\r\n </div>\r\n )\r\n }\r\n\r\n getOrCreateIndex = () =>\r\n this.index\r\n ? this.index\r\n : Index.load(this.props.searchIndex);\r\n\r\n search = evt => {\r\n const query = evt.target.value\r\n this.index = this.getOrCreateIndex()\r\n this.setState({\r\n query,\r\n // Query the index with search string to get an [] of IDs\r\n results: this.index\r\n .search(query, { expand: true }) // Accept partial matches\r\n // Map over each ID and return the full document\r\n .map(({ ref }) => this.index.documentStore.getDoc(ref)),\r\n isActive: !!query,\r\n })\r\n };\r\n}\r\n","import React from 'react'\r\nimport { Link, graphql, StaticQuery } from 'gatsby'\r\nimport SearchBox from '../SearchBox'\r\nimport newpatientform from '../../../static/New Patient Form.pdf'\r\n\r\nconst NavBar = ({ toggleNavbar, isActive }) => (\r\n <StaticQuery\r\n query={graphql`\r\n query SearchIndexQuery {\r\n siteSearchIndex {\r\n index\r\n }\r\n }\r\n `}\r\n render={data => (\r\n <nav className='navbar is-fixed-top' aria-label='main navigation'>\r\n <div className='navbar-brand'>\r\n <Link to='/' className='navbar-item'>\r\n <strong>Dearborn Endocrinology</strong>\r\n </Link>\r\n <button\r\n className={`button navbar-burger ${isActive ? 'is-active' : ''}`}\r\n data-target='navMenu'\r\n onClick={toggleNavbar}\r\n >\r\n <span />\r\n <span />\r\n <span />\r\n </button>\r\n </div>\r\n <div className={`navbar-menu ${isActive ? 'is-active' : ''}`} id='navMenu'>\r\n <Link className='navbar-item' to='/OurStaff'>\r\n Staff\r\n </Link>\r\n <Link className='navbar-item' to='/practiceFields'>\r\n Fields of Practice\r\n </Link>\r\n <Link className='navbar-item' to='/location'>\r\n Location\r\n </Link>\r\n <Link className='navbar-item' >\r\n <a href={newpatientform} download=\"New Patient Form.pdf\">\r\n Download New Patient form\r\n </a>\r\n </Link>\r\n {/*<Link className='navbar-item' to='/contact'>\r\n Contact Us\r\n </Link>*/}\r\n </div>\r\n </nav>\r\n )}\r\n />\r\n)\r\n\r\nexport default NavBar\r\n","import React, { Component } from 'react'\r\nimport Helmet from 'react-helmet'\r\nimport '../../assets/sass/styles.sass'\r\nimport config from '../../../config'\r\nimport NavBar from '../NavBar'\r\nimport Footer from '../Footer'\r\n\r\nclass Layout extends Component {\r\n constructor (props) {\r\n super(props)\r\n this.state = { isActive: false }\r\n this.toggleNavbar = this.toggleNavbar.bind(this)\r\n }\r\n\r\n toggleNavbar () {\r\n this.setState({ isActive: !this.state.isActive })\r\n }\r\n\r\n render () {\r\n return (\r\n <div id='layout-wrapper'>\r\n <Helmet>\r\n <title>{config.siteTitle}</title>\r\n <meta name='description' content={config.siteDescription} />\r\n </Helmet>\r\n <NavBar isActive={this.state.isActive} toggleNavbar={() => this.toggleNavbar()} />\r\n <div id='content-wrapper'>\r\n {this.props.children}\r\n </div>\r\n {/*<Footer /> */}\r\n </div>\r\n )\r\n }\r\n}\r\n\r\nexport default Layout\r\n","'use strict';\n\nvar isArray = Array.isArray;\nvar keyList = Object.keys;\nvar hasProp = Object.prototype.hasOwnProperty;\nvar hasElementType = typeof Element !== 'undefined';\n\nfunction equal(a, b) {\n // fast-deep-equal index.js 2.0.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n var arrA = isArray(a),\n arrB = isArray(b),\n i,\n length,\n key;\n\n if (arrA && arrB) {\n length = a.length;\n if (length != b.length) return false;\n\n for (i = length; i-- !== 0;) {\n if (!equal(a[i], b[i])) return false;\n }\n\n return true;\n }\n\n if (arrA != arrB) return false;\n var dateA = a instanceof Date,\n dateB = b instanceof Date;\n if (dateA != dateB) return false;\n if (dateA && dateB) return a.getTime() == b.getTime();\n var regexpA = a instanceof RegExp,\n regexpB = b instanceof RegExp;\n if (regexpA != regexpB) return false;\n if (regexpA && regexpB) return a.toString() == b.toString();\n var keys = keyList(a);\n length = keys.length;\n if (length !== keyList(b).length) return false;\n\n for (i = length; i-- !== 0;) {\n if (!hasProp.call(b, keys[i])) return false;\n } // end fast-deep-equal\n // start react-fast-compare\n // custom handling for DOM elements\n\n\n if (hasElementType && a instanceof Element && b instanceof Element) return a === b; // custom handling for React\n\n for (i = length; i-- !== 0;) {\n key = keys[i];\n\n if (key === '_owner' && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner.\n // _owner contains circular references\n // and is not needed when comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of a react element\n continue;\n } else {\n // all other properties should be traversed as usual\n if (!equal(a[key], b[key])) return false;\n }\n } // end react-fast-compare\n // fast-deep-equal index.js 2.0.1\n\n\n return true;\n }\n\n return a !== a && b !== b;\n} // end fast-deep-equal\n\n\nmodule.exports = function exportedEqual(a, b) {\n try {\n return equal(a, b);\n } catch (error) {\n if (error.message && error.message.match(/stack|recursion/i) || error.number === -2146828260) {\n // warn on circular references, don't crash\n // browsers give this different errors name and messages:\n // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n // firefox: \"InternalError\", too much recursion\"\n // edge: \"Error\", \"Out of stack space\"\n console.warn('Warning: react-fast-compare does not handle circular references.', error.name, error.message);\n return false;\n } // some other error. we should definitely know about these\n\n\n throw error;\n }\n};","exports.__esModule = true;\nvar ATTRIBUTE_NAMES = exports.ATTRIBUTE_NAMES = {\n BODY: \"bodyAttributes\",\n HTML: \"htmlAttributes\",\n TITLE: \"titleAttributes\"\n};\nvar TAG_NAMES = exports.TAG_NAMES = {\n BASE: \"base\",\n BODY: \"body\",\n HEAD: \"head\",\n HTML: \"html\",\n LINK: \"link\",\n META: \"meta\",\n NOSCRIPT: \"noscript\",\n SCRIPT: \"script\",\n STYLE: \"style\",\n TITLE: \"title\"\n};\nvar VALID_TAG_NAMES = exports.VALID_TAG_NAMES = Object.keys(TAG_NAMES).map(function (name) {\n return TAG_NAMES[name];\n});\nvar TAG_PROPERTIES = exports.TAG_PROPERTIES = {\n CHARSET: \"charset\",\n CSS_TEXT: \"cssText\",\n HREF: \"href\",\n HTTPEQUIV: \"http-equiv\",\n INNER_HTML: \"innerHTML\",\n ITEM_PROP: \"itemprop\",\n NAME: \"name\",\n PROPERTY: \"property\",\n REL: \"rel\",\n SRC: \"src\"\n};\nvar REACT_TAG_MAP = exports.REACT_TAG_MAP = {\n accesskey: \"accessKey\",\n charset: \"charSet\",\n class: \"className\",\n contenteditable: \"contentEditable\",\n contextmenu: \"contextMenu\",\n \"http-equiv\": \"httpEquiv\",\n itemprop: \"itemProp\",\n tabindex: \"tabIndex\"\n};\nvar HELMET_PROPS = exports.HELMET_PROPS = {\n DEFAULT_TITLE: \"defaultTitle\",\n DEFER: \"defer\",\n ENCODE_SPECIAL_CHARACTERS: \"encodeSpecialCharacters\",\n ON_CHANGE_CLIENT_STATE: \"onChangeClientState\",\n TITLE_TEMPLATE: \"titleTemplate\"\n};\nvar HTML_TAG_MAP = exports.HTML_TAG_MAP = Object.keys(REACT_TAG_MAP).reduce(function (obj, key) {\n obj[REACT_TAG_MAP[key]] = key;\n return obj;\n}, {});\nvar SELF_CLOSING_TAGS = exports.SELF_CLOSING_TAGS = [TAG_NAMES.NOSCRIPT, TAG_NAMES.SCRIPT, TAG_NAMES.STYLE];\nvar HELMET_ATTRIBUTE = exports.HELMET_ATTRIBUTE = \"data-react-helmet\";","module.exports = {\r\n siteTitle: 'Dearborn Endocrinology', // Site title.\r\n siteTitleAlt: 'Business', // Alternative site title for SEO.\r\n siteLogo: '/icons/image.png', // Logo used for SEO and manifest.\r\n siteUrl: 'https://dearbornendocrinology.com', // Domain of your website without pathPrefix.\r\n pathPrefix: '', // Prefixes all links. For cases when deployed to example.github.io/gatsby-starter-business/.\r\n siteDescription: 'Leverage Gatsby Business Starter for your Business.', // Website description used for RSS feeds/meta description tag.\r\n siteRss: '/rss.xml',\r\n siteFBAppID: '', // FB Application ID for using app insights\r\n googleTagManagerID: '', // GTM tracking ID.\r\n disqusShortname: 'gatsby-business-starter', // Disqus shortname.\r\n userName: 'Vaibhav Sharma',\r\n userTwitter: 'vaibhaved',\r\n userLocation: 'Delhi NCR, India',\r\n userDescription: '',\r\n copyright: 'Copyright © Dearborn Endocrinology 2020. All Rights Reserved.', // Copyright string for the footer of the website and RSS feed.\r\n themeColor: '#000000', // Used for setting manifest and progress theme colors.\r\n backgroundColor: '#F0D09F', // Used for setting manifest background color.\r\n}\r\n","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","exports.__esModule = true;\nexports.warn = exports.requestAnimationFrame = exports.reducePropsToState = exports.mapStateOnServer = exports.handleClientStateChange = exports.convertReactPropstoHtmlAttributes = undefined;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar _react = require(\"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _objectAssign = require(\"object-assign\");\n\nvar _objectAssign2 = _interopRequireDefault(_objectAssign);\n\nvar _HelmetConstants = require(\"./HelmetConstants.js\");\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nvar encodeSpecialCharacters = function encodeSpecialCharacters(str) {\n var encode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (encode === false) {\n return String(str);\n }\n\n return String(str).replace(/&/g, \"&\").replace(/</g, \"<\").replace(/>/g, \">\").replace(/\"/g, \""\").replace(/'/g, \"'\");\n};\n\nvar getTitleFromPropsList = function getTitleFromPropsList(propsList) {\n var innermostTitle = getInnermostProperty(propsList, _HelmetConstants.TAG_NAMES.TITLE);\n var innermostTemplate = getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.TITLE_TEMPLATE);\n\n if (innermostTemplate && innermostTitle) {\n // use function arg to avoid need to escape $ characters\n return innermostTemplate.replace(/%s/g, function () {\n return innermostTitle;\n });\n }\n\n var innermostDefaultTitle = getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.DEFAULT_TITLE);\n return innermostTitle || innermostDefaultTitle || undefined;\n};\n\nvar getOnChangeClientState = function getOnChangeClientState(propsList) {\n return getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.ON_CHANGE_CLIENT_STATE) || function () {};\n};\n\nvar getAttributesFromPropsList = function getAttributesFromPropsList(tagType, propsList) {\n return propsList.filter(function (props) {\n return typeof props[tagType] !== \"undefined\";\n }).map(function (props) {\n return props[tagType];\n }).reduce(function (tagAttrs, current) {\n return _extends({}, tagAttrs, current);\n }, {});\n};\n\nvar getBaseTagFromPropsList = function getBaseTagFromPropsList(primaryAttributes, propsList) {\n return propsList.filter(function (props) {\n return typeof props[_HelmetConstants.TAG_NAMES.BASE] !== \"undefined\";\n }).map(function (props) {\n return props[_HelmetConstants.TAG_NAMES.BASE];\n }).reverse().reduce(function (innermostBaseTag, tag) {\n if (!innermostBaseTag.length) {\n var keys = Object.keys(tag);\n\n for (var i = 0; i < keys.length; i++) {\n var attributeKey = keys[i];\n var lowerCaseAttributeKey = attributeKey.toLowerCase();\n\n if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && tag[lowerCaseAttributeKey]) {\n return innermostBaseTag.concat(tag);\n }\n }\n }\n\n return innermostBaseTag;\n }, []);\n};\n\nvar getTagsFromPropsList = function getTagsFromPropsList(tagName, primaryAttributes, propsList) {\n // Calculate list of tags, giving priority innermost component (end of the propslist)\n var approvedSeenTags = {};\n return propsList.filter(function (props) {\n if (Array.isArray(props[tagName])) {\n return true;\n }\n\n if (typeof props[tagName] !== \"undefined\") {\n warn(\"Helmet: \" + tagName + \" should be of type \\\"Array\\\". Instead found type \\\"\" + _typeof(props[tagName]) + \"\\\"\");\n }\n\n return false;\n }).map(function (props) {\n return props[tagName];\n }).reverse().reduce(function (approvedTags, instanceTags) {\n var instanceSeenTags = {};\n instanceTags.filter(function (tag) {\n var primaryAttributeKey = void 0;\n var keys = Object.keys(tag);\n\n for (var i = 0; i < keys.length; i++) {\n var attributeKey = keys[i];\n var lowerCaseAttributeKey = attributeKey.toLowerCase(); // Special rule with link tags, since rel and href are both primary tags, rel takes priority\n\n if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && !(primaryAttributeKey === _HelmetConstants.TAG_PROPERTIES.REL && tag[primaryAttributeKey].toLowerCase() === \"canonical\") && !(lowerCaseAttributeKey === _HelmetConstants.TAG_PROPERTIES.REL && tag[lowerCaseAttributeKey].toLowerCase() === \"stylesheet\")) {\n primaryAttributeKey = lowerCaseAttributeKey;\n } // Special case for innerHTML which doesn't work lowercased\n\n\n if (primaryAttributes.indexOf(attributeKey) !== -1 && (attributeKey === _HelmetConstants.TAG_PROPERTIES.INNER_HTML || attributeKey === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT || attributeKey === _HelmetConstants.TAG_PROPERTIES.ITEM_PROP)) {\n primaryAttributeKey = attributeKey;\n }\n }\n\n if (!primaryAttributeKey || !tag[primaryAttributeKey]) {\n return false;\n }\n\n var value = tag[primaryAttributeKey].toLowerCase();\n\n if (!approvedSeenTags[primaryAttributeKey]) {\n approvedSeenTags[primaryAttributeKey] = {};\n }\n\n if (!instanceSeenTags[primaryAttributeKey]) {\n instanceSeenTags[primaryAttributeKey] = {};\n }\n\n if (!approvedSeenTags[primaryAttributeKey][value]) {\n instanceSeenTags[primaryAttributeKey][value] = true;\n return true;\n }\n\n return false;\n }).reverse().forEach(function (tag) {\n return approvedTags.push(tag);\n }); // Update seen tags with tags from this instance\n\n var keys = Object.keys(instanceSeenTags);\n\n for (var i = 0; i < keys.length; i++) {\n var attributeKey = keys[i];\n var tagUnion = (0, _objectAssign2.default)({}, approvedSeenTags[attributeKey], instanceSeenTags[attributeKey]);\n approvedSeenTags[attributeKey] = tagUnion;\n }\n\n return approvedTags;\n }, []).reverse();\n};\n\nvar getInnermostProperty = function getInnermostProperty(propsList, property) {\n for (var i = propsList.length - 1; i >= 0; i--) {\n var props = propsList[i];\n\n if (props.hasOwnProperty(property)) {\n return props[property];\n }\n }\n\n return null;\n};\n\nvar reducePropsToState = function reducePropsToState(propsList) {\n return {\n baseTag: getBaseTagFromPropsList([_HelmetConstants.TAG_PROPERTIES.HREF], propsList),\n bodyAttributes: getAttributesFromPropsList(_HelmetConstants.ATTRIBUTE_NAMES.BODY, propsList),\n defer: getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.DEFER),\n encode: getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),\n htmlAttributes: getAttributesFromPropsList(_HelmetConstants.ATTRIBUTE_NAMES.HTML, propsList),\n linkTags: getTagsFromPropsList(_HelmetConstants.TAG_NAMES.LINK, [_HelmetConstants.TAG_PROPERTIES.REL, _HelmetConstants.TAG_PROPERTIES.HREF], propsList),\n metaTags: getTagsFromPropsList(_HelmetConstants.TAG_NAMES.META, [_HelmetConstants.TAG_PROPERTIES.NAME, _HelmetConstants.TAG_PROPERTIES.CHARSET, _HelmetConstants.TAG_PROPERTIES.HTTPEQUIV, _HelmetConstants.TAG_PROPERTIES.PROPERTY, _HelmetConstants.TAG_PROPERTIES.ITEM_PROP], propsList),\n noscriptTags: getTagsFromPropsList(_HelmetConstants.TAG_NAMES.NOSCRIPT, [_HelmetConstants.TAG_PROPERTIES.INNER_HTML], propsList),\n onChangeClientState: getOnChangeClientState(propsList),\n scriptTags: getTagsFromPropsList(_HelmetConstants.TAG_NAMES.SCRIPT, [_HelmetConstants.TAG_PROPERTIES.SRC, _HelmetConstants.TAG_PROPERTIES.INNER_HTML], propsList),\n styleTags: getTagsFromPropsList(_HelmetConstants.TAG_NAMES.STYLE, [_HelmetConstants.TAG_PROPERTIES.CSS_TEXT], propsList),\n title: getTitleFromPropsList(propsList),\n titleAttributes: getAttributesFromPropsList(_HelmetConstants.ATTRIBUTE_NAMES.TITLE, propsList)\n };\n};\n\nvar rafPolyfill = function () {\n var clock = Date.now();\n return function (callback) {\n var currentTime = Date.now();\n\n if (currentTime - clock > 16) {\n clock = currentTime;\n callback(currentTime);\n } else {\n setTimeout(function () {\n rafPolyfill(callback);\n }, 0);\n }\n };\n}();\n\nvar cafPolyfill = function cafPolyfill(id) {\n return clearTimeout(id);\n};\n\nvar requestAnimationFrame = typeof window !== \"undefined\" ? window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || rafPolyfill : global.requestAnimationFrame || rafPolyfill;\nvar cancelAnimationFrame = typeof window !== \"undefined\" ? window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || cafPolyfill : global.cancelAnimationFrame || cafPolyfill;\n\nvar warn = function warn(msg) {\n return console && typeof console.warn === \"function\" && console.warn(msg);\n};\n\nvar _helmetCallback = null;\n\nvar handleClientStateChange = function handleClientStateChange(newState) {\n if (_helmetCallback) {\n cancelAnimationFrame(_helmetCallback);\n }\n\n if (newState.defer) {\n _helmetCallback = requestAnimationFrame(function () {\n commitTagChanges(newState, function () {\n _helmetCallback = null;\n });\n });\n } else {\n commitTagChanges(newState);\n _helmetCallback = null;\n }\n};\n\nvar commitTagChanges = function commitTagChanges(newState, cb) {\n var baseTag = newState.baseTag,\n bodyAttributes = newState.bodyAttributes,\n htmlAttributes = newState.htmlAttributes,\n linkTags = newState.linkTags,\n metaTags = newState.metaTags,\n noscriptTags = newState.noscriptTags,\n onChangeClientState = newState.onChangeClientState,\n scriptTags = newState.scriptTags,\n styleTags = newState.styleTags,\n title = newState.title,\n titleAttributes = newState.titleAttributes;\n updateAttributes(_HelmetConstants.TAG_NAMES.BODY, bodyAttributes);\n updateAttributes(_HelmetConstants.TAG_NAMES.HTML, htmlAttributes);\n updateTitle(title, titleAttributes);\n var tagUpdates = {\n baseTag: updateTags(_HelmetConstants.TAG_NAMES.BASE, baseTag),\n linkTags: updateTags(_HelmetConstants.TAG_NAMES.LINK, linkTags),\n metaTags: updateTags(_HelmetConstants.TAG_NAMES.META, metaTags),\n noscriptTags: updateTags(_HelmetConstants.TAG_NAMES.NOSCRIPT, noscriptTags),\n scriptTags: updateTags(_HelmetConstants.TAG_NAMES.SCRIPT, scriptTags),\n styleTags: updateTags(_HelmetConstants.TAG_NAMES.STYLE, styleTags)\n };\n var addedTags = {};\n var removedTags = {};\n Object.keys(tagUpdates).forEach(function (tagType) {\n var _tagUpdates$tagType = tagUpdates[tagType],\n newTags = _tagUpdates$tagType.newTags,\n oldTags = _tagUpdates$tagType.oldTags;\n\n if (newTags.length) {\n addedTags[tagType] = newTags;\n }\n\n if (oldTags.length) {\n removedTags[tagType] = tagUpdates[tagType].oldTags;\n }\n });\n cb && cb();\n onChangeClientState(newState, addedTags, removedTags);\n};\n\nvar flattenArray = function flattenArray(possibleArray) {\n return Array.isArray(possibleArray) ? possibleArray.join(\"\") : possibleArray;\n};\n\nvar updateTitle = function updateTitle(title, attributes) {\n if (typeof title !== \"undefined\" && document.title !== title) {\n document.title = flattenArray(title);\n }\n\n updateAttributes(_HelmetConstants.TAG_NAMES.TITLE, attributes);\n};\n\nvar updateAttributes = function updateAttributes(tagName, attributes) {\n var elementTag = document.getElementsByTagName(tagName)[0];\n\n if (!elementTag) {\n return;\n }\n\n var helmetAttributeString = elementTag.getAttribute(_HelmetConstants.HELMET_ATTRIBUTE);\n var helmetAttributes = helmetAttributeString ? helmetAttributeString.split(\",\") : [];\n var attributesToRemove = [].concat(helmetAttributes);\n var attributeKeys = Object.keys(attributes);\n\n for (var i = 0; i < attributeKeys.length; i++) {\n var attribute = attributeKeys[i];\n var value = attributes[attribute] || \"\";\n\n if (elementTag.getAttribute(attribute) !== value) {\n elementTag.setAttribute(attribute, value);\n }\n\n if (helmetAttributes.indexOf(attribute) === -1) {\n helmetAttributes.push(attribute);\n }\n\n var indexToSave = attributesToRemove.indexOf(attribute);\n\n if (indexToSave !== -1) {\n attributesToRemove.splice(indexToSave, 1);\n }\n }\n\n for (var _i = attributesToRemove.length - 1; _i >= 0; _i--) {\n elementTag.removeAttribute(attributesToRemove[_i]);\n }\n\n if (helmetAttributes.length === attributesToRemove.length) {\n elementTag.removeAttribute(_HelmetConstants.HELMET_ATTRIBUTE);\n } else if (elementTag.getAttribute(_HelmetConstants.HELMET_ATTRIBUTE) !== attributeKeys.join(\",\")) {\n elementTag.setAttribute(_HelmetConstants.HELMET_ATTRIBUTE, attributeKeys.join(\",\"));\n }\n};\n\nvar updateTags = function updateTags(type, tags) {\n var headElement = document.head || document.querySelector(_HelmetConstants.TAG_NAMES.HEAD);\n var tagNodes = headElement.querySelectorAll(type + \"[\" + _HelmetConstants.HELMET_ATTRIBUTE + \"]\");\n var oldTags = Array.prototype.slice.call(tagNodes);\n var newTags = [];\n var indexToDelete = void 0;\n\n if (tags && tags.length) {\n tags.forEach(function (tag) {\n var newElement = document.createElement(type);\n\n for (var attribute in tag) {\n if (tag.hasOwnProperty(attribute)) {\n if (attribute === _HelmetConstants.TAG_PROPERTIES.INNER_HTML) {\n newElement.innerHTML = tag.innerHTML;\n } else if (attribute === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT) {\n if (newElement.styleSheet) {\n newElement.styleSheet.cssText = tag.cssText;\n } else {\n newElement.appendChild(document.createTextNode(tag.cssText));\n }\n } else {\n var value = typeof tag[attribute] === \"undefined\" ? \"\" : tag[attribute];\n newElement.setAttribute(attribute, value);\n }\n }\n }\n\n newElement.setAttribute(_HelmetConstants.HELMET_ATTRIBUTE, \"true\"); // Remove a duplicate tag from domTagstoRemove, so it isn't cleared.\n\n if (oldTags.some(function (existingTag, index) {\n indexToDelete = index;\n return newElement.isEqualNode(existingTag);\n })) {\n oldTags.splice(indexToDelete, 1);\n } else {\n newTags.push(newElement);\n }\n });\n }\n\n oldTags.forEach(function (tag) {\n return tag.parentNode.removeChild(tag);\n });\n newTags.forEach(function (tag) {\n return headElement.appendChild(tag);\n });\n return {\n oldTags: oldTags,\n newTags: newTags\n };\n};\n\nvar generateElementAttributesAsString = function generateElementAttributesAsString(attributes) {\n return Object.keys(attributes).reduce(function (str, key) {\n var attr = typeof attributes[key] !== \"undefined\" ? key + \"=\\\"\" + attributes[key] + \"\\\"\" : \"\" + key;\n return str ? str + \" \" + attr : attr;\n }, \"\");\n};\n\nvar generateTitleAsString = function generateTitleAsString(type, title, attributes, encode) {\n var attributeString = generateElementAttributesAsString(attributes);\n var flattenedTitle = flattenArray(title);\n return attributeString ? \"<\" + type + \" \" + _HelmetConstants.HELMET_ATTRIBUTE + \"=\\\"true\\\" \" + attributeString + \">\" + encodeSpecialCharacters(flattenedTitle, encode) + \"</\" + type + \">\" : \"<\" + type + \" \" + _HelmetConstants.HELMET_ATTRIBUTE + \"=\\\"true\\\">\" + encodeSpecialCharacters(flattenedTitle, encode) + \"</\" + type + \">\";\n};\n\nvar generateTagsAsString = function generateTagsAsString(type, tags, encode) {\n return tags.reduce(function (str, tag) {\n var attributeHtml = Object.keys(tag).filter(function (attribute) {\n return !(attribute === _HelmetConstants.TAG_PROPERTIES.INNER_HTML || attribute === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT);\n }).reduce(function (string, attribute) {\n var attr = typeof tag[attribute] === \"undefined\" ? attribute : attribute + \"=\\\"\" + encodeSpecialCharacters(tag[attribute], encode) + \"\\\"\";\n return string ? string + \" \" + attr : attr;\n }, \"\");\n var tagContent = tag.innerHTML || tag.cssText || \"\";\n var isSelfClosing = _HelmetConstants.SELF_CLOSING_TAGS.indexOf(type) === -1;\n return str + \"<\" + type + \" \" + _HelmetConstants.HELMET_ATTRIBUTE + \"=\\\"true\\\" \" + attributeHtml + (isSelfClosing ? \"/>\" : \">\" + tagContent + \"</\" + type + \">\");\n }, \"\");\n};\n\nvar convertElementAttributestoReactProps = function convertElementAttributestoReactProps(attributes) {\n var initProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return Object.keys(attributes).reduce(function (obj, key) {\n obj[_HelmetConstants.REACT_TAG_MAP[key] || key] = attributes[key];\n return obj;\n }, initProps);\n};\n\nvar convertReactPropstoHtmlAttributes = function convertReactPropstoHtmlAttributes(props) {\n var initAttributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return Object.keys(props).reduce(function (obj, key) {\n obj[_HelmetConstants.HTML_TAG_MAP[key] || key] = props[key];\n return obj;\n }, initAttributes);\n};\n\nvar generateTitleAsReactComponent = function generateTitleAsReactComponent(type, title, attributes) {\n var _initProps; // assigning into an array to define toString function on it\n\n\n var initProps = (_initProps = {\n key: title\n }, _initProps[_HelmetConstants.HELMET_ATTRIBUTE] = true, _initProps);\n var props = convertElementAttributestoReactProps(attributes, initProps);\n return [_react2.default.createElement(_HelmetConstants.TAG_NAMES.TITLE, props, title)];\n};\n\nvar generateTagsAsReactComponent = function generateTagsAsReactComponent(type, tags) {\n return tags.map(function (tag, i) {\n var _mappedTag;\n\n var mappedTag = (_mappedTag = {\n key: i\n }, _mappedTag[_HelmetConstants.HELMET_ATTRIBUTE] = true, _mappedTag);\n Object.keys(tag).forEach(function (attribute) {\n var mappedAttribute = _HelmetConstants.REACT_TAG_MAP[attribute] || attribute;\n\n if (mappedAttribute === _HelmetConstants.TAG_PROPERTIES.INNER_HTML || mappedAttribute === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT) {\n var content = tag.innerHTML || tag.cssText;\n mappedTag.dangerouslySetInnerHTML = {\n __html: content\n };\n } else {\n mappedTag[mappedAttribute] = tag[attribute];\n }\n });\n return _react2.default.createElement(type, mappedTag);\n });\n};\n\nvar getMethodsForTag = function getMethodsForTag(type, tags, encode) {\n switch (type) {\n case _HelmetConstants.TAG_NAMES.TITLE:\n return {\n toComponent: function toComponent() {\n return generateTitleAsReactComponent(type, tags.title, tags.titleAttributes, encode);\n },\n toString: function toString() {\n return generateTitleAsString(type, tags.title, tags.titleAttributes, encode);\n }\n };\n\n case _HelmetConstants.ATTRIBUTE_NAMES.BODY:\n case _HelmetConstants.ATTRIBUTE_NAMES.HTML:\n return {\n toComponent: function toComponent() {\n return convertElementAttributestoReactProps(tags);\n },\n toString: function toString() {\n return generateElementAttributesAsString(tags);\n }\n };\n\n default:\n return {\n toComponent: function toComponent() {\n return generateTagsAsReactComponent(type, tags);\n },\n toString: function toString() {\n return generateTagsAsString(type, tags, encode);\n }\n };\n }\n};\n\nvar mapStateOnServer = function mapStateOnServer(_ref) {\n var baseTag = _ref.baseTag,\n bodyAttributes = _ref.bodyAttributes,\n encode = _ref.encode,\n htmlAttributes = _ref.htmlAttributes,\n linkTags = _ref.linkTags,\n metaTags = _ref.metaTags,\n noscriptTags = _ref.noscriptTags,\n scriptTags = _ref.scriptTags,\n styleTags = _ref.styleTags,\n _ref$title = _ref.title,\n title = _ref$title === undefined ? \"\" : _ref$title,\n titleAttributes = _ref.titleAttributes;\n return {\n base: getMethodsForTag(_HelmetConstants.TAG_NAMES.BASE, baseTag, encode),\n bodyAttributes: getMethodsForTag(_HelmetConstants.ATTRIBUTE_NAMES.BODY, bodyAttributes, encode),\n htmlAttributes: getMethodsForTag(_HelmetConstants.ATTRIBUTE_NAMES.HTML, htmlAttributes, encode),\n link: getMethodsForTag(_HelmetConstants.TAG_NAMES.LINK, linkTags, encode),\n meta: getMethodsForTag(_HelmetConstants.TAG_NAMES.META, metaTags, encode),\n noscript: getMethodsForTag(_HelmetConstants.TAG_NAMES.NOSCRIPT, noscriptTags, encode),\n script: getMethodsForTag(_HelmetConstants.TAG_NAMES.SCRIPT, scriptTags, encode),\n style: getMethodsForTag(_HelmetConstants.TAG_NAMES.STYLE, styleTags, encode),\n title: getMethodsForTag(_HelmetConstants.TAG_NAMES.TITLE, {\n title: title,\n titleAttributes: titleAttributes\n }, encode)\n };\n};\n\nexports.convertReactPropstoHtmlAttributes = convertReactPropstoHtmlAttributes;\nexports.handleClientStateChange = handleClientStateChange;\nexports.mapStateOnServer = mapStateOnServer;\nexports.reducePropsToState = reducePropsToState;\nexports.requestAnimationFrame = requestAnimationFrame;\nexports.warn = warn;","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n"],"sourceRoot":""}