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ACpC,IAAImE,EAAM9V,EAAGlF,MAAMoV,EAAM+F,GACzB,SAASF,EAAMza,GACbua,EAAmBC,EAAK7Q,EAAS0M,EAAQoE,EAAOC,EAAQ,OAAQ1a,EAClE,CACA,SAAS0a,EAAOlG,GACd+F,EAAmBC,EAAK7Q,EAAS0M,EAAQoE,EAAOC,EAAQ,QAASlG,EACnE,CACAiG,OAAM1Y,EACR,GACF,CACF","sources":["webpack://@whitespace/cirkor-gatsby/./node_modules/minisearch/dist/es5m/index.js","webpack://@whitespace/cirkor-gatsby/./src/@whitespace/gatsby-theme-search/hooks/useMiniSearch.js","webpack://@whitespace/cirkor-gatsby/./node_modules/@whitespace/gatsby-theme-search/src/components/LocalSearchBackendProvider.js","webpack://@whitespace/cirkor-gatsby/./src/@whitespace/gatsby-theme-search/hooks/useSearchDocumentsForMiniSearch.js","webpack://@whitespace/cirkor-gatsby/./node_modules/@whitespace/gatsby-theme-search/src/hooks/async.js","webpack://@whitespace/cirkor-gatsby/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@whitespace/cirkor-gatsby/./node_modules/@babel/runtime/regenerator/index.js","webpack://@whitespace/cirkor-gatsby/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\n\nvar _assign = function __assign() {\n _assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return _assign.apply(this, arguments);\n};\nfunction __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function next() {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\nfunction __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n}\nfunction __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\n/** @ignore */\nvar ENTRIES = 'ENTRIES';\n/** @ignore */\nvar KEYS = 'KEYS';\n/** @ignore */\nvar VALUES = 'VALUES';\n/** @ignore */\nvar LEAF = '';\n/**\n * @private\n */\nvar TreeIterator = /** @class */function () {\n function TreeIterator(set, type) {\n var node = set._tree;\n var keys = Object.keys(node);\n this.set = set;\n this._type = type;\n this._path = keys.length > 0 ? [{\n node: node,\n keys: keys\n }] : [];\n }\n TreeIterator.prototype.next = function () {\n var value = this.dive();\n this.backtrack();\n return value;\n };\n TreeIterator.prototype.dive = function () {\n if (this._path.length === 0) {\n return {\n done: true,\n value: undefined\n };\n }\n var _a = last$1(this._path),\n node = _a.node,\n keys = _a.keys;\n if (last$1(keys) === LEAF) {\n return {\n done: false,\n value: this.result()\n };\n }\n this._path.push({\n node: node[last$1(keys)],\n keys: Object.keys(node[last$1(keys)])\n });\n return this.dive();\n };\n TreeIterator.prototype.backtrack = function () {\n if (this._path.length === 0) {\n return;\n }\n last$1(this._path).keys.pop();\n if (last$1(this._path).keys.length > 0) {\n return;\n }\n this._path.pop();\n this.backtrack();\n };\n TreeIterator.prototype.key = function () {\n return this.set._prefix + this._path.map(function (_a) {\n var keys = _a.keys;\n return last$1(keys);\n }).filter(function (key) {\n return key !== LEAF;\n }).join('');\n };\n TreeIterator.prototype.value = function () {\n return last$1(this._path).node[LEAF];\n };\n TreeIterator.prototype.result = function () {\n if (this._type === VALUES) {\n return this.value();\n }\n if (this._type === KEYS) {\n return this.key();\n }\n return [this.key(), this.value()];\n };\n TreeIterator.prototype[Symbol.iterator] = function () {\n return this;\n };\n return TreeIterator;\n}();\nvar last$1 = function last$1(array) {\n return array[array.length - 1];\n};\nvar NONE = 0;\nvar CHANGE = 1;\nvar ADD = 2;\nvar DELETE = 3;\n/**\n * @ignore\n */\nvar fuzzySearch = function fuzzySearch(node, query, maxDistance) {\n var stack = [{\n distance: 0,\n i: 0,\n key: '',\n node: node\n }];\n var results = {};\n var innerStack = [];\n var _loop_1 = function _loop_1() {\n var _a = stack.pop(),\n node_1 = _a.node,\n distance = _a.distance,\n key = _a.key,\n i = _a.i,\n edit = _a.edit;\n Object.keys(node_1).forEach(function (k) {\n if (k === LEAF) {\n var totDistance = distance + (query.length - i);\n var _a = __read(results[key] || [null, Infinity], 2),\n d = _a[1];\n if (totDistance <= maxDistance && totDistance < d) {\n results[key] = [node_1[k], totDistance];\n }\n } else {\n withinDistance(query, k, maxDistance - distance, i, edit, innerStack).forEach(function (_a) {\n var d = _a.distance,\n i = _a.i,\n edit = _a.edit;\n stack.push({\n node: node_1[k],\n distance: distance + d,\n key: key + k,\n i: i,\n edit: edit\n });\n });\n }\n });\n };\n while (stack.length > 0) {\n _loop_1();\n }\n return results;\n};\n/**\n * @ignore\n */\nvar withinDistance = function withinDistance(a, b, maxDistance, i, edit, stack) {\n stack.push({\n distance: 0,\n ia: i,\n ib: 0,\n edit: edit\n });\n var results = [];\n while (stack.length > 0) {\n var _a = stack.pop(),\n distance = _a.distance,\n ia = _a.ia,\n ib = _a.ib,\n edit_1 = _a.edit;\n if (ib === b.length) {\n results.push({\n distance: distance,\n i: ia,\n edit: edit_1\n });\n continue;\n }\n if (a[ia] === b[ib]) {\n stack.push({\n distance: distance,\n ia: ia + 1,\n ib: ib + 1,\n edit: NONE\n });\n } else {\n if (distance >= maxDistance) {\n continue;\n }\n if (edit_1 !== ADD) {\n stack.push({\n distance: distance + 1,\n ia: ia,\n ib: ib + 1,\n edit: DELETE\n });\n }\n if (ia < a.length) {\n if (edit_1 !== DELETE) {\n stack.push({\n distance: distance + 1,\n ia: ia + 1,\n ib: ib,\n edit: ADD\n });\n }\n if (edit_1 !== DELETE && edit_1 !== ADD) {\n stack.push({\n distance: distance + 1,\n ia: ia + 1,\n ib: ib + 1,\n edit: CHANGE\n });\n }\n }\n }\n }\n return results;\n};\n\n/**\n * A class implementing the same interface as a standard JavaScript\n * [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)\n * with string keys, but adding support for efficiently searching entries with\n * prefix or fuzzy search. This class is used internally by [[MiniSearch]] as\n * the inverted index data structure. The implementation is a radix tree\n * (compressed prefix tree).\n *\n * Since this class can be of general utility beyond _MiniSearch_, it is\n * exported by the `minisearch` package and can be imported (or required) as\n * `minisearch/SearchableMap`.\n *\n * @typeParam T The type of the values stored in the map.\n */\nvar SearchableMap = /** @class */function () {\n /**\n * The constructor is normally called without arguments, creating an empty\n * map. In order to create a [[SearchableMap]] from an iterable or from an\n * object, check [[SearchableMap.from]] and [[SearchableMap.fromObject]].\n *\n * The constructor arguments are for internal use, when creating derived\n * mutable views of a map at a prefix.\n */\n function SearchableMap(tree, prefix) {\n if (tree === void 0) {\n tree = {};\n }\n if (prefix === void 0) {\n prefix = '';\n }\n this._tree = tree;\n this._prefix = prefix;\n }\n /**\n * Creates and returns a mutable view of this [[SearchableMap]], containing only\n * entries that share the given prefix.\n *\n * ### Usage:\n *\n * ```javascript\n * let map = new SearchableMap()\n * map.set(\"unicorn\", 1)\n * map.set(\"universe\", 2)\n * map.set(\"university\", 3)\n * map.set(\"unique\", 4)\n * map.set(\"hello\", 5)\n *\n * let uni = map.atPrefix(\"uni\")\n * uni.get(\"unique\") // => 4\n * uni.get(\"unicorn\") // => 1\n * uni.get(\"hello\") // => undefined\n *\n * let univer = map.atPrefix(\"univer\")\n * univer.get(\"unique\") // => undefined\n * univer.get(\"universe\") // => 2\n * univer.get(\"university\") // => 3\n * ```\n *\n * @param prefix The prefix\n * @return A [[SearchableMap]] representing a mutable view of the original Map at the given prefix\n */\n SearchableMap.prototype.atPrefix = function (prefix) {\n var _a;\n if (!prefix.startsWith(this._prefix)) {\n throw new Error('Mismatched prefix');\n }\n var _b = __read(trackDown(this._tree, prefix.slice(this._prefix.length)), 2),\n node = _b[0],\n path = _b[1];\n if (node === undefined) {\n var _c = __read(last(path), 2),\n parentNode = _c[0],\n key_1 = _c[1];\n var nodeKey = Object.keys(parentNode).find(function (k) {\n return k !== LEAF && k.startsWith(key_1);\n });\n if (nodeKey !== undefined) {\n return new SearchableMap((_a = {}, _a[nodeKey.slice(key_1.length)] = parentNode[nodeKey], _a), prefix);\n }\n }\n return new SearchableMap(node || {}, prefix);\n };\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/clear\n */\n SearchableMap.prototype.clear = function () {\n delete this._size;\n this._tree = {};\n };\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/delete\n * @param key Key to delete\n */\n SearchableMap.prototype.delete = function (key) {\n delete this._size;\n return remove(this._tree, key);\n };\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/entries\n * @return An iterator iterating through `[key, value]` entries.\n */\n SearchableMap.prototype.entries = function () {\n return new TreeIterator(this, ENTRIES);\n };\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach\n * @param fn Iteration function\n */\n SearchableMap.prototype.forEach = function (fn) {\n var e_1, _a;\n try {\n for (var _b = __values(this), _c = _b.next(); !_c.done; _c = _b.next()) {\n var _d = __read(_c.value, 2),\n key = _d[0],\n value = _d[1];\n fn(key, value, this);\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n };\n /**\n * Returns a key-value object of all the entries that have a key within the\n * given edit distance from the search key. The keys of the returned object are\n * the matching keys, while the values are two-elements arrays where the first\n * element is the value associated to the key, and the second is the edit\n * distance of the key to the search key.\n *\n * ### Usage:\n *\n * ```javascript\n * let map = new SearchableMap()\n * map.set('hello', 'world')\n * map.set('hell', 'yeah')\n * map.set('ciao', 'mondo')\n *\n * // Get all entries that match the key 'hallo' with a maximum edit distance of 2\n * map.fuzzyGet('hallo', 2)\n * // => { \"hello\": [\"world\", 1], \"hell\": [\"yeah\", 2] }\n *\n * // In the example, the \"hello\" key has value \"world\" and edit distance of 1\n * // (change \"e\" to \"a\"), the key \"hell\" has value \"yeah\" and edit distance of 2\n * // (change \"e\" to \"a\", delete \"o\")\n * ```\n *\n * @param key The search key\n * @param maxEditDistance The maximum edit distance (Levenshtein)\n * @return A key-value object of the matching keys to their value and edit distance\n */\n SearchableMap.prototype.fuzzyGet = function (key, maxEditDistance) {\n return fuzzySearch(this._tree, key, maxEditDistance);\n };\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get\n * @param key Key to get\n * @return Value associated to the key, or `undefined` if the key is not\n * found.\n */\n SearchableMap.prototype.get = function (key) {\n var node = lookup(this._tree, key);\n return node !== undefined ? node[LEAF] : undefined;\n };\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/has\n * @param key Key\n * @return True if the key is in the map, false otherwise\n */\n SearchableMap.prototype.has = function (key) {\n var node = lookup(this._tree, key);\n return node !== undefined && node.hasOwnProperty(LEAF);\n };\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/keys\n * @return An `Iterable` iterating through keys\n */\n SearchableMap.prototype.keys = function () {\n return new TreeIterator(this, KEYS);\n };\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/set\n * @param key Key to set\n * @param value Value to associate to the key\n * @return The [[SearchableMap]] itself, to allow chaining\n */\n SearchableMap.prototype.set = function (key, value) {\n if (typeof key !== 'string') {\n throw new Error('key must be a string');\n }\n delete this._size;\n var node = createPath(this._tree, key);\n node[LEAF] = value;\n return this;\n };\n Object.defineProperty(SearchableMap.prototype, \"size\", {\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/size\n */\n get: function get() {\n var _this = this;\n if (this._size) {\n return this._size;\n }\n /** @ignore */\n this._size = 0;\n this.forEach(function () {\n _this._size += 1;\n });\n return this._size;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Updates the value at the given key using the provided function. The function\n * is called with the current value at the key, and its return value is used as\n * the new value to be set.\n *\n * ### Example:\n *\n * ```javascript\n * // Increment the current value by one\n * searchableMap.update('somekey', (currentValue) => currentValue == null ? 0 : currentValue + 1)\n * ```\n *\n * @param key The key to update\n * @param fn The function used to compute the new value from the current one\n * @return The [[SearchableMap]] itself, to allow chaining\n */\n SearchableMap.prototype.update = function (key, fn) {\n if (typeof key !== 'string') {\n throw new Error('key must be a string');\n }\n delete this._size;\n var node = createPath(this._tree, key);\n node[LEAF] = fn(node[LEAF]);\n return this;\n };\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/values\n * @return An `Iterable` iterating through values.\n */\n SearchableMap.prototype.values = function () {\n return new TreeIterator(this, VALUES);\n };\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/@@iterator\n */\n SearchableMap.prototype[Symbol.iterator] = function () {\n return this.entries();\n };\n /**\n * Creates a [[SearchableMap]] from an `Iterable` of entries\n *\n * @param entries Entries to be inserted in the [[SearchableMap]]\n * @return A new [[SearchableMap]] with the given entries\n */\n SearchableMap.from = function (entries) {\n var e_2, _a;\n var tree = new SearchableMap();\n try {\n for (var entries_1 = __values(entries), entries_1_1 = entries_1.next(); !entries_1_1.done; entries_1_1 = entries_1.next()) {\n var _b = __read(entries_1_1.value, 2),\n key = _b[0],\n value = _b[1];\n tree.set(key, value);\n }\n } catch (e_2_1) {\n e_2 = {\n error: e_2_1\n };\n } finally {\n try {\n if (entries_1_1 && !entries_1_1.done && (_a = entries_1.return)) _a.call(entries_1);\n } finally {\n if (e_2) throw e_2.error;\n }\n }\n return tree;\n };\n /**\n * Creates a [[SearchableMap]] from the iterable properties of a JavaScript object\n *\n * @param object Object of entries for the [[SearchableMap]]\n * @return A new [[SearchableMap]] with the given entries\n */\n SearchableMap.fromObject = function (object) {\n return SearchableMap.from(Object.entries(object));\n };\n return SearchableMap;\n}();\nvar trackDown = function trackDown(tree, key, path) {\n if (path === void 0) {\n path = [];\n }\n if (key.length === 0 || tree == null) {\n return [tree, path];\n }\n var nodeKey = Object.keys(tree).find(function (k) {\n return k !== LEAF && key.startsWith(k);\n });\n if (nodeKey === undefined) {\n path.push([tree, key]); // performance: update in place\n return trackDown(undefined, '', path);\n }\n path.push([tree, nodeKey]); // performance: update in place\n return trackDown(tree[nodeKey], key.slice(nodeKey.length), path);\n};\nvar lookup = function lookup(tree, key) {\n if (key.length === 0 || tree == null) {\n return tree;\n }\n var nodeKey = Object.keys(tree).find(function (k) {\n return k !== LEAF && key.startsWith(k);\n });\n if (nodeKey === undefined) {\n return undefined;\n }\n return lookup(tree[nodeKey], key.slice(nodeKey.length));\n};\nvar createPath = function createPath(tree, key) {\n var _a;\n if (key.length === 0 || tree == null) {\n return tree;\n }\n var nodeKey = Object.keys(tree).find(function (k) {\n return k !== LEAF && key.startsWith(k);\n });\n if (nodeKey === undefined) {\n var toSplit = Object.keys(tree).find(function (k) {\n return k !== LEAF && k.startsWith(key[0]);\n });\n if (toSplit === undefined) {\n tree[key] = {};\n } else {\n var prefix = commonPrefix(key, toSplit);\n tree[prefix] = (_a = {}, _a[toSplit.slice(prefix.length)] = tree[toSplit], _a);\n delete tree[toSplit];\n return createPath(tree[prefix], key.slice(prefix.length));\n }\n return tree[key];\n }\n return createPath(tree[nodeKey], key.slice(nodeKey.length));\n};\nvar commonPrefix = function commonPrefix(a, b, i, length, prefix) {\n if (i === void 0) {\n i = 0;\n }\n if (length === void 0) {\n length = Math.min(a.length, b.length);\n }\n if (prefix === void 0) {\n prefix = '';\n }\n if (i >= length) {\n return prefix;\n }\n if (a[i] !== b[i]) {\n return prefix;\n }\n return commonPrefix(a, b, i + 1, length, prefix + a[i]);\n};\nvar remove = function remove(tree, key) {\n var _a = __read(trackDown(tree, key), 2),\n node = _a[0],\n path = _a[1];\n if (node === undefined) {\n return;\n }\n delete node[LEAF];\n var keys = Object.keys(node);\n if (keys.length === 0) {\n cleanup(path);\n }\n if (keys.length === 1) {\n merge(path, keys[0], node[keys[0]]);\n }\n};\nvar cleanup = function cleanup(path) {\n if (path.length === 0) {\n return;\n }\n var _a = __read(last(path), 2),\n node = _a[0],\n key = _a[1];\n delete node[key];\n var keys = Object.keys(node);\n if (keys.length === 0) {\n cleanup(path.slice(0, -1));\n }\n if (keys.length === 1 && keys[0] !== LEAF) {\n merge(path.slice(0, -1), keys[0], node[keys[0]]);\n }\n};\nvar merge = function merge(path, key, value) {\n if (path.length === 0) {\n return;\n }\n var _a = __read(last(path), 2),\n node = _a[0],\n nodeKey = _a[1];\n node[nodeKey + key] = value;\n delete node[nodeKey];\n};\nvar last = function last(array) {\n return array[array.length - 1];\n};\nvar _a;\nvar OR = 'or';\nvar AND = 'and';\nvar AND_NOT = 'and_not';\n/**\n * [[MiniSearch]] is the main entrypoint class, implementing a full-text search\n * engine in memory.\n *\n * @typeParam T The type of the documents being indexed.\n *\n * ### Basic example:\n *\n * ```javascript\n * const documents = [\n * {\n * id: 1,\n * title: 'Moby Dick',\n * text: 'Call me Ishmael. Some years ago...',\n * category: 'fiction'\n * },\n * {\n * id: 2,\n * title: 'Zen and the Art of Motorcycle Maintenance',\n * text: 'I can see by my watch...',\n * category: 'fiction'\n * },\n * {\n * id: 3,\n * title: 'Neuromancer',\n * text: 'The sky above the port was...',\n * category: 'fiction'\n * },\n * {\n * id: 4,\n * title: 'Zen and the Art of Archery',\n * text: 'At first sight it must seem...',\n * category: 'non-fiction'\n * },\n * // ...and more\n * ]\n *\n * // Create a search engine that indexes the 'title' and 'text' fields for\n * // full-text search. Search results will include 'title' and 'category' (plus the\n * // id field, that is always stored and returned)\n * const miniSearch = new MiniSearch({\n * fields: ['title', 'text'],\n * storeFields: ['title', 'category']\n * })\n *\n * // Add documents to the index\n * miniSearch.addAll(documents)\n *\n * // Search for documents:\n * let results = miniSearch.search('zen art motorcycle')\n * // => [\n * // { id: 2, title: 'Zen and the Art of Motorcycle Maintenance', category: 'fiction', score: 2.77258 },\n * // { id: 4, title: 'Zen and the Art of Archery', category: 'non-fiction', score: 1.38629 }\n * // ]\n * ```\n */\nvar MiniSearch = /** @class */function () {\n /**\n * @param options Configuration options\n *\n * ### Examples:\n *\n * ```javascript\n * // Create a search engine that indexes the 'title' and 'text' fields of your\n * // documents:\n * const miniSearch = new MiniSearch({ fields: ['title', 'text'] })\n * ```\n *\n * ### ID Field:\n *\n * ```javascript\n * // Your documents are assumed to include a unique 'id' field, but if you want\n * // to use a different field for document identification, you can set the\n * // 'idField' option:\n * const miniSearch = new MiniSearch({ idField: 'key', fields: ['title', 'text'] })\n * ```\n *\n * ### Options and defaults:\n *\n * ```javascript\n * // The full set of options (here with their default value) is:\n * const miniSearch = new MiniSearch({\n * // idField: field that uniquely identifies a document\n * idField: 'id',\n *\n * // extractField: function used to get the value of a field in a document.\n * // By default, it assumes the document is a flat object with field names as\n * // property keys and field values as string property values, but custom logic\n * // can be implemented by setting this option to a custom extractor function.\n * extractField: (document, fieldName) => document[fieldName],\n *\n * // tokenize: function used to split fields into individual terms. By\n * // default, it is also used to tokenize search queries, unless a specific\n * // `tokenize` search option is supplied. When tokenizing an indexed field,\n * // the field name is passed as the second argument.\n * tokenize: (string, _fieldName) => string.split(SPACE_OR_PUNCTUATION),\n *\n * // processTerm: function used to process each tokenized term before\n * // indexing. It can be used for stemming and normalization. Return a falsy\n * // value in order to discard a term. By default, it is also used to process\n * // search queries, unless a specific `processTerm` option is supplied as a\n * // search option. When processing a term from a indexed field, the field\n * // name is passed as the second argument.\n * processTerm: (term, _fieldName) => term.toLowerCase(),\n *\n * // searchOptions: default search options, see the `search` method for\n * // details\n * searchOptions: undefined,\n *\n * // fields: document fields to be indexed. Mandatory, but not set by default\n * fields: undefined\n *\n * // storeFields: document fields to be stored and returned as part of the\n * // search results.\n * storeFields: []\n * })\n * ```\n */\n function MiniSearch(options) {\n if ((options === null || options === void 0 ? void 0 : options.fields) == null) {\n throw new Error('MiniSearch: option \"fields\" must be provided');\n }\n this._options = _assign(_assign(_assign({}, defaultOptions), options), {\n searchOptions: _assign(_assign({}, defaultSearchOptions), options.searchOptions || {})\n });\n this._index = new SearchableMap();\n this._documentCount = 0;\n this._documentIds = {};\n this._fieldIds = {};\n this._fieldLength = {};\n this._averageFieldLength = {};\n this._nextId = 0;\n this._storedFields = {};\n this.addFields(this._options.fields);\n }\n /**\n * Adds a document to the index\n *\n * @param document The document to be indexed\n */\n MiniSearch.prototype.add = function (document) {\n var _this = this;\n var _a = this._options,\n extractField = _a.extractField,\n tokenize = _a.tokenize,\n processTerm = _a.processTerm,\n fields = _a.fields,\n idField = _a.idField;\n var id = extractField(document, idField);\n if (id == null) {\n throw new Error(\"MiniSearch: document does not have ID field \\\"\".concat(idField, \"\\\"\"));\n }\n var shortDocumentId = this.addDocumentId(id);\n this.saveStoredFields(shortDocumentId, document);\n fields.forEach(function (field) {\n var fieldValue = extractField(document, field);\n if (fieldValue == null) {\n return;\n }\n var tokens = tokenize(fieldValue.toString(), field);\n _this.addFieldLength(shortDocumentId, _this._fieldIds[field], _this.documentCount - 1, tokens.length);\n tokens.forEach(function (term) {\n var processedTerm = processTerm(term, field);\n if (processedTerm) {\n _this.addTerm(_this._fieldIds[field], shortDocumentId, processedTerm);\n }\n });\n });\n };\n /**\n * Adds all the given documents to the index\n *\n * @param documents An array of documents to be indexed\n */\n MiniSearch.prototype.addAll = function (documents) {\n var _this = this;\n documents.forEach(function (document) {\n return _this.add(document);\n });\n };\n /**\n * Adds all the given documents to the index asynchronously.\n *\n * Returns a promise that resolves (to `undefined`) when the indexing is done.\n * This method is useful when index many documents, to avoid blocking the main\n * thread. The indexing is performed asynchronously and in chunks.\n *\n * @param documents An array of documents to be indexed\n * @param options Configuration options\n * @return A promise resolving to `undefined` when the indexing is done\n */\n MiniSearch.prototype.addAllAsync = function (documents, options) {\n var _this = this;\n if (options === void 0) {\n options = {};\n }\n var _a = options.chunkSize,\n chunkSize = _a === void 0 ? 10 : _a;\n var acc = {\n chunk: [],\n promise: Promise.resolve()\n };\n var _b = documents.reduce(function (_a, document, i) {\n var chunk = _a.chunk,\n promise = _a.promise;\n chunk.push(document);\n if ((i + 1) % chunkSize === 0) {\n return {\n chunk: [],\n promise: promise.then(function () {\n return new Promise(function (resolve) {\n return setTimeout(resolve, 0);\n });\n }).then(function () {\n return _this.addAll(chunk);\n })\n };\n } else {\n return {\n chunk: chunk,\n promise: promise\n };\n }\n }, acc),\n chunk = _b.chunk,\n promise = _b.promise;\n return promise.then(function () {\n return _this.addAll(chunk);\n });\n };\n /**\n * Removes the given document from the index.\n *\n * The document to delete must NOT have changed between indexing and deletion,\n * otherwise the index will be corrupted. Therefore, when reindexing a document\n * after a change, the correct order of operations is:\n *\n * 1. remove old version\n * 2. apply changes\n * 3. index new version\n *\n * @param document The document to be removed\n */\n MiniSearch.prototype.remove = function (document) {\n var _this = this;\n var _a = this._options,\n tokenize = _a.tokenize,\n processTerm = _a.processTerm,\n extractField = _a.extractField,\n fields = _a.fields,\n idField = _a.idField;\n var id = extractField(document, idField);\n if (id == null) {\n throw new Error(\"MiniSearch: document does not have ID field \\\"\".concat(idField, \"\\\"\"));\n }\n var _b = __read(Object.entries(this._documentIds).find(function (_a) {\n var _b = __read(_a, 2);\n _b[0];\n var longId = _b[1];\n return id === longId;\n }) || [], 1),\n shortDocumentId = _b[0];\n if (shortDocumentId == null) {\n throw new Error(\"MiniSearch: cannot remove document with ID \".concat(id, \": it is not in the index\"));\n }\n fields.forEach(function (field) {\n var fieldValue = extractField(document, field);\n if (fieldValue == null) {\n return;\n }\n var tokens = tokenize(fieldValue.toString(), field);\n tokens.forEach(function (term) {\n var processedTerm = processTerm(term, field);\n if (processedTerm) {\n _this.removeTerm(_this._fieldIds[field], shortDocumentId, processedTerm);\n }\n });\n _this.removeFieldLength(shortDocumentId, _this._fieldIds[field], _this.documentCount, tokens.length);\n });\n delete this._storedFields[shortDocumentId];\n delete this._documentIds[shortDocumentId];\n delete this._fieldLength[shortDocumentId];\n this._documentCount -= 1;\n };\n /**\n * Removes all the given documents from the index. If called with no arguments,\n * it removes _all_ documents from the index.\n *\n * @param documents The documents to be removed. If this argument is omitted,\n * all documents are removed. Note that, for removing all documents, it is\n * more efficient to call this method with no arguments than to pass all\n * documents.\n */\n MiniSearch.prototype.removeAll = function (documents) {\n var _this = this;\n if (documents) {\n documents.forEach(function (document) {\n return _this.remove(document);\n });\n } else if (arguments.length > 0) {\n throw new Error('Expected documents to be present. Omit the argument to remove all documents.');\n } else {\n this._index = new SearchableMap();\n this._documentCount = 0;\n this._documentIds = {};\n this._fieldLength = {};\n this._averageFieldLength = {};\n this._storedFields = {};\n this._nextId = 0;\n }\n };\n /**\n * Search for documents matching the given search query.\n *\n * The result is a list of scored document IDs matching the query, sorted by\n * descending score, and each including data about which terms were matched and\n * in which fields.\n *\n * ### Basic usage:\n *\n * ```javascript\n * // Search for \"zen art motorcycle\" with default options: terms have to match\n * // exactly, and individual terms are joined with OR\n * miniSearch.search('zen art motorcycle')\n * // => [ { id: 2, score: 2.77258, match: { ... } }, { id: 4, score: 1.38629, match: { ... } } ]\n * ```\n *\n * ### Restrict search to specific fields:\n *\n * ```javascript\n * // Search only in the 'title' field\n * miniSearch.search('zen', { fields: ['title'] })\n * ```\n *\n * ### Field boosting:\n *\n * ```javascript\n * // Boost a field\n * miniSearch.search('zen', { boost: { title: 2 } })\n * ```\n *\n * ### Prefix search:\n *\n * ```javascript\n * // Search for \"moto\" with prefix search (it will match documents\n * // containing terms that start with \"moto\" or \"neuro\")\n * miniSearch.search('moto neuro', { prefix: true })\n * ```\n *\n * ### Fuzzy search:\n *\n * ```javascript\n * // Search for \"ismael\" with fuzzy search (it will match documents containing\n * // terms similar to \"ismael\", with a maximum edit distance of 0.2 term.length\n * // (rounded to nearest integer)\n * miniSearch.search('ismael', { fuzzy: 0.2 })\n * ```\n *\n * ### Combining strategies:\n *\n * ```javascript\n * // Mix of exact match, prefix search, and fuzzy search\n * miniSearch.search('ismael mob', {\n * prefix: true,\n * fuzzy: 0.2\n * })\n * ```\n *\n * ### Advanced prefix and fuzzy search:\n *\n * ```javascript\n * // Perform fuzzy and prefix search depending on the search term. Here\n * // performing prefix and fuzzy search only on terms longer than 3 characters\n * miniSearch.search('ismael mob', {\n * prefix: term => term.length > 3\n * fuzzy: term => term.length > 3 ? 0.2 : null\n * })\n * ```\n *\n * ### Combine with AND:\n *\n * ```javascript\n * // Combine search terms with AND (to match only documents that contain both\n * // \"motorcycle\" and \"art\")\n * miniSearch.search('motorcycle art', { combineWith: 'AND' })\n * ```\n *\n * ### Combine with AND_NOT:\n *\n * There is also an AND_NOT combinator, that finds documents that match the\n * first term, but do not match any of the other terms. This combinator is\n * rarely useful with simple queries, and is meant to be used with advanced\n * query combinations (see later for more details).\n *\n * ### Filtering results:\n *\n * ```javascript\n * // Filter only results in the 'fiction' category (assuming that 'category'\n * // is a stored field)\n * miniSearch.search('motorcycle art', {\n * filter: (result) => result.category === 'fiction'\n * })\n * ```\n *\n * ### Advanced combination of queries:\n *\n * It is possible to combine different subqueries with OR, AND, and AND_NOT,\n * and even with different search options, by passing a query expression\n * tree object as the first argument, instead of a string.\n *\n * ```javascript\n * // Search for documents that contain \"zen\" and (\"motorcycle\" or \"archery\")\n * miniSearch.search({\n * combineWith: 'AND',\n * queries: [\n * 'zen',\n * {\n * combineWith: 'OR',\n * queries: ['motorcycle', 'archery']\n * }\n * ]\n * })\n *\n * // Search for documents that contain (\"apple\" or \"pear\") but not \"juice\" and\n * // not \"tree\"\n * miniSearch.search({\n * combineWith: 'AND_NOT',\n * queries: [\n * {\n * combineWith: 'OR',\n * queries: ['apple', 'pear']\n * },\n * 'juice',\n * 'tree'\n * ]\n * })\n * ```\n *\n * Each node in the expression tree can be either a string, or an object that\n * supports all `SearchOptions` fields, plus a `queries` array field for\n * subqueries.\n *\n * Note that, while this can become complicated to do by hand for complex or\n * deeply nested queries, it provides a formalized expression tree API for\n * external libraries that implement a parser for custom query languages.\n *\n * @param query Search query\n * @param options Search options. Each option, if not given, defaults to the corresponding value of `searchOptions` given to the constructor, or to the library default.\n */\n MiniSearch.prototype.search = function (query, searchOptions) {\n var _this = this;\n if (searchOptions === void 0) {\n searchOptions = {};\n }\n var combinedResults = this.executeQuery(query, searchOptions);\n return Object.entries(combinedResults).reduce(function (results, _a) {\n var _b = __read(_a, 2),\n docId = _b[0],\n _c = _b[1],\n score = _c.score,\n match = _c.match,\n terms = _c.terms;\n var result = {\n id: _this._documentIds[docId],\n terms: uniq(terms),\n score: score,\n match: match\n };\n Object.assign(result, _this._storedFields[docId]);\n if (searchOptions.filter == null || searchOptions.filter(result)) {\n results.push(result);\n }\n return results;\n }, []).sort(function (_a, _b) {\n var a = _a.score;\n var b = _b.score;\n return a < b ? 1 : -1;\n });\n };\n /**\n * Provide suggestions for the given search query\n *\n * The result is a list of suggested modified search queries, derived from the\n * given search query, each with a relevance score, sorted by descending score.\n *\n * ### Basic usage:\n *\n * ```javascript\n * // Get suggestions for 'neuro':\n * miniSearch.autoSuggest('neuro')\n * // => [ { suggestion: 'neuromancer', terms: [ 'neuromancer' ], score: 0.46240 } ]\n * ```\n *\n * ### Multiple words:\n *\n * ```javascript\n * // Get suggestions for 'zen ar':\n * miniSearch.autoSuggest('zen ar')\n * // => [\n * // { suggestion: 'zen archery art', terms: [ 'zen', 'archery', 'art' ], score: 1.73332 },\n * // { suggestion: 'zen art', terms: [ 'zen', 'art' ], score: 1.21313 }\n * // ]\n * ```\n *\n * ### Fuzzy suggestions:\n *\n * ```javascript\n * // Correct spelling mistakes using fuzzy search:\n * miniSearch.autoSuggest('neromancer', { fuzzy: 0.2 })\n * // => [ { suggestion: 'neuromancer', terms: [ 'neuromancer' ], score: 1.03998 } ]\n * ```\n *\n * ### Filtering:\n *\n * ```javascript\n * // Get suggestions for 'zen ar', but only within the 'fiction' category\n * // (assuming that 'category' is a stored field):\n * miniSearch.autoSuggest('zen ar', {\n * filter: (result) => result.category === 'fiction'\n * })\n * // => [\n * // { suggestion: 'zen archery art', terms: [ 'zen', 'archery', 'art' ], score: 1.73332 },\n * // { suggestion: 'zen art', terms: [ 'zen', 'art' ], score: 1.21313 }\n * // ]\n * ```\n *\n * @param queryString Query string to be expanded into suggestions\n * @param options Search options. The supported options and default values\n * are the same as for the `search` method, except that by default prefix\n * search is performed on the last term in the query.\n * @return A sorted array of suggestions sorted by relevance score.\n */\n MiniSearch.prototype.autoSuggest = function (queryString, options) {\n if (options === void 0) {\n options = {};\n }\n options = _assign(_assign({}, defaultAutoSuggestOptions), options);\n var suggestions = this.search(queryString, options).reduce(function (suggestions, _a) {\n var score = _a.score,\n terms = _a.terms;\n var phrase = terms.join(' ');\n if (suggestions[phrase] == null) {\n suggestions[phrase] = {\n score: score,\n terms: terms,\n count: 1\n };\n } else {\n suggestions[phrase].score += score;\n suggestions[phrase].count += 1;\n }\n return suggestions;\n }, {});\n return Object.entries(suggestions).map(function (_a) {\n var _b = __read(_a, 2),\n suggestion = _b[0],\n _c = _b[1],\n score = _c.score,\n terms = _c.terms,\n count = _c.count;\n return {\n suggestion: suggestion,\n terms: terms,\n score: score / count\n };\n }).sort(function (_a, _b) {\n var a = _a.score;\n var b = _b.score;\n return a < b ? 1 : -1;\n });\n };\n Object.defineProperty(MiniSearch.prototype, \"documentCount\", {\n /**\n * Number of documents in the index\n */\n get: function get() {\n return this._documentCount;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Deserializes a JSON index (serialized with `miniSearch.toJSON()`) and\n * instantiates a MiniSearch instance. It should be given the same options\n * originally used when serializing the index.\n *\n * ### Usage:\n *\n * ```javascript\n * // If the index was serialized with:\n * let miniSearch = new MiniSearch({ fields: ['title', 'text'] })\n * miniSearch.addAll(documents)\n *\n * const json = JSON.stringify(miniSearch)\n * // It can later be deserialized like this:\n * miniSearch = MiniSearch.loadJSON(json, { fields: ['title', 'text'] })\n * ```\n *\n * @param json JSON-serialized index\n * @param options configuration options, same as the constructor\n * @return An instance of MiniSearch deserialized from the given JSON.\n */\n MiniSearch.loadJSON = function (json, options) {\n if (options == null) {\n throw new Error('MiniSearch: loadJSON should be given the same options used when serializing the index');\n }\n return MiniSearch.loadJS(JSON.parse(json), options);\n };\n /**\n * Returns the default value of an option. It will throw an error if no option\n * with the given name exists.\n *\n * @param optionName Name of the option\n * @return The default value of the given option\n *\n * ### Usage:\n *\n * ```javascript\n * // Get default tokenizer\n * MiniSearch.getDefault('tokenize')\n *\n * // Get default term processor\n * MiniSearch.getDefault('processTerm')\n *\n * // Unknown options will throw an error\n * MiniSearch.getDefault('notExisting')\n * // => throws 'MiniSearch: unknown option \"notExisting\"'\n * ```\n */\n MiniSearch.getDefault = function (optionName) {\n if (defaultOptions.hasOwnProperty(optionName)) {\n return getOwnProperty(defaultOptions, optionName);\n } else {\n throw new Error(\"MiniSearch: unknown option \\\"\".concat(optionName, \"\\\"\"));\n }\n };\n /**\n * @ignore\n */\n MiniSearch.loadJS = function (js, options) {\n var index = js.index,\n documentCount = js.documentCount,\n nextId = js.nextId,\n documentIds = js.documentIds,\n fieldIds = js.fieldIds,\n fieldLength = js.fieldLength,\n averageFieldLength = js.averageFieldLength,\n storedFields = js.storedFields;\n var miniSearch = new MiniSearch(options);\n miniSearch._index = new SearchableMap(index._tree, index._prefix);\n miniSearch._documentCount = documentCount;\n miniSearch._nextId = nextId;\n miniSearch._documentIds = documentIds;\n miniSearch._fieldIds = fieldIds;\n miniSearch._fieldLength = fieldLength;\n miniSearch._averageFieldLength = averageFieldLength;\n miniSearch._fieldIds = fieldIds;\n miniSearch._storedFields = storedFields || {};\n return miniSearch;\n };\n /**\n * @ignore\n */\n MiniSearch.prototype.executeQuery = function (query, searchOptions) {\n var _this = this;\n if (searchOptions === void 0) {\n searchOptions = {};\n }\n if (typeof query === 'string') {\n return this.executeSearch(query, searchOptions);\n } else {\n var results = query.queries.map(function (subquery) {\n var options = _assign(_assign(_assign({}, searchOptions), query), {\n queries: undefined\n });\n return _this.executeQuery(subquery, options);\n });\n return this.combineResults(results, query.combineWith);\n }\n };\n /**\n * @ignore\n */\n MiniSearch.prototype.executeSearch = function (queryString, searchOptions) {\n var _this = this;\n if (searchOptions === void 0) {\n searchOptions = {};\n }\n var _a = this._options,\n tokenize = _a.tokenize,\n processTerm = _a.processTerm,\n globalSearchOptions = _a.searchOptions;\n var options = _assign(_assign({\n tokenize: tokenize,\n processTerm: processTerm\n }, globalSearchOptions), searchOptions);\n var searchTokenize = options.tokenize,\n searchProcessTerm = options.processTerm;\n var terms = searchTokenize(queryString).map(function (term) {\n return searchProcessTerm(term);\n }).filter(function (term) {\n return !!term;\n });\n var queries = terms.map(termToQuerySpec(options));\n var results = queries.map(function (query) {\n return _this.executeQuerySpec(query, options);\n });\n return this.combineResults(results, options.combineWith);\n };\n /**\n * @ignore\n */\n MiniSearch.prototype.executeQuerySpec = function (query, searchOptions) {\n var _this = this;\n var options = _assign(_assign({}, this._options.searchOptions), searchOptions);\n var boosts = (options.fields || this._options.fields).reduce(function (boosts, field) {\n var _a;\n return _assign(_assign({}, boosts), (_a = {}, _a[field] = getOwnProperty(boosts, field) || 1, _a));\n }, options.boost || {});\n var boostDocument = options.boostDocument,\n weights = options.weights,\n maxFuzzy = options.maxFuzzy;\n var _a = _assign(_assign({}, defaultSearchOptions.weights), weights),\n fuzzyWeight = _a.fuzzy,\n prefixWeight = _a.prefix;\n var exactMatch = this.termResults(query.term, boosts, boostDocument, this._index.get(query.term));\n if (!query.fuzzy && !query.prefix) {\n return exactMatch;\n }\n var results = [exactMatch];\n if (query.prefix) {\n this._index.atPrefix(query.term).forEach(function (term, data) {\n var weightedDistance = 0.3 * (term.length - query.term.length) / term.length;\n results.push(_this.termResults(term, boosts, boostDocument, data, prefixWeight, weightedDistance));\n });\n }\n if (query.fuzzy) {\n var fuzzy = query.fuzzy === true ? 0.2 : query.fuzzy;\n var maxDistance = fuzzy < 1 ? Math.min(maxFuzzy, Math.round(query.term.length * fuzzy)) : fuzzy;\n Object.entries(this._index.fuzzyGet(query.term, maxDistance)).forEach(function (_a) {\n var _b = __read(_a, 2),\n term = _b[0],\n _c = __read(_b[1], 2),\n data = _c[0],\n distance = _c[1];\n var weightedDistance = distance / term.length;\n results.push(_this.termResults(term, boosts, boostDocument, data, fuzzyWeight, weightedDistance));\n });\n }\n return results.reduce(combinators[OR]);\n };\n /**\n * @ignore\n */\n MiniSearch.prototype.combineResults = function (results, combineWith) {\n if (combineWith === void 0) {\n combineWith = OR;\n }\n if (results.length === 0) {\n return {};\n }\n var operator = combineWith.toLowerCase();\n return results.reduce(combinators[operator]) || {};\n };\n /**\n * Allows serialization of the index to JSON, to possibly store it and later\n * deserialize it with `MiniSearch.loadJSON`.\n *\n * Normally one does not directly call this method, but rather call the\n * standard JavaScript `JSON.stringify()` passing the `MiniSearch` instance,\n * and JavaScript will internally call this method. Upon deserialization, one\n * must pass to `loadJSON` the same options used to create the original\n * instance that was serialized.\n *\n * ### Usage:\n *\n * ```javascript\n * // Serialize the index:\n * let miniSearch = new MiniSearch({ fields: ['title', 'text'] })\n * miniSearch.addAll(documents)\n * const json = JSON.stringify(miniSearch)\n *\n * // Later, to deserialize it:\n * miniSearch = MiniSearch.loadJSON(json, { fields: ['title', 'text'] })\n * ```\n *\n * @return A plain-object serializeable representation of the search index.\n */\n MiniSearch.prototype.toJSON = function () {\n return {\n index: this._index,\n documentCount: this._documentCount,\n nextId: this._nextId,\n documentIds: this._documentIds,\n fieldIds: this._fieldIds,\n fieldLength: this._fieldLength,\n averageFieldLength: this._averageFieldLength,\n storedFields: this._storedFields\n };\n };\n /**\n * @ignore\n */\n MiniSearch.prototype.termResults = function (term, boosts, boostDocument, indexData, weight, editDistance) {\n var _this = this;\n if (editDistance === void 0) {\n editDistance = 0;\n }\n if (indexData == null) {\n return {};\n }\n return Object.entries(boosts).reduce(function (results, _a) {\n var _b = __read(_a, 2),\n field = _b[0],\n boost = _b[1];\n var fieldId = _this._fieldIds[field];\n var _c = indexData[fieldId] || {\n ds: {}\n },\n df = _c.df,\n ds = _c.ds;\n Object.entries(ds).forEach(function (_a) {\n var _b = __read(_a, 2),\n documentId = _b[0],\n tf = _b[1];\n var docBoost = boostDocument ? boostDocument(_this._documentIds[documentId], term) : 1;\n if (!docBoost) {\n return;\n }\n var normalizedLength = _this._fieldLength[documentId][fieldId] / _this._averageFieldLength[fieldId];\n results[documentId] = results[documentId] || {\n score: 0,\n match: {},\n terms: []\n };\n results[documentId].terms.push(term);\n results[documentId].match[term] = getOwnProperty(results[documentId].match, term) || [];\n results[documentId].score += docBoost * score(tf, df, _this._documentCount, normalizedLength, boost, editDistance);\n results[documentId].match[term].push(field);\n });\n return results;\n }, {});\n };\n /**\n * @ignore\n */\n MiniSearch.prototype.addTerm = function (fieldId, documentId, term) {\n this._index.update(term, function (indexData) {\n var _a;\n indexData = indexData || {};\n var fieldIndex = indexData[fieldId] || {\n df: 0,\n ds: {}\n };\n if (fieldIndex.ds[documentId] == null) {\n fieldIndex.df += 1;\n }\n fieldIndex.ds[documentId] = (fieldIndex.ds[documentId] || 0) + 1;\n return _assign(_assign({}, indexData), (_a = {}, _a[fieldId] = fieldIndex, _a));\n });\n };\n /**\n * @ignore\n */\n MiniSearch.prototype.removeTerm = function (fieldId, documentId, term) {\n var _this = this;\n if (!this._index.has(term)) {\n this.warnDocumentChanged(documentId, fieldId, term);\n return;\n }\n this._index.update(term, function (indexData) {\n var _a;\n var fieldIndex = indexData[fieldId];\n if (fieldIndex == null || fieldIndex.ds[documentId] == null) {\n _this.warnDocumentChanged(documentId, fieldId, term);\n return indexData;\n }\n if (fieldIndex.ds[documentId] <= 1) {\n if (fieldIndex.df <= 1) {\n delete indexData[fieldId];\n return indexData;\n }\n fieldIndex.df -= 1;\n }\n if (fieldIndex.ds[documentId] <= 1) {\n delete fieldIndex.ds[documentId];\n return indexData;\n }\n fieldIndex.ds[documentId] -= 1;\n return _assign(_assign({}, indexData), (_a = {}, _a[fieldId] = fieldIndex, _a));\n });\n if (Object.keys(this._index.get(term)).length === 0) {\n this._index.delete(term);\n }\n };\n /**\n * @ignore\n */\n MiniSearch.prototype.warnDocumentChanged = function (shortDocumentId, fieldId, term) {\n if (console == null || console.warn == null) {\n return;\n }\n var fieldName = Object.entries(this._fieldIds).find(function (_a) {\n var _b = __read(_a, 2);\n _b[0];\n var id = _b[1];\n return id === fieldId;\n })[0];\n console.warn(\"MiniSearch: document with ID \".concat(this._documentIds[shortDocumentId], \" has changed before removal: term \\\"\").concat(term, \"\\\" was not present in field \\\"\").concat(fieldName, \"\\\". Removing a document after it has changed can corrupt the index!\"));\n };\n /**\n * @ignore\n */\n MiniSearch.prototype.addDocumentId = function (documentId) {\n var shortDocumentId = this._nextId.toString(36);\n this._documentIds[shortDocumentId] = documentId;\n this._documentCount += 1;\n this._nextId += 1;\n return shortDocumentId;\n };\n /**\n * @ignore\n */\n MiniSearch.prototype.addFields = function (fields) {\n var _this = this;\n fields.forEach(function (field, i) {\n _this._fieldIds[field] = i;\n });\n };\n /**\n * @ignore\n */\n MiniSearch.prototype.addFieldLength = function (documentId, fieldId, count, length) {\n this._averageFieldLength[fieldId] = this._averageFieldLength[fieldId] || 0;\n var totalLength = this._averageFieldLength[fieldId] * count + length;\n this._fieldLength[documentId] = this._fieldLength[documentId] || {};\n this._fieldLength[documentId][fieldId] = length;\n this._averageFieldLength[fieldId] = totalLength / (count + 1);\n };\n /**\n * @ignore\n */\n MiniSearch.prototype.removeFieldLength = function (documentId, fieldId, count, length) {\n var totalLength = this._averageFieldLength[fieldId] * count - length;\n this._averageFieldLength[fieldId] = totalLength / (count - 1);\n };\n /**\n * @ignore\n */\n MiniSearch.prototype.saveStoredFields = function (documentId, doc) {\n var _this = this;\n var _a = this._options,\n storeFields = _a.storeFields,\n extractField = _a.extractField;\n if (storeFields == null || storeFields.length === 0) {\n return;\n }\n this._storedFields[documentId] = this._storedFields[documentId] || {};\n storeFields.forEach(function (fieldName) {\n var fieldValue = extractField(doc, fieldName);\n if (fieldValue === undefined) {\n return;\n }\n _this._storedFields[documentId][fieldName] = fieldValue;\n });\n };\n return MiniSearch;\n}();\nvar getOwnProperty = function getOwnProperty(object, property) {\n return Object.prototype.hasOwnProperty.call(object, property) ? object[property] : undefined;\n};\nvar combinators = (_a = {}, _a[OR] = function (a, b) {\n return Object.entries(b).reduce(function (combined, _a) {\n var _b;\n var _c = __read(_a, 2),\n documentId = _c[0],\n _d = _c[1],\n score = _d.score,\n match = _d.match,\n terms = _d.terms;\n if (combined[documentId] == null) {\n combined[documentId] = {\n score: score,\n match: match,\n terms: terms\n };\n } else {\n combined[documentId].score += score;\n combined[documentId].score *= 1.5;\n (_b = combined[documentId].terms).push.apply(_b, __spreadArray([], __read(terms), false));\n Object.assign(combined[documentId].match, match);\n }\n return combined;\n }, a || {});\n}, _a[AND] = function (a, b) {\n return Object.entries(b).reduce(function (combined, _a) {\n var _b = __read(_a, 2),\n documentId = _b[0],\n _c = _b[1],\n score = _c.score,\n match = _c.match,\n terms = _c.terms;\n if (a[documentId] === undefined) {\n return combined;\n }\n combined[documentId] = combined[documentId] || {};\n combined[documentId].score = a[documentId].score + score;\n combined[documentId].match = _assign(_assign({}, a[documentId].match), match);\n combined[documentId].terms = __spreadArray(__spreadArray([], __read(a[documentId].terms), false), __read(terms), false);\n return combined;\n }, {});\n}, _a[AND_NOT] = function (a, b) {\n return Object.entries(b).reduce(function (combined, _a) {\n var _b = __read(_a, 2),\n documentId = _b[0],\n _c = _b[1];\n _c.score;\n _c.match;\n _c.terms;\n delete combined[documentId];\n return combined;\n }, a || {});\n}, _a);\nvar tfIdf = function tfIdf(tf, df, n) {\n return tf * Math.log(n / df);\n};\nvar score = function score(termFrequency, documentFrequency, documentCount, normalizedLength, boost, editDistance) {\n var weight = boost / (1 + 0.333 * boost * editDistance);\n return weight * tfIdf(termFrequency, documentFrequency, documentCount) / normalizedLength;\n};\nvar termToQuerySpec = function termToQuerySpec(options) {\n return function (term, i, terms) {\n var fuzzy = typeof options.fuzzy === 'function' ? options.fuzzy(term, i, terms) : options.fuzzy || false;\n var prefix = typeof options.prefix === 'function' ? options.prefix(term, i, terms) : options.prefix === true;\n return {\n term: term,\n fuzzy: fuzzy,\n prefix: prefix\n };\n };\n};\nvar uniq = function uniq(array) {\n return array.filter(function (element, i, array) {\n return array.indexOf(element) === i;\n });\n};\nvar defaultOptions = {\n idField: 'id',\n extractField: function extractField(document, fieldName) {\n return document[fieldName];\n },\n tokenize: function tokenize(text, fieldName) {\n return text.split(SPACE_OR_PUNCTUATION);\n },\n processTerm: function processTerm(term, fieldName) {\n return term.toLowerCase();\n },\n fields: undefined,\n searchOptions: undefined,\n storeFields: []\n};\nvar defaultSearchOptions = {\n combineWith: OR,\n prefix: false,\n fuzzy: false,\n maxFuzzy: 6,\n boost: {},\n weights: {\n fuzzy: 0.9,\n prefix: 0.75\n }\n};\nvar defaultAutoSuggestOptions = {\n prefix: function prefix(term, i, terms) {\n return i === terms.length - 1;\n }\n};\n// This regular expression matches any Unicode space or punctuation character\n// Adapted from https://unicode.org/cldr/utility/list-unicodeset.jsp?a=%5Cp%7BZ%7D%5Cp%7BP%7D&abb=on&c=on&esc=on\nvar SPACE_OR_PUNCTUATION = /[\\n\\r -#%-\\*,-\\/:;\\?@\\[-\\]_\\{\\}\\xA0\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C77\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166E\\u1680\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2000-\\u200A\\u2010-\\u2029\\u202F-\\u2043\\u2045-\\u2051\\u2053-\\u205F\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E4F\\u3000-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]+/;\nexport { MiniSearch as default };","import MiniSearch from \"minisearch\";\nimport { useRef, useState, useEffect } from \"react\";\n\nfunction getLanguageFromPath(\n path,\n languages = [\"sv\", \"en\"],\n defaultLanguage = \"sv\",\n) {\n let urlPrefix = path.split(\"/\")[1];\n if (languages.includes(urlPrefix)) {\n return urlPrefix;\n }\n return defaultLanguage;\n}\n\nexport default function useMiniSearch({ documents, ...options }) {\n const miniSearchRef = useRef();\n\n useEffect(() => {\n miniSearchRef.current = new MiniSearch(options);\n miniSearchRef.current.addAll(documents);\n }, []);\n\n const search = async (request) => {\n if (!request) return null;\n\n const { query } = request;\n\n const currentLanguage = getLanguageFromPath(window.location.pathname);\n\n // Search with default options\n // and also filter by current language\n let hits = miniSearchRef.current.search(query, {\n filter: (result) => {\n if (!currentLanguage || !result.language) {\n return true;\n }\n return result.language === currentLanguage?.toUpperCase();\n },\n });\n\n return {\n hits,\n };\n };\n\n return { search };\n}\n","import { isEqual } from \"lodash\";\nimport React, { useState } from \"react\";\n\nimport { useAsync } from \"../hooks/async\";\nimport useMiniSearch from \"../hooks/useMiniSearch\";\nimport useSearchDocumentsForMiniSearch from \"../hooks/useSearchDocumentsForMiniSearch\";\nimport searchBackendContext from \"../searchBackendContext\";\n\nexport default function LocalSearchBackendProvider({\n settings: { miniSearch = {} },\n children,\n}) {\n const { Provider } = searchBackendContext;\n const [request, setRequest] = useState();\n const documents = useSearchDocumentsForMiniSearch();\n\n const { search } = useMiniSearch({\n documents,\n fields: [\"title\", \"body\"],\n storeFields: Object.keys(documents[0]),\n ...miniSearch,\n });\n\n const { result, error, isPending } = useAsync(() => search(request), [\n request?.query,\n ]);\n\n const isEmptyRequest = request == null;\n return (\n {\n if (!isEqual(newRequest, request)) setRequest(newRequest);\n },\n ]}\n >\n {children}\n \n );\n}\n","import { graphql, useStaticQuery } from \"gatsby\";\n\nexport default function useSearchDocumentsForMiniSearch() {\n return useStaticQuery(graphql`\n query SearchDocumentsForMiniSearchCustom {\n allSearchDocument {\n nodes {\n id\n body\n contentType\n date\n title\n language\n url\n }\n }\n }\n `).allSearchDocument.nodes;\n}\n","import { useState, useMemo } from \"react\";\n\nexport function useAsync(maker, deps) {\n const [isResolved, setIsResolved] = useState(false);\n const [isRejected, setIsRejected] = useState(false);\n const [result, setResult] = useState();\n\n const promise = useMemo(() => {\n setIsResolved(false);\n setIsRejected(false);\n setResult();\n\n return maker();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n\n promise.then((result) => {\n setIsResolved(true);\n setResult(result);\n });\n\n const isPending = !isResolved && !isRejected;\n\n return {\n isResolved,\n isPending,\n isRejected,\n result,\n };\n}\n","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n defineProperty = Object.defineProperty || function (obj, key, desc) {\n obj[key] = desc.value;\n },\n $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = Object.create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return defineProperty(generator, \"_invoke\", {\n value: makeInvokeMethod(innerFn, self, context)\n }), generator;\n }\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n exports.wrap = wrap;\n var ContinueSentinel = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n reject(record.arg);\n }\n var previousPromise;\n defineProperty(this, \"_invoke\", {\n value: function value(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }\n function maybeInvokeDelegate(delegate, context) {\n var methodName = context.method,\n method = delegate.iterator[methodName];\n if (undefined === method) return context.delegate = null, \"throw\" === methodName && delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method) || \"return\" !== methodName && (context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a '\" + methodName + \"' method\")), ContinueSentinel;\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n return next.value = undefined, next.done = !0, next;\n };\n return next.next = next;\n }\n }\n return {\n next: doneResult\n };\n }\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (val) {\n var object = Object(val),\n keys = [];\n for (var key in object) keys.push(key);\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}"],"names":["_assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__values","o","Symbol","iterator","m","next","value","done","TypeError","__read","r","e","ar","push","error","__spreadArray","to","from","pack","l","Array","slice","concat","_a","KEYS","VALUES","LEAF","TreeIterator","set","type","node","_tree","keys","_type","_path","dive","backtrack","undefined","last$1","result","pop","key","_prefix","map","filter","join","array","withinDistance","a","b","maxDistance","edit","stack","distance","ia","ib","results","edit_1","SearchableMap","tree","prefix","atPrefix","startsWith","Error","_b","trackDown","path","_c","last","parentNode","key_1","nodeKey","find","k","clear","_size","delete","remove","entries","forEach","fn","e_1","_d","e_1_1","return","fuzzyGet","maxEditDistance","query","innerStack","_loop_1","node_1","totDistance","d","Infinity","fuzzySearch","get","lookup","has","createPath","defineProperty","_this","enumerable","configurable","update","values","e_2","entries_1","entries_1_1","e_2_1","fromObject","object","toSplit","commonPrefix","Math","min","cleanup","merge","OR","MiniSearch","options","fields","_options","defaultOptions","searchOptions","defaultSearchOptions","_index","_documentCount","_documentIds","_fieldIds","_fieldLength","_averageFieldLength","_nextId","_storedFields","addFields","add","document","extractField","tokenize","processTerm","idField","id","shortDocumentId","addDocumentId","saveStoredFields","field","fieldValue","tokens","toString","addFieldLength","documentCount","term","processedTerm","addTerm","addAll","documents","addAllAsync","chunkSize","acc","chunk","promise","Promise","resolve","reduce","then","setTimeout","longId","removeTerm","removeFieldLength","removeAll","search","combinedResults","executeQuery","docId","score","match","terms","uniq","sort","autoSuggest","queryString","defaultAutoSuggestOptions","suggestions","phrase","count","suggestion","loadJSON","json","loadJS","JSON","parse","getDefault","optionName","getOwnProperty","js","index","nextId","documentIds","fieldIds","fieldLength","averageFieldLength","storedFields","miniSearch","executeSearch","queries","subquery","combineResults","combineWith","globalSearchOptions","searchTokenize","searchProcessTerm","termToQuerySpec","executeQuerySpec","boosts","boost","boostDocument","weights","maxFuzzy","fuzzyWeight","fuzzy","prefixWeight","exactMatch","termResults","data","weightedDistance","round","combinators","operator","toLowerCase","toJSON","indexData","weight","editDistance","fieldId","ds","df","documentId","tf","docBoost","normalizedLength","fieldIndex","warnDocumentChanged","console","warn","fieldName","totalLength","doc","storeFields","property","combined","termFrequency","documentFrequency","log","element","indexOf","text","split","SPACE_OR_PUNCTUATION","getLanguageFromPath","languages","defaultLanguage","urlPrefix","includes","LocalSearchBackendProvider","_ref","_ref$settings$miniSea","settings","children","Provider","searchBackendContext","_useState","useState","request","setRequest","useStaticQuery","allSearchDocument","nodes","_useMiniSearch","_objectWithoutPropertiesLoose","_excluded","miniSearchRef","useRef","useEffect","current","_ref2","_asyncToGenerator","_regeneratorRuntime","_callee","currentLanguage","hits","_context","prev","abrupt","window","location","pathname","language","toUpperCase","stop","_x","useMiniSearch","_useAsync","maker","deps","isResolved","setIsResolved","_useState2","isRejected","setIsRejected","_useState3","setResult","useMemo","isPending","useAsync","isEmptyRequest","___EmotionJSX","isError","newRequest","_isEqual","_typeof","module","exports","__esModule","Op","hasOwn","obj","desc","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","makeInvokeMethod","tryCatch","arg","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","Gp","defineIteratorMethods","method","_invoke","AsyncIterator","PromiseImpl","invoke","reject","record","__await","unwrapped","previousPromise","callInvokeWithMethodAndArg","state","doneResult","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","methodName","info","resultName","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","iter","val","reverse","skipTempReset","charAt","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","Function","asyncGeneratorStep","gen","_next","_throw","args"],"sourceRoot":""}