[
  {
    "path": ".eslintrc.cjs",
    "content": "module.exports = {\n  root: true,\n  parser: '@babel/eslint-parser',\n  parserOptions: {\n    ecmaVersion: 8,\n    ecmaFeatures: {\n      experimentalObjectRestSpread: true\n    },\n    sourceType: 'module'\n  },\n  env: {\n    es6: true,\n    node: true,\n    browser: true,\n    jest: true\n  },\n  extends: ['eslint:recommended', 'prettier'],\n  rules: {\n    'no-console': process.env.NODE_ENV !== 'production' ? 0 : 2,\n    'no-useless-escape': 0,\n    'no-empty': 0\n  }\n}\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "github: krisk\npatreon: krisk\ncustom: 'https://www.paypal.com/paypalme2/kirorisk'\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.yml",
    "content": "name: Bug Report\ndescription: Report a bug in Fuse.js.\nlabels: ['bug']\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        Thanks for taking the time to fill out this bug report!\n  - type: checkboxes\n    id: new-bug\n    attributes:\n      label: Is there an existing issue for this?\n      description: Please search to see if an issue already exists for the bug you encountered.\n      options:\n        - label: I have searched the existing issues\n          required: true\n  - type: textarea\n    id: bug-description\n    attributes:\n      label: Description of the bug\n      description: Tell us what bug you encountered and what should have happened\n    validations:\n      required: true\n  - type: dropdown\n    id: fuse-version\n    attributes:\n      label: The Fuse.js version where this bug is happening.\n      options:\n        - '6.6.2'\n        - '6.6.1'\n        - '6.6.0'\n        - '6.5.3'\n        - '6.5.2'\n        - '6.5.1'\n        - '6.4.6'\n        - '6.4.5'\n        - '6.4.4'\n        - '6.4.3'\n        - '6.4.2'\n        - '6.4.1'\n        - '6.4.0'\n        - '6.3.1'\n        - '6.3.0'\n        - '6.2.1'\n        - '6.2.0'\n        - '6.0.0'\n        - '5.2.1'\n        - '2.2.0'\n        - '2.0.0'\n        - '1.2.0'\n        - '1.1.0'\n        - '1.0.0'\n        - '1.0.1'\n        - 'Other (please specify in description)'\n    validations:\n      required: true\n  - type: checkboxes\n    id: regression-bug\n    attributes:\n      label: Is this a regression?\n      description: Did this behavior use to work in the previous version?\n      options:\n        - label: This is a regression bug\n          required: false\n  - type: dropdown\n    id: regression-version\n    attributes:\n      label: Which version did this behavior use to work in?\n      description: In case you checked the regression bug checkbox, please provide the version in which this bug was not present.\n      options:\n        - '6.6.2'\n        - '6.6.1'\n        - '6.6.0'\n        - '6.5.3'\n        - '6.5.2'\n        - '6.5.1'\n        - '6.4.6'\n        - '6.4.5'\n        - '6.4.4'\n        - '6.4.3'\n        - '6.4.2'\n        - '6.4.1'\n        - '6.4.0'\n        - '6.3.1'\n        - '6.3.0'\n        - '6.2.1'\n        - '6.2.0'\n        - '6.0.0'\n        - '5.2.1'\n        - '2.2.0'\n        - '2.0.0'\n        - '1.2.0'\n        - '1.1.0'\n        - '1.0.0'\n        - '1.0.1'\n        - 'Other (please specify in description)'\n  - type: textarea\n    id: steps-to-reproduce\n    attributes:\n      label: Steps To Reproduce\n      description: Steps to reproduce the behavior.\n      placeholder: |\n        Please tell us how to reproduce this bug, for example:\n        1. Write '...'\n        2. Click on '...'\n        3. See error\n    validations:\n      required: true\n  - type: textarea\n    id: expected-behavior\n    attributes:\n      label: Expected behavior\n      description: What should be the expected behavior.\n      placeholder: A clear and concise description of what you expected to happen.\n    validations:\n      required: true\n  - type: textarea\n    id: screenshots\n    attributes:\n      label: Screenshots\n      description: If applicable, add screenshots to help explain your problem.\n      placeholder: Paste your screenshots here.\n  - type: textarea\n    id: additional-context\n    attributes:\n      label: Additional context\n      description: Do you want to share any additional context about this bug?\n      placeholder: Add any other context about the problem here.\n  - type: markdown\n    attributes:\n      value: |\n        Love Fuse.js? Please consider supporting:\n          👉  https://github.com/sponsors/krisk\n          👉  https://www.patreon.com/krisk\n          👉  https://www.paypal.com/paypalme2/kirorisk\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "content": "blank_issues_enabled: false\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/docs_bug.yml",
    "content": "name: Docs on fusejs.io\ndescription: Report an issue in Fuse.js documentation or fusejs.io\nlabels: ['docs']\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        Thanks for taking the time to fill out this bug report!\n  - type: checkboxes\n    id: new-bug\n    attributes:\n      label: Is there an existing issue for this?\n      description: Please search to see if an issue already exists for the bug you encountered.\n      options:\n        - label: I have searched the existing issues\n          required: true\n  - type: textarea\n    id: bug-description\n    attributes:\n      label: Description of the bug\n      description: Tell us what bug you encountered and what should have happened\n    validations:\n      required: true\n  - type: textarea\n    id: screenshots\n    attributes:\n      label: Screenshots\n      description: If applicable, add screenshots to help explain your problem.\n      placeholder: Paste your screenshots here.\n  - type: markdown\n    attributes:\n      value: |\n        Love Fuse.js? Please consider supporting:\n          👉  https://github.com/sponsors/krisk\n          👉  https://www.patreon.com/krisk\n          👉  https://www.paypal.com/paypalme2/kirorisk\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.yml",
    "content": "name: Feature request\ndescription: Suggest a feature for Fuse.js.\nlabels: ['feature']\nbody:\n  - type: markdown\n    attributes:\n      value: Thank you for suggesting this feature! The more information you provide, the more likely it is that it will be picked up.\n  - type: checkboxes\n    id: new-feature\n    attributes:\n      label: Is there an existing issue or pull request for this?\n      description: Please search to see if an issue or pull request already exists for the feature you desire.\n      options:\n        - label: I have searched the existing issues and pull requests\n          required: true\n  - type: textarea\n    id: feature-description\n    attributes:\n      label: Feature description\n      description: Is your feature request related to a problem? Please describe.\n      placeholder: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]\n    validations:\n      required: true\n  - type: textarea\n    id: desired-solution\n    attributes:\n      label: Desired solution\n      description: Describe the solution you'd like\n      placeholder: A clear and concise description of what you want to happen.\n    validations:\n      required: true\n  - type: textarea\n    id: alternatives-considered\n    attributes:\n      label: Alternatives considered\n      description: Describe alternatives you've considered\n      placeholder: A clear and concise description of any alternative solutions or features you've considered.\n    validations:\n      required: true\n  - type: textarea\n    id: additional-context\n    attributes:\n      label: Additional context\n      description: Do you want to share any additional context about this bug?\n      placeholder: Add any other context about the problem here.\n  - type: markdown\n    attributes:\n      value: |\n        Love Fuse.js? Please consider supporting:\n          👉  https://github.com/sponsors/krisk\n          👉  https://www.patreon.com/krisk\n          👉  https://www.paypal.com/paypalme2/kirorisk\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/support_request.yml",
    "content": "name: Support request\ndescription: Questions and requests for support.\nlabels: ['question']\nbody:\n  - type: checkboxes\n    id: new-question\n    attributes:\n      label: Is there an existing issue for this?\n      description: Please search to see if an issue already exists for the question you want answered.\n      options:\n        - label: I have searched the existing issues\n          required: true\n  - type: textarea\n    id: question-description\n    attributes:\n      label: Your question\n    validations:\n      required: true\n  - type: markdown\n    attributes:\n      value: |\n        Love Fuse.js? Please consider supporting:\n          👉  https://github.com/sponsors/krisk\n          👉  https://www.patreon.com/krisk\n          👉  https://www.paypal.com/paypalme2/kirorisk\n"
  },
  {
    "path": ".github/workflows/nodejs.yml",
    "content": "# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node\n# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions\n\nname: Node.js CI\n\non:\n  push:\n    branches:\n      - master\n  pull_request:\n    branches:\n      - master\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}\n  cancel-in-progress: true\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    strategy:\n      matrix:\n        node: [14, 15, 16, 17, 18, 19]\n\n    steps:\n      - name: Checkout Project\n        uses: actions/checkout@v3\n\n      - name: Use Node.js v${{ matrix.node }}\n        uses: actions/setup-node@v3\n        with:\n          node-version: ${{ matrix.node }}\n\n      - name: Install Dependencies\n        run: npm ci\n\n      - name: Build Code\n        run: npm run build\n\n      - name: Test Code\n        run: npm run test\n"
  },
  {
    "path": ".github/workflows/stale.yml",
    "content": "name: Mark stale issues\n\non:\n  schedule:\n    - cron: '0 0 * * *'\n\njobs:\n  stale:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/stale@v7\n        with:\n          stale-issue-message: 'This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 30 days'\n          days-before-stale: 120\n          days-before-close: 30\n"
  },
  {
    "path": ".gitignore",
    "content": "node_modules/\n*.log\n\n.DS_Store\n.idea/\n\n.vs/\n.vscode/\n\n# Ignore yarn lock files\nyarn.lock\n\ndist/*.d.ts\ndist/*.js\ndist/*.map\ndocs/.vuepress/dist\nRELEASE_NOTE*.md\n\nplayground/\nMakefile\n\n# Vuepress files\n.temp\n.cache\n"
  },
  {
    "path": ".husky/commit-msg",
    "content": "#!/usr/bin/env sh\n. \"$(dirname -- \"$0\")/_/husky.sh\"\n\nnpx --no -- commitlint --edit \"$1\"\n"
  },
  {
    "path": ".husky/pre-commit",
    "content": "#!/bin/sh\n. \"$(dirname \"$0\")/_/husky.sh\"\n\nnpm test\n"
  },
  {
    "path": ".npmrc",
    "content": "legacy-peer-deps=true\n"
  },
  {
    "path": ".prettierignore",
    "content": "dist/\nCHANGELOG.md\ndocs/.vuepress/.temp/\ndocs/.vuepress/.cache/\n"
  },
  {
    "path": ".prettierrc.cjs",
    "content": "module.exports = {\n  trailingComma: 'none',\n  tabWidth: 2,\n  semi: false,\n  singleQuote: true,\n  overrides: [\n    {\n      files: '*.svg',\n      options: {\n        parser: 'html'\n      }\n    }\n  ]\n}\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Changelog\n\nAll notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.\n\n## [7.1.0](https://github.com/krisk/Fuse/compare/v7.0.0...v7.1.0) (2025-02-03)\n\n\n### Features\n\n* add ignore diacritics ([e0fcdb1](https://github.com/krisk/Fuse/commit/e0fcdb15d491e7db28c4902727d2d859833ea9ee))\n* add option to ignore diacritics ([fb012b7](https://github.com/krisk/Fuse/commit/fb012b7388442f7dcc0facb43f0b2840057ca8c5))\n\n\n### Bug Fixes\n\n* remove console.log ([1c749a3](https://github.com/krisk/Fuse/commit/1c749a3f43d37d89233fdac9014009b3dac9e53d))\n* **typescript:** clarify input to `parseIndex` ([72b6e25](https://github.com/krisk/Fuse/commit/72b6e25e14663cdbea9dee297b60963c7d6a8983)), closes [#524](https://github.com/krisk/Fuse/issues/524) [#624](https://github.com/krisk/Fuse/issues/624)\n* **typescript:** clarify input to `parseIndex` ([78c628e](https://github.com/krisk/Fuse/commit/78c628e50f6b3b7d185eaa27ded60002ba9d15ef)), closes [#524](https://github.com/krisk/Fuse/issues/524) [#624](https://github.com/krisk/Fuse/issues/624)\n\n## [7.0.0](https://github.com/krisk/Fuse/compare/v6.6.2...v7.0.0) (2023-10-24)\n\n\n### ⚠ BREAKING CHANGES\n\n* Extension changed\n\n### Features\n\n* finish all but state handling of live demo ([9b5421a](https://github.com/krisk/Fuse/commit/9b5421a7febd1f57cbd504855ea375eec5d57843))\n* implementing reacting to option changes ([46c561c](https://github.com/krisk/Fuse/commit/46c561c05c97abd05f7ab7de7e78b03ede8d07da))\n* improve fuse keys ([c47f3d4](https://github.com/krisk/Fuse/commit/c47f3d49f9b0262164368b765e2cf8d053556359))\n* proper ESM exports ([eebcf2c](https://github.com/krisk/Fuse/commit/eebcf2c77b4c9869fab4bdbd93f3a15198514333))\n* properly configure monaco editors ([fe0d33e](https://github.com/krisk/Fuse/commit/fe0d33e3025857c3db9ada7f66d834a6fc36f076))\n\n\n### Bug Fixes\n\n* add favicon on public root ([bc155a3](https://github.com/krisk/Fuse/commit/bc155a31440438d29904aadfe9075225ceddc689))\n* add proper ESM exports in package.json ([98366b1](https://github.com/krisk/Fuse/commit/98366b1630c83e1c64eaae5cccf8f39403b7fc4d))\n* build fixes ([5969ca7](https://github.com/krisk/Fuse/commit/5969ca716a52aa24fafa476bee02140518202593))\n* double totalWeight ([5c0ab46](https://github.com/krisk/Fuse/commit/5c0ab467242d1de5d62bd3cdb812518e4b037c0f))\n* fixed browserconfig xml file ([ca0cbbb](https://github.com/krisk/Fuse/commit/ca0cbbbc2fa64d7e0511c86cced2d09d3ec8efcb))\n* fixed config, packages, and twitter social button ([bd7555c](https://github.com/krisk/Fuse/commit/bd7555cd0b8b990ca38faf8196a92207785e95a3))\n* fixed navbar ([29b2599](https://github.com/krisk/Fuse/commit/29b25990d592a797df51a3dc15c678defce56538))\n* fixed version display and active search plugin ([6e2a592](https://github.com/krisk/Fuse/commit/6e2a5922270a22bc9f1b827efd311608a2ea1839))\n* imports ([ec4e3bc](https://github.com/krisk/Fuse/commit/ec4e3bc1ee6ba4655642e5740cabb864bcb70275))\n* re-implement sidebar advertisements ([67a10cf](https://github.com/krisk/Fuse/commit/67a10cf8d8df22dd198a2e9c3ee5413631459d4a))\n* support -> donate for clarity of what it is ([ef99f56](https://github.com/krisk/Fuse/commit/ef99f5633d65e26cd555e847216bf231bcd43823))\n* vite SSR build fixes ([3ae8299](https://github.com/krisk/Fuse/commit/3ae8299faac02ca33ea9c7773ea34be2217d533c))\n\n### [6.6.2](https://github.com/krisk/Fuse/compare/v6.6.1...v6.6.2) (2022-05-11)\n\n\n### Bug Fixes\n\n* value fetched at the end must be a string ([1de1dff](https://github.com/krisk/Fuse/commit/1de1dffa3f16992e21d817370e2b5d9611d3ad6d)), closes [#661](https://github.com/krisk/Fuse/issues/661)\n\n### [6.6.1](https://github.com/krisk/Fuse/compare/v6.6.0...v6.6.1) (2022-05-06)\n\n\n### Bug Fixes\n\n* getFn to FuseOptionKeyObject ([80b87a9](https://github.com/krisk/Fuse/commit/80b87a9035b3dcecc92dc913ceb160045e1a95bd)), closes [#655](https://github.com/krisk/Fuse/issues/655)\n* **typescript:** type definition for `FuseOptionKeyObject, fixes [#655](https://github.com/krisk/Fuse/issues/655) ([4acabb6](https://github.com/krisk/Fuse/commit/4acabb686f9a1a95adc766bc2fb387c0ce0b477c))\n* **typescript:** type definition for FuseOptionKeyObject ([0a790b5](https://github.com/krisk/Fuse/commit/0a790b516efec2e6c5539bdd40d04889e6252dfe)), closes [#655](https://github.com/krisk/Fuse/issues/655) [#656](https://github.com/krisk/Fuse/issues/656)\n\n## [6.6.0](https://github.com/krisk/Fuse/compare/v6.5.3...v6.6.0) (2022-05-03)\n\n\n### Features\n\n* allow passing getFn for a specific key ([1d445b9](https://github.com/krisk/Fuse/commit/1d445b9999e26d6eefecbdd333d46be01aff06e5)), closes [#627](https://github.com/krisk/Fuse/issues/627)\n\n\n### Bug Fixes\n\n* excessive splitting in parseQuery ([2c78022](https://github.com/krisk/Fuse/commit/2c78022c6ccb424e1013dc486649a7d6388df193))\n* type mismatch on toJSON ([f5425ea](https://github.com/krisk/Fuse/commit/f5425ea1bd6b95eae912b8dab68c9e3cac0ad27f))\n\n### [6.5.3](https://github.com/krisk/Fuse/compare/v6.5.2...v6.5.3) (2021-12-23)\n\n\n### Bug Fixes\n\n* **logical:** scoring for logical OR ([6f6af51](https://github.com/krisk/Fuse/commit/6f6af51cc39058fafea6b126f7120afc4f7c192a)), closes [#593](https://github.com/krisk/Fuse/issues/593)\n\n### [6.5.2](https://github.com/krisk/Fuse/compare/v6.5.1...v6.5.2) (2021-12-23)\n\n### [6.5.1](https://github.com/krisk/Fuse/compare/v6.5.0...v6.5.1) (2021-12-23)\n\n\n### Bug Fixes\n\n* rollback min node version ([9918f67](https://github.com/krisk/Fuse/commit/9918f67ba9b6b9b54e53576312fa33a51f428a9d))\n\n## [6.5.0](https://github.com/krisk/Fuse/compare/v6.4.6...v6.5.0) (2021-12-22)\n\n\n### Features\n\n* **scoring:** field length norm weight ([a9e0080](https://github.com/krisk/Fuse/commit/a9e00804497a1bfd7a94040520417825c085c945))\n\n\n### Bug Fixes\n\n* **typescript:** add config declaration to types ([2f4de0c](https://github.com/krisk/Fuse/commit/2f4de0c5ce061808f460de7f399b56a06539d4d5))\n\n### [6.4.6](https://github.com/krisk/Fuse/compare/v6.4.5...v6.4.6) (2021-01-05)\n\n\n### Bug Fixes\n\n* **typescript:** fix search typings ([94766b2](https://github.com/krisk/Fuse/commit/94766b2ffcc2be0e5f15daa9a29cd92adbe2647a)), closes [#527](https://github.com/krisk/Fuse/issues/527)\n\n### [6.4.5](https://github.com/krisk/Fuse/compare/v6.4.4...v6.4.5) (2021-01-01)\n\n\n### Bug Fixes\n\n* **ts:** export FuseIndex type ([2e60bee](https://github.com/krisk/Fuse/commit/2e60bee242c7b82f0d014a3a35281b34bc6b62fb)), closes [#519](https://github.com/krisk/Fuse/issues/519)\n\n### [6.4.4](https://github.com/krisk/Fuse/compare/v6.4.3...v6.4.4) (2020-12-29)\n\n\n### Bug Fixes\n\n* **extended:** correctly score include-match results ([443c863](https://github.com/krisk/Fuse/commit/443c863c44a48225510057d7597cb743fda2d25f)), closes [#522](https://github.com/krisk/Fuse/issues/522)\n\n### [6.4.3](https://github.com/krisk/Fuse/compare/v6.4.2...v6.4.3) (2020-10-30)\n\n\n### Bug Fixes\n\n* **extended:** ignoreLocation when useExtendedSearch is true ([8f67ac9](https://github.com/krisk/Fuse/commit/8f67ac985d3440c20d93ce1e1c5ba66f384ea9bf)), closes [#465](https://github.com/krisk/Fuse/issues/465)\n\n### [6.4.2](https://github.com/krisk/Fuse/compare/v6.4.1...v6.4.2) (2020-10-20)\n\n\n### Bug Fixes\n\n* if null in array ([740a500](https://github.com/krisk/Fuse/commit/740a5004763d84b285075a2cece4f37bc5fa2830))\n\n### [6.4.1](https://github.com/krisk/Fuse/compare/v6.4.0...v6.4.1) (2020-07-26)\n\n\n### Bug Fixes\n\n* handle booleans in the data ([226d868](https://github.com/krisk/Fuse/commit/226d868a1102402e1e773db305ddd3928ae92f79)), closes [#469](https://github.com/krisk/Fuse/issues/469)\n\n## [6.4.0](https://github.com/krisk/Fuse/compare/v6.3.1...v6.4.0) (2020-06-28)\n\n\n### Features\n\n* **extended:** add ability to search actual exact string ([350283f](https://github.com/krisk/Fuse/commit/350283f45a9affe05c6b3176bb5a5a037916de58))\n\n### [6.3.1](https://github.com/krisk/Fuse/compare/v6.3.0...v6.3.1) (2020-06-24)\n\n\n### Bug Fixes\n\n* **logical:** scores in logical query operators are ignored ([e357229](https://github.com/krisk/Fuse/commit/e357229846fff585707903c93f556d1562fbabba)), closes [#449](https://github.com/krisk/Fuse/issues/449)\n\n## [6.3.0](https://github.com/krisk/Fuse/compare/v6.2.1...v6.3.0) (2020-06-23)\n\n\n### Features\n\n* provide alternative array notation for nested paths ([7077fbe](https://github.com/krisk/Fuse/commit/7077fbe5f40872f9555645dbad2e6729ca55a5d4)), closes [#432](https://github.com/krisk/Fuse/issues/432)\n\n\n### Bug Fixes\n\n* **typescript:** add types for string and object together for the key property ([85fb211](https://github.com/krisk/Fuse/commit/85fb211a22bf5921ecefab9ecf3f8e2647f46b49))\n* **typescript:** add typing for nested paths with array notation ([dfa4823](https://github.com/krisk/Fuse/commit/dfa48238f9a28600fd36677f958f43bb3cab4c03))\n\n# Version 6.0.0\n\n- Added [logical query expressions](https://fusejs.io/api/query.html) (#411)\n- Added ability to dynamically add/remove items (#412)\n- Mix different `options:key` types during initialization (#413)\n- Improved indexing performances, as well storage savings (#405, #407)\n\n# Version 5.2.0\n\n- Addresses #390, #376, #382, #385\n- Removed ngram search and extended bitap to search long patterns\n\n# Version 5.0.9-beta\n\n- Fixed Fuse global name. Erroneously set as 'Fuse.js'\n\n# Version 5.0.8-beta\n\n- Changed bundler to Rollup.\n- Added ES6 modules for bundlers and browsers (`fuse.esm.js`) (fixed [#262](#262))\n- Added CommonJS builds (`fuse.common.js`)\n\n## Breaking Changes\n\n- The minimified version is finally actually called `fuse.min.js`\n\n# Version 5.0.7-beta\n\n- Fixed (#363)\n\n# Version 5.0.6-beta\n\n- Fixed (#357)\n\n# Version 5.0.3-beta\n\n- A couple of fixes, courtesy of [Daniel Dickinson](https://github.com/cshoredaniel):\n  - Generate multiple targets with webpack (#359)\n  - Fixed TypeError (#360)\n\n# Version 5.0.2-beta\n\n- Added indexing for increased performance over large lists\n  - Added `Fuse.createIndex`, which created and returns an index. This function can be used to pre-generate the index, which you can then save, and ultimately pass to the `Fuse` instance.\n\n## Breaking Changes\n\n- Removed `id` option\n- Changed format of the search results\n- Updated TypeScript definitions\n\n# Version 5.0.1-beta\n\n- Removed `matchAllTokens` option.\n\n# Version 5.0.0-beta\n\n- Added ability to search patterns longer > 32 characters\n- Removed `maxPatternLength` option\n\n# Version 4.1.0-beta\n\n- Perf optimization on nested array search\n\n# Version 4.0.4-beta\n\n- Re-added license information\n\n# Version 4.0.3-beta\n\n- Increased Node version\n\n# Version 4.0.2-beta\n\n- Added missing tests\n\n# Version 4.0.1-beta\n\n- Removed unused codepath\n- Fixed case sensitivity check\n- Upgraded dev dependencies\n\n# Version 4.0.0-beta\n\n- Added extended search [Discussion](https://github.com/krisk/Fuse/issues/356)\n- Removed tokenization [Discussion](https://github.com/krisk/Fuse/issues/355)\n\n# Version 3.6.0\n\n- Improved error handling for keys\n\n# Version 3.5.0\n\n- Fixed #341, adjusting weights into the calculation\n- Improved performance by ~10% (really can only be seen when you have 10k+ items)\n\n# Version 3.4.3\n\n- Fixed #261\n- Rewrote tests to Jest framework\n- Wrote tests for TypeScript typings\n- Cleanup build\n\n# Version 3.4.2\n\n- Fixed #288\n\n# Version 3.4.1\n\n- Ensured `dist/` content is production ready (both full and min versions) #283\n\n# Version 3.4.0\n\n- Upgraded build tool to Webpack 4. New `dist/` output.\n\n# Version 3.3.1\n\n- Fixed the circular JSON TypeError (#197). Thanks [ThinkTankShark](https://github.com/ThinkTankShark)!\n\n# Version 3.2.1\n\n- Fixed issue in which more fuzzy matches would weaken a score instead of strengthening it (#233)\n\n# Version 3.2.0\n\n- Give better result for exact match when using weighted keys (#192)\n\n# Version 3.1.0\n\n- Added match index location for array key (#183)\n- Allow searching deep nested numbers (#189)\n\n# Version 3.0.5\n\n- Escape special characters in search pattern (#168)\n\n# Version 3.0.4\n\n- Random bug fixes (#162)\n\n# Version 3.0.0\n\n- Removed Bower support\n- Modified library into a more more palatable architecture, where the Bitap portion is now its own separate module.\n\n### BREAKING CHANGES\n\n- Removed `include` option in favor of more explicit booleans: `includeScore` and `includeMatches`. Both are `false` by default.\n- Removed `searchFn` option, as this (for now) will remain a Bitap based solution\n\n# Version 2.7.4\n\n- Reverted to previous version, thus fixing breaking changes (a little bit of a version match here)\n\n# Version 2.6.2\n\n- Revert back to previous version\n\n# Version 2.6.2\n\n- Fix typings based on TypeScript guidelines (#129)\n\n# Version 2.6.0\n\n- Added Typescript definition\n- Added ability to set min/max matched character lengths when returning the matched indices (#122)\n\n# Version 2.5.0\n\n- Added option to search by matching all tokens (in every record) when `matchAllTokens:true` (#95)\n\n# Version 2.3.0\n\n- Added token separator to options, when `tokenize:true` (#93)\n- General code clean up (#88)\n- Bunch of other bug fixes\n\n# Version 2.2.0\n\n- Added option to include matched indices (#6)\n- Added ability to search with weighted keys (#62)\n\n# Version 2.1.0-beta\n\n- Added ability to search with weighted keys (#62)\n\n# Version 2.0.0\n\n- Modified search algorithm to search individual words AND the full string, computing the final score as a function of both. This yields better scoring accuracy (#41)\n- Changed exact substrings to not have a score of zero. That is searching for \"hell\" in \"hello\" will not yield a score of zero, while searching for \"hello\" will (#63)\n- Added `verbose` option, which will print to the console useful information, mostly for debugging\n- Improved code structure.\n- Added version information within Fuse itself\n- Added this Changelog (#64)\n- Added fallback when pattern length is greater than machine word length (i.e, > 32 characters) (#38)\n- Allowed results with a value of 0 to be returned (#73)\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing to Fuse.js\n\nWe'd love for you to contribute to our source code and to make Fuse.js better! Here are the guidelines we'd like you to follow:\n\n- [Questions and Problems](#question)\n- [Issues and Bugs](#issue)\n- [Pull Request Submission Guidelines](#submit-pr)\n\n## <a name=\"requests\"></a> Questions, Bugs, Features\n\n### <a name=\"question\"></a> Got a Question or Problem?\n\nDo not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests. You've got much better chances of getting your question answered on dedicated support platforms, the best being [Stack Overflow][stackoverflow].\n\n### <a name=\"issue\"></a> Found an Issue or Bug?\n\nIf you find a bug in the source code, you can help us by submitting an issue to our\n[GitHub Repository][github]. Even better, you can submit a Pull Request with a fix.\n\nWhen creating issues, it's important to follow common guidelines to make them extra clear. Here is a few links to help you achieve that:\n\n- [GitHub Guides: Mastering Issues](https://guides.github.com/features/issues/)\n- [Wiredcraft: How We Write Github Issues](https://wiredcraft.com/blog/how-we-write-our-github-issues/)\n- [NYC Planning Digital: Writing a proper GitHub issue](https://medium.com/nyc-planning-digital/writing-a-proper-github-issue-97427d62a20f)\n\n## <a name=\"submit-pr\"></a> Pull Request Submission Guidelines\n\nBefore you submit your pull request consider the following guidelines:\n\n- Search [GitHub](https://github.com/krisk/Fuse/pulls) for an open or closed Pull Request that relates to your submission. You don't want to duplicate effort.\n- Make your changes in a new git branch:\n\n  ```shell\n  git checkout -b my-fix-branch main\n  ```\n\n- Create your patch commit, **including appropriate test cases**.\n- Run `npm run lint` to check that you have followed the automatically enforced coding rules\n- Commit your changes using a descriptive commit message that follows our\n  [commit message conventions][developers.commits]. Adherence to the\n  [commit message conventions][developers.commits] is required, because release notes are\n  automatically generated from these messages.\n\n  ```shell\n   git commit -a\n  ```\n\n- Before creating the Pull Request, package and run all tests a last time:\n\n  ```shell\n  npm run test\n  ```\n\n- Push your branch to GitHub:\n\n  ```shell\n  git push origin my-fix-branch\n  ```\n\n- If we suggest changes, then:\n\n  - Make the required updates.\n  - Re-run the test suite to ensure tests are still passing.\n  - Commit your changes to your branch (e.g. `my-fix-branch`).\n  - Push the changes to your GitHub repository (this will update your Pull Request).\n\n    You can also amend the initial commits and force push them to the branch.\n\n    ```shell\n    git rebase main -i\n    git push origin my-fix-branch -f\n    ```\n\n    This is generally easier to follow, but separate commits are useful if the Pull Request contains\n    iterations that might be interesting to see side-by-side.\n\nThat's it! Thank you for your contribution!\n\n### After your pull request is merged\n\nAfter your pull request is merged, you can safely delete your branch and pull the changes\nfrom the main (upstream) repository:\n\n- Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:\n\n  ```shell\n  git push origin --delete my-fix-branch\n  ```\n\n- Check out the main branch:\n\n  ```shell\n  git checkout main -f\n  ```\n\n- Delete the local branch:\n\n  ```shell\n  git branch -D my-fix-branch\n  ```\n\n- Update your main with the latest upstream version:\n\n  ```shell\n  git pull --ff upstream main\n  ```\n\n[stackoverflow]: http://stackoverflow.com/questions/tagged/fuse.js\n[github]: https://github.com/krisk/Fuse/issues\n[developers.commits]: DEVELOPERS.md#commits\n"
  },
  {
    "path": "DEVELOPERS.md",
    "content": "# Developing Fuse.js\n\n- [Running Tests](#tests)\n- [Commit Message Guidelines](#commits)\n\n## <a name=\"tests\"> Running Tests\n\n```shell\nnpm run test\n```\n\n## <a name=\"commits\"></a> Git Commit Guidelines\n\nFuse.js follows [conventional commits](conventional-commits). This leads to **more readable messages** that are easy to follow when looking through the **project history**. Also, these git commit messages are used to **generate the [changelog](changelog)**.\n\n### Commit Message Format\n\nEach commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes a **type**, a **scope** and a **subject**:\n\n```\n<type>(<scope>): <subject>\n<BLANK LINE>\n<body>\n<BLANK LINE>\n<footer>\n```\n\n### Type\n\nMust be one of the following:\n\n- **feat**: A new feature\n- **fix**: A bug fix\n- **docs**: Documentation only changes\n- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing\n  semi-colons, etc)\n- **refactor**: A code change that neither fixes a bug nor adds a feature\n- **perf**: A code change that improves performance\n- **test**: Adding missing or correcting existing tests\n- **chore**: Changes to the build process or auxiliary tools and libraries such as documentation\n  generation\n\n### Scope\n\nThe scope could be anything specifying place of the commit change. For example `options`,\n`search`, `index`, etc...\n\nYou can use `*` when the change affects more than a single scope.\n\n### Subject\n\nThe subject contains succinct description of the change:\n\n- use the imperative, present tense: \"change\" not \"changed\" nor \"changes\"\n- don't capitalize first letter\n- no dot (.) at the end\n\n### Body\n\nJust as in the **subject**, use the imperative, present tense: \"change\" not \"changed\" nor \"changes\". The body should include the motivation for the change and contrast this with previous behavior.\n\n### Footer\n\nThe footer should contain any information about **Breaking Changes** and is also the place to [reference GitHub issues that this commit closes][closing-issues].\n\n**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.\n\n[closing-issues]: https://help.github.com/articles/closing-issues-via-commit-messages/\n[conventional-commits]: https://www.conventionalcommits.org/en/v1.0.0-beta.2/\n[changelog]: CHANGELOG.md\n"
  },
  {
    "path": "LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"{}\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2017 Kirollos Risk\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "README.md",
    "content": "# Fuse.js\n\n![Node.js CI](https://github.com/krisk/Fuse/workflows/Node.js%20CI/badge.svg)\n[![Version](https://img.shields.io/npm/v/fuse.js.svg)](https://www.npmjs.com/package/fuse.js)\n[![Downloads](https://img.shields.io/npm/dm/fuse.js.svg)](https://npmcharts.com/compare/fuse.js?minimal=tru)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n[![Contributors](https://img.shields.io/github/contributors/krisk/fuse.svg)](https://github.com/krisk/Fuse/graphs/contributors)\n![License](https://img.shields.io/npm/l/fuse.js.svg)\n\n## Supporting Fuse.js\n\nThrough contributions, donations, and sponsorship, you allow Fuse.js to thrive. Also, you will be recognized as a beacon of support to open-source developers.\n\n- [Become a backer or sponsor on **GitHub**.](https://github.com/sponsors/krisk)\n- [Become a backer or sponsor on **Patreon**.](https://patreon.com/fusejs)\n- [One-time donation via **PayPal**.](https://www.paypal.me/kirorisk)\n\n---\n\n<h3 align=\"center\">Sponsors</h3>\n<table>\n<tbody>\n    <tr>\n      <td align=\"center\" valign=\"middle\">\n        <a href=\"https://www.worksome.com\" target=\"_blank\">\n          <img width=\"222px\" src=\"https://raw.githubusercontent.com/krisk/Fuse/7a0d77d85ac90063575613b6a738f418b624357f/docs/.vuepress/public/assets/img/sponsors/worksome.svg\">\n        </a>\n      </td>\n      <td align=\"center\" valign=\"middle\">\n        <a href=\"https://www.bairesdev.com/sponsoring-open-source-projects/\" target=\"_blank\">\n          <img width=\"222px\" src=\"https://github.com/krisk/Fuse/blob/gh-pages/assets/img/sponsors/bairesdev.png?raw=true\">\n        </a>\n      </td>\n      <td align=\"center\" valign=\"middle\">\n        <a href=\"https://litslink.com/\" target=\"_blank\">\n          <img width=\"222px\" src=\"https://github.com/krisk/Fuse/blob/gh-pages/assets/img/sponsors/litslink.svg?raw=true\">\n        </a>\n      </td>\n    </tr>\n</body>\n</table>\n\n---\n\n## Introduction\n\nFuse.js is a lightweight fuzzy-search, in JavaScript, with zero dependencies.\n\n### Browser Compatibility\n\nFuse.js supports all browsers that are [ES5-compliant](https://compat-table.github.io/compat-table/es5/) (IE8 and below are not supported).\n\n## Documentation\n\nTo check out a [live demo](https://fusejs.io/demo.html) and docs, visit [fusejs.io](https://fusejs.io).\n\n## Develop\n\nHere's a separate document for [developers](https://github.com/krisk/Fuse/blob/master/DEVELOPERS.md).\n\n## Contribute\n\nWe've set up a separate document for our\n[contribution guidelines](https://github.com/krisk/Fuse/blob/master/CONTRIBUTING.md).\n"
  },
  {
    "path": "babel.config.json",
    "content": "{\n  \"presets\": [\"@babel/preset-env\", \"@babel/preset-typescript\"],\n  \"plugins\": [\n    \"@babel/plugin-proposal-object-rest-spread\",\n    \"@babel/plugin-syntax-import-assertions\"\n  ]\n}\n"
  },
  {
    "path": "backers.md",
    "content": "# Backers\n\nThank you to everyone to support Fuse.js development. The amount of effort needed to maintain this and develop new features for the project is only made sustainable thanks to your generous financial backing.\n\nYou can join these backers by [sponsoring on GitHub](https://github.com/sponsors/krisk).\n\n## 🥇 Gold Sponsor\n\n- Be the first!\n\n## 🥈 Silver Sponsor\n\n- [Worksome](https://www.worksome.com/)\n- [BairesDev](https://www.bairesdev.com/sponsoring-open-source-projects/)\n- [LITSLINK](https://litslink.com/)\n\n## 🥉 Bronze Sponsor\n\n- Be the first!\n\n## ☕ Standard\n\n- [roboflow](https://roboflow.com/)\n- [getsentry](https://sentry.io/welcome/)\n"
  },
  {
    "path": "dist/fuse.basic.cjs",
    "content": "/**\n * Fuse.js v7.1.0 - Lightweight fuzzy-search (http://fusejs.io)\n *\n * Copyright (c) 2025 Kiro Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\n'use strict';\n\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    enumerableOnly && (symbols = symbols.filter(function (sym) {\n      return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n    })), keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = null != arguments[i] ? arguments[i] : {};\n    i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n      _defineProperty(target, key, source[key]);\n    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n      Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n    });\n  }\n  return target;\n}\nfunction _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n    return typeof obj;\n  } : function (obj) {\n    return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n  }, _typeof(obj);\n}\nfunction _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\nfunction _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, _toPropertyKey(descriptor.key), descriptor);\n  }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  Object.defineProperty(Constructor, \"prototype\", {\n    writable: false\n  });\n  return Constructor;\n}\nfunction _defineProperty(obj, key, value) {\n  key = _toPropertyKey(key);\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  return obj;\n}\nfunction _toConsumableArray(arr) {\n  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\nfunction _arrayWithoutHoles(arr) {\n  if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\nfunction _iterableToArray(iter) {\n  if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\nfunction _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n  return arr2;\n}\nfunction _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _toPrimitive(input, hint) {\n  if (typeof input !== \"object\" || input === null) return input;\n  var prim = input[Symbol.toPrimitive];\n  if (prim !== undefined) {\n    var res = prim.call(input, hint || \"default\");\n    if (typeof res !== \"object\") return res;\n    throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n  }\n  return (hint === \"string\" ? String : Number)(input);\n}\nfunction _toPropertyKey(arg) {\n  var key = _toPrimitive(arg, \"string\");\n  return typeof key === \"symbol\" ? key : String(key);\n}\n\nfunction isArray(value) {\n  return !Array.isArray ? getTag(value) === '[object Array]' : Array.isArray(value);\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/baseToString.js\nvar INFINITY = 1 / 0;\nfunction baseToString(value) {\n  // Exit early for strings to avoid a performance hit in some environments.\n  if (typeof value == 'string') {\n    return value;\n  }\n  var result = value + '';\n  return result == '0' && 1 / value == -INFINITY ? '-0' : result;\n}\nfunction toString(value) {\n  return value == null ? '' : baseToString(value);\n}\nfunction isString(value) {\n  return typeof value === 'string';\n}\nfunction isNumber(value) {\n  return typeof value === 'number';\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/isBoolean.js\nfunction isBoolean(value) {\n  return value === true || value === false || isObjectLike(value) && getTag(value) == '[object Boolean]';\n}\nfunction isObject(value) {\n  return _typeof(value) === 'object';\n}\n\n// Checks if `value` is object-like.\nfunction isObjectLike(value) {\n  return isObject(value) && value !== null;\n}\nfunction isDefined(value) {\n  return value !== undefined && value !== null;\n}\nfunction isBlank(value) {\n  return !value.trim().length;\n}\n\n// Gets the `toStringTag` of `value`.\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/getTag.js\nfunction getTag(value) {\n  return value == null ? value === undefined ? '[object Undefined]' : '[object Null]' : Object.prototype.toString.call(value);\n}\n\nvar EXTENDED_SEARCH_UNAVAILABLE = 'Extended search is not available';\nvar LOGICAL_SEARCH_UNAVAILABLE = 'Logical search is not available';\nvar INCORRECT_INDEX_TYPE = \"Incorrect 'index' type\";\nvar LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = function LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key) {\n  return \"Invalid value for key \".concat(key);\n};\nvar PATTERN_LENGTH_TOO_LARGE = function PATTERN_LENGTH_TOO_LARGE(max) {\n  return \"Pattern length exceeds max of \".concat(max, \".\");\n};\nvar MISSING_KEY_PROPERTY = function MISSING_KEY_PROPERTY(name) {\n  return \"Missing \".concat(name, \" property in key\");\n};\nvar INVALID_KEY_WEIGHT_VALUE = function INVALID_KEY_WEIGHT_VALUE(key) {\n  return \"Property 'weight' in key '\".concat(key, \"' must be a positive integer\");\n};\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar KeyStore = /*#__PURE__*/function () {\n  function KeyStore(keys) {\n    var _this = this;\n    _classCallCheck(this, KeyStore);\n    this._keys = [];\n    this._keyMap = {};\n    var totalWeight = 0;\n    keys.forEach(function (key) {\n      var obj = createKey(key);\n      _this._keys.push(obj);\n      _this._keyMap[obj.id] = obj;\n      totalWeight += obj.weight;\n    });\n\n    // Normalize weights so that their sum is equal to 1\n    this._keys.forEach(function (key) {\n      key.weight /= totalWeight;\n    });\n  }\n  _createClass(KeyStore, [{\n    key: \"get\",\n    value: function get(keyId) {\n      return this._keyMap[keyId];\n    }\n  }, {\n    key: \"keys\",\n    value: function keys() {\n      return this._keys;\n    }\n  }, {\n    key: \"toJSON\",\n    value: function toJSON() {\n      return JSON.stringify(this._keys);\n    }\n  }]);\n  return KeyStore;\n}();\nfunction createKey(key) {\n  var path = null;\n  var id = null;\n  var src = null;\n  var weight = 1;\n  var getFn = null;\n  if (isString(key) || isArray(key)) {\n    src = key;\n    path = createKeyPath(key);\n    id = createKeyId(key);\n  } else {\n    if (!hasOwn.call(key, 'name')) {\n      throw new Error(MISSING_KEY_PROPERTY('name'));\n    }\n    var name = key.name;\n    src = name;\n    if (hasOwn.call(key, 'weight')) {\n      weight = key.weight;\n      if (weight <= 0) {\n        throw new Error(INVALID_KEY_WEIGHT_VALUE(name));\n      }\n    }\n    path = createKeyPath(name);\n    id = createKeyId(name);\n    getFn = key.getFn;\n  }\n  return {\n    path: path,\n    id: id,\n    weight: weight,\n    src: src,\n    getFn: getFn\n  };\n}\nfunction createKeyPath(key) {\n  return isArray(key) ? key : key.split('.');\n}\nfunction createKeyId(key) {\n  return isArray(key) ? key.join('.') : key;\n}\n\nfunction get(obj, path) {\n  var list = [];\n  var arr = false;\n  var deepGet = function deepGet(obj, path, index) {\n    if (!isDefined(obj)) {\n      return;\n    }\n    if (!path[index]) {\n      // If there's no path left, we've arrived at the object we care about.\n      list.push(obj);\n    } else {\n      var key = path[index];\n      var value = obj[key];\n      if (!isDefined(value)) {\n        return;\n      }\n\n      // If we're at the last value in the path, and if it's a string/number/bool,\n      // add it to the list\n      if (index === path.length - 1 && (isString(value) || isNumber(value) || isBoolean(value))) {\n        list.push(toString(value));\n      } else if (isArray(value)) {\n        arr = true;\n        // Search each item in the array.\n        for (var i = 0, len = value.length; i < len; i += 1) {\n          deepGet(value[i], path, index + 1);\n        }\n      } else if (path.length) {\n        // An object. Recurse further.\n        deepGet(value, path, index + 1);\n      }\n    }\n  };\n\n  // Backwards compatibility (since path used to be a string)\n  deepGet(obj, isString(path) ? path.split('.') : path, 0);\n  return arr ? list : list[0];\n}\n\nvar MatchOptions = {\n  // Whether the matches should be included in the result set. When `true`, each record in the result\n  // set will include the indices of the matched characters.\n  // These can consequently be used for highlighting purposes.\n  includeMatches: false,\n  // When `true`, the matching function will continue to the end of a search pattern even if\n  // a perfect match has already been located in the string.\n  findAllMatches: false,\n  // Minimum number of characters that must be matched before a result is considered a match\n  minMatchCharLength: 1\n};\nvar BasicOptions = {\n  // When `true`, the algorithm continues searching to the end of the input even if a perfect\n  // match is found before the end of the same input.\n  isCaseSensitive: false,\n  // When `true`, the algorithm will ignore diacritics (accents) in comparisons\n  ignoreDiacritics: false,\n  // When true, the matching function will continue to the end of a search pattern even if\n  includeScore: false,\n  // List of properties that will be searched. This also supports nested properties.\n  keys: [],\n  // Whether to sort the result list, by score\n  shouldSort: true,\n  // Default sort function: sort by ascending score, ascending index\n  sortFn: function sortFn(a, b) {\n    return a.score === b.score ? a.idx < b.idx ? -1 : 1 : a.score < b.score ? -1 : 1;\n  }\n};\nvar FuzzyOptions = {\n  // Approximately where in the text is the pattern expected to be found?\n  location: 0,\n  // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match\n  // (of both letters and location), a threshold of '1.0' would match anything.\n  threshold: 0.6,\n  // Determines how close the match must be to the fuzzy location (specified above).\n  // An exact letter match which is 'distance' characters away from the fuzzy location\n  // would score as a complete mismatch. A distance of '0' requires the match be at\n  // the exact location specified, a threshold of '1000' would require a perfect match\n  // to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n  distance: 100\n};\nvar AdvancedOptions = {\n  // When `true`, it enables the use of unix-like search commands\n  useExtendedSearch: false,\n  // The get function to use when fetching an object's properties.\n  // The default will search nested paths *ie foo.bar.baz*\n  getFn: get,\n  // When `true`, search will ignore `location` and `distance`, so it won't matter\n  // where in the string the pattern appears.\n  // More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score\n  ignoreLocation: false,\n  // When `true`, the calculation for the relevance score (used for sorting) will\n  // ignore the field-length norm.\n  // More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm\n  ignoreFieldNorm: false,\n  // The weight to determine how much field length norm effects scoring.\n  fieldNormWeight: 1\n};\nvar Config = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, BasicOptions), MatchOptions), FuzzyOptions), AdvancedOptions);\n\nvar SPACE = /[^ ]+/g;\n\n// Field-length norm: the shorter the field, the higher the weight.\n// Set to 3 decimals to reduce index size.\nfunction norm() {\n  var weight = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n  var mantissa = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;\n  var cache = new Map();\n  var m = Math.pow(10, mantissa);\n  return {\n    get: function get(value) {\n      var numTokens = value.match(SPACE).length;\n      if (cache.has(numTokens)) {\n        return cache.get(numTokens);\n      }\n\n      // Default function is 1/sqrt(x), weight makes that variable\n      var norm = 1 / Math.pow(numTokens, 0.5 * weight);\n\n      // In place of `toFixed(mantissa)`, for faster computation\n      var n = parseFloat(Math.round(norm * m) / m);\n      cache.set(numTokens, n);\n      return n;\n    },\n    clear: function clear() {\n      cache.clear();\n    }\n  };\n}\n\nvar FuseIndex = /*#__PURE__*/function () {\n  function FuseIndex() {\n    var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n      _ref$getFn = _ref.getFn,\n      getFn = _ref$getFn === void 0 ? Config.getFn : _ref$getFn,\n      _ref$fieldNormWeight = _ref.fieldNormWeight,\n      fieldNormWeight = _ref$fieldNormWeight === void 0 ? Config.fieldNormWeight : _ref$fieldNormWeight;\n    _classCallCheck(this, FuseIndex);\n    this.norm = norm(fieldNormWeight, 3);\n    this.getFn = getFn;\n    this.isCreated = false;\n    this.setIndexRecords();\n  }\n  _createClass(FuseIndex, [{\n    key: \"setSources\",\n    value: function setSources() {\n      var docs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n      this.docs = docs;\n    }\n  }, {\n    key: \"setIndexRecords\",\n    value: function setIndexRecords() {\n      var records = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n      this.records = records;\n    }\n  }, {\n    key: \"setKeys\",\n    value: function setKeys() {\n      var _this = this;\n      var keys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n      this.keys = keys;\n      this._keysMap = {};\n      keys.forEach(function (key, idx) {\n        _this._keysMap[key.id] = idx;\n      });\n    }\n  }, {\n    key: \"create\",\n    value: function create() {\n      var _this2 = this;\n      if (this.isCreated || !this.docs.length) {\n        return;\n      }\n      this.isCreated = true;\n\n      // List is Array<String>\n      if (isString(this.docs[0])) {\n        this.docs.forEach(function (doc, docIndex) {\n          _this2._addString(doc, docIndex);\n        });\n      } else {\n        // List is Array<Object>\n        this.docs.forEach(function (doc, docIndex) {\n          _this2._addObject(doc, docIndex);\n        });\n      }\n      this.norm.clear();\n    }\n    // Adds a doc to the end of the index\n  }, {\n    key: \"add\",\n    value: function add(doc) {\n      var idx = this.size();\n      if (isString(doc)) {\n        this._addString(doc, idx);\n      } else {\n        this._addObject(doc, idx);\n      }\n    }\n    // Removes the doc at the specified index of the index\n  }, {\n    key: \"removeAt\",\n    value: function removeAt(idx) {\n      this.records.splice(idx, 1);\n\n      // Change ref index of every subsquent doc\n      for (var i = idx, len = this.size(); i < len; i += 1) {\n        this.records[i].i -= 1;\n      }\n    }\n  }, {\n    key: \"getValueForItemAtKeyId\",\n    value: function getValueForItemAtKeyId(item, keyId) {\n      return item[this._keysMap[keyId]];\n    }\n  }, {\n    key: \"size\",\n    value: function size() {\n      return this.records.length;\n    }\n  }, {\n    key: \"_addString\",\n    value: function _addString(doc, docIndex) {\n      if (!isDefined(doc) || isBlank(doc)) {\n        return;\n      }\n      var record = {\n        v: doc,\n        i: docIndex,\n        n: this.norm.get(doc)\n      };\n      this.records.push(record);\n    }\n  }, {\n    key: \"_addObject\",\n    value: function _addObject(doc, docIndex) {\n      var _this3 = this;\n      var record = {\n        i: docIndex,\n        $: {}\n      };\n\n      // Iterate over every key (i.e, path), and fetch the value at that key\n      this.keys.forEach(function (key, keyIndex) {\n        var value = key.getFn ? key.getFn(doc) : _this3.getFn(doc, key.path);\n        if (!isDefined(value)) {\n          return;\n        }\n        if (isArray(value)) {\n          var subRecords = [];\n          var stack = [{\n            nestedArrIndex: -1,\n            value: value\n          }];\n          while (stack.length) {\n            var _stack$pop = stack.pop(),\n              nestedArrIndex = _stack$pop.nestedArrIndex,\n              _value = _stack$pop.value;\n            if (!isDefined(_value)) {\n              continue;\n            }\n            if (isString(_value) && !isBlank(_value)) {\n              var subRecord = {\n                v: _value,\n                i: nestedArrIndex,\n                n: _this3.norm.get(_value)\n              };\n              subRecords.push(subRecord);\n            } else if (isArray(_value)) {\n              _value.forEach(function (item, k) {\n                stack.push({\n                  nestedArrIndex: k,\n                  value: item\n                });\n              });\n            } else ;\n          }\n          record.$[keyIndex] = subRecords;\n        } else if (isString(value) && !isBlank(value)) {\n          var _subRecord = {\n            v: value,\n            n: _this3.norm.get(value)\n          };\n          record.$[keyIndex] = _subRecord;\n        }\n      });\n      this.records.push(record);\n    }\n  }, {\n    key: \"toJSON\",\n    value: function toJSON() {\n      return {\n        keys: this.keys,\n        records: this.records\n      };\n    }\n  }]);\n  return FuseIndex;\n}();\nfunction createIndex(keys, docs) {\n  var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n    _ref2$getFn = _ref2.getFn,\n    getFn = _ref2$getFn === void 0 ? Config.getFn : _ref2$getFn,\n    _ref2$fieldNormWeight = _ref2.fieldNormWeight,\n    fieldNormWeight = _ref2$fieldNormWeight === void 0 ? Config.fieldNormWeight : _ref2$fieldNormWeight;\n  var myIndex = new FuseIndex({\n    getFn: getFn,\n    fieldNormWeight: fieldNormWeight\n  });\n  myIndex.setKeys(keys.map(createKey));\n  myIndex.setSources(docs);\n  myIndex.create();\n  return myIndex;\n}\nfunction parseIndex(data) {\n  var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n    _ref3$getFn = _ref3.getFn,\n    getFn = _ref3$getFn === void 0 ? Config.getFn : _ref3$getFn,\n    _ref3$fieldNormWeight = _ref3.fieldNormWeight,\n    fieldNormWeight = _ref3$fieldNormWeight === void 0 ? Config.fieldNormWeight : _ref3$fieldNormWeight;\n  var keys = data.keys,\n    records = data.records;\n  var myIndex = new FuseIndex({\n    getFn: getFn,\n    fieldNormWeight: fieldNormWeight\n  });\n  myIndex.setKeys(keys);\n  myIndex.setIndexRecords(records);\n  return myIndex;\n}\n\nfunction computeScore$1(pattern) {\n  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n    _ref$errors = _ref.errors,\n    errors = _ref$errors === void 0 ? 0 : _ref$errors,\n    _ref$currentLocation = _ref.currentLocation,\n    currentLocation = _ref$currentLocation === void 0 ? 0 : _ref$currentLocation,\n    _ref$expectedLocation = _ref.expectedLocation,\n    expectedLocation = _ref$expectedLocation === void 0 ? 0 : _ref$expectedLocation,\n    _ref$distance = _ref.distance,\n    distance = _ref$distance === void 0 ? Config.distance : _ref$distance,\n    _ref$ignoreLocation = _ref.ignoreLocation,\n    ignoreLocation = _ref$ignoreLocation === void 0 ? Config.ignoreLocation : _ref$ignoreLocation;\n  var accuracy = errors / pattern.length;\n  if (ignoreLocation) {\n    return accuracy;\n  }\n  var proximity = Math.abs(expectedLocation - currentLocation);\n  if (!distance) {\n    // Dodge divide by zero error.\n    return proximity ? 1.0 : accuracy;\n  }\n  return accuracy + proximity / distance;\n}\n\nfunction convertMaskToIndices() {\n  var matchmask = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n  var minMatchCharLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Config.minMatchCharLength;\n  var indices = [];\n  var start = -1;\n  var end = -1;\n  var i = 0;\n  for (var len = matchmask.length; i < len; i += 1) {\n    var match = matchmask[i];\n    if (match && start === -1) {\n      start = i;\n    } else if (!match && start !== -1) {\n      end = i - 1;\n      if (end - start + 1 >= minMatchCharLength) {\n        indices.push([start, end]);\n      }\n      start = -1;\n    }\n  }\n\n  // (i-1 - start) + 1 => i - start\n  if (matchmask[i - 1] && i - start >= minMatchCharLength) {\n    indices.push([start, i - 1]);\n  }\n  return indices;\n}\n\n// Machine word size\nvar MAX_BITS = 32;\n\nfunction search(text, pattern, patternAlphabet) {\n  var _ref = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n    _ref$location = _ref.location,\n    location = _ref$location === void 0 ? Config.location : _ref$location,\n    _ref$distance = _ref.distance,\n    distance = _ref$distance === void 0 ? Config.distance : _ref$distance,\n    _ref$threshold = _ref.threshold,\n    threshold = _ref$threshold === void 0 ? Config.threshold : _ref$threshold,\n    _ref$findAllMatches = _ref.findAllMatches,\n    findAllMatches = _ref$findAllMatches === void 0 ? Config.findAllMatches : _ref$findAllMatches,\n    _ref$minMatchCharLeng = _ref.minMatchCharLength,\n    minMatchCharLength = _ref$minMatchCharLeng === void 0 ? Config.minMatchCharLength : _ref$minMatchCharLeng,\n    _ref$includeMatches = _ref.includeMatches,\n    includeMatches = _ref$includeMatches === void 0 ? Config.includeMatches : _ref$includeMatches,\n    _ref$ignoreLocation = _ref.ignoreLocation,\n    ignoreLocation = _ref$ignoreLocation === void 0 ? Config.ignoreLocation : _ref$ignoreLocation;\n  if (pattern.length > MAX_BITS) {\n    throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS));\n  }\n  var patternLen = pattern.length;\n  // Set starting location at beginning text and initialize the alphabet.\n  var textLen = text.length;\n  // Handle the case when location > text.length\n  var expectedLocation = Math.max(0, Math.min(location, textLen));\n  // Highest score beyond which we give up.\n  var currentThreshold = threshold;\n  // Is there a nearby exact match? (speedup)\n  var bestLocation = expectedLocation;\n\n  // Performance: only computer matches when the minMatchCharLength > 1\n  // OR if `includeMatches` is true.\n  var computeMatches = minMatchCharLength > 1 || includeMatches;\n  // A mask of the matches, used for building the indices\n  var matchMask = computeMatches ? Array(textLen) : [];\n  var index;\n\n  // Get all exact matches, here for speed up\n  while ((index = text.indexOf(pattern, bestLocation)) > -1) {\n    var score = computeScore$1(pattern, {\n      currentLocation: index,\n      expectedLocation: expectedLocation,\n      distance: distance,\n      ignoreLocation: ignoreLocation\n    });\n    currentThreshold = Math.min(score, currentThreshold);\n    bestLocation = index + patternLen;\n    if (computeMatches) {\n      var i = 0;\n      while (i < patternLen) {\n        matchMask[index + i] = 1;\n        i += 1;\n      }\n    }\n  }\n\n  // Reset the best location\n  bestLocation = -1;\n  var lastBitArr = [];\n  var finalScore = 1;\n  var binMax = patternLen + textLen;\n  var mask = 1 << patternLen - 1;\n  for (var _i = 0; _i < patternLen; _i += 1) {\n    // Scan for the best match; each iteration allows for one more error.\n    // Run a binary search to determine how far from the match location we can stray\n    // at this error level.\n    var binMin = 0;\n    var binMid = binMax;\n    while (binMin < binMid) {\n      var _score = computeScore$1(pattern, {\n        errors: _i,\n        currentLocation: expectedLocation + binMid,\n        expectedLocation: expectedLocation,\n        distance: distance,\n        ignoreLocation: ignoreLocation\n      });\n      if (_score <= currentThreshold) {\n        binMin = binMid;\n      } else {\n        binMax = binMid;\n      }\n      binMid = Math.floor((binMax - binMin) / 2 + binMin);\n    }\n\n    // Use the result from this iteration as the maximum for the next.\n    binMax = binMid;\n    var start = Math.max(1, expectedLocation - binMid + 1);\n    var finish = findAllMatches ? textLen : Math.min(expectedLocation + binMid, textLen) + patternLen;\n\n    // Initialize the bit array\n    var bitArr = Array(finish + 2);\n    bitArr[finish + 1] = (1 << _i) - 1;\n    for (var j = finish; j >= start; j -= 1) {\n      var currentLocation = j - 1;\n      var charMatch = patternAlphabet[text.charAt(currentLocation)];\n      if (computeMatches) {\n        // Speed up: quick bool to int conversion (i.e, `charMatch ? 1 : 0`)\n        matchMask[currentLocation] = +!!charMatch;\n      }\n\n      // First pass: exact match\n      bitArr[j] = (bitArr[j + 1] << 1 | 1) & charMatch;\n\n      // Subsequent passes: fuzzy match\n      if (_i) {\n        bitArr[j] |= (lastBitArr[j + 1] | lastBitArr[j]) << 1 | 1 | lastBitArr[j + 1];\n      }\n      if (bitArr[j] & mask) {\n        finalScore = computeScore$1(pattern, {\n          errors: _i,\n          currentLocation: currentLocation,\n          expectedLocation: expectedLocation,\n          distance: distance,\n          ignoreLocation: ignoreLocation\n        });\n\n        // This match will almost certainly be better than any existing match.\n        // But check anyway.\n        if (finalScore <= currentThreshold) {\n          // Indeed it is\n          currentThreshold = finalScore;\n          bestLocation = currentLocation;\n\n          // Already passed `loc`, downhill from here on in.\n          if (bestLocation <= expectedLocation) {\n            break;\n          }\n\n          // When passing `bestLocation`, don't exceed our current distance from `expectedLocation`.\n          start = Math.max(1, 2 * expectedLocation - bestLocation);\n        }\n      }\n    }\n\n    // No hope for a (better) match at greater error levels.\n    var _score2 = computeScore$1(pattern, {\n      errors: _i + 1,\n      currentLocation: expectedLocation,\n      expectedLocation: expectedLocation,\n      distance: distance,\n      ignoreLocation: ignoreLocation\n    });\n    if (_score2 > currentThreshold) {\n      break;\n    }\n    lastBitArr = bitArr;\n  }\n  var result = {\n    isMatch: bestLocation >= 0,\n    // Count exact matches (those with a score of 0) to be \"almost\" exact\n    score: Math.max(0.001, finalScore)\n  };\n  if (computeMatches) {\n    var indices = convertMaskToIndices(matchMask, minMatchCharLength);\n    if (!indices.length) {\n      result.isMatch = false;\n    } else if (includeMatches) {\n      result.indices = indices;\n    }\n  }\n  return result;\n}\n\nfunction createPatternAlphabet(pattern) {\n  var mask = {};\n  for (var i = 0, len = pattern.length; i < len; i += 1) {\n    var _char = pattern.charAt(i);\n    mask[_char] = (mask[_char] || 0) | 1 << len - i - 1;\n  }\n  return mask;\n}\n\nvar stripDiacritics = String.prototype.normalize ? function (str) {\n  return str.normalize('NFD').replace(/[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C04\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F]/g, '');\n} : function (str) {\n  return str;\n};\n\nvar BitapSearch = /*#__PURE__*/function () {\n  function BitapSearch(pattern) {\n    var _this = this;\n    var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n      _ref$location = _ref.location,\n      location = _ref$location === void 0 ? Config.location : _ref$location,\n      _ref$threshold = _ref.threshold,\n      threshold = _ref$threshold === void 0 ? Config.threshold : _ref$threshold,\n      _ref$distance = _ref.distance,\n      distance = _ref$distance === void 0 ? Config.distance : _ref$distance,\n      _ref$includeMatches = _ref.includeMatches,\n      includeMatches = _ref$includeMatches === void 0 ? Config.includeMatches : _ref$includeMatches,\n      _ref$findAllMatches = _ref.findAllMatches,\n      findAllMatches = _ref$findAllMatches === void 0 ? Config.findAllMatches : _ref$findAllMatches,\n      _ref$minMatchCharLeng = _ref.minMatchCharLength,\n      minMatchCharLength = _ref$minMatchCharLeng === void 0 ? Config.minMatchCharLength : _ref$minMatchCharLeng,\n      _ref$isCaseSensitive = _ref.isCaseSensitive,\n      isCaseSensitive = _ref$isCaseSensitive === void 0 ? Config.isCaseSensitive : _ref$isCaseSensitive,\n      _ref$ignoreDiacritics = _ref.ignoreDiacritics,\n      ignoreDiacritics = _ref$ignoreDiacritics === void 0 ? Config.ignoreDiacritics : _ref$ignoreDiacritics,\n      _ref$ignoreLocation = _ref.ignoreLocation,\n      ignoreLocation = _ref$ignoreLocation === void 0 ? Config.ignoreLocation : _ref$ignoreLocation;\n    _classCallCheck(this, BitapSearch);\n    this.options = {\n      location: location,\n      threshold: threshold,\n      distance: distance,\n      includeMatches: includeMatches,\n      findAllMatches: findAllMatches,\n      minMatchCharLength: minMatchCharLength,\n      isCaseSensitive: isCaseSensitive,\n      ignoreDiacritics: ignoreDiacritics,\n      ignoreLocation: ignoreLocation\n    };\n    pattern = isCaseSensitive ? pattern : pattern.toLowerCase();\n    pattern = ignoreDiacritics ? stripDiacritics(pattern) : pattern;\n    this.pattern = pattern;\n    this.chunks = [];\n    if (!this.pattern.length) {\n      return;\n    }\n    var addChunk = function addChunk(pattern, startIndex) {\n      _this.chunks.push({\n        pattern: pattern,\n        alphabet: createPatternAlphabet(pattern),\n        startIndex: startIndex\n      });\n    };\n    var len = this.pattern.length;\n    if (len > MAX_BITS) {\n      var i = 0;\n      var remainder = len % MAX_BITS;\n      var end = len - remainder;\n      while (i < end) {\n        addChunk(this.pattern.substr(i, MAX_BITS), i);\n        i += MAX_BITS;\n      }\n      if (remainder) {\n        var startIndex = len - MAX_BITS;\n        addChunk(this.pattern.substr(startIndex), startIndex);\n      }\n    } else {\n      addChunk(this.pattern, 0);\n    }\n  }\n  _createClass(BitapSearch, [{\n    key: \"searchIn\",\n    value: function searchIn(text) {\n      var _this$options = this.options,\n        isCaseSensitive = _this$options.isCaseSensitive,\n        ignoreDiacritics = _this$options.ignoreDiacritics,\n        includeMatches = _this$options.includeMatches;\n      text = isCaseSensitive ? text : text.toLowerCase();\n      text = ignoreDiacritics ? stripDiacritics(text) : text;\n\n      // Exact match\n      if (this.pattern === text) {\n        var _result = {\n          isMatch: true,\n          score: 0\n        };\n        if (includeMatches) {\n          _result.indices = [[0, text.length - 1]];\n        }\n        return _result;\n      }\n\n      // Otherwise, use Bitap algorithm\n      var _this$options2 = this.options,\n        location = _this$options2.location,\n        distance = _this$options2.distance,\n        threshold = _this$options2.threshold,\n        findAllMatches = _this$options2.findAllMatches,\n        minMatchCharLength = _this$options2.minMatchCharLength,\n        ignoreLocation = _this$options2.ignoreLocation;\n      var allIndices = [];\n      var totalScore = 0;\n      var hasMatches = false;\n      this.chunks.forEach(function (_ref2) {\n        var pattern = _ref2.pattern,\n          alphabet = _ref2.alphabet,\n          startIndex = _ref2.startIndex;\n        var _search = search(text, pattern, alphabet, {\n            location: location + startIndex,\n            distance: distance,\n            threshold: threshold,\n            findAllMatches: findAllMatches,\n            minMatchCharLength: minMatchCharLength,\n            includeMatches: includeMatches,\n            ignoreLocation: ignoreLocation\n          }),\n          isMatch = _search.isMatch,\n          score = _search.score,\n          indices = _search.indices;\n        if (isMatch) {\n          hasMatches = true;\n        }\n        totalScore += score;\n        if (isMatch && indices) {\n          allIndices = [].concat(_toConsumableArray(allIndices), _toConsumableArray(indices));\n        }\n      });\n      var result = {\n        isMatch: hasMatches,\n        score: hasMatches ? totalScore / this.chunks.length : 1\n      };\n      if (hasMatches && includeMatches) {\n        result.indices = allIndices;\n      }\n      return result;\n    }\n  }]);\n  return BitapSearch;\n}();\n\nvar registeredSearchers = [];\nfunction createSearcher(pattern, options) {\n  for (var i = 0, len = registeredSearchers.length; i < len; i += 1) {\n    var searcherClass = registeredSearchers[i];\n    if (searcherClass.condition(pattern, options)) {\n      return new searcherClass(pattern, options);\n    }\n  }\n  return new BitapSearch(pattern, options);\n}\n\nvar LogicalOperator = {\n  AND: '$and',\n  OR: '$or'\n};\nvar KeyType = {\n  PATH: '$path',\n  PATTERN: '$val'\n};\nvar isExpression = function isExpression(query) {\n  return !!(query[LogicalOperator.AND] || query[LogicalOperator.OR]);\n};\nvar isPath = function isPath(query) {\n  return !!query[KeyType.PATH];\n};\nvar isLeaf = function isLeaf(query) {\n  return !isArray(query) && isObject(query) && !isExpression(query);\n};\nvar convertToExplicit = function convertToExplicit(query) {\n  return _defineProperty({}, LogicalOperator.AND, Object.keys(query).map(function (key) {\n    return _defineProperty({}, key, query[key]);\n  }));\n};\n\n// When `auto` is `true`, the parse function will infer and initialize and add\n// the appropriate `Searcher` instance\nfunction parse(query, options) {\n  var _ref3 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n    _ref3$auto = _ref3.auto,\n    auto = _ref3$auto === void 0 ? true : _ref3$auto;\n  var next = function next(query) {\n    var keys = Object.keys(query);\n    var isQueryPath = isPath(query);\n    if (!isQueryPath && keys.length > 1 && !isExpression(query)) {\n      return next(convertToExplicit(query));\n    }\n    if (isLeaf(query)) {\n      var key = isQueryPath ? query[KeyType.PATH] : keys[0];\n      var pattern = isQueryPath ? query[KeyType.PATTERN] : query[key];\n      if (!isString(pattern)) {\n        throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key));\n      }\n      var obj = {\n        keyId: createKeyId(key),\n        pattern: pattern\n      };\n      if (auto) {\n        obj.searcher = createSearcher(pattern, options);\n      }\n      return obj;\n    }\n    var node = {\n      children: [],\n      operator: keys[0]\n    };\n    keys.forEach(function (key) {\n      var value = query[key];\n      if (isArray(value)) {\n        value.forEach(function (item) {\n          node.children.push(next(item));\n        });\n      }\n    });\n    return node;\n  };\n  if (!isExpression(query)) {\n    query = convertToExplicit(query);\n  }\n  return next(query);\n}\n\n// Practical scoring function\nfunction computeScore(results, _ref) {\n  var _ref$ignoreFieldNorm = _ref.ignoreFieldNorm,\n    ignoreFieldNorm = _ref$ignoreFieldNorm === void 0 ? Config.ignoreFieldNorm : _ref$ignoreFieldNorm;\n  results.forEach(function (result) {\n    var totalScore = 1;\n    result.matches.forEach(function (_ref2) {\n      var key = _ref2.key,\n        norm = _ref2.norm,\n        score = _ref2.score;\n      var weight = key ? key.weight : null;\n      totalScore *= Math.pow(score === 0 && weight ? Number.EPSILON : score, (weight || 1) * (ignoreFieldNorm ? 1 : norm));\n    });\n    result.score = totalScore;\n  });\n}\n\nfunction transformMatches(result, data) {\n  var matches = result.matches;\n  data.matches = [];\n  if (!isDefined(matches)) {\n    return;\n  }\n  matches.forEach(function (match) {\n    if (!isDefined(match.indices) || !match.indices.length) {\n      return;\n    }\n    var indices = match.indices,\n      value = match.value;\n    var obj = {\n      indices: indices,\n      value: value\n    };\n    if (match.key) {\n      obj.key = match.key.src;\n    }\n    if (match.idx > -1) {\n      obj.refIndex = match.idx;\n    }\n    data.matches.push(obj);\n  });\n}\n\nfunction transformScore(result, data) {\n  data.score = result.score;\n}\n\nfunction format(results, docs) {\n  var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n    _ref$includeMatches = _ref.includeMatches,\n    includeMatches = _ref$includeMatches === void 0 ? Config.includeMatches : _ref$includeMatches,\n    _ref$includeScore = _ref.includeScore,\n    includeScore = _ref$includeScore === void 0 ? Config.includeScore : _ref$includeScore;\n  var transformers = [];\n  if (includeMatches) transformers.push(transformMatches);\n  if (includeScore) transformers.push(transformScore);\n  return results.map(function (result) {\n    var idx = result.idx;\n    var data = {\n      item: docs[idx],\n      refIndex: idx\n    };\n    if (transformers.length) {\n      transformers.forEach(function (transformer) {\n        transformer(result, data);\n      });\n    }\n    return data;\n  });\n}\n\nvar Fuse$1 = /*#__PURE__*/function () {\n  function Fuse(docs) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var index = arguments.length > 2 ? arguments[2] : undefined;\n    _classCallCheck(this, Fuse);\n    this.options = _objectSpread2(_objectSpread2({}, Config), options);\n    if (this.options.useExtendedSearch && !false) {\n      throw new Error(EXTENDED_SEARCH_UNAVAILABLE);\n    }\n    this._keyStore = new KeyStore(this.options.keys);\n    this.setCollection(docs, index);\n  }\n  _createClass(Fuse, [{\n    key: \"setCollection\",\n    value: function setCollection(docs, index) {\n      this._docs = docs;\n      if (index && !(index instanceof FuseIndex)) {\n        throw new Error(INCORRECT_INDEX_TYPE);\n      }\n      this._myIndex = index || createIndex(this.options.keys, this._docs, {\n        getFn: this.options.getFn,\n        fieldNormWeight: this.options.fieldNormWeight\n      });\n    }\n  }, {\n    key: \"add\",\n    value: function add(doc) {\n      if (!isDefined(doc)) {\n        return;\n      }\n      this._docs.push(doc);\n      this._myIndex.add(doc);\n    }\n  }, {\n    key: \"remove\",\n    value: function remove() {\n      var predicate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function /* doc, idx */ () {\n        return false;\n      };\n      var results = [];\n      for (var i = 0, len = this._docs.length; i < len; i += 1) {\n        var doc = this._docs[i];\n        if (predicate(doc, i)) {\n          this.removeAt(i);\n          i -= 1;\n          len -= 1;\n          results.push(doc);\n        }\n      }\n      return results;\n    }\n  }, {\n    key: \"removeAt\",\n    value: function removeAt(idx) {\n      this._docs.splice(idx, 1);\n      this._myIndex.removeAt(idx);\n    }\n  }, {\n    key: \"getIndex\",\n    value: function getIndex() {\n      return this._myIndex;\n    }\n  }, {\n    key: \"search\",\n    value: function search(query) {\n      var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n        _ref$limit = _ref.limit,\n        limit = _ref$limit === void 0 ? -1 : _ref$limit;\n      var _this$options = this.options,\n        includeMatches = _this$options.includeMatches,\n        includeScore = _this$options.includeScore,\n        shouldSort = _this$options.shouldSort,\n        sortFn = _this$options.sortFn,\n        ignoreFieldNorm = _this$options.ignoreFieldNorm;\n      var results = isString(query) ? isString(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query);\n      computeScore(results, {\n        ignoreFieldNorm: ignoreFieldNorm\n      });\n      if (shouldSort) {\n        results.sort(sortFn);\n      }\n      if (isNumber(limit) && limit > -1) {\n        results = results.slice(0, limit);\n      }\n      return format(results, this._docs, {\n        includeMatches: includeMatches,\n        includeScore: includeScore\n      });\n    }\n  }, {\n    key: \"_searchStringList\",\n    value: function _searchStringList(query) {\n      var searcher = createSearcher(query, this.options);\n      var records = this._myIndex.records;\n      var results = [];\n\n      // Iterate over every string in the index\n      records.forEach(function (_ref2) {\n        var text = _ref2.v,\n          idx = _ref2.i,\n          norm = _ref2.n;\n        if (!isDefined(text)) {\n          return;\n        }\n        var _searcher$searchIn = searcher.searchIn(text),\n          isMatch = _searcher$searchIn.isMatch,\n          score = _searcher$searchIn.score,\n          indices = _searcher$searchIn.indices;\n        if (isMatch) {\n          results.push({\n            item: text,\n            idx: idx,\n            matches: [{\n              score: score,\n              value: text,\n              norm: norm,\n              indices: indices\n            }]\n          });\n        }\n      });\n      return results;\n    }\n  }, {\n    key: \"_searchLogical\",\n    value: function _searchLogical(query) {\n      {\n        throw new Error(LOGICAL_SEARCH_UNAVAILABLE);\n      }\n    }\n  }, {\n    key: \"_searchObjectList\",\n    value: function _searchObjectList(query) {\n      var _this2 = this;\n      var searcher = createSearcher(query, this.options);\n      var _this$_myIndex = this._myIndex,\n        keys = _this$_myIndex.keys,\n        records = _this$_myIndex.records;\n      var results = [];\n\n      // List is Array<Object>\n      records.forEach(function (_ref5) {\n        var item = _ref5.$,\n          idx = _ref5.i;\n        if (!isDefined(item)) {\n          return;\n        }\n        var matches = [];\n\n        // Iterate over every key (i.e, path), and fetch the value at that key\n        keys.forEach(function (key, keyIndex) {\n          matches.push.apply(matches, _toConsumableArray(_this2._findMatches({\n            key: key,\n            value: item[keyIndex],\n            searcher: searcher\n          })));\n        });\n        if (matches.length) {\n          results.push({\n            idx: idx,\n            item: item,\n            matches: matches\n          });\n        }\n      });\n      return results;\n    }\n  }, {\n    key: \"_findMatches\",\n    value: function _findMatches(_ref6) {\n      var key = _ref6.key,\n        value = _ref6.value,\n        searcher = _ref6.searcher;\n      if (!isDefined(value)) {\n        return [];\n      }\n      var matches = [];\n      if (isArray(value)) {\n        value.forEach(function (_ref7) {\n          var text = _ref7.v,\n            idx = _ref7.i,\n            norm = _ref7.n;\n          if (!isDefined(text)) {\n            return;\n          }\n          var _searcher$searchIn2 = searcher.searchIn(text),\n            isMatch = _searcher$searchIn2.isMatch,\n            score = _searcher$searchIn2.score,\n            indices = _searcher$searchIn2.indices;\n          if (isMatch) {\n            matches.push({\n              score: score,\n              key: key,\n              value: text,\n              idx: idx,\n              norm: norm,\n              indices: indices\n            });\n          }\n        });\n      } else {\n        var text = value.v,\n          norm = value.n;\n        var _searcher$searchIn3 = searcher.searchIn(text),\n          isMatch = _searcher$searchIn3.isMatch,\n          score = _searcher$searchIn3.score,\n          indices = _searcher$searchIn3.indices;\n        if (isMatch) {\n          matches.push({\n            score: score,\n            key: key,\n            value: text,\n            norm: norm,\n            indices: indices\n          });\n        }\n      }\n      return matches;\n    }\n  }]);\n  return Fuse;\n}();\n\nFuse$1.version = '7.1.0';\nFuse$1.createIndex = createIndex;\nFuse$1.parseIndex = parseIndex;\nFuse$1.config = Config;\n{\n  Fuse$1.parseQuery = parse;\n}\nvar Fuse = Fuse$1;\n\nmodule.exports = Fuse;\n"
  },
  {
    "path": "dist/fuse.basic.min.cjs",
    "content": "/**\n * Fuse.js v7.1.0 - Lightweight fuzzy-search (http://fusejs.io)\n *\n * Copyright (c) 2025 Kiro Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\"use strict\";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e){return n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},n(e)}function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,s(r.key),r)}}function i(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,\"prototype\",{writable:!1}),e}function o(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if(\"undefined\"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e[\"@@iterator\"])return Array.from(e)}(e)||function(e,t){if(!e)return;if(\"string\"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);\"Object\"===n&&e.constructor&&(n=e.constructor.name);if(\"Map\"===n||\"Set\"===n)return Array.from(e);if(\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e){var t=function(e,t){if(\"object\"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||\"default\");if(\"object\"!=typeof r)return r;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===t?String:Number)(e)}(e,\"string\");return\"symbol\"==typeof t?t:String(t)}function h(e){return Array.isArray?Array.isArray(e):\"[object Array]\"===p(e)}var l=1/0;function f(e){return null==e?\"\":function(e){if(\"string\"==typeof e)return e;var t=e+\"\";return\"0\"==t&&1/e==-l?\"-0\":t}(e)}function d(e){return\"string\"==typeof e}function v(e){return\"number\"==typeof e}function A(e){return!0===e||!1===e||function(e){return function(e){return\"object\"===n(e)}(e)&&null!==e}(e)&&\"[object Boolean]\"==p(e)}function g(e){return null!=e}function y(e){return!e.trim().length}function p(e){return null==e?void 0===e?\"[object Undefined]\":\"[object Null]\":Object.prototype.toString.call(e)}var m=function(e){return\"Missing \".concat(e,\" property in key\")},C=function(e){return\"Property 'weight' in key '\".concat(e,\"' must be a positive integer\")},F=Object.prototype.hasOwnProperty,E=function(){function e(t){var n=this;r(this,e),this._keys=[],this._keyMap={};var u=0;t.forEach((function(e){var t=B(e);n._keys.push(t),n._keyMap[t.id]=t,u+=t.weight})),this._keys.forEach((function(e){e.weight/=u}))}return i(e,[{key:\"get\",value:function(e){return this._keyMap[e]}},{key:\"keys\",value:function(){return this._keys}},{key:\"toJSON\",value:function(){return JSON.stringify(this._keys)}}]),e}();function B(e){var t=null,n=null,r=null,u=1,i=null;if(d(e)||h(e))r=e,t=D(e),n=b(e);else{if(!F.call(e,\"name\"))throw new Error(m(\"name\"));var o=e.name;if(r=o,F.call(e,\"weight\")&&(u=e.weight)<=0)throw new Error(C(o));t=D(o),n=b(o),i=e.getFn}return{path:t,id:n,weight:u,src:r,getFn:i}}function D(e){return h(e)?e:e.split(\".\")}function b(e){return h(e)?e.join(\".\"):e}var k={useExtendedSearch:!1,getFn:function(e,t){var n=[],r=!1;return function e(t,u,i){if(g(t))if(u[i]){var o=t[u[i]];if(!g(o))return;if(i===u.length-1&&(d(o)||v(o)||A(o)))n.push(f(o));else if(h(o)){r=!0;for(var a=0,c=o.length;a<c;a+=1)e(o[a],u,i+1)}else u.length&&e(o,u,i+1)}else n.push(t)}(e,d(t)?t.split(\".\"):t,0),r?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},M=t(t(t(t({},{isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(e,t){return e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1}}),{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1}),{location:0,threshold:.6,distance:100}),k),w=/[^ ]+/g;var x=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.getFn,u=void 0===n?M.getFn:n,i=t.fieldNormWeight,o=void 0===i?M.fieldNormWeight:i;r(this,e),this.norm=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=new Map,r=Math.pow(10,t);return{get:function(t){var u=t.match(w).length;if(n.has(u))return n.get(u);var i=1/Math.pow(u,.5*e),o=parseFloat(Math.round(i*r)/r);return n.set(u,o),o},clear:function(){n.clear()}}}(o,3),this.getFn=u,this.isCreated=!1,this.setIndexRecords()}return i(e,[{key:\"setSources\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:\"setIndexRecords\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:\"setKeys\",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=t,this._keysMap={},t.forEach((function(t,n){e._keysMap[t.id]=n}))}},{key:\"create\",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,d(this.docs[0])?this.docs.forEach((function(t,n){e._addString(t,n)})):this.docs.forEach((function(t,n){e._addObject(t,n)})),this.norm.clear())}},{key:\"add\",value:function(e){var t=this.size();d(e)?this._addString(e,t):this._addObject(e,t)}},{key:\"removeAt\",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}},{key:\"getValueForItemAtKeyId\",value:function(e,t){return e[this._keysMap[t]]}},{key:\"size\",value:function(){return this.records.length}},{key:\"_addString\",value:function(e,t){if(g(e)&&!y(e)){var n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}}},{key:\"_addObject\",value:function(e,t){var n=this,r={i:t,$:{}};this.keys.forEach((function(t,u){var i=t.getFn?t.getFn(e):n.getFn(e,t.path);if(g(i))if(h(i)){for(var o=[],a=[{nestedArrIndex:-1,value:i}];a.length;){var c=a.pop(),s=c.nestedArrIndex,l=c.value;if(g(l))if(d(l)&&!y(l)){var f={v:l,i:s,n:n.norm.get(l)};o.push(f)}else h(l)&&l.forEach((function(e,t){a.push({nestedArrIndex:t,value:e})}))}r.$[u]=o}else if(d(i)&&!y(i)){var v={v:i,n:n.norm.get(i)};r.$[u]=v}})),this.records.push(r)}},{key:\"toJSON\",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function L(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,u=void 0===r?M.getFn:r,i=n.fieldNormWeight,o=void 0===i?M.fieldNormWeight:i,a=new x({getFn:u,fieldNormWeight:o});return a.setKeys(e.map(B)),a.setSources(t),a.create(),a}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,u=t.currentLocation,i=void 0===u?0:u,o=t.expectedLocation,a=void 0===o?0:o,c=t.distance,s=void 0===c?M.distance:c,h=t.ignoreLocation,l=void 0===h?M.ignoreLocation:h,f=r/e.length;if(l)return f;var d=Math.abs(a-i);return s?f+d/s:d?1:f}var _=32;function O(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},u=r.location,i=void 0===u?M.location:u,o=r.distance,a=void 0===o?M.distance:o,c=r.threshold,s=void 0===c?M.threshold:c,h=r.findAllMatches,l=void 0===h?M.findAllMatches:h,f=r.minMatchCharLength,d=void 0===f?M.minMatchCharLength:f,v=r.includeMatches,A=void 0===v?M.includeMatches:v,g=r.ignoreLocation,y=void 0===g?M.ignoreLocation:g;if(t.length>_)throw new Error(\"Pattern length exceeds max of \".concat(_,\".\"));for(var p,m=t.length,C=e.length,F=Math.max(0,Math.min(i,C)),E=s,B=F,D=d>1||A,b=D?Array(C):[];(p=e.indexOf(t,B))>-1;){var k=S(t,{currentLocation:p,expectedLocation:F,distance:a,ignoreLocation:y});if(E=Math.min(k,E),B=p+m,D)for(var w=0;w<m;)b[p+w]=1,w+=1}B=-1;for(var x=[],L=1,O=m+C,j=1<<m-1,I=0;I<m;I+=1){for(var N=0,P=O;N<P;){S(t,{errors:I,currentLocation:F+P,expectedLocation:F,distance:a,ignoreLocation:y})<=E?N=P:O=P,P=Math.floor((O-N)/2+N)}O=P;var W=Math.max(1,F-P+1),z=l?C:Math.min(F+P,C)+m,$=Array(z+2);$[z+1]=(1<<I)-1;for(var K=z;K>=W;K-=1){var J=K-1,R=n[e.charAt(J)];if(D&&(b[J]=+!!R),$[K]=($[K+1]<<1|1)&R,I&&($[K]|=(x[K+1]|x[K])<<1|1|x[K+1]),$[K]&j&&(L=S(t,{errors:I,currentLocation:J,expectedLocation:F,distance:a,ignoreLocation:y}))<=E){if(E=L,(B=J)<=F)break;W=Math.max(1,2*F-B)}}if(S(t,{errors:I+1,currentLocation:F,expectedLocation:F,distance:a,ignoreLocation:y})>E)break;x=$}var T={isMatch:B>=0,score:Math.max(.001,L)};if(D){var U=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:M.minMatchCharLength,n=[],r=-1,u=-1,i=0,o=e.length;i<o;i+=1){var a=e[i];a&&-1===r?r=i:a||-1===r||((u=i-1)-r+1>=t&&n.push([r,u]),r=-1)}return e[i-1]&&i-r>=t&&n.push([r,i-1]),n}(b,d);U.length?A&&(T.indices=U):T.isMatch=!1}return T}function j(e){for(var t={},n=0,r=e.length;n<r;n+=1){var u=e.charAt(n);t[u]=(t[u]||0)|1<<r-n-1}return t}var I=String.prototype.normalize?function(e){return e.normalize(\"NFD\").replace(/[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C04\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F]/g,\"\")}:function(e){return e},N=function(){function e(t){var n=this,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=u.location,o=void 0===i?M.location:i,a=u.threshold,c=void 0===a?M.threshold:a,s=u.distance,h=void 0===s?M.distance:s,l=u.includeMatches,f=void 0===l?M.includeMatches:l,d=u.findAllMatches,v=void 0===d?M.findAllMatches:d,A=u.minMatchCharLength,g=void 0===A?M.minMatchCharLength:A,y=u.isCaseSensitive,p=void 0===y?M.isCaseSensitive:y,m=u.ignoreDiacritics,C=void 0===m?M.ignoreDiacritics:m,F=u.ignoreLocation,E=void 0===F?M.ignoreLocation:F;if(r(this,e),this.options={location:o,threshold:c,distance:h,includeMatches:f,findAllMatches:v,minMatchCharLength:g,isCaseSensitive:p,ignoreDiacritics:C,ignoreLocation:E},t=p?t:t.toLowerCase(),t=C?I(t):t,this.pattern=t,this.chunks=[],this.pattern.length){var B=function(e,t){n.chunks.push({pattern:e,alphabet:j(e),startIndex:t})},D=this.pattern.length;if(D>_){for(var b=0,k=D%_,w=D-k;b<w;)B(this.pattern.substr(b,_),b),b+=_;if(k){var x=D-_;B(this.pattern.substr(x),x)}}else B(this.pattern,0)}}return i(e,[{key:\"searchIn\",value:function(e){var t=this.options,n=t.isCaseSensitive,r=t.ignoreDiacritics,u=t.includeMatches;if(e=n?e:e.toLowerCase(),e=r?I(e):e,this.pattern===e){var i={isMatch:!0,score:0};return u&&(i.indices=[[0,e.length-1]]),i}var o=this.options,c=o.location,s=o.distance,h=o.threshold,l=o.findAllMatches,f=o.minMatchCharLength,d=o.ignoreLocation,v=[],A=0,g=!1;this.chunks.forEach((function(t){var n=t.pattern,r=t.alphabet,i=t.startIndex,o=O(e,n,r,{location:c+i,distance:s,threshold:h,findAllMatches:l,minMatchCharLength:f,includeMatches:u,ignoreLocation:d}),y=o.isMatch,p=o.score,m=o.indices;y&&(g=!0),A+=p,y&&m&&(v=[].concat(a(v),a(m)))}));var y={isMatch:g,score:g?A/this.chunks.length:1};return g&&u&&(y.indices=v),y}}]),e}(),P=[];function W(e,t){for(var n=0,r=P.length;n<r;n+=1){var u=P[n];if(u.condition(e,t))return new u(e,t)}return new N(e,t)}function z(e,t){var n=e.matches;t.matches=[],g(n)&&n.forEach((function(e){if(g(e.indices)&&e.indices.length){var n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.src),e.idx>-1&&(n.refIndex=e.idx),t.matches.push(n)}}))}function $(e,t){t.score=e.score}var K=function(){function e(n){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;if(r(this,e),this.options=t(t({},M),u),this.options.useExtendedSearch)throw new Error(\"Extended search is not available\");this._keyStore=new E(this.options.keys),this.setCollection(n,i)}return i(e,[{key:\"setCollection\",value:function(e,t){if(this._docs=e,t&&!(t instanceof x))throw new Error(\"Incorrect 'index' type\");this._myIndex=t||L(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}},{key:\"add\",value:function(e){g(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:\"remove\",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},t=[],n=0,r=this._docs.length;n<r;n+=1){var u=this._docs[n];e(u,n)&&(this.removeAt(n),n-=1,r-=1,t.push(u))}return t}},{key:\"removeAt\",value:function(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}},{key:\"getIndex\",value:function(){return this._myIndex}},{key:\"search\",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).limit,n=void 0===t?-1:t,r=this.options,u=r.includeMatches,i=r.includeScore,o=r.shouldSort,a=r.sortFn,c=r.ignoreFieldNorm,s=d(e)?d(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(e,t){var n=t.ignoreFieldNorm,r=void 0===n?M.ignoreFieldNorm:n;e.forEach((function(e){var t=1;e.matches.forEach((function(e){var n=e.key,u=e.norm,i=e.score,o=n?n.weight:null;t*=Math.pow(0===i&&o?Number.EPSILON:i,(o||1)*(r?1:u))})),e.score=t}))}(s,{ignoreFieldNorm:c}),o&&s.sort(a),v(n)&&n>-1&&(s=s.slice(0,n)),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,u=void 0===r?M.includeMatches:r,i=n.includeScore,o=void 0===i?M.includeScore:i,a=[];return u&&a.push(z),o&&a.push($),e.map((function(e){var n=e.idx,r={item:t[n],refIndex:n};return a.length&&a.forEach((function(t){t(e,r)})),r}))}(s,this._docs,{includeMatches:u,includeScore:i})}},{key:\"_searchStringList\",value:function(e){var t=W(e,this.options),n=this._myIndex.records,r=[];return n.forEach((function(e){var n=e.v,u=e.i,i=e.n;if(g(n)){var o=t.searchIn(n),a=o.isMatch,c=o.score,s=o.indices;a&&r.push({item:n,idx:u,matches:[{score:c,value:n,norm:i,indices:s}]})}})),r}},{key:\"_searchLogical\",value:function(e){throw new Error(\"Logical search is not available\")}},{key:\"_searchObjectList\",value:function(e){var t=this,n=W(e,this.options),r=this._myIndex,u=r.keys,i=r.records,o=[];return i.forEach((function(e){var r=e.$,i=e.i;if(g(r)){var c=[];u.forEach((function(e,u){c.push.apply(c,a(t._findMatches({key:e,value:r[u],searcher:n})))})),c.length&&o.push({idx:i,item:r,matches:c})}})),o}},{key:\"_findMatches\",value:function(e){var t=e.key,n=e.value,r=e.searcher;if(!g(n))return[];var u=[];if(h(n))n.forEach((function(e){var n=e.v,i=e.i,o=e.n;if(g(n)){var a=r.searchIn(n),c=a.isMatch,s=a.score,h=a.indices;c&&u.push({score:s,key:t,value:n,idx:i,norm:o,indices:h})}}));else{var i=n.v,o=n.n,a=r.searchIn(i),c=a.isMatch,s=a.score,l=a.indices;c&&u.push({score:s,key:t,value:i,norm:o,indices:l})}return u}}]),e}();K.version=\"7.1.0\",K.createIndex=L,K.parseIndex=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?M.getFn:n,u=t.fieldNormWeight,i=void 0===u?M.fieldNormWeight:u,o=e.keys,a=e.records,c=new x({getFn:r,fieldNormWeight:i});return c.setKeys(o),c.setIndexRecords(a),c},K.config=M;var J=K;module.exports=J;"
  },
  {
    "path": "dist/fuse.basic.min.mjs",
    "content": "/**\n * Fuse.js v7.1.0 - Lightweight fuzzy-search (http://fusejs.io)\n *\n * Copyright (c) 2025 Kiro Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\nfunction t(t){return Array.isArray?Array.isArray(t):\"[object Array]\"===c(t)}const e=1/0;function u(t){return null==t?\"\":function(t){if(\"string\"==typeof t)return t;let u=t+\"\";return\"0\"==u&&1/t==-e?\"-0\":u}(t)}function n(t){return\"string\"==typeof t}function i(t){return\"number\"==typeof t}function s(t){return!0===t||!1===t||function(t){return function(t){return\"object\"==typeof t}(t)&&null!==t}(t)&&\"[object Boolean]\"==c(t)}function r(t){return null!=t}function o(t){return!t.trim().length}function c(t){return null==t?void 0===t?\"[object Undefined]\":\"[object Null]\":Object.prototype.toString.call(t)}const h=t=>`Missing ${t} property in key`,a=t=>`Property 'weight' in key '${t}' must be a positive integer`,l=Object.prototype.hasOwnProperty;class d{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach((t=>{let u=A(t);this._keys.push(u),this._keyMap[u.id]=u,e+=u.weight})),this._keys.forEach((t=>{t.weight/=e}))}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function A(e){let u=null,i=null,s=null,r=1,o=null;if(n(e)||t(e))s=e,u=f(e),i=g(e);else{if(!l.call(e,\"name\"))throw new Error(h(\"name\"));const t=e.name;if(s=t,l.call(e,\"weight\")&&(r=e.weight,r<=0))throw new Error(a(t));u=f(t),i=g(t),o=e.getFn}return{path:u,id:i,weight:r,src:s,getFn:o}}function f(e){return t(e)?e:e.split(\".\")}function g(e){return t(e)?e.join(\".\"):e}var C={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...{useExtendedSearch:!1,getFn:function(e,o){let c=[],h=!1;const a=(e,o,l)=>{if(r(e))if(o[l]){const d=e[o[l]];if(!r(d))return;if(l===o.length-1&&(n(d)||i(d)||s(d)))c.push(u(d));else if(t(d)){h=!0;for(let t=0,e=d.length;t<e;t+=1)a(d[t],o,l+1)}else o.length&&a(d,o,l+1)}else c.push(e)};return a(e,n(o)?o.split(\".\"):o,0),h?c:c[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const F=/[^ ]+/g;class p{constructor({getFn:t=C.getFn,fieldNormWeight:e=C.fieldNormWeight}={}){this.norm=function(t=1,e=3){const u=new Map,n=Math.pow(10,e);return{get(e){const i=e.match(F).length;if(u.has(i))return u.get(i);const s=1/Math.pow(i,.5*t),r=parseFloat(Math.round(s*n)/n);return u.set(i,r),r},clear(){u.clear()}}}(e,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach(((t,e)=>{this._keysMap[t.id]=e}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,n(this.docs[0])?this.docs.forEach(((t,e)=>{this._addString(t,e)})):this.docs.forEach(((t,e)=>{this._addObject(t,e)})),this.norm.clear())}add(t){const e=this.size();n(t)?this._addString(t,e):this._addObject(t,e)}removeAt(t){this.records.splice(t,1);for(let e=t,u=this.size();e<u;e+=1)this.records[e].i-=1}getValueForItemAtKeyId(t,e){return t[this._keysMap[e]]}size(){return this.records.length}_addString(t,e){if(!r(t)||o(t))return;let u={v:t,i:e,n:this.norm.get(t)};this.records.push(u)}_addObject(e,u){let i={i:u,$:{}};this.keys.forEach(((u,s)=>{let c=u.getFn?u.getFn(e):this.getFn(e,u.path);if(r(c))if(t(c)){let e=[];const u=[{nestedArrIndex:-1,value:c}];for(;u.length;){const{nestedArrIndex:i,value:s}=u.pop();if(r(s))if(n(s)&&!o(s)){let t={v:s,i:i,n:this.norm.get(s)};e.push(t)}else t(s)&&s.forEach(((t,e)=>{u.push({nestedArrIndex:e,value:t})}))}i.$[s]=e}else if(n(c)&&!o(c)){let t={v:c,n:this.norm.get(c)};i.$[s]=t}})),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function E(t,e,{getFn:u=C.getFn,fieldNormWeight:n=C.fieldNormWeight}={}){const i=new p({getFn:u,fieldNormWeight:n});return i.setKeys(t.map(A)),i.setSources(e),i.create(),i}function B(t,{errors:e=0,currentLocation:u=0,expectedLocation:n=0,distance:i=C.distance,ignoreLocation:s=C.ignoreLocation}={}){const r=e/t.length;if(s)return r;const o=Math.abs(n-u);return i?r+o/i:o?1:r}const D=32;function m(t,e,u,{location:n=C.location,distance:i=C.distance,threshold:s=C.threshold,findAllMatches:r=C.findAllMatches,minMatchCharLength:o=C.minMatchCharLength,includeMatches:c=C.includeMatches,ignoreLocation:h=C.ignoreLocation}={}){if(e.length>D)throw new Error(`Pattern length exceeds max of ${D}.`);const a=e.length,l=t.length,d=Math.max(0,Math.min(n,l));let A=s,f=d;const g=o>1||c,F=g?Array(l):[];let p;for(;(p=t.indexOf(e,f))>-1;){let t=B(e,{currentLocation:p,expectedLocation:d,distance:i,ignoreLocation:h});if(A=Math.min(t,A),f=p+a,g){let t=0;for(;t<a;)F[p+t]=1,t+=1}}f=-1;let E=[],m=1,y=a+l;const M=1<<a-1;for(let n=0;n<a;n+=1){let s=0,o=y;for(;s<o;){B(e,{errors:n,currentLocation:d+o,expectedLocation:d,distance:i,ignoreLocation:h})<=A?s=o:y=o,o=Math.floor((y-s)/2+s)}y=o;let c=Math.max(1,d-o+1),C=r?l:Math.min(d+o,l)+a,p=Array(C+2);p[C+1]=(1<<n)-1;for(let s=C;s>=c;s-=1){let r=s-1,o=u[t.charAt(r)];if(g&&(F[r]=+!!o),p[s]=(p[s+1]<<1|1)&o,n&&(p[s]|=(E[s+1]|E[s])<<1|1|E[s+1]),p[s]&M&&(m=B(e,{errors:n,currentLocation:r,expectedLocation:d,distance:i,ignoreLocation:h}),m<=A)){if(A=m,f=r,f<=d)break;c=Math.max(1,2*d-f)}}if(B(e,{errors:n+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:h})>A)break;E=p}const x={isMatch:f>=0,score:Math.max(.001,m)};if(g){const t=function(t=[],e=C.minMatchCharLength){let u=[],n=-1,i=-1,s=0;for(let r=t.length;s<r;s+=1){let r=t[s];r&&-1===n?n=s:r||-1===n||(i=s-1,i-n+1>=e&&u.push([n,i]),n=-1)}return t[s-1]&&s-n>=e&&u.push([n,s-1]),u}(F,o);t.length?c&&(x.indices=t):x.isMatch=!1}return x}function y(t){let e={};for(let u=0,n=t.length;u<n;u+=1){const i=t.charAt(u);e[i]=(e[i]||0)|1<<n-u-1}return e}const M=String.prototype.normalize?t=>t.normalize(\"NFD\").replace(/[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C04\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F]/g,\"\"):t=>t;class x{constructor(t,{location:e=C.location,threshold:u=C.threshold,distance:n=C.distance,includeMatches:i=C.includeMatches,findAllMatches:s=C.findAllMatches,minMatchCharLength:r=C.minMatchCharLength,isCaseSensitive:o=C.isCaseSensitive,ignoreDiacritics:c=C.ignoreDiacritics,ignoreLocation:h=C.ignoreLocation}={}){if(this.options={location:e,threshold:u,distance:n,includeMatches:i,findAllMatches:s,minMatchCharLength:r,isCaseSensitive:o,ignoreDiacritics:c,ignoreLocation:h},t=o?t:t.toLowerCase(),t=c?M(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const a=(t,e)=>{this.chunks.push({pattern:t,alphabet:y(t),startIndex:e})},l=this.pattern.length;if(l>D){let t=0;const e=l%D,u=l-e;for(;t<u;)a(this.pattern.substr(t,D),t),t+=D;if(e){const t=l-D;a(this.pattern.substr(t),t)}}else a(this.pattern,0)}searchIn(t){const{isCaseSensitive:e,ignoreDiacritics:u,includeMatches:n}=this.options;if(t=e?t:t.toLowerCase(),t=u?M(t):t,this.pattern===t){let e={isMatch:!0,score:0};return n&&(e.indices=[[0,t.length-1]]),e}const{location:i,distance:s,threshold:r,findAllMatches:o,minMatchCharLength:c,ignoreLocation:h}=this.options;let a=[],l=0,d=!1;this.chunks.forEach((({pattern:e,alphabet:u,startIndex:A})=>{const{isMatch:f,score:g,indices:C}=m(t,e,u,{location:i+A,distance:s,threshold:r,findAllMatches:o,minMatchCharLength:c,includeMatches:n,ignoreLocation:h});f&&(d=!0),l+=g,f&&C&&(a=[...a,...C])}));let A={isMatch:d,score:d?l/this.chunks.length:1};return d&&n&&(A.indices=a),A}}const L=[];function _(t,e){for(let u=0,n=L.length;u<n;u+=1){let n=L[u];if(n.condition(t,e))return new n(t,e)}return new x(t,e)}function k(t,e){const u=t.matches;e.matches=[],r(u)&&u.forEach((t=>{if(!r(t.indices)||!t.indices.length)return;const{indices:u,value:n}=t;let i={indices:u,value:n};t.key&&(i.key=t.key.src),t.idx>-1&&(i.refIndex=t.idx),e.matches.push(i)}))}function v(t,e){e.score=t.score}class w{constructor(t,e={},u){if(this.options={...C,...e},this.options.useExtendedSearch)throw new Error(\"Extended search is not available\");this._keyStore=new d(this.options.keys),this.setCollection(t,u)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof p))throw new Error(\"Incorrect 'index' type\");this._myIndex=e||E(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){r(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=(()=>!1)){const e=[];for(let u=0,n=this._docs.length;u<n;u+=1){const i=this._docs[u];t(i,u)&&(this.removeAt(u),u-=1,n-=1,e.push(i))}return e}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:e=-1}={}){const{includeMatches:u,includeScore:s,shouldSort:r,sortFn:o,ignoreFieldNorm:c}=this.options;let h=n(t)?n(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return function(t,{ignoreFieldNorm:e=C.ignoreFieldNorm}){t.forEach((t=>{let u=1;t.matches.forEach((({key:t,norm:n,score:i})=>{const s=t?t.weight:null;u*=Math.pow(0===i&&s?Number.EPSILON:i,(s||1)*(e?1:n))})),t.score=u}))}(h,{ignoreFieldNorm:c}),r&&h.sort(o),i(e)&&e>-1&&(h=h.slice(0,e)),function(t,e,{includeMatches:u=C.includeMatches,includeScore:n=C.includeScore}={}){const i=[];return u&&i.push(k),n&&i.push(v),t.map((t=>{const{idx:u}=t,n={item:e[u],refIndex:u};return i.length&&i.forEach((e=>{e(t,n)})),n}))}(h,this._docs,{includeMatches:u,includeScore:s})}_searchStringList(t){const e=_(t,this.options),{records:u}=this._myIndex,n=[];return u.forEach((({v:t,i:u,n:i})=>{if(!r(t))return;const{isMatch:s,score:o,indices:c}=e.searchIn(t);s&&n.push({item:t,idx:u,matches:[{score:o,value:t,norm:i,indices:c}]})})),n}_searchLogical(t){throw new Error(\"Logical search is not available\")}_searchObjectList(t){const e=_(t,this.options),{keys:u,records:n}=this._myIndex,i=[];return n.forEach((({$:t,i:n})=>{if(!r(t))return;let s=[];u.forEach(((u,n)=>{s.push(...this._findMatches({key:u,value:t[n],searcher:e}))})),s.length&&i.push({idx:n,item:t,matches:s})})),i}_findMatches({key:e,value:u,searcher:n}){if(!r(u))return[];let i=[];if(t(u))u.forEach((({v:t,i:u,n:s})=>{if(!r(t))return;const{isMatch:o,score:c,indices:h}=n.searchIn(t);o&&i.push({score:c,key:e,value:t,idx:u,norm:s,indices:h})}));else{const{v:t,n:s}=u,{isMatch:r,score:o,indices:c}=n.searchIn(t);r&&i.push({score:o,key:e,value:t,norm:s,indices:c})}return i}}w.version=\"7.1.0\",w.createIndex=E,w.parseIndex=function(t,{getFn:e=C.getFn,fieldNormWeight:u=C.fieldNormWeight}={}){const{keys:n,records:i}=t,s=new p({getFn:e,fieldNormWeight:u});return s.setKeys(n),s.setIndexRecords(i),s},w.config=C;export{w as default};"
  },
  {
    "path": "dist/fuse.basic.mjs",
    "content": "/**\n * Fuse.js v7.1.0 - Lightweight fuzzy-search (http://fusejs.io)\n *\n * Copyright (c) 2025 Kiro Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfunction isArray(value) {\n  return !Array.isArray\n    ? getTag(value) === '[object Array]'\n    : Array.isArray(value)\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/baseToString.js\nconst INFINITY = 1 / 0;\nfunction baseToString(value) {\n  // Exit early for strings to avoid a performance hit in some environments.\n  if (typeof value == 'string') {\n    return value\n  }\n  let result = value + '';\n  return result == '0' && 1 / value == -INFINITY ? '-0' : result\n}\n\nfunction toString(value) {\n  return value == null ? '' : baseToString(value)\n}\n\nfunction isString(value) {\n  return typeof value === 'string'\n}\n\nfunction isNumber(value) {\n  return typeof value === 'number'\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/isBoolean.js\nfunction isBoolean(value) {\n  return (\n    value === true ||\n    value === false ||\n    (isObjectLike(value) && getTag(value) == '[object Boolean]')\n  )\n}\n\nfunction isObject(value) {\n  return typeof value === 'object'\n}\n\n// Checks if `value` is object-like.\nfunction isObjectLike(value) {\n  return isObject(value) && value !== null\n}\n\nfunction isDefined(value) {\n  return value !== undefined && value !== null\n}\n\nfunction isBlank(value) {\n  return !value.trim().length\n}\n\n// Gets the `toStringTag` of `value`.\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/getTag.js\nfunction getTag(value) {\n  return value == null\n    ? value === undefined\n      ? '[object Undefined]'\n      : '[object Null]'\n    : Object.prototype.toString.call(value)\n}\n\nconst EXTENDED_SEARCH_UNAVAILABLE = 'Extended search is not available';\n\nconst LOGICAL_SEARCH_UNAVAILABLE = 'Logical search is not available';\n\nconst INCORRECT_INDEX_TYPE = \"Incorrect 'index' type\";\n\nconst LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = (key) =>\n  `Invalid value for key ${key}`;\n\nconst PATTERN_LENGTH_TOO_LARGE = (max) =>\n  `Pattern length exceeds max of ${max}.`;\n\nconst MISSING_KEY_PROPERTY = (name) => `Missing ${name} property in key`;\n\nconst INVALID_KEY_WEIGHT_VALUE = (key) =>\n  `Property 'weight' in key '${key}' must be a positive integer`;\n\nconst hasOwn = Object.prototype.hasOwnProperty;\n\nclass KeyStore {\n  constructor(keys) {\n    this._keys = [];\n    this._keyMap = {};\n\n    let totalWeight = 0;\n\n    keys.forEach((key) => {\n      let obj = createKey(key);\n\n      this._keys.push(obj);\n      this._keyMap[obj.id] = obj;\n\n      totalWeight += obj.weight;\n    });\n\n    // Normalize weights so that their sum is equal to 1\n    this._keys.forEach((key) => {\n      key.weight /= totalWeight;\n    });\n  }\n  get(keyId) {\n    return this._keyMap[keyId]\n  }\n  keys() {\n    return this._keys\n  }\n  toJSON() {\n    return JSON.stringify(this._keys)\n  }\n}\n\nfunction createKey(key) {\n  let path = null;\n  let id = null;\n  let src = null;\n  let weight = 1;\n  let getFn = null;\n\n  if (isString(key) || isArray(key)) {\n    src = key;\n    path = createKeyPath(key);\n    id = createKeyId(key);\n  } else {\n    if (!hasOwn.call(key, 'name')) {\n      throw new Error(MISSING_KEY_PROPERTY('name'))\n    }\n\n    const name = key.name;\n    src = name;\n\n    if (hasOwn.call(key, 'weight')) {\n      weight = key.weight;\n\n      if (weight <= 0) {\n        throw new Error(INVALID_KEY_WEIGHT_VALUE(name))\n      }\n    }\n\n    path = createKeyPath(name);\n    id = createKeyId(name);\n    getFn = key.getFn;\n  }\n\n  return { path, id, weight, src, getFn }\n}\n\nfunction createKeyPath(key) {\n  return isArray(key) ? key : key.split('.')\n}\n\nfunction createKeyId(key) {\n  return isArray(key) ? key.join('.') : key\n}\n\nfunction get(obj, path) {\n  let list = [];\n  let arr = false;\n\n  const deepGet = (obj, path, index) => {\n    if (!isDefined(obj)) {\n      return\n    }\n    if (!path[index]) {\n      // If there's no path left, we've arrived at the object we care about.\n      list.push(obj);\n    } else {\n      let key = path[index];\n\n      const value = obj[key];\n\n      if (!isDefined(value)) {\n        return\n      }\n\n      // If we're at the last value in the path, and if it's a string/number/bool,\n      // add it to the list\n      if (\n        index === path.length - 1 &&\n        (isString(value) || isNumber(value) || isBoolean(value))\n      ) {\n        list.push(toString(value));\n      } else if (isArray(value)) {\n        arr = true;\n        // Search each item in the array.\n        for (let i = 0, len = value.length; i < len; i += 1) {\n          deepGet(value[i], path, index + 1);\n        }\n      } else if (path.length) {\n        // An object. Recurse further.\n        deepGet(value, path, index + 1);\n      }\n    }\n  };\n\n  // Backwards compatibility (since path used to be a string)\n  deepGet(obj, isString(path) ? path.split('.') : path, 0);\n\n  return arr ? list : list[0]\n}\n\nconst MatchOptions = {\n  // Whether the matches should be included in the result set. When `true`, each record in the result\n  // set will include the indices of the matched characters.\n  // These can consequently be used for highlighting purposes.\n  includeMatches: false,\n  // When `true`, the matching function will continue to the end of a search pattern even if\n  // a perfect match has already been located in the string.\n  findAllMatches: false,\n  // Minimum number of characters that must be matched before a result is considered a match\n  minMatchCharLength: 1\n};\n\nconst BasicOptions = {\n  // When `true`, the algorithm continues searching to the end of the input even if a perfect\n  // match is found before the end of the same input.\n  isCaseSensitive: false,\n  // When `true`, the algorithm will ignore diacritics (accents) in comparisons\n  ignoreDiacritics: false,\n  // When true, the matching function will continue to the end of a search pattern even if\n  includeScore: false,\n  // List of properties that will be searched. This also supports nested properties.\n  keys: [],\n  // Whether to sort the result list, by score\n  shouldSort: true,\n  // Default sort function: sort by ascending score, ascending index\n  sortFn: (a, b) =>\n    a.score === b.score ? (a.idx < b.idx ? -1 : 1) : a.score < b.score ? -1 : 1\n};\n\nconst FuzzyOptions = {\n  // Approximately where in the text is the pattern expected to be found?\n  location: 0,\n  // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match\n  // (of both letters and location), a threshold of '1.0' would match anything.\n  threshold: 0.6,\n  // Determines how close the match must be to the fuzzy location (specified above).\n  // An exact letter match which is 'distance' characters away from the fuzzy location\n  // would score as a complete mismatch. A distance of '0' requires the match be at\n  // the exact location specified, a threshold of '1000' would require a perfect match\n  // to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n  distance: 100\n};\n\nconst AdvancedOptions = {\n  // When `true`, it enables the use of unix-like search commands\n  useExtendedSearch: false,\n  // The get function to use when fetching an object's properties.\n  // The default will search nested paths *ie foo.bar.baz*\n  getFn: get,\n  // When `true`, search will ignore `location` and `distance`, so it won't matter\n  // where in the string the pattern appears.\n  // More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score\n  ignoreLocation: false,\n  // When `true`, the calculation for the relevance score (used for sorting) will\n  // ignore the field-length norm.\n  // More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm\n  ignoreFieldNorm: false,\n  // The weight to determine how much field length norm effects scoring.\n  fieldNormWeight: 1\n};\n\nvar Config = {\n  ...BasicOptions,\n  ...MatchOptions,\n  ...FuzzyOptions,\n  ...AdvancedOptions\n};\n\nconst SPACE = /[^ ]+/g;\n\n// Field-length norm: the shorter the field, the higher the weight.\n// Set to 3 decimals to reduce index size.\nfunction norm(weight = 1, mantissa = 3) {\n  const cache = new Map();\n  const m = Math.pow(10, mantissa);\n\n  return {\n    get(value) {\n      const numTokens = value.match(SPACE).length;\n\n      if (cache.has(numTokens)) {\n        return cache.get(numTokens)\n      }\n\n      // Default function is 1/sqrt(x), weight makes that variable\n      const norm = 1 / Math.pow(numTokens, 0.5 * weight);\n\n      // In place of `toFixed(mantissa)`, for faster computation\n      const n = parseFloat(Math.round(norm * m) / m);\n\n      cache.set(numTokens, n);\n\n      return n\n    },\n    clear() {\n      cache.clear();\n    }\n  }\n}\n\nclass FuseIndex {\n  constructor({\n    getFn = Config.getFn,\n    fieldNormWeight = Config.fieldNormWeight\n  } = {}) {\n    this.norm = norm(fieldNormWeight, 3);\n    this.getFn = getFn;\n    this.isCreated = false;\n\n    this.setIndexRecords();\n  }\n  setSources(docs = []) {\n    this.docs = docs;\n  }\n  setIndexRecords(records = []) {\n    this.records = records;\n  }\n  setKeys(keys = []) {\n    this.keys = keys;\n    this._keysMap = {};\n    keys.forEach((key, idx) => {\n      this._keysMap[key.id] = idx;\n    });\n  }\n  create() {\n    if (this.isCreated || !this.docs.length) {\n      return\n    }\n\n    this.isCreated = true;\n\n    // List is Array<String>\n    if (isString(this.docs[0])) {\n      this.docs.forEach((doc, docIndex) => {\n        this._addString(doc, docIndex);\n      });\n    } else {\n      // List is Array<Object>\n      this.docs.forEach((doc, docIndex) => {\n        this._addObject(doc, docIndex);\n      });\n    }\n\n    this.norm.clear();\n  }\n  // Adds a doc to the end of the index\n  add(doc) {\n    const idx = this.size();\n\n    if (isString(doc)) {\n      this._addString(doc, idx);\n    } else {\n      this._addObject(doc, idx);\n    }\n  }\n  // Removes the doc at the specified index of the index\n  removeAt(idx) {\n    this.records.splice(idx, 1);\n\n    // Change ref index of every subsquent doc\n    for (let i = idx, len = this.size(); i < len; i += 1) {\n      this.records[i].i -= 1;\n    }\n  }\n  getValueForItemAtKeyId(item, keyId) {\n    return item[this._keysMap[keyId]]\n  }\n  size() {\n    return this.records.length\n  }\n  _addString(doc, docIndex) {\n    if (!isDefined(doc) || isBlank(doc)) {\n      return\n    }\n\n    let record = {\n      v: doc,\n      i: docIndex,\n      n: this.norm.get(doc)\n    };\n\n    this.records.push(record);\n  }\n  _addObject(doc, docIndex) {\n    let record = { i: docIndex, $: {} };\n\n    // Iterate over every key (i.e, path), and fetch the value at that key\n    this.keys.forEach((key, keyIndex) => {\n      let value = key.getFn ? key.getFn(doc) : this.getFn(doc, key.path);\n\n      if (!isDefined(value)) {\n        return\n      }\n\n      if (isArray(value)) {\n        let subRecords = [];\n        const stack = [{ nestedArrIndex: -1, value }];\n\n        while (stack.length) {\n          const { nestedArrIndex, value } = stack.pop();\n\n          if (!isDefined(value)) {\n            continue\n          }\n\n          if (isString(value) && !isBlank(value)) {\n            let subRecord = {\n              v: value,\n              i: nestedArrIndex,\n              n: this.norm.get(value)\n            };\n\n            subRecords.push(subRecord);\n          } else if (isArray(value)) {\n            value.forEach((item, k) => {\n              stack.push({\n                nestedArrIndex: k,\n                value: item\n              });\n            });\n          } else ;\n        }\n        record.$[keyIndex] = subRecords;\n      } else if (isString(value) && !isBlank(value)) {\n        let subRecord = {\n          v: value,\n          n: this.norm.get(value)\n        };\n\n        record.$[keyIndex] = subRecord;\n      }\n    });\n\n    this.records.push(record);\n  }\n  toJSON() {\n    return {\n      keys: this.keys,\n      records: this.records\n    }\n  }\n}\n\nfunction createIndex(\n  keys,\n  docs,\n  { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}\n) {\n  const myIndex = new FuseIndex({ getFn, fieldNormWeight });\n  myIndex.setKeys(keys.map(createKey));\n  myIndex.setSources(docs);\n  myIndex.create();\n  return myIndex\n}\n\nfunction parseIndex(\n  data,\n  { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}\n) {\n  const { keys, records } = data;\n  const myIndex = new FuseIndex({ getFn, fieldNormWeight });\n  myIndex.setKeys(keys);\n  myIndex.setIndexRecords(records);\n  return myIndex\n}\n\nfunction computeScore$1(\n  pattern,\n  {\n    errors = 0,\n    currentLocation = 0,\n    expectedLocation = 0,\n    distance = Config.distance,\n    ignoreLocation = Config.ignoreLocation\n  } = {}\n) {\n  const accuracy = errors / pattern.length;\n\n  if (ignoreLocation) {\n    return accuracy\n  }\n\n  const proximity = Math.abs(expectedLocation - currentLocation);\n\n  if (!distance) {\n    // Dodge divide by zero error.\n    return proximity ? 1.0 : accuracy\n  }\n\n  return accuracy + proximity / distance\n}\n\nfunction convertMaskToIndices(\n  matchmask = [],\n  minMatchCharLength = Config.minMatchCharLength\n) {\n  let indices = [];\n  let start = -1;\n  let end = -1;\n  let i = 0;\n\n  for (let len = matchmask.length; i < len; i += 1) {\n    let match = matchmask[i];\n    if (match && start === -1) {\n      start = i;\n    } else if (!match && start !== -1) {\n      end = i - 1;\n      if (end - start + 1 >= minMatchCharLength) {\n        indices.push([start, end]);\n      }\n      start = -1;\n    }\n  }\n\n  // (i-1 - start) + 1 => i - start\n  if (matchmask[i - 1] && i - start >= minMatchCharLength) {\n    indices.push([start, i - 1]);\n  }\n\n  return indices\n}\n\n// Machine word size\nconst MAX_BITS = 32;\n\nfunction search(\n  text,\n  pattern,\n  patternAlphabet,\n  {\n    location = Config.location,\n    distance = Config.distance,\n    threshold = Config.threshold,\n    findAllMatches = Config.findAllMatches,\n    minMatchCharLength = Config.minMatchCharLength,\n    includeMatches = Config.includeMatches,\n    ignoreLocation = Config.ignoreLocation\n  } = {}\n) {\n  if (pattern.length > MAX_BITS) {\n    throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS))\n  }\n\n  const patternLen = pattern.length;\n  // Set starting location at beginning text and initialize the alphabet.\n  const textLen = text.length;\n  // Handle the case when location > text.length\n  const expectedLocation = Math.max(0, Math.min(location, textLen));\n  // Highest score beyond which we give up.\n  let currentThreshold = threshold;\n  // Is there a nearby exact match? (speedup)\n  let bestLocation = expectedLocation;\n\n  // Performance: only computer matches when the minMatchCharLength > 1\n  // OR if `includeMatches` is true.\n  const computeMatches = minMatchCharLength > 1 || includeMatches;\n  // A mask of the matches, used for building the indices\n  const matchMask = computeMatches ? Array(textLen) : [];\n\n  let index;\n\n  // Get all exact matches, here for speed up\n  while ((index = text.indexOf(pattern, bestLocation)) > -1) {\n    let score = computeScore$1(pattern, {\n      currentLocation: index,\n      expectedLocation,\n      distance,\n      ignoreLocation\n    });\n\n    currentThreshold = Math.min(score, currentThreshold);\n    bestLocation = index + patternLen;\n\n    if (computeMatches) {\n      let i = 0;\n      while (i < patternLen) {\n        matchMask[index + i] = 1;\n        i += 1;\n      }\n    }\n  }\n\n  // Reset the best location\n  bestLocation = -1;\n\n  let lastBitArr = [];\n  let finalScore = 1;\n  let binMax = patternLen + textLen;\n\n  const mask = 1 << (patternLen - 1);\n\n  for (let i = 0; i < patternLen; i += 1) {\n    // Scan for the best match; each iteration allows for one more error.\n    // Run a binary search to determine how far from the match location we can stray\n    // at this error level.\n    let binMin = 0;\n    let binMid = binMax;\n\n    while (binMin < binMid) {\n      const score = computeScore$1(pattern, {\n        errors: i,\n        currentLocation: expectedLocation + binMid,\n        expectedLocation,\n        distance,\n        ignoreLocation\n      });\n\n      if (score <= currentThreshold) {\n        binMin = binMid;\n      } else {\n        binMax = binMid;\n      }\n\n      binMid = Math.floor((binMax - binMin) / 2 + binMin);\n    }\n\n    // Use the result from this iteration as the maximum for the next.\n    binMax = binMid;\n\n    let start = Math.max(1, expectedLocation - binMid + 1);\n    let finish = findAllMatches\n      ? textLen\n      : Math.min(expectedLocation + binMid, textLen) + patternLen;\n\n    // Initialize the bit array\n    let bitArr = Array(finish + 2);\n\n    bitArr[finish + 1] = (1 << i) - 1;\n\n    for (let j = finish; j >= start; j -= 1) {\n      let currentLocation = j - 1;\n      let charMatch = patternAlphabet[text.charAt(currentLocation)];\n\n      if (computeMatches) {\n        // Speed up: quick bool to int conversion (i.e, `charMatch ? 1 : 0`)\n        matchMask[currentLocation] = +!!charMatch;\n      }\n\n      // First pass: exact match\n      bitArr[j] = ((bitArr[j + 1] << 1) | 1) & charMatch;\n\n      // Subsequent passes: fuzzy match\n      if (i) {\n        bitArr[j] |=\n          ((lastBitArr[j + 1] | lastBitArr[j]) << 1) | 1 | lastBitArr[j + 1];\n      }\n\n      if (bitArr[j] & mask) {\n        finalScore = computeScore$1(pattern, {\n          errors: i,\n          currentLocation,\n          expectedLocation,\n          distance,\n          ignoreLocation\n        });\n\n        // This match will almost certainly be better than any existing match.\n        // But check anyway.\n        if (finalScore <= currentThreshold) {\n          // Indeed it is\n          currentThreshold = finalScore;\n          bestLocation = currentLocation;\n\n          // Already passed `loc`, downhill from here on in.\n          if (bestLocation <= expectedLocation) {\n            break\n          }\n\n          // When passing `bestLocation`, don't exceed our current distance from `expectedLocation`.\n          start = Math.max(1, 2 * expectedLocation - bestLocation);\n        }\n      }\n    }\n\n    // No hope for a (better) match at greater error levels.\n    const score = computeScore$1(pattern, {\n      errors: i + 1,\n      currentLocation: expectedLocation,\n      expectedLocation,\n      distance,\n      ignoreLocation\n    });\n\n    if (score > currentThreshold) {\n      break\n    }\n\n    lastBitArr = bitArr;\n  }\n\n  const result = {\n    isMatch: bestLocation >= 0,\n    // Count exact matches (those with a score of 0) to be \"almost\" exact\n    score: Math.max(0.001, finalScore)\n  };\n\n  if (computeMatches) {\n    const indices = convertMaskToIndices(matchMask, minMatchCharLength);\n    if (!indices.length) {\n      result.isMatch = false;\n    } else if (includeMatches) {\n      result.indices = indices;\n    }\n  }\n\n  return result\n}\n\nfunction createPatternAlphabet(pattern) {\n  let mask = {};\n\n  for (let i = 0, len = pattern.length; i < len; i += 1) {\n    const char = pattern.charAt(i);\n    mask[char] = (mask[char] || 0) | (1 << (len - i - 1));\n  }\n\n  return mask\n}\n\nconst stripDiacritics = String.prototype.normalize\n    ? ((str) => str.normalize('NFD').replace(/[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C04\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F]/g, ''))\n    : ((str) => str);\n\nclass BitapSearch {\n  constructor(\n    pattern,\n    {\n      location = Config.location,\n      threshold = Config.threshold,\n      distance = Config.distance,\n      includeMatches = Config.includeMatches,\n      findAllMatches = Config.findAllMatches,\n      minMatchCharLength = Config.minMatchCharLength,\n      isCaseSensitive = Config.isCaseSensitive,\n      ignoreDiacritics = Config.ignoreDiacritics,\n      ignoreLocation = Config.ignoreLocation\n    } = {}\n  ) {\n    this.options = {\n      location,\n      threshold,\n      distance,\n      includeMatches,\n      findAllMatches,\n      minMatchCharLength,\n      isCaseSensitive,\n      ignoreDiacritics,\n      ignoreLocation\n    };\n\n    pattern = isCaseSensitive ? pattern : pattern.toLowerCase();\n    pattern = ignoreDiacritics ? stripDiacritics(pattern) : pattern;\n    this.pattern = pattern;\n\n    this.chunks = [];\n\n    if (!this.pattern.length) {\n      return\n    }\n\n    const addChunk = (pattern, startIndex) => {\n      this.chunks.push({\n        pattern,\n        alphabet: createPatternAlphabet(pattern),\n        startIndex\n      });\n    };\n\n    const len = this.pattern.length;\n\n    if (len > MAX_BITS) {\n      let i = 0;\n      const remainder = len % MAX_BITS;\n      const end = len - remainder;\n\n      while (i < end) {\n        addChunk(this.pattern.substr(i, MAX_BITS), i);\n        i += MAX_BITS;\n      }\n\n      if (remainder) {\n        const startIndex = len - MAX_BITS;\n        addChunk(this.pattern.substr(startIndex), startIndex);\n      }\n    } else {\n      addChunk(this.pattern, 0);\n    }\n  }\n\n  searchIn(text) {\n    const { isCaseSensitive, ignoreDiacritics, includeMatches } = this.options;\n\n    text = isCaseSensitive ? text : text.toLowerCase();\n    text = ignoreDiacritics ? stripDiacritics(text) : text;\n\n    // Exact match\n    if (this.pattern === text) {\n      let result = {\n        isMatch: true,\n        score: 0\n      };\n\n      if (includeMatches) {\n        result.indices = [[0, text.length - 1]];\n      }\n\n      return result\n    }\n\n    // Otherwise, use Bitap algorithm\n    const {\n      location,\n      distance,\n      threshold,\n      findAllMatches,\n      minMatchCharLength,\n      ignoreLocation\n    } = this.options;\n\n    let allIndices = [];\n    let totalScore = 0;\n    let hasMatches = false;\n\n    this.chunks.forEach(({ pattern, alphabet, startIndex }) => {\n      const { isMatch, score, indices } = search(text, pattern, alphabet, {\n        location: location + startIndex,\n        distance,\n        threshold,\n        findAllMatches,\n        minMatchCharLength,\n        includeMatches,\n        ignoreLocation\n      });\n\n      if (isMatch) {\n        hasMatches = true;\n      }\n\n      totalScore += score;\n\n      if (isMatch && indices) {\n        allIndices = [...allIndices, ...indices];\n      }\n    });\n\n    let result = {\n      isMatch: hasMatches,\n      score: hasMatches ? totalScore / this.chunks.length : 1\n    };\n\n    if (hasMatches && includeMatches) {\n      result.indices = allIndices;\n    }\n\n    return result\n  }\n}\n\nconst registeredSearchers = [];\n\nfunction createSearcher(pattern, options) {\n  for (let i = 0, len = registeredSearchers.length; i < len; i += 1) {\n    let searcherClass = registeredSearchers[i];\n    if (searcherClass.condition(pattern, options)) {\n      return new searcherClass(pattern, options)\n    }\n  }\n\n  return new BitapSearch(pattern, options)\n}\n\nconst LogicalOperator = {\n  AND: '$and',\n  OR: '$or'\n};\n\nconst KeyType = {\n  PATH: '$path',\n  PATTERN: '$val'\n};\n\nconst isExpression = (query) =>\n  !!(query[LogicalOperator.AND] || query[LogicalOperator.OR]);\n\nconst isPath = (query) => !!query[KeyType.PATH];\n\nconst isLeaf = (query) =>\n  !isArray(query) && isObject(query) && !isExpression(query);\n\nconst convertToExplicit = (query) => ({\n  [LogicalOperator.AND]: Object.keys(query).map((key) => ({\n    [key]: query[key]\n  }))\n});\n\n// When `auto` is `true`, the parse function will infer and initialize and add\n// the appropriate `Searcher` instance\nfunction parse(query, options, { auto = true } = {}) {\n  const next = (query) => {\n    let keys = Object.keys(query);\n\n    const isQueryPath = isPath(query);\n\n    if (!isQueryPath && keys.length > 1 && !isExpression(query)) {\n      return next(convertToExplicit(query))\n    }\n\n    if (isLeaf(query)) {\n      const key = isQueryPath ? query[KeyType.PATH] : keys[0];\n\n      const pattern = isQueryPath ? query[KeyType.PATTERN] : query[key];\n\n      if (!isString(pattern)) {\n        throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key))\n      }\n\n      const obj = {\n        keyId: createKeyId(key),\n        pattern\n      };\n\n      if (auto) {\n        obj.searcher = createSearcher(pattern, options);\n      }\n\n      return obj\n    }\n\n    let node = {\n      children: [],\n      operator: keys[0]\n    };\n\n    keys.forEach((key) => {\n      const value = query[key];\n\n      if (isArray(value)) {\n        value.forEach((item) => {\n          node.children.push(next(item));\n        });\n      }\n    });\n\n    return node\n  };\n\n  if (!isExpression(query)) {\n    query = convertToExplicit(query);\n  }\n\n  return next(query)\n}\n\n// Practical scoring function\nfunction computeScore(\n  results,\n  { ignoreFieldNorm = Config.ignoreFieldNorm }\n) {\n  results.forEach((result) => {\n    let totalScore = 1;\n\n    result.matches.forEach(({ key, norm, score }) => {\n      const weight = key ? key.weight : null;\n\n      totalScore *= Math.pow(\n        score === 0 && weight ? Number.EPSILON : score,\n        (weight || 1) * (ignoreFieldNorm ? 1 : norm)\n      );\n    });\n\n    result.score = totalScore;\n  });\n}\n\nfunction transformMatches(result, data) {\n  const matches = result.matches;\n  data.matches = [];\n\n  if (!isDefined(matches)) {\n    return\n  }\n\n  matches.forEach((match) => {\n    if (!isDefined(match.indices) || !match.indices.length) {\n      return\n    }\n\n    const { indices, value } = match;\n\n    let obj = {\n      indices,\n      value\n    };\n\n    if (match.key) {\n      obj.key = match.key.src;\n    }\n\n    if (match.idx > -1) {\n      obj.refIndex = match.idx;\n    }\n\n    data.matches.push(obj);\n  });\n}\n\nfunction transformScore(result, data) {\n  data.score = result.score;\n}\n\nfunction format(\n  results,\n  docs,\n  {\n    includeMatches = Config.includeMatches,\n    includeScore = Config.includeScore\n  } = {}\n) {\n  const transformers = [];\n\n  if (includeMatches) transformers.push(transformMatches);\n  if (includeScore) transformers.push(transformScore);\n\n  return results.map((result) => {\n    const { idx } = result;\n\n    const data = {\n      item: docs[idx],\n      refIndex: idx\n    };\n\n    if (transformers.length) {\n      transformers.forEach((transformer) => {\n        transformer(result, data);\n      });\n    }\n\n    return data\n  })\n}\n\nclass Fuse {\n  constructor(docs, options = {}, index) {\n    this.options = { ...Config, ...options };\n\n    if (\n      this.options.useExtendedSearch &&\n      !false\n    ) {\n      throw new Error(EXTENDED_SEARCH_UNAVAILABLE)\n    }\n\n    this._keyStore = new KeyStore(this.options.keys);\n\n    this.setCollection(docs, index);\n  }\n\n  setCollection(docs, index) {\n    this._docs = docs;\n\n    if (index && !(index instanceof FuseIndex)) {\n      throw new Error(INCORRECT_INDEX_TYPE)\n    }\n\n    this._myIndex =\n      index ||\n      createIndex(this.options.keys, this._docs, {\n        getFn: this.options.getFn,\n        fieldNormWeight: this.options.fieldNormWeight\n      });\n  }\n\n  add(doc) {\n    if (!isDefined(doc)) {\n      return\n    }\n\n    this._docs.push(doc);\n    this._myIndex.add(doc);\n  }\n\n  remove(predicate = (/* doc, idx */) => false) {\n    const results = [];\n\n    for (let i = 0, len = this._docs.length; i < len; i += 1) {\n      const doc = this._docs[i];\n      if (predicate(doc, i)) {\n        this.removeAt(i);\n        i -= 1;\n        len -= 1;\n\n        results.push(doc);\n      }\n    }\n\n    return results\n  }\n\n  removeAt(idx) {\n    this._docs.splice(idx, 1);\n    this._myIndex.removeAt(idx);\n  }\n\n  getIndex() {\n    return this._myIndex\n  }\n\n  search(query, { limit = -1 } = {}) {\n    const {\n      includeMatches,\n      includeScore,\n      shouldSort,\n      sortFn,\n      ignoreFieldNorm\n    } = this.options;\n\n    let results = isString(query)\n      ? isString(this._docs[0])\n        ? this._searchStringList(query)\n        : this._searchObjectList(query)\n      : this._searchLogical(query);\n\n    computeScore(results, { ignoreFieldNorm });\n\n    if (shouldSort) {\n      results.sort(sortFn);\n    }\n\n    if (isNumber(limit) && limit > -1) {\n      results = results.slice(0, limit);\n    }\n\n    return format(results, this._docs, {\n      includeMatches,\n      includeScore\n    })\n  }\n\n  _searchStringList(query) {\n    const searcher = createSearcher(query, this.options);\n    const { records } = this._myIndex;\n    const results = [];\n\n    // Iterate over every string in the index\n    records.forEach(({ v: text, i: idx, n: norm }) => {\n      if (!isDefined(text)) {\n        return\n      }\n\n      const { isMatch, score, indices } = searcher.searchIn(text);\n\n      if (isMatch) {\n        results.push({\n          item: text,\n          idx,\n          matches: [{ score, value: text, norm, indices }]\n        });\n      }\n    });\n\n    return results\n  }\n\n  _searchLogical(query) {\n    {\n      throw new Error(LOGICAL_SEARCH_UNAVAILABLE)\n    }\n  }\n\n  _searchObjectList(query) {\n    const searcher = createSearcher(query, this.options);\n    const { keys, records } = this._myIndex;\n    const results = [];\n\n    // List is Array<Object>\n    records.forEach(({ $: item, i: idx }) => {\n      if (!isDefined(item)) {\n        return\n      }\n\n      let matches = [];\n\n      // Iterate over every key (i.e, path), and fetch the value at that key\n      keys.forEach((key, keyIndex) => {\n        matches.push(\n          ...this._findMatches({\n            key,\n            value: item[keyIndex],\n            searcher\n          })\n        );\n      });\n\n      if (matches.length) {\n        results.push({\n          idx,\n          item,\n          matches\n        });\n      }\n    });\n\n    return results\n  }\n  _findMatches({ key, value, searcher }) {\n    if (!isDefined(value)) {\n      return []\n    }\n\n    let matches = [];\n\n    if (isArray(value)) {\n      value.forEach(({ v: text, i: idx, n: norm }) => {\n        if (!isDefined(text)) {\n          return\n        }\n\n        const { isMatch, score, indices } = searcher.searchIn(text);\n\n        if (isMatch) {\n          matches.push({\n            score,\n            key,\n            value: text,\n            idx,\n            norm,\n            indices\n          });\n        }\n      });\n    } else {\n      const { v: text, n: norm } = value;\n\n      const { isMatch, score, indices } = searcher.searchIn(text);\n\n      if (isMatch) {\n        matches.push({ score, key, value: text, norm, indices });\n      }\n    }\n\n    return matches\n  }\n}\n\nFuse.version = '7.1.0';\nFuse.createIndex = createIndex;\nFuse.parseIndex = parseIndex;\nFuse.config = Config;\n\n{\n  Fuse.parseQuery = parse;\n}\n\nexport { Fuse as default };\n"
  },
  {
    "path": "dist/fuse.cjs",
    "content": "/**\n * Fuse.js v7.1.0 - Lightweight fuzzy-search (http://fusejs.io)\n *\n * Copyright (c) 2025 Kiro Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\n'use strict';\n\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    enumerableOnly && (symbols = symbols.filter(function (sym) {\n      return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n    })), keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = null != arguments[i] ? arguments[i] : {};\n    i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n      _defineProperty(target, key, source[key]);\n    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n      Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n    });\n  }\n  return target;\n}\nfunction _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n    return typeof obj;\n  } : function (obj) {\n    return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n  }, _typeof(obj);\n}\nfunction _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\nfunction _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, _toPropertyKey(descriptor.key), descriptor);\n  }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  Object.defineProperty(Constructor, \"prototype\", {\n    writable: false\n  });\n  return Constructor;\n}\nfunction _defineProperty(obj, key, value) {\n  key = _toPropertyKey(key);\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  return obj;\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\");\n  }\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      writable: true,\n      configurable: true\n    }\n  });\n  Object.defineProperty(subClass, \"prototype\", {\n    writable: false\n  });\n  if (superClass) _setPrototypeOf(subClass, superClass);\n}\nfunction _getPrototypeOf(o) {\n  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n    return o.__proto__ || Object.getPrototypeOf(o);\n  };\n  return _getPrototypeOf(o);\n}\nfunction _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n  return _setPrototypeOf(o, p);\n}\nfunction _isNativeReflectConstruct() {\n  if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n  if (Reflect.construct.sham) return false;\n  if (typeof Proxy === \"function\") return true;\n  try {\n    Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\nfunction _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n  return self;\n}\nfunction _possibleConstructorReturn(self, call) {\n  if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n    return call;\n  } else if (call !== void 0) {\n    throw new TypeError(\"Derived constructors may only return object or undefined\");\n  }\n  return _assertThisInitialized(self);\n}\nfunction _createSuper(Derived) {\n  var hasNativeReflectConstruct = _isNativeReflectConstruct();\n  return function _createSuperInternal() {\n    var Super = _getPrototypeOf(Derived),\n      result;\n    if (hasNativeReflectConstruct) {\n      var NewTarget = _getPrototypeOf(this).constructor;\n      result = Reflect.construct(Super, arguments, NewTarget);\n    } else {\n      result = Super.apply(this, arguments);\n    }\n    return _possibleConstructorReturn(this, result);\n  };\n}\nfunction _toConsumableArray(arr) {\n  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\nfunction _arrayWithoutHoles(arr) {\n  if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\nfunction _iterableToArray(iter) {\n  if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\nfunction _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n  return arr2;\n}\nfunction _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _toPrimitive(input, hint) {\n  if (typeof input !== \"object\" || input === null) return input;\n  var prim = input[Symbol.toPrimitive];\n  if (prim !== undefined) {\n    var res = prim.call(input, hint || \"default\");\n    if (typeof res !== \"object\") return res;\n    throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n  }\n  return (hint === \"string\" ? String : Number)(input);\n}\nfunction _toPropertyKey(arg) {\n  var key = _toPrimitive(arg, \"string\");\n  return typeof key === \"symbol\" ? key : String(key);\n}\n\nfunction isArray(value) {\n  return !Array.isArray ? getTag(value) === '[object Array]' : Array.isArray(value);\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/baseToString.js\nvar INFINITY = 1 / 0;\nfunction baseToString(value) {\n  // Exit early for strings to avoid a performance hit in some environments.\n  if (typeof value == 'string') {\n    return value;\n  }\n  var result = value + '';\n  return result == '0' && 1 / value == -INFINITY ? '-0' : result;\n}\nfunction toString(value) {\n  return value == null ? '' : baseToString(value);\n}\nfunction isString(value) {\n  return typeof value === 'string';\n}\nfunction isNumber(value) {\n  return typeof value === 'number';\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/isBoolean.js\nfunction isBoolean(value) {\n  return value === true || value === false || isObjectLike(value) && getTag(value) == '[object Boolean]';\n}\nfunction isObject(value) {\n  return _typeof(value) === 'object';\n}\n\n// Checks if `value` is object-like.\nfunction isObjectLike(value) {\n  return isObject(value) && value !== null;\n}\nfunction isDefined(value) {\n  return value !== undefined && value !== null;\n}\nfunction isBlank(value) {\n  return !value.trim().length;\n}\n\n// Gets the `toStringTag` of `value`.\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/getTag.js\nfunction getTag(value) {\n  return value == null ? value === undefined ? '[object Undefined]' : '[object Null]' : Object.prototype.toString.call(value);\n}\n\nvar EXTENDED_SEARCH_UNAVAILABLE = 'Extended search is not available';\nvar INCORRECT_INDEX_TYPE = \"Incorrect 'index' type\";\nvar LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = function LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key) {\n  return \"Invalid value for key \".concat(key);\n};\nvar PATTERN_LENGTH_TOO_LARGE = function PATTERN_LENGTH_TOO_LARGE(max) {\n  return \"Pattern length exceeds max of \".concat(max, \".\");\n};\nvar MISSING_KEY_PROPERTY = function MISSING_KEY_PROPERTY(name) {\n  return \"Missing \".concat(name, \" property in key\");\n};\nvar INVALID_KEY_WEIGHT_VALUE = function INVALID_KEY_WEIGHT_VALUE(key) {\n  return \"Property 'weight' in key '\".concat(key, \"' must be a positive integer\");\n};\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar KeyStore = /*#__PURE__*/function () {\n  function KeyStore(keys) {\n    var _this = this;\n    _classCallCheck(this, KeyStore);\n    this._keys = [];\n    this._keyMap = {};\n    var totalWeight = 0;\n    keys.forEach(function (key) {\n      var obj = createKey(key);\n      _this._keys.push(obj);\n      _this._keyMap[obj.id] = obj;\n      totalWeight += obj.weight;\n    });\n\n    // Normalize weights so that their sum is equal to 1\n    this._keys.forEach(function (key) {\n      key.weight /= totalWeight;\n    });\n  }\n  _createClass(KeyStore, [{\n    key: \"get\",\n    value: function get(keyId) {\n      return this._keyMap[keyId];\n    }\n  }, {\n    key: \"keys\",\n    value: function keys() {\n      return this._keys;\n    }\n  }, {\n    key: \"toJSON\",\n    value: function toJSON() {\n      return JSON.stringify(this._keys);\n    }\n  }]);\n  return KeyStore;\n}();\nfunction createKey(key) {\n  var path = null;\n  var id = null;\n  var src = null;\n  var weight = 1;\n  var getFn = null;\n  if (isString(key) || isArray(key)) {\n    src = key;\n    path = createKeyPath(key);\n    id = createKeyId(key);\n  } else {\n    if (!hasOwn.call(key, 'name')) {\n      throw new Error(MISSING_KEY_PROPERTY('name'));\n    }\n    var name = key.name;\n    src = name;\n    if (hasOwn.call(key, 'weight')) {\n      weight = key.weight;\n      if (weight <= 0) {\n        throw new Error(INVALID_KEY_WEIGHT_VALUE(name));\n      }\n    }\n    path = createKeyPath(name);\n    id = createKeyId(name);\n    getFn = key.getFn;\n  }\n  return {\n    path: path,\n    id: id,\n    weight: weight,\n    src: src,\n    getFn: getFn\n  };\n}\nfunction createKeyPath(key) {\n  return isArray(key) ? key : key.split('.');\n}\nfunction createKeyId(key) {\n  return isArray(key) ? key.join('.') : key;\n}\n\nfunction get(obj, path) {\n  var list = [];\n  var arr = false;\n  var deepGet = function deepGet(obj, path, index) {\n    if (!isDefined(obj)) {\n      return;\n    }\n    if (!path[index]) {\n      // If there's no path left, we've arrived at the object we care about.\n      list.push(obj);\n    } else {\n      var key = path[index];\n      var value = obj[key];\n      if (!isDefined(value)) {\n        return;\n      }\n\n      // If we're at the last value in the path, and if it's a string/number/bool,\n      // add it to the list\n      if (index === path.length - 1 && (isString(value) || isNumber(value) || isBoolean(value))) {\n        list.push(toString(value));\n      } else if (isArray(value)) {\n        arr = true;\n        // Search each item in the array.\n        for (var i = 0, len = value.length; i < len; i += 1) {\n          deepGet(value[i], path, index + 1);\n        }\n      } else if (path.length) {\n        // An object. Recurse further.\n        deepGet(value, path, index + 1);\n      }\n    }\n  };\n\n  // Backwards compatibility (since path used to be a string)\n  deepGet(obj, isString(path) ? path.split('.') : path, 0);\n  return arr ? list : list[0];\n}\n\nvar MatchOptions = {\n  // Whether the matches should be included in the result set. When `true`, each record in the result\n  // set will include the indices of the matched characters.\n  // These can consequently be used for highlighting purposes.\n  includeMatches: false,\n  // When `true`, the matching function will continue to the end of a search pattern even if\n  // a perfect match has already been located in the string.\n  findAllMatches: false,\n  // Minimum number of characters that must be matched before a result is considered a match\n  minMatchCharLength: 1\n};\nvar BasicOptions = {\n  // When `true`, the algorithm continues searching to the end of the input even if a perfect\n  // match is found before the end of the same input.\n  isCaseSensitive: false,\n  // When `true`, the algorithm will ignore diacritics (accents) in comparisons\n  ignoreDiacritics: false,\n  // When true, the matching function will continue to the end of a search pattern even if\n  includeScore: false,\n  // List of properties that will be searched. This also supports nested properties.\n  keys: [],\n  // Whether to sort the result list, by score\n  shouldSort: true,\n  // Default sort function: sort by ascending score, ascending index\n  sortFn: function sortFn(a, b) {\n    return a.score === b.score ? a.idx < b.idx ? -1 : 1 : a.score < b.score ? -1 : 1;\n  }\n};\nvar FuzzyOptions = {\n  // Approximately where in the text is the pattern expected to be found?\n  location: 0,\n  // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match\n  // (of both letters and location), a threshold of '1.0' would match anything.\n  threshold: 0.6,\n  // Determines how close the match must be to the fuzzy location (specified above).\n  // An exact letter match which is 'distance' characters away from the fuzzy location\n  // would score as a complete mismatch. A distance of '0' requires the match be at\n  // the exact location specified, a threshold of '1000' would require a perfect match\n  // to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n  distance: 100\n};\nvar AdvancedOptions = {\n  // When `true`, it enables the use of unix-like search commands\n  useExtendedSearch: false,\n  // The get function to use when fetching an object's properties.\n  // The default will search nested paths *ie foo.bar.baz*\n  getFn: get,\n  // When `true`, search will ignore `location` and `distance`, so it won't matter\n  // where in the string the pattern appears.\n  // More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score\n  ignoreLocation: false,\n  // When `true`, the calculation for the relevance score (used for sorting) will\n  // ignore the field-length norm.\n  // More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm\n  ignoreFieldNorm: false,\n  // The weight to determine how much field length norm effects scoring.\n  fieldNormWeight: 1\n};\nvar Config = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, BasicOptions), MatchOptions), FuzzyOptions), AdvancedOptions);\n\nvar SPACE = /[^ ]+/g;\n\n// Field-length norm: the shorter the field, the higher the weight.\n// Set to 3 decimals to reduce index size.\nfunction norm() {\n  var weight = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n  var mantissa = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;\n  var cache = new Map();\n  var m = Math.pow(10, mantissa);\n  return {\n    get: function get(value) {\n      var numTokens = value.match(SPACE).length;\n      if (cache.has(numTokens)) {\n        return cache.get(numTokens);\n      }\n\n      // Default function is 1/sqrt(x), weight makes that variable\n      var norm = 1 / Math.pow(numTokens, 0.5 * weight);\n\n      // In place of `toFixed(mantissa)`, for faster computation\n      var n = parseFloat(Math.round(norm * m) / m);\n      cache.set(numTokens, n);\n      return n;\n    },\n    clear: function clear() {\n      cache.clear();\n    }\n  };\n}\n\nvar FuseIndex = /*#__PURE__*/function () {\n  function FuseIndex() {\n    var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n      _ref$getFn = _ref.getFn,\n      getFn = _ref$getFn === void 0 ? Config.getFn : _ref$getFn,\n      _ref$fieldNormWeight = _ref.fieldNormWeight,\n      fieldNormWeight = _ref$fieldNormWeight === void 0 ? Config.fieldNormWeight : _ref$fieldNormWeight;\n    _classCallCheck(this, FuseIndex);\n    this.norm = norm(fieldNormWeight, 3);\n    this.getFn = getFn;\n    this.isCreated = false;\n    this.setIndexRecords();\n  }\n  _createClass(FuseIndex, [{\n    key: \"setSources\",\n    value: function setSources() {\n      var docs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n      this.docs = docs;\n    }\n  }, {\n    key: \"setIndexRecords\",\n    value: function setIndexRecords() {\n      var records = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n      this.records = records;\n    }\n  }, {\n    key: \"setKeys\",\n    value: function setKeys() {\n      var _this = this;\n      var keys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n      this.keys = keys;\n      this._keysMap = {};\n      keys.forEach(function (key, idx) {\n        _this._keysMap[key.id] = idx;\n      });\n    }\n  }, {\n    key: \"create\",\n    value: function create() {\n      var _this2 = this;\n      if (this.isCreated || !this.docs.length) {\n        return;\n      }\n      this.isCreated = true;\n\n      // List is Array<String>\n      if (isString(this.docs[0])) {\n        this.docs.forEach(function (doc, docIndex) {\n          _this2._addString(doc, docIndex);\n        });\n      } else {\n        // List is Array<Object>\n        this.docs.forEach(function (doc, docIndex) {\n          _this2._addObject(doc, docIndex);\n        });\n      }\n      this.norm.clear();\n    }\n    // Adds a doc to the end of the index\n  }, {\n    key: \"add\",\n    value: function add(doc) {\n      var idx = this.size();\n      if (isString(doc)) {\n        this._addString(doc, idx);\n      } else {\n        this._addObject(doc, idx);\n      }\n    }\n    // Removes the doc at the specified index of the index\n  }, {\n    key: \"removeAt\",\n    value: function removeAt(idx) {\n      this.records.splice(idx, 1);\n\n      // Change ref index of every subsquent doc\n      for (var i = idx, len = this.size(); i < len; i += 1) {\n        this.records[i].i -= 1;\n      }\n    }\n  }, {\n    key: \"getValueForItemAtKeyId\",\n    value: function getValueForItemAtKeyId(item, keyId) {\n      return item[this._keysMap[keyId]];\n    }\n  }, {\n    key: \"size\",\n    value: function size() {\n      return this.records.length;\n    }\n  }, {\n    key: \"_addString\",\n    value: function _addString(doc, docIndex) {\n      if (!isDefined(doc) || isBlank(doc)) {\n        return;\n      }\n      var record = {\n        v: doc,\n        i: docIndex,\n        n: this.norm.get(doc)\n      };\n      this.records.push(record);\n    }\n  }, {\n    key: \"_addObject\",\n    value: function _addObject(doc, docIndex) {\n      var _this3 = this;\n      var record = {\n        i: docIndex,\n        $: {}\n      };\n\n      // Iterate over every key (i.e, path), and fetch the value at that key\n      this.keys.forEach(function (key, keyIndex) {\n        var value = key.getFn ? key.getFn(doc) : _this3.getFn(doc, key.path);\n        if (!isDefined(value)) {\n          return;\n        }\n        if (isArray(value)) {\n          var subRecords = [];\n          var stack = [{\n            nestedArrIndex: -1,\n            value: value\n          }];\n          while (stack.length) {\n            var _stack$pop = stack.pop(),\n              nestedArrIndex = _stack$pop.nestedArrIndex,\n              _value = _stack$pop.value;\n            if (!isDefined(_value)) {\n              continue;\n            }\n            if (isString(_value) && !isBlank(_value)) {\n              var subRecord = {\n                v: _value,\n                i: nestedArrIndex,\n                n: _this3.norm.get(_value)\n              };\n              subRecords.push(subRecord);\n            } else if (isArray(_value)) {\n              _value.forEach(function (item, k) {\n                stack.push({\n                  nestedArrIndex: k,\n                  value: item\n                });\n              });\n            } else ;\n          }\n          record.$[keyIndex] = subRecords;\n        } else if (isString(value) && !isBlank(value)) {\n          var _subRecord = {\n            v: value,\n            n: _this3.norm.get(value)\n          };\n          record.$[keyIndex] = _subRecord;\n        }\n      });\n      this.records.push(record);\n    }\n  }, {\n    key: \"toJSON\",\n    value: function toJSON() {\n      return {\n        keys: this.keys,\n        records: this.records\n      };\n    }\n  }]);\n  return FuseIndex;\n}();\nfunction createIndex(keys, docs) {\n  var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n    _ref2$getFn = _ref2.getFn,\n    getFn = _ref2$getFn === void 0 ? Config.getFn : _ref2$getFn,\n    _ref2$fieldNormWeight = _ref2.fieldNormWeight,\n    fieldNormWeight = _ref2$fieldNormWeight === void 0 ? Config.fieldNormWeight : _ref2$fieldNormWeight;\n  var myIndex = new FuseIndex({\n    getFn: getFn,\n    fieldNormWeight: fieldNormWeight\n  });\n  myIndex.setKeys(keys.map(createKey));\n  myIndex.setSources(docs);\n  myIndex.create();\n  return myIndex;\n}\nfunction parseIndex(data) {\n  var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n    _ref3$getFn = _ref3.getFn,\n    getFn = _ref3$getFn === void 0 ? Config.getFn : _ref3$getFn,\n    _ref3$fieldNormWeight = _ref3.fieldNormWeight,\n    fieldNormWeight = _ref3$fieldNormWeight === void 0 ? Config.fieldNormWeight : _ref3$fieldNormWeight;\n  var keys = data.keys,\n    records = data.records;\n  var myIndex = new FuseIndex({\n    getFn: getFn,\n    fieldNormWeight: fieldNormWeight\n  });\n  myIndex.setKeys(keys);\n  myIndex.setIndexRecords(records);\n  return myIndex;\n}\n\nfunction computeScore$1(pattern) {\n  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n    _ref$errors = _ref.errors,\n    errors = _ref$errors === void 0 ? 0 : _ref$errors,\n    _ref$currentLocation = _ref.currentLocation,\n    currentLocation = _ref$currentLocation === void 0 ? 0 : _ref$currentLocation,\n    _ref$expectedLocation = _ref.expectedLocation,\n    expectedLocation = _ref$expectedLocation === void 0 ? 0 : _ref$expectedLocation,\n    _ref$distance = _ref.distance,\n    distance = _ref$distance === void 0 ? Config.distance : _ref$distance,\n    _ref$ignoreLocation = _ref.ignoreLocation,\n    ignoreLocation = _ref$ignoreLocation === void 0 ? Config.ignoreLocation : _ref$ignoreLocation;\n  var accuracy = errors / pattern.length;\n  if (ignoreLocation) {\n    return accuracy;\n  }\n  var proximity = Math.abs(expectedLocation - currentLocation);\n  if (!distance) {\n    // Dodge divide by zero error.\n    return proximity ? 1.0 : accuracy;\n  }\n  return accuracy + proximity / distance;\n}\n\nfunction convertMaskToIndices() {\n  var matchmask = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n  var minMatchCharLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Config.minMatchCharLength;\n  var indices = [];\n  var start = -1;\n  var end = -1;\n  var i = 0;\n  for (var len = matchmask.length; i < len; i += 1) {\n    var match = matchmask[i];\n    if (match && start === -1) {\n      start = i;\n    } else if (!match && start !== -1) {\n      end = i - 1;\n      if (end - start + 1 >= minMatchCharLength) {\n        indices.push([start, end]);\n      }\n      start = -1;\n    }\n  }\n\n  // (i-1 - start) + 1 => i - start\n  if (matchmask[i - 1] && i - start >= minMatchCharLength) {\n    indices.push([start, i - 1]);\n  }\n  return indices;\n}\n\n// Machine word size\nvar MAX_BITS = 32;\n\nfunction search(text, pattern, patternAlphabet) {\n  var _ref = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n    _ref$location = _ref.location,\n    location = _ref$location === void 0 ? Config.location : _ref$location,\n    _ref$distance = _ref.distance,\n    distance = _ref$distance === void 0 ? Config.distance : _ref$distance,\n    _ref$threshold = _ref.threshold,\n    threshold = _ref$threshold === void 0 ? Config.threshold : _ref$threshold,\n    _ref$findAllMatches = _ref.findAllMatches,\n    findAllMatches = _ref$findAllMatches === void 0 ? Config.findAllMatches : _ref$findAllMatches,\n    _ref$minMatchCharLeng = _ref.minMatchCharLength,\n    minMatchCharLength = _ref$minMatchCharLeng === void 0 ? Config.minMatchCharLength : _ref$minMatchCharLeng,\n    _ref$includeMatches = _ref.includeMatches,\n    includeMatches = _ref$includeMatches === void 0 ? Config.includeMatches : _ref$includeMatches,\n    _ref$ignoreLocation = _ref.ignoreLocation,\n    ignoreLocation = _ref$ignoreLocation === void 0 ? Config.ignoreLocation : _ref$ignoreLocation;\n  if (pattern.length > MAX_BITS) {\n    throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS));\n  }\n  var patternLen = pattern.length;\n  // Set starting location at beginning text and initialize the alphabet.\n  var textLen = text.length;\n  // Handle the case when location > text.length\n  var expectedLocation = Math.max(0, Math.min(location, textLen));\n  // Highest score beyond which we give up.\n  var currentThreshold = threshold;\n  // Is there a nearby exact match? (speedup)\n  var bestLocation = expectedLocation;\n\n  // Performance: only computer matches when the minMatchCharLength > 1\n  // OR if `includeMatches` is true.\n  var computeMatches = minMatchCharLength > 1 || includeMatches;\n  // A mask of the matches, used for building the indices\n  var matchMask = computeMatches ? Array(textLen) : [];\n  var index;\n\n  // Get all exact matches, here for speed up\n  while ((index = text.indexOf(pattern, bestLocation)) > -1) {\n    var score = computeScore$1(pattern, {\n      currentLocation: index,\n      expectedLocation: expectedLocation,\n      distance: distance,\n      ignoreLocation: ignoreLocation\n    });\n    currentThreshold = Math.min(score, currentThreshold);\n    bestLocation = index + patternLen;\n    if (computeMatches) {\n      var i = 0;\n      while (i < patternLen) {\n        matchMask[index + i] = 1;\n        i += 1;\n      }\n    }\n  }\n\n  // Reset the best location\n  bestLocation = -1;\n  var lastBitArr = [];\n  var finalScore = 1;\n  var binMax = patternLen + textLen;\n  var mask = 1 << patternLen - 1;\n  for (var _i = 0; _i < patternLen; _i += 1) {\n    // Scan for the best match; each iteration allows for one more error.\n    // Run a binary search to determine how far from the match location we can stray\n    // at this error level.\n    var binMin = 0;\n    var binMid = binMax;\n    while (binMin < binMid) {\n      var _score = computeScore$1(pattern, {\n        errors: _i,\n        currentLocation: expectedLocation + binMid,\n        expectedLocation: expectedLocation,\n        distance: distance,\n        ignoreLocation: ignoreLocation\n      });\n      if (_score <= currentThreshold) {\n        binMin = binMid;\n      } else {\n        binMax = binMid;\n      }\n      binMid = Math.floor((binMax - binMin) / 2 + binMin);\n    }\n\n    // Use the result from this iteration as the maximum for the next.\n    binMax = binMid;\n    var start = Math.max(1, expectedLocation - binMid + 1);\n    var finish = findAllMatches ? textLen : Math.min(expectedLocation + binMid, textLen) + patternLen;\n\n    // Initialize the bit array\n    var bitArr = Array(finish + 2);\n    bitArr[finish + 1] = (1 << _i) - 1;\n    for (var j = finish; j >= start; j -= 1) {\n      var currentLocation = j - 1;\n      var charMatch = patternAlphabet[text.charAt(currentLocation)];\n      if (computeMatches) {\n        // Speed up: quick bool to int conversion (i.e, `charMatch ? 1 : 0`)\n        matchMask[currentLocation] = +!!charMatch;\n      }\n\n      // First pass: exact match\n      bitArr[j] = (bitArr[j + 1] << 1 | 1) & charMatch;\n\n      // Subsequent passes: fuzzy match\n      if (_i) {\n        bitArr[j] |= (lastBitArr[j + 1] | lastBitArr[j]) << 1 | 1 | lastBitArr[j + 1];\n      }\n      if (bitArr[j] & mask) {\n        finalScore = computeScore$1(pattern, {\n          errors: _i,\n          currentLocation: currentLocation,\n          expectedLocation: expectedLocation,\n          distance: distance,\n          ignoreLocation: ignoreLocation\n        });\n\n        // This match will almost certainly be better than any existing match.\n        // But check anyway.\n        if (finalScore <= currentThreshold) {\n          // Indeed it is\n          currentThreshold = finalScore;\n          bestLocation = currentLocation;\n\n          // Already passed `loc`, downhill from here on in.\n          if (bestLocation <= expectedLocation) {\n            break;\n          }\n\n          // When passing `bestLocation`, don't exceed our current distance from `expectedLocation`.\n          start = Math.max(1, 2 * expectedLocation - bestLocation);\n        }\n      }\n    }\n\n    // No hope for a (better) match at greater error levels.\n    var _score2 = computeScore$1(pattern, {\n      errors: _i + 1,\n      currentLocation: expectedLocation,\n      expectedLocation: expectedLocation,\n      distance: distance,\n      ignoreLocation: ignoreLocation\n    });\n    if (_score2 > currentThreshold) {\n      break;\n    }\n    lastBitArr = bitArr;\n  }\n  var result = {\n    isMatch: bestLocation >= 0,\n    // Count exact matches (those with a score of 0) to be \"almost\" exact\n    score: Math.max(0.001, finalScore)\n  };\n  if (computeMatches) {\n    var indices = convertMaskToIndices(matchMask, minMatchCharLength);\n    if (!indices.length) {\n      result.isMatch = false;\n    } else if (includeMatches) {\n      result.indices = indices;\n    }\n  }\n  return result;\n}\n\nfunction createPatternAlphabet(pattern) {\n  var mask = {};\n  for (var i = 0, len = pattern.length; i < len; i += 1) {\n    var _char = pattern.charAt(i);\n    mask[_char] = (mask[_char] || 0) | 1 << len - i - 1;\n  }\n  return mask;\n}\n\nvar stripDiacritics = String.prototype.normalize ? function (str) {\n  return str.normalize('NFD').replace(/[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C04\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F]/g, '');\n} : function (str) {\n  return str;\n};\n\nvar BitapSearch = /*#__PURE__*/function () {\n  function BitapSearch(pattern) {\n    var _this = this;\n    var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n      _ref$location = _ref.location,\n      location = _ref$location === void 0 ? Config.location : _ref$location,\n      _ref$threshold = _ref.threshold,\n      threshold = _ref$threshold === void 0 ? Config.threshold : _ref$threshold,\n      _ref$distance = _ref.distance,\n      distance = _ref$distance === void 0 ? Config.distance : _ref$distance,\n      _ref$includeMatches = _ref.includeMatches,\n      includeMatches = _ref$includeMatches === void 0 ? Config.includeMatches : _ref$includeMatches,\n      _ref$findAllMatches = _ref.findAllMatches,\n      findAllMatches = _ref$findAllMatches === void 0 ? Config.findAllMatches : _ref$findAllMatches,\n      _ref$minMatchCharLeng = _ref.minMatchCharLength,\n      minMatchCharLength = _ref$minMatchCharLeng === void 0 ? Config.minMatchCharLength : _ref$minMatchCharLeng,\n      _ref$isCaseSensitive = _ref.isCaseSensitive,\n      isCaseSensitive = _ref$isCaseSensitive === void 0 ? Config.isCaseSensitive : _ref$isCaseSensitive,\n      _ref$ignoreDiacritics = _ref.ignoreDiacritics,\n      ignoreDiacritics = _ref$ignoreDiacritics === void 0 ? Config.ignoreDiacritics : _ref$ignoreDiacritics,\n      _ref$ignoreLocation = _ref.ignoreLocation,\n      ignoreLocation = _ref$ignoreLocation === void 0 ? Config.ignoreLocation : _ref$ignoreLocation;\n    _classCallCheck(this, BitapSearch);\n    this.options = {\n      location: location,\n      threshold: threshold,\n      distance: distance,\n      includeMatches: includeMatches,\n      findAllMatches: findAllMatches,\n      minMatchCharLength: minMatchCharLength,\n      isCaseSensitive: isCaseSensitive,\n      ignoreDiacritics: ignoreDiacritics,\n      ignoreLocation: ignoreLocation\n    };\n    pattern = isCaseSensitive ? pattern : pattern.toLowerCase();\n    pattern = ignoreDiacritics ? stripDiacritics(pattern) : pattern;\n    this.pattern = pattern;\n    this.chunks = [];\n    if (!this.pattern.length) {\n      return;\n    }\n    var addChunk = function addChunk(pattern, startIndex) {\n      _this.chunks.push({\n        pattern: pattern,\n        alphabet: createPatternAlphabet(pattern),\n        startIndex: startIndex\n      });\n    };\n    var len = this.pattern.length;\n    if (len > MAX_BITS) {\n      var i = 0;\n      var remainder = len % MAX_BITS;\n      var end = len - remainder;\n      while (i < end) {\n        addChunk(this.pattern.substr(i, MAX_BITS), i);\n        i += MAX_BITS;\n      }\n      if (remainder) {\n        var startIndex = len - MAX_BITS;\n        addChunk(this.pattern.substr(startIndex), startIndex);\n      }\n    } else {\n      addChunk(this.pattern, 0);\n    }\n  }\n  _createClass(BitapSearch, [{\n    key: \"searchIn\",\n    value: function searchIn(text) {\n      var _this$options = this.options,\n        isCaseSensitive = _this$options.isCaseSensitive,\n        ignoreDiacritics = _this$options.ignoreDiacritics,\n        includeMatches = _this$options.includeMatches;\n      text = isCaseSensitive ? text : text.toLowerCase();\n      text = ignoreDiacritics ? stripDiacritics(text) : text;\n\n      // Exact match\n      if (this.pattern === text) {\n        var _result = {\n          isMatch: true,\n          score: 0\n        };\n        if (includeMatches) {\n          _result.indices = [[0, text.length - 1]];\n        }\n        return _result;\n      }\n\n      // Otherwise, use Bitap algorithm\n      var _this$options2 = this.options,\n        location = _this$options2.location,\n        distance = _this$options2.distance,\n        threshold = _this$options2.threshold,\n        findAllMatches = _this$options2.findAllMatches,\n        minMatchCharLength = _this$options2.minMatchCharLength,\n        ignoreLocation = _this$options2.ignoreLocation;\n      var allIndices = [];\n      var totalScore = 0;\n      var hasMatches = false;\n      this.chunks.forEach(function (_ref2) {\n        var pattern = _ref2.pattern,\n          alphabet = _ref2.alphabet,\n          startIndex = _ref2.startIndex;\n        var _search = search(text, pattern, alphabet, {\n            location: location + startIndex,\n            distance: distance,\n            threshold: threshold,\n            findAllMatches: findAllMatches,\n            minMatchCharLength: minMatchCharLength,\n            includeMatches: includeMatches,\n            ignoreLocation: ignoreLocation\n          }),\n          isMatch = _search.isMatch,\n          score = _search.score,\n          indices = _search.indices;\n        if (isMatch) {\n          hasMatches = true;\n        }\n        totalScore += score;\n        if (isMatch && indices) {\n          allIndices = [].concat(_toConsumableArray(allIndices), _toConsumableArray(indices));\n        }\n      });\n      var result = {\n        isMatch: hasMatches,\n        score: hasMatches ? totalScore / this.chunks.length : 1\n      };\n      if (hasMatches && includeMatches) {\n        result.indices = allIndices;\n      }\n      return result;\n    }\n  }]);\n  return BitapSearch;\n}();\n\nvar BaseMatch = /*#__PURE__*/function () {\n  function BaseMatch(pattern) {\n    _classCallCheck(this, BaseMatch);\n    this.pattern = pattern;\n  }\n  _createClass(BaseMatch, [{\n    key: \"search\",\n    value: function search( /*text*/) {}\n  }], [{\n    key: \"isMultiMatch\",\n    value: function isMultiMatch(pattern) {\n      return getMatch(pattern, this.multiRegex);\n    }\n  }, {\n    key: \"isSingleMatch\",\n    value: function isSingleMatch(pattern) {\n      return getMatch(pattern, this.singleRegex);\n    }\n  }]);\n  return BaseMatch;\n}();\nfunction getMatch(pattern, exp) {\n  var matches = pattern.match(exp);\n  return matches ? matches[1] : null;\n}\n\nvar ExactMatch = /*#__PURE__*/function (_BaseMatch) {\n  _inherits(ExactMatch, _BaseMatch);\n  var _super = _createSuper(ExactMatch);\n  function ExactMatch(pattern) {\n    _classCallCheck(this, ExactMatch);\n    return _super.call(this, pattern);\n  }\n  _createClass(ExactMatch, [{\n    key: \"search\",\n    value: function search(text) {\n      var isMatch = text === this.pattern;\n      return {\n        isMatch: isMatch,\n        score: isMatch ? 0 : 1,\n        indices: [0, this.pattern.length - 1]\n      };\n    }\n  }], [{\n    key: \"type\",\n    get: function get() {\n      return 'exact';\n    }\n  }, {\n    key: \"multiRegex\",\n    get: function get() {\n      return /^=\"(.*)\"$/;\n    }\n  }, {\n    key: \"singleRegex\",\n    get: function get() {\n      return /^=(.*)$/;\n    }\n  }]);\n  return ExactMatch;\n}(BaseMatch);\n\nvar InverseExactMatch = /*#__PURE__*/function (_BaseMatch) {\n  _inherits(InverseExactMatch, _BaseMatch);\n  var _super = _createSuper(InverseExactMatch);\n  function InverseExactMatch(pattern) {\n    _classCallCheck(this, InverseExactMatch);\n    return _super.call(this, pattern);\n  }\n  _createClass(InverseExactMatch, [{\n    key: \"search\",\n    value: function search(text) {\n      var index = text.indexOf(this.pattern);\n      var isMatch = index === -1;\n      return {\n        isMatch: isMatch,\n        score: isMatch ? 0 : 1,\n        indices: [0, text.length - 1]\n      };\n    }\n  }], [{\n    key: \"type\",\n    get: function get() {\n      return 'inverse-exact';\n    }\n  }, {\n    key: \"multiRegex\",\n    get: function get() {\n      return /^!\"(.*)\"$/;\n    }\n  }, {\n    key: \"singleRegex\",\n    get: function get() {\n      return /^!(.*)$/;\n    }\n  }]);\n  return InverseExactMatch;\n}(BaseMatch);\n\nvar PrefixExactMatch = /*#__PURE__*/function (_BaseMatch) {\n  _inherits(PrefixExactMatch, _BaseMatch);\n  var _super = _createSuper(PrefixExactMatch);\n  function PrefixExactMatch(pattern) {\n    _classCallCheck(this, PrefixExactMatch);\n    return _super.call(this, pattern);\n  }\n  _createClass(PrefixExactMatch, [{\n    key: \"search\",\n    value: function search(text) {\n      var isMatch = text.startsWith(this.pattern);\n      return {\n        isMatch: isMatch,\n        score: isMatch ? 0 : 1,\n        indices: [0, this.pattern.length - 1]\n      };\n    }\n  }], [{\n    key: \"type\",\n    get: function get() {\n      return 'prefix-exact';\n    }\n  }, {\n    key: \"multiRegex\",\n    get: function get() {\n      return /^\\^\"(.*)\"$/;\n    }\n  }, {\n    key: \"singleRegex\",\n    get: function get() {\n      return /^\\^(.*)$/;\n    }\n  }]);\n  return PrefixExactMatch;\n}(BaseMatch);\n\nvar InversePrefixExactMatch = /*#__PURE__*/function (_BaseMatch) {\n  _inherits(InversePrefixExactMatch, _BaseMatch);\n  var _super = _createSuper(InversePrefixExactMatch);\n  function InversePrefixExactMatch(pattern) {\n    _classCallCheck(this, InversePrefixExactMatch);\n    return _super.call(this, pattern);\n  }\n  _createClass(InversePrefixExactMatch, [{\n    key: \"search\",\n    value: function search(text) {\n      var isMatch = !text.startsWith(this.pattern);\n      return {\n        isMatch: isMatch,\n        score: isMatch ? 0 : 1,\n        indices: [0, text.length - 1]\n      };\n    }\n  }], [{\n    key: \"type\",\n    get: function get() {\n      return 'inverse-prefix-exact';\n    }\n  }, {\n    key: \"multiRegex\",\n    get: function get() {\n      return /^!\\^\"(.*)\"$/;\n    }\n  }, {\n    key: \"singleRegex\",\n    get: function get() {\n      return /^!\\^(.*)$/;\n    }\n  }]);\n  return InversePrefixExactMatch;\n}(BaseMatch);\n\nvar SuffixExactMatch = /*#__PURE__*/function (_BaseMatch) {\n  _inherits(SuffixExactMatch, _BaseMatch);\n  var _super = _createSuper(SuffixExactMatch);\n  function SuffixExactMatch(pattern) {\n    _classCallCheck(this, SuffixExactMatch);\n    return _super.call(this, pattern);\n  }\n  _createClass(SuffixExactMatch, [{\n    key: \"search\",\n    value: function search(text) {\n      var isMatch = text.endsWith(this.pattern);\n      return {\n        isMatch: isMatch,\n        score: isMatch ? 0 : 1,\n        indices: [text.length - this.pattern.length, text.length - 1]\n      };\n    }\n  }], [{\n    key: \"type\",\n    get: function get() {\n      return 'suffix-exact';\n    }\n  }, {\n    key: \"multiRegex\",\n    get: function get() {\n      return /^\"(.*)\"\\$$/;\n    }\n  }, {\n    key: \"singleRegex\",\n    get: function get() {\n      return /^(.*)\\$$/;\n    }\n  }]);\n  return SuffixExactMatch;\n}(BaseMatch);\n\nvar InverseSuffixExactMatch = /*#__PURE__*/function (_BaseMatch) {\n  _inherits(InverseSuffixExactMatch, _BaseMatch);\n  var _super = _createSuper(InverseSuffixExactMatch);\n  function InverseSuffixExactMatch(pattern) {\n    _classCallCheck(this, InverseSuffixExactMatch);\n    return _super.call(this, pattern);\n  }\n  _createClass(InverseSuffixExactMatch, [{\n    key: \"search\",\n    value: function search(text) {\n      var isMatch = !text.endsWith(this.pattern);\n      return {\n        isMatch: isMatch,\n        score: isMatch ? 0 : 1,\n        indices: [0, text.length - 1]\n      };\n    }\n  }], [{\n    key: \"type\",\n    get: function get() {\n      return 'inverse-suffix-exact';\n    }\n  }, {\n    key: \"multiRegex\",\n    get: function get() {\n      return /^!\"(.*)\"\\$$/;\n    }\n  }, {\n    key: \"singleRegex\",\n    get: function get() {\n      return /^!(.*)\\$$/;\n    }\n  }]);\n  return InverseSuffixExactMatch;\n}(BaseMatch);\n\nvar FuzzyMatch = /*#__PURE__*/function (_BaseMatch) {\n  _inherits(FuzzyMatch, _BaseMatch);\n  var _super = _createSuper(FuzzyMatch);\n  function FuzzyMatch(pattern) {\n    var _this;\n    var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n      _ref$location = _ref.location,\n      location = _ref$location === void 0 ? Config.location : _ref$location,\n      _ref$threshold = _ref.threshold,\n      threshold = _ref$threshold === void 0 ? Config.threshold : _ref$threshold,\n      _ref$distance = _ref.distance,\n      distance = _ref$distance === void 0 ? Config.distance : _ref$distance,\n      _ref$includeMatches = _ref.includeMatches,\n      includeMatches = _ref$includeMatches === void 0 ? Config.includeMatches : _ref$includeMatches,\n      _ref$findAllMatches = _ref.findAllMatches,\n      findAllMatches = _ref$findAllMatches === void 0 ? Config.findAllMatches : _ref$findAllMatches,\n      _ref$minMatchCharLeng = _ref.minMatchCharLength,\n      minMatchCharLength = _ref$minMatchCharLeng === void 0 ? Config.minMatchCharLength : _ref$minMatchCharLeng,\n      _ref$isCaseSensitive = _ref.isCaseSensitive,\n      isCaseSensitive = _ref$isCaseSensitive === void 0 ? Config.isCaseSensitive : _ref$isCaseSensitive,\n      _ref$ignoreDiacritics = _ref.ignoreDiacritics,\n      ignoreDiacritics = _ref$ignoreDiacritics === void 0 ? Config.ignoreDiacritics : _ref$ignoreDiacritics,\n      _ref$ignoreLocation = _ref.ignoreLocation,\n      ignoreLocation = _ref$ignoreLocation === void 0 ? Config.ignoreLocation : _ref$ignoreLocation;\n    _classCallCheck(this, FuzzyMatch);\n    _this = _super.call(this, pattern);\n    _this._bitapSearch = new BitapSearch(pattern, {\n      location: location,\n      threshold: threshold,\n      distance: distance,\n      includeMatches: includeMatches,\n      findAllMatches: findAllMatches,\n      minMatchCharLength: minMatchCharLength,\n      isCaseSensitive: isCaseSensitive,\n      ignoreDiacritics: ignoreDiacritics,\n      ignoreLocation: ignoreLocation\n    });\n    return _this;\n  }\n  _createClass(FuzzyMatch, [{\n    key: \"search\",\n    value: function search(text) {\n      return this._bitapSearch.searchIn(text);\n    }\n  }], [{\n    key: \"type\",\n    get: function get() {\n      return 'fuzzy';\n    }\n  }, {\n    key: \"multiRegex\",\n    get: function get() {\n      return /^\"(.*)\"$/;\n    }\n  }, {\n    key: \"singleRegex\",\n    get: function get() {\n      return /^(.*)$/;\n    }\n  }]);\n  return FuzzyMatch;\n}(BaseMatch);\n\nvar IncludeMatch = /*#__PURE__*/function (_BaseMatch) {\n  _inherits(IncludeMatch, _BaseMatch);\n  var _super = _createSuper(IncludeMatch);\n  function IncludeMatch(pattern) {\n    _classCallCheck(this, IncludeMatch);\n    return _super.call(this, pattern);\n  }\n  _createClass(IncludeMatch, [{\n    key: \"search\",\n    value: function search(text) {\n      var location = 0;\n      var index;\n      var indices = [];\n      var patternLen = this.pattern.length;\n\n      // Get all exact matches\n      while ((index = text.indexOf(this.pattern, location)) > -1) {\n        location = index + patternLen;\n        indices.push([index, location - 1]);\n      }\n      var isMatch = !!indices.length;\n      return {\n        isMatch: isMatch,\n        score: isMatch ? 0 : 1,\n        indices: indices\n      };\n    }\n  }], [{\n    key: \"type\",\n    get: function get() {\n      return 'include';\n    }\n  }, {\n    key: \"multiRegex\",\n    get: function get() {\n      return /^'\"(.*)\"$/;\n    }\n  }, {\n    key: \"singleRegex\",\n    get: function get() {\n      return /^'(.*)$/;\n    }\n  }]);\n  return IncludeMatch;\n}(BaseMatch);\n\n// ❗Order is important. DO NOT CHANGE.\nvar searchers = [ExactMatch, IncludeMatch, PrefixExactMatch, InversePrefixExactMatch, InverseSuffixExactMatch, SuffixExactMatch, InverseExactMatch, FuzzyMatch];\nvar searchersLen = searchers.length;\n\n// Regex to split by spaces, but keep anything in quotes together\nvar SPACE_RE = / +(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)/;\nvar OR_TOKEN = '|';\n\n// Return a 2D array representation of the query, for simpler parsing.\n// Example:\n// \"^core go$ | rb$ | py$ xy$\" => [[\"^core\", \"go$\"], [\"rb$\"], [\"py$\", \"xy$\"]]\nfunction parseQuery(pattern) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return pattern.split(OR_TOKEN).map(function (item) {\n    var query = item.trim().split(SPACE_RE).filter(function (item) {\n      return item && !!item.trim();\n    });\n    var results = [];\n    for (var i = 0, len = query.length; i < len; i += 1) {\n      var queryItem = query[i];\n\n      // 1. Handle multiple query match (i.e, once that are quoted, like `\"hello world\"`)\n      var found = false;\n      var idx = -1;\n      while (!found && ++idx < searchersLen) {\n        var searcher = searchers[idx];\n        var token = searcher.isMultiMatch(queryItem);\n        if (token) {\n          results.push(new searcher(token, options));\n          found = true;\n        }\n      }\n      if (found) {\n        continue;\n      }\n\n      // 2. Handle single query matches (i.e, once that are *not* quoted)\n      idx = -1;\n      while (++idx < searchersLen) {\n        var _searcher = searchers[idx];\n        var _token = _searcher.isSingleMatch(queryItem);\n        if (_token) {\n          results.push(new _searcher(_token, options));\n          break;\n        }\n      }\n    }\n    return results;\n  });\n}\n\n// These extended matchers can return an array of matches, as opposed\n// to a singl match\nvar MultiMatchSet = new Set([FuzzyMatch.type, IncludeMatch.type]);\n\n/**\n * Command-like searching\n * ======================\n *\n * Given multiple search terms delimited by spaces.e.g. `^jscript .python$ ruby !java`,\n * search in a given text.\n *\n * Search syntax:\n *\n * | Token       | Match type                 | Description                            |\n * | ----------- | -------------------------- | -------------------------------------- |\n * | `jscript`   | fuzzy-match                | Items that fuzzy match `jscript`       |\n * | `=scheme`   | exact-match                | Items that are `scheme`                |\n * | `'python`   | include-match              | Items that include `python`            |\n * | `!ruby`     | inverse-exact-match        | Items that do not include `ruby`       |\n * | `^java`     | prefix-exact-match         | Items that start with `java`           |\n * | `!^earlang` | inverse-prefix-exact-match | Items that do not start with `earlang` |\n * | `.js$`      | suffix-exact-match         | Items that end with `.js`              |\n * | `!.go$`     | inverse-suffix-exact-match | Items that do not end with `.go`       |\n *\n * A single pipe character acts as an OR operator. For example, the following\n * query matches entries that start with `core` and end with either`go`, `rb`,\n * or`py`.\n *\n * ```\n * ^core go$ | rb$ | py$\n * ```\n */\nvar ExtendedSearch = /*#__PURE__*/function () {\n  function ExtendedSearch(pattern) {\n    var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n      _ref$isCaseSensitive = _ref.isCaseSensitive,\n      isCaseSensitive = _ref$isCaseSensitive === void 0 ? Config.isCaseSensitive : _ref$isCaseSensitive,\n      _ref$ignoreDiacritics = _ref.ignoreDiacritics,\n      ignoreDiacritics = _ref$ignoreDiacritics === void 0 ? Config.ignoreDiacritics : _ref$ignoreDiacritics,\n      _ref$includeMatches = _ref.includeMatches,\n      includeMatches = _ref$includeMatches === void 0 ? Config.includeMatches : _ref$includeMatches,\n      _ref$minMatchCharLeng = _ref.minMatchCharLength,\n      minMatchCharLength = _ref$minMatchCharLeng === void 0 ? Config.minMatchCharLength : _ref$minMatchCharLeng,\n      _ref$ignoreLocation = _ref.ignoreLocation,\n      ignoreLocation = _ref$ignoreLocation === void 0 ? Config.ignoreLocation : _ref$ignoreLocation,\n      _ref$findAllMatches = _ref.findAllMatches,\n      findAllMatches = _ref$findAllMatches === void 0 ? Config.findAllMatches : _ref$findAllMatches,\n      _ref$location = _ref.location,\n      location = _ref$location === void 0 ? Config.location : _ref$location,\n      _ref$threshold = _ref.threshold,\n      threshold = _ref$threshold === void 0 ? Config.threshold : _ref$threshold,\n      _ref$distance = _ref.distance,\n      distance = _ref$distance === void 0 ? Config.distance : _ref$distance;\n    _classCallCheck(this, ExtendedSearch);\n    this.query = null;\n    this.options = {\n      isCaseSensitive: isCaseSensitive,\n      ignoreDiacritics: ignoreDiacritics,\n      includeMatches: includeMatches,\n      minMatchCharLength: minMatchCharLength,\n      findAllMatches: findAllMatches,\n      ignoreLocation: ignoreLocation,\n      location: location,\n      threshold: threshold,\n      distance: distance\n    };\n    pattern = isCaseSensitive ? pattern : pattern.toLowerCase();\n    pattern = ignoreDiacritics ? stripDiacritics(pattern) : pattern;\n    this.pattern = pattern;\n    this.query = parseQuery(this.pattern, this.options);\n  }\n  _createClass(ExtendedSearch, [{\n    key: \"searchIn\",\n    value: function searchIn(text) {\n      var query = this.query;\n      if (!query) {\n        return {\n          isMatch: false,\n          score: 1\n        };\n      }\n      var _this$options = this.options,\n        includeMatches = _this$options.includeMatches,\n        isCaseSensitive = _this$options.isCaseSensitive,\n        ignoreDiacritics = _this$options.ignoreDiacritics;\n      text = isCaseSensitive ? text : text.toLowerCase();\n      text = ignoreDiacritics ? stripDiacritics(text) : text;\n      var numMatches = 0;\n      var allIndices = [];\n      var totalScore = 0;\n\n      // ORs\n      for (var i = 0, qLen = query.length; i < qLen; i += 1) {\n        var searchers = query[i];\n\n        // Reset indices\n        allIndices.length = 0;\n        numMatches = 0;\n\n        // ANDs\n        for (var j = 0, pLen = searchers.length; j < pLen; j += 1) {\n          var searcher = searchers[j];\n          var _searcher$search = searcher.search(text),\n            isMatch = _searcher$search.isMatch,\n            indices = _searcher$search.indices,\n            score = _searcher$search.score;\n          if (isMatch) {\n            numMatches += 1;\n            totalScore += score;\n            if (includeMatches) {\n              var type = searcher.constructor.type;\n              if (MultiMatchSet.has(type)) {\n                allIndices = [].concat(_toConsumableArray(allIndices), _toConsumableArray(indices));\n              } else {\n                allIndices.push(indices);\n              }\n            }\n          } else {\n            totalScore = 0;\n            numMatches = 0;\n            allIndices.length = 0;\n            break;\n          }\n        }\n\n        // OR condition, so if TRUE, return\n        if (numMatches) {\n          var result = {\n            isMatch: true,\n            score: totalScore / numMatches\n          };\n          if (includeMatches) {\n            result.indices = allIndices;\n          }\n          return result;\n        }\n      }\n\n      // Nothing was matched\n      return {\n        isMatch: false,\n        score: 1\n      };\n    }\n  }], [{\n    key: \"condition\",\n    value: function condition(_, options) {\n      return options.useExtendedSearch;\n    }\n  }]);\n  return ExtendedSearch;\n}();\n\nvar registeredSearchers = [];\nfunction register() {\n  registeredSearchers.push.apply(registeredSearchers, arguments);\n}\nfunction createSearcher(pattern, options) {\n  for (var i = 0, len = registeredSearchers.length; i < len; i += 1) {\n    var searcherClass = registeredSearchers[i];\n    if (searcherClass.condition(pattern, options)) {\n      return new searcherClass(pattern, options);\n    }\n  }\n  return new BitapSearch(pattern, options);\n}\n\nvar LogicalOperator = {\n  AND: '$and',\n  OR: '$or'\n};\nvar KeyType = {\n  PATH: '$path',\n  PATTERN: '$val'\n};\nvar isExpression = function isExpression(query) {\n  return !!(query[LogicalOperator.AND] || query[LogicalOperator.OR]);\n};\nvar isPath = function isPath(query) {\n  return !!query[KeyType.PATH];\n};\nvar isLeaf = function isLeaf(query) {\n  return !isArray(query) && isObject(query) && !isExpression(query);\n};\nvar convertToExplicit = function convertToExplicit(query) {\n  return _defineProperty({}, LogicalOperator.AND, Object.keys(query).map(function (key) {\n    return _defineProperty({}, key, query[key]);\n  }));\n};\n\n// When `auto` is `true`, the parse function will infer and initialize and add\n// the appropriate `Searcher` instance\nfunction parse(query, options) {\n  var _ref3 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n    _ref3$auto = _ref3.auto,\n    auto = _ref3$auto === void 0 ? true : _ref3$auto;\n  var next = function next(query) {\n    var keys = Object.keys(query);\n    var isQueryPath = isPath(query);\n    if (!isQueryPath && keys.length > 1 && !isExpression(query)) {\n      return next(convertToExplicit(query));\n    }\n    if (isLeaf(query)) {\n      var key = isQueryPath ? query[KeyType.PATH] : keys[0];\n      var pattern = isQueryPath ? query[KeyType.PATTERN] : query[key];\n      if (!isString(pattern)) {\n        throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key));\n      }\n      var obj = {\n        keyId: createKeyId(key),\n        pattern: pattern\n      };\n      if (auto) {\n        obj.searcher = createSearcher(pattern, options);\n      }\n      return obj;\n    }\n    var node = {\n      children: [],\n      operator: keys[0]\n    };\n    keys.forEach(function (key) {\n      var value = query[key];\n      if (isArray(value)) {\n        value.forEach(function (item) {\n          node.children.push(next(item));\n        });\n      }\n    });\n    return node;\n  };\n  if (!isExpression(query)) {\n    query = convertToExplicit(query);\n  }\n  return next(query);\n}\n\n// Practical scoring function\nfunction computeScore(results, _ref) {\n  var _ref$ignoreFieldNorm = _ref.ignoreFieldNorm,\n    ignoreFieldNorm = _ref$ignoreFieldNorm === void 0 ? Config.ignoreFieldNorm : _ref$ignoreFieldNorm;\n  results.forEach(function (result) {\n    var totalScore = 1;\n    result.matches.forEach(function (_ref2) {\n      var key = _ref2.key,\n        norm = _ref2.norm,\n        score = _ref2.score;\n      var weight = key ? key.weight : null;\n      totalScore *= Math.pow(score === 0 && weight ? Number.EPSILON : score, (weight || 1) * (ignoreFieldNorm ? 1 : norm));\n    });\n    result.score = totalScore;\n  });\n}\n\nfunction transformMatches(result, data) {\n  var matches = result.matches;\n  data.matches = [];\n  if (!isDefined(matches)) {\n    return;\n  }\n  matches.forEach(function (match) {\n    if (!isDefined(match.indices) || !match.indices.length) {\n      return;\n    }\n    var indices = match.indices,\n      value = match.value;\n    var obj = {\n      indices: indices,\n      value: value\n    };\n    if (match.key) {\n      obj.key = match.key.src;\n    }\n    if (match.idx > -1) {\n      obj.refIndex = match.idx;\n    }\n    data.matches.push(obj);\n  });\n}\n\nfunction transformScore(result, data) {\n  data.score = result.score;\n}\n\nfunction format(results, docs) {\n  var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n    _ref$includeMatches = _ref.includeMatches,\n    includeMatches = _ref$includeMatches === void 0 ? Config.includeMatches : _ref$includeMatches,\n    _ref$includeScore = _ref.includeScore,\n    includeScore = _ref$includeScore === void 0 ? Config.includeScore : _ref$includeScore;\n  var transformers = [];\n  if (includeMatches) transformers.push(transformMatches);\n  if (includeScore) transformers.push(transformScore);\n  return results.map(function (result) {\n    var idx = result.idx;\n    var data = {\n      item: docs[idx],\n      refIndex: idx\n    };\n    if (transformers.length) {\n      transformers.forEach(function (transformer) {\n        transformer(result, data);\n      });\n    }\n    return data;\n  });\n}\n\nvar Fuse$1 = /*#__PURE__*/function () {\n  function Fuse(docs) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var index = arguments.length > 2 ? arguments[2] : undefined;\n    _classCallCheck(this, Fuse);\n    this.options = _objectSpread2(_objectSpread2({}, Config), options);\n    if (this.options.useExtendedSearch && !true) {\n      throw new Error(EXTENDED_SEARCH_UNAVAILABLE);\n    }\n    this._keyStore = new KeyStore(this.options.keys);\n    this.setCollection(docs, index);\n  }\n  _createClass(Fuse, [{\n    key: \"setCollection\",\n    value: function setCollection(docs, index) {\n      this._docs = docs;\n      if (index && !(index instanceof FuseIndex)) {\n        throw new Error(INCORRECT_INDEX_TYPE);\n      }\n      this._myIndex = index || createIndex(this.options.keys, this._docs, {\n        getFn: this.options.getFn,\n        fieldNormWeight: this.options.fieldNormWeight\n      });\n    }\n  }, {\n    key: \"add\",\n    value: function add(doc) {\n      if (!isDefined(doc)) {\n        return;\n      }\n      this._docs.push(doc);\n      this._myIndex.add(doc);\n    }\n  }, {\n    key: \"remove\",\n    value: function remove() {\n      var predicate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function /* doc, idx */ () {\n        return false;\n      };\n      var results = [];\n      for (var i = 0, len = this._docs.length; i < len; i += 1) {\n        var doc = this._docs[i];\n        if (predicate(doc, i)) {\n          this.removeAt(i);\n          i -= 1;\n          len -= 1;\n          results.push(doc);\n        }\n      }\n      return results;\n    }\n  }, {\n    key: \"removeAt\",\n    value: function removeAt(idx) {\n      this._docs.splice(idx, 1);\n      this._myIndex.removeAt(idx);\n    }\n  }, {\n    key: \"getIndex\",\n    value: function getIndex() {\n      return this._myIndex;\n    }\n  }, {\n    key: \"search\",\n    value: function search(query) {\n      var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n        _ref$limit = _ref.limit,\n        limit = _ref$limit === void 0 ? -1 : _ref$limit;\n      var _this$options = this.options,\n        includeMatches = _this$options.includeMatches,\n        includeScore = _this$options.includeScore,\n        shouldSort = _this$options.shouldSort,\n        sortFn = _this$options.sortFn,\n        ignoreFieldNorm = _this$options.ignoreFieldNorm;\n      var results = isString(query) ? isString(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query);\n      computeScore(results, {\n        ignoreFieldNorm: ignoreFieldNorm\n      });\n      if (shouldSort) {\n        results.sort(sortFn);\n      }\n      if (isNumber(limit) && limit > -1) {\n        results = results.slice(0, limit);\n      }\n      return format(results, this._docs, {\n        includeMatches: includeMatches,\n        includeScore: includeScore\n      });\n    }\n  }, {\n    key: \"_searchStringList\",\n    value: function _searchStringList(query) {\n      var searcher = createSearcher(query, this.options);\n      var records = this._myIndex.records;\n      var results = [];\n\n      // Iterate over every string in the index\n      records.forEach(function (_ref2) {\n        var text = _ref2.v,\n          idx = _ref2.i,\n          norm = _ref2.n;\n        if (!isDefined(text)) {\n          return;\n        }\n        var _searcher$searchIn = searcher.searchIn(text),\n          isMatch = _searcher$searchIn.isMatch,\n          score = _searcher$searchIn.score,\n          indices = _searcher$searchIn.indices;\n        if (isMatch) {\n          results.push({\n            item: text,\n            idx: idx,\n            matches: [{\n              score: score,\n              value: text,\n              norm: norm,\n              indices: indices\n            }]\n          });\n        }\n      });\n      return results;\n    }\n  }, {\n    key: \"_searchLogical\",\n    value: function _searchLogical(query) {\n      var _this = this;\n      var expression = parse(query, this.options);\n      var evaluate = function evaluate(node, item, idx) {\n        if (!node.children) {\n          var keyId = node.keyId,\n            searcher = node.searcher;\n          var matches = _this._findMatches({\n            key: _this._keyStore.get(keyId),\n            value: _this._myIndex.getValueForItemAtKeyId(item, keyId),\n            searcher: searcher\n          });\n          if (matches && matches.length) {\n            return [{\n              idx: idx,\n              item: item,\n              matches: matches\n            }];\n          }\n          return [];\n        }\n        var res = [];\n        for (var i = 0, len = node.children.length; i < len; i += 1) {\n          var child = node.children[i];\n          var result = evaluate(child, item, idx);\n          if (result.length) {\n            res.push.apply(res, _toConsumableArray(result));\n          } else if (node.operator === LogicalOperator.AND) {\n            return [];\n          }\n        }\n        return res;\n      };\n      var records = this._myIndex.records;\n      var resultMap = {};\n      var results = [];\n      records.forEach(function (_ref3) {\n        var item = _ref3.$,\n          idx = _ref3.i;\n        if (isDefined(item)) {\n          var expResults = evaluate(expression, item, idx);\n          if (expResults.length) {\n            // Dedupe when adding\n            if (!resultMap[idx]) {\n              resultMap[idx] = {\n                idx: idx,\n                item: item,\n                matches: []\n              };\n              results.push(resultMap[idx]);\n            }\n            expResults.forEach(function (_ref4) {\n              var _resultMap$idx$matche;\n              var matches = _ref4.matches;\n              (_resultMap$idx$matche = resultMap[idx].matches).push.apply(_resultMap$idx$matche, _toConsumableArray(matches));\n            });\n          }\n        }\n      });\n      return results;\n    }\n  }, {\n    key: \"_searchObjectList\",\n    value: function _searchObjectList(query) {\n      var _this2 = this;\n      var searcher = createSearcher(query, this.options);\n      var _this$_myIndex = this._myIndex,\n        keys = _this$_myIndex.keys,\n        records = _this$_myIndex.records;\n      var results = [];\n\n      // List is Array<Object>\n      records.forEach(function (_ref5) {\n        var item = _ref5.$,\n          idx = _ref5.i;\n        if (!isDefined(item)) {\n          return;\n        }\n        var matches = [];\n\n        // Iterate over every key (i.e, path), and fetch the value at that key\n        keys.forEach(function (key, keyIndex) {\n          matches.push.apply(matches, _toConsumableArray(_this2._findMatches({\n            key: key,\n            value: item[keyIndex],\n            searcher: searcher\n          })));\n        });\n        if (matches.length) {\n          results.push({\n            idx: idx,\n            item: item,\n            matches: matches\n          });\n        }\n      });\n      return results;\n    }\n  }, {\n    key: \"_findMatches\",\n    value: function _findMatches(_ref6) {\n      var key = _ref6.key,\n        value = _ref6.value,\n        searcher = _ref6.searcher;\n      if (!isDefined(value)) {\n        return [];\n      }\n      var matches = [];\n      if (isArray(value)) {\n        value.forEach(function (_ref7) {\n          var text = _ref7.v,\n            idx = _ref7.i,\n            norm = _ref7.n;\n          if (!isDefined(text)) {\n            return;\n          }\n          var _searcher$searchIn2 = searcher.searchIn(text),\n            isMatch = _searcher$searchIn2.isMatch,\n            score = _searcher$searchIn2.score,\n            indices = _searcher$searchIn2.indices;\n          if (isMatch) {\n            matches.push({\n              score: score,\n              key: key,\n              value: text,\n              idx: idx,\n              norm: norm,\n              indices: indices\n            });\n          }\n        });\n      } else {\n        var text = value.v,\n          norm = value.n;\n        var _searcher$searchIn3 = searcher.searchIn(text),\n          isMatch = _searcher$searchIn3.isMatch,\n          score = _searcher$searchIn3.score,\n          indices = _searcher$searchIn3.indices;\n        if (isMatch) {\n          matches.push({\n            score: score,\n            key: key,\n            value: text,\n            norm: norm,\n            indices: indices\n          });\n        }\n      }\n      return matches;\n    }\n  }]);\n  return Fuse;\n}();\n\nFuse$1.version = '7.1.0';\nFuse$1.createIndex = createIndex;\nFuse$1.parseIndex = parseIndex;\nFuse$1.config = Config;\n{\n  Fuse$1.parseQuery = parse;\n}\n{\n  register(ExtendedSearch);\n}\nvar Fuse = Fuse$1;\n\nmodule.exports = Fuse;\n"
  },
  {
    "path": "dist/fuse.min.cjs",
    "content": "/**\n * Fuse.js v7.1.0 - Lightweight fuzzy-search (http://fusejs.io)\n *\n * Copyright (c) 2025 Kiro Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\"use strict\";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e){return n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},n(e)}function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,v(r.key),r)}}function u(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,\"prototype\",{writable:!1}),e}function o(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function\");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,\"prototype\",{writable:!1}),t&&s(e,t)}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function h(e,t){if(t&&(\"object\"==typeof t||\"function\"==typeof t))return t;if(void 0!==t)throw new TypeError(\"Derived constructors may only return object or undefined\");return function(e){if(void 0===e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e}(e)}function l(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=a(e);if(t){var i=a(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function f(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if(\"undefined\"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e[\"@@iterator\"])return Array.from(e)}(e)||function(e,t){if(!e)return;if(\"string\"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);\"Object\"===n&&e.constructor&&(n=e.constructor.name);if(\"Map\"===n||\"Set\"===n)return Array.from(e);if(\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e){var t=function(e,t){if(\"object\"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||\"default\");if(\"object\"!=typeof r)return r;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===t?String:Number)(e)}(e,\"string\");return\"symbol\"==typeof t?t:String(t)}function g(e){return Array.isArray?Array.isArray(e):\"[object Array]\"===F(e)}var y=1/0;function p(e){return null==e?\"\":function(e){if(\"string\"==typeof e)return e;var t=e+\"\";return\"0\"==t&&1/e==-y?\"-0\":t}(e)}function A(e){return\"string\"==typeof e}function m(e){return\"number\"==typeof e}function C(e){return!0===e||!1===e||function(e){return k(e)&&null!==e}(e)&&\"[object Boolean]\"==F(e)}function k(e){return\"object\"===n(e)}function E(e){return null!=e}function M(e){return!e.trim().length}function F(e){return null==e?void 0===e?\"[object Undefined]\":\"[object Null]\":Object.prototype.toString.call(e)}var D=function(e){return\"Missing \".concat(e,\" property in key\")},b=function(e){return\"Property 'weight' in key '\".concat(e,\"' must be a positive integer\")},B=Object.prototype.hasOwnProperty,x=function(){function e(t){var n=this;r(this,e),this._keys=[],this._keyMap={};var i=0;t.forEach((function(e){var t=w(e);n._keys.push(t),n._keyMap[t.id]=t,i+=t.weight})),this._keys.forEach((function(e){e.weight/=i}))}return u(e,[{key:\"get\",value:function(e){return this._keyMap[e]}},{key:\"keys\",value:function(){return this._keys}},{key:\"toJSON\",value:function(){return JSON.stringify(this._keys)}}]),e}();function w(e){var t=null,n=null,r=null,i=1,u=null;if(A(e)||g(e))r=e,t=S(e),n=L(e);else{if(!B.call(e,\"name\"))throw new Error(D(\"name\"));var o=e.name;if(r=o,B.call(e,\"weight\")&&(i=e.weight)<=0)throw new Error(b(o));t=S(o),n=L(o),u=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:u}}function S(e){return g(e)?e:e.split(\".\")}function L(e){return g(e)?e.join(\".\"):e}var _={useExtendedSearch:!1,getFn:function(e,t){var n=[],r=!1;return function e(t,i,u){if(E(t))if(i[u]){var o=t[i[u]];if(!E(o))return;if(u===i.length-1&&(A(o)||m(o)||C(o)))n.push(p(o));else if(g(o)){r=!0;for(var c=0,a=o.length;c<a;c+=1)e(o[c],i,u+1)}else i.length&&e(o,i,u+1)}else n.push(t)}(e,A(t)?t.split(\".\"):t,0),r?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},O=t(t(t(t({},{isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(e,t){return e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1}}),{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1}),{location:0,threshold:.6,distance:100}),_),j=/[^ ]+/g;var I=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.getFn,i=void 0===n?O.getFn:n,u=t.fieldNormWeight,o=void 0===u?O.fieldNormWeight:u;r(this,e),this.norm=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=new Map,r=Math.pow(10,t);return{get:function(t){var i=t.match(j).length;if(n.has(i))return n.get(i);var u=1/Math.pow(i,.5*e),o=parseFloat(Math.round(u*r)/r);return n.set(i,o),o},clear:function(){n.clear()}}}(o,3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return u(e,[{key:\"setSources\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:\"setIndexRecords\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:\"setKeys\",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=t,this._keysMap={},t.forEach((function(t,n){e._keysMap[t.id]=n}))}},{key:\"create\",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,A(this.docs[0])?this.docs.forEach((function(t,n){e._addString(t,n)})):this.docs.forEach((function(t,n){e._addObject(t,n)})),this.norm.clear())}},{key:\"add\",value:function(e){var t=this.size();A(e)?this._addString(e,t):this._addObject(e,t)}},{key:\"removeAt\",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}},{key:\"getValueForItemAtKeyId\",value:function(e,t){return e[this._keysMap[t]]}},{key:\"size\",value:function(){return this.records.length}},{key:\"_addString\",value:function(e,t){if(E(e)&&!M(e)){var n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}}},{key:\"_addObject\",value:function(e,t){var n=this,r={i:t,$:{}};this.keys.forEach((function(t,i){var u=t.getFn?t.getFn(e):n.getFn(e,t.path);if(E(u))if(g(u)){for(var o=[],c=[{nestedArrIndex:-1,value:u}];c.length;){var a=c.pop(),s=a.nestedArrIndex,h=a.value;if(E(h))if(A(h)&&!M(h)){var l={v:h,i:s,n:n.norm.get(h)};o.push(l)}else g(h)&&h.forEach((function(e,t){c.push({nestedArrIndex:t,value:e})}))}r.$[i]=o}else if(A(u)&&!M(u)){var f={v:u,n:n.norm.get(u)};r.$[i]=f}})),this.records.push(r)}},{key:\"toJSON\",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?O.getFn:r,u=n.fieldNormWeight,o=void 0===u?O.fieldNormWeight:u,c=new I({getFn:i,fieldNormWeight:o});return c.setKeys(e.map(w)),c.setSources(t),c.create(),c}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,i=t.currentLocation,u=void 0===i?0:i,o=t.expectedLocation,c=void 0===o?0:o,a=t.distance,s=void 0===a?O.distance:a,h=t.ignoreLocation,l=void 0===h?O.ignoreLocation:h,f=r/e.length;if(l)return f;var d=Math.abs(c-u);return s?f+d/s:d?1:f}var N=32;function P(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,u=void 0===i?O.location:i,o=r.distance,c=void 0===o?O.distance:o,a=r.threshold,s=void 0===a?O.threshold:a,h=r.findAllMatches,l=void 0===h?O.findAllMatches:h,f=r.minMatchCharLength,d=void 0===f?O.minMatchCharLength:f,v=r.includeMatches,g=void 0===v?O.includeMatches:v,y=r.ignoreLocation,p=void 0===y?O.ignoreLocation:y;if(t.length>N)throw new Error(\"Pattern length exceeds max of \".concat(N,\".\"));for(var A,m=t.length,C=e.length,k=Math.max(0,Math.min(u,C)),E=s,M=k,F=d>1||g,D=F?Array(C):[];(A=e.indexOf(t,M))>-1;){var b=R(t,{currentLocation:A,expectedLocation:k,distance:c,ignoreLocation:p});if(E=Math.min(b,E),M=A+m,F)for(var B=0;B<m;)D[A+B]=1,B+=1}M=-1;for(var x=[],w=1,S=m+C,L=1<<m-1,_=0;_<m;_+=1){for(var j=0,I=S;j<I;){R(t,{errors:_,currentLocation:k+I,expectedLocation:k,distance:c,ignoreLocation:p})<=E?j=I:S=I,I=Math.floor((S-j)/2+j)}S=I;var $=Math.max(1,k-I+1),P=l?C:Math.min(k+I,C)+m,W=Array(P+2);W[P+1]=(1<<_)-1;for(var z=P;z>=$;z-=1){var K=z-1,T=n[e.charAt(K)];if(F&&(D[K]=+!!T),W[z]=(W[z+1]<<1|1)&T,_&&(W[z]|=(x[z+1]|x[z])<<1|1|x[z+1]),W[z]&L&&(w=R(t,{errors:_,currentLocation:K,expectedLocation:k,distance:c,ignoreLocation:p}))<=E){if(E=w,(M=K)<=k)break;$=Math.max(1,2*k-M)}}if(R(t,{errors:_+1,currentLocation:k,expectedLocation:k,distance:c,ignoreLocation:p})>E)break;x=W}var q={isMatch:M>=0,score:Math.max(.001,w)};if(F){var J=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:O.minMatchCharLength,n=[],r=-1,i=-1,u=0,o=e.length;u<o;u+=1){var c=e[u];c&&-1===r?r=u:c||-1===r||((i=u-1)-r+1>=t&&n.push([r,i]),r=-1)}return e[u-1]&&u-r>=t&&n.push([r,u-1]),n}(D,d);J.length?g&&(q.indices=J):q.isMatch=!1}return q}function W(e){for(var t={},n=0,r=e.length;n<r;n+=1){var i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}var z=String.prototype.normalize?function(e){return e.normalize(\"NFD\").replace(/[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C04\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F]/g,\"\")}:function(e){return e},K=function(){function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=i.location,o=void 0===u?O.location:u,c=i.threshold,a=void 0===c?O.threshold:c,s=i.distance,h=void 0===s?O.distance:s,l=i.includeMatches,f=void 0===l?O.includeMatches:l,d=i.findAllMatches,v=void 0===d?O.findAllMatches:d,g=i.minMatchCharLength,y=void 0===g?O.minMatchCharLength:g,p=i.isCaseSensitive,A=void 0===p?O.isCaseSensitive:p,m=i.ignoreDiacritics,C=void 0===m?O.ignoreDiacritics:m,k=i.ignoreLocation,E=void 0===k?O.ignoreLocation:k;if(r(this,e),this.options={location:o,threshold:a,distance:h,includeMatches:f,findAllMatches:v,minMatchCharLength:y,isCaseSensitive:A,ignoreDiacritics:C,ignoreLocation:E},t=A?t:t.toLowerCase(),t=C?z(t):t,this.pattern=t,this.chunks=[],this.pattern.length){var M=function(e,t){n.chunks.push({pattern:e,alphabet:W(e),startIndex:t})},F=this.pattern.length;if(F>N){for(var D=0,b=F%N,B=F-b;D<B;)M(this.pattern.substr(D,N),D),D+=N;if(b){var x=F-N;M(this.pattern.substr(x),x)}}else M(this.pattern,0)}}return u(e,[{key:\"searchIn\",value:function(e){var t=this.options,n=t.isCaseSensitive,r=t.ignoreDiacritics,i=t.includeMatches;if(e=n?e:e.toLowerCase(),e=r?z(e):e,this.pattern===e){var u={isMatch:!0,score:0};return i&&(u.indices=[[0,e.length-1]]),u}var o=this.options,c=o.location,a=o.distance,s=o.threshold,h=o.findAllMatches,l=o.minMatchCharLength,d=o.ignoreLocation,v=[],g=0,y=!1;this.chunks.forEach((function(t){var n=t.pattern,r=t.alphabet,u=t.startIndex,o=P(e,n,r,{location:c+u,distance:a,threshold:s,findAllMatches:h,minMatchCharLength:l,includeMatches:i,ignoreLocation:d}),p=o.isMatch,A=o.score,m=o.indices;p&&(y=!0),g+=A,p&&m&&(v=[].concat(f(v),f(m)))}));var p={isMatch:y,score:y?g/this.chunks.length:1};return y&&i&&(p.indices=v),p}}]),e}(),T=function(){function e(t){r(this,e),this.pattern=t}return u(e,[{key:\"search\",value:function(){}}],[{key:\"isMultiMatch\",value:function(e){return q(e,this.multiRegex)}},{key:\"isSingleMatch\",value:function(e){return q(e,this.singleRegex)}}]),e}();function q(e,t){var n=e.match(t);return n?n[1]:null}var J=function(e){c(n,T);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return u(n,[{key:\"search\",value:function(e){var t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:\"type\",get:function(){return\"exact\"}},{key:\"multiRegex\",get:function(){return/^=\"(.*)\"$/}},{key:\"singleRegex\",get:function(){return/^=(.*)$/}}]),n}(),U=function(e){c(n,T);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return u(n,[{key:\"search\",value:function(e){var t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:\"type\",get:function(){return\"inverse-exact\"}},{key:\"multiRegex\",get:function(){return/^!\"(.*)\"$/}},{key:\"singleRegex\",get:function(){return/^!(.*)$/}}]),n}(),V=function(e){c(n,T);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return u(n,[{key:\"search\",value:function(e){var t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:\"type\",get:function(){return\"prefix-exact\"}},{key:\"multiRegex\",get:function(){return/^\\^\"(.*)\"$/}},{key:\"singleRegex\",get:function(){return/^\\^(.*)$/}}]),n}(),G=function(e){c(n,T);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return u(n,[{key:\"search\",value:function(e){var t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:\"type\",get:function(){return\"inverse-prefix-exact\"}},{key:\"multiRegex\",get:function(){return/^!\\^\"(.*)\"$/}},{key:\"singleRegex\",get:function(){return/^!\\^(.*)$/}}]),n}(),H=function(e){c(n,T);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return u(n,[{key:\"search\",value:function(e){var t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}],[{key:\"type\",get:function(){return\"suffix-exact\"}},{key:\"multiRegex\",get:function(){return/^\"(.*)\"\\$$/}},{key:\"singleRegex\",get:function(){return/^(.*)\\$$/}}]),n}(),Q=function(e){c(n,T);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return u(n,[{key:\"search\",value:function(e){var t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:\"type\",get:function(){return\"inverse-suffix-exact\"}},{key:\"multiRegex\",get:function(){return/^!\"(.*)\"\\$$/}},{key:\"singleRegex\",get:function(){return/^!(.*)\\$$/}}]),n}(),X=function(e){c(n,T);var t=l(n);function n(e){var i,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=u.location,c=void 0===o?O.location:o,a=u.threshold,s=void 0===a?O.threshold:a,h=u.distance,l=void 0===h?O.distance:h,f=u.includeMatches,d=void 0===f?O.includeMatches:f,v=u.findAllMatches,g=void 0===v?O.findAllMatches:v,y=u.minMatchCharLength,p=void 0===y?O.minMatchCharLength:y,A=u.isCaseSensitive,m=void 0===A?O.isCaseSensitive:A,C=u.ignoreDiacritics,k=void 0===C?O.ignoreDiacritics:C,E=u.ignoreLocation,M=void 0===E?O.ignoreLocation:E;return r(this,n),(i=t.call(this,e))._bitapSearch=new K(e,{location:c,threshold:s,distance:l,includeMatches:d,findAllMatches:g,minMatchCharLength:p,isCaseSensitive:m,ignoreDiacritics:k,ignoreLocation:M}),i}return u(n,[{key:\"search\",value:function(e){return this._bitapSearch.searchIn(e)}}],[{key:\"type\",get:function(){return\"fuzzy\"}},{key:\"multiRegex\",get:function(){return/^\"(.*)\"$/}},{key:\"singleRegex\",get:function(){return/^(.*)$/}}]),n}(),Y=function(e){c(n,T);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return u(n,[{key:\"search\",value:function(e){for(var t,n=0,r=[],i=this.pattern.length;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,r.push([t,n-1]);var u=!!r.length;return{isMatch:u,score:u?0:1,indices:r}}}],[{key:\"type\",get:function(){return\"include\"}},{key:\"multiRegex\",get:function(){return/^'\"(.*)\"$/}},{key:\"singleRegex\",get:function(){return/^'(.*)$/}}]),n}(),Z=[J,Y,V,G,Q,H,U,X],ee=Z.length,te=/ +(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)/;var ne=new Set([X.type,Y.type]),re=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.isCaseSensitive,u=void 0===i?O.isCaseSensitive:i,o=n.ignoreDiacritics,c=void 0===o?O.ignoreDiacritics:o,a=n.includeMatches,s=void 0===a?O.includeMatches:a,h=n.minMatchCharLength,l=void 0===h?O.minMatchCharLength:h,f=n.ignoreLocation,d=void 0===f?O.ignoreLocation:f,v=n.findAllMatches,g=void 0===v?O.findAllMatches:v,y=n.location,p=void 0===y?O.location:y,A=n.threshold,m=void 0===A?O.threshold:A,C=n.distance,k=void 0===C?O.distance:C;r(this,e),this.query=null,this.options={isCaseSensitive:u,ignoreDiacritics:c,includeMatches:s,minMatchCharLength:l,findAllMatches:g,ignoreLocation:d,location:p,threshold:m,distance:k},t=u?t:t.toLowerCase(),t=c?z(t):t,this.pattern=t,this.query=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.split(\"|\").map((function(e){for(var n=e.trim().split(te).filter((function(e){return e&&!!e.trim()})),r=[],i=0,u=n.length;i<u;i+=1){for(var o=n[i],c=!1,a=-1;!c&&++a<ee;){var s=Z[a],h=s.isMultiMatch(o);h&&(r.push(new s(h,t)),c=!0)}if(!c)for(a=-1;++a<ee;){var l=Z[a],f=l.isSingleMatch(o);if(f){r.push(new l(f,t));break}}}return r}))}(this.pattern,this.options)}return u(e,[{key:\"searchIn\",value:function(e){var t=this.query;if(!t)return{isMatch:!1,score:1};var n=this.options,r=n.includeMatches,i=n.isCaseSensitive,u=n.ignoreDiacritics;e=i?e:e.toLowerCase(),e=u?z(e):e;for(var o=0,c=[],a=0,s=0,h=t.length;s<h;s+=1){var l=t[s];c.length=0,o=0;for(var d=0,v=l.length;d<v;d+=1){var g=l[d],y=g.search(e),p=y.isMatch,A=y.indices,m=y.score;if(!p){a=0,o=0,c.length=0;break}if(o+=1,a+=m,r){var C=g.constructor.type;ne.has(C)?c=[].concat(f(c),f(A)):c.push(A)}}if(o){var k={isMatch:!0,score:a/o};return r&&(k.indices=c),k}}return{isMatch:!1,score:1}}}],[{key:\"condition\",value:function(e,t){return t.useExtendedSearch}}]),e}(),ie=[];function ue(e,t){for(var n=0,r=ie.length;n<r;n+=1){var i=ie[n];if(i.condition(e,t))return new i(e,t)}return new K(e,t)}var oe=\"$and\",ce=\"$or\",ae=\"$path\",se=\"$val\",he=function(e){return!(!e[oe]&&!e[ce])},le=function(e){return o({},oe,Object.keys(e).map((function(t){return o({},t,e[t])})))};function fe(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).auto,r=void 0===n||n;return he(e)||(e=le(e)),function e(n){var i=Object.keys(n),u=function(e){return!!e[ae]}(n);if(!u&&i.length>1&&!he(n))return e(le(n));if(function(e){return!g(e)&&k(e)&&!he(e)}(n)){var o=u?n[ae]:i[0],c=u?n[se]:n[o];if(!A(c))throw new Error(function(e){return\"Invalid value for key \".concat(e)}(o));var a={keyId:L(o),pattern:c};return r&&(a.searcher=ue(c,t)),a}var s={children:[],operator:i[0]};return i.forEach((function(t){var r=n[t];g(r)&&r.forEach((function(t){s.children.push(e(t))}))})),s}(e)}function de(e,t){var n=e.matches;t.matches=[],E(n)&&n.forEach((function(e){if(E(e.indices)&&e.indices.length){var n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.src),e.idx>-1&&(n.refIndex=e.idx),t.matches.push(n)}}))}function ve(e,t){t.score=e.score}var ge=function(){function e(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=arguments.length>2?arguments[2]:void 0;r(this,e),this.options=t(t({},O),i),this.options.useExtendedSearch,this._keyStore=new x(this.options.keys),this.setCollection(n,u)}return u(e,[{key:\"setCollection\",value:function(e,t){if(this._docs=e,t&&!(t instanceof I))throw new Error(\"Incorrect 'index' type\");this._myIndex=t||$(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}},{key:\"add\",value:function(e){E(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:\"remove\",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},t=[],n=0,r=this._docs.length;n<r;n+=1){var i=this._docs[n];e(i,n)&&(this.removeAt(n),n-=1,r-=1,t.push(i))}return t}},{key:\"removeAt\",value:function(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}},{key:\"getIndex\",value:function(){return this._myIndex}},{key:\"search\",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).limit,n=void 0===t?-1:t,r=this.options,i=r.includeMatches,u=r.includeScore,o=r.shouldSort,c=r.sortFn,a=r.ignoreFieldNorm,s=A(e)?A(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(e,t){var n=t.ignoreFieldNorm,r=void 0===n?O.ignoreFieldNorm:n;e.forEach((function(e){var t=1;e.matches.forEach((function(e){var n=e.key,i=e.norm,u=e.score,o=n?n.weight:null;t*=Math.pow(0===u&&o?Number.EPSILON:u,(o||1)*(r?1:i))})),e.score=t}))}(s,{ignoreFieldNorm:a}),o&&s.sort(c),m(n)&&n>-1&&(s=s.slice(0,n)),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?O.includeMatches:r,u=n.includeScore,o=void 0===u?O.includeScore:u,c=[];return i&&c.push(de),o&&c.push(ve),e.map((function(e){var n=e.idx,r={item:t[n],refIndex:n};return c.length&&c.forEach((function(t){t(e,r)})),r}))}(s,this._docs,{includeMatches:i,includeScore:u})}},{key:\"_searchStringList\",value:function(e){var t=ue(e,this.options),n=this._myIndex.records,r=[];return n.forEach((function(e){var n=e.v,i=e.i,u=e.n;if(E(n)){var o=t.searchIn(n),c=o.isMatch,a=o.score,s=o.indices;c&&r.push({item:n,idx:i,matches:[{score:a,value:n,norm:u,indices:s}]})}})),r}},{key:\"_searchLogical\",value:function(e){var t=this,n=fe(e,this.options),r=function e(n,r,i){if(!n.children){var u=n.keyId,o=n.searcher,c=t._findMatches({key:t._keyStore.get(u),value:t._myIndex.getValueForItemAtKeyId(r,u),searcher:o});return c&&c.length?[{idx:i,item:r,matches:c}]:[]}for(var a=[],s=0,h=n.children.length;s<h;s+=1){var l=e(n.children[s],r,i);if(l.length)a.push.apply(a,f(l));else if(n.operator===oe)return[]}return a},i=this._myIndex.records,u={},o=[];return i.forEach((function(e){var t=e.$,i=e.i;if(E(t)){var c=r(n,t,i);c.length&&(u[i]||(u[i]={idx:i,item:t,matches:[]},o.push(u[i])),c.forEach((function(e){var t,n=e.matches;(t=u[i].matches).push.apply(t,f(n))})))}})),o}},{key:\"_searchObjectList\",value:function(e){var t=this,n=ue(e,this.options),r=this._myIndex,i=r.keys,u=r.records,o=[];return u.forEach((function(e){var r=e.$,u=e.i;if(E(r)){var c=[];i.forEach((function(e,i){c.push.apply(c,f(t._findMatches({key:e,value:r[i],searcher:n})))})),c.length&&o.push({idx:u,item:r,matches:c})}})),o}},{key:\"_findMatches\",value:function(e){var t=e.key,n=e.value,r=e.searcher;if(!E(n))return[];var i=[];if(g(n))n.forEach((function(e){var n=e.v,u=e.i,o=e.n;if(E(n)){var c=r.searchIn(n),a=c.isMatch,s=c.score,h=c.indices;a&&i.push({score:s,key:t,value:n,idx:u,norm:o,indices:h})}}));else{var u=n.v,o=n.n,c=r.searchIn(u),a=c.isMatch,s=c.score,h=c.indices;a&&i.push({score:s,key:t,value:u,norm:o,indices:h})}return i}}]),e}();ge.version=\"7.1.0\",ge.createIndex=$,ge.parseIndex=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?O.getFn:n,i=t.fieldNormWeight,u=void 0===i?O.fieldNormWeight:i,o=e.keys,c=e.records,a=new I({getFn:r,fieldNormWeight:u});return a.setKeys(o),a.setIndexRecords(c),a},ge.config=O,function(){ie.push.apply(ie,arguments)}(re);var ye=ge;module.exports=ye;"
  },
  {
    "path": "dist/fuse.min.mjs",
    "content": "/**\n * Fuse.js v7.1.0 - Lightweight fuzzy-search (http://fusejs.io)\n *\n * Copyright (c) 2025 Kiro Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\nfunction t(t){return Array.isArray?Array.isArray(t):\"[object Array]\"===h(t)}const e=1/0;function n(t){return null==t?\"\":function(t){if(\"string\"==typeof t)return t;let n=t+\"\";return\"0\"==n&&1/t==-e?\"-0\":n}(t)}function s(t){return\"string\"==typeof t}function i(t){return\"number\"==typeof t}function r(t){return!0===t||!1===t||function(t){return u(t)&&null!==t}(t)&&\"[object Boolean]\"==h(t)}function u(t){return\"object\"==typeof t}function c(t){return null!=t}function o(t){return!t.trim().length}function h(t){return null==t?void 0===t?\"[object Undefined]\":\"[object Null]\":Object.prototype.toString.call(t)}const a=t=>`Missing ${t} property in key`,l=t=>`Property 'weight' in key '${t}' must be a positive integer`,d=Object.prototype.hasOwnProperty;class g{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach((t=>{let n=f(t);this._keys.push(n),this._keyMap[n.id]=n,e+=n.weight})),this._keys.forEach((t=>{t.weight/=e}))}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function f(e){let n=null,i=null,r=null,u=1,c=null;if(s(e)||t(e))r=e,n=A(e),i=p(e);else{if(!d.call(e,\"name\"))throw new Error(a(\"name\"));const t=e.name;if(r=t,d.call(e,\"weight\")&&(u=e.weight,u<=0))throw new Error(l(t));n=A(t),i=p(t),c=e.getFn}return{path:n,id:i,weight:u,src:r,getFn:c}}function A(e){return t(e)?e:e.split(\".\")}function p(e){return t(e)?e.join(\".\"):e}var C={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...{useExtendedSearch:!1,getFn:function(e,u){let o=[],h=!1;const a=(e,u,l)=>{if(c(e))if(u[l]){const d=e[u[l]];if(!c(d))return;if(l===u.length-1&&(s(d)||i(d)||r(d)))o.push(n(d));else if(t(d)){h=!0;for(let t=0,e=d.length;t<e;t+=1)a(d[t],u,l+1)}else u.length&&a(d,u,l+1)}else o.push(e)};return a(e,s(u)?u.split(\".\"):u,0),h?o:o[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const m=/[^ ]+/g;class F{constructor({getFn:t=C.getFn,fieldNormWeight:e=C.fieldNormWeight}={}){this.norm=function(t=1,e=3){const n=new Map,s=Math.pow(10,e);return{get(e){const i=e.match(m).length;if(n.has(i))return n.get(i);const r=1/Math.pow(i,.5*t),u=parseFloat(Math.round(r*s)/s);return n.set(i,u),u},clear(){n.clear()}}}(e,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach(((t,e)=>{this._keysMap[t.id]=e}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,s(this.docs[0])?this.docs.forEach(((t,e)=>{this._addString(t,e)})):this.docs.forEach(((t,e)=>{this._addObject(t,e)})),this.norm.clear())}add(t){const e=this.size();s(t)?this._addString(t,e):this._addObject(t,e)}removeAt(t){this.records.splice(t,1);for(let e=t,n=this.size();e<n;e+=1)this.records[e].i-=1}getValueForItemAtKeyId(t,e){return t[this._keysMap[e]]}size(){return this.records.length}_addString(t,e){if(!c(t)||o(t))return;let n={v:t,i:e,n:this.norm.get(t)};this.records.push(n)}_addObject(e,n){let i={i:n,$:{}};this.keys.forEach(((n,r)=>{let u=n.getFn?n.getFn(e):this.getFn(e,n.path);if(c(u))if(t(u)){let e=[];const n=[{nestedArrIndex:-1,value:u}];for(;n.length;){const{nestedArrIndex:i,value:r}=n.pop();if(c(r))if(s(r)&&!o(r)){let t={v:r,i:i,n:this.norm.get(r)};e.push(t)}else t(r)&&r.forEach(((t,e)=>{n.push({nestedArrIndex:e,value:t})}))}i.$[r]=e}else if(s(u)&&!o(u)){let t={v:u,n:this.norm.get(u)};i.$[r]=t}})),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function M(t,e,{getFn:n=C.getFn,fieldNormWeight:s=C.fieldNormWeight}={}){const i=new F({getFn:n,fieldNormWeight:s});return i.setKeys(t.map(f)),i.setSources(e),i.create(),i}function E(t,{errors:e=0,currentLocation:n=0,expectedLocation:s=0,distance:i=C.distance,ignoreLocation:r=C.ignoreLocation}={}){const u=e/t.length;if(r)return u;const c=Math.abs(s-n);return i?u+c/i:c?1:u}const D=32;function B(t,e,n,{location:s=C.location,distance:i=C.distance,threshold:r=C.threshold,findAllMatches:u=C.findAllMatches,minMatchCharLength:c=C.minMatchCharLength,includeMatches:o=C.includeMatches,ignoreLocation:h=C.ignoreLocation}={}){if(e.length>D)throw new Error(`Pattern length exceeds max of ${D}.`);const a=e.length,l=t.length,d=Math.max(0,Math.min(s,l));let g=r,f=d;const A=c>1||o,p=A?Array(l):[];let m;for(;(m=t.indexOf(e,f))>-1;){let t=E(e,{currentLocation:m,expectedLocation:d,distance:i,ignoreLocation:h});if(g=Math.min(t,g),f=m+a,A){let t=0;for(;t<a;)p[m+t]=1,t+=1}}f=-1;let F=[],M=1,B=a+l;const x=1<<a-1;for(let s=0;s<a;s+=1){let r=0,c=B;for(;r<c;){E(e,{errors:s,currentLocation:d+c,expectedLocation:d,distance:i,ignoreLocation:h})<=g?r=c:B=c,c=Math.floor((B-r)/2+r)}B=c;let o=Math.max(1,d-c+1),C=u?l:Math.min(d+c,l)+a,m=Array(C+2);m[C+1]=(1<<s)-1;for(let r=C;r>=o;r-=1){let u=r-1,c=n[t.charAt(u)];if(A&&(p[u]=+!!c),m[r]=(m[r+1]<<1|1)&c,s&&(m[r]|=(F[r+1]|F[r])<<1|1|F[r+1]),m[r]&x&&(M=E(e,{errors:s,currentLocation:u,expectedLocation:d,distance:i,ignoreLocation:h}),M<=g)){if(g=M,f=u,f<=d)break;o=Math.max(1,2*d-f)}}if(E(e,{errors:s+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:h})>g)break;F=m}const y={isMatch:f>=0,score:Math.max(.001,M)};if(A){const t=function(t=[],e=C.minMatchCharLength){let n=[],s=-1,i=-1,r=0;for(let u=t.length;r<u;r+=1){let u=t[r];u&&-1===s?s=r:u||-1===s||(i=r-1,i-s+1>=e&&n.push([s,i]),s=-1)}return t[r-1]&&r-s>=e&&n.push([s,r-1]),n}(p,c);t.length?o&&(y.indices=t):y.isMatch=!1}return y}function x(t){let e={};for(let n=0,s=t.length;n<s;n+=1){const i=t.charAt(n);e[i]=(e[i]||0)|1<<s-n-1}return e}const y=String.prototype.normalize?t=>t.normalize(\"NFD\").replace(/[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C04\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F]/g,\"\"):t=>t;class L{constructor(t,{location:e=C.location,threshold:n=C.threshold,distance:s=C.distance,includeMatches:i=C.includeMatches,findAllMatches:r=C.findAllMatches,minMatchCharLength:u=C.minMatchCharLength,isCaseSensitive:c=C.isCaseSensitive,ignoreDiacritics:o=C.ignoreDiacritics,ignoreLocation:h=C.ignoreLocation}={}){if(this.options={location:e,threshold:n,distance:s,includeMatches:i,findAllMatches:r,minMatchCharLength:u,isCaseSensitive:c,ignoreDiacritics:o,ignoreLocation:h},t=c?t:t.toLowerCase(),t=o?y(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const a=(t,e)=>{this.chunks.push({pattern:t,alphabet:x(t),startIndex:e})},l=this.pattern.length;if(l>D){let t=0;const e=l%D,n=l-e;for(;t<n;)a(this.pattern.substr(t,D),t),t+=D;if(e){const t=l-D;a(this.pattern.substr(t),t)}}else a(this.pattern,0)}searchIn(t){const{isCaseSensitive:e,ignoreDiacritics:n,includeMatches:s}=this.options;if(t=e?t:t.toLowerCase(),t=n?y(t):t,this.pattern===t){let e={isMatch:!0,score:0};return s&&(e.indices=[[0,t.length-1]]),e}const{location:i,distance:r,threshold:u,findAllMatches:c,minMatchCharLength:o,ignoreLocation:h}=this.options;let a=[],l=0,d=!1;this.chunks.forEach((({pattern:e,alphabet:n,startIndex:g})=>{const{isMatch:f,score:A,indices:p}=B(t,e,n,{location:i+g,distance:r,threshold:u,findAllMatches:c,minMatchCharLength:o,includeMatches:s,ignoreLocation:h});f&&(d=!0),l+=A,f&&p&&(a=[...a,...p])}));let g={isMatch:d,score:d?l/this.chunks.length:1};return d&&s&&(g.indices=a),g}}class k{constructor(t){this.pattern=t}static isMultiMatch(t){return _(t,this.multiRegex)}static isSingleMatch(t){return _(t,this.singleRegex)}search(){}}function _(t,e){const n=t.match(e);return n?n[1]:null}class v extends k{constructor(t,{location:e=C.location,threshold:n=C.threshold,distance:s=C.distance,includeMatches:i=C.includeMatches,findAllMatches:r=C.findAllMatches,minMatchCharLength:u=C.minMatchCharLength,isCaseSensitive:c=C.isCaseSensitive,ignoreDiacritics:o=C.ignoreDiacritics,ignoreLocation:h=C.ignoreLocation}={}){super(t),this._bitapSearch=new L(t,{location:e,threshold:n,distance:s,includeMatches:i,findAllMatches:r,minMatchCharLength:u,isCaseSensitive:c,ignoreDiacritics:o,ignoreLocation:h})}static get type(){return\"fuzzy\"}static get multiRegex(){return/^\"(.*)\"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class S extends k{constructor(t){super(t)}static get type(){return\"include\"}static get multiRegex(){return/^'\"(.*)\"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e,n=0;const s=[],i=this.pattern.length;for(;(e=t.indexOf(this.pattern,n))>-1;)n=e+i,s.push([e,n-1]);const r=!!s.length;return{isMatch:r,score:r?0:1,indices:s}}}const I=[class extends k{constructor(t){super(t)}static get type(){return\"exact\"}static get multiRegex(){return/^=\"(.*)\"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},S,class extends k{constructor(t){super(t)}static get type(){return\"prefix-exact\"}static get multiRegex(){return/^\\^\"(.*)\"$/}static get singleRegex(){return/^\\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},class extends k{constructor(t){super(t)}static get type(){return\"inverse-prefix-exact\"}static get multiRegex(){return/^!\\^\"(.*)\"$/}static get singleRegex(){return/^!\\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends k{constructor(t){super(t)}static get type(){return\"inverse-suffix-exact\"}static get multiRegex(){return/^!\"(.*)\"\\$$/}static get singleRegex(){return/^!(.*)\\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends k{constructor(t){super(t)}static get type(){return\"suffix-exact\"}static get multiRegex(){return/^\"(.*)\"\\$$/}static get singleRegex(){return/^(.*)\\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}},class extends k{constructor(t){super(t)}static get type(){return\"inverse-exact\"}static get multiRegex(){return/^!\"(.*)\"$/}static get singleRegex(){return/^!(.*)$/}search(t){const e=-1===t.indexOf(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},v],w=I.length,$=/ +(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)/;const b=new Set([v.type,S.type]);class N{constructor(t,{isCaseSensitive:e=C.isCaseSensitive,ignoreDiacritics:n=C.ignoreDiacritics,includeMatches:s=C.includeMatches,minMatchCharLength:i=C.minMatchCharLength,ignoreLocation:r=C.ignoreLocation,findAllMatches:u=C.findAllMatches,location:c=C.location,threshold:o=C.threshold,distance:h=C.distance}={}){this.query=null,this.options={isCaseSensitive:e,ignoreDiacritics:n,includeMatches:s,minMatchCharLength:i,findAllMatches:u,ignoreLocation:r,location:c,threshold:o,distance:h},t=e?t:t.toLowerCase(),t=n?y(t):t,this.pattern=t,this.query=function(t,e={}){return t.split(\"|\").map((t=>{let n=t.trim().split($).filter((t=>t&&!!t.trim())),s=[];for(let t=0,i=n.length;t<i;t+=1){const i=n[t];let r=!1,u=-1;for(;!r&&++u<w;){const t=I[u];let n=t.isMultiMatch(i);n&&(s.push(new t(n,e)),r=!0)}if(!r)for(u=-1;++u<w;){const t=I[u];let n=t.isSingleMatch(i);if(n){s.push(new t(n,e));break}}}return s}))}(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:s,ignoreDiacritics:i}=this.options;t=s?t:t.toLowerCase(),t=i?y(t):t;let r=0,u=[],c=0;for(let s=0,i=e.length;s<i;s+=1){const i=e[s];u.length=0,r=0;for(let e=0,s=i.length;e<s;e+=1){const s=i[e],{isMatch:o,indices:h,score:a}=s.search(t);if(!o){c=0,r=0,u.length=0;break}if(r+=1,c+=a,n){const t=s.constructor.type;b.has(t)?u=[...u,...h]:u.push(h)}}if(r){let t={isMatch:!0,score:c/r};return n&&(t.indices=u),t}}return{isMatch:!1,score:1}}}const R=[];function O(t,e){for(let n=0,s=R.length;n<s;n+=1){let s=R[n];if(s.condition(t,e))return new s(t,e)}return new L(t,e)}const j=\"$and\",W=\"$or\",z=\"$path\",K=\"$val\",P=t=>!(!t[j]&&!t[W]),q=t=>({[j]:Object.keys(t).map((e=>({[e]:t[e]})))});function J(e,n,{auto:i=!0}={}){const r=e=>{let c=Object.keys(e);const o=(t=>!!t[z])(e);if(!o&&c.length>1&&!P(e))return r(q(e));if((e=>!t(e)&&u(e)&&!P(e))(e)){const t=o?e[z]:c[0],r=o?e[K]:e[t];if(!s(r))throw new Error((t=>`Invalid value for key ${t}`)(t));const u={keyId:p(t),pattern:r};return i&&(u.searcher=O(r,n)),u}let h={children:[],operator:c[0]};return c.forEach((n=>{const s=e[n];t(s)&&s.forEach((t=>{h.children.push(r(t))}))})),h};return P(e)||(e=q(e)),r(e)}function V(t,e){const n=t.matches;e.matches=[],c(n)&&n.forEach((t=>{if(!c(t.indices)||!t.indices.length)return;const{indices:n,value:s}=t;let i={indices:n,value:s};t.key&&(i.key=t.key.src),t.idx>-1&&(i.refIndex=t.idx),e.matches.push(i)}))}function U(t,e){e.score=t.score}class G{constructor(t,e={},n){this.options={...C,...e},this.options.useExtendedSearch,this._keyStore=new g(this.options.keys),this.setCollection(t,n)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof F))throw new Error(\"Incorrect 'index' type\");this._myIndex=e||M(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){c(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=(()=>!1)){const e=[];for(let n=0,s=this._docs.length;n<s;n+=1){const i=this._docs[n];t(i,n)&&(this.removeAt(n),n-=1,s-=1,e.push(i))}return e}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:e=-1}={}){const{includeMatches:n,includeScore:r,shouldSort:u,sortFn:c,ignoreFieldNorm:o}=this.options;let h=s(t)?s(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return function(t,{ignoreFieldNorm:e=C.ignoreFieldNorm}){t.forEach((t=>{let n=1;t.matches.forEach((({key:t,norm:s,score:i})=>{const r=t?t.weight:null;n*=Math.pow(0===i&&r?Number.EPSILON:i,(r||1)*(e?1:s))})),t.score=n}))}(h,{ignoreFieldNorm:o}),u&&h.sort(c),i(e)&&e>-1&&(h=h.slice(0,e)),function(t,e,{includeMatches:n=C.includeMatches,includeScore:s=C.includeScore}={}){const i=[];return n&&i.push(V),s&&i.push(U),t.map((t=>{const{idx:n}=t,s={item:e[n],refIndex:n};return i.length&&i.forEach((e=>{e(t,s)})),s}))}(h,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(t){const e=O(t,this.options),{records:n}=this._myIndex,s=[];return n.forEach((({v:t,i:n,n:i})=>{if(!c(t))return;const{isMatch:r,score:u,indices:o}=e.searchIn(t);r&&s.push({item:t,idx:n,matches:[{score:u,value:t,norm:i,indices:o}]})})),s}_searchLogical(t){const e=J(t,this.options),n=(t,e,s)=>{if(!t.children){const{keyId:n,searcher:i}=t,r=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(e,n),searcher:i});return r&&r.length?[{idx:s,item:e,matches:r}]:[]}const i=[];for(let r=0,u=t.children.length;r<u;r+=1){const u=t.children[r],c=n(u,e,s);if(c.length)i.push(...c);else if(t.operator===j)return[]}return i},s=this._myIndex.records,i={},r=[];return s.forEach((({$:t,i:s})=>{if(c(t)){let u=n(e,t,s);u.length&&(i[s]||(i[s]={idx:s,item:t,matches:[]},r.push(i[s])),u.forEach((({matches:t})=>{i[s].matches.push(...t)})))}})),r}_searchObjectList(t){const e=O(t,this.options),{keys:n,records:s}=this._myIndex,i=[];return s.forEach((({$:t,i:s})=>{if(!c(t))return;let r=[];n.forEach(((n,s)=>{r.push(...this._findMatches({key:n,value:t[s],searcher:e}))})),r.length&&i.push({idx:s,item:t,matches:r})})),i}_findMatches({key:e,value:n,searcher:s}){if(!c(n))return[];let i=[];if(t(n))n.forEach((({v:t,i:n,n:r})=>{if(!c(t))return;const{isMatch:u,score:o,indices:h}=s.searchIn(t);u&&i.push({score:o,key:e,value:t,idx:n,norm:r,indices:h})}));else{const{v:t,n:r}=n,{isMatch:u,score:c,indices:o}=s.searchIn(t);u&&i.push({score:c,key:e,value:t,norm:r,indices:o})}return i}}G.version=\"7.1.0\",G.createIndex=M,G.parseIndex=function(t,{getFn:e=C.getFn,fieldNormWeight:n=C.fieldNormWeight}={}){const{keys:s,records:i}=t,r=new F({getFn:e,fieldNormWeight:n});return r.setKeys(s),r.setIndexRecords(i),r},G.config=C,function(...t){R.push(...t)}(N);export{G as default};"
  },
  {
    "path": "dist/fuse.mjs",
    "content": "/**\n * Fuse.js v7.1.0 - Lightweight fuzzy-search (http://fusejs.io)\n *\n * Copyright (c) 2025 Kiro Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfunction isArray(value) {\n  return !Array.isArray\n    ? getTag(value) === '[object Array]'\n    : Array.isArray(value)\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/baseToString.js\nconst INFINITY = 1 / 0;\nfunction baseToString(value) {\n  // Exit early for strings to avoid a performance hit in some environments.\n  if (typeof value == 'string') {\n    return value\n  }\n  let result = value + '';\n  return result == '0' && 1 / value == -INFINITY ? '-0' : result\n}\n\nfunction toString(value) {\n  return value == null ? '' : baseToString(value)\n}\n\nfunction isString(value) {\n  return typeof value === 'string'\n}\n\nfunction isNumber(value) {\n  return typeof value === 'number'\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/isBoolean.js\nfunction isBoolean(value) {\n  return (\n    value === true ||\n    value === false ||\n    (isObjectLike(value) && getTag(value) == '[object Boolean]')\n  )\n}\n\nfunction isObject(value) {\n  return typeof value === 'object'\n}\n\n// Checks if `value` is object-like.\nfunction isObjectLike(value) {\n  return isObject(value) && value !== null\n}\n\nfunction isDefined(value) {\n  return value !== undefined && value !== null\n}\n\nfunction isBlank(value) {\n  return !value.trim().length\n}\n\n// Gets the `toStringTag` of `value`.\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/getTag.js\nfunction getTag(value) {\n  return value == null\n    ? value === undefined\n      ? '[object Undefined]'\n      : '[object Null]'\n    : Object.prototype.toString.call(value)\n}\n\nconst EXTENDED_SEARCH_UNAVAILABLE = 'Extended search is not available';\n\nconst INCORRECT_INDEX_TYPE = \"Incorrect 'index' type\";\n\nconst LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = (key) =>\n  `Invalid value for key ${key}`;\n\nconst PATTERN_LENGTH_TOO_LARGE = (max) =>\n  `Pattern length exceeds max of ${max}.`;\n\nconst MISSING_KEY_PROPERTY = (name) => `Missing ${name} property in key`;\n\nconst INVALID_KEY_WEIGHT_VALUE = (key) =>\n  `Property 'weight' in key '${key}' must be a positive integer`;\n\nconst hasOwn = Object.prototype.hasOwnProperty;\n\nclass KeyStore {\n  constructor(keys) {\n    this._keys = [];\n    this._keyMap = {};\n\n    let totalWeight = 0;\n\n    keys.forEach((key) => {\n      let obj = createKey(key);\n\n      this._keys.push(obj);\n      this._keyMap[obj.id] = obj;\n\n      totalWeight += obj.weight;\n    });\n\n    // Normalize weights so that their sum is equal to 1\n    this._keys.forEach((key) => {\n      key.weight /= totalWeight;\n    });\n  }\n  get(keyId) {\n    return this._keyMap[keyId]\n  }\n  keys() {\n    return this._keys\n  }\n  toJSON() {\n    return JSON.stringify(this._keys)\n  }\n}\n\nfunction createKey(key) {\n  let path = null;\n  let id = null;\n  let src = null;\n  let weight = 1;\n  let getFn = null;\n\n  if (isString(key) || isArray(key)) {\n    src = key;\n    path = createKeyPath(key);\n    id = createKeyId(key);\n  } else {\n    if (!hasOwn.call(key, 'name')) {\n      throw new Error(MISSING_KEY_PROPERTY('name'))\n    }\n\n    const name = key.name;\n    src = name;\n\n    if (hasOwn.call(key, 'weight')) {\n      weight = key.weight;\n\n      if (weight <= 0) {\n        throw new Error(INVALID_KEY_WEIGHT_VALUE(name))\n      }\n    }\n\n    path = createKeyPath(name);\n    id = createKeyId(name);\n    getFn = key.getFn;\n  }\n\n  return { path, id, weight, src, getFn }\n}\n\nfunction createKeyPath(key) {\n  return isArray(key) ? key : key.split('.')\n}\n\nfunction createKeyId(key) {\n  return isArray(key) ? key.join('.') : key\n}\n\nfunction get(obj, path) {\n  let list = [];\n  let arr = false;\n\n  const deepGet = (obj, path, index) => {\n    if (!isDefined(obj)) {\n      return\n    }\n    if (!path[index]) {\n      // If there's no path left, we've arrived at the object we care about.\n      list.push(obj);\n    } else {\n      let key = path[index];\n\n      const value = obj[key];\n\n      if (!isDefined(value)) {\n        return\n      }\n\n      // If we're at the last value in the path, and if it's a string/number/bool,\n      // add it to the list\n      if (\n        index === path.length - 1 &&\n        (isString(value) || isNumber(value) || isBoolean(value))\n      ) {\n        list.push(toString(value));\n      } else if (isArray(value)) {\n        arr = true;\n        // Search each item in the array.\n        for (let i = 0, len = value.length; i < len; i += 1) {\n          deepGet(value[i], path, index + 1);\n        }\n      } else if (path.length) {\n        // An object. Recurse further.\n        deepGet(value, path, index + 1);\n      }\n    }\n  };\n\n  // Backwards compatibility (since path used to be a string)\n  deepGet(obj, isString(path) ? path.split('.') : path, 0);\n\n  return arr ? list : list[0]\n}\n\nconst MatchOptions = {\n  // Whether the matches should be included in the result set. When `true`, each record in the result\n  // set will include the indices of the matched characters.\n  // These can consequently be used for highlighting purposes.\n  includeMatches: false,\n  // When `true`, the matching function will continue to the end of a search pattern even if\n  // a perfect match has already been located in the string.\n  findAllMatches: false,\n  // Minimum number of characters that must be matched before a result is considered a match\n  minMatchCharLength: 1\n};\n\nconst BasicOptions = {\n  // When `true`, the algorithm continues searching to the end of the input even if a perfect\n  // match is found before the end of the same input.\n  isCaseSensitive: false,\n  // When `true`, the algorithm will ignore diacritics (accents) in comparisons\n  ignoreDiacritics: false,\n  // When true, the matching function will continue to the end of a search pattern even if\n  includeScore: false,\n  // List of properties that will be searched. This also supports nested properties.\n  keys: [],\n  // Whether to sort the result list, by score\n  shouldSort: true,\n  // Default sort function: sort by ascending score, ascending index\n  sortFn: (a, b) =>\n    a.score === b.score ? (a.idx < b.idx ? -1 : 1) : a.score < b.score ? -1 : 1\n};\n\nconst FuzzyOptions = {\n  // Approximately where in the text is the pattern expected to be found?\n  location: 0,\n  // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match\n  // (of both letters and location), a threshold of '1.0' would match anything.\n  threshold: 0.6,\n  // Determines how close the match must be to the fuzzy location (specified above).\n  // An exact letter match which is 'distance' characters away from the fuzzy location\n  // would score as a complete mismatch. A distance of '0' requires the match be at\n  // the exact location specified, a threshold of '1000' would require a perfect match\n  // to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n  distance: 100\n};\n\nconst AdvancedOptions = {\n  // When `true`, it enables the use of unix-like search commands\n  useExtendedSearch: false,\n  // The get function to use when fetching an object's properties.\n  // The default will search nested paths *ie foo.bar.baz*\n  getFn: get,\n  // When `true`, search will ignore `location` and `distance`, so it won't matter\n  // where in the string the pattern appears.\n  // More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score\n  ignoreLocation: false,\n  // When `true`, the calculation for the relevance score (used for sorting) will\n  // ignore the field-length norm.\n  // More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm\n  ignoreFieldNorm: false,\n  // The weight to determine how much field length norm effects scoring.\n  fieldNormWeight: 1\n};\n\nvar Config = {\n  ...BasicOptions,\n  ...MatchOptions,\n  ...FuzzyOptions,\n  ...AdvancedOptions\n};\n\nconst SPACE = /[^ ]+/g;\n\n// Field-length norm: the shorter the field, the higher the weight.\n// Set to 3 decimals to reduce index size.\nfunction norm(weight = 1, mantissa = 3) {\n  const cache = new Map();\n  const m = Math.pow(10, mantissa);\n\n  return {\n    get(value) {\n      const numTokens = value.match(SPACE).length;\n\n      if (cache.has(numTokens)) {\n        return cache.get(numTokens)\n      }\n\n      // Default function is 1/sqrt(x), weight makes that variable\n      const norm = 1 / Math.pow(numTokens, 0.5 * weight);\n\n      // In place of `toFixed(mantissa)`, for faster computation\n      const n = parseFloat(Math.round(norm * m) / m);\n\n      cache.set(numTokens, n);\n\n      return n\n    },\n    clear() {\n      cache.clear();\n    }\n  }\n}\n\nclass FuseIndex {\n  constructor({\n    getFn = Config.getFn,\n    fieldNormWeight = Config.fieldNormWeight\n  } = {}) {\n    this.norm = norm(fieldNormWeight, 3);\n    this.getFn = getFn;\n    this.isCreated = false;\n\n    this.setIndexRecords();\n  }\n  setSources(docs = []) {\n    this.docs = docs;\n  }\n  setIndexRecords(records = []) {\n    this.records = records;\n  }\n  setKeys(keys = []) {\n    this.keys = keys;\n    this._keysMap = {};\n    keys.forEach((key, idx) => {\n      this._keysMap[key.id] = idx;\n    });\n  }\n  create() {\n    if (this.isCreated || !this.docs.length) {\n      return\n    }\n\n    this.isCreated = true;\n\n    // List is Array<String>\n    if (isString(this.docs[0])) {\n      this.docs.forEach((doc, docIndex) => {\n        this._addString(doc, docIndex);\n      });\n    } else {\n      // List is Array<Object>\n      this.docs.forEach((doc, docIndex) => {\n        this._addObject(doc, docIndex);\n      });\n    }\n\n    this.norm.clear();\n  }\n  // Adds a doc to the end of the index\n  add(doc) {\n    const idx = this.size();\n\n    if (isString(doc)) {\n      this._addString(doc, idx);\n    } else {\n      this._addObject(doc, idx);\n    }\n  }\n  // Removes the doc at the specified index of the index\n  removeAt(idx) {\n    this.records.splice(idx, 1);\n\n    // Change ref index of every subsquent doc\n    for (let i = idx, len = this.size(); i < len; i += 1) {\n      this.records[i].i -= 1;\n    }\n  }\n  getValueForItemAtKeyId(item, keyId) {\n    return item[this._keysMap[keyId]]\n  }\n  size() {\n    return this.records.length\n  }\n  _addString(doc, docIndex) {\n    if (!isDefined(doc) || isBlank(doc)) {\n      return\n    }\n\n    let record = {\n      v: doc,\n      i: docIndex,\n      n: this.norm.get(doc)\n    };\n\n    this.records.push(record);\n  }\n  _addObject(doc, docIndex) {\n    let record = { i: docIndex, $: {} };\n\n    // Iterate over every key (i.e, path), and fetch the value at that key\n    this.keys.forEach((key, keyIndex) => {\n      let value = key.getFn ? key.getFn(doc) : this.getFn(doc, key.path);\n\n      if (!isDefined(value)) {\n        return\n      }\n\n      if (isArray(value)) {\n        let subRecords = [];\n        const stack = [{ nestedArrIndex: -1, value }];\n\n        while (stack.length) {\n          const { nestedArrIndex, value } = stack.pop();\n\n          if (!isDefined(value)) {\n            continue\n          }\n\n          if (isString(value) && !isBlank(value)) {\n            let subRecord = {\n              v: value,\n              i: nestedArrIndex,\n              n: this.norm.get(value)\n            };\n\n            subRecords.push(subRecord);\n          } else if (isArray(value)) {\n            value.forEach((item, k) => {\n              stack.push({\n                nestedArrIndex: k,\n                value: item\n              });\n            });\n          } else ;\n        }\n        record.$[keyIndex] = subRecords;\n      } else if (isString(value) && !isBlank(value)) {\n        let subRecord = {\n          v: value,\n          n: this.norm.get(value)\n        };\n\n        record.$[keyIndex] = subRecord;\n      }\n    });\n\n    this.records.push(record);\n  }\n  toJSON() {\n    return {\n      keys: this.keys,\n      records: this.records\n    }\n  }\n}\n\nfunction createIndex(\n  keys,\n  docs,\n  { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}\n) {\n  const myIndex = new FuseIndex({ getFn, fieldNormWeight });\n  myIndex.setKeys(keys.map(createKey));\n  myIndex.setSources(docs);\n  myIndex.create();\n  return myIndex\n}\n\nfunction parseIndex(\n  data,\n  { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}\n) {\n  const { keys, records } = data;\n  const myIndex = new FuseIndex({ getFn, fieldNormWeight });\n  myIndex.setKeys(keys);\n  myIndex.setIndexRecords(records);\n  return myIndex\n}\n\nfunction computeScore$1(\n  pattern,\n  {\n    errors = 0,\n    currentLocation = 0,\n    expectedLocation = 0,\n    distance = Config.distance,\n    ignoreLocation = Config.ignoreLocation\n  } = {}\n) {\n  const accuracy = errors / pattern.length;\n\n  if (ignoreLocation) {\n    return accuracy\n  }\n\n  const proximity = Math.abs(expectedLocation - currentLocation);\n\n  if (!distance) {\n    // Dodge divide by zero error.\n    return proximity ? 1.0 : accuracy\n  }\n\n  return accuracy + proximity / distance\n}\n\nfunction convertMaskToIndices(\n  matchmask = [],\n  minMatchCharLength = Config.minMatchCharLength\n) {\n  let indices = [];\n  let start = -1;\n  let end = -1;\n  let i = 0;\n\n  for (let len = matchmask.length; i < len; i += 1) {\n    let match = matchmask[i];\n    if (match && start === -1) {\n      start = i;\n    } else if (!match && start !== -1) {\n      end = i - 1;\n      if (end - start + 1 >= minMatchCharLength) {\n        indices.push([start, end]);\n      }\n      start = -1;\n    }\n  }\n\n  // (i-1 - start) + 1 => i - start\n  if (matchmask[i - 1] && i - start >= minMatchCharLength) {\n    indices.push([start, i - 1]);\n  }\n\n  return indices\n}\n\n// Machine word size\nconst MAX_BITS = 32;\n\nfunction search(\n  text,\n  pattern,\n  patternAlphabet,\n  {\n    location = Config.location,\n    distance = Config.distance,\n    threshold = Config.threshold,\n    findAllMatches = Config.findAllMatches,\n    minMatchCharLength = Config.minMatchCharLength,\n    includeMatches = Config.includeMatches,\n    ignoreLocation = Config.ignoreLocation\n  } = {}\n) {\n  if (pattern.length > MAX_BITS) {\n    throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS))\n  }\n\n  const patternLen = pattern.length;\n  // Set starting location at beginning text and initialize the alphabet.\n  const textLen = text.length;\n  // Handle the case when location > text.length\n  const expectedLocation = Math.max(0, Math.min(location, textLen));\n  // Highest score beyond which we give up.\n  let currentThreshold = threshold;\n  // Is there a nearby exact match? (speedup)\n  let bestLocation = expectedLocation;\n\n  // Performance: only computer matches when the minMatchCharLength > 1\n  // OR if `includeMatches` is true.\n  const computeMatches = minMatchCharLength > 1 || includeMatches;\n  // A mask of the matches, used for building the indices\n  const matchMask = computeMatches ? Array(textLen) : [];\n\n  let index;\n\n  // Get all exact matches, here for speed up\n  while ((index = text.indexOf(pattern, bestLocation)) > -1) {\n    let score = computeScore$1(pattern, {\n      currentLocation: index,\n      expectedLocation,\n      distance,\n      ignoreLocation\n    });\n\n    currentThreshold = Math.min(score, currentThreshold);\n    bestLocation = index + patternLen;\n\n    if (computeMatches) {\n      let i = 0;\n      while (i < patternLen) {\n        matchMask[index + i] = 1;\n        i += 1;\n      }\n    }\n  }\n\n  // Reset the best location\n  bestLocation = -1;\n\n  let lastBitArr = [];\n  let finalScore = 1;\n  let binMax = patternLen + textLen;\n\n  const mask = 1 << (patternLen - 1);\n\n  for (let i = 0; i < patternLen; i += 1) {\n    // Scan for the best match; each iteration allows for one more error.\n    // Run a binary search to determine how far from the match location we can stray\n    // at this error level.\n    let binMin = 0;\n    let binMid = binMax;\n\n    while (binMin < binMid) {\n      const score = computeScore$1(pattern, {\n        errors: i,\n        currentLocation: expectedLocation + binMid,\n        expectedLocation,\n        distance,\n        ignoreLocation\n      });\n\n      if (score <= currentThreshold) {\n        binMin = binMid;\n      } else {\n        binMax = binMid;\n      }\n\n      binMid = Math.floor((binMax - binMin) / 2 + binMin);\n    }\n\n    // Use the result from this iteration as the maximum for the next.\n    binMax = binMid;\n\n    let start = Math.max(1, expectedLocation - binMid + 1);\n    let finish = findAllMatches\n      ? textLen\n      : Math.min(expectedLocation + binMid, textLen) + patternLen;\n\n    // Initialize the bit array\n    let bitArr = Array(finish + 2);\n\n    bitArr[finish + 1] = (1 << i) - 1;\n\n    for (let j = finish; j >= start; j -= 1) {\n      let currentLocation = j - 1;\n      let charMatch = patternAlphabet[text.charAt(currentLocation)];\n\n      if (computeMatches) {\n        // Speed up: quick bool to int conversion (i.e, `charMatch ? 1 : 0`)\n        matchMask[currentLocation] = +!!charMatch;\n      }\n\n      // First pass: exact match\n      bitArr[j] = ((bitArr[j + 1] << 1) | 1) & charMatch;\n\n      // Subsequent passes: fuzzy match\n      if (i) {\n        bitArr[j] |=\n          ((lastBitArr[j + 1] | lastBitArr[j]) << 1) | 1 | lastBitArr[j + 1];\n      }\n\n      if (bitArr[j] & mask) {\n        finalScore = computeScore$1(pattern, {\n          errors: i,\n          currentLocation,\n          expectedLocation,\n          distance,\n          ignoreLocation\n        });\n\n        // This match will almost certainly be better than any existing match.\n        // But check anyway.\n        if (finalScore <= currentThreshold) {\n          // Indeed it is\n          currentThreshold = finalScore;\n          bestLocation = currentLocation;\n\n          // Already passed `loc`, downhill from here on in.\n          if (bestLocation <= expectedLocation) {\n            break\n          }\n\n          // When passing `bestLocation`, don't exceed our current distance from `expectedLocation`.\n          start = Math.max(1, 2 * expectedLocation - bestLocation);\n        }\n      }\n    }\n\n    // No hope for a (better) match at greater error levels.\n    const score = computeScore$1(pattern, {\n      errors: i + 1,\n      currentLocation: expectedLocation,\n      expectedLocation,\n      distance,\n      ignoreLocation\n    });\n\n    if (score > currentThreshold) {\n      break\n    }\n\n    lastBitArr = bitArr;\n  }\n\n  const result = {\n    isMatch: bestLocation >= 0,\n    // Count exact matches (those with a score of 0) to be \"almost\" exact\n    score: Math.max(0.001, finalScore)\n  };\n\n  if (computeMatches) {\n    const indices = convertMaskToIndices(matchMask, minMatchCharLength);\n    if (!indices.length) {\n      result.isMatch = false;\n    } else if (includeMatches) {\n      result.indices = indices;\n    }\n  }\n\n  return result\n}\n\nfunction createPatternAlphabet(pattern) {\n  let mask = {};\n\n  for (let i = 0, len = pattern.length; i < len; i += 1) {\n    const char = pattern.charAt(i);\n    mask[char] = (mask[char] || 0) | (1 << (len - i - 1));\n  }\n\n  return mask\n}\n\nconst stripDiacritics = String.prototype.normalize\n    ? ((str) => str.normalize('NFD').replace(/[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C04\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F]/g, ''))\n    : ((str) => str);\n\nclass BitapSearch {\n  constructor(\n    pattern,\n    {\n      location = Config.location,\n      threshold = Config.threshold,\n      distance = Config.distance,\n      includeMatches = Config.includeMatches,\n      findAllMatches = Config.findAllMatches,\n      minMatchCharLength = Config.minMatchCharLength,\n      isCaseSensitive = Config.isCaseSensitive,\n      ignoreDiacritics = Config.ignoreDiacritics,\n      ignoreLocation = Config.ignoreLocation\n    } = {}\n  ) {\n    this.options = {\n      location,\n      threshold,\n      distance,\n      includeMatches,\n      findAllMatches,\n      minMatchCharLength,\n      isCaseSensitive,\n      ignoreDiacritics,\n      ignoreLocation\n    };\n\n    pattern = isCaseSensitive ? pattern : pattern.toLowerCase();\n    pattern = ignoreDiacritics ? stripDiacritics(pattern) : pattern;\n    this.pattern = pattern;\n\n    this.chunks = [];\n\n    if (!this.pattern.length) {\n      return\n    }\n\n    const addChunk = (pattern, startIndex) => {\n      this.chunks.push({\n        pattern,\n        alphabet: createPatternAlphabet(pattern),\n        startIndex\n      });\n    };\n\n    const len = this.pattern.length;\n\n    if (len > MAX_BITS) {\n      let i = 0;\n      const remainder = len % MAX_BITS;\n      const end = len - remainder;\n\n      while (i < end) {\n        addChunk(this.pattern.substr(i, MAX_BITS), i);\n        i += MAX_BITS;\n      }\n\n      if (remainder) {\n        const startIndex = len - MAX_BITS;\n        addChunk(this.pattern.substr(startIndex), startIndex);\n      }\n    } else {\n      addChunk(this.pattern, 0);\n    }\n  }\n\n  searchIn(text) {\n    const { isCaseSensitive, ignoreDiacritics, includeMatches } = this.options;\n\n    text = isCaseSensitive ? text : text.toLowerCase();\n    text = ignoreDiacritics ? stripDiacritics(text) : text;\n\n    // Exact match\n    if (this.pattern === text) {\n      let result = {\n        isMatch: true,\n        score: 0\n      };\n\n      if (includeMatches) {\n        result.indices = [[0, text.length - 1]];\n      }\n\n      return result\n    }\n\n    // Otherwise, use Bitap algorithm\n    const {\n      location,\n      distance,\n      threshold,\n      findAllMatches,\n      minMatchCharLength,\n      ignoreLocation\n    } = this.options;\n\n    let allIndices = [];\n    let totalScore = 0;\n    let hasMatches = false;\n\n    this.chunks.forEach(({ pattern, alphabet, startIndex }) => {\n      const { isMatch, score, indices } = search(text, pattern, alphabet, {\n        location: location + startIndex,\n        distance,\n        threshold,\n        findAllMatches,\n        minMatchCharLength,\n        includeMatches,\n        ignoreLocation\n      });\n\n      if (isMatch) {\n        hasMatches = true;\n      }\n\n      totalScore += score;\n\n      if (isMatch && indices) {\n        allIndices = [...allIndices, ...indices];\n      }\n    });\n\n    let result = {\n      isMatch: hasMatches,\n      score: hasMatches ? totalScore / this.chunks.length : 1\n    };\n\n    if (hasMatches && includeMatches) {\n      result.indices = allIndices;\n    }\n\n    return result\n  }\n}\n\nclass BaseMatch {\n  constructor(pattern) {\n    this.pattern = pattern;\n  }\n  static isMultiMatch(pattern) {\n    return getMatch(pattern, this.multiRegex)\n  }\n  static isSingleMatch(pattern) {\n    return getMatch(pattern, this.singleRegex)\n  }\n  search(/*text*/) {}\n}\n\nfunction getMatch(pattern, exp) {\n  const matches = pattern.match(exp);\n  return matches ? matches[1] : null\n}\n\n// Token: 'file\n\nclass ExactMatch extends BaseMatch {\n  constructor(pattern) {\n    super(pattern);\n  }\n  static get type() {\n    return 'exact'\n  }\n  static get multiRegex() {\n    return /^=\"(.*)\"$/\n  }\n  static get singleRegex() {\n    return /^=(.*)$/\n  }\n  search(text) {\n    const isMatch = text === this.pattern;\n\n    return {\n      isMatch,\n      score: isMatch ? 0 : 1,\n      indices: [0, this.pattern.length - 1]\n    }\n  }\n}\n\n// Token: !fire\n\nclass InverseExactMatch extends BaseMatch {\n  constructor(pattern) {\n    super(pattern);\n  }\n  static get type() {\n    return 'inverse-exact'\n  }\n  static get multiRegex() {\n    return /^!\"(.*)\"$/\n  }\n  static get singleRegex() {\n    return /^!(.*)$/\n  }\n  search(text) {\n    const index = text.indexOf(this.pattern);\n    const isMatch = index === -1;\n\n    return {\n      isMatch,\n      score: isMatch ? 0 : 1,\n      indices: [0, text.length - 1]\n    }\n  }\n}\n\n// Token: ^file\n\nclass PrefixExactMatch extends BaseMatch {\n  constructor(pattern) {\n    super(pattern);\n  }\n  static get type() {\n    return 'prefix-exact'\n  }\n  static get multiRegex() {\n    return /^\\^\"(.*)\"$/\n  }\n  static get singleRegex() {\n    return /^\\^(.*)$/\n  }\n  search(text) {\n    const isMatch = text.startsWith(this.pattern);\n\n    return {\n      isMatch,\n      score: isMatch ? 0 : 1,\n      indices: [0, this.pattern.length - 1]\n    }\n  }\n}\n\n// Token: !^fire\n\nclass InversePrefixExactMatch extends BaseMatch {\n  constructor(pattern) {\n    super(pattern);\n  }\n  static get type() {\n    return 'inverse-prefix-exact'\n  }\n  static get multiRegex() {\n    return /^!\\^\"(.*)\"$/\n  }\n  static get singleRegex() {\n    return /^!\\^(.*)$/\n  }\n  search(text) {\n    const isMatch = !text.startsWith(this.pattern);\n\n    return {\n      isMatch,\n      score: isMatch ? 0 : 1,\n      indices: [0, text.length - 1]\n    }\n  }\n}\n\n// Token: .file$\n\nclass SuffixExactMatch extends BaseMatch {\n  constructor(pattern) {\n    super(pattern);\n  }\n  static get type() {\n    return 'suffix-exact'\n  }\n  static get multiRegex() {\n    return /^\"(.*)\"\\$$/\n  }\n  static get singleRegex() {\n    return /^(.*)\\$$/\n  }\n  search(text) {\n    const isMatch = text.endsWith(this.pattern);\n\n    return {\n      isMatch,\n      score: isMatch ? 0 : 1,\n      indices: [text.length - this.pattern.length, text.length - 1]\n    }\n  }\n}\n\n// Token: !.file$\n\nclass InverseSuffixExactMatch extends BaseMatch {\n  constructor(pattern) {\n    super(pattern);\n  }\n  static get type() {\n    return 'inverse-suffix-exact'\n  }\n  static get multiRegex() {\n    return /^!\"(.*)\"\\$$/\n  }\n  static get singleRegex() {\n    return /^!(.*)\\$$/\n  }\n  search(text) {\n    const isMatch = !text.endsWith(this.pattern);\n    return {\n      isMatch,\n      score: isMatch ? 0 : 1,\n      indices: [0, text.length - 1]\n    }\n  }\n}\n\nclass FuzzyMatch extends BaseMatch {\n  constructor(\n    pattern,\n    {\n      location = Config.location,\n      threshold = Config.threshold,\n      distance = Config.distance,\n      includeMatches = Config.includeMatches,\n      findAllMatches = Config.findAllMatches,\n      minMatchCharLength = Config.minMatchCharLength,\n      isCaseSensitive = Config.isCaseSensitive,\n      ignoreDiacritics = Config.ignoreDiacritics,\n      ignoreLocation = Config.ignoreLocation\n    } = {}\n  ) {\n    super(pattern);\n    this._bitapSearch = new BitapSearch(pattern, {\n      location,\n      threshold,\n      distance,\n      includeMatches,\n      findAllMatches,\n      minMatchCharLength,\n      isCaseSensitive,\n      ignoreDiacritics,\n      ignoreLocation\n    });\n  }\n  static get type() {\n    return 'fuzzy'\n  }\n  static get multiRegex() {\n    return /^\"(.*)\"$/\n  }\n  static get singleRegex() {\n    return /^(.*)$/\n  }\n  search(text) {\n    return this._bitapSearch.searchIn(text)\n  }\n}\n\n// Token: 'file\n\nclass IncludeMatch extends BaseMatch {\n  constructor(pattern) {\n    super(pattern);\n  }\n  static get type() {\n    return 'include'\n  }\n  static get multiRegex() {\n    return /^'\"(.*)\"$/\n  }\n  static get singleRegex() {\n    return /^'(.*)$/\n  }\n  search(text) {\n    let location = 0;\n    let index;\n\n    const indices = [];\n    const patternLen = this.pattern.length;\n\n    // Get all exact matches\n    while ((index = text.indexOf(this.pattern, location)) > -1) {\n      location = index + patternLen;\n      indices.push([index, location - 1]);\n    }\n\n    const isMatch = !!indices.length;\n\n    return {\n      isMatch,\n      score: isMatch ? 0 : 1,\n      indices\n    }\n  }\n}\n\n// ❗Order is important. DO NOT CHANGE.\nconst searchers = [\n  ExactMatch,\n  IncludeMatch,\n  PrefixExactMatch,\n  InversePrefixExactMatch,\n  InverseSuffixExactMatch,\n  SuffixExactMatch,\n  InverseExactMatch,\n  FuzzyMatch\n];\n\nconst searchersLen = searchers.length;\n\n// Regex to split by spaces, but keep anything in quotes together\nconst SPACE_RE = / +(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)/;\nconst OR_TOKEN = '|';\n\n// Return a 2D array representation of the query, for simpler parsing.\n// Example:\n// \"^core go$ | rb$ | py$ xy$\" => [[\"^core\", \"go$\"], [\"rb$\"], [\"py$\", \"xy$\"]]\nfunction parseQuery(pattern, options = {}) {\n  return pattern.split(OR_TOKEN).map((item) => {\n    let query = item\n      .trim()\n      .split(SPACE_RE)\n      .filter((item) => item && !!item.trim());\n\n    let results = [];\n    for (let i = 0, len = query.length; i < len; i += 1) {\n      const queryItem = query[i];\n\n      // 1. Handle multiple query match (i.e, once that are quoted, like `\"hello world\"`)\n      let found = false;\n      let idx = -1;\n      while (!found && ++idx < searchersLen) {\n        const searcher = searchers[idx];\n        let token = searcher.isMultiMatch(queryItem);\n        if (token) {\n          results.push(new searcher(token, options));\n          found = true;\n        }\n      }\n\n      if (found) {\n        continue\n      }\n\n      // 2. Handle single query matches (i.e, once that are *not* quoted)\n      idx = -1;\n      while (++idx < searchersLen) {\n        const searcher = searchers[idx];\n        let token = searcher.isSingleMatch(queryItem);\n        if (token) {\n          results.push(new searcher(token, options));\n          break\n        }\n      }\n    }\n\n    return results\n  })\n}\n\n// These extended matchers can return an array of matches, as opposed\n// to a singl match\nconst MultiMatchSet = new Set([FuzzyMatch.type, IncludeMatch.type]);\n\n/**\n * Command-like searching\n * ======================\n *\n * Given multiple search terms delimited by spaces.e.g. `^jscript .python$ ruby !java`,\n * search in a given text.\n *\n * Search syntax:\n *\n * | Token       | Match type                 | Description                            |\n * | ----------- | -------------------------- | -------------------------------------- |\n * | `jscript`   | fuzzy-match                | Items that fuzzy match `jscript`       |\n * | `=scheme`   | exact-match                | Items that are `scheme`                |\n * | `'python`   | include-match              | Items that include `python`            |\n * | `!ruby`     | inverse-exact-match        | Items that do not include `ruby`       |\n * | `^java`     | prefix-exact-match         | Items that start with `java`           |\n * | `!^earlang` | inverse-prefix-exact-match | Items that do not start with `earlang` |\n * | `.js$`      | suffix-exact-match         | Items that end with `.js`              |\n * | `!.go$`     | inverse-suffix-exact-match | Items that do not end with `.go`       |\n *\n * A single pipe character acts as an OR operator. For example, the following\n * query matches entries that start with `core` and end with either`go`, `rb`,\n * or`py`.\n *\n * ```\n * ^core go$ | rb$ | py$\n * ```\n */\nclass ExtendedSearch {\n  constructor(\n    pattern,\n    {\n      isCaseSensitive = Config.isCaseSensitive,\n      ignoreDiacritics = Config.ignoreDiacritics,\n      includeMatches = Config.includeMatches,\n      minMatchCharLength = Config.minMatchCharLength,\n      ignoreLocation = Config.ignoreLocation,\n      findAllMatches = Config.findAllMatches,\n      location = Config.location,\n      threshold = Config.threshold,\n      distance = Config.distance\n    } = {}\n  ) {\n    this.query = null;\n    this.options = {\n      isCaseSensitive,\n      ignoreDiacritics,\n      includeMatches,\n      minMatchCharLength,\n      findAllMatches,\n      ignoreLocation,\n      location,\n      threshold,\n      distance\n    };\n\n    pattern = isCaseSensitive ? pattern : pattern.toLowerCase();\n    pattern = ignoreDiacritics ? stripDiacritics(pattern) : pattern;\n    this.pattern = pattern;\n    this.query = parseQuery(this.pattern, this.options);\n  }\n\n  static condition(_, options) {\n    return options.useExtendedSearch\n  }\n\n  searchIn(text) {\n    const query = this.query;\n\n    if (!query) {\n      return {\n        isMatch: false,\n        score: 1\n      }\n    }\n\n    const { includeMatches, isCaseSensitive, ignoreDiacritics } = this.options;\n\n    text = isCaseSensitive ? text : text.toLowerCase();\n    text = ignoreDiacritics ? stripDiacritics(text) : text;\n\n    let numMatches = 0;\n    let allIndices = [];\n    let totalScore = 0;\n\n    // ORs\n    for (let i = 0, qLen = query.length; i < qLen; i += 1) {\n      const searchers = query[i];\n\n      // Reset indices\n      allIndices.length = 0;\n      numMatches = 0;\n\n      // ANDs\n      for (let j = 0, pLen = searchers.length; j < pLen; j += 1) {\n        const searcher = searchers[j];\n        const { isMatch, indices, score } = searcher.search(text);\n\n        if (isMatch) {\n          numMatches += 1;\n          totalScore += score;\n          if (includeMatches) {\n            const type = searcher.constructor.type;\n            if (MultiMatchSet.has(type)) {\n              allIndices = [...allIndices, ...indices];\n            } else {\n              allIndices.push(indices);\n            }\n          }\n        } else {\n          totalScore = 0;\n          numMatches = 0;\n          allIndices.length = 0;\n          break\n        }\n      }\n\n      // OR condition, so if TRUE, return\n      if (numMatches) {\n        let result = {\n          isMatch: true,\n          score: totalScore / numMatches\n        };\n\n        if (includeMatches) {\n          result.indices = allIndices;\n        }\n\n        return result\n      }\n    }\n\n    // Nothing was matched\n    return {\n      isMatch: false,\n      score: 1\n    }\n  }\n}\n\nconst registeredSearchers = [];\n\nfunction register(...args) {\n  registeredSearchers.push(...args);\n}\n\nfunction createSearcher(pattern, options) {\n  for (let i = 0, len = registeredSearchers.length; i < len; i += 1) {\n    let searcherClass = registeredSearchers[i];\n    if (searcherClass.condition(pattern, options)) {\n      return new searcherClass(pattern, options)\n    }\n  }\n\n  return new BitapSearch(pattern, options)\n}\n\nconst LogicalOperator = {\n  AND: '$and',\n  OR: '$or'\n};\n\nconst KeyType = {\n  PATH: '$path',\n  PATTERN: '$val'\n};\n\nconst isExpression = (query) =>\n  !!(query[LogicalOperator.AND] || query[LogicalOperator.OR]);\n\nconst isPath = (query) => !!query[KeyType.PATH];\n\nconst isLeaf = (query) =>\n  !isArray(query) && isObject(query) && !isExpression(query);\n\nconst convertToExplicit = (query) => ({\n  [LogicalOperator.AND]: Object.keys(query).map((key) => ({\n    [key]: query[key]\n  }))\n});\n\n// When `auto` is `true`, the parse function will infer and initialize and add\n// the appropriate `Searcher` instance\nfunction parse(query, options, { auto = true } = {}) {\n  const next = (query) => {\n    let keys = Object.keys(query);\n\n    const isQueryPath = isPath(query);\n\n    if (!isQueryPath && keys.length > 1 && !isExpression(query)) {\n      return next(convertToExplicit(query))\n    }\n\n    if (isLeaf(query)) {\n      const key = isQueryPath ? query[KeyType.PATH] : keys[0];\n\n      const pattern = isQueryPath ? query[KeyType.PATTERN] : query[key];\n\n      if (!isString(pattern)) {\n        throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key))\n      }\n\n      const obj = {\n        keyId: createKeyId(key),\n        pattern\n      };\n\n      if (auto) {\n        obj.searcher = createSearcher(pattern, options);\n      }\n\n      return obj\n    }\n\n    let node = {\n      children: [],\n      operator: keys[0]\n    };\n\n    keys.forEach((key) => {\n      const value = query[key];\n\n      if (isArray(value)) {\n        value.forEach((item) => {\n          node.children.push(next(item));\n        });\n      }\n    });\n\n    return node\n  };\n\n  if (!isExpression(query)) {\n    query = convertToExplicit(query);\n  }\n\n  return next(query)\n}\n\n// Practical scoring function\nfunction computeScore(\n  results,\n  { ignoreFieldNorm = Config.ignoreFieldNorm }\n) {\n  results.forEach((result) => {\n    let totalScore = 1;\n\n    result.matches.forEach(({ key, norm, score }) => {\n      const weight = key ? key.weight : null;\n\n      totalScore *= Math.pow(\n        score === 0 && weight ? Number.EPSILON : score,\n        (weight || 1) * (ignoreFieldNorm ? 1 : norm)\n      );\n    });\n\n    result.score = totalScore;\n  });\n}\n\nfunction transformMatches(result, data) {\n  const matches = result.matches;\n  data.matches = [];\n\n  if (!isDefined(matches)) {\n    return\n  }\n\n  matches.forEach((match) => {\n    if (!isDefined(match.indices) || !match.indices.length) {\n      return\n    }\n\n    const { indices, value } = match;\n\n    let obj = {\n      indices,\n      value\n    };\n\n    if (match.key) {\n      obj.key = match.key.src;\n    }\n\n    if (match.idx > -1) {\n      obj.refIndex = match.idx;\n    }\n\n    data.matches.push(obj);\n  });\n}\n\nfunction transformScore(result, data) {\n  data.score = result.score;\n}\n\nfunction format(\n  results,\n  docs,\n  {\n    includeMatches = Config.includeMatches,\n    includeScore = Config.includeScore\n  } = {}\n) {\n  const transformers = [];\n\n  if (includeMatches) transformers.push(transformMatches);\n  if (includeScore) transformers.push(transformScore);\n\n  return results.map((result) => {\n    const { idx } = result;\n\n    const data = {\n      item: docs[idx],\n      refIndex: idx\n    };\n\n    if (transformers.length) {\n      transformers.forEach((transformer) => {\n        transformer(result, data);\n      });\n    }\n\n    return data\n  })\n}\n\nclass Fuse {\n  constructor(docs, options = {}, index) {\n    this.options = { ...Config, ...options };\n\n    if (\n      this.options.useExtendedSearch &&\n      !true\n    ) {\n      throw new Error(EXTENDED_SEARCH_UNAVAILABLE)\n    }\n\n    this._keyStore = new KeyStore(this.options.keys);\n\n    this.setCollection(docs, index);\n  }\n\n  setCollection(docs, index) {\n    this._docs = docs;\n\n    if (index && !(index instanceof FuseIndex)) {\n      throw new Error(INCORRECT_INDEX_TYPE)\n    }\n\n    this._myIndex =\n      index ||\n      createIndex(this.options.keys, this._docs, {\n        getFn: this.options.getFn,\n        fieldNormWeight: this.options.fieldNormWeight\n      });\n  }\n\n  add(doc) {\n    if (!isDefined(doc)) {\n      return\n    }\n\n    this._docs.push(doc);\n    this._myIndex.add(doc);\n  }\n\n  remove(predicate = (/* doc, idx */) => false) {\n    const results = [];\n\n    for (let i = 0, len = this._docs.length; i < len; i += 1) {\n      const doc = this._docs[i];\n      if (predicate(doc, i)) {\n        this.removeAt(i);\n        i -= 1;\n        len -= 1;\n\n        results.push(doc);\n      }\n    }\n\n    return results\n  }\n\n  removeAt(idx) {\n    this._docs.splice(idx, 1);\n    this._myIndex.removeAt(idx);\n  }\n\n  getIndex() {\n    return this._myIndex\n  }\n\n  search(query, { limit = -1 } = {}) {\n    const {\n      includeMatches,\n      includeScore,\n      shouldSort,\n      sortFn,\n      ignoreFieldNorm\n    } = this.options;\n\n    let results = isString(query)\n      ? isString(this._docs[0])\n        ? this._searchStringList(query)\n        : this._searchObjectList(query)\n      : this._searchLogical(query);\n\n    computeScore(results, { ignoreFieldNorm });\n\n    if (shouldSort) {\n      results.sort(sortFn);\n    }\n\n    if (isNumber(limit) && limit > -1) {\n      results = results.slice(0, limit);\n    }\n\n    return format(results, this._docs, {\n      includeMatches,\n      includeScore\n    })\n  }\n\n  _searchStringList(query) {\n    const searcher = createSearcher(query, this.options);\n    const { records } = this._myIndex;\n    const results = [];\n\n    // Iterate over every string in the index\n    records.forEach(({ v: text, i: idx, n: norm }) => {\n      if (!isDefined(text)) {\n        return\n      }\n\n      const { isMatch, score, indices } = searcher.searchIn(text);\n\n      if (isMatch) {\n        results.push({\n          item: text,\n          idx,\n          matches: [{ score, value: text, norm, indices }]\n        });\n      }\n    });\n\n    return results\n  }\n\n  _searchLogical(query) {\n\n    const expression = parse(query, this.options);\n\n    const evaluate = (node, item, idx) => {\n      if (!node.children) {\n        const { keyId, searcher } = node;\n\n        const matches = this._findMatches({\n          key: this._keyStore.get(keyId),\n          value: this._myIndex.getValueForItemAtKeyId(item, keyId),\n          searcher\n        });\n\n        if (matches && matches.length) {\n          return [\n            {\n              idx,\n              item,\n              matches\n            }\n          ]\n        }\n\n        return []\n      }\n\n      const res = [];\n      for (let i = 0, len = node.children.length; i < len; i += 1) {\n        const child = node.children[i];\n        const result = evaluate(child, item, idx);\n        if (result.length) {\n          res.push(...result);\n        } else if (node.operator === LogicalOperator.AND) {\n          return []\n        }\n      }\n      return res\n    };\n\n    const records = this._myIndex.records;\n    const resultMap = {};\n    const results = [];\n\n    records.forEach(({ $: item, i: idx }) => {\n      if (isDefined(item)) {\n        let expResults = evaluate(expression, item, idx);\n\n        if (expResults.length) {\n          // Dedupe when adding\n          if (!resultMap[idx]) {\n            resultMap[idx] = { idx, item, matches: [] };\n            results.push(resultMap[idx]);\n          }\n          expResults.forEach(({ matches }) => {\n            resultMap[idx].matches.push(...matches);\n          });\n        }\n      }\n    });\n\n    return results\n  }\n\n  _searchObjectList(query) {\n    const searcher = createSearcher(query, this.options);\n    const { keys, records } = this._myIndex;\n    const results = [];\n\n    // List is Array<Object>\n    records.forEach(({ $: item, i: idx }) => {\n      if (!isDefined(item)) {\n        return\n      }\n\n      let matches = [];\n\n      // Iterate over every key (i.e, path), and fetch the value at that key\n      keys.forEach((key, keyIndex) => {\n        matches.push(\n          ...this._findMatches({\n            key,\n            value: item[keyIndex],\n            searcher\n          })\n        );\n      });\n\n      if (matches.length) {\n        results.push({\n          idx,\n          item,\n          matches\n        });\n      }\n    });\n\n    return results\n  }\n  _findMatches({ key, value, searcher }) {\n    if (!isDefined(value)) {\n      return []\n    }\n\n    let matches = [];\n\n    if (isArray(value)) {\n      value.forEach(({ v: text, i: idx, n: norm }) => {\n        if (!isDefined(text)) {\n          return\n        }\n\n        const { isMatch, score, indices } = searcher.searchIn(text);\n\n        if (isMatch) {\n          matches.push({\n            score,\n            key,\n            value: text,\n            idx,\n            norm,\n            indices\n          });\n        }\n      });\n    } else {\n      const { v: text, n: norm } = value;\n\n      const { isMatch, score, indices } = searcher.searchIn(text);\n\n      if (isMatch) {\n        matches.push({ score, key, value: text, norm, indices });\n      }\n    }\n\n    return matches\n  }\n}\n\nFuse.version = '7.1.0';\nFuse.createIndex = createIndex;\nFuse.parseIndex = parseIndex;\nFuse.config = Config;\n\n{\n  Fuse.parseQuery = parse;\n}\n\n{\n  register(ExtendedSearch);\n}\n\nexport { Fuse as default };\n"
  },
  {
    "path": "docs/.vuepress/client.ts",
    "content": "import { defineClientConfig } from '@vuepress/client'\nimport Layout from './layouts/Layout.vue'\n\n// @ts-expect-error monaco editor doesn't have types for the workers\nimport editorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker'\n// @ts-expect-error monaco editor doesn't have types for the workers\nimport jsonWorker from 'monaco-editor/esm/vs/language/json/json.worker?worker'\n// @ts-expect-error monaco editor doesn't have types for the workers\nimport tsWorker from 'monaco-editor/esm/vs/language/typescript/ts.worker?worker'\n\nexport default defineClientConfig({\n  layouts: {\n    Layout\n  },\n  enhance({ router }) {\n    if (!__VUEPRESS_SSR__) {\n      self.MonacoEnvironment = {\n        getWorker(_, label) {\n          switch (label) {\n            case 'json':\n              return new jsonWorker()\n            case 'typescript':\n            case 'javascript':\n              return new tsWorker()\n            default:\n              return editorWorker()\n          }\n        }\n      }\n    }\n\n    router.addRoute('/', {\n      path: '/ads.txt',\n      redirect: '',\n      beforeEnter: () => {\n        window.location.replace('https://cdn4.buysellads.net/ads.txt')\n      }\n    })\n\n    router.addRoute('/', {\n      path: '/app-ads.txt',\n      redirect: '',\n      beforeEnter: () => {\n        window.location.replace('https://cdn4.buysellads.net/app-ads.txt')\n      }\n    })\n  }\n})\n\ndeclare global {\n  const __VUEPRESS_SSR__: boolean\n  const _bsa: any\n\n  interface Window {\n    MonacoEnvironment?: import('monaco-editor').Environment | undefined\n  }\n}\n"
  },
  {
    "path": "docs/.vuepress/components/Demo/Demo.vue",
    "content": "<template>\n  <section>\n    <MonacoEditor\n      language=\"json\"\n      v-model=\"state.jsonData\"\n      id=\"json-list-monaco-editor\"\n      file-name=\"list.json\"\n      file-description=\"list of items to search\"\n    ></MonacoEditor>\n  </section>\n\n  <section class=\"search-section\">\n    <input\n      type=\"text\"\n      class=\"search-section-input\"\n      v-model=\"state.searchPattern\"\n      @keyup=\"onSearchPatternKeyUp\"\n      placeholder=\"Search...\"\n    />\n  </section>\n\n  <section>\n    <MonacoEditor\n      language=\"javascript\"\n      v-model=\"state.mainJsData\"\n      id=\"main-monaco-editor\"\n      file-name=\"main.js\"\n      file-description=\"entry module\"\n      @update:modelValue=\"updateMainJsData\"\n    ></MonacoEditor>\n  </section>\n\n  <section class=\"monaco-editor-results\">\n    <MonacoEditor\n      language=\"json\"\n      v-model=\"state.resultsData\"\n      id=\"main-monaco-editor\"\n      file-name=\"Results:\"\n      :file-description=\"\n        isNullish(state.count) || isNullish(state.searchTime)\n          ? ''\n          : 'found ' + state.count + ' in ' + state.searchTime + 'ms'\n      \"\n      readonly\n    ></MonacoEditor>\n  </section>\n</template>\n\n<script setup lang=\"ts\">\nimport { Stopwatch } from '@sapphire/stopwatch'\nimport { isNullish, isObject, tryParseJSON } from '@sapphire/utilities'\nimport { reactive } from 'vue'\nimport Fuse, { IFuseOptions } from '../../../../dist/fuse'\nimport Books from './books.js'\nimport MonacoEditor from './MonacoEditor.vue'\n\ninterface State {\n  searchPattern: string\n  jsonData: string\n  mainJsData: string\n  resultsData: string\n  count: number | null\n  searchTime: string | null\n  fuseSearchOptions: IFuseOptions<never>\n}\n\nconst defaultFuseSearchOptions: IFuseOptions<never> = {\n  isCaseSensitive: false,\n  includeScore: false,\n  ignoreDiacritics: false,\n  shouldSort: true,\n  includeMatches: false,\n  findAllMatches: false,\n  minMatchCharLength: 1,\n  location: 0,\n  threshold: 0.6,\n  distance: 100,\n  useExtendedSearch: false,\n  ignoreLocation: false,\n  ignoreFieldNorm: false,\n  fieldNormWeight: 1\n}\n\nfunction codify(\n  searchPattern: string,\n  fuseSearchOptions: IFuseOptions<never> = defaultFuseSearchOptions\n): string {\n  return `\nconst Fuse = require('fuse.js');\n\nconst fuseOptions = {\n${Object.entries(fuseSearchOptions)\n  .map(([key, value]) => `\\t// ${key}: ${value},`)\n  .join('\\n')}\n\\tkeys: [\n\\t\\t\"title\",\n\\t\\t\"author.firstName\"\n\\t]\n};\n\nconst fuse = new Fuse(list, fuseOptions);\n\n// Change the pattern\nconst searchPattern = \"${searchPattern}\"\n\nreturn fuse.search(searchPattern)`\n}\n\nconst state = reactive<State>({\n  searchPattern: '',\n  jsonData: JSON.stringify(Books, null, 2),\n  mainJsData: codify(''),\n  resultsData: JSON.stringify({}, null, 2),\n  count: null,\n  searchTime: null,\n  fuseSearchOptions: defaultFuseSearchOptions\n})\n\nfunction removeComments(str: string) {\n  let lines = str.split('\\n')\n  lines = lines.filter((line) => !line.startsWith('//'))\n  return lines.join('\\n')\n}\n\nfunction updateMainJsData(newValue: string) {\n  const newFuseOptionsString = removeComments(\n    newValue\n      .replace(/const Fuse = require\\('fuse\\.js'\\);\\n\\n/, '')\n      .replace(/const fuse = new Fuse\\(list, fuseOptions\\);\\n\\n/, '')\n      .replace(/\\/\\/ Change the pattern\\n/, '')\n      .replace(/const searchPattern = \".+\"\\n\\n/, '')\n      .replace(/return fuse\\.search\\(searchPattern\\)/, '')\n      .replace(/\\n\\n/, '')\n      .replace(/\\t/g, '')\n      .replaceAll(';', '')\n      .replace(/const fuseOptions = /, '')\n  ).replaceAll(/([a-zA-Z]+):/g, '\"$1\":')\n\n  const newFuseOptions = tryParseJSON(newFuseOptionsString)\n\n  doFuseSearch(isObject(newFuseOptions) ? newFuseOptions : undefined)\n}\n\nfunction onSearchPatternKeyUp() {\n  state.mainJsData = codify(state.searchPattern, state.fuseSearchOptions)\n\n  doFuseSearch()\n}\n\nfunction doFuseSearch(fuseSearchOptions = state.fuseSearchOptions) {\n  try {\n    const fuseOptions: IFuseOptions<never> = {\n      keys: ['title', 'author.firstName'],\n      ...fuseSearchOptions\n    }\n\n    const fuse = new Fuse(JSON.parse(state.jsonData), fuseOptions)\n\n    const stopwatch = new Stopwatch()\n\n    const result = fuse.search(state.searchPattern)\n    const searchTime = stopwatch.stop().duration\n\n    state.count = result.length\n    state.searchTime = searchTime.toFixed(1)\n    state.resultsData = JSON.stringify(result, null, 2)\n  } catch {\n    state.count = null\n    state.searchTime = null\n    state.resultsData = JSON.stringify({}, null, 2)\n  }\n}\n</script>\n\n<style scoped lang=\"css\">\n.monaco-editor-results {\n  margin-top: 20px;\n}\n\n.search-section {\n  margin-top: 20px;\n  margin-bottom: 20px;\n  width: 100%;\n}\n\n.search-section-input {\n  font-size: 16px;\n  width: 100%;\n\n  color: rgb(156, 181, 200);\n  background-color: rgb(24, 26, 27);\n  background-image: none;\n  border-color: rgb(56, 60, 63);\n\n  padding: 0.45rem 0.75rem;\n  font-size: 1rem;\n  line-height: 1.5;\n  width: 96%;\n  border: 1px solid #e1e3e6;\n  border-radius: 4px;\n}\n\nhtml.dark .search-section-input {\n  border: 1px solid #878e99;\n}\n</style>\n"
  },
  {
    "path": "docs/.vuepress/components/Demo/MonacoEditor.vue",
    "content": "<script setup lang=\"ts\">\nimport loader from '@monaco-editor/loader'\nimport { isFunction } from '@sapphire/utilities'\nimport * as Monaco from 'monaco-editor'\nimport { computed, onMounted, ref, watch } from 'vue'\n\ninterface Emits {\n  (event: 'update:modelValue', value: string): void\n  (event: 'load', editor: Monaco.editor.IStandaloneCodeEditor): void\n}\n\nconst props = defineProps<{\n  language: string\n  modelValue: string\n  id: string\n  fileName: string\n  fileDescription: string\n  readonly?: boolean\n}>()\n\nconst loadedMonaco = isFunction(loader.init) ? await loader.init() : undefined\n\nconst emit = defineEmits<Emits>()\nconst isLoading = ref(true)\nconst lang = computed(() => props.language)\nconst editorElement = ref<HTMLDivElement>()\nconst monaco = ref(loadedMonaco)\n\nlet editor: Monaco.editor.IStandaloneCodeEditor\nlet model: Monaco.editor.ITextModel\nconst editorRef = ref()\n\nwatch(\n  () => props.modelValue,\n  () => {\n    if (editor?.getValue() !== props.modelValue) {\n      editor?.setValue(props.modelValue)\n    }\n  }\n)\n\nwatch(\n  () => props.language,\n  () => {\n    if (model) {\n      model.dispose()\n    }\n    model = monaco.value.editor.createModel(props.modelValue, lang.value)\n    editor?.setModel(model)\n  }\n)\n\ndefineExpose({\n  /**\n   * Monaco editor instance\n   */\n  $editor: editorRef\n})\n\nonMounted(() => {\n  editor = monaco.value.editor.create(editorElement.value, {\n    language: props.language,\n    automaticLayout: true,\n    selectOnLineNumbers: true,\n    wordWrap: 'on',\n    wrappingStrategy: 'advanced',\n    minimap: {\n      enabled: false\n    },\n    autoClosingQuotes: 'always',\n    bracketPairColorization: {\n      enabled: true\n    },\n    colorDecorators: true,\n    cursorBlinking: 'expand',\n    cursorSmoothCaretAnimation: true,\n    fontLigatures: true,\n    fontFamily:\n      '\"Fira Code\", \"JetBrains Mono\", \"Menlo\", \"Monaco\", \"Consolas\", \"Courier New\", \"monospace\"',\n    formatOnPaste: true,\n    guides: {\n      bracketPairs: true\n    },\n    theme: 'vs-dark',\n    smartSelect: {\n      selectLeadingAndTrailingWhitespace: true\n    },\n    tabCompletion: 'on',\n    useShadowDOM: true,\n    scrollBeyondLastLine: false,\n    ...(props.readonly && {\n      readOnly: true,\n      contextmenu: false\n    })\n  })\n\n  editorRef.value = editor\n  model = monaco.value.editor.createModel(props.modelValue, lang.value)\n  editor.setModel(model)\n  editor.onDidChangeModelContent(() => {\n    emit('update:modelValue', editor.getValue())\n  })\n  isLoading.value = false\n  emit('load', editor)\n})\n</script>\n\n<template>\n  <div class=\"header\">\n    <div>{{ props.fileName }}</div>\n    <div>{{ props.fileDescription }}</div>\n  </div>\n  <div :id=\"props.id\" class=\"editor\" ref=\"editorElement\">\n    <slot v-if=\"isLoading\" />\n  </div>\n</template>\n\n<style scoped>\n.editor {\n  height: 35vh;\n}\n\n.header {\n  align-items: center;\n  background: #ffffff;\n  border: solid 1px #ffffff;\n  display: flex;\n  height: 30px;\n  justify-content: space-between;\n  padding: 0px 1%;\n  width: 97.5%;\n}\n\nhtml.dark .header {\n  background: #1e1e1e;\n  border: solid 1px #3c3c3c;\n}\n</style>\n"
  },
  {
    "path": "docs/.vuepress/components/Demo/books.ts",
    "content": "const list = [\n  {\n    title: \"Old Man's War\",\n    author: {\n      firstName: 'John',\n      lastName: 'Scalzi'\n    }\n  },\n  {\n    title: 'The Lock Artist',\n    author: {\n      firstName: 'Steve',\n      lastName: 'Hamilton'\n    }\n  },\n  {\n    title: 'HTML5',\n    author: {\n      firstName: 'Remy',\n      lastName: 'Sharp'\n    }\n  },\n  {\n    title: 'Right Ho Jeeves',\n    author: {\n      firstName: 'P.D',\n      lastName: 'Woodhouse'\n    }\n  },\n  {\n    title: 'The Code of the Wooster',\n    author: {\n      firstName: 'P.D',\n      lastName: 'Woodhouse'\n    }\n  },\n  {\n    title: 'Thank You Jeeves',\n    author: {\n      firstName: 'P.D',\n      lastName: 'Woodhouse'\n    }\n  },\n  {\n    title: 'The DaVinci Code',\n    author: {\n      firstName: 'Dan',\n      lastName: 'Brown'\n    }\n  },\n  {\n    title: 'Angels & Demons',\n    author: {\n      firstName: 'Dan',\n      lastName: 'Brown'\n    }\n  },\n  {\n    title: 'The Silmarillion',\n    author: {\n      firstName: 'J.R.R',\n      lastName: 'Tolkien'\n    }\n  },\n  {\n    title: 'Syrup',\n    author: {\n      firstName: 'Max',\n      lastName: 'Barry'\n    }\n  },\n  {\n    title: 'The Lost Symbol',\n    author: {\n      firstName: 'Dan',\n      lastName: 'Brown'\n    }\n  },\n  {\n    title: 'The Book of Lies',\n    author: {\n      firstName: 'Brad',\n      lastName: 'Meltzer'\n    }\n  },\n  {\n    title: 'Lamb',\n    author: {\n      firstName: 'Christopher',\n      lastName: 'Moore'\n    }\n  },\n  {\n    title: 'Fool',\n    author: {\n      firstName: 'Christopher',\n      lastName: 'Moore'\n    }\n  },\n  {\n    title: 'Incompetence',\n    author: {\n      firstName: 'Rob',\n      lastName: 'Grant'\n    }\n  },\n  {\n    title: 'Fat',\n    author: {\n      firstName: 'Rob',\n      lastName: 'Grant'\n    }\n  },\n  {\n    title: 'Colony',\n    author: {\n      firstName: 'Rob',\n      lastName: 'Grant'\n    }\n  },\n  {\n    title: 'Backwards, Red Dwarf',\n    author: {\n      firstName: 'Rob',\n      lastName: 'Grant'\n    }\n  },\n  {\n    title: 'The Grand Design',\n    author: {\n      firstName: 'Stephen',\n      lastName: 'Hawking'\n    }\n  },\n  {\n    title: 'The Book of Samson',\n    author: {\n      firstName: 'David',\n      lastName: 'Maine'\n    }\n  },\n  {\n    title: 'The Preservationist',\n    author: {\n      firstName: 'David',\n      lastName: 'Maine'\n    }\n  },\n  {\n    title: 'Fallen',\n    author: {\n      firstName: 'David',\n      lastName: 'Maine'\n    }\n  },\n  {\n    title: 'Monster 1959',\n    author: {\n      firstName: 'David',\n      lastName: 'Maine'\n    }\n  }\n]\n\nexport default list\n"
  },
  {
    "path": "docs/.vuepress/components/Donate/Donate.vue",
    "content": "<template>\n  <div class=\"donate-link-wrapper\">\n    <strong>❤️️ Fuse.js? Support its development with a small donation.</strong>\n    <br />\n    <a href=\"https://github.com/sponsors/krisk\" class=\"donate-btn\">Donate</a>\n  </div>\n</template>\n\n<style>\n.donate-link-wrapper {\n  padding-top: 20px;\n}\n\n.donate-btn {\n  display: inline-block;\n  text-align: center;\n  text-decoration: none;\n  border: 0;\n  cursor: pointer;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: antialiased;\n  outline: 0;\n  box-sizing: border-box;\n  background: #9066b8;\n  color: #fff;\n  font-weight: 700;\n  cursor: pointer;\n  border-radius: 20px;\n  margin: 20px 0 0 0;\n  padding: 10px 30px;\n}\n.donate-btn:focus {\n  outline: 0;\n  text-decoration: none;\n}\n.donate-btn:hover {\n  background-color: #a684c6;\n  transition: background-color 250ms;\n  text-decoration: none !important;\n}\n</style>\n"
  },
  {
    "path": "docs/.vuepress/components/Jobs/Jobs.vue",
    "content": "<template>\n  <input\n    class=\"filter-input\"\n    type=\"text\"\n    v-model=\"pattern\"\n    @keyup=\"onPatternKeyUp\"\n    placeholder=\"Filter by keywords, location, job type...\"\n  />\n  <section>\n    <ul class=\"job-listings\">\n      <li class=\"job-container\" v-for=\"job in results\">\n        <article class=\"job-data\">\n          <a :href=\"job.learn_more_url\" target=\"_blank\" rel=\"noopener\">\n            <p class=\"job-title\">{{ job.role }}</p>\n          </a>\n          <div>\n            <strong>{{ job.company }}</strong> - <span>{{ job.location }}</span>\n          </div>\n          <p v-html=\"job.description\"></p>\n        </article>\n      </li>\n    </ul>\n  </section>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport Fuse from '../../../../dist/fuse'\nimport jobsData from './jobs'\n\nconst results = ref(jobsData)\nconst pattern = ref('')\nconst fuse = ref(\n  new Fuse(jobsData, {\n    ignoreFieldNorm: true,\n    keys: ['role', 'company', 'location', 'tags']\n  })\n)\n\nfunction onPatternKeyUp() {\n  let newSearchResults = fuse.value.search(pattern.value)\n  results.value = newSearchResults.length\n    ? newSearchResults.map(({ item }) => item)\n    : jobsData\n}\n</script>\n\n<style scoped lang=\"css\">\n.filter-input {\n  font-size: 16px;\n  width: 100%;\n\n  color: rgb(156, 181, 200);\n  background-color: rgb(24, 26, 27);\n  background-image: none;\n  border-color: rgb(56, 60, 63);\n\n  padding: 0.45rem 0.75rem;\n  font-size: 1rem;\n  line-height: 1.5;\n  width: 96%;\n  border: 1px solid #e1e3e6;\n  border-radius: 4px;\n}\n\nhtml.dark .filter-input {\n  border: 1px solid #878e99;\n}\n\n.job-listings {\n  padding: 0;\n}\n\n.job-container {\n  display: flex;\n  border-bottom: 1px dotted #ddd;\n}\n\n.job-listings .job-data .job-title {\n  margin-bottom: 5px;\n  font-weight: 600;\n  line-height: 1.25;\n  overflow-wrap: break-word;\n  font-size: 1.35rem;\n}\n</style>\n"
  },
  {
    "path": "docs/.vuepress/components/Jobs/jobs.ts",
    "content": "export default [\n  {\n    role: 'Senior Full Stack Engineer',\n    company: 'RebelMouse',\n    type: 'FULL_TIME',\n    location: 'Worldwide',\n    description:\n      'Our applications are build with Python, JavaScript (es6+), variety of frameworks as well as vanilla, Node.js, MongoDB, Redis, MySQL, Memcached. Our product is cloud-native and relies on services provided by AWS.',\n    learn_more_url:\n      'https://careers.rebelmouse.com/o/senior-fullstack-engineer',\n    tags: []\n  },\n  {\n    role: 'Full Stack Engineer',\n    company: 'Apple ',\n    type: 'FULL_TIME',\n    location: 'Cupertino, CA',\n    description:\n      'Marcom is Apple’s Global Marketing Communications group. We lead all of Apple’s advertising and marketing to ensure the flawless development and execution of world class communications.',\n    learn_more_url:\n      'https://jobs.apple.com/en-us/details/113025781?board=49609',\n    tags: []\n  },\n  {\n    role: 'Software Developer',\n    company: 'Prezi ',\n    type: 'FULL_TIME',\n    location: 'San Francisco',\n    description:\n      'Prezi strives to enable people to share ideas with each other, using our extraordinary product in a provenly more engaging and more effective way by helping millions of people build and deliver moving stories.',\n    learn_more_url: 'https://grnh.se/d5687acb1',\n    tags: []\n  }\n]\n"
  },
  {
    "path": "docs/.vuepress/components/Sponsors/Sponsors.vue",
    "content": "<template>\n  <div class=\"sponsors\">\n    <h4 class=\"shimmer\">Sponsors</h4>\n    <div class=\"sponsor-section silver\">\n      <a\n        class=\"sponsor-item\"\n        :href=\"sponsor.url\"\n        target=\"_blank\"\n        rel=\"noopener\"\n        v-for=\"sponsor in sponsors\"\n        :key=\"sponsor.id\"\n      >\n        <img :src=\"sponsor.imgUrl\" :alt=\"sponsor.name\" />\n      </a>\n      <a href=\"/donate\" class=\"sponsor-item action\">Your logo</a>\n    </div>\n  </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\n\nconst sponsors = ref([\n  {\n    id: 1,\n    name: 'Worksome',\n    imgUrl: '/assets/img/sponsors/worksome.svg',\n    url: 'https://www.worksome.com',\n    description:\n      'Hire and manage talent globally with automated contracts and payroll.'\n  },\n  {\n    id: 2,\n    name: 'BairesDev',\n    imgUrl: '/assets/img/sponsors/bairesdev.png',\n    url: 'https://www.bairesdev.com/sponsoring-open-source-projects/',\n    description: 'Outsourced Tech Talent. Fast and Flexible.'\n  },\n  {\n    id: 3,\n    name: 'LITSLINK',\n    imgUrl: '/assets/img/sponsors/litslink.svg',\n    url: 'https://litslink.com',\n    description: 'Custom Software Development Company to Empower You with AI'\n  },\n  {\n    id: 4,\n    name: 'Quadratica',\n    imgUrl: '/assets/img/sponsors/quadratica.png',\n    url: 'https://quadrati.ca',\n    description: 'We will take you from an idea to an in-market product you can rely on. All in record time.'\n  }\n])\n</script>\n\n<style scoped lang=\"css\">\n.sponsors {\n  padding: 20px 0;\n}\n\n.sponsors h4 {\n  /* text-align: center; */\n  color: var(--c-text-lighter);\n}\n\n.sponsors .sponsor-section.silver {\n  /* text-align: center;\n  margin-top: 0; */\n  --max-width: 240px;\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(var(--max-width), 1fr));\n  column-gap: 4px;\n}\n\n@media (max-width: 720px) {\n  .sponsors .sponsor-section.silver {\n    --max-width: 180px;\n  }\n}\n\n@media (max-width: 480px) {\n  .sponsors .sponsor-section.silver {\n    --max-width: 150px;\n  }\n}\n\n.sponsors .sponsor-item {\n  /* margin: 10px 20px; */\n  background-color: #f9f9f9;\n  margin: 2px 0;\n  display: flex;\n  justify-content: space-around;\n  align-items: center;\n  border-radius: 2px;\n  transition: background-color 0.2s ease;\n  height: calc(var(--max-width) / 2 - 50px);\n}\n\n.dark .sponsors .sponsor-item {\n  background-color: var(--c-details-bg);\n}\n.dark .sponsors img {\n  filter: grayscale(1) invert(1);\n}\n\n.dark .sponsors .sponsor-item:hover {\n  color: #213547;\n  background-color: #f1f1f1;\n}\n.dark .sponsors .sponsor-item:hover img {\n  filter: none;\n}\n\n.sponsors img {\n  max-width: calc(var(--max-width) - 30px);\n  max-height: calc(var(--max-width) / 2 - 20px);\n}\n.sponsors .action {\n  font-size: 13px;\n  color: var(--c-text-lighter);\n}\n.dark .sponsors .action {\n  color: white;\n}\n\n.shimmer {\n  /* text-align: center; */\n  color: rgba(255, 255, 255, 0.1);\n  background: -webkit-gradient(\n    linear,\n    left top,\n    right top,\n    from(#222),\n    to(#222),\n    color-stop(0.5, #fff)\n  );\n  background: -moz-gradient(\n    linear,\n    left top,\n    right top,\n    from(#222),\n    to(#222),\n    color-stop(0.5, #fff)\n  );\n  background: gradient(\n    linear,\n    left top,\n    right top,\n    from(#222),\n    to(#222),\n    color-stop(0.5, #fff)\n  );\n  -webkit-background-size: 125px 100%;\n  -moz-background-size: 125px 100%;\n  background-size: 125px 100%;\n  -webkit-background-clip: text;\n  -moz-background-clip: text;\n  background-clip: text;\n  -webkit-animation-name: shimmer;\n  -moz-animation-name: shimmer;\n  animation-name: shimmer;\n  -webkit-animation-duration: 2s;\n  -moz-animation-duration: 2s;\n  animation-duration: 2s;\n  -webkit-animation-iteration-count: infinite;\n  -moz-animation-iteration-count: infinite;\n  animation-iteration-count: infinite;\n  background-repeat: no-repeat;\n  background-position: 0 0;\n  background-color: #222;\n}\n\n@-moz-keyframes shimmer {\n  0% {\n    background-position: top left;\n  }\n  100% {\n    background-position: top right;\n  }\n}\n\n@-webkit-keyframes shimmer {\n  0% {\n    background-position: top left;\n  }\n  100% {\n    background-position: top right;\n  }\n}\n\n@-o-keyframes shimmer {\n  0% {\n    background-position: top left;\n  }\n  100% {\n    background-position: top right;\n  }\n}\n\n@keyframes shimmer {\n  0% {\n    background-position: top left;\n  }\n  100% {\n    background-position: top right;\n  }\n}\n</style>\n"
  },
  {
    "path": "docs/.vuepress/components/Stories/Stories.vue",
    "content": "<template>\n  <ul class=\"stories\">\n    <li class=\"story-container\" v-for=\"story in stories\">\n      <div class=\"logo-container\">\n        <a :href=\"story.url\" target=\"_blank\" rel=\"noopener\">\n          <img :src=\"story.imgUrl\" style=\"width: 100px\" />\n        </a>\n      </div>\n      <div class=\"story-data\">\n        <h4 v-if=\"story.name\">\n          {{ story.name }}\n        </h4>\n        <p v-html=\"story.description\"></p>\n      </div>\n    </li>\n  </ul>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\n\nconst stories = ref([\n  {\n    name: 'Notejoy',\n    imgUrl: '/assets/img/products/notejoy@2x.png',\n    url: 'https://notejoy.com/',\n    description:\n      'Drowning in email & Slack? <a href=\"https://notejoy.com/\" target=\"_blank\" rel=\"noopener\">Notejoy</a>\\'s fast and focused workspace is the perfect solution. Its Quick Find experience, powered by Fuse.js, makes it incredibly quick to jump to any specific note.'\n  },\n  {\n    imgUrl: '/assets/img/products/notebag@2x.png',\n    url: 'https://notebag.app/',\n    description:\n      '<a href=\"https://notebag.app/\" target=\"_blank\" rel=\"noopener\">Notebag</a> is a new experience in note taking, designed from the ground up to be usable from your keyboard. Its fuzzy searching is powered by Fuse.js.'\n  }\n])\n</script>\n\n<style scoped lang=\"css\">\n.stories {\n  padding: 0;\n}\n\n.stories .story-container {\n  display: flex;\n  padding: 25px 0;\n  border-bottom: 1px dotted #ddd;\n}\n\n.stories .logo-container .avatar {\n  flex: 0 0 80px;\n}\n\n.stories .logo-container .avatar img {\n  border-radius: 50%;\n  object-fit: cover;\n}\n\n.stories .story-data {\n  padding-left: 26px;\n  flex: 1;\n}\n\n.stories .story-data h4 {\n  margin-top: 0;\n  margin-bottom: 5px;\n}\n\n.stories .story-data p {\n  margin: 0;\n}\n</style>\n"
  },
  {
    "path": "docs/.vuepress/components/SuspensefulDemo/SuspensefulDemo.vue",
    "content": "<template>\n  <Suspense>\n    <Demo />\n    <template #fallback>Loading demo...</template>\n  </Suspense>\n</template>\n\n<script setup lang=\"ts\">\nimport Demo from '../Demo/Demo.vue'\n</script>\n"
  },
  {
    "path": "docs/.vuepress/components/Team/Team.vue",
    "content": "<template>\n  <ul class=\"team-members\">\n    <li class=\"profile-container\" v-for=\"profile in team\">\n      <div class=\"avatar\">\n        <img\n          v-if=\"profile.social.github\"\n          :src=\"`https://github.com/${profile.social.github}.png`\"\n          :alt=\"profile.name\"\n          width=\"80\"\n          height=\"80\"\n        />\n      </div>\n      <div class=\"profile\">\n        <h3 :data-official-title=\"profile.title\">\n          {{ profile.name }}\n          <!-- <sup v-if=\"profile.title\" v-html=\"profile.title\"></sup> -->\n        </h3>\n        <dl>\n          <template v-if=\"profile.work\">\n            <dt>\n              <i class=\"fa fa-briefcase\"></i>\n              <span class=\"sr-only\">Work</span>\n            </dt>\n            <dd v-html=\"workHtml(profile)\"></dd>\n          </template>\n          <template v-if=\"profile.city\">\n            <dt>\n              <i class=\"fa fa-map-marker\"></i>\n              <span class=\"sr-only\">City</span>\n            </dt>\n            <dd>\n              {{ profile.city }}\n            </dd>\n          </template>\n          <template v-if=\"profile.languages\">\n            <dt>\n              <i class=\"fa fa-globe\"></i>\n              <span class=\"sr-only\">Languages</span>\n            </dt>\n            <dd v-html=\"languageListHtml(profile)\" class=\"language-list\"></dd>\n          </template>\n          <template v-if=\"profile.links\">\n            <dt>\n              <i class=\"fa fa-link\"></i>\n              <span class=\"sr-only\">Links</span>\n            </dt>\n            <dd>\n              <ul>\n                <li v-for=\"link in profile.links\">\n                  <a :href=\"link\" target=\"_blank\">{{ minimizeLink(link) }}</a>\n                </li>\n              </ul>\n            </dd>\n          </template>\n          <footer class=\"social\">\n            <a\n              class=\"github\"\n              v-if=\"profile.social.github\"\n              :href=\"`https://github.com/${profile.social.github}`\"\n            >\n              <i class=\"fab fa-github\"></i>\n              <span class=\"sr-only\">GitHub</span>\n            </a>\n            <a\n              class=\"twitter\"\n              v-if=\"profile.social.twitter\"\n              :href=\"`https://twitter.com/${profile.social.twitter}`\"\n            >\n              <i class=\"fab fa-twitter\"></i>\n              <span class=\"sr-only\">Twitter</span>\n            </a>\n            <a\n              class=\"linkedin\"\n              v-if=\"profile.social.linkedin\"\n              :href=\"`https://linkedin.com/in/${profile.social.linkedin}`\"\n            >\n              <i class=\"fab fa-linkedin\"></i>\n              <span class=\"sr-only\">LinkedIn</span>\n            </a>\n            <a\n              class=\"reddit\"\n              v-if=\"profile.social.reddit\"\n              :href=\"`https://www.reddit.com/user/${profile.social.reddit}`\"\n            >\n              <i class=\"fab fa-reddit\"></i>\n              <span class=\"sr-only\">Reddit</span>\n            </a>\n          </footer>\n        </dl>\n      </div>\n    </li>\n  </ul>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\n\ninterface ProfileSocial {\n  github: string\n  twitter: string\n  linkedin: string\n  reddit: string\n}\n\ninterface ProfileWork {\n  role: string\n  org: string\n}\n\ninterface Profile {\n  name: string\n  city: string\n  social: ProfileSocial\n  languages: string[]\n  work: ProfileWork\n  links: string[]\n  title?: string\n}\n\nconst team = ref<Profile[]>([\n  {\n    name: 'Kiro Risk',\n    city: 'San Francisco, CA, USA',\n    social: {\n      github: 'krisk',\n      twitter: 'kirorisk',\n      linkedin: 'kirollos',\n      reddit: 'kirorisk'\n    },\n    languages: ['en', 'it', 'fr'],\n    work: {\n      role: 'Creator',\n      org: 'Fuse.js'\n    },\n    links: [\n      'https://github.com/sponsors/krisk',\n      'https://www.patreon.com/krisk'\n    ]\n  }\n])\n\nconst languageNameFor = {\n  en: 'English',\n  zh: '中文',\n  vi: 'Tiếng Việt',\n  pl: 'Polski',\n  pt: 'Português',\n  ru: 'Русский',\n  jp: '日本語',\n  fr: 'Français',\n  de: 'Deutsch',\n  it: 'Italiano',\n  el: 'Ελληνικά',\n  es: 'Español',\n  hi: 'हिंदी',\n  fa: 'فارسی',\n  ko: '한국어',\n  ro: 'Română'\n}\n\nfunction workHtml(profile) {\n  var work = profile.work\n  var html = ''\n  if (work.orgUrl) {\n    html += `<a href=\"${work.orgUrl}\" target=\"_blank\">`\n    if (work.org) {\n      html += work.org\n    } else {\n      minimizeLink(work.orgUrl)\n    }\n    html += '</a>'\n  } else if (work.org) {\n    html += work.org\n  }\n  if (work.role) {\n    if (html.length > 0) {\n      html = `${work.role} @ ${html}`\n    } else {\n      html = work.role\n    }\n  }\n  return html\n}\n\nfunction languageListHtml(profile) {\n  if (!profile.languages) return ''\n\n  let nav = globalThis.navigator\n\n  let preferredLanguageCode = nav\n    ? nav.languages\n      ? // The preferred language set in the browser\n        nav.languages[0]\n      : // The language in the current page\n        nav.language\n    : null\n\n  return (\n    '<ul><li>' +\n    profile.languages\n      .map((languageCode: string) => {\n        const language = languageNameFor[languageCode]\n        if (\n          languageCode !== 'en' &&\n          preferredLanguageCode &&\n          languageCode === preferredLanguageCode.slice(0, 2)\n        ) {\n          const title = `${profile.name} can give technical talks in your preferred language.`\n          return `<span class=\"user-match\" title=\"${title}\">${language}</span>`\n        }\n        return language\n      })\n      .join('</li><li>') +\n    '</li></ul>'\n  )\n}\n\nfunction minimizeLink(link: string) {\n  return link\n    .replace(/^https?:\\/\\/(www\\.)?/, '')\n    .replace(/\\/$/, '')\n    .replace(/^mailto:/, '')\n}\n</script>\n\n<style scoped lang=\"css\">\n.team-members .sort-by-distance-button {\n  display: inline-block;\n  padding: 0.4em 0.7em 0.45em;\n  font-weight: bold;\n  font-size: 0.5em;\n  text-transform: uppercase;\n  line-height: 1;\n  border: none;\n  background: #304455;\n  color: #fff;\n  border-radius: 3px;\n  position: relative;\n  cursor: pointer;\n  float: right;\n  margin-top: 0.3em;\n}\n\n.team-members .sort-by-distance-button i {\n  margin-right: 0.25em;\n}\n\n.team-members .sort-by-distance-button i:last-child {\n  margin-right: 0;\n}\n\n.team-members .sort-by-distance-button[disabled] {\n  opacity: 0.7;\n  cursor: default;\n}\n\n.team-members .profile-container {\n  display: flex;\n  padding: 25px 0;\n  border-bottom: 1px dotted #ddd;\n}\n\n.team-members .profile-container:first-of-type {\n  margin-top: 15px;\n}\n\n.team-members .profile-container:last-of-type {\n  border-bottom: none;\n}\n\n.team-members .profile-container .avatar {\n  flex: 0 0 80px;\n}\n\n.team-members .profile-container .avatar img {\n  border-radius: 50%;\n  object-fit: cover;\n}\n\n.team-members .profile-container .profile {\n  padding-left: 26px;\n  flex: 1;\n}\n\n.team-members .profile-container .profile h3 {\n  margin: 0;\n  font-size: 1.3em;\n}\n\n.team-members .profile-container .profile h3::before,\n.team-members .profile-container .profile h3::after {\n  display: none;\n}\n\n.team-members .profile-container .profile h3 > sup {\n  text-transform: uppercase;\n  font-size: 0.7em;\n  letter-spacing: 0.3px;\n  padding: 2px 5px;\n  margin-left: 10px;\n  color: rgba(0, 0, 0, 0.6);\n  background: #f9f7f5;\n  border-radius: 5px;\n}\n\n.team-members .profile-container .profile .user-match {\n  cursor: help;\n  color: #4682b4;\n}\n\n.team-members .profile-container .profile .user-match:after {\n  content: '\\f06a';\n  font-family: 'Font Awesome 5 Free';\n  font-size: 0.75em;\n  vertical-align: super;\n  margin-left: 4px;\n  margin-right: 2px;\n  position: relative;\n}\n\n.team-members .profile-container .profile dl {\n  margin: 0.6em 0 0;\n}\n\n.team-members .profile-container .profile dt,\n.team-members .profile-container .profile dd,\n.team-members .profile-container .profile ul,\n.team-members .profile-container .profile li {\n  display: inline;\n  padding: 0;\n  margin: 0;\n  line-height: 1.3;\n}\n\n.team-members .profile-container .profile dt {\n  text-transform: uppercase;\n  font-size: 0.84em;\n  font-weight: 600;\n}\n\n.team-members .profile-container .profile dt::after {\n  content: '';\n  margin-right: 7px;\n}\n\n.team-members .profile-container .profile dt i {\n  width: 14px;\n  text-align: center;\n}\n\n.team-members .profile-container .profile dt i.fa-map-marker {\n  font-size: 1.15em;\n}\n\n.team-members .profile-container .profile dt i.fa-globe {\n  font-size: 1.2em;\n}\n\n.team-members .profile-container .profile dt i.fa-link {\n  font-size: 1.05em;\n}\n\n.team-members .profile-container .profile dd {\n  font-weight: 600;\n}\n\n.team-members .profile-container .profile dd::after {\n  display: block;\n  content: ' ';\n  margin-top: 0.6em;\n}\n\n.team-members .profile-container .profile li {\n  display: inline-block;\n}\n\n.team-members .profile-container .profile li::after {\n  display: inline-block;\n  content: '·';\n  margin: 0 8px;\n}\n\n.team-members .profile-container .profile li:last-child::after {\n  content: '';\n}\n\n.team-members .profile-container .profile .social a {\n  display: inline-block;\n  line-height: 1;\n  vertical-align: middle;\n  margin-right: 4px;\n}\n\n.team-members .profile-container .profile .social a.github,\n.team-members .profile-container .profile .social a.codepen {\n  color: #000;\n}\n\n.team-members .profile-container .profile .social a.twitter {\n  color: #1da1f3;\n}\n\n.team-members .profile-container .profile .social a.linkedin {\n  color: #0077b5;\n}\n\n.team-members .profile-container .profile .social a.reddit {\n  color: #ff4501;\n}\n\n.team-members .profile-container .profile .social i {\n  vertical-align: text-bottom;\n  font-size: 1.3em;\n}\n\n@media (max-width: 640px) {\n  .team-members .profile-container .profile h3 sup {\n    display: inline-block;\n    margin-left: 0;\n  }\n}\n</style>\n"
  },
  {
    "path": "docs/.vuepress/components/TwitterFollow/TwitterBird.vue",
    "content": "<template>\n  <svg\n    version=\"1.1\"\n    id=\"Logo\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n    x=\"0px\"\n    y=\"0px\"\n    viewBox=\"0 0 248 204\"\n    style=\"enable-background: new 0 0 248 204\"\n    xml:space=\"preserve\"\n  >\n    <g id=\"Logo_1_\">\n      <path\n        id=\"white_background\"\n        class=\"st0\"\n        d=\"M221.95,51.29c0.15,2.17,0.15,4.34,0.15,6.53c0,66.73-50.8,143.69-143.69,143.69v-0.04\n\t\tC50.97,201.51,24.1,193.65,1,178.83c3.99,0.48,8,0.72,12.02,0.73c22.74,0.02,44.83-7.61,62.72-21.66\n\t\tc-21.61-0.41-40.56-14.5-47.18-35.07c7.57,1.46,15.37,1.16,22.8-0.87C27.8,117.2,10.85,96.5,10.85,72.46c0-0.22,0-0.43,0-0.64\n\t\tc7.02,3.91,14.88,6.08,22.92,6.32C11.58,63.31,4.74,33.79,18.14,10.71c25.64,31.55,63.47,50.73,104.08,52.76\n\t\tc-4.07-17.54,1.49-35.92,14.61-48.25c20.34-19.12,52.33-18.14,71.45,2.19c11.31-2.23,22.15-6.38,32.07-12.26\n\t\tc-3.77,11.69-11.66,21.62-22.2,27.93c10.01-1.18,19.79-3.86,29-7.95C240.37,35.29,231.83,44.14,221.95,51.29z\"\n      />\n    </g>\n  </svg>\n</template>\n\n<style scoped>\n.st0 {\n  fill: #ffffff;\n}\n</style>\n"
  },
  {
    "path": "docs/.vuepress/components/TwitterFollow/TwitterFollow.vue",
    "content": "<template>\n  <a :href=\"fullyQualifiedHref\" class=\"twitter-btn\">\n    <TwitterBird class=\"twitter-bird\" /> Follow\n  </a>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport TwitterBird from './TwitterBird.vue'\n\nconst url = new URL('https://twitter.com/intent/follow')\nurl.searchParams.append(\n  'original_referer',\n  __VUEPRESS_SSR__ ? 'https://fusejs.io' : window.location.href\n)\nurl.searchParams.append(\n  'ref_src',\n  encodeURIComponent('twsrc^tfw|twcamp^buttonembed|twterm^follow|twgr^kirorisk')\n)\nurl.searchParams.append('region', 'follow_link')\nurl.searchParams.append('screen_name', 'kirorisk')\n\nconst fullyQualifiedHref = ref(url.toString())\n</script>\n\n<style scoped>\n.twitter-bird {\n  height: 12px;\n}\n\n.twitter-btn {\n  font-size: 12px;\n  position: relative;\n  height: 28px;\n  box-sizing: border-box;\n  padding: 1px 12px 1px 12px;\n  background-color: #1d9bf0;\n  color: #fff;\n  border-radius: 9999px;\n  font-weight: bolder;\n  cursor: pointer;\n  visibility: visible;\n  width: 86px;\n  display: flex;\n  align-items: center;\n  justify-content: stretch;\n  gap: 4px;\n}\n</style>\n"
  },
  {
    "path": "docs/.vuepress/components/Version/Version.vue",
    "content": "<template>\n  Latest stable version: <span class=\"bold\">{{ version }}</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { useThemeData } from '@vuepress/plugin-theme-data/client'\nimport { ref } from 'vue'\n\nconst themeData = useThemeData()\n\nconst version = ref(themeData.value.version)\n</script>\n\n<style scoped>\n.bold {\n  font-weight: bolder;\n}\n</style>\n"
  },
  {
    "path": "docs/.vuepress/components/Version/module-declaration.d.ts",
    "content": "declare module '@vuepress/plugin-theme-data/client' {\n  import type { DefaultThemeData } from '@vuepress/theme-default'\n  import type { Ref } from 'vue'\n\n  export declare function useThemeData(): Ref<DefaultThemeData>\n}\n"
  },
  {
    "path": "docs/.vuepress/config.ts",
    "content": "import tabsPlugin from '@snippetors/vuepress-plugin-tabs'\nimport { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics'\nimport { pwaPlugin } from '@vuepress/plugin-pwa'\nimport { registerComponentsPlugin } from '@vuepress/plugin-register-components'\nimport { searchPlugin } from '@vuepress/plugin-search'\nimport { defaultTheme } from '@vuepress/theme-default'\nimport {\n  defineUserConfig,\n  HeadAttrsConfig,\n  HeadTagNonEmpty,\n  PluginConfig,\n  SidebarConfigArray,\n  type HeadConfig,\n  type HeadTagEmpty\n} from 'vuepress'\nimport { version } from '../../package.json'\n\nconst GA_MEASUREMENT_ID = 'G-78VK1PFWH1'\nconst GOOGLE_SITE_VERIFICATION = '4nm40QLVcDJmEJSAbrMfZ7fpBJZIXL1oSngBAYrZopY'\n//const GOOGLE_AD_CLIENT_ID = 'ca-pub-3734944050099256'\n\nexport default defineUserConfig({\n  locales: {\n    '/': {\n      lang: 'en-US',\n      title: 'Fuse.js',\n      description: 'Lightweight fuzzy-search library, in JavaScript'\n    }\n  },\n  head: getHead(),\n  plugins: getPlugins(),\n  theme: defaultTheme({\n    version,\n    logo: '/assets/img/logo.png',\n    repo: 'krisk/fuse',\n    docsDir: 'docs',\n    docsBranch: 'main',\n    sidebarDepth: 6,\n    sidebar: [...getGuideSidebar()],\n    contributors: false,\n    editLink: false,\n    navbar: [\n      {\n        text: 'Guide',\n        link: '/'\n      },\n      {\n        text: 'Donate',\n        link: '/donate/'\n      },\n      {\n        text: 'Twitter',\n        link: 'https://twitter.com/intent/user?screen_name=kirorisk'\n      }\n    ]\n  })\n})\n\nfunction getGuideSidebar(): SidebarConfigArray {\n  return [\n    {\n      text: 'Getting Started',\n      children: [\n        '/getting-started/installation',\n        '/getting-started/different-builds'\n      ]\n    },\n    '/demo',\n    {\n      text: 'API Reference',\n      children: [\n        '/api/options',\n        '/api/config',\n        '/api/methods',\n        '/api/indexing',\n        '/api/query'\n      ]\n    },\n    '/examples',\n    {\n      text: 'Concepts',\n      children: ['/concepts/scoring-theory']\n    }\n  ]\n}\n\nfunction getComponent(name: string): Record<string, string> {\n  return {\n    [name]: `${__dirname}/components/${name}/${name}.vue`\n  }\n}\n\nfunction getPlugins(): PluginConfig {\n  return [\n    // [\n    //   'vuepress-plugin-google-adsense2',\n    //   {\n    //     id: GOOGLE_AD_CLIENT_ID,\n    //   },\n    // ],\n    searchPlugin(),\n    googleAnalyticsPlugin({\n      id: GA_MEASUREMENT_ID\n    }),\n    tabsPlugin({}),\n    registerComponentsPlugin({\n      components: {\n        ...getComponent('Stories'),\n        ...getComponent('Sponsors'),\n        ...getComponent('Demo'),\n        ...getComponent('SuspensefulDemo'),\n        ...getComponent('Team'),\n        ...getComponent('Jobs'),\n        ...getComponent('Donate'),\n        ...getComponent('TwitterFollow'),\n        ...getComponent('Version')\n      }\n    }),\n    pwaPlugin()\n  ]\n}\n\nfunction getHead(): HeadConfig[] {\n  const appleTouchIcons: [HeadTagEmpty, HeadAttrsConfig][] = [\n    '57x57',\n    '60x60',\n    '72x72',\n    '76x76',\n    '114x114',\n    '120x120',\n    '144x144',\n    '152x152',\n    '180x180'\n  ].map<[HeadTagEmpty, HeadAttrsConfig]>((size) => [\n    'link',\n    { rel: 'apple-touch-icon', size, href: `/icons/apple-icon-${size}.png` }\n  ])\n\n  const sizedIcons: [HeadTagEmpty, HeadAttrsConfig][] = [\n    {\n      size: '192x192',\n      href: 'android-icon-192x192.png'\n    },\n    { size: '32x32', href: 'favicon-32x32.png' },\n    { size: '96x96', href: 'favicon-96x96.png' },\n    { size: '16x16', href: 'favicon-16x16.png' }\n  ].map<[HeadTagEmpty, HeadAttrsConfig]>(({ size, href }) => [\n    'link',\n    { rel: 'icon', type: 'image/png', size, href: `/icons/${href}` }\n  ])\n\n  const meta: [HeadTagEmpty, HeadAttrsConfig][] = [\n    { name: 'msapplication-TileColor', content: '#ffffff' },\n    { name: 'msapplication-TileImage', content: '/icons/ms-icon-144x144.png' },\n    { name: 'theme-color', content: '#ffffff' },\n    {\n      name: 'google-site-verification',\n      content: GOOGLE_SITE_VERIFICATION\n    }\n  ].map<[HeadTagEmpty, HeadAttrsConfig]>(({ name, content }) => [\n    'meta',\n    { name, content }\n  ])\n\n  const scripts: [HeadTagNonEmpty, HeadAttrsConfig, string][] = [\n    `\n      (function(){\n        var bsa_optimize=document.createElement('script');\n        bsa_optimize.type='text/javascript';\n        bsa_optimize.async=true;\n        bsa_optimize.src='https://cdn4.buysellads.net/pub/fusejs.js?'+(new Date()-new Date()%600000);\n        (document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(bsa_optimize);\n      })();\n      `\n  ].map<[HeadTagNonEmpty, HeadAttrsConfig, string]>((content) => [\n    'script',\n    {},\n    content\n  ])\n\n  return [\n    ...appleTouchIcons,\n    ...sizedIcons,\n    ...meta,\n    ['link', { rel: 'manifest', href: '/manifest.webmanifest' }],\n    ...scripts\n  ]\n}\n\ndeclare module '@vuepress/theme-default' {\n  export interface DefaultThemeLocaleData {\n    version: string\n  }\n}\n"
  },
  {
    "path": "docs/.vuepress/layouts/Layout.vue",
    "content": "<template>\n  <ParentLayout>\n    <template #sidebar-top>\n      <Suspense>\n        <CarbonAds />\n        <template #fallback>Loading ads...</template>\n      </Suspense>\n    </template>\n  </ParentLayout>\n</template>\n\n<script setup>\nimport ParentLayout from '@vuepress/theme-default/layouts/Layout.vue'\nimport CarbonAds from './components/CarbonAds.vue'\n</script>\n"
  },
  {
    "path": "docs/.vuepress/layouts/components/AdUnit.vue",
    "content": "<template>\n  <ins\n    class=\"adsbygoogle\"\n    style=\"display: block\"\n    data-ad-client=\"ca-pub-3734944050099256\"\n    data-ad-slot=\"4159195140\"\n    data-ad-format=\"auto\"\n    data-full-width-responsive=\"true\"\n  ></ins>\n</template>\n\n<script setup lang=\"js\">\n;(adsbygoogle = window.adsbygoogle || []).push({})\n</script>\n"
  },
  {
    "path": "docs/.vuepress/layouts/components/BuySellAds.vue",
    "content": "<template>\n  <div class=\"bsa-cpc-wrapper\">\n    <div class=\"bsa-cpc\" ref=\"bsaAdsElementRef\"></div>\n  </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { isNullish } from '@sapphire/utilities'\nimport { onMounted, ref, watch } from 'vue'\nimport { useRoute } from 'vue-router'\n\nconst SCRIPT_ID = 'bsa-cpc-script'\nconst ACCOUNT_ID = 'CE7IV27Y'\nconst PLACEMENT = 'fusejsio'\n\nconst route = useRoute()\n\nconst bsaAdsElementRef = ref<HTMLDivElement>()\n\nasync function loadBuySellAds() {\n  if (!isNullish(_bsa)) {\n    _bsa.init('default', ACCOUNT_ID, `placement:${PLACEMENT}`, {\n      target: '.bsa-cpc',\n      align: 'horizontal',\n      disable_css: 'true'\n    })\n  }\n}\n\nonMounted(() => {\n  if (!document.getElementById(SCRIPT_ID)) {\n    const s = document.createElement('script')\n    s.id = SCRIPT_ID\n    s.src = `//m.servedby-buysellads.com/monetization.js`\n    document.head.appendChild(s)\n    s.onload = () => {\n      loadBuySellAds()\n    }\n  } else {\n    loadBuySellAds()\n  }\n})\n\nwatch(route, () => {\n  bsaAdsElementRef.value.innerHTML = ''\n  loadBuySellAds()\n})\n</script>\n\n<style lang=\"css\">\n.bsa-cpc-wrapper {\n  font-size: 0.95rem;\n  max-width: var(--content-width);\n  margin: 0px auto;\n  padding: 1rem 2rem 0;\n  margin-bottom: -1rem;\n}\n\n@media (max-width: 419px) {\n  .bsa-cpc-wrapper {\n    padding: 0 1.5rem;\n  }\n}\n\n.bsa-cpc {\n  font-size: 0.9em;\n  background-color: #f8f8f8;\n  border-radius: 6px;\n}\n\n.bsa-cpc a._default_ {\n  text-align: left;\n  display: block;\n  padding: 10px 15px 12px;\n  margin-bottom: 20px;\n  color: #666;\n  font-weight: 400;\n  line-height: 18px;\n}\n\n.bsa-cpc a._default_ .default-image img {\n  height: 20px;\n  border-radius: 3px;\n  vertical-align: middle;\n  position: relative;\n  top: -1px;\n}\n\n.bsa-cpc a._default_ .default-title {\n  font-weight: 600;\n}\n\n.bsa-cpc a._default_ .default-description:after {\n  font-size: 0.85em;\n  content: 'Sponsored';\n  color: #1c90f3;\n  border: 1px solid #1c90f3;\n  border-radius: 3px;\n  padding: 0 4px 1px;\n  margin-left: 6px;\n}\n\n.bsa-cpc .default-ad {\n  display: none;\n}\n\n.bsa-cpc a._default_ .default-image,\n.bsa-cpc a._default_ .default-title,\n.bsa-cpc a._default_ .default-description {\n  display: inline;\n  vertical-align: middle;\n  margin-right: 6px;\n}\n</style>\n"
  },
  {
    "path": "docs/.vuepress/layouts/components/CarbonAds.vue",
    "content": "<template>\n  <div class=\"carbon-ads\" ref=\"carbonAdsElementRef\"></div>\n</template>\n\n<script setup lang=\"ts\">\nimport { isNullish } from '@sapphire/utilities'\nimport { onMounted, ref, watch } from 'vue'\nimport { useRoute } from 'vue-router'\nimport Demo from '../../components/Demo/Demo.vue';\n\nconst SCRIPT_ID = '_carbonads_js'\nconst ACCOUNT_ID = 'CE7IC27U'\nconst PLACEMENT = 'fusejsio'\n\nconst route = useRoute()\n\nconst carbonAdsElementRef = ref<HTMLDivElement>()\n\nasync function loadCarbonAds() {\n  const s = document.createElement('script')\n  s.id = SCRIPT_ID\n  s.src = `//cdn.carbonads.com/carbon.js?serve=${ACCOUNT_ID}&placement=${PLACEMENT}`\n  carbonAdsElementRef?.value?.appendChild(s)\n}\n\nlet hash = '';\nonMounted(() => {\n  hash = window.location.hash\n  loadCarbonAds()\n})\n\nwatch(route, (to, from) => {\n  if (!isNullish(document.querySelector('#carbonads'))) {\n    if (window.location.hash == hash) {\n      if (carbonAdsElementRef && carbonAdsElementRef.value) {\n        carbonAdsElementRef.value.innerHTML = ''\n      }\n      loadCarbonAds()\n    }\n    hash = window.location.hash\n  }\n})\n</script>\n\n<style lang=\"css\">\n.carbon-ads {\n  min-height: 102px;\n  padding: 1.5rem 1.5rem 0;\n  margin-bottom: -0.5rem;\n  font-size: 0.75rem;\n}\n\n.carbon-ads a {\n  color: var(--c-text);\n  font-weight: normal;\n  display: inline;\n}\n\n.carbon-ads .carbon-img {\n  float: left;\n  margin-right: 1rem;\n  border: 1px solid var(--c-border);\n}\n\nhtml.dark .carbon-ads .carbon-img {\n  border-color: var(--c-border-dark);\n}\n\n.carbon-ads .carbon-img img {\n  display: block;\n}\n\n.carbon-ads .carbon-poweredby {\n  color: #999;\n  display: block;\n  margin-top: 0.5em;\n}\n\n@media (max-width: 719px) {\n  .carbon-ads .carbon-img img {\n    width: 100px;\n    height: 77px;\n  }\n}\n</style>\n"
  },
  {
    "path": "docs/.vuepress/public/icons/browserconfig.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<browserconfig>\n    <msapplication>\n        <tile>\n            <square70x70logo src=\"/icons/ms-icon-70x70.png\" />\n            <square150x150logo src=\"/icons/ms-icon-150x150.png\" />\n            <square310x310logo src=\"/icons/ms-icon-310x310.png\" />\n            <TileColor>#ffffff</TileColor>\n        </tile>\n    </msapplication>\n</browserconfig>\n"
  },
  {
    "path": "docs/.vuepress/public/manifest.webmanifest",
    "content": "{\n  \"name\": \"FuseJS\",\n  \"short_name\": \"FuseJS\",\n  \"description\": \"Lightweight fuzzy-search\",\n  \"start_url\": \"/index.html\",\n  \"display\": \"standalone\",\n  \"icons\": [\n    {\n      \"src\": \"/icons/android-icon-36x36.png\",\n      \"sizes\": \"36x36\",\n      \"type\": \"image/png\",\n      \"density\": \"0.75\"\n    },\n    {\n      \"src\": \"/icons/android-icon-48x48.png\",\n      \"sizes\": \"48x48\",\n      \"type\": \"image/png\",\n      \"density\": \"1.0\"\n    },\n    {\n      \"src\": \"/icons/android-icon-72x72.png\",\n      \"sizes\": \"72x72\",\n      \"type\": \"image/png\",\n      \"density\": \"1.5\"\n    },\n    {\n      \"src\": \"/icons/android-icon-96x96.png\",\n      \"sizes\": \"96x96\",\n      \"type\": \"image/png\",\n      \"density\": \"2.0\"\n    },\n    {\n      \"src\": \"/icons/android-icon-144x144.png\",\n      \"sizes\": \"144x144\",\n      \"type\": \"image/png\",\n      \"density\": \"3.0\"\n    },\n    {\n      \"src\": \"/icons/android-icon-192x192.png\",\n      \"sizes\": \"192x192\",\n      \"type\": \"image/png\",\n      \"density\": \"4.0\"\n    }\n  ]\n}\n"
  },
  {
    "path": "docs/.vuepress/styles/grid.css",
    "content": "/* ==== GRID SYSTEM ==== */\n\n.container {\n  width: 90%;\n  margin-left: auto;\n  margin-right: auto;\n}\n\n.row {\n  position: relative;\n  width: 100%;\n}\n\n.row [class^='col'] {\n  float: left;\n  margin: 0.5rem 2%;\n  min-height: 0.125rem;\n}\n\n.col-1,\n.col-2,\n.col-3,\n.col-4,\n.col-5,\n.col-6,\n.col-7,\n.col-8,\n.col-9,\n.col-10,\n.col-11,\n.col-12 {\n  width: 96%;\n}\n\n.col-1-sm {\n  width: 4.33%;\n}\n\n.col-2-sm {\n  width: 12.66%;\n}\n\n.col-3-sm {\n  width: 21%;\n}\n\n.col-4-sm {\n  width: 29.33%;\n}\n\n.col-5-sm {\n  width: 37.66%;\n}\n\n.col-6-sm {\n  width: 46%;\n}\n\n.col-7-sm {\n  width: 54.33%;\n}\n\n.col-8-sm {\n  width: 62.66%;\n}\n\n.col-9-sm {\n  width: 71%;\n}\n\n.col-10-sm {\n  width: 79.33%;\n}\n\n.col-11-sm {\n  width: 87.66%;\n}\n\n.col-12-sm {\n  width: 96%;\n}\n\n.row::after {\n  content: '';\n  display: table;\n  clear: both;\n}\n\n.hidden-sm {\n  display: none;\n}\n\n@media only screen and (min-width: 33.75em) {\n  /* 540px */\n  .container {\n    width: 80%;\n  }\n}\n\n@media only screen and (min-width: 45em) {\n  /* 720px */\n  .col-1 {\n    width: 4.33%;\n  }\n\n  .col-2 {\n    width: 12.66%;\n  }\n\n  .col-3 {\n    width: 21%;\n  }\n\n  .col-4 {\n    width: 29.33%;\n  }\n\n  .col-5 {\n    width: 37.66%;\n  }\n\n  .col-6 {\n    width: 46%;\n  }\n\n  .col-7 {\n    width: 54.33%;\n  }\n\n  .col-8 {\n    width: 62.66%;\n  }\n\n  .col-9 {\n    width: 71%;\n  }\n\n  .col-10 {\n    width: 79.33%;\n  }\n\n  .col-11 {\n    width: 87.66%;\n  }\n\n  .col-12 {\n    width: 96%;\n  }\n\n  .hidden-sm {\n    display: block;\n  }\n}\n\n@media only screen and (min-width: 60em) {\n  /* 960px */\n  .container {\n    width: 75%;\n    max-width: 60rem;\n  }\n}\n"
  },
  {
    "path": "docs/.vuepress/styles/index.scss",
    "content": "@import url('https://use.fontawesome.com/releases/v5.7.1/css/all.css');\n@import url('https://fonts.bunny.net/css?family=dosis:500|inconsolata:200|roboto:400,500,700|roboto-mono:400|source-sans-pro:300,400,600');\n\nhtml.dark {\n  --c-brand: #9066b8;\n}\n\n:root {\n  --c-brand: #9066b8;\n  --c-text: #2c3e50;\n  --c-border: #eaecef;\n  --c-tip: #42b983;\n  --c-badge-warning: darken(#ffe564, 35%);\n  --c-badge-danger: #da5961;\n  --font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;\n}\n\n.navbar .site-name {\n  font-family: 'Dosis', 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;\n  font-weight: normal !important;\n\n  &.can-hide {\n    display: inline-block !important;\n  }\n}\n\n.navbar .router-link-active:hover {\n  .logo {\n    animation: spin 0.5s ease-in-out 1 !important;\n  }\n}\n\n.navbar .logo {\n  margin-right: 0.4rem !important;\n}\n\n@keyframes spin {\n  50% {\n    transform: rotate(180deg) scale(1.2);\n  }\n\n  to {\n    transform: rotate(180deg) scale(1);\n  }\n}\n\nh2 {\n  padding-bottom: 1rem;\n  border-bottom: none;\n}\n\n// Twitter\nnav > div:nth-child(3) > a {\n  background-image: url(/assets/img/twitter-black.svg);\n  background-repeat: no-repeat;\n  height: 20px;\n  display: flex;\n  align-items: center;\n  padding-left: 30px; /* width of the image plus a little extra padding */\n}\n\n.dark nav > div:nth-child(3) > a {\n  background-image: url(/assets/img/twitter-white.svg);\n}\n\n// GitHub\nnav > div:nth-child(4) > a {\n  background-image: url(/assets/img/github-black.svg);\n  background-repeat: no-repeat;\n  height: 20px;\n  display: flex;\n  fill: #ffffff;\n  align-items: center;\n  padding-left: 30px; /* width of the image plus a little extra padding */\n}\n\n.dark nav > div:nth-child(4) > a {\n  background-image: url(/assets/img/github-white.svg);\n}\n"
  },
  {
    "path": "docs/.vuepress/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    \"module\": \"ESNext\",\n    \"target\": \"es2016\",\n    \"incremental\": true,\n    \"lib\": [\"DOM\", \"ESNext\"]\n  },\n  \"include\": [\".\"]\n}\n"
  },
  {
    "path": "docs/README.md",
    "content": "---\nshareTitle: Fuse.js - JavaScript fuzzy-search library\n---\n\n# Fuse.js\n\n**Powerful, lightweight fuzzy-search library, with zero dependencies**.\n\n<Sponsors />\n\n### What is fuzzy searching?\n\nGenerally speaking, fuzzy searching (more formally known as _approximate string matching_) is the technique of finding strings that are _approximately_ equal to a given pattern (rather than _exactly_).\n\n### Why should I use it?\n\n- With Fuse.js, you don’t need to setup a dedicated backend just to handle search.\n- Simplicity and performance were the main criteria when developing this library.\n\n::: details As easy as 1, 2, 3\n\n```js\n// 1. List of items to search in\nconst books = [\n  {\n    title: \"Old Man's War\",\n    author: {\n      firstName: 'John',\n      lastName: 'Scalzi'\n    }\n  },\n  {\n    title: 'The Lock Artist',\n    author: {\n      firstName: 'Steve',\n      lastName: 'Hamilton'\n    }\n  }\n]\n\n// 2. Set up the Fuse instance\nconst fuse = new Fuse(books, {\n  keys: ['title', 'author.firstName']\n})\n\n// 3. Now search!\nfuse.search('jon')\n\n// Output:\n// [\n//   {\n//     item: {\n//       title: \"Old Man's War\",\n//       author: {\n//         firstName: 'John',\n//         lastName: 'Scalzi'\n//       }\n//     },\n//     refIndex: 0\n//   }\n// ]\n```\n\n:::\n\n### When should I use It?\n\nIt might not make sense for every situation, but can be ideal depending on your search requirements. For example:\n\n- When you want client-side fuzzy searching of small to moderately large data sets.\n- When you can't justify setting up a dedicated backend simply to handle search. ElasticSearch or Algolia, although both great services, may be overkill for your particular use cases.\n\n### Can I still use it on the backend?\n\nOf course! Fuse.js has no DOM dependencies.\n\n### Who's using Fuse.js these days?\n\nPlenty of people. It's hard to say an exact number, since it's free. But a good indication is the number of [dependents](https://www.npmjs.com/package/fuse.js?activeTab=dependents) on NPM, and the [dependency graph](https://github.com/krisk/Fuse/network/dependents) and [stargazers](https://github.com/krisk/Fuse/stargazers) on GitHub.\n\n---\n\nCheck out the [live demo](/demo.html) to fiddle with it and to learn how to use it.\n\n<Donate />\n"
  },
  {
    "path": "docs/api/README.md",
    "content": ""
  },
  {
    "path": "docs/api/config.md",
    "content": "# Global config\n\nYou can access all [options](/api/options.html) above via `Fuse.config`. This is useful if you want to override default options for all Fuse instances.\n\n**Example**:\n\n```js\nconst options = {\n  getFn: (obj, path) => {\n    // Use the default `get` function\n    const value = Fuse.config.getFn(obj, path)\n    // ... do something with `value`\n    return value\n  }\n}\n```\n\n<Donate />\n"
  },
  {
    "path": "docs/api/indexing.md",
    "content": "---\ntags:\n  - indexing\n---\n\n# Indexing\n\n### `Fuse.createIndex`\n\nPre-generate the index from the list, and pass it directly into the Fuse instance. If the list is (considerably) large, it speeds up instantiation.\n\n**Example**\n\n:::: tabs\n::: tab List\n\n```json\n[\n  {\n    \"title\": \"Old Man's War\",\n    \"author\": {\n      \"firstName\": \"John\",\n      \"lastName\": \"Scalzi\"\n    }\n  },\n  {\n    \"title\": \"The Lock Artist\",\n    \"author\": {\n      \"firstName\": \"Steve\",\n      \"lastName\": \"Hamilton\"\n    }\n  }\n  /*...*/\n]\n```\n\n:::\n::: tab JS\n\n```js\nconst options = { keys: ['title', 'author.firstName'] }\n\n// Create the Fuse index\nconst myIndex = Fuse.createIndex(options.keys, books)\n// initialize Fuse with the index\nconst fuse = new Fuse(books, options, myIndex)\n```\n\n:::\n::::\n\n:::tip\nFuse will automatically index the table if one isn't provided during instantiation.\n:::\n\n### `Fuse.parseIndex`\n\nParses a serialized Fuse index from a json object representation.\n\n**Example**\n\n```js\n// (1) In the build step\n// Create the Fuse index\nconst myIndex = Fuse.createIndex(['title', 'author.firstName'], books)\n// Serialize and save it\nfs.writeFile('fuse-index.json', JSON.stringify(myIndex.toJSON()))\n\n// (2) When app starts\n// Load and deserialize index\nconst fuseIndex = await require('fuse-index.json')\n// Alternatively, if fetching the index, convert to json before parsing.\nconst fuseIndex = await fetch('./fuse-index.json').then(r => r.json())\n\nconst myIndex = Fuse.parseIndex(fuseIndex)\n// initialize Fuse with the index\nconst fuse = new Fuse(books, options, myIndex)\n```\n\n<Donate />\n"
  },
  {
    "path": "docs/api/methods.md",
    "content": "# Methods\n\n### `search`\n\nSearches the entire collection of documents, and returns a list of search results.\n\n```js\nfuse.search(/* pattern , options*/)\n```\n\nThe pattern can be one of:\n\n- [String](/examples.html#search-string-array)\n- [Path](/examples.html#nested-search)\n- [Extended query](/examples.html#extended-search)\n- [Logical query](/api/query.html)\n\nThe options:\n\n- `limit` (type: `number`): Denotes the max number of returned search results.\n\n### `setCollection`\n\nSet/replace the entire collection of documents. If no index is provided, one will be generated. Example:\n\n```js\nconst fruits = ['apple', 'orange']\nconst fuse = new Fuse(fruits)\n\nfuse.setCollection(['banana', 'pear'])\n```\n\n### `add`\n\nAdds a doc to the collection. Example:\n\n```js\nconst fruits = ['apple', 'orange']\nconst fuse = new Fuse(fruits)\n\nfuse.add('banana')\n\nconsole.log(fruits.length)\n// => 3\n```\n\n### `remove`\n\nRemoves all documents from the list which the predicate returns truthy for, and returns an array of the removed docs. The predicate is invoked with two arguments: `(doc, index)`. Example:\n\n```js\nconst fruits = ['apple', 'orange', 'banana', 'pear']\nconst fuse = new Fuse(fruits)\n\nconst results = fuse.remove((doc) => {\n  return doc === 'banana' || doc === 'pear'\n})\n\nconsole.log(fruits.length)\n// => 2\n\nconsole.log(results)\n// => ['banana', 'pear']\n```\n\n### `removeAt`\n\nRemoves the doc at the specified index. Example:\n\n```js\nconst fruits = ['apple', 'orange', 'banana', 'pear']\nconst fuse = new Fuse(fruits)\n\nfuse.removeAt(1)\n\nconsole.log(fruits)\n// => ['apple', 'banana', 'pear']\n```\n\n### `getIndex`\n\nReturns the generated Fuse index. Example:\n\n```js\nconst fruits = ['apple', 'orange', 'banana', 'pear']\nconst fuse = new Fuse(fruits)\n\nconsole.log(fuse.getIndex().size())\n// => 4\n```\n\n<Donate />\n"
  },
  {
    "path": "docs/api/options.md",
    "content": "---\ntags:\n  - configuration\n---\n\n# Options\n\n## Basic Options\n\n### `isCaseSensitive`\n\n- Type: `boolean`\n- Default: `false`\n\nIndicates whether comparisons should be case sensitive.\n\n### `ignoreDiacritics`\n\n- Type: `boolean`\n- Default: `false`\n\nIndicates whether comparisons should ignore diacritics (accents).\n\n### `includeScore`\n\n- Type: `boolean`\n- Default: `false`\n\nWhether the score should be included in the result set. A score of `0`indicates a perfect match, while a score of `1` indicates a complete mismatch.\n\n### `includeMatches`\n\n- Type: `boolean`\n- Default: `false`\n\nWhether the matches should be included in the result set. When `true`, each record in the result set will include the indices of the matched characters. These can consequently be used for highlighting purposes.\n\n### `minMatchCharLength`\n\n- Type: `number`\n- Default: `1`\n\nOnly the matches whose length exceeds this value will be returned. (For instance, if you want to ignore single character matches in the result, set it to `2`).\n\n### `shouldSort`\n\n- Type: `boolean`\n- Default: `true`\n\nWhether to sort the result list, by score.\n\n### `findAllMatches`\n\n- Type: `boolean`\n- Default: `false`\n\nWhen true, the matching function will continue to the end of a search pattern even if a perfect match has already been located in the string.\n\n### `keys`\n\n- Type: `Array`\n- Default: `[]`\n\nList of keys that will be searched. This supports nested paths, weighted search, searching in arrays of [strings](/examples.html#search-string-array) and [objects](/examples.html#nested-search).\n\n## Fuzzy Matching Options\n\n<!-- ::: warning\nYou shouldn't have to change these.\n::: -->\n\n### `location`\n\n- Type: `number`\n- Default: `0`\n\nDetermines approximately where in the text is the pattern expected to be found.\n\n### `threshold`\n\n- Type: `number`\n- Default: `0.6`\n\nAt what point does the match algorithm give up. A threshold of `0.0` requires a perfect match (of both letters and location), a threshold of `1.0` would match anything.\n\n### `distance`\n\n- Type: `number`\n- Default: `100`\n\nDetermines how close the match must be to the fuzzy location (specified by `location`). An exact letter match which is `distance` characters away from the fuzzy location would score as a complete mismatch. A `distance` of `0` requires the match be at the exact `location` specified. A distance of `1000` would require a perfect match to be within `800` characters of the `location` to be found using a `threshold` of `0.8`.\n\n### `ignoreLocation`\n\n- Type: `boolean`\n- Default: `false`\n\nWhen `true`, search will ignore `location` and `distance`, so it won't matter where in the string the pattern appears.\n\n::: tip\n\nThe default options only search the first 60 characters. This should suffice if it is reasonably expected that the match is within this range. To modify this behavior, set the appropriate combination of `location`, `threshold`, `distance` (or `ignoreLocation`).\n\nTo better understand how these options work together, read our [Scoring Theory](/concepts/scoring-theory.html#scoring-theory).\n:::\n\n## Advanced Options\n\n### `useExtendedSearch`\n\n- Type: `boolean`\n- Default: `false`\n\nWhen `true`, it enables the use of unix-like search commands. See [example](/examples.html#extended-search).\n\n### `getFn`\n\n- Type: `Function`\n- Default: `(obj: T, path: string | string[]) => string | string[]`\n\nThe function to use to retrieve an object's value at the provided path. The default will also search nested paths.\n\n### `sortFn`\n\n- Type: `Function`\n- Default: `(a, b) => number`\n\nThe function to use to sort all the results. The default will sort by ascending relevance score, ascending index.\n\n### `ignoreFieldNorm`\n\n- Type: `boolean`\n- Default: `false`\n\nWhen `true`, the calculation for the relevance score (used for sorting) will ignore the [field-length norm](/concepts/scoring-theory.html#fuzziness-score).\n\n:::tip\nThe only time it makes sense to set `ignoreFieldNorm` to `true` is when it does not matter how many terms there are, but only that the query term exists.\n:::\n\n### `fieldNormWeight`\n\n- Type: `number`\n- Default: `1`\n\nDetermines how much the [field-length norm](/concepts/scoring-theory.html#field-length-norm) affects scoring. A value of `0` is equivalent to ignoring the field-length norm. A value of `0.5` will greatly reduce the effect of field-length norm, while a value of `2.0` will greatly increase it.\n\n<Donate />\n"
  },
  {
    "path": "docs/api/query.md",
    "content": "# Logical Query Operators\n\nFuse.js supports logical query operators. These operators are used for filtering the data and getting precise results based on the given conditions. The following table contains the logical query operators:\n\n| Name          | Description                                                         |\n| ------------- | ------------------------------------------------------------------- |\n| [\\$and](#and) | Returns all documents that match the conditions of **all** clauses. |\n| [\\$or](#or)   | Returns all documents that match the conditions of **any** clause.  |\n\n## `$and`\n\n```js\n{ $and: [ { <expression_1> }, { <expression_2> } , ... , { <expression_N> } ] }\n```\n\nThe `$and` operator performs a logical **AND** operation on an array of expressions and selects the entries that satisfy all the expressions. The `$and` operator uses short-circuit evaluation (i.e, if the first expression evaluates to false, Fuse.js will not evaluate the remaining expressions).\n\n::: tip\nFuse.js provides an implicit **AND** operation when specifying a comma separated list of expressions. Using an explicit **AND** with the `$and` operator is necessary when the same field or operator has to be specified in multiple expressions.\n:::\n\n#### Example\n\n```js\nconst result = fuse.search({\n  $and: [{ author: 'abc' }, { title: 'xyz' }]\n})\n```\n\n## `$or`\n\nThe `$or` operator performs a logical **OR** operation on an array expressions and selects the entries that satisfy at least one of the expressions.\nThe `$or` operator uses short-circuit evaluation (i.e, if the first expression evaluates to true, Fuse.js will not evaluate the remaining expressions).\n\n#### Example\n\n```js\nconst result = fuse.search({\n  $or: [{ author: 'abc' }, { author: 'def' }]\n})\n```\n\n## Logical search with dotted keys\n\nTo handle keys that contain dots, you can use the `$path` and `$val` properties when building the query.\n\n#### Example\n\n:::: tabs\n::: tab List\n\n```json\n[\n  {\n    \"title\": \"Old Man's War\",\n    \"author\": {\n      \"first.name\": \"John\",\n      \"last.name\": \"Scalzi\",\n      \"age\": \"61\"\n    }\n  }\n]\n```\n\n:::\n\n::: tab JS\n\n```javascript\nconst options = {\n  useExtendedSearch: true,\n  includeScore: true,\n  keys: [\n    'title',\n    ['author', 'first.name'],\n    ['author', 'last.name'],\n    'author.age'\n  ]\n}\n\nconst query = {\n  $and: [\n    {\n      $path: ['author', 'first.name'],\n      $val: 'jon'\n    },\n    {\n      $path: ['author', 'last.name'],\n      $val: 'scazi'\n    }\n  ]\n}\n```\n\n:::\n::::\n\n## Use with Extended Searching\n\nLogical query operations pair quite nicely with [extended searching](/examples.html#extended-search).\n\n```js\nconst result = fuse.search({\n  $and: [\n    { title: 'old war' }, // Fuzzy \"old war\"\n    { color: \"'blue\" }, // Exact match for blue\n    {\n      $or: [\n        { title: '^lock' }, // Starts with \"lock\"\n        { title: '!arts' } // Does not have \"arts\"\n      ]\n    }\n  ]\n})\n```\n\n<Donate />\n"
  },
  {
    "path": "docs/concepts/scoring-theory.md",
    "content": "# Scoring Theory\n\nOnce we have a list of matching items, they need to be ranked by a **relevance score**. This score is determined by three factors:\n\n- Fuzziness score\n- Key weight\n- Field-length norm\n\n### Fuzziness Score\n\nThe fuzziness score is internally calculated via a modified implementation of the [Bitap](https://en.wikipedia.org/wiki/Bitap_algorithm) algorithm.\n\n#### Distance, Threshold, and Location\n\nThe calculation for something to be considered a match (whether fuzzy or exact) takes into account how far the pattern is from the expected location, within a threshold.\n\nTo illustrate, consider the following options:\n\n- `location` defaults to `0`\n- `distance` defaults to `100`\n- `threshold` defaults to `0.6`\n\nWith the above options, for something to be considered a match, it would have to be within (threshold) `0.6` x (distance) `100` = `60` characters away from the expected location `0`.\n\nFor example, consider the string `\"Fuse.js is a powerful, lightweight fuzzy-search library, with zero dependencies\"`. Searching for the pattern `\"zero\"` would not match anything, even though it occurs in the string. The reason is that with the above defaults, for it to be considered a match it would have to be within `60` characters away from the expected location `0`. However, `\"zero\"` appears at index `62`.\n\n::: tip\nIf you don't care where the pattern appears in the string, and you still want to consider it a match, set `ignoreLocation` to `true`.\n:::\n\n### Key Weight\n\nUser inputted weight of the key. The higher the weight, the higher its relevance score. This is optional, although Fuse.js will internally default it to `1` if one isn't provided. This boosting is applied at query time.\n\n### Field-length Norm\n\nThe shorter the field, the higher its relevance. If a pattern matches a short field (such as a `title` field) it is likely to be more relevant than the same pattern matched with a bigger field. This is calculated at index time.\n\n::: tip\nYou can ignore the field-length norm by setting `ignoreFieldNorm` to `true`. Alternatively, you can configure how much the field-length norm affects your scoring by setting `fieldNormWeight` to a value other than 1 (the default).\n:::\n\n<Donate />\n"
  },
  {
    "path": "docs/demo.md",
    "content": "# Live Demo\n\nPlay around with a live demo of Fuse.js. Have a look at the [options](api/options.html) to understand what they mean.\n\n<SuspensefulDemo />\n\n<Donate />\n"
  },
  {
    "path": "docs/donate.md",
    "content": "# Become a Fuse.js Sponsor\n\nFuse.js is an Apache licensed open source project and completely free to use. If you use Fuse.js in your daily work and feel that it has made your life easier, please consider sponsorship.\n\nThe amount of effort needed to maintain this and develop new features for the project is only made sustainable thanks to your generous financial backing.\n\n---\n\n## How to Sponsor\n\nSponsorships can be done via [GitHub Sponsors](https://github.com/sponsors/krisk) or [PayPal](https://www.paypal.me/kirorisk). Invoices can be obtained via GitHub's payment system. Both monthly-recurring sponsorships and one-time donations are accepted. Recurring sponsorships are entitled to logo placements as specified in [Sponsorship Tiers](#tier-benefits).\n\n### Sponsoring Fuse.js as a Business\n\nIf you run a business that is using Fuse.js, it makes sense to sponsor its development: **it ensures the project stays healthy and actively maintained.**\n\nAlso, you will be recognized as a beacon of support to open-source developers everywhere.\n\n### Sponsoring Fuse.js as an Individual\n\nIf you are an individual user and have enjoyed the productivity of using Fuse.js, consider donating as a sign of appreciation.\n\nYou can also try to convince your employer to sponsor Fuse.js as a business 😊.\n\n---\n\n## Tier Benefits\n\n- **☕ Coffee Sponsor (USD $5/month):**\n\n  - Your name will be added to the [BACKERS.md](https://github.com/krisk/Fuse/blob/main/backers.md) file of the GitHub repo. Also, thank you! It’s like buying me a cup of coffee every month ☕️.\n\n- **🥉 Bronze Sponsor (USD $20/month):**\n\n  - Your name or logo in the [README.md](https://github.com/krisk/Fuse) file of the GitHub repo.\n\n- **🥈 Silver Sponsor (USD $100/month):**\n\n  - Your company's logo placed on both the front page of [fusejs.io](https://fusejs.io/) and in the [README.md](https://github.com/krisk/Fuse) file of the GitHub repo.\n\n- **🥇 Gold Sponsor (USD $400/month):**\n\n  - All of the above but with a bigger logo, and most prominent placement.\n"
  },
  {
    "path": "docs/examples.md",
    "content": "# Examples\n\n---\n\n## Search String Array\n\n:::: tabs\n::: tab List\n\n```json\n[\"Old Man's War\", \"The Lock Artist\"]\n```\n\n:::\n::: tab JS\n\n```javascript\nconst options = {\n  includeScore: true\n}\n\nconst fuse = new Fuse(list, options)\n\nconst result = fuse.search('od man')\n```\n\n:::\n\n::: tab Output\n\n```json\n[\n  {\n    \"item\": \"Old Man's War\",\n    \"refIndex\": 0,\n    \"score\": 0.35\n  }\n]\n```\n\n:::\n::::\n\n## Search Object Array\n\n:::: tabs\n::: tab List\n\n```json\n[\n  {\n    \"title\": \"Old Man's War\",\n    \"author\": \"John Scalzi\",\n    \"tags\": [\"fiction\"]\n  },\n  {\n    \"title\": \"The Lock Artist\",\n    \"author\": \"Steve\",\n    \"tags\": [\"thriller\"]\n  }\n]\n```\n\n:::\n::: tab JS\n\n```javascript\nconst options = {\n  includeScore: true,\n  // Search in `author` and in `tags` array\n  keys: ['author', 'tags']\n}\n\nconst fuse = new Fuse(list, options)\n\nconst result = fuse.search('tion')\n```\n\n:::\n\n::: tab Output\n\n```json\n[\n  {\n    \"item\": {\n      \"title\": \"Old Man's War\",\n      \"author\": \"John Scalzi\",\n      \"tags\": [\"fiction\"]\n    },\n    \"refIndex\": 0,\n    \"score\": 0.03\n  }\n]\n```\n\n:::\n::::\n\n## Nested Search\n\nYou can search through nested values with different ways:\n\n- define the path with dot notation (`.`)\n- define the path with array notation (`[]`)\n- Define a per-key `getFn` function\n\n:::: tabs\n::: tab List\n\n```json\n[\n  {\n    \"title\": \"Old Man's War\",\n    \"author\": {\n      \"name\": \"John Scalzi\",\n      \"tags\": [\n        {\n          \"value\": \"American\"\n        }\n      ]\n    }\n  },\n  {\n    \"title\": \"The Lock Artist\",\n    \"author\": {\n      \"name\": \"Steve Hamilton\",\n      \"tags\": [\n        {\n          \"value\": \"English\"\n        }\n      ]\n    }\n  }\n]\n```\n\n:::\n::: tab JS (dot notation)\n\n```javascript\nconst options = {\n  includeScore: true,\n  keys: ['author.tags.value']\n}\n\nconst fuse = new Fuse(list, options)\n\nconst result = fuse.search('engsh')\n```\n\n:::\n\n::: tab JS (array notation)\n\n```javascript\nconst options = {\n  includeScore: true,\n  keys: [['author', 'tags', 'value']]\n}\n\nconst fuse = new Fuse(list, options)\n\nconst result = fuse.search('engsh')\n```\n\n:::\n\n::: tab JS (get function)\n\n```javascript\nconst options = {\n  includeScore: true,\n  keys: [\n    { name: 'title', getFn: (book) => book.title },\n    { name: 'authorName', getFn: (book) => book.author.name }\n  ]\n})\n\nconst fuse = new Fuse(list, options)\n\nconst result = fuse.search({ authorName: 'Steve' })\n```\n\n:::\n\n::: tab Output\n\n```json\n[\n  {\n    \"item\": {\n      \"title\": \"The Lock Artist\",\n      \"author\": {\n        \"name\": \"Steve Hamilton\",\n        \"tags\": [\n          {\n            \"value\": \"English\"\n          }\n        ]\n      }\n    },\n    \"refIndex\": 1,\n    \"score\": 0.4\n  }\n]\n```\n\n:::\n::::\n\n::: warning IMPORTANT\nThe path has to eventually point to a string, otherwise you will not get any results.\n:::\n\n## Weighted Search\n\nYou can allocate a weight to keys to give them higher (or lower) values in search results. The `weight` value has to be greater than `0`.\n\n:::: tabs\n::: tab List\n\n```json\n[\n  {\n    \"title\": \"Old Man's War fiction\",\n    \"author\": \"John X\",\n    \"tags\": [\"war\"]\n  },\n  {\n    \"title\": \"Right Ho Jeeves\",\n    \"author\": \"P.D. Mans\",\n    \"tags\": [\"fiction\", \"war\"]\n  }\n]\n```\n\n:::\n::: tab JS\n\n```javascript\nconst options = {\n  includeScore: true,\n  keys: [\n    {\n      name: 'title',\n      weight: 0.3\n    },\n    {\n      name: 'author',\n      weight: 0.7\n    }\n  ]\n}\n\n// Create a new instance of Fuse\nconst fuse = new Fuse(books, options)\n\n// Now search for 'Man'\nconst result = fuse.search('Man')\n```\n\n:::\n\n::: tab Output\n\n```json\n[\n  {\n    \"item\": {\n      \"title\": \"Right Ho Jeeves\",\n      \"author\": \"P.D. Mans\",\n      \"tags\": [\"fiction\", \"war\"]\n    },\n    \"refIndex\": 1, // index in the original list\n    \"score\": 0.12282280261157906\n  },\n  {\n    \"item\": {\n      \"title\": \"Old Man's War fiction\",\n      \"author\": \"John X\",\n      \"tags\": [\"war\"]\n    },\n    \"refIndex\": 0,\n    \"score\": 0.3807307877431757\n  }\n]\n```\n\n:::\n::::\n\n### Default `weight`\n\nWhen a `weight` isn't provided, it will default to `1`. In the following example, while `author` has been given a weight of `2`, `title` will be assigned a weight of `1`.\n\n```js\nconst fuse = new Fuse(books, {\n  keys: [\n    'title', // will be assigned a `weight` of 1\n    {\n      name: 'author',\n      weight: 2\n    }\n  ]\n})\n```\n\nNote that internally Fuse will normalize the weights to be within `0` and `1` exclusive.\n\n## Extended Search\n\nThis form of advanced searching allows you to fine-tune results.\n\nWhite space acts as an **AND** operator, while a single pipe (`|`) character acts as an **OR** operator. To escape white space, use double quote ex. `=\"scheme language\"` for exact match.\n\n| Token       | Match type                 | Description                            |\n| ----------- | -------------------------- | -------------------------------------- |\n| `jscript`   | fuzzy-match                | Items that fuzzy match `jscript`       |\n| `=scheme`   | exact-match                | Items that are `scheme`                |\n| `'python`   | include-match              | Items that include `python`            |\n| `!ruby`     | inverse-exact-match        | Items that do not include `ruby`       |\n| `^java`     | prefix-exact-match         | Items that start with `java`           |\n| `!^earlang` | inverse-prefix-exact-match | Items that do not start with `earlang` |\n| `.js$`      | suffix-exact-match         | Items that end with `.js`              |\n| `!.go$`     | inverse-suffix-exact-match | Items that do not end with `.go`       |\n\nWhite space acts as an **AND** operator, while a single pipe (`|`) character acts as an **OR** operator.\n\n:::: tabs\n::: tab List\n\n```json\n[\n  {\n    \"title\": \"Old Man's War\",\n    \"author\": \"John Scalzi\"\n  },\n  {\n    \"title\": \"The Lock Artist\",\n    \"author\": \"Steve\"\n  },\n  {\n    \"title\": \"Artist for Life\",\n    \"author\": \"Michelangelo\"\n  }\n]\n```\n\n:::\n::: tab JS\n\n```javascript\nconst options = {\n  includeScore: true,\n  useExtendedSearch: true,\n  keys: ['title']\n}\n\nconst fuse = new Fuse(books, options)\n\n// Search for items that include \"Man\" and \"Old\",\n// OR end with \"Artist\"\nfuse.search(\"'Man 'Old | Artist$\")\n```\n\n:::\n\n::: tab Output\n\n```json\n[\n  {\n    \"item\": {\n      \"title\": \"Old Man's War\",\n      \"author\": \"John Scalzi\"\n    },\n    \"refIndex\": 0,\n    \"score\": 2.220446049250313e-16\n  },\n  {\n    \"item\": {\n      \"title\": \"The Lock Artist\",\n      \"author\": \"Steve\"\n    },\n    \"refIndex\": 1,\n    \"score\": 2.220446049250313e-16\n  }\n]\n```\n\n:::\n::::\n\n<!-- ```js\nconst result = fuse.search({\n  $and: [\n    { title: 'old war' }, // Fuzzy \"old war\"\n    { color: \"'blue\" }, // Exact match for blue\n    {\n      $or: [\n        { title: '!arts' }, // Does not have \"arts\"\n        { title: '^lock' } // Starts with \"lock\"\n      ]\n    }\n  ]\n})\n``` -->\n\n<Donate />\n"
  },
  {
    "path": "docs/getting-started/different-builds.md",
    "content": "# Explanation of Different Builds\n\nIn the [`dist/` directory of the npm package](https://cdn.jsdelivr.net/npm/fuse.js/dist/) you will find many different builds of Fuse.js. Here's an overview of the difference between them.\n\n|                        | UMD               | CommonJS       | ES Module (for bundlers) |\n| ---------------------- | ----------------- | -------------- | ------------------------ |\n| **Full**               | fuse.js           | fuse.cjs       | fuse.mjs                 |\n| **Basic**              | fuse.basic.js     | fuse.basic.cjs | fuse.basic.mjs           |\n| **Full (Production)**  | fuse.min.js       | -              | fuse.min.mjs             |\n| **Basic (Production)** | fuse.basic.min.js | -              | fuse.basic.min.mjs       |\n\n### Terms\n\n- **Full**: Builds that contain standard fuzzy searching, [extended searching](/examples.html#extended-search), and [logical query operations](/api/query.html). These builds are larger.\n\n- **Basic**: Builds that contain only standard fuzzy searching.\n\n- **[UMD](https://github.com/umdjs/umd)**: UMD builds can be used directly in the browser via a `<script>` tag. The default file from jsDelivr CDN at https://cdn.jsdelivr.net/npm/fuse.js is the UMD build (`fuse.js`).\n\n- **[CommonJS](http://wiki.commonjs.org/wiki/Modules/1.1)**: CommonJS builds are intended for use with older bundlers like [browserify](http://browserify.org/) or [webpack 1](https://webpack.github.io). The file for these bundlers (`pkg.main`) is the CommonJS build (`fuse.cjs`).\n\n- **[ES Module](http://exploringjs.com/es6/ch_modules.html)**: Intended for use with modern bundlers like [Webpack 2](https://webpack.js.org) or [Rollup](http://rollupjs.org/). The file for these bundlers (`pkg.module`) is the ES Module build (`fuse.mjs`).\n\n<Donate />\n"
  },
  {
    "path": "docs/getting-started/installation.md",
    "content": "# Installation\n\n<Version />\n\n### npm\n\n```sh\nnpm install fuse.js\n```\n\n### Yarn\n\n```sh\nyarn add fuse.js\n```\n\n#### Importing\n\nES6 module syntax:\n\n```js\nimport Fuse from 'fuse.js'\n```\n\nCommonJS:\n\n```js\nconst Fuse = require('fuse.js')\n```\n\n### Direct `<script>` Include\n\nSimply download and include with a script tag. `Fuse` will be registered as a global variable.\n\n#### CDN\n\nFor prototyping or learning purposes, you can use the latest version with:\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/fuse.js/dist/fuse.js\"></script>\n```\n\nFor production, we recommend linking to a specific version number and build to avoid unexpected breakage from newer versions:\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/fuse.js@7.1.0\"></script>\n```\n\nIf you are using native ES Modules, there is also an ES Modules compatible build:\n\n```html\n<script type=\"module\">\n  import Fuse from 'https://cdn.jsdelivr.net/npm/fuse.js@7.1.0/dist/fuse.mjs'\n</script>\n```\n\nYou can browse the source of the npm package at [cdn.jsdelivr.net/npm/fuse.js](https://cdn.jsdelivr.net/npm/fuse.js).\n\nFuse.js is also available on [unpkg](https://unpkg.com/fuse.js).\n\nMake sure to read about [the different builds of Fuse.js](different-builds.html) and use the production\nversion in your published site, replacing `fuse.js` with `fuse.min.js`. This is a smaller build optimized for speed instead of development experience.\n\n### Deno\n\nYou can directly import `Fuse` as an ES module from the deno.land/x service:\n\n```typescript\n// @deno-types=\"https://deno.land/x/fuse@v7.1.0/dist/fuse.d.ts\"\nimport Fuse from 'https://deno.land/x/fuse@v7.1.0/dist/fuse.min.mjs'\n```\n\n<Donate />\n"
  },
  {
    "path": "docs/jobs.md",
    "content": "# Land your next job!\n\n_To post a job here, contact me at <hello@kiro.me>_\n\n<Jobs />\n"
  },
  {
    "path": "docs/stories.md",
    "content": "# Stories from users like you\n\n### Get insight into how various products are using Fuse.js to tackle a growing number of use cases.\n\n<Stories />\n\n<br/>\n\nDo you have a product powered by Fuse.js and want to see it listed here? Send me an [email](mailto:kiro@kiro.me) 🙂\n"
  },
  {
    "path": "docs/team.md",
    "content": "---\ntitle: Meet the Team\ntype: guide\norder: 803\n---\n\n# Meet the Team\n\n<Team />\n\n<Donate />\n"
  },
  {
    "path": "docs/test.md",
    "content": "---\nmeta:\n  - name: robots\n    content: noindex\n---\n\n# Test Page\n\n<div id=\"bsa-zone_1607098756727-6_123456\"></div>\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"fuse.js\",\n  \"author\": {\n    \"name\": \"Kiro Risk\",\n    \"email\": \"kirollos@gmail.com\",\n    \"url\": \"http://kiro.me\"\n  },\n  \"type\": \"module\",\n  \"main\": \"./dist/fuse.cjs\",\n  \"module\": \"./dist/fuse.mjs\",\n  \"unpkg\": \"./dist/fuse.js\",\n  \"jsdelivr\": \"./dist/fuse.js\",\n  \"types\": \"./dist/fuse.d.ts\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/fuse.d.ts\",\n      \"import\": \"./dist/fuse.mjs\",\n      \"require\": \"./dist/fuse.cjs\"\n    },\n    \"./min\": {\n      \"types\": \"./dist/fuse.d.ts\",\n      \"import\": \"./dist/fuse.min.mjs\",\n      \"require\": \"./dist/fuse.min.cjs\"\n    },\n    \"./basic\": {\n      \"types\": \"./dist/fuse.d.ts\",\n      \"import\": \"./dist/fuse.basic.mjs\",\n      \"require\": \"./dist/fuse.basic.cjs\"\n    },\n    \"./min-basic\": {\n      \"types\": \"./dist/fuse.d.ts\",\n      \"import\": \"./dist/fuse.basic.min.mjs\",\n      \"require\": \"./dist/fuse.basic.min.cjs\"\n    }\n  },\n  \"sideEffects\": false,\n  \"files\": [\n    \"dist\"\n  ],\n  \"version\": \"7.1.0\",\n  \"description\": \"Lightweight fuzzy-search\",\n  \"license\": \"Apache-2.0\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/krisk/Fuse.git\"\n  },\n  \"homepage\": \"http://fusejs.io\",\n  \"keywords\": [\n    \"fuzzy\",\n    \"search\",\n    \"bitap\"\n  ],\n  \"scripts\": {\n    \"dev\": \"rollup -w -c scripts/configs.cjs --environment TARGET:umd-dev-full\",\n    \"dev:cjs\": \"rollup -w -c scripts/configs.cjs --environment TARGET:commonjs-full\",\n    \"dev:esm\": \"rollup -w -c scripts/configs.cjs --environment TARGET:esm-dev-full\",\n    \"build\": \"rm -r dist && mkdir dist && node ./scripts/build.main.cjs\",\n    \"test\": \"vitest run\",\n    \"lint\": \"eslint src test\",\n    \"release\": \"./scripts/release.sh\",\n    \"docs:bump\": \"node ./scripts/bump-docs.cjs\",\n    \"docs:dev\": \"vuepress dev docs\",\n    \"docs:build\": \"vuepress build docs\",\n    \"docs:release\": \"./scripts/deploy-docs.sh\",\n    \"prepare\": \"husky install\"\n  },\n  \"standard-version\": {\n    \"scripts\": {\n      \"postbump\": \"npm run build && npm run lint && npm run test 2>/dev/null\",\n      \"precommit\": \"git add dist/*.js dist/*.cjs dist/*.mjs dist/*.d.ts\"\n    }\n  },\n  \"commitlint\": {\n    \"extends\": [\n      \"@commitlint/config-conventional\"\n    ]\n  },\n  \"devDependencies\": {\n    \"@babel/cli\": \"^7.20.7\",\n    \"@babel/core\": \"^7.20.12\",\n    \"@babel/eslint-parser\": \"^7.19.1\",\n    \"@babel/plugin-proposal-object-rest-spread\": \"7.20.7\",\n    \"@babel/plugin-syntax-import-assertions\": \"^7.22.5\",\n    \"@babel/preset-env\": \"7.20.2\",\n    \"@babel/preset-typescript\": \"7.18.6\",\n    \"@commitlint/cli\": \"^17.4.2\",\n    \"@commitlint/config-conventional\": \"^17.4.2\",\n    \"@monaco-editor/loader\": \"^1.3.2\",\n    \"@rollup/plugin-babel\": \"^6.0.3\",\n    \"@rollup/plugin-node-resolve\": \"^15.0.1\",\n    \"@rollup/plugin-replace\": \"^5.0.2\",\n    \"@sapphire/stopwatch\": \"^1.5.0\",\n    \"@sapphire/utilities\": \"^3.11.0\",\n    \"@snippetors/vuepress-plugin-tabs\": \"1.2.3\",\n    \"@vuepress/plugin-google-analytics\": \"2.0.0-beta.60\",\n    \"@vuepress/plugin-pwa\": \"2.0.0-beta.60\",\n    \"@vuepress/plugin-register-components\": \"2.0.0-beta.60\",\n    \"@vuepress/plugin-search\": \"2.0.0-beta.60\",\n    \"babel-loader\": \"^9.1.2\",\n    \"eslint\": \"8.32.0\",\n    \"eslint-config-prettier\": \"8.6.0\",\n    \"husky\": \"^8.0.3\",\n    \"monaco-editor\": \"^0.34.1\",\n    \"prettier\": \"2.8.3\",\n    \"replace-in-file\": \"^6.3.5\",\n    \"rollup\": \"^2.79.1\",\n    \"rollup-plugin-dts\": \"^5.3.0\",\n    \"standard-version\": \"^9.5.0\",\n    \"terser\": \"^5.16.1\",\n    \"typescript\": \"^4.9.4\",\n    \"vitest\": \"^0.28.3\",\n    \"vuepress\": \"2.0.0-beta.60\",\n    \"vuepress-plugin-google-adsense2\": \"1.0.2\"\n  },\n  \"engines\": {\n    \"node\": \">=10\"\n  }\n}\n"
  },
  {
    "path": "scripts/build.main.cjs",
    "content": "const fs = require('fs')\nconst path = require('path')\nconst zlib = require('zlib')\nconst terser = require('terser')\nconst rollup = require('rollup')\nconst configs = require('./configs.cjs')\nconst configTypes = require('./config-types.cjs')\n\nif (!fs.existsSync('dist')) {\n  fs.mkdirSync('dist')\n}\n\nbuild(Object.keys(configs).map((key) => configs[key]))\n\nasync function build(builds) {\n  for (const entry of builds) {\n    try {\n      await buildEntry(entry)\n    } catch (err) {\n      logError(err)\n    }\n  }\n\n  try {\n    await buildTypes()\n  } catch (err) {\n    logError(err)\n  }\n}\n\nasync function buildEntry(config) {\n  const output = config.output\n  const { file, banner } = output\n  const isProd = /(min|prod)\\.(?:c|m)?js$/.test(file)\n\n  try {\n    let bundle = await rollup.rollup(config)\n    let {\n      output: [{ code }]\n    } = await bundle.generate(output)\n\n    return isProd\n      ? write(file, await minify(banner, code), true)\n      : write(file, code)\n  } catch (err) {\n    throw new Error(err)\n  }\n}\n\nasync function buildTypes() {\n  const output = configTypes.output\n  const { file } = output\n\n  try {\n    let bundle = await rollup.rollup(configTypes)\n    let {\n      output: [{ code }]\n    } = await bundle.generate(output)\n\n    return write(file, code)\n  } catch (err) {\n    throw new Error(err)\n  }\n}\n\nasync function minify(banner, code) {\n  const output = await terser.minify(code, {\n    toplevel: true,\n    output: {\n      ascii_only: true\n    },\n    compress: {\n      pure_funcs: ['makeMap']\n    }\n  })\n  return (banner || '') + output.code\n}\n\nfunction write(dest, code, zip) {\n  return new Promise((resolve, reject) => {\n    function report(extra) {\n      console.log(\n        blue(path.relative(process.cwd(), dest)) +\n          ' ' +\n          getSize(code) +\n          (extra || '')\n      )\n      resolve()\n    }\n\n    fs.writeFile(dest, code, (err) => {\n      if (err) return reject(err)\n      if (zip) {\n        zlib.gzip(code, (err, zipped) => {\n          if (err) return reject(err)\n          report(` (gzipped: ${getSize(zipped)})`)\n        })\n      } else {\n        report()\n      }\n    })\n  })\n}\n\nfunction getSize(code) {\n  return (code.length / 1024).toFixed(2) + 'kb'\n}\n\nfunction logError(e) {\n  console.error(e)\n}\n\nfunction blue(str) {\n  return `\\x1b[1m\\x1b[34m${str}\\x1b[39m\\x1b[22m`\n}\n"
  },
  {
    "path": "scripts/bump-docs.cjs",
    "content": "//Load the library and specify options\nconst replace = require('replace-in-file')\nconst pckg = require('../package.json')\nconst VERSION = process.env.VERSION || pckg.version\n\nconst options = {\n  files: './docs/getting-started/installation.md',\n  from: /(\\d+\\.)(\\d+\\.)(\\d+)/g,\n  to: VERSION\n}\n\nasync function bump() {\n  try {\n    const results = await replace(options)\n    console.log('Replacement results:', results)\n  } catch (error) {\n    console.error('Error occurred:', error)\n  }\n}\n\nbump()\n"
  },
  {
    "path": "scripts/config-types.cjs",
    "content": "const path = require('path')\nconst resolve = (_path) => path.resolve(__dirname, '../', _path)\nconst dts = require('rollup-plugin-dts').default;\nconst pckg = require('../package.json')\nconst typescript = require('typescript')\n\nconst FILENAME = 'fuse'\nconst VERSION = process.env.VERSION || pckg.version\n\nconst banner = [\n  `// Type definitions for Fuse.js v${VERSION}`,\n  `// TypeScript v${typescript.version}`\n].join('\\n')\n\nconst configTypes = {\n  input: resolve('src/index.d.ts'),\n  output: {\n    banner,\n    file: resolve(`dist/${FILENAME}.d.ts`),\n    format: 'es',\n    name: 'Fuse'\n  },\n  plugins: [\n    dts({\n      tsconfig: resolve('src/tsconfig.json')\n    })\n  ],\n  cache: false\n}\n\nmodule.exports = configTypes;\n"
  },
  {
    "path": "scripts/configs.cjs",
    "content": "const path = require('path')\nconst replace = require('@rollup/plugin-replace')\nconst { nodeResolve } = require('@rollup/plugin-node-resolve')\nconst { babel } = require('@rollup/plugin-babel')\nconst pckg = require('../package.json')\n\nconst FILENAME = 'fuse'\nconst VERSION = process.env.VERSION || pckg.version\nconst AUTHOR = pckg.author\nconst HOMEPAGE = pckg.homepage\nconst DESCRIPTION = pckg.description\n\nconst banner = `/**\n * Fuse.js v${VERSION} - ${DESCRIPTION} (${HOMEPAGE})\n *\n * Copyright (c) ${new Date().getFullYear()} ${AUTHOR.name} (${AUTHOR.url})\n * All Rights Reserved. Apache Software License 2.0\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\\n`\n\nconst resolve = (_path) => path.resolve(__dirname, '../', _path)\n\nconst FeatureFlags = {\n  LOGICAL_SEARCH_ENABLED: false,\n  EXTENDED_SEARCH_ENABLED: false\n}\n\nconst fullBuildFeatures = {\n  LOGICAL_SEARCH_ENABLED: true,\n  EXTENDED_SEARCH_ENABLED: true\n}\n\nconst builds = {\n  // UMD full build\n  'umd-dev-full': {\n    dest: resolve(`dist/${FILENAME}.js`),\n    format: 'umd',\n    env: 'development',\n    features: {\n      ...fullBuildFeatures\n    }\n  },\n  // UMD production build\n  'umd-prod-full': {\n    dest: `dist/${FILENAME}.min.js`,\n    format: 'umd',\n    env: 'production',\n    features: {\n      ...fullBuildFeatures\n    }\n  },\n  // UMD basic build\n  'umd-dev-basic': {\n    dest: `dist/${FILENAME}.basic.js`,\n    format: 'umd',\n    env: 'development'\n  },\n  'umd-prod-basic': {\n    dest: `dist/${FILENAME}.basic.min.js`,\n    format: 'umd',\n    env: 'production'\n  },\n  // CommonJS full build\n  'commonjs-dev-full': {\n    dest: `dist/${FILENAME}.cjs`,\n    env: 'development',\n    features: {\n      ...fullBuildFeatures\n    },\n    format: 'cjs'\n  },\n  // CommonJS full minified build\n  'commonjs-prod-full': {\n    dest: `dist/${FILENAME}.min.cjs`,\n    env: 'production',\n    features: {\n      ...fullBuildFeatures\n    },\n    format: 'cjs'\n  },\n  // CommonJS basic build\n  'commonjs-dev-basic': {\n    dest: `dist/${FILENAME}.basic.cjs`,\n    env: 'development',\n    format: 'cjs'\n  },\n  // CommonJS basic minified build\n  'commonjs-prod-basic': {\n    dest: `dist/${FILENAME}.basic.min.cjs`,\n    env: 'production',\n    format: 'cjs'\n  },\n  // ES modules build (for bundlers)\n  'esm-dev-full': {\n    dest: `dist/${FILENAME}.mjs`,\n    format: 'es',\n    env: 'development',\n    features: {\n      ...fullBuildFeatures\n    },\n    transpile: false\n  },\n  'esm-prod-full': {\n    dest: `dist/${FILENAME}.min.mjs`,\n    format: 'es',\n    env: 'production',\n    features: {\n      ...fullBuildFeatures\n    },\n    transpile: false\n  },\n  'esm-basic': {\n    dest: `dist/${FILENAME}.basic.mjs`,\n    format: 'es',\n    env: 'development',\n    transpile: false\n  },\n  'esm-prod-basic': {\n    dest: `dist/${FILENAME}.basic.min.mjs`,\n    format: 'es',\n    env: 'production',\n    transpile: false\n  }\n}\n\nconst defaultVars = {\n  __VERSION__: VERSION,\n  preventAssignment: true\n}\n\nconst defaultFeatures = Object.keys(FeatureFlags).reduce((map, key) => {\n  map[`process.env.${key}`] = FeatureFlags[key]\n  return map\n}, {})\n\nfunction genConfig(options) {\n  // built-in vars\n  const vars = { ...defaultVars, ...defaultFeatures }\n\n  const config = {\n    input: resolve('src/entry.js'),\n    plugins: [nodeResolve(), ...(options.plugins || [])],\n    output: {\n      banner,\n      file: resolve(options.dest),\n      format: options.format,\n      name: 'Fuse',\n      exports: 'default'\n    }\n  }\n\n  // build-specific env\n  if (options.env) {\n    vars['process.env.NODE_ENV'] = JSON.stringify(options.env)\n  }\n\n  // feature flags\n  if (options.features) {\n    Object.keys(options.features).forEach((key) => {\n      vars[`process.env.${key}`] = JSON.stringify(options.features[key])\n    })\n  }\n\n  config.plugins.push(replace(vars))\n\n  if (options.transpile !== false) {\n    config.plugins.push(babel({ babelHelpers: 'bundled' }))\n  }\n\n  return config\n}\n\nfunction mapValues(obj, fn) {\n  const res = {}\n\n  Object.keys(obj).forEach((key) => {\n    res[key] = fn(obj[key], key)\n  })\n\n  return res\n}\n\nif (process.env.TARGET) {\n  module.exports = genConfig(builds[process.env.TARGET])\n} else {\n  module.exports = mapValues(builds, genConfig)\n}\n"
  },
  {
    "path": "scripts/deploy-docs.sh",
    "content": "#!/usr/bin/env sh\n\n# Purpose: build and publish the doumentation (https://fusejs.io)\n\n# abort on errors\nset -e\n\nread -p \"Do you want to publish the website? (y/n) \" -n 1 -r\n\necho\n\nif [[ $REPLY =~ ^[Yy]$ ]]; then\n  # bump\n  echo \"Updating Fuse.js version\"\n  npm run docs:bump\n\n  # build\n  echo \"Building docs\"\n  npm run docs:build\n\n  echo \"Publishing\"\n  # navigate into the build output directory\n  cd docs/.vuepress/dist\n\n  echo 'www.fusejs.io' > CNAME\n\n  git init\n  git add -A\n  git commit -m 'docs(site): publish site'\n\n  git push -f git@github.com:krisk/Fuse.git main:gh-pages\n\n  echo \"✅ Pushed to GitHub\"\nelse\n  echo \"\\033[0;31mCancelling...\\033[0m\"\nfi\n"
  },
  {
    "path": "scripts/release.sh",
    "content": "#!/usr/bin/env sh\n\n# Purpose: build and publish the the library.\n\n# abort on errors\nset -e\n\nread -p \"Do you want to create a release? (y/n) \" -n 1 -r\n\necho\n\nif [[ $REPLY =~ ^[Yy]$ ]]; then\n  npx standard-version -a\nelse\n  echo \"\\033[0;31mCancelling...\\033[0m\"\nfi\n"
  },
  {
    "path": "src/core/computeScore.js",
    "content": "import Config from './config'\n\n// Practical scoring function\nexport default function computeScore(\n  results,\n  { ignoreFieldNorm = Config.ignoreFieldNorm }\n) {\n  results.forEach((result) => {\n    let totalScore = 1\n\n    result.matches.forEach(({ key, norm, score }) => {\n      const weight = key ? key.weight : null\n\n      totalScore *= Math.pow(\n        score === 0 && weight ? Number.EPSILON : score,\n        (weight || 1) * (ignoreFieldNorm ? 1 : norm)\n      )\n    })\n\n    result.score = totalScore\n  })\n}\n"
  },
  {
    "path": "src/core/config.js",
    "content": "import get from '../helpers/get'\n\nexport const MatchOptions = {\n  // Whether the matches should be included in the result set. When `true`, each record in the result\n  // set will include the indices of the matched characters.\n  // These can consequently be used for highlighting purposes.\n  includeMatches: false,\n  // When `true`, the matching function will continue to the end of a search pattern even if\n  // a perfect match has already been located in the string.\n  findAllMatches: false,\n  // Minimum number of characters that must be matched before a result is considered a match\n  minMatchCharLength: 1\n}\n\nexport const BasicOptions = {\n  // When `true`, the algorithm continues searching to the end of the input even if a perfect\n  // match is found before the end of the same input.\n  isCaseSensitive: false,\n  // When `true`, the algorithm will ignore diacritics (accents) in comparisons\n  ignoreDiacritics: false,\n  // When true, the matching function will continue to the end of a search pattern even if\n  includeScore: false,\n  // List of properties that will be searched. This also supports nested properties.\n  keys: [],\n  // Whether to sort the result list, by score\n  shouldSort: true,\n  // Default sort function: sort by ascending score, ascending index\n  sortFn: (a, b) =>\n    a.score === b.score ? (a.idx < b.idx ? -1 : 1) : a.score < b.score ? -1 : 1\n}\n\nexport const FuzzyOptions = {\n  // Approximately where in the text is the pattern expected to be found?\n  location: 0,\n  // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match\n  // (of both letters and location), a threshold of '1.0' would match anything.\n  threshold: 0.6,\n  // Determines how close the match must be to the fuzzy location (specified above).\n  // An exact letter match which is 'distance' characters away from the fuzzy location\n  // would score as a complete mismatch. A distance of '0' requires the match be at\n  // the exact location specified, a threshold of '1000' would require a perfect match\n  // to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n  distance: 100\n}\n\nexport const AdvancedOptions = {\n  // When `true`, it enables the use of unix-like search commands\n  useExtendedSearch: false,\n  // The get function to use when fetching an object's properties.\n  // The default will search nested paths *ie foo.bar.baz*\n  getFn: get,\n  // When `true`, search will ignore `location` and `distance`, so it won't matter\n  // where in the string the pattern appears.\n  // More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score\n  ignoreLocation: false,\n  // When `true`, the calculation for the relevance score (used for sorting) will\n  // ignore the field-length norm.\n  // More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm\n  ignoreFieldNorm: false,\n  // The weight to determine how much field length norm effects scoring.\n  fieldNormWeight: 1\n}\n\nexport default {\n  ...BasicOptions,\n  ...MatchOptions,\n  ...FuzzyOptions,\n  ...AdvancedOptions\n}\n"
  },
  {
    "path": "src/core/errorMessages.js",
    "content": "export const EXTENDED_SEARCH_UNAVAILABLE = 'Extended search is not available'\n\nexport const LOGICAL_SEARCH_UNAVAILABLE = 'Logical search is not available'\n\nexport const INCORRECT_INDEX_TYPE = \"Incorrect 'index' type\"\n\nexport const LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = (key) =>\n  `Invalid value for key ${key}`\n\nexport const PATTERN_LENGTH_TOO_LARGE = (max) =>\n  `Pattern length exceeds max of ${max}.`\n\nexport const MISSING_KEY_PROPERTY = (name) => `Missing ${name} property in key`\n\nexport const INVALID_KEY_WEIGHT_VALUE = (key) =>\n  `Property 'weight' in key '${key}' must be a positive integer`\n"
  },
  {
    "path": "src/core/format.js",
    "content": "import Config from './config'\nimport { transformMatches, transformScore } from '../transform'\n\nexport default function format(\n  results,\n  docs,\n  {\n    includeMatches = Config.includeMatches,\n    includeScore = Config.includeScore\n  } = {}\n) {\n  const transformers = []\n\n  if (includeMatches) transformers.push(transformMatches)\n  if (includeScore) transformers.push(transformScore)\n\n  return results.map((result) => {\n    const { idx } = result\n\n    const data = {\n      item: docs[idx],\n      refIndex: idx\n    }\n\n    if (transformers.length) {\n      transformers.forEach((transformer) => {\n        transformer(result, data)\n      })\n    }\n\n    return data\n  })\n}\n"
  },
  {
    "path": "src/core/index.js",
    "content": "import { isArray, isDefined, isString, isNumber } from '../helpers/types'\nimport KeyStore from '../tools/KeyStore'\nimport FuseIndex, { createIndex } from '../tools/FuseIndex'\nimport { LogicalOperator, parse } from './queryParser'\nimport { createSearcher } from './register'\nimport Config from './config'\nimport computeScore from './computeScore'\nimport format from './format'\nimport * as ErrorMsg from './errorMessages'\n\nexport default class Fuse {\n  constructor(docs, options = {}, index) {\n    this.options = { ...Config, ...options }\n\n    if (\n      this.options.useExtendedSearch &&\n      !process.env.EXTENDED_SEARCH_ENABLED\n    ) {\n      throw new Error(ErrorMsg.EXTENDED_SEARCH_UNAVAILABLE)\n    }\n\n    this._keyStore = new KeyStore(this.options.keys)\n\n    this.setCollection(docs, index)\n  }\n\n  setCollection(docs, index) {\n    this._docs = docs\n\n    if (index && !(index instanceof FuseIndex)) {\n      throw new Error(ErrorMsg.INCORRECT_INDEX_TYPE)\n    }\n\n    this._myIndex =\n      index ||\n      createIndex(this.options.keys, this._docs, {\n        getFn: this.options.getFn,\n        fieldNormWeight: this.options.fieldNormWeight\n      })\n  }\n\n  add(doc) {\n    if (!isDefined(doc)) {\n      return\n    }\n\n    this._docs.push(doc)\n    this._myIndex.add(doc)\n  }\n\n  remove(predicate = (/* doc, idx */) => false) {\n    const results = []\n\n    for (let i = 0, len = this._docs.length; i < len; i += 1) {\n      const doc = this._docs[i]\n      if (predicate(doc, i)) {\n        this.removeAt(i)\n        i -= 1\n        len -= 1\n\n        results.push(doc)\n      }\n    }\n\n    return results\n  }\n\n  removeAt(idx) {\n    this._docs.splice(idx, 1)\n    this._myIndex.removeAt(idx)\n  }\n\n  getIndex() {\n    return this._myIndex\n  }\n\n  search(query, { limit = -1 } = {}) {\n    const {\n      includeMatches,\n      includeScore,\n      shouldSort,\n      sortFn,\n      ignoreFieldNorm\n    } = this.options\n\n    let results = isString(query)\n      ? isString(this._docs[0])\n        ? this._searchStringList(query)\n        : this._searchObjectList(query)\n      : this._searchLogical(query)\n\n    computeScore(results, { ignoreFieldNorm })\n\n    if (shouldSort) {\n      results.sort(sortFn)\n    }\n\n    if (isNumber(limit) && limit > -1) {\n      results = results.slice(0, limit)\n    }\n\n    return format(results, this._docs, {\n      includeMatches,\n      includeScore\n    })\n  }\n\n  _searchStringList(query) {\n    const searcher = createSearcher(query, this.options)\n    const { records } = this._myIndex\n    const results = []\n\n    // Iterate over every string in the index\n    records.forEach(({ v: text, i: idx, n: norm }) => {\n      if (!isDefined(text)) {\n        return\n      }\n\n      const { isMatch, score, indices } = searcher.searchIn(text)\n\n      if (isMatch) {\n        results.push({\n          item: text,\n          idx,\n          matches: [{ score, value: text, norm, indices }]\n        })\n      }\n    })\n\n    return results\n  }\n\n  _searchLogical(query) {\n    if (!process.env.LOGICAL_SEARCH_ENABLED) {\n      throw new Error(ErrorMsg.LOGICAL_SEARCH_UNAVAILABLE)\n    }\n\n    const expression = parse(query, this.options)\n\n    const evaluate = (node, item, idx) => {\n      if (!node.children) {\n        const { keyId, searcher } = node\n\n        const matches = this._findMatches({\n          key: this._keyStore.get(keyId),\n          value: this._myIndex.getValueForItemAtKeyId(item, keyId),\n          searcher\n        })\n\n        if (matches && matches.length) {\n          return [\n            {\n              idx,\n              item,\n              matches\n            }\n          ]\n        }\n\n        return []\n      }\n\n      const res = []\n      for (let i = 0, len = node.children.length; i < len; i += 1) {\n        const child = node.children[i]\n        const result = evaluate(child, item, idx)\n        if (result.length) {\n          res.push(...result)\n        } else if (node.operator === LogicalOperator.AND) {\n          return []\n        }\n      }\n      return res\n    }\n\n    const records = this._myIndex.records\n    const resultMap = {}\n    const results = []\n\n    records.forEach(({ $: item, i: idx }) => {\n      if (isDefined(item)) {\n        let expResults = evaluate(expression, item, idx)\n\n        if (expResults.length) {\n          // Dedupe when adding\n          if (!resultMap[idx]) {\n            resultMap[idx] = { idx, item, matches: [] }\n            results.push(resultMap[idx])\n          }\n          expResults.forEach(({ matches }) => {\n            resultMap[idx].matches.push(...matches)\n          })\n        }\n      }\n    })\n\n    return results\n  }\n\n  _searchObjectList(query) {\n    const searcher = createSearcher(query, this.options)\n    const { keys, records } = this._myIndex\n    const results = []\n\n    // List is Array<Object>\n    records.forEach(({ $: item, i: idx }) => {\n      if (!isDefined(item)) {\n        return\n      }\n\n      let matches = []\n\n      // Iterate over every key (i.e, path), and fetch the value at that key\n      keys.forEach((key, keyIndex) => {\n        matches.push(\n          ...this._findMatches({\n            key,\n            value: item[keyIndex],\n            searcher\n          })\n        )\n      })\n\n      if (matches.length) {\n        results.push({\n          idx,\n          item,\n          matches\n        })\n      }\n    })\n\n    return results\n  }\n  _findMatches({ key, value, searcher }) {\n    if (!isDefined(value)) {\n      return []\n    }\n\n    let matches = []\n\n    if (isArray(value)) {\n      value.forEach(({ v: text, i: idx, n: norm }) => {\n        if (!isDefined(text)) {\n          return\n        }\n\n        const { isMatch, score, indices } = searcher.searchIn(text)\n\n        if (isMatch) {\n          matches.push({\n            score,\n            key,\n            value: text,\n            idx,\n            norm,\n            indices\n          })\n        }\n      })\n    } else {\n      const { v: text, n: norm } = value\n\n      const { isMatch, score, indices } = searcher.searchIn(text)\n\n      if (isMatch) {\n        matches.push({ score, key, value: text, norm, indices })\n      }\n    }\n\n    return matches\n  }\n}\n"
  },
  {
    "path": "src/core/queryParser.js",
    "content": "import { isArray, isObject, isString } from '../helpers/types'\nimport { createSearcher } from './register'\nimport * as ErrorMsg from './errorMessages'\nimport { createKeyId } from '../tools/KeyStore'\n\nexport const LogicalOperator = {\n  AND: '$and',\n  OR: '$or'\n}\n\nconst KeyType = {\n  PATH: '$path',\n  PATTERN: '$val'\n}\n\nconst isExpression = (query) =>\n  !!(query[LogicalOperator.AND] || query[LogicalOperator.OR])\n\nconst isPath = (query) => !!query[KeyType.PATH]\n\nconst isLeaf = (query) =>\n  !isArray(query) && isObject(query) && !isExpression(query)\n\nconst convertToExplicit = (query) => ({\n  [LogicalOperator.AND]: Object.keys(query).map((key) => ({\n    [key]: query[key]\n  }))\n})\n\n// When `auto` is `true`, the parse function will infer and initialize and add\n// the appropriate `Searcher` instance\nexport function parse(query, options, { auto = true } = {}) {\n  const next = (query) => {\n    let keys = Object.keys(query)\n\n    const isQueryPath = isPath(query)\n\n    if (!isQueryPath && keys.length > 1 && !isExpression(query)) {\n      return next(convertToExplicit(query))\n    }\n\n    if (isLeaf(query)) {\n      const key = isQueryPath ? query[KeyType.PATH] : keys[0]\n\n      const pattern = isQueryPath ? query[KeyType.PATTERN] : query[key]\n\n      if (!isString(pattern)) {\n        throw new Error(ErrorMsg.LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key))\n      }\n\n      const obj = {\n        keyId: createKeyId(key),\n        pattern\n      }\n\n      if (auto) {\n        obj.searcher = createSearcher(pattern, options)\n      }\n\n      return obj\n    }\n\n    let node = {\n      children: [],\n      operator: keys[0]\n    }\n\n    keys.forEach((key) => {\n      const value = query[key]\n\n      if (isArray(value)) {\n        value.forEach((item) => {\n          node.children.push(next(item))\n        })\n      }\n    })\n\n    return node\n  }\n\n  if (!isExpression(query)) {\n    query = convertToExplicit(query)\n  }\n\n  return next(query)\n}\n"
  },
  {
    "path": "src/core/register.js",
    "content": "import { BitapSearch } from '../search'\n\nconst registeredSearchers = []\n\nexport default function register(...args) {\n  registeredSearchers.push(...args)\n}\n\nexport function createSearcher(pattern, options) {\n  for (let i = 0, len = registeredSearchers.length; i < len; i += 1) {\n    let searcherClass = registeredSearchers[i]\n    if (searcherClass.condition(pattern, options)) {\n      return new searcherClass(pattern, options)\n    }\n  }\n\n  return new BitapSearch(pattern, options)\n}\n"
  },
  {
    "path": "src/entry.js",
    "content": "import Fuse from './core'\nimport Config from './core/config'\nimport { createIndex, parseIndex } from './tools/FuseIndex'\nimport { parse } from './core/queryParser'\nimport { ExtendedSearch } from './search'\nimport register from './core/register'\n\nFuse.version = '__VERSION__'\nFuse.createIndex = createIndex\nFuse.parseIndex = parseIndex\nFuse.config = Config\n\nif (process.env.NODE_ENV === 'development') {\n  Fuse.parseQuery = parse\n}\n\nif (process.env.EXTENDED_SEARCH_ENABLED) {\n  register(ExtendedSearch)\n}\n\nexport default Fuse\n"
  },
  {
    "path": "src/helpers/diacritics.js",
    "content": "export const stripDiacritics = String.prototype.normalize\n    ? ((str) => str.normalize('NFD').replace(/[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C04\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F]/g, ''))\n    : ((str) => str);"
  },
  {
    "path": "src/helpers/get.js",
    "content": "import {\n  isDefined,\n  isString,\n  isNumber,\n  isBoolean,\n  isArray,\n  toString\n} from './types'\n\nexport default function get(obj, path) {\n  let list = []\n  let arr = false\n\n  const deepGet = (obj, path, index) => {\n    if (!isDefined(obj)) {\n      return\n    }\n    if (!path[index]) {\n      // If there's no path left, we've arrived at the object we care about.\n      list.push(obj)\n    } else {\n      let key = path[index]\n\n      const value = obj[key]\n\n      if (!isDefined(value)) {\n        return\n      }\n\n      // If we're at the last value in the path, and if it's a string/number/bool,\n      // add it to the list\n      if (\n        index === path.length - 1 &&\n        (isString(value) || isNumber(value) || isBoolean(value))\n      ) {\n        list.push(toString(value))\n      } else if (isArray(value)) {\n        arr = true\n        // Search each item in the array.\n        for (let i = 0, len = value.length; i < len; i += 1) {\n          deepGet(value[i], path, index + 1)\n        }\n      } else if (path.length) {\n        // An object. Recurse further.\n        deepGet(value, path, index + 1)\n      }\n    }\n  }\n\n  // Backwards compatibility (since path used to be a string)\n  deepGet(obj, isString(path) ? path.split('.') : path, 0)\n\n  return arr ? list : list[0]\n}\n"
  },
  {
    "path": "src/helpers/types.js",
    "content": "export function isArray(value) {\n  return !Array.isArray\n    ? getTag(value) === '[object Array]'\n    : Array.isArray(value)\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/baseToString.js\nconst INFINITY = 1 / 0\nexport function baseToString(value) {\n  // Exit early for strings to avoid a performance hit in some environments.\n  if (typeof value == 'string') {\n    return value\n  }\n  let result = value + ''\n  return result == '0' && 1 / value == -INFINITY ? '-0' : result\n}\n\nexport function toString(value) {\n  return value == null ? '' : baseToString(value)\n}\n\nexport function isString(value) {\n  return typeof value === 'string'\n}\n\nexport function isNumber(value) {\n  return typeof value === 'number'\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/isBoolean.js\nexport function isBoolean(value) {\n  return (\n    value === true ||\n    value === false ||\n    (isObjectLike(value) && getTag(value) == '[object Boolean]')\n  )\n}\n\nexport function isObject(value) {\n  return typeof value === 'object'\n}\n\n// Checks if `value` is object-like.\nexport function isObjectLike(value) {\n  return isObject(value) && value !== null\n}\n\nexport function isDefined(value) {\n  return value !== undefined && value !== null\n}\n\nexport function isBlank(value) {\n  return !value.trim().length\n}\n\n// Gets the `toStringTag` of `value`.\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/getTag.js\nfunction getTag(value) {\n  return value == null\n    ? value === undefined\n      ? '[object Undefined]'\n      : '[object Null]'\n    : Object.prototype.toString.call(value)\n}\n"
  },
  {
    "path": "src/index.d.ts",
    "content": "export default Fuse\n\ndeclare class Fuse<T> {\n  public constructor(\n    list: ReadonlyArray<T>,\n    options?: IFuseOptions<T>,\n    index?: FuseIndex<T>\n  )\n  /**\n   * Search function for the Fuse instance.\n   *\n   * ```typescript\n   * const list: MyType[] = [myType1, myType2, etc...]\n\n   * const options: Fuse.IFuseOptions<MyType> = {\n   *  keys: ['key1', 'key2']\n   * }\n   *\n   * const myFuse = new Fuse(list, options)\n   * let result = myFuse.search('pattern')\n   * ```\n   *\n   * @param pattern The pattern to search\n   * @param options `Fuse.FuseSearchOptions`\n   * @returns An array of search results\n   */\n  public search<R = T>(\n    pattern: string | Expression,\n    options?: FuseSearchOptions\n  ): FuseResult<R>[]\n\n  public setCollection(docs: ReadonlyArray<T>, index?: FuseIndex<T>): void\n\n  /**\n   * Adds a doc to the end the list.\n   */\n  public add(doc: T): void\n\n  /**\n   * Removes all documents from the list which the predicate returns truthy for,\n   * and returns an array of the removed docs.\n   * The predicate is invoked with two arguments: (doc, index).\n   */\n  public remove(predicate: (doc: T, idx: number) => boolean): T[]\n\n  /**\n   * Removes the doc at the specified index.\n   */\n  public removeAt(idx: number): void\n\n  /**\n   * Returns the generated Fuse index\n   */\n  public getIndex(): FuseIndex<T>\n\n  /**\n   * Return the current version.\n   */\n  public static version: string\n\n  /**\n   * Use this method to pre-generate the index from the list, and pass it\n   * directly into the Fuse instance.\n   *\n   * _Note that Fuse will automatically index the table if one isn't provided\n   * during instantiation._\n   *\n   * ```typescript\n   * const list: MyType[] = [myType1, myType2, etc...]\n   *\n   * const index = Fuse.createIndex<MyType>(\n   *  keys: ['key1', 'key2']\n   *  list: list\n   * )\n   *\n   * const options: Fuse.IFuseOptions<MyType> = {\n   *  keys: ['key1', 'key2']\n   * }\n   *\n   * const myFuse = new Fuse(list, options, index)\n   * ```\n   * @param keys    The keys to index\n   * @param list    The list from which to create an index\n   * @param options?\n   * @returns An indexed list\n   */\n  public static createIndex<U>(\n    keys: Array<FuseOptionKey<U>>,\n    list: ReadonlyArray<U>,\n    options?: FuseIndexOptions<U>\n  ): FuseIndex<U>\n\n  public static parseIndex<U>(\n    index: {\n      keys: ReadonlyArray<string>\n      records: FuseIndexRecords\n    },\n    options?: FuseIndexOptions<U>\n  ): FuseIndex<U>\n\n  public static config: Required<IFuseOptions<any>>\n}\n\nexport declare class FuseIndex<T> {\n  public constructor(options?: FuseIndexOptions<T>)\n  public setSources(docs: ReadonlyArray<T>): void\n  public setKeys(keys: ReadonlyArray<string>): void\n  public setIndexRecords(records: FuseIndexRecords): void\n  public create(): void\n  public add(doc: T): void\n  public toJSON(): {\n    keys: ReadonlyArray<string>\n    records: FuseIndexRecords\n  }\n}\n\nexport type FuseGetFunction<T> = (\n  obj: T,\n  path: string | string[]\n) => ReadonlyArray<string> | string\n\nexport type FuseIndexOptions<T> = {\n  getFn: FuseGetFunction<T>\n}\n\n/**\n * @example\n * ```ts\n * {\n *   title: { '$': \"Old Man's War\" },\n *   'author.firstName': { '$': 'Codenar' }\n * }\n * ```\n * @example\n * ```ts\n * {\n *   tags: [\n *     { $: 'nonfiction', idx: 0 },\n *     { $: 'web development', idx: 1 },\n *   ]\n * }\n * ```\n */\nexport type FuseSortFunctionItem = {\n  [key: string]: { $: string } | { $: string; idx: number }[]\n}\n\n/**\n * @example\n * ```ts\n * {\n *   score: 0.001,\n *   key: 'author.firstName',\n *   value: 'Codenar',\n *   indices: [ [ 0, 3 ] ]\n * }\n * ```\n */\nexport type FuseSortFunctionMatch = {\n  score: number\n  key: string\n  value: string\n  indices: ReadonlyArray<number>[]\n}\n\n/**\n * @example\n * ```ts\n * {\n *   score: 0,\n *   key: 'tags',\n *   value: 'nonfiction',\n *   idx: 1,\n *   indices: [ [ 0, 9 ] ]\n * }\n * ```\n */\nexport type FuseSortFunctionMatchList = FuseSortFunctionMatch & {\n  idx: number\n}\n\nexport type FuseSortFunctionArg = {\n  idx: number\n  item: FuseSortFunctionItem\n  score: number\n  matches?: (FuseSortFunctionMatch | FuseSortFunctionMatchList)[]\n}\n\nexport type FuseSortFunction = (\n  a: FuseSortFunctionArg,\n  b: FuseSortFunctionArg\n) => number\n\n/**\n * @example\n * ```ts\n * title: {\n *   '$': \"Old Man's War\",\n *   'n': 0.5773502691896258\n * }\n * ```\n */\nexport type RecordEntryObject = {\n  /** The text value */\n  v: string\n  /** The field-length norm */\n  n: number\n}\n\n/**\n * @example\n * ```ts\n * 'author.tags.name': [{\n *   'v': 'pizza lover',\n *   'i': 2,\n *   'n: 0.7071067811865475\n * }\n * ```\n */\nexport type RecordEntryArrayItem = ReadonlyArray<\n  RecordEntryObject & { i: number }\n>\n\n// TODO: this makes it difficult to infer the type. Need to think more about this\nexport type RecordEntry = {\n  [key: string]: RecordEntryObject | RecordEntryArrayItem\n}\n\n/**\n * @example\n * ```ts\n * {\n *   i: 0,\n *   '$': {\n *     '0': { v: \"Old Man's War\", n: 0.5773502691896258 },\n *     '1': { v: 'Codenar', n: 1 },\n *     '2': [\n *       { v: 'pizza lover', i: 2, n: 0.7071067811865475 },\n *       { v: 'helo wold', i: 1, n: 0.7071067811865475 },\n *       { v: 'hello world', i: 0, n: 0.7071067811865475 }\n *     ]\n *   }\n * }\n * ```\n */\nexport type FuseIndexObjectRecord = {\n  /** The index of the record in the source list */\n  i: number\n  $: RecordEntry\n}\n\n/**\n * @example\n * ```ts\n * {\n *   keys: null,\n *   list: [\n *     { v: 'one', i: 0, n: 1 },\n *     { v: 'two', i: 1, n: 1 },\n *     { v: 'three', i: 2, n: 1 }\n *   ]\n * }\n * ```\n */\nexport type FuseIndexStringRecord = {\n  /** The index of the record in the source list */\n  i: number\n  /** The text value */\n  v: string\n  /** The field-length norm */\n  n: number\n}\n\nexport type FuseIndexRecords =\n  | ReadonlyArray<FuseIndexObjectRecord>\n  | ReadonlyArray<FuseIndexStringRecord>\n\n/**\n * @example\n * ```ts\n * {\n *   name: 'title',\n *   weight: 0.7\n * }\n * ```\n */\nexport type FuseOptionKeyObject<T> = {\n  name: string | string[]\n  weight?: number\n  getFn?: (obj: T) => ReadonlyArray<string> | string\n}\n\nexport type FuseOptionKey<T> = FuseOptionKeyObject<T> | string | string[]\n\nexport interface IFuseOptions<T> {\n  /** Indicates whether comparisons should be case sensitive. */\n  isCaseSensitive?: boolean\n  /** Indicates whether comparisons should ignore diacritics (accents). */\n  ignoreDiacritics?: boolean\n  /** Determines how close the match must be to the fuzzy location (specified by `location`). An exact letter match which is `distance` characters away from the fuzzy location would score as a complete mismatch. A `distance` of `0` requires the match be at the exact `location` specified. A distance of `1000` would require a perfect match to be within `800` characters of the `location` to be found using a `threshold` of `0.8`. */\n  distance?: number\n  /** When true, the matching function will continue to the end of a search pattern even if a perfect match has already been located in the string. */\n  findAllMatches?: boolean\n  /** The function to use to retrieve an object's value at the provided path. The default will also search nested paths. */\n  getFn?: FuseGetFunction<T>\n  /** When `true`, search will ignore `location` and `distance`, so it won't matter where in the string the pattern appears. */\n  ignoreLocation?: boolean\n  /** When `true`, the calculation for the relevance score (used for sorting) will ignore the `field-length norm`. */\n  ignoreFieldNorm?: boolean\n  /** Determines how much the `field-length norm` affects scoring. A value of `0` is equivalent to ignoring the field-length norm. A value of `0.5` will greatly reduce the effect of field-length norm, while a value of `2.0` will greatly increase it. */\n  fieldNormWeight?: number\n  /** Whether the matches should be included in the result set. When `true`, each record in the result set will include the indices of the matched characters. These can consequently be used for highlighting purposes. */\n  includeMatches?: boolean\n  /** Whether the score should be included in the result set. A score of `0`indicates a perfect match, while a score of `1` indicates a complete mismatch. */\n  includeScore?: boolean\n  /** List of keys that will be searched. This supports nested paths, weighted search, searching in arrays of `strings` and `objects`. */\n  keys?: Array<FuseOptionKey<T>>\n  /** Determines approximately where in the text is the pattern expected to be found. */\n  location?: number\n  /** Only the matches whose length exceeds this value will be returned. (For instance, if you want to ignore single character matches in the result, set it to `2`). */\n  minMatchCharLength?: number\n  /** Whether to sort the result list, by score. */\n  shouldSort?: boolean\n  /** The function to use to sort all the results. The default will sort by ascending relevance score, ascending index. */\n  sortFn?: FuseSortFunction\n  /** At what point does the match algorithm give up. A threshold of `0.0` requires a perfect match (of both letters and location), a threshold of `1.0` would match anything. */\n  threshold?: number\n  /** When `true`, it enables the use of unix-like search commands. See [example](/examples.html#extended-search). */\n  useExtendedSearch?: boolean\n}\n\n/**\n * Denotes the start/end indices of a match\n *\n * @example\n *\n * ```ts\n * const startIndex = 0;\n * const endIndex = 5;\n *\n * const range: RangeTuple = [startIndex, endIndex];\n * ```\n */\nexport type RangeTuple = [number, number]\n\nexport type FuseResultMatch = {\n  indices: ReadonlyArray<RangeTuple>\n  key?: string\n  refIndex?: number\n  value?: string\n}\n\nexport type FuseSearchOptions = {\n  limit: number\n}\n\nexport type FuseResult<T> = {\n  item: T\n  refIndex: number\n  score?: number\n  matches?: ReadonlyArray<FuseResultMatch>\n}\n\nexport type Expression =\n  | { [key: string]: string }\n  | {\n      $path: ReadonlyArray<string>\n      $val: string\n    }\n  | { $and?: Expression[] }\n  | { $or?: Expression[] }\n"
  },
  {
    "path": "src/search/bitap/computeScore.js",
    "content": "import Config from '../../core/config'\n\nexport default function computeScore(\n  pattern,\n  {\n    errors = 0,\n    currentLocation = 0,\n    expectedLocation = 0,\n    distance = Config.distance,\n    ignoreLocation = Config.ignoreLocation\n  } = {}\n) {\n  const accuracy = errors / pattern.length\n\n  if (ignoreLocation) {\n    return accuracy\n  }\n\n  const proximity = Math.abs(expectedLocation - currentLocation)\n\n  if (!distance) {\n    // Dodge divide by zero error.\n    return proximity ? 1.0 : accuracy\n  }\n\n  return accuracy + proximity / distance\n}\n"
  },
  {
    "path": "src/search/bitap/constants.js",
    "content": "// Machine word size\nexport const MAX_BITS = 32\n"
  },
  {
    "path": "src/search/bitap/convertMaskToIndices.js",
    "content": "import Config from '../../core/config'\n\nexport default function convertMaskToIndices(\n  matchmask = [],\n  minMatchCharLength = Config.minMatchCharLength\n) {\n  let indices = []\n  let start = -1\n  let end = -1\n  let i = 0\n\n  for (let len = matchmask.length; i < len; i += 1) {\n    let match = matchmask[i]\n    if (match && start === -1) {\n      start = i\n    } else if (!match && start !== -1) {\n      end = i - 1\n      if (end - start + 1 >= minMatchCharLength) {\n        indices.push([start, end])\n      }\n      start = -1\n    }\n  }\n\n  // (i-1 - start) + 1 => i - start\n  if (matchmask[i - 1] && i - start >= minMatchCharLength) {\n    indices.push([start, i - 1])\n  }\n\n  return indices\n}\n"
  },
  {
    "path": "src/search/bitap/createPatternAlphabet.js",
    "content": "export default function createPatternAlphabet(pattern) {\n  let mask = {}\n\n  for (let i = 0, len = pattern.length; i < len; i += 1) {\n    const char = pattern.charAt(i)\n    mask[char] = (mask[char] || 0) | (1 << (len - i - 1))\n  }\n\n  return mask\n}\n"
  },
  {
    "path": "src/search/bitap/index.js",
    "content": "import search from './search'\nimport createPatternAlphabet from './createPatternAlphabet'\nimport { MAX_BITS } from './constants'\nimport Config from '../../core/config'\nimport { stripDiacritics } from '../../helpers/diacritics'\n\nexport default class BitapSearch {\n  constructor(\n    pattern,\n    {\n      location = Config.location,\n      threshold = Config.threshold,\n      distance = Config.distance,\n      includeMatches = Config.includeMatches,\n      findAllMatches = Config.findAllMatches,\n      minMatchCharLength = Config.minMatchCharLength,\n      isCaseSensitive = Config.isCaseSensitive,\n      ignoreDiacritics = Config.ignoreDiacritics,\n      ignoreLocation = Config.ignoreLocation\n    } = {}\n  ) {\n    this.options = {\n      location,\n      threshold,\n      distance,\n      includeMatches,\n      findAllMatches,\n      minMatchCharLength,\n      isCaseSensitive,\n      ignoreDiacritics,\n      ignoreLocation\n    }\n\n    pattern = isCaseSensitive ? pattern : pattern.toLowerCase()\n    pattern = ignoreDiacritics ? stripDiacritics(pattern) : pattern;\n    this.pattern = pattern;\n\n    this.chunks = []\n\n    if (!this.pattern.length) {\n      return\n    }\n\n    const addChunk = (pattern, startIndex) => {\n      this.chunks.push({\n        pattern,\n        alphabet: createPatternAlphabet(pattern),\n        startIndex\n      })\n    }\n\n    const len = this.pattern.length\n\n    if (len > MAX_BITS) {\n      let i = 0\n      const remainder = len % MAX_BITS\n      const end = len - remainder\n\n      while (i < end) {\n        addChunk(this.pattern.substr(i, MAX_BITS), i)\n        i += MAX_BITS\n      }\n\n      if (remainder) {\n        const startIndex = len - MAX_BITS\n        addChunk(this.pattern.substr(startIndex), startIndex)\n      }\n    } else {\n      addChunk(this.pattern, 0)\n    }\n  }\n\n  searchIn(text) {\n    const { isCaseSensitive, ignoreDiacritics, includeMatches } = this.options\n\n    text = isCaseSensitive ? text : text.toLowerCase()\n    text = ignoreDiacritics ? stripDiacritics(text) : text\n\n    // Exact match\n    if (this.pattern === text) {\n      let result = {\n        isMatch: true,\n        score: 0\n      }\n\n      if (includeMatches) {\n        result.indices = [[0, text.length - 1]]\n      }\n\n      return result\n    }\n\n    // Otherwise, use Bitap algorithm\n    const {\n      location,\n      distance,\n      threshold,\n      findAllMatches,\n      minMatchCharLength,\n      ignoreLocation\n    } = this.options\n\n    let allIndices = []\n    let totalScore = 0\n    let hasMatches = false\n\n    this.chunks.forEach(({ pattern, alphabet, startIndex }) => {\n      const { isMatch, score, indices } = search(text, pattern, alphabet, {\n        location: location + startIndex,\n        distance,\n        threshold,\n        findAllMatches,\n        minMatchCharLength,\n        includeMatches,\n        ignoreLocation\n      })\n\n      if (isMatch) {\n        hasMatches = true\n      }\n\n      totalScore += score\n\n      if (isMatch && indices) {\n        allIndices = [...allIndices, ...indices]\n      }\n    })\n\n    let result = {\n      isMatch: hasMatches,\n      score: hasMatches ? totalScore / this.chunks.length : 1\n    }\n\n    if (hasMatches && includeMatches) {\n      result.indices = allIndices\n    }\n\n    return result\n  }\n}\n"
  },
  {
    "path": "src/search/bitap/search.js",
    "content": "import computeScore from './computeScore'\nimport convertMaskToIndices from './convertMaskToIndices'\nimport Config from '../../core/config'\nimport { MAX_BITS } from './constants'\nimport * as ErrorMsg from '../../core/errorMessages'\n\nexport default function search(\n  text,\n  pattern,\n  patternAlphabet,\n  {\n    location = Config.location,\n    distance = Config.distance,\n    threshold = Config.threshold,\n    findAllMatches = Config.findAllMatches,\n    minMatchCharLength = Config.minMatchCharLength,\n    includeMatches = Config.includeMatches,\n    ignoreLocation = Config.ignoreLocation\n  } = {}\n) {\n  if (pattern.length > MAX_BITS) {\n    throw new Error(ErrorMsg.PATTERN_LENGTH_TOO_LARGE(MAX_BITS))\n  }\n\n  const patternLen = pattern.length\n  // Set starting location at beginning text and initialize the alphabet.\n  const textLen = text.length\n  // Handle the case when location > text.length\n  const expectedLocation = Math.max(0, Math.min(location, textLen))\n  // Highest score beyond which we give up.\n  let currentThreshold = threshold\n  // Is there a nearby exact match? (speedup)\n  let bestLocation = expectedLocation\n\n  // Performance: only computer matches when the minMatchCharLength > 1\n  // OR if `includeMatches` is true.\n  const computeMatches = minMatchCharLength > 1 || includeMatches\n  // A mask of the matches, used for building the indices\n  const matchMask = computeMatches ? Array(textLen) : []\n\n  let index\n\n  // Get all exact matches, here for speed up\n  while ((index = text.indexOf(pattern, bestLocation)) > -1) {\n    let score = computeScore(pattern, {\n      currentLocation: index,\n      expectedLocation,\n      distance,\n      ignoreLocation\n    })\n\n    currentThreshold = Math.min(score, currentThreshold)\n    bestLocation = index + patternLen\n\n    if (computeMatches) {\n      let i = 0\n      while (i < patternLen) {\n        matchMask[index + i] = 1\n        i += 1\n      }\n    }\n  }\n\n  // Reset the best location\n  bestLocation = -1\n\n  let lastBitArr = []\n  let finalScore = 1\n  let binMax = patternLen + textLen\n\n  const mask = 1 << (patternLen - 1)\n\n  for (let i = 0; i < patternLen; i += 1) {\n    // Scan for the best match; each iteration allows for one more error.\n    // Run a binary search to determine how far from the match location we can stray\n    // at this error level.\n    let binMin = 0\n    let binMid = binMax\n\n    while (binMin < binMid) {\n      const score = computeScore(pattern, {\n        errors: i,\n        currentLocation: expectedLocation + binMid,\n        expectedLocation,\n        distance,\n        ignoreLocation\n      })\n\n      if (score <= currentThreshold) {\n        binMin = binMid\n      } else {\n        binMax = binMid\n      }\n\n      binMid = Math.floor((binMax - binMin) / 2 + binMin)\n    }\n\n    // Use the result from this iteration as the maximum for the next.\n    binMax = binMid\n\n    let start = Math.max(1, expectedLocation - binMid + 1)\n    let finish = findAllMatches\n      ? textLen\n      : Math.min(expectedLocation + binMid, textLen) + patternLen\n\n    // Initialize the bit array\n    let bitArr = Array(finish + 2)\n\n    bitArr[finish + 1] = (1 << i) - 1\n\n    for (let j = finish; j >= start; j -= 1) {\n      let currentLocation = j - 1\n      let charMatch = patternAlphabet[text.charAt(currentLocation)]\n\n      if (computeMatches) {\n        // Speed up: quick bool to int conversion (i.e, `charMatch ? 1 : 0`)\n        matchMask[currentLocation] = +!!charMatch\n      }\n\n      // First pass: exact match\n      bitArr[j] = ((bitArr[j + 1] << 1) | 1) & charMatch\n\n      // Subsequent passes: fuzzy match\n      if (i) {\n        bitArr[j] |=\n          ((lastBitArr[j + 1] | lastBitArr[j]) << 1) | 1 | lastBitArr[j + 1]\n      }\n\n      if (bitArr[j] & mask) {\n        finalScore = computeScore(pattern, {\n          errors: i,\n          currentLocation,\n          expectedLocation,\n          distance,\n          ignoreLocation\n        })\n\n        // This match will almost certainly be better than any existing match.\n        // But check anyway.\n        if (finalScore <= currentThreshold) {\n          // Indeed it is\n          currentThreshold = finalScore\n          bestLocation = currentLocation\n\n          // Already passed `loc`, downhill from here on in.\n          if (bestLocation <= expectedLocation) {\n            break\n          }\n\n          // When passing `bestLocation`, don't exceed our current distance from `expectedLocation`.\n          start = Math.max(1, 2 * expectedLocation - bestLocation)\n        }\n      }\n    }\n\n    // No hope for a (better) match at greater error levels.\n    const score = computeScore(pattern, {\n      errors: i + 1,\n      currentLocation: expectedLocation,\n      expectedLocation,\n      distance,\n      ignoreLocation\n    })\n\n    if (score > currentThreshold) {\n      break\n    }\n\n    lastBitArr = bitArr\n  }\n\n  const result = {\n    isMatch: bestLocation >= 0,\n    // Count exact matches (those with a score of 0) to be \"almost\" exact\n    score: Math.max(0.001, finalScore)\n  }\n\n  if (computeMatches) {\n    const indices = convertMaskToIndices(matchMask, minMatchCharLength)\n    if (!indices.length) {\n      result.isMatch = false\n    } else if (includeMatches) {\n      result.indices = indices\n    }\n  }\n\n  return result\n}\n"
  },
  {
    "path": "src/search/extended/BaseMatch.js",
    "content": "export default class BaseMatch {\n  constructor(pattern) {\n    this.pattern = pattern\n  }\n  static isMultiMatch(pattern) {\n    return getMatch(pattern, this.multiRegex)\n  }\n  static isSingleMatch(pattern) {\n    return getMatch(pattern, this.singleRegex)\n  }\n  search(/*text*/) {}\n}\n\nfunction getMatch(pattern, exp) {\n  const matches = pattern.match(exp)\n  return matches ? matches[1] : null\n}\n"
  },
  {
    "path": "src/search/extended/ExactMatch.js",
    "content": "// Token: 'file\n// Match type: exact-match\n// Description: Items that are `file`\n\nimport BaseMatch from './BaseMatch'\n\nexport default class ExactMatch extends BaseMatch {\n  constructor(pattern) {\n    super(pattern)\n  }\n  static get type() {\n    return 'exact'\n  }\n  static get multiRegex() {\n    return /^=\"(.*)\"$/\n  }\n  static get singleRegex() {\n    return /^=(.*)$/\n  }\n  search(text) {\n    const isMatch = text === this.pattern\n\n    return {\n      isMatch,\n      score: isMatch ? 0 : 1,\n      indices: [0, this.pattern.length - 1]\n    }\n  }\n}\n"
  },
  {
    "path": "src/search/extended/FuzzyMatch.js",
    "content": "import BaseMatch from './BaseMatch'\nimport BitapSearch from '../bitap'\nimport Config from '../../core/config'\n\nexport default class FuzzyMatch extends BaseMatch {\n  constructor(\n    pattern,\n    {\n      location = Config.location,\n      threshold = Config.threshold,\n      distance = Config.distance,\n      includeMatches = Config.includeMatches,\n      findAllMatches = Config.findAllMatches,\n      minMatchCharLength = Config.minMatchCharLength,\n      isCaseSensitive = Config.isCaseSensitive,\n      ignoreDiacritics = Config.ignoreDiacritics,\n      ignoreLocation = Config.ignoreLocation\n    } = {}\n  ) {\n    super(pattern)\n    this._bitapSearch = new BitapSearch(pattern, {\n      location,\n      threshold,\n      distance,\n      includeMatches,\n      findAllMatches,\n      minMatchCharLength,\n      isCaseSensitive,\n      ignoreDiacritics,\n      ignoreLocation\n    })\n  }\n  static get type() {\n    return 'fuzzy'\n  }\n  static get multiRegex() {\n    return /^\"(.*)\"$/\n  }\n  static get singleRegex() {\n    return /^(.*)$/\n  }\n  search(text) {\n    return this._bitapSearch.searchIn(text)\n  }\n}\n"
  },
  {
    "path": "src/search/extended/IncludeMatch.js",
    "content": "// Token: 'file\n// Match type: include-match\n// Description: Items that include `file`\n\nimport BaseMatch from './BaseMatch'\n\nexport default class IncludeMatch extends BaseMatch {\n  constructor(pattern) {\n    super(pattern)\n  }\n  static get type() {\n    return 'include'\n  }\n  static get multiRegex() {\n    return /^'\"(.*)\"$/\n  }\n  static get singleRegex() {\n    return /^'(.*)$/\n  }\n  search(text) {\n    let location = 0\n    let index\n\n    const indices = []\n    const patternLen = this.pattern.length\n\n    // Get all exact matches\n    while ((index = text.indexOf(this.pattern, location)) > -1) {\n      location = index + patternLen\n      indices.push([index, location - 1])\n    }\n\n    const isMatch = !!indices.length\n\n    return {\n      isMatch,\n      score: isMatch ? 0 : 1,\n      indices\n    }\n  }\n}\n"
  },
  {
    "path": "src/search/extended/InverseExactMatch.js",
    "content": "// Token: !fire\n// Match type: inverse-exact-match\n// Description: Items that do not include `fire`\n\nimport BaseMatch from './BaseMatch'\n\nexport default class InverseExactMatch extends BaseMatch {\n  constructor(pattern) {\n    super(pattern)\n  }\n  static get type() {\n    return 'inverse-exact'\n  }\n  static get multiRegex() {\n    return /^!\"(.*)\"$/\n  }\n  static get singleRegex() {\n    return /^!(.*)$/\n  }\n  search(text) {\n    const index = text.indexOf(this.pattern)\n    const isMatch = index === -1\n\n    return {\n      isMatch,\n      score: isMatch ? 0 : 1,\n      indices: [0, text.length - 1]\n    }\n  }\n}\n"
  },
  {
    "path": "src/search/extended/InversePrefixExactMatch.js",
    "content": "// Token: !^fire\n// Match type: inverse-prefix-exact-match\n// Description: Items that do not start with `fire`\n\nimport BaseMatch from './BaseMatch'\n\nexport default class InversePrefixExactMatch extends BaseMatch {\n  constructor(pattern) {\n    super(pattern)\n  }\n  static get type() {\n    return 'inverse-prefix-exact'\n  }\n  static get multiRegex() {\n    return /^!\\^\"(.*)\"$/\n  }\n  static get singleRegex() {\n    return /^!\\^(.*)$/\n  }\n  search(text) {\n    const isMatch = !text.startsWith(this.pattern)\n\n    return {\n      isMatch,\n      score: isMatch ? 0 : 1,\n      indices: [0, text.length - 1]\n    }\n  }\n}\n"
  },
  {
    "path": "src/search/extended/InverseSuffixExactMatch.js",
    "content": "// Token: !.file$\n// Match type: inverse-suffix-exact-match\n// Description: Items that do not end with `.file`\nimport BaseMatch from './BaseMatch'\n\nexport default class InverseSuffixExactMatch extends BaseMatch {\n  constructor(pattern) {\n    super(pattern)\n  }\n  static get type() {\n    return 'inverse-suffix-exact'\n  }\n  static get multiRegex() {\n    return /^!\"(.*)\"\\$$/\n  }\n  static get singleRegex() {\n    return /^!(.*)\\$$/\n  }\n  search(text) {\n    const isMatch = !text.endsWith(this.pattern)\n    return {\n      isMatch,\n      score: isMatch ? 0 : 1,\n      indices: [0, text.length - 1]\n    }\n  }\n}\n"
  },
  {
    "path": "src/search/extended/PrefixExactMatch.js",
    "content": "// Token: ^file\n// Match type: prefix-exact-match\n// Description: Items that start with `file`\nimport BaseMatch from './BaseMatch'\n\nexport default class PrefixExactMatch extends BaseMatch {\n  constructor(pattern) {\n    super(pattern)\n  }\n  static get type() {\n    return 'prefix-exact'\n  }\n  static get multiRegex() {\n    return /^\\^\"(.*)\"$/\n  }\n  static get singleRegex() {\n    return /^\\^(.*)$/\n  }\n  search(text) {\n    const isMatch = text.startsWith(this.pattern)\n\n    return {\n      isMatch,\n      score: isMatch ? 0 : 1,\n      indices: [0, this.pattern.length - 1]\n    }\n  }\n}\n"
  },
  {
    "path": "src/search/extended/SuffixExactMatch.js",
    "content": "// Token: .file$\n// Match type: suffix-exact-match\n// Description: Items that end with `.file`\nimport BaseMatch from './BaseMatch'\n\nexport default class SuffixExactMatch extends BaseMatch {\n  constructor(pattern) {\n    super(pattern)\n  }\n  static get type() {\n    return 'suffix-exact'\n  }\n  static get multiRegex() {\n    return /^\"(.*)\"\\$$/\n  }\n  static get singleRegex() {\n    return /^(.*)\\$$/\n  }\n  search(text) {\n    const isMatch = text.endsWith(this.pattern)\n\n    return {\n      isMatch,\n      score: isMatch ? 0 : 1,\n      indices: [text.length - this.pattern.length, text.length - 1]\n    }\n  }\n}\n"
  },
  {
    "path": "src/search/extended/index.js",
    "content": "import parseQuery from './parseQuery'\nimport FuzzyMatch from './FuzzyMatch'\nimport IncludeMatch from './IncludeMatch'\nimport Config from '../../core/config'\nimport { stripDiacritics } from '../../helpers/diacritics'\n\n// These extended matchers can return an array of matches, as opposed\n// to a singl match\nconst MultiMatchSet = new Set([FuzzyMatch.type, IncludeMatch.type])\n\n/**\n * Command-like searching\n * ======================\n *\n * Given multiple search terms delimited by spaces.e.g. `^jscript .python$ ruby !java`,\n * search in a given text.\n *\n * Search syntax:\n *\n * | Token       | Match type                 | Description                            |\n * | ----------- | -------------------------- | -------------------------------------- |\n * | `jscript`   | fuzzy-match                | Items that fuzzy match `jscript`       |\n * | `=scheme`   | exact-match                | Items that are `scheme`                |\n * | `'python`   | include-match              | Items that include `python`            |\n * | `!ruby`     | inverse-exact-match        | Items that do not include `ruby`       |\n * | `^java`     | prefix-exact-match         | Items that start with `java`           |\n * | `!^earlang` | inverse-prefix-exact-match | Items that do not start with `earlang` |\n * | `.js$`      | suffix-exact-match         | Items that end with `.js`              |\n * | `!.go$`     | inverse-suffix-exact-match | Items that do not end with `.go`       |\n *\n * A single pipe character acts as an OR operator. For example, the following\n * query matches entries that start with `core` and end with either`go`, `rb`,\n * or`py`.\n *\n * ```\n * ^core go$ | rb$ | py$\n * ```\n */\nexport default class ExtendedSearch {\n  constructor(\n    pattern,\n    {\n      isCaseSensitive = Config.isCaseSensitive,\n      ignoreDiacritics = Config.ignoreDiacritics,\n      includeMatches = Config.includeMatches,\n      minMatchCharLength = Config.minMatchCharLength,\n      ignoreLocation = Config.ignoreLocation,\n      findAllMatches = Config.findAllMatches,\n      location = Config.location,\n      threshold = Config.threshold,\n      distance = Config.distance\n    } = {}\n  ) {\n    this.query = null\n    this.options = {\n      isCaseSensitive,\n      ignoreDiacritics,\n      includeMatches,\n      minMatchCharLength,\n      findAllMatches,\n      ignoreLocation,\n      location,\n      threshold,\n      distance\n    }\n\n    pattern = isCaseSensitive ? pattern : pattern.toLowerCase()\n    pattern = ignoreDiacritics ? stripDiacritics(pattern) : pattern\n    this.pattern = pattern\n    this.query = parseQuery(this.pattern, this.options)\n  }\n\n  static condition(_, options) {\n    return options.useExtendedSearch\n  }\n\n  searchIn(text) {\n    const query = this.query\n\n    if (!query) {\n      return {\n        isMatch: false,\n        score: 1\n      }\n    }\n\n    const { includeMatches, isCaseSensitive, ignoreDiacritics } = this.options\n\n    text = isCaseSensitive ? text : text.toLowerCase()\n    text = ignoreDiacritics ? stripDiacritics(text) : text\n\n    let numMatches = 0\n    let allIndices = []\n    let totalScore = 0\n\n    // ORs\n    for (let i = 0, qLen = query.length; i < qLen; i += 1) {\n      const searchers = query[i]\n\n      // Reset indices\n      allIndices.length = 0\n      numMatches = 0\n\n      // ANDs\n      for (let j = 0, pLen = searchers.length; j < pLen; j += 1) {\n        const searcher = searchers[j]\n        const { isMatch, indices, score } = searcher.search(text)\n\n        if (isMatch) {\n          numMatches += 1\n          totalScore += score\n          if (includeMatches) {\n            const type = searcher.constructor.type\n            if (MultiMatchSet.has(type)) {\n              allIndices = [...allIndices, ...indices]\n            } else {\n              allIndices.push(indices)\n            }\n          }\n        } else {\n          totalScore = 0\n          numMatches = 0\n          allIndices.length = 0\n          break\n        }\n      }\n\n      // OR condition, so if TRUE, return\n      if (numMatches) {\n        let result = {\n          isMatch: true,\n          score: totalScore / numMatches\n        }\n\n        if (includeMatches) {\n          result.indices = allIndices\n        }\n\n        return result\n      }\n    }\n\n    // Nothing was matched\n    return {\n      isMatch: false,\n      score: 1\n    }\n  }\n}\n"
  },
  {
    "path": "src/search/extended/parseQuery.js",
    "content": "import ExactMatch from './ExactMatch'\nimport InverseExactMatch from './InverseExactMatch'\nimport PrefixExactMatch from './PrefixExactMatch'\nimport InversePrefixExactMatch from './InversePrefixExactMatch'\nimport SuffixExactMatch from './SuffixExactMatch'\nimport InverseSuffixExactMatch from './InverseSuffixExactMatch'\nimport FuzzyMatch from './FuzzyMatch'\nimport IncludeMatch from './IncludeMatch'\n\n// ❗Order is important. DO NOT CHANGE.\nconst searchers = [\n  ExactMatch,\n  IncludeMatch,\n  PrefixExactMatch,\n  InversePrefixExactMatch,\n  InverseSuffixExactMatch,\n  SuffixExactMatch,\n  InverseExactMatch,\n  FuzzyMatch\n]\n\nconst searchersLen = searchers.length\n\n// Regex to split by spaces, but keep anything in quotes together\nconst SPACE_RE = / +(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)/\nconst OR_TOKEN = '|'\n\n// Return a 2D array representation of the query, for simpler parsing.\n// Example:\n// \"^core go$ | rb$ | py$ xy$\" => [[\"^core\", \"go$\"], [\"rb$\"], [\"py$\", \"xy$\"]]\nexport default function parseQuery(pattern, options = {}) {\n  return pattern.split(OR_TOKEN).map((item) => {\n    let query = item\n      .trim()\n      .split(SPACE_RE)\n      .filter((item) => item && !!item.trim())\n\n    let results = []\n    for (let i = 0, len = query.length; i < len; i += 1) {\n      const queryItem = query[i]\n\n      // 1. Handle multiple query match (i.e, once that are quoted, like `\"hello world\"`)\n      let found = false\n      let idx = -1\n      while (!found && ++idx < searchersLen) {\n        const searcher = searchers[idx]\n        let token = searcher.isMultiMatch(queryItem)\n        if (token) {\n          results.push(new searcher(token, options))\n          found = true\n        }\n      }\n\n      if (found) {\n        continue\n      }\n\n      // 2. Handle single query matches (i.e, once that are *not* quoted)\n      idx = -1\n      while (++idx < searchersLen) {\n        const searcher = searchers[idx]\n        let token = searcher.isSingleMatch(queryItem)\n        if (token) {\n          results.push(new searcher(token, options))\n          break\n        }\n      }\n    }\n\n    return results\n  })\n}\n"
  },
  {
    "path": "src/search/index.js",
    "content": "import BitapSearch from './bitap'\nimport ExtendedSearch from './extended'\n\nexport { BitapSearch, ExtendedSearch }\n"
  },
  {
    "path": "src/tools/FuseIndex.js",
    "content": "import { isArray, isDefined, isString, isBlank } from '../helpers/types'\nimport Config from '../core/config'\nimport normGenerator from './norm'\nimport { createKey } from './KeyStore'\n\nexport default class FuseIndex {\n  constructor({\n    getFn = Config.getFn,\n    fieldNormWeight = Config.fieldNormWeight\n  } = {}) {\n    this.norm = normGenerator(fieldNormWeight, 3)\n    this.getFn = getFn\n    this.isCreated = false\n\n    this.setIndexRecords()\n  }\n  setSources(docs = []) {\n    this.docs = docs\n  }\n  setIndexRecords(records = []) {\n    this.records = records\n  }\n  setKeys(keys = []) {\n    this.keys = keys\n    this._keysMap = {}\n    keys.forEach((key, idx) => {\n      this._keysMap[key.id] = idx\n    })\n  }\n  create() {\n    if (this.isCreated || !this.docs.length) {\n      return\n    }\n\n    this.isCreated = true\n\n    // List is Array<String>\n    if (isString(this.docs[0])) {\n      this.docs.forEach((doc, docIndex) => {\n        this._addString(doc, docIndex)\n      })\n    } else {\n      // List is Array<Object>\n      this.docs.forEach((doc, docIndex) => {\n        this._addObject(doc, docIndex)\n      })\n    }\n\n    this.norm.clear()\n  }\n  // Adds a doc to the end of the index\n  add(doc) {\n    const idx = this.size()\n\n    if (isString(doc)) {\n      this._addString(doc, idx)\n    } else {\n      this._addObject(doc, idx)\n    }\n  }\n  // Removes the doc at the specified index of the index\n  removeAt(idx) {\n    this.records.splice(idx, 1)\n\n    // Change ref index of every subsquent doc\n    for (let i = idx, len = this.size(); i < len; i += 1) {\n      this.records[i].i -= 1\n    }\n  }\n  getValueForItemAtKeyId(item, keyId) {\n    return item[this._keysMap[keyId]]\n  }\n  size() {\n    return this.records.length\n  }\n  _addString(doc, docIndex) {\n    if (!isDefined(doc) || isBlank(doc)) {\n      return\n    }\n\n    let record = {\n      v: doc,\n      i: docIndex,\n      n: this.norm.get(doc)\n    }\n\n    this.records.push(record)\n  }\n  _addObject(doc, docIndex) {\n    let record = { i: docIndex, $: {} }\n\n    // Iterate over every key (i.e, path), and fetch the value at that key\n    this.keys.forEach((key, keyIndex) => {\n      let value = key.getFn ? key.getFn(doc) : this.getFn(doc, key.path)\n\n      if (!isDefined(value)) {\n        return\n      }\n\n      if (isArray(value)) {\n        let subRecords = []\n        const stack = [{ nestedArrIndex: -1, value }]\n\n        while (stack.length) {\n          const { nestedArrIndex, value } = stack.pop()\n\n          if (!isDefined(value)) {\n            continue\n          }\n\n          if (isString(value) && !isBlank(value)) {\n            let subRecord = {\n              v: value,\n              i: nestedArrIndex,\n              n: this.norm.get(value)\n            }\n\n            subRecords.push(subRecord)\n          } else if (isArray(value)) {\n            value.forEach((item, k) => {\n              stack.push({\n                nestedArrIndex: k,\n                value: item\n              })\n            })\n          } else {\n            // If we're here, the `path` is either incorrect, or pointing to a non-string.\n            // console.error(new Error(`Path \"${key}\" points to a non-string value. Received: ${value}`))\n          }\n        }\n        record.$[keyIndex] = subRecords\n      } else if (isString(value) && !isBlank(value)) {\n        let subRecord = {\n          v: value,\n          n: this.norm.get(value)\n        }\n\n        record.$[keyIndex] = subRecord\n      }\n    })\n\n    this.records.push(record)\n  }\n  toJSON() {\n    return {\n      keys: this.keys,\n      records: this.records\n    }\n  }\n}\n\nexport function createIndex(\n  keys,\n  docs,\n  { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}\n) {\n  const myIndex = new FuseIndex({ getFn, fieldNormWeight })\n  myIndex.setKeys(keys.map(createKey))\n  myIndex.setSources(docs)\n  myIndex.create()\n  return myIndex\n}\n\nexport function parseIndex(\n  data,\n  { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}\n) {\n  const { keys, records } = data\n  const myIndex = new FuseIndex({ getFn, fieldNormWeight })\n  myIndex.setKeys(keys)\n  myIndex.setIndexRecords(records)\n  return myIndex\n}\n"
  },
  {
    "path": "src/tools/KeyStore.js",
    "content": "import { isString, isArray } from '../helpers/types'\nimport * as ErrorMsg from '../core/errorMessages'\n\nconst hasOwn = Object.prototype.hasOwnProperty\n\nexport default class KeyStore {\n  constructor(keys) {\n    this._keys = []\n    this._keyMap = {}\n\n    let totalWeight = 0\n\n    keys.forEach((key) => {\n      let obj = createKey(key)\n\n      this._keys.push(obj)\n      this._keyMap[obj.id] = obj\n\n      totalWeight += obj.weight\n    })\n\n    // Normalize weights so that their sum is equal to 1\n    this._keys.forEach((key) => {\n      key.weight /= totalWeight\n    })\n  }\n  get(keyId) {\n    return this._keyMap[keyId]\n  }\n  keys() {\n    return this._keys\n  }\n  toJSON() {\n    return JSON.stringify(this._keys)\n  }\n}\n\nexport function createKey(key) {\n  let path = null\n  let id = null\n  let src = null\n  let weight = 1\n  let getFn = null\n\n  if (isString(key) || isArray(key)) {\n    src = key\n    path = createKeyPath(key)\n    id = createKeyId(key)\n  } else {\n    if (!hasOwn.call(key, 'name')) {\n      throw new Error(ErrorMsg.MISSING_KEY_PROPERTY('name'))\n    }\n\n    const name = key.name\n    src = name\n\n    if (hasOwn.call(key, 'weight')) {\n      weight = key.weight\n\n      if (weight <= 0) {\n        throw new Error(ErrorMsg.INVALID_KEY_WEIGHT_VALUE(name))\n      }\n    }\n\n    path = createKeyPath(name)\n    id = createKeyId(name)\n    getFn = key.getFn\n  }\n\n  return { path, id, weight, src, getFn }\n}\n\nexport function createKeyPath(key) {\n  return isArray(key) ? key : key.split('.')\n}\n\nexport function createKeyId(key) {\n  return isArray(key) ? key.join('.') : key\n}\n"
  },
  {
    "path": "src/tools/norm.js",
    "content": "const SPACE = /[^ ]+/g\n\n// Field-length norm: the shorter the field, the higher the weight.\n// Set to 3 decimals to reduce index size.\nexport default function norm(weight = 1, mantissa = 3) {\n  const cache = new Map()\n  const m = Math.pow(10, mantissa)\n\n  return {\n    get(value) {\n      const numTokens = value.match(SPACE).length\n\n      if (cache.has(numTokens)) {\n        return cache.get(numTokens)\n      }\n\n      // Default function is 1/sqrt(x), weight makes that variable\n      const norm = 1 / Math.pow(numTokens, 0.5 * weight)\n\n      // In place of `toFixed(mantissa)`, for faster computation\n      const n = parseFloat(Math.round(norm * m) / m)\n\n      cache.set(numTokens, n)\n\n      return n\n    },\n    clear() {\n      cache.clear()\n    }\n  }\n}\n"
  },
  {
    "path": "src/transform/index.js",
    "content": "import transformMatches from './transformMatches'\nimport transformScore from './transformScore'\n\nexport { transformMatches, transformScore }\n"
  },
  {
    "path": "src/transform/transformMatches.js",
    "content": "import { isDefined } from '../helpers/types'\n\nexport default function transformMatches(result, data) {\n  const matches = result.matches\n  data.matches = []\n\n  if (!isDefined(matches)) {\n    return\n  }\n\n  matches.forEach((match) => {\n    if (!isDefined(match.indices) || !match.indices.length) {\n      return\n    }\n\n    const { indices, value } = match\n\n    let obj = {\n      indices,\n      value\n    }\n\n    if (match.key) {\n      obj.key = match.key.src\n    }\n\n    if (match.idx > -1) {\n      obj.refIndex = match.idx\n    }\n\n    data.matches.push(obj)\n  })\n}\n"
  },
  {
    "path": "src/transform/transformScore.js",
    "content": "export default function transformScore(result, data) {\n  data.score = result.score\n}\n"
  },
  {
    "path": "src/tsconfig.json",
    "content": "{\n  \"extends\": \"../tsconfig.base.json\",\n  \"compilerOptions\": {\n    \"declarationDir\": \"../dist\"\n  },\n  \"include\": [\".\"]\n}\n"
  },
  {
    "path": "test/__snapshots__/extended-search.test.js.snap",
    "content": "// Vitest Snapshot v1\n\nexports[`Searching using extended search > Search: all 1`] = `\n[\n  {\n    \"item\": {\n      \"text\": \"smithee\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            6,\n          ],\n          [\n            0,\n            6,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"smithee\",\n      },\n    ],\n    \"refIndex\": 4,\n    \"score\": 2.220446049250313e-16,\n  },\n  {\n    \"item\": {\n      \"text\": \"smith\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            4,\n          ],\n          [\n            0,\n            4,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"smith\",\n      },\n    ],\n    \"refIndex\": 5,\n    \"score\": 2.220446049250313e-16,\n  },\n  {\n    \"item\": {\n      \"text\": \"hello word\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            9,\n          ],\n          [\n            0,\n            9,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"hello word\",\n      },\n    ],\n    \"refIndex\": 0,\n    \"score\": 8.569061098350962e-12,\n  },\n  {\n    \"item\": {\n      \"text\": \"I am fine\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            8,\n          ],\n          [\n            0,\n            8,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"I am fine\",\n      },\n    ],\n    \"refIndex\": 3,\n    \"score\": 9.287439764962262e-10,\n  },\n]\n`;\n\nexports[`Searching using extended search > Search: exact-match 1`] = `\n[\n  {\n    \"item\": {\n      \"text\": \"smith\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            4,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"smith\",\n      },\n    ],\n    \"refIndex\": 5,\n    \"score\": 2.220446049250313e-16,\n  },\n]\n`;\n\nexports[`Searching using extended search > Search: include-match 1`] = `\n[\n  {\n    \"item\": {\n      \"text\": \"hello word\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            4,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"hello word\",\n      },\n    ],\n    \"refIndex\": 0,\n    \"score\": 8.569061098350962e-12,\n  },\n  {\n    \"item\": {\n      \"text\": \"indeed fine hello foo\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            12,\n            16,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"indeed fine hello foo\",\n      },\n    ],\n    \"refIndex\": 2,\n    \"score\": 1.4901161193847656e-8,\n  },\n]\n`;\n\nexports[`Searching using extended search > Search: inverse-exact-match 1`] = `\n[\n  {\n    \"item\": {\n      \"text\": \"smithee\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            6,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"smithee\",\n      },\n    ],\n    \"refIndex\": 4,\n    \"score\": 2.220446049250313e-16,\n  },\n  {\n    \"item\": {\n      \"text\": \"smith\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            4,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"smith\",\n      },\n    ],\n    \"refIndex\": 5,\n    \"score\": 2.220446049250313e-16,\n  },\n  {\n    \"item\": {\n      \"text\": \"hello word\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            9,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"hello word\",\n      },\n    ],\n    \"refIndex\": 0,\n    \"score\": 8.569061098350962e-12,\n  },\n  {\n    \"item\": {\n      \"text\": \"how are you\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            10,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"how are you\",\n      },\n    ],\n    \"refIndex\": 1,\n    \"score\": 9.287439764962262e-10,\n  },\n  {\n    \"item\": {\n      \"text\": \"I am fine\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            8,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"I am fine\",\n      },\n    ],\n    \"refIndex\": 3,\n    \"score\": 9.287439764962262e-10,\n  },\n]\n`;\n\nexports[`Searching using extended search > Search: inverse-prefix-exact-match 1`] = `\n[\n  {\n    \"item\": {\n      \"text\": \"smithee\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            6,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"smithee\",\n      },\n    ],\n    \"refIndex\": 4,\n    \"score\": 2.220446049250313e-16,\n  },\n  {\n    \"item\": {\n      \"text\": \"smith\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            4,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"smith\",\n      },\n    ],\n    \"refIndex\": 5,\n    \"score\": 2.220446049250313e-16,\n  },\n  {\n    \"item\": {\n      \"text\": \"how are you\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            10,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"how are you\",\n      },\n    ],\n    \"refIndex\": 1,\n    \"score\": 9.287439764962262e-10,\n  },\n  {\n    \"item\": {\n      \"text\": \"I am fine\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            8,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"I am fine\",\n      },\n    ],\n    \"refIndex\": 3,\n    \"score\": 9.287439764962262e-10,\n  },\n  {\n    \"item\": {\n      \"text\": \"indeed fine hello foo\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            20,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"indeed fine hello foo\",\n      },\n    ],\n    \"refIndex\": 2,\n    \"score\": 1.4901161193847656e-8,\n  },\n]\n`;\n\nexports[`Searching using extended search > Search: inverse-suffix-exact-match 1`] = `\n[\n  {\n    \"item\": {\n      \"text\": \"smithee\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            6,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"smithee\",\n      },\n    ],\n    \"refIndex\": 4,\n    \"score\": 2.220446049250313e-16,\n  },\n  {\n    \"item\": {\n      \"text\": \"smith\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            4,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"smith\",\n      },\n    ],\n    \"refIndex\": 5,\n    \"score\": 2.220446049250313e-16,\n  },\n  {\n    \"item\": {\n      \"text\": \"hello word\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            9,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"hello word\",\n      },\n    ],\n    \"refIndex\": 0,\n    \"score\": 8.569061098350962e-12,\n  },\n  {\n    \"item\": {\n      \"text\": \"how are you\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            10,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"how are you\",\n      },\n    ],\n    \"refIndex\": 1,\n    \"score\": 9.287439764962262e-10,\n  },\n  {\n    \"item\": {\n      \"text\": \"I am fine\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            8,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"I am fine\",\n      },\n    ],\n    \"refIndex\": 3,\n    \"score\": 9.287439764962262e-10,\n  },\n]\n`;\n\nexports[`Searching using extended search > Search: literal match with fuzzy match 1`] = `\n[\n  {\n    \"item\": {\n      \"text\": \"indeed fine hello foo\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            10,\n          ],\n          [\n            18,\n            20,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"indeed fine hello foo\",\n      },\n    ],\n    \"refIndex\": 2,\n    \"score\": 1.4901161193847656e-8,\n  },\n  {\n    \"item\": {\n      \"text\": \"hello word\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            4,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"hello word\",\n      },\n    ],\n    \"refIndex\": 0,\n    \"score\": 0.3205001277290518,\n  },\n]\n`;\n\nexports[`Searching using extended search > Search: literal match with regular match 1`] = `\n[\n  {\n    \"item\": {\n      \"text\": \"how are you\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            4,\n            6,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"how are you\",\n      },\n    ],\n    \"refIndex\": 1,\n    \"score\": 9.287439764962262e-10,\n  },\n  {\n    \"item\": {\n      \"text\": \"indeed fine hello foo\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            10,\n          ],\n          [\n            18,\n            20,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"indeed fine hello foo\",\n      },\n    ],\n    \"refIndex\": 2,\n    \"score\": 1.4901161193847656e-8,\n  },\n]\n`;\n\nexports[`Searching using extended search > Search: prefix-exact-match 1`] = `\n[\n  {\n    \"item\": {\n      \"text\": \"hello word\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            4,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"hello word\",\n      },\n    ],\n    \"refIndex\": 0,\n    \"score\": 8.569061098350962e-12,\n  },\n]\n`;\n\nexports[`Searching using extended search > Search: single literal match 1`] = `\n[\n  {\n    \"item\": {\n      \"text\": \"indeed fine hello foo\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            0,\n            10,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"indeed fine hello foo\",\n      },\n    ],\n    \"refIndex\": 2,\n    \"score\": 1.4901161193847656e-8,\n  },\n]\n`;\n\nexports[`Searching using extended search > Search: suffix-exact-match 1`] = `\n[\n  {\n    \"item\": {\n      \"text\": \"I am fine\",\n    },\n    \"matches\": [\n      {\n        \"indices\": [\n          [\n            5,\n            8,\n          ],\n        ],\n        \"key\": \"text\",\n        \"value\": \"I am fine\",\n      },\n    ],\n    \"refIndex\": 3,\n    \"score\": 9.287439764962262e-10,\n  },\n]\n`;\n"
  },
  {
    "path": "test/__snapshots__/fuzzy-search.test.js.snap",
    "content": "// Vitest Snapshot v1\n\nexports[`Ignore location and field length norm > Check order of entries when location and field-length norm are ignored 1`] = `\n[\n  {\n    \"item\": \"Module with Promise-aware beforeEach\",\n    \"refIndex\": 3,\n    \"score\": 0.09090909090909091,\n  },\n  {\n    \"item\": \"Module with Promise-aware afterEach\",\n    \"refIndex\": 5,\n    \"score\": 0.2727272727272727,\n  },\n  {\n    \"item\": \"Promise-aware return values without beforeEach/afterEach\",\n    \"refIndex\": 4,\n    \"score\": 0.4090909090909091,\n  },\n  {\n    \"item\": \"async beforeEach test\",\n    \"refIndex\": 1,\n    \"score\": 0.5,\n  },\n  {\n    \"item\": \"assert.async in beforeEach\",\n    \"refIndex\": 2,\n    \"score\": 0.5,\n  },\n  {\n    \"item\": \"beforeEach\",\n    \"refIndex\": 0,\n    \"score\": 0.5454545454545454,\n  },\n]\n`;\n\nexports[`Ignore location and field length norm > Check order of entries when location and field-length norm are not ignored 1`] = `\n[\n  {\n    \"item\": \"beforeEach\",\n    \"refIndex\": 0,\n    \"score\": 0,\n  },\n  {\n    \"item\": \"async beforeEach test\",\n    \"refIndex\": 1,\n    \"score\": 0.1972392177586917,\n  },\n  {\n    \"item\": \"before\",\n    \"refIndex\": 6,\n    \"score\": 0.4,\n  },\n  {\n    \"item\": \"assert.async in beforeEach\",\n    \"refIndex\": 2,\n    \"score\": 0.4493775633055149,\n  },\n  {\n    \"item\": \"before (skip)\",\n    \"refIndex\": 7,\n    \"score\": 0.5231863610884103,\n  },\n  {\n    \"item\": \"Module with Promise-aware beforeEach\",\n    \"refIndex\": 3,\n    \"score\": 0.5916079783099616,\n  },\n  {\n    \"item\": \"Promise-aware return values without beforeEach/afterEach\",\n    \"refIndex\": 4,\n    \"score\": 0.699819425905295,\n  },\n]\n`;\n"
  },
  {
    "path": "test/__snapshots__/logical-search.test.js.snap",
    "content": "// Vitest Snapshot v1\n\nexports[`Logical parser > Implicit operations 1`] = `\n{\n  \"children\": [\n    {\n      \"keyId\": \"title\",\n      \"pattern\": \"old war\",\n    },\n    {\n      \"children\": [\n        {\n          \"children\": [\n            {\n              \"keyId\": \"title\",\n              \"pattern\": \"!arts\",\n            },\n            {\n              \"keyId\": \"tags\",\n              \"pattern\": \"kiro\",\n            },\n          ],\n          \"operator\": \"$and\",\n        },\n        {\n          \"keyId\": \"title\",\n          \"pattern\": \"^lock\",\n        },\n      ],\n      \"operator\": \"$or\",\n    },\n  ],\n  \"operator\": \"$and\",\n}\n`;\n\nexports[`Logical parser > Tree structure 1`] = `\n{\n  \"children\": [\n    {\n      \"keyId\": \"title\",\n      \"pattern\": \"old war\",\n    },\n    {\n      \"children\": [\n        {\n          \"keyId\": \"title\",\n          \"pattern\": \"!arts\",\n        },\n        {\n          \"keyId\": \"title\",\n          \"pattern\": \"^lock\",\n        },\n      ],\n      \"operator\": \"$or\",\n    },\n  ],\n  \"operator\": \"$and\",\n}\n`;\n"
  },
  {
    "path": "test/extended-search.test.js",
    "content": "import Fuse from '../dist/fuse.mjs'\n\ndescribe('Searching using extended search', () => {\n  const list = [\n    {\n      text: 'hello word'\n    },\n    {\n      text: 'how are you'\n    },\n    {\n      text: 'indeed fine hello foo'\n    },\n    {\n      text: 'I am fine'\n    },\n    {\n      text: 'smithee'\n    },\n    {\n      text: 'smith'\n    }\n  ]\n\n  const options = {\n    useExtendedSearch: true,\n    includeMatches: true,\n    includeScore: true,\n    threshold: 0.5,\n    minMatchCharLength: 4,\n    keys: ['text']\n  }\n  const fuse = new Fuse(list, options)\n\n  test('Search: exact-match', () => {\n    let result = fuse.search('=smith')\n    expect(result).toMatchSnapshot()\n  })\n\n  test('Search: include-match', () => {\n    let result = fuse.search(\"'hello\")\n    expect(result).toMatchSnapshot()\n  })\n\n  test('Search: prefix-exact-match', () => {\n    let result = fuse.search('^hello')\n    expect(result).toMatchSnapshot()\n  })\n\n  test('Search: suffix-exact-match', () => {\n    let result = fuse.search('fine$')\n    expect(result).toMatchSnapshot()\n  })\n\n  test('Search: inverse-exact-match', () => {\n    let result = fuse.search('!indeed')\n    expect(result).toMatchSnapshot()\n  })\n\n  test('Search: inverse-prefix-exact-match', () => {\n    let result = fuse.search('!^hello')\n    expect(result).toMatchSnapshot()\n  })\n\n  test('Search: inverse-suffix-exact-match', () => {\n    let result = fuse.search('!foo$')\n    expect(result).toMatchSnapshot()\n  })\n\n  test('Search: all', () => {\n    let result = fuse.search('!foo$ !^how')\n    expect(result).toMatchSnapshot()\n  })\n\n  test('Search: single literal match', () => {\n    let result = fuse.search('\\'\"indeed fine\"')\n    expect(result).toMatchSnapshot()\n  })\n\n  test('Search: literal match with regular match', () => {\n    let result = fuse.search('\\'\"indeed fine\" foo$ | \\'are')\n    expect(result).toMatchSnapshot()\n  })\n\n  test('Search: literal match with fuzzy match', () => {\n    let result = fuse.search('\\'\"indeed fine\" foo$ | helol')\n    expect(result).toMatchSnapshot()\n  })\n})\n\ndescribe('ignoreLocation when useExtendedSearch is true', () => {\n  const list = [\n    {\n      document:\n        'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum apple.'\n    }\n  ]\n\n  test('Search: literal match with fuzzy match', () => {\n    const options = {\n      threshold: 0.2,\n      useExtendedSearch: true,\n      ignoreLocation: true,\n      keys: ['document']\n    }\n    const fuse = new Fuse(list, options)\n\n    let result = fuse.search('Apple')\n    expect(result).toHaveLength(1)\n  })\n})\n\ndescribe('Searching using extended search ignoring diactrictics', () => {\n  const list = [\n    {\n      text: 'déjà'\n    },\n    {\n      text: 'cafe'\n    }\n  ]\n\n  const options = {\n    useExtendedSearch: true,\n    ignoreDiacritics: true,\n    threshold: 0,\n    keys: ['text']\n  }\n  const fuse = new Fuse(list, options)\n\n  test('Search: query with diactrictics, list with diactrictics', () => {\n    let result = fuse.search('déjà')\n    expect(result).toHaveLength(1)\n    expect(result[0].refIndex).toBe(0)\n  })\n\n  test('Search: query without diactrictics, list with diactrictics', () => {\n    let result = fuse.search('deja')\n    expect(result).toHaveLength(1)\n    expect(result[0].refIndex).toBe(0)\n  })\n\n  test('Search: query with diactrictics, list without diactrictics', () => {\n    let result = fuse.search('café')\n    expect(result).toHaveLength(1)\n    expect(result[0].refIndex).toBe(1)\n  })\n\n  test('Search: query without diactrictics, list without diactrictics', () => {\n    let result = fuse.search('cafe')\n    expect(result).toHaveLength(1)\n    expect(result[0].refIndex).toBe(1)\n  })\n})\n"
  },
  {
    "path": "test/feature-flags.test.js",
    "content": "// use basic build so that errors are thrown\nimport Fuse from '../dist/fuse.basic.mjs'\nimport * as ErrorMsg from '../src/core/errorMessages'\nimport Books from './fixtures/books.json' assert { type: \"json\" }\n\ndescribe('Initialization errors', () => {\n  test('Errors are thrown', () => {\n    expect(() => {\n      new Fuse(Books, {\n        useExtendedSearch: true,\n        keys: ['title']\n      })\n    }).toThrowError(ErrorMsg.EXTENDED_SEARCH_UNAVAILABLE)\n\n    expect(() => {\n      let fuse = new Fuse(Books, {\n        keys: ['title']\n      })\n      fuse.search({ title: 'hello' })\n    }).toThrowError(ErrorMsg.LOGICAL_SEARCH_UNAVAILABLE)\n  })\n})\n"
  },
  {
    "path": "test/fixtures/books.json",
    "content": "[\n  {\n    \"title\": \"Old Man's War\",\n    \"author\": {\n      \"firstName\": \"John\",\n      \"lastName\": \"Scalzi\"\n    }\n  },\n  {\n    \"title\": \"The Lock Artist\",\n    \"author\": {\n      \"firstName\": \"Steve\",\n      \"lastName\": \"Hamilton\"\n    }\n  },\n  {\n    \"title\": \"HTML5\",\n    \"author\": {\n      \"firstName\": \"Remy\",\n      \"lastName\": \"Sharp\"\n    }\n  },\n  {\n    \"title\": \"Right Ho Jeeves\",\n    \"author\": {\n      \"firstName\": \"P.D\",\n      \"lastName\": \"Woodhouse\"\n    }\n  },\n  {\n    \"title\": \"The Code of the Wooster\",\n    \"author\": {\n      \"firstName\": \"P.D\",\n      \"lastName\": \"Woodhouse\"\n    }\n  },\n  {\n    \"title\": \"Thank You Jeeves\",\n    \"author\": {\n      \"firstName\": \"P.D\",\n      \"lastName\": \"Woodhouse\"\n    }\n  },\n  {\n    \"title\": \"The DaVinci Code\",\n    \"author\": {\n      \"firstName\": \"Dan\",\n      \"lastName\": \"Brown\"\n    }\n  },\n  {\n    \"title\": \"Angels & Demons\",\n    \"author\": {\n      \"firstName\": \"Dan\",\n      \"lastName\": \"Brown\"\n    }\n  },\n  {\n    \"title\": \"The Silmarillion\",\n    \"author\": {\n      \"firstName\": \"J.R.R\",\n      \"lastName\": \"Tolkien\"\n    }\n  },\n  {\n    \"title\": \"Syrup\",\n    \"author\": {\n      \"firstName\": \"Max\",\n      \"lastName\": \"Barry\"\n    }\n  },\n  {\n    \"title\": \"The Lost Symbol\",\n    \"author\": {\n      \"firstName\": \"Dan\",\n      \"lastName\": \"Brown\"\n    }\n  },\n  {\n    \"title\": \"The Book of Lies\",\n    \"author\": {\n      \"firstName\": \"Brad\",\n      \"lastName\": \"Meltzer\"\n    }\n  },\n  {\n    \"title\": \"Lamb\",\n    \"author\": {\n      \"firstName\": \"Christopher\",\n      \"lastName\": \"Moore\"\n    }\n  },\n  {\n    \"title\": \"Fool\",\n    \"author\": {\n      \"firstName\": \"Christopher\",\n      \"lastName\": \"Moore\"\n    }\n  },\n  {\n    \"title\": \"Incompetence\",\n    \"author\": {\n      \"firstName\": \"Rob\",\n      \"lastName\": \"Grant\"\n    }\n  },\n  {\n    \"title\": \"Fat\",\n    \"author\": {\n      \"firstName\": \"Rob\",\n      \"lastName\": \"Grant\"\n    }\n  },\n  {\n    \"title\": \"Colony\",\n    \"author\": {\n      \"firstName\": \"Rob\",\n      \"lastName\": \"Grant\"\n    }\n  },\n  {\n    \"title\": \"Backwards, Red Dwarf\",\n    \"author\": {\n      \"firstName\": \"Rob\",\n      \"lastName\": \"Grant\"\n    }\n  },\n  {\n    \"title\": \"The Grand Design\",\n    \"author\": {\n      \"firstName\": \"Stephen\",\n      \"lastName\": \"Hawking\"\n    }\n  },\n  {\n    \"title\": \"The Book of Samson\",\n    \"author\": {\n      \"firstName\": \"David\",\n      \"lastName\": \"Maine\"\n    }\n  },\n  {\n    \"title\": \"The Preservationist\",\n    \"author\": {\n      \"firstName\": \"David\",\n      \"lastName\": \"Maine\"\n    }\n  },\n  {\n    \"title\": \"Fallen\",\n    \"author\": {\n      \"firstName\": \"David\",\n      \"lastName\": \"Maine\"\n    }\n  },\n  {\n    \"title\": \"Monster 1959\",\n    \"author\": {\n      \"firstName\": \"David\",\n      \"lastName\": \"Maine\"\n    }\n  }\n]\n"
  },
  {
    "path": "test/fixtures/pokedex.js",
    "content": "exports.__esModule = true\nexports.BattlePokedex = [\n  {\n    num: 1,\n    species: 'Bulbasaur',\n    types: ['Grass', 'Poison'],\n    genderRatio: { M: 0.875, F: 0.125 },\n    baseStats: { hp: 45, atk: 49, def: 49, spa: 65, spd: 65, spe: 45 },\n    abilities: { 0: 'Overgrow', H: 'Chlorophyll' },\n    heightm: 0.7,\n    weightkg: 6.9,\n    color: 'Green',\n    evos: ['ivysaur'],\n    eggGroups: ['Monster', 'Grass']\n  },\n  {\n    num: 2,\n    species: 'Ivysaur',\n    types: ['Grass', 'Poison'],\n    genderRatio: { M: 0.875, F: 0.125 },\n    baseStats: { hp: 60, atk: 62, def: 63, spa: 80, spd: 80, spe: 60 },\n    abilities: { 0: 'Overgrow', H: 'Chlorophyll' },\n    heightm: 1,\n    weightkg: 13,\n    color: 'Green',\n    prevo: 'bulbasaur',\n    evos: ['venusaur'],\n    evoLevel: 16,\n    eggGroups: ['Monster', 'Grass']\n  },\n  {\n    num: 3,\n    species: 'Venusaur',\n    types: ['Grass', 'Poison'],\n    genderRatio: { M: 0.875, F: 0.125 },\n    baseStats: { hp: 80, atk: 82, def: 83, spa: 100, spd: 100, spe: 80 },\n    abilities: { 0: 'Overgrow', H: 'Chlorophyll' },\n    heightm: 2,\n    weightkg: 100,\n    color: 'Green',\n    prevo: 'ivysaur',\n    evoLevel: 32,\n    eggGroups: ['Monster', 'Grass'],\n    otherFormes: ['venusaurmega']\n  },\n  {\n    num: 3,\n    species: 'Venusaur-Mega',\n    baseSpecies: 'Venusaur',\n    forme: 'Mega',\n    formeLetter: 'M',\n    types: ['Grass', 'Poison'],\n    genderRatio: { M: 0.875, F: 0.125 },\n    baseStats: { hp: 80, atk: 100, def: 123, spa: 122, spd: 120, spe: 80 },\n    abilities: { 0: 'Thick Fat' },\n    heightm: 2.4,\n    weightkg: 155.5,\n    color: 'Green',\n    eggGroups: ['Monster', 'Grass']\n  }\n]\n"
  },
  {
    "path": "test/fixtures/pokedex.ts",
    "content": "import { PokedexType } from './types'\n\nexport const BattlePokedex: PokedexType[] = [\n  {\n    num: 1,\n    species: 'Bulbasaur',\n    types: ['Grass', 'Poison'],\n    genderRatio: { M: 0.875, F: 0.125 },\n    baseStats: { hp: 45, atk: 49, def: 49, spa: 65, spd: 65, spe: 45 },\n    abilities: { 0: 'Overgrow', H: 'Chlorophyll' },\n    heightm: 0.7,\n    weightkg: 6.9,\n    color: 'Green',\n    evos: ['ivysaur'],\n    eggGroups: ['Monster', 'Grass']\n  },\n  {\n    num: 2,\n    species: 'Ivysaur',\n    types: ['Grass', 'Poison'],\n    genderRatio: { M: 0.875, F: 0.125 },\n    baseStats: { hp: 60, atk: 62, def: 63, spa: 80, spd: 80, spe: 60 },\n    abilities: { 0: 'Overgrow', H: 'Chlorophyll' },\n    heightm: 1,\n    weightkg: 13,\n    color: 'Green',\n    prevo: 'bulbasaur',\n    evos: ['venusaur'],\n    evoLevel: 16,\n    eggGroups: ['Monster', 'Grass']\n  },\n  {\n    num: 3,\n    species: 'Venusaur',\n    types: ['Grass', 'Poison'],\n    genderRatio: { M: 0.875, F: 0.125 },\n    baseStats: { hp: 80, atk: 82, def: 83, spa: 100, spd: 100, spe: 80 },\n    abilities: { 0: 'Overgrow', H: 'Chlorophyll' },\n    heightm: 2,\n    weightkg: 100,\n    color: 'Green',\n    prevo: 'ivysaur',\n    evoLevel: 32,\n    eggGroups: ['Monster', 'Grass'],\n    otherFormes: ['venusaurmega']\n  },\n  {\n    num: 3,\n    species: 'Venusaur-Mega',\n    baseSpecies: 'Venusaur',\n    forme: 'Mega',\n    formeLetter: 'M',\n    types: ['Grass', 'Poison'],\n    genderRatio: { M: 0.875, F: 0.125 },\n    baseStats: { hp: 80, atk: 100, def: 123, spa: 122, spd: 120, spe: 80 },\n    abilities: { 0: 'Thick Fat' },\n    heightm: 2.4,\n    weightkg: 155.5,\n    color: 'Green',\n    eggGroups: ['Monster', 'Grass']\n  }\n]\n\n// export const PokeAliases: IPokeDexAliases[] = [\n//   { alias: 'megavenu', name: 'Venusaur-Mega' },\n//   { alias: 'megasaur', name: 'Venusaur-Mega' },\n//   { alias: 'venu', name: 'Venusaur' },\n//   { alias: 'bulbapedia', name: 'Bulbasaur' },\n// ]\n"
  },
  {
    "path": "test/fixtures/types.js",
    "content": "'use strict'\nexports.__esModule = true\n"
  },
  {
    "path": "test/fixtures/types.ts",
    "content": "type PokeAliasType = {\n  alias: string\n}\n\ntype PokeStatType = {\n  hp: number\n  atk: number\n  def: number\n  spa: number\n  spd: number\n  spe: number\n\n  [propName: string]: string | number | undefined\n}\n\ntype PokeAbilityType = {\n  0: string\n  1?: string\n  H?: string\n\n  [propName: string]: string | number | undefined\n}\n\ntype PokeGenderRatioType = {\n  M: number\n  F: number\n}\n\nexport type PokedexType = {\n  num: number\n  species: string\n  types: string[]\n  genderRatio?: PokeGenderRatioType\n  baseStats: PokeStatType\n  abilities: PokeAbilityType\n  heightm: number\n  weightkg: number\n  color: string\n  name?: string\n  baseForme?: string\n  baseSpecies?: string\n  forme?: string\n  formeLetter?: string\n  gender?: string\n  prevo?: string\n  evos?: string[]\n  evoLevel?: number | string\n  eggGroups?: string[]\n  otherFormes?: string[]\n}\n\n// export interface IPokeDexAliases extends PokeAliasType, PokedexType {\n//   name: string\n// }\n"
  },
  {
    "path": "test/fuzzy-search.test.js",
    "content": "import Fuse from '../dist/fuse.mjs'\nimport * as ErrorMsg from '../src/core/errorMessages'\n\nconst defaultList = ['Apple', 'Orange', 'Banana']\nconst defaultOptions = {}\n\nconst setup = (itemList, overwriteOptions) => {\n  const list = itemList || defaultList\n  const options = { ...defaultOptions, ...overwriteOptions }\n\n  return new Fuse(list, options)\n}\n\ndescribe('Flat list of strings: [\"Apple\", \"Orange\", \"Banana\"]', () => {\n  let fuse\n  beforeEach(() => (fuse = setup()))\n\n  describe('When searching for the term \"Apple\"', () => {\n    let result\n    beforeEach(() => (result = fuse.search('Apple')))\n\n    test('we get a list of exactly 1 item', () => {\n      expect(result).toHaveLength(1)\n    })\n\n    test('whose value is the index 0, representing [\"Apple\"]', () => {\n      expect(result[0].refIndex).toBe(0)\n    })\n  })\n\n  describe('When performing a fuzzy search for the term \"ran\"', () => {\n    let result\n    beforeEach(() => (result = fuse.search('ran')))\n\n    test('we get a list of containing 2 items', () => {\n      expect(result).toHaveLength(2)\n    })\n\n    test('whose values represent the indices of [\"Orange\", \"Banana\"]', () => {\n      expect(result[0].refIndex).toBe(1)\n      expect(result[1].refIndex).toBe(2)\n    })\n  })\n\n  describe('When performing a fuzzy search for the term \"nan\"', () => {\n    let result\n    beforeEach(() => (result = fuse.search('nan')))\n\n    test('we get a list of containing 2 items', () => {\n      expect(result).toHaveLength(2)\n    })\n\n    test('whose values represent the indices of [\"Banana\", \"Orange\"]', () => {\n      expect(result[0].refIndex).toBe(2)\n      expect(result[1].refIndex).toBe(1)\n    })\n  })\n\n  describe('When performing a fuzzy search for the term \"nan\" with a limit of 1 result', () => {\n    let result\n    beforeEach(() => (result = fuse.search('nan', { limit: 1 })))\n\n    test('we get a list of containing 1 item: [2]', () => {\n      expect(result).toHaveLength(1)\n    })\n\n    test('whose values represent the indices of [\"Banana\", \"Orange\"]', () => {\n      expect(result[0].refIndex).toBe(2)\n    })\n  })\n})\n\ndescribe('Deep key search, with [\"title\", \"author.firstName\"]', () => {\n  const customBookList = [\n    {\n      title: \"Old Man's War\",\n      author: { firstName: 'John', lastName: 'Scalzi' }\n    },\n    {\n      title: 'The Lock Artist',\n      author: { firstName: 'Steve', lastName: 'Hamilton' }\n    },\n    { title: 'HTML5' },\n    {\n      title: 'A History of England',\n      author: { firstName: 1066, lastName: 'Hastings' }\n    }\n  ]\n  let fuse\n  beforeEach(\n    () =>\n      (fuse = setup(customBookList, { keys: ['title', 'author.firstName'] }))\n  )\n\n  describe('When searching for the term \"Stve\"', () => {\n    let result\n    beforeEach(() => (result = fuse.search('Stve')))\n\n    test('we get a list containing at least 1 item', () => {\n      expect(result.length).toBeGreaterThanOrEqual(1)\n    })\n\n    test('and the first item has the matching key/value pairs', () => {\n      expect(result[0].item).toMatchObject({\n        title: 'The Lock Artist',\n        author: { firstName: 'Steve', lastName: 'Hamilton' }\n      })\n    })\n  })\n\n  describe('When searching for the term \"106\"', () => {\n    let result\n    beforeEach(() => (result = fuse.search('106')))\n\n    test('we get a list of exactly 1 item', () => {\n      expect(result).toHaveLength(1)\n    })\n\n    test('whose value matches', () => {\n      expect(result[0].item).toMatchObject({\n        title: 'A History of England',\n        author: { firstName: 1066, lastName: 'Hastings' }\n      })\n    })\n  })\n})\n\ndescribe('Custom search function, with [\"title\", \"author.firstName\"]', () => {\n  const customBookList = [\n    {\n      title: \"Old Man's War\",\n      author: {\n        firstName: 'John',\n        lastName: 'Scalzi'\n      }\n    },\n    {\n      title: 'The Lock Artist',\n      author: {\n        firstName: 'Steve',\n        lastName: 'Hamilton'\n      }\n    }\n  ]\n  const customOptions = {\n    keys: ['title', 'author.firstName'],\n    getFn: (obj) => {\n      if (!obj) return null\n      obj = obj.author.lastName\n      return obj\n    }\n  }\n  let fuse\n  beforeEach(() => (fuse = setup(customBookList, customOptions)))\n\n  describe('When searching for the term \"Hmlt\"', () => {\n    let result\n    beforeEach(() => (result = fuse.search('Hmlt')))\n\n    test('we get a list containing at least 1 item', () => {\n      expect(result.length).toBeGreaterThanOrEqual(1)\n    })\n\n    test('and the first item has the matching key/value pairs', () => {\n      expect(result[0].item).toMatchObject({\n        title: 'The Lock Artist',\n        author: { firstName: 'Steve', lastName: 'Hamilton' }\n      })\n    })\n  })\n\n  describe('When searching for the term \"Stve\"', () => {\n    let result\n    beforeEach(() => (result = fuse.search('Stve')))\n\n    test('we get a list of exactly 0 items', () => {\n      expect(result).toHaveLength(0)\n    })\n  })\n})\n\ndescribe('Include score in result list: [\"Apple\", \"Orange\", \"Banana\"]', () => {\n  let fuse\n  beforeEach(() => (fuse = setup(defaultList, { includeScore: true })))\n\n  describe('When searching for the term \"Apple\"', () => {\n    let result\n    beforeEach(() => (result = fuse.search('Apple')))\n\n    test('we get a list of exactly 1 item', () => {\n      expect(result).toHaveLength(1)\n    })\n\n    test('whose value is the index 0, representing [\"Apple\"]', () => {\n      expect(result[0].refIndex).toBe(0)\n      expect(result[0].score).toBe(0)\n    })\n  })\n\n  describe('When performing a fuzzy search for the term \"ran\"', () => {\n    let result\n    beforeEach(() => (result = fuse.search('ran')))\n\n    test('we get a list of containing 2 items', () => {\n      expect(result).toHaveLength(2)\n    })\n\n    test('whose values represent the indices, and have non-zero scores', () => {\n      expect(result[0].refIndex).toBe(1)\n      expect(result[0].score).not.toBe(0)\n      expect(result[1].refIndex).toBe(2)\n      expect(result[1].score).not.toBe(0)\n    })\n  })\n})\n\ndescribe('Include both ID and score in results list', () => {\n  const customBookList = [\n    {\n      ISBN: '0765348276',\n      title: \"Old Man's War\",\n      author: 'John Scalzi'\n    },\n    {\n      ISBN: '0312696957',\n      title: 'The Lock Artist',\n      author: 'Steve Hamilton'\n    }\n  ]\n  const customOptions = {\n    keys: ['title', 'author'],\n    includeScore: true\n  }\n  let fuse\n  beforeEach(() => (fuse = setup(customBookList, customOptions)))\n\n  describe('When searching for the term \"Stve\"', () => {\n    let result\n    beforeEach(() => (result = fuse.search('Stve')))\n\n    test('we get a list containing exactly 1 item', () => {\n      expect(result).toHaveLength(1)\n    })\n\n    test('whose value is the ISBN of the book', () => {\n      expect(result[0].item.ISBN).toBe('0312696957')\n    })\n\n    test('and has a score that is not zero', () => {\n      expect(result[0].score).not.toBe(0)\n    })\n  })\n})\n\ndescribe('Search when IDs are numbers', () => {\n  const customBookList = [\n    {\n      ISBN: 1111,\n      title: \"Old Man's War\",\n      author: 'John Scalzi'\n    },\n    {\n      ISBN: 2222,\n      title: 'The Lock Artist',\n      author: 'Steve Hamilton'\n    }\n  ]\n  const customOptions = {\n    keys: ['title', 'author'],\n    id: 'ISBN',\n    includeScore: true\n  }\n  let fuse\n  beforeEach(() => (fuse = setup(customBookList, customOptions)))\n\n  describe('When searching for the term \"Stve\"', () => {\n    let result\n    beforeEach(() => (result = fuse.search('Stve')))\n\n    test('we get a list containing exactly 1 item', () => {\n      expect(result).toHaveLength(1)\n    })\n\n    test('whose value is the ISBN of the book', () => {\n      expect(result[0].item.ISBN).toBe(2222)\n    })\n\n    test('and has a score that is not zero', () => {\n      expect(result[0].score).not.toBe(0)\n    })\n  })\n})\n\ndescribe('Recurse into arrays', () => {\n  const customBookList = [\n    {\n      ISBN: '0765348276',\n      title: \"Old Man's War\",\n      author: 'John Scalzi',\n      tags: ['fiction']\n    },\n    {\n      ISBN: '0312696957',\n      title: 'The Lock Artist',\n      author: 'Steve Hamilton',\n      tags: ['fiction']\n    },\n    {\n      ISBN: '0321784421',\n      title: 'HTML5',\n      author: 'Remy Sharp',\n      tags: ['web development', 'nonfiction']\n    }\n  ]\n  const customOptions = {\n    keys: ['tags'],\n    threshold: 0,\n    includeMatches: true\n  }\n  let fuse\n  beforeEach(() => (fuse = setup(customBookList, customOptions)))\n\n  describe('When searching for the tag \"nonfiction\"', () => {\n    let result\n    beforeEach(() => (result = fuse.search('nonfiction')))\n\n    test('we get a list containing exactly 1 item', () => {\n      expect(result).toHaveLength(1)\n    })\n\n    test('whose value is the ISBN of the book', () => {\n      expect(result[0].item.ISBN).toBe('0321784421')\n    })\n\n    test('with matched tag provided', () => {\n      const { matches } = result[0]\n      expect(matches[0]).toMatchObject({\n        indices: [[0, 9]],\n        value: 'nonfiction',\n        key: 'tags',\n        refIndex: 1\n      })\n    })\n  })\n})\n\ndescribe('Recurse into objects in arrays with null object in array', () => {\n  const customBookList = [\n    {\n      ISBN: '0765348276',\n      title: \"Old Man's War\",\n      author: {\n        name: 'John Scalzi',\n        tags: [\n          {\n            value: 'American'\n          },\n          null\n        ]\n      }\n    },\n    {\n      ISBN: '0312696957',\n      title: 'The Lock Artist',\n      author: {\n        name: 'Steve Hamilton',\n        tags: [\n          {\n            value: 'American'\n          }\n        ]\n      }\n    },\n    {\n      ISBN: '0321784421',\n      title: 'HTML5',\n      author: {\n        name: 'Remy Sharp',\n        tags: [\n          {\n            value: 'British'\n          },\n          null\n        ]\n      }\n    }\n  ]\n  const customOptions = {\n    keys: ['author.tags.value'],\n    threshold: 0\n  }\n  let fuse\n  beforeEach(() => (fuse = setup(customBookList, customOptions)))\n\n  describe('When searching for the author tag \"British\"', () => {\n    let result\n    beforeEach(() => (result = fuse.search('British')))\n\n    test('we get a list containing exactly 1 item', () => {\n      expect(result).toHaveLength(1)\n    })\n\n    test('whose value is the ISBN of the book', () => {\n      expect(result[0].item.ISBN).toBe('0321784421')\n    })\n  })\n})\n\ndescribe('Recurse into objects in arrays', () => {\n  const customBookList = [\n    {\n      ISBN: '0765348276',\n      title: \"Old Man's War\",\n      author: {\n        name: 'John Scalzi',\n        tags: [\n          {\n            value: 'American'\n          }\n        ]\n      }\n    },\n    {\n      ISBN: '0312696957',\n      title: 'The Lock Artist',\n      author: {\n        name: 'Steve Hamilton',\n        tags: [\n          {\n            value: 'American'\n          }\n        ]\n      }\n    },\n    {\n      ISBN: '0321784421',\n      title: 'HTML5',\n      author: {\n        name: 'Remy Sharp',\n        tags: [\n          {\n            value: 'British'\n          }\n        ]\n      }\n    }\n  ]\n  const customOptions = {\n    keys: ['author.tags.value'],\n    threshold: 0\n  }\n  let fuse\n  beforeEach(() => (fuse = setup(customBookList, customOptions)))\n\n  describe('When searching for the author tag \"British\"', () => {\n    let result\n    beforeEach(() => (result = fuse.search('British')))\n\n    test('we get a list containing exactly 1 item', () => {\n      expect(result).toHaveLength(1)\n    })\n\n    test('whose value is the ISBN of the book', () => {\n      expect(result[0].item.ISBN).toBe('0321784421')\n    })\n  })\n})\n\ndescribe('Set new list on Fuse', () => {\n  const vegetables = ['Onion', 'Lettuce', 'Broccoli']\n  let fuse\n  beforeEach(() => {\n    fuse = setup()\n    fuse.setCollection(vegetables)\n    return fuse\n  })\n\n  describe('When searching for the term \"Lettuce\"', () => {\n    let result\n    beforeEach(() => (result = fuse.search('Lettuce')))\n\n    test('we get a list of exactly 1 item', () => {\n      expect(result).toHaveLength(1)\n    })\n\n    test('whose value is the index 0, representing [\"Apple\"]', () => {\n      expect(result[0].refIndex).toBe(1)\n    })\n  })\n})\n\ndescribe('Weighted search', () => {\n  const customBookList = [\n    {\n      title: \"Old Man's War fiction\",\n      author: 'John X',\n      tags: ['war']\n    },\n    {\n      title: 'Right Ho Jeeves',\n      author: 'P.D. Mans',\n      tags: ['fiction', 'war']\n    },\n    {\n      title: 'The life of Jane',\n      author: 'John Smith',\n      tags: ['john', 'smith']\n    },\n    {\n      title: 'John Smith',\n      author: 'Steve Pearson',\n      tags: ['steve', 'pearson']\n    }\n  ]\n\n  test('Invalid key entries throw errors', () => {\n    expect(() => {\n      setup(customBookList, {\n        keys: [\n          { name: 'title', weight: -10 },\n          { name: 'author', weight: 0.7 }\n        ]\n      })\n    }).toThrowError(ErrorMsg.INVALID_KEY_WEIGHT_VALUE('title'))\n\n    expect(() => {\n      setup(customBookList, {\n        keys: [{ weight: 10 }, { name: 'author', weight: 0.7 }]\n      })\n    }).toThrowError(ErrorMsg.MISSING_KEY_PROPERTY('name'))\n  })\n\n  describe('When searching for the term \"John Smith\" with author weighted higher', () => {\n    const customOptions = {\n      keys: [\n        { name: 'title', weight: 0.3 },\n        { name: 'author', weight: 0.7 }\n      ]\n    }\n    let fuse\n    let result\n    beforeEach(() => {\n      fuse = setup(customBookList, customOptions)\n      return (result = fuse.search('John Smith'))\n    })\n\n    test('We get the the exactly matching object', () => {\n      expect(result[0]).toMatchObject({\n        item: {\n          title: 'The life of Jane',\n          author: 'John Smith',\n          tags: ['john', 'smith']\n        },\n        refIndex: 2\n      })\n    })\n  })\n\n  describe('When searching for the term \"John Smith\" with author weighted higher, with mixed key types', () => {\n    const customOptions = {\n      keys: ['title', { name: 'author', weight: 2 }]\n    }\n\n    let fuse\n    let result\n    beforeEach(() => {\n      fuse = setup(customBookList, customOptions)\n      return (result = fuse.search('John Smith'))\n    })\n\n    test('We get the the exactly matching object', () => {\n      expect(result[0]).toMatchObject({\n        item: {\n          title: 'The life of Jane',\n          author: 'John Smith',\n          tags: ['john', 'smith']\n        },\n        refIndex: 2\n      })\n    })\n\n    test('Throws when key does not have a name property', () => {\n      expect(() => {\n        new Fuse(customBookList, {\n          keys: ['title', { weight: 2 }]\n        })\n      }).toThrow()\n    })\n  })\n\n  describe('When searching for the term \"John Smith\" with title weighted higher', () => {\n    const customOptions = {\n      keys: [\n        { name: 'title', weight: 0.7 },\n        { name: 'author', weight: 0.3 }\n      ]\n    }\n    let fuse\n    let result\n    beforeEach(() => {\n      fuse = setup(customBookList, customOptions)\n      return (result = fuse.search('John Smith'))\n    })\n\n    test('We get the the exactly matching object', () => {\n      expect(result[0]).toMatchObject({\n        item: {\n          title: 'John Smith',\n          author: 'Steve Pearson',\n          tags: ['steve', 'pearson']\n        },\n        refIndex: 3\n      })\n    })\n  })\n\n  describe('When searching for the term \"Man\", where the author is weighted higher than title', () => {\n    const customOptions = {\n      keys: [\n        { name: 'title', weight: 0.3 },\n        { name: 'author', weight: 0.7 }\n      ]\n    }\n    let fuse\n    let result\n    beforeEach(() => {\n      fuse = setup(customBookList, customOptions)\n      return (result = fuse.search('Man'))\n    })\n\n    test('We get the the exactly matching object', () => {\n      expect(result[0]).toMatchObject({\n        item: {\n          title: 'Right Ho Jeeves',\n          author: 'P.D. Mans',\n          tags: ['fiction', 'war']\n        },\n        refIndex: 1\n      })\n    })\n  })\n\n  describe('When searching for the term \"Man\", where the title is weighted higher than author', () => {\n    const customOptions = {\n      keys: [\n        { name: 'title', weight: 0.7 },\n        { name: 'author', weight: 0.3 }\n      ]\n    }\n    let fuse\n    let result\n    beforeEach(() => {\n      fuse = setup(customBookList, customOptions)\n      return (result = fuse.search('Man'))\n    })\n\n    test('We get the the exactly matching object', () => {\n      expect(result[0]).toMatchObject({\n        item: {\n          title: \"Old Man's War fiction\",\n          author: 'John X',\n          tags: ['war']\n        },\n        refIndex: 0\n      })\n    })\n  })\n\n  describe('When searching for the term \"War\", where tags are weighted higher than all other keys', () => {\n    const customOptions = {\n      keys: [\n        { name: 'title', weight: 0.4 },\n        { name: 'author', weight: 0.1 },\n        { name: 'tags', weight: 0.5 }\n      ]\n    }\n    let fuse\n    let result\n    beforeEach(() => {\n      fuse = setup(customBookList, customOptions)\n      return (result = fuse.search('War'))\n    })\n\n    test('We get the exactly matching object', () => {\n      expect(result[0]).toMatchObject({\n        item: {\n          title: \"Old Man's War fiction\",\n          author: 'John X',\n          tags: ['war']\n        },\n        refIndex: 0\n      })\n    })\n  })\n})\n\ndescribe('Search location', () => {\n  const customList = [{ name: 'Hello World' }]\n  const customOptions = {\n    keys: ['name'],\n    includeScore: true,\n    includeMatches: true\n  }\n  let fuse\n\n  beforeEach(() => (fuse = setup(customList, customOptions)))\n\n  describe('When searching for the term \"wor\"', () => {\n    let result\n    let matches\n    beforeEach(() => {\n      result = fuse.search('wor')\n      return (matches = result[0].matches)\n    })\n\n    test('We get a list whose indices are found', () => {\n      expect(matches[0].indices[0]).toEqual([4, 4])\n      expect(matches[0].indices[1]).toEqual([6, 8])\n    })\n\n    test('with original text values', () => {\n      expect(matches[0].value).toBe('Hello World')\n    })\n  })\n})\n\ndescribe('Searching with default options', () => {\n  const customList = ['t te tes test tes te t']\n  let fuse\n\n  beforeEach(() => (fuse = new Fuse(customList, { includeMatches: true })))\n\n  describe('When searching for the term \"test\"', () => {\n    let result\n    beforeEach(() => (result = fuse.search('test')))\n\n    test('We get a match containing 4 indices', () => {\n      expect(result[0].matches[0].indices).toHaveLength(4)\n    })\n\n    test('and the first index is a single character', () => {\n      expect(result[0].matches[0].indices[0][0]).toBe(0)\n      expect(result[0].matches[0].indices[0][1]).toBe(0)\n    })\n  })\n})\n\ndescribe('Searching with findAllMatches', () => {\n  const customList = ['t te tes test tes te t']\n  let fuse\n\n  beforeEach(\n    () =>\n      (fuse = new Fuse(customList, {\n        includeMatches: true,\n        findAllMatches: true\n      }))\n  )\n\n  describe('When searching for the term \"test\"', () => {\n    let result\n    beforeEach(() => (result = fuse.search('test')))\n\n    test('We get a match containing 7 indices', () => {\n      expect(result[0].matches[0].indices).toHaveLength(7)\n    })\n\n    test('and the first index is a single character', () => {\n      expect(result[0].matches[0].indices[0][0]).toBe(0)\n      expect(result[0].matches[0].indices[0][1]).toBe(0)\n    })\n  })\n})\n\ndescribe('Searching with minCharLength', () => {\n  const customList = ['t te tes test tes te t']\n  let fuse\n\n  beforeEach(\n    () =>\n      (fuse = new Fuse(customList, {\n        includeMatches: true,\n        minMatchCharLength: 2\n      }))\n  )\n\n  describe('When searching for the term \"test\"', () => {\n    let result\n    beforeEach(() => (result = fuse.search('test')))\n\n    test('We get a match containing 3 indices', () => {\n      expect(result[0].matches[0].indices).toHaveLength(3)\n    })\n\n    test('and the first index is a single character', () => {\n      expect(result[0].matches[0].indices[0][0]).toBe(2)\n      expect(result[0].matches[0].indices[0][1]).toBe(3)\n    })\n  })\n\n  describe('When searching for a string shorter than minMatchCharLength', () => {\n    let result\n    beforeEach(() => (result = fuse.search('t')))\n\n    test('We get no results', () => {\n      expect(result).toHaveLength(0)\n    })\n  })\n\n  describe('Main functionality', () => {\n    const list = [\n      {\n        title: 'HTML5',\n        author: {\n          firstName: 'Remy',\n          lastName: 'Sharp'\n        }\n      },\n      {\n        title: 'Angels & Demons',\n        author: {\n          firstName: 'Dan',\n          lastName: 'Brown'\n        }\n      }\n    ]\n    const fuse = new Fuse(list, {\n      keys: ['title', 'author.firstName'],\n      includeMatches: true,\n      includeScore: true,\n      minMatchCharLength: 3\n    })\n\n    test('We get a result with no matches', () => {\n      const result = fuse.search('remy')\n\n      expect(result).toHaveLength(1)\n      expect(result[0].matches).toHaveLength(1)\n    })\n  })\n})\n\ndescribe('Searching with minCharLength and pattern larger than machine word size', () => {\n  const customList = [\n    'Apple pie is a tasty treat that is always best made by mom! But we love store bought too.',\n    'Banana splits are what you want from DQ on a hot day.  But a parfait is even better.',\n    'Orange sorbet is just a strange yet satisfying snack.  Chocolate seems to be more of a favourite though.'\n  ]\n\n  let fuse\n\n  beforeEach(\n    () =>\n      (fuse = new Fuse(customList, {\n        includeMatches: true,\n        findAllMatches: true,\n        includeScore: true,\n        minMatchCharLength: 20,\n        threshold: 0.6,\n        distance: 30\n      }))\n  )\n\n  describe('When searching for the term \"American as apple pie is odd treatment of something made by mom\"', () => {\n    let result\n\n    beforeEach(() => {\n      result = fuse.search(\n        'American as apple pie is odd treatment of something made by mom'\n      )\n    })\n\n    test('We get exactly 1 result', () => {\n      expect(result).toHaveLength(1)\n    })\n\n    test('Which corresponds to the first item in the list, with no matches', () => {\n      expect(result[0].refIndex).toBe(0)\n      expect(result[0].matches).toHaveLength(1)\n    })\n  })\n})\n\ndescribe('Sorted search results', () => {\n  const customList = [\n    {\n      title: 'Right Ho Jeeves',\n      author: { firstName: 'P.D', lastName: 'Woodhouse' }\n    },\n    {\n      title: 'The Code of the Wooster',\n      author: { firstName: 'P.D', lastName: 'Woodhouse' }\n    },\n    {\n      title: 'Thank You Jeeves',\n      author: { firstName: 'P.D', lastName: 'Woodhouse' }\n    }\n  ]\n  const customOptions = {\n    keys: ['title', 'author.firstName', 'author.lastName']\n  }\n  let fuse\n\n  beforeEach(() => (fuse = new Fuse(customList, customOptions)))\n\n  describe('When searching for the term \"wood\"', () => {\n    let result\n    beforeEach(() => (result = fuse.search('wood')))\n\n    test('We get the properly ordered results', () => {\n      expect(result[0].item.title).toBe('The Code of the Wooster')\n      expect(result[1].item.title).toBe('Right Ho Jeeves')\n      expect(result[2].item.title).toBe('Thank You Jeeves')\n    })\n  })\n})\n\ndescribe('Searching using string large strings', () => {\n  const list = [\n    {\n      text: 'pizza'\n    },\n    {\n      text: 'feast'\n    },\n    {\n      text: 'where in the world is carmen san diego'\n    }\n  ]\n\n  const options = {\n    shouldSort: true,\n    includeScore: true,\n    threshold: 0.6,\n    keys: ['text']\n  }\n\n  test('finds no matches when string is larger than 32 characters', () => {\n    const fuse = new Fuse(list, options)\n\n    let pattern = 'where exctly is carmen in the world san diego'\n    let result = fuse.search(pattern)\n    expect(result.length).toBe(1)\n    expect(result[0].item.text).toBe(list[2].text)\n  })\n\n  test('Test matches with very long patterns', () => {\n    let fuse = new Fuse(list, options)\n    let patterns = []\n\n    for (let i = 0; i < 66; ++i) {\n      patterns.push('w'.repeat(i))\n    }\n\n    const search = (pattern) => {\n      return fuse.search(pattern).length === 0\n    }\n\n    expect(search(patterns[32])).toBeTruthy()\n    expect(search(patterns[33])).toBeTruthy()\n    expect(search(patterns[34])).toBeTruthy()\n    expect(search(patterns[64])).toBeTruthy()\n    expect(search(patterns[65])).toBeTruthy()\n  })\n\n  it('With hyphens', () => {\n    const searchText = 'leverage-streams-to'\n    const fuseOptions = {\n      distance: 1000,\n      includeScore: true,\n      includeMatches: true,\n      keys: ['name', 'tag', 'description'],\n      minMatchCharLength: Math.floor(searchText.length * 0.6),\n      shouldSort: false\n    }\n    const fuse = new Fuse(\n      [\n        {\n          name: 'Streaming Service',\n          description: 'Leverage-streams-to-ingest, analyze, monitor.',\n          tag: 'Free'\n        }\n      ],\n      fuseOptions\n    )\n\n    const results = fuse.search(searchText)\n    expect(results[0].matches).toEqual([\n      {\n        indices: [[0, 18]],\n        key: 'description',\n        value: 'Leverage-streams-to-ingest, analyze, monitor.'\n      }\n    ])\n  })\n\n  it('With spaces', () => {\n    const searchText = 'leverage streams to'\n    const fuseOptions = {\n      distance: 1000,\n      includeScore: true,\n      includeMatches: true,\n      keys: ['name', 'tag', 'description'],\n      minMatchCharLength: Math.floor(searchText.length * 0.6),\n      shouldSort: false\n    }\n    const fuse = new Fuse(\n      [\n        {\n          name: 'Streaming Service',\n          description: 'Leverage streams to ingest, analyze, monitor.',\n          tag: 'Free'\n        }\n      ],\n      fuseOptions\n    )\n\n    const results = fuse.search(searchText)\n    expect(results[0].matches).toEqual([\n      {\n        indices: [[0, 18]],\n        key: 'description',\n        value: 'Leverage streams to ingest, analyze, monitor.'\n      }\n    ])\n  })\n})\n\ndescribe('Searching taking into account field length', () => {\n  const list = [\n    {\n      ISBN: '0312696957',\n      title: 'The Lock war Artist nonficon',\n      author: 'Steve Hamilton',\n      tags: ['fiction war hello no way']\n    },\n    {\n      ISBN: '0765348276',\n      title: \"Old Man's War\",\n      author: 'John Scalzi',\n      tags: ['fiction no']\n    }\n  ]\n\n  test('The entry with the shorter field length appears first', () => {\n    const fuse = new Fuse(list, {\n      keys: ['title']\n    })\n    let result = fuse.search('war')\n\n    expect(result.length).toBe(2)\n    expect(result[0].item.ISBN).toBe('0765348276')\n    expect(result[1].item.ISBN).toBe('0312696957')\n  })\n\n  test('Weighted entries still are given high precedence', () => {\n    const fuse = new Fuse(list, {\n      keys: [\n        { name: 'tags', weight: 0.8 },\n        { name: 'title', weight: 0.2 }\n      ]\n    })\n    let result = fuse.search('war')\n    expect(result.length).toBe(2)\n    expect(result[0].item.ISBN).toBe('0312696957')\n    expect(result[1].item.ISBN).toBe('0765348276')\n  })\n})\n\ndescribe('Ignore location and field length norm', () => {\n  const list = [\n    'beforeEach',\n    'async beforeEach test',\n    'assert.async in beforeEach',\n    'Module with Promise-aware beforeEach',\n    'Promise-aware return values without beforeEach/afterEach',\n    'Module with Promise-aware afterEach',\n    'before',\n    'before (skip)'\n  ]\n\n  test('Check order of entries when location and field-length norm are ignored', () => {\n    const options = {\n      includeScore: true,\n      ignoreLocation: true,\n      ignoreFieldNorm: true\n    }\n    const fuse = new Fuse(list, options)\n    let result = fuse.search('promiseawarebeforeEach')\n\n    expect(result).toMatchSnapshot()\n  })\n\n  test('Check order of entries when location and field-length norm are not ignored', () => {\n    const options = {\n      includeScore: true\n    }\n    const fuse = new Fuse(list, options)\n    let result = fuse.search('beforeEach')\n    expect(result).toMatchSnapshot()\n  })\n})\n\ndescribe('Standard dotted keys', () => {\n  test('We get mathes', () => {\n    const list = [\n      {\n        title: 'HTML5',\n        author: {\n          firstName: 'Remy',\n          lastName: 'Sharp'\n        }\n      },\n      {\n        title: 'Angels & Demons',\n        author: {\n          firstName: 'rmy',\n          lastName: 'Brown'\n        }\n      }\n    ]\n\n    const fuse = new Fuse(list, {\n      keys: ['title', ['author', 'firstName']],\n      includeMatches: true,\n      includeScore: true\n    })\n\n    const result = fuse.search('remy')\n\n    expect(result).toHaveLength(2)\n  })\n\n  test('We get a result with no matches', () => {\n    const list = [\n      {\n        title: 'HTML5',\n        author: {\n          'first.name': 'Remy',\n          'last.name': 'Sharp'\n        }\n      },\n      {\n        title: 'Angels & Demons',\n        author: {\n          'first.name': 'rmy',\n          'last.name': 'Brown'\n        }\n      }\n    ]\n\n    const fuse = new Fuse(list, {\n      keys: ['title', ['author', 'first.name']],\n      includeMatches: true,\n      includeScore: true\n    })\n\n    const result = fuse.search('remy')\n\n    expect(result).toHaveLength(2)\n  })\n\n  test('Keys with weights', () => {\n    const list = [\n      {\n        title: 'HTML5',\n        author: {\n          firstName: 'Remy',\n          lastName: 'Sharp'\n        }\n      },\n      {\n        title: 'Angels & Demons',\n        author: {\n          firstName: 'rmy',\n          lastName: 'Brown'\n        }\n      }\n    ]\n\n    const fuse = new Fuse(list, {\n      keys: [{ name: 'title' }, { name: ['author', 'firstName'] }],\n      includeMatches: true,\n      includeScore: true\n    })\n\n    const result = fuse.search('remy')\n\n    expect(result).toHaveLength(2)\n  })\n})\n\ndescribe('Breaking values', () => {\n  test('Booleans are still processed', () => {\n    const data = [{ first: false }]\n    const options = { keys: [{ name: 'first' }] }\n    const fuse = new Fuse(data, options)\n\n    const result = fuse.search('fa')\n    expect(result).toHaveLength(1)\n  })\n\n  test('Object values are ignored', () => {\n    const data = [{ a: 'hello' }, { a: {} }]\n    const options = { keys: ['a'] }\n    const fuse = new Fuse(data, options)\n\n    const result = fuse.search('hello')\n    expect(result).toHaveLength(1)\n  })\n})\n\ndescribe('Searching ignoring diactrictics', () => {\n  const list = [\n    {\n      text: 'déjà'\n    },\n    {\n      text: 'cafe'\n    }\n  ]\n\n  const options = {\n    ignoreDiacritics: true,\n    threshold: 0,\n    keys: ['text']\n  }\n  const fuse = new Fuse(list, options)\n\n  test('Search: query with diactrictics, list with diactrictics', () => {\n    let result = fuse.search('déjà')\n    expect(result).toHaveLength(1)\n    expect(result[0].refIndex).toBe(0)\n  })\n\n  test('Search: query without diactrictics, list with diactrictics', () => {\n    let result = fuse.search('deja')\n    expect(result).toHaveLength(1)\n    expect(result[0].refIndex).toBe(0)\n  })\n\n  test('Search: query with diactrictics, list without diactrictics', () => {\n    let result = fuse.search('café')\n    expect(result).toHaveLength(1)\n    expect(result[0].refIndex).toBe(1)\n  })\n\n  test('Search: query without diactrictics, list without diactrictics', () => {\n    let result = fuse.search('cafe')\n    expect(result).toHaveLength(1)\n    expect(result[0].refIndex).toBe(1)\n  })\n})\n"
  },
  {
    "path": "test/indexing.test.js",
    "content": "import Fuse from '../dist/fuse.mjs'\nimport Books from './fixtures/books.json' assert { type: 'json' }\n\nconst idx = (result) => result.map((obj) => obj.refIndex)\nconst idxMap = (fuse) => fuse.getIndex().records.map((item) => [item.v, item.i])\n\ndescribe('Searching', () => {\n  const options = {\n    useExtendedSearch: true,\n    includeMatches: true,\n    includeScore: true,\n    threshold: 0.3,\n    keys: ['title', 'author.firstName', 'author.lastName']\n  }\n\n  test('createIndex: ensure properties exist', () => {\n    let myIndex = Fuse.createIndex(options.keys, Books)\n\n    expect(myIndex.records).toBeDefined()\n    expect(myIndex.keys).toBeDefined()\n  })\n\n  test('createIndex: ensure keys can be created with objects', () => {\n    let myIndex = Fuse.createIndex(\n      [{ name: 'title' }, { name: 'author.firstName' }],\n      Books\n    )\n    expect(myIndex.records).toBeDefined()\n    expect(myIndex.keys).toBeDefined()\n  })\n\n  test('createIndex: ensure keys can be created with getFn', () => {\n    let myIndex = Fuse.createIndex(\n      [\n        { name: 'title', getFn: (book) => book.title },\n        { name: 'author.firstName', getFn: (book) => book.author.firstName }\n      ],\n      Books\n    )\n    expect(myIndex.records).toBeDefined()\n    expect(myIndex.keys).toBeDefined()\n  })\n\n  test('parseIndex: ensure index can be exported and Fuse can be initialized', () => {\n    const myIndex = Fuse.createIndex(options.keys, Books)\n    expect(myIndex.size()).toBe(Books.length)\n\n    const data = myIndex.toJSON()\n    expect(data.records).toBeDefined()\n    expect(data.keys).toBeDefined()\n\n    const parsedIndex = Fuse.parseIndex(data)\n    expect(parsedIndex.size()).toBe(Books.length)\n\n    const fuse = new Fuse(Books, options, parsedIndex)\n    const result = fuse.search({ title: 'old man' })\n    expect(result.length).toBe(1)\n    expect(idx(result)).toMatchObject([0])\n  })\n\n  test('parseIndex: search with getFn', () => {\n    const fuse = new Fuse(Books, {\n      useExtendedSearch: true,\n      includeMatches: true,\n      includeScore: true,\n      threshold: 0.3,\n      keys: [\n        { name: 'bookTitle', getFn: (book) => book.title },\n        { name: 'authorName', getFn: (book) => book.author.firstName }\n      ]\n    })\n    const result = fuse.search({ bookTitle: 'old man' })\n    expect(result.length).toBe(1)\n    expect(idx(result)).toMatchObject([0])\n  })\n\n  test('Fuse can be instantiated with an index', () => {\n    let myIndex = Fuse.createIndex(options.keys, Books)\n    const fuse = new Fuse(Books, options, myIndex)\n\n    let result = fuse.search({ title: 'old man' })\n\n    expect(result.length).toBe(1)\n    expect(idx(result)).toMatchObject([0])\n    expect(result[0].matches[0].indices).toMatchObject([\n      [0, 2],\n      [4, 6]\n    ])\n  })\n\n  test('Throws on invalid index format', () => {\n    expect(() => {\n      new Fuse(Books, options, [])\n    }).toThrow()\n  })\n\n  test('Add object to Index', () => {\n    const fuse = new Fuse(Books, options)\n\n    fuse.add({\n      title: 'book',\n      author: {\n        firstName: 'Kiro',\n        lastName: 'Risk'\n      }\n    })\n\n    let result = fuse.search('kiro')\n\n    expect(result.length).toBe(1)\n    expect(idx(result)).toMatchObject([Books.length - 1])\n  })\n\n  test('Add string to Index', () => {\n    const fruits = ['apple', 'orange']\n    const fuse = new Fuse(fruits, { includeScore: true })\n\n    fuse.add('banana')\n\n    let result = fuse.search('banana')\n\n    expect(result.length).toBe(1)\n    expect(idx(result)).toMatchObject([2])\n  })\n\n  test('Remove string from the Index', () => {\n    const fruits = ['apple', 'orange', 'banana', 'pear']\n    const fuse = new Fuse(fruits)\n\n    expect(fuse.getIndex().size()).toBe(4)\n    expect(idxMap(fuse)).toMatchObject([\n      ['apple', 0],\n      ['orange', 1],\n      ['banana', 2],\n      ['pear', 3]\n    ])\n\n    fuse.removeAt(1)\n\n    expect(fuse.getIndex().size()).toBe(3)\n    expect(idxMap(fuse)).toMatchObject([\n      ['apple', 0],\n      ['banana', 1],\n      ['pear', 2]\n    ])\n\n    const results = fuse.remove((doc) => {\n      return doc === 'banana' || doc === 'pear'\n    })\n\n    expect(results.length).toBe(2)\n    expect(fuse.getIndex().size()).toBe(1)\n    expect(fuse._docs.length).toBe(1)\n  })\n})\n"
  },
  {
    "path": "test/logical-search.test.js",
    "content": "import Fuse from '../dist/fuse.mjs'\nimport Books from './fixtures/books.json' assert { type: 'json' }\n\nconst idx = (result) => result.map((obj) => obj.refIndex)\n\ndescribe('Logical parser', () => {\n  const options = {\n    useExtendedSearch: true,\n    includeMatches: true,\n    includeScore: true,\n    keys: ['title', 'author.firstName', 'author.lastName']\n  }\n\n  test('Tree structure', () => {\n    const query = {\n      $and: [\n        { title: 'old war' },\n        {\n          $or: [{ title: '!arts' }, { title: '^lock' }]\n        }\n      ]\n    }\n    let root = Fuse.parseQuery(query, options, { auto: false })\n\n    expect(root).toMatchSnapshot()\n  })\n\n  test('Implicit operations', () => {\n    const query = {\n      $and: [\n        { title: 'old war' },\n        {\n          $or: [{ title: '!arts', tags: 'kiro' }, { title: '^lock' }]\n        }\n      ]\n    }\n    let root = Fuse.parseQuery(query, options, { auto: false })\n\n    expect(root).toMatchSnapshot()\n  })\n})\n\ndescribe('Searching using logical search', () => {\n  const options = {\n    useExtendedSearch: true,\n    includeMatches: true,\n    includeScore: true,\n    keys: ['title', 'author.firstName', 'author.lastName']\n  }\n  const fuse = new Fuse(Books, options)\n\n  test('Search: implicit AND', () => {\n    let result = fuse.search({ title: 'old man' })\n    expect(result.length).toBe(1)\n    expect(result[0].refIndex).toBe(0)\n    expect(result[0].matches[0].indices).toMatchObject([\n      [0, 2],\n      [4, 6]\n    ])\n  })\n\n  test('Search: AND with single item', () => {\n    let result = fuse.search({ $and: [{ title: 'old man' }] })\n    expect(result.length).toBe(1)\n    expect(idx(result)).toMatchObject([0])\n    expect(result[0].matches[0].indices).toMatchObject([\n      [0, 2],\n      [4, 6]\n    ])\n  })\n\n  test('Search: AND with multiple entries', () => {\n    let result = fuse.search({\n      $and: [{ 'author.lastName': 'Woodhose' }, { title: 'the' }]\n    })\n    expect(result.length).toBe(2)\n    expect(idx(result)).toMatchObject([4, 5])\n  })\n\n  test('Search: AND with multiple entries + exact match', () => {\n    let result = fuse.search({\n      $and: [{ 'author.lastName': 'Woodhose' }, { title: \"'The\" }]\n    })\n    expect(result.length).toBe(1)\n    expect(idx(result)).toMatchObject([4])\n  })\n\n  test('Search: OR with multiple entries', () => {\n    let result = fuse.search({\n      $or: [{ title: 'angls' }, { title: 'incmpetnce' }]\n    })\n    expect(result.length).toBe(3)\n    expect(idx(result)).toMatchObject([14, 7, 0])\n  })\n\n  test('Search: OR with multiple entries', () => {\n    let result = fuse.search({\n      $or: [\n        { title: 'angls' },\n        { $and: [{ title: '!dwarf' }, { title: 'bakwrds' }] }\n      ]\n    })\n    expect(result.length).toBe(2)\n    expect(idx(result)).toMatchObject([7, 0])\n  })\n})\n\ndescribe('Multiple nested conditions', () => {\n  const list1 = [\n    {\n      title: \"Old Man's War\",\n      author: {\n        firstName: 'John',\n        lastName: 'Scalzi',\n        age: '61'\n      }\n    }\n  ]\n\n  const list2 = [\n    ...list1,\n    {\n      title: \"Old Man's War\",\n      author: {\n        firstName: 'John',\n        lastName: 'Scalzi',\n        age: '62'\n      }\n    }\n  ]\n\n  const options = {\n    includeScore: true,\n    useExtendedSearch: true,\n    keys: ['title', 'author.firstName', 'author.lastName', 'author.age']\n  }\n\n  const fuse1 = new Fuse(list1, options)\n  const fuse2 = new Fuse(list2, options)\n\n  test('Search: nested AND + OR', () => {\n    const result = fuse1.search({\n      $and: [\n        { title: 'old' },\n        {\n          $or: [{ 'author.firstName': 'j' }, { 'author.lastName': 'Sa' }]\n        },\n        {\n          $or: [{ 'author.age': \"'62\" }]\n        }\n      ]\n    })\n\n    expect(result.length).toBe(0)\n  })\n\n  test('Search: deep nested AND + OR', () => {\n    const result = fuse1.search({\n      $and: [\n        { title: 'old' },\n        {\n          $or: [{ 'author.firstName': 'jon' }, { 'author.lastName': 'Sazi' }]\n        },\n        {\n          $or: [\n            { 'author.age': \"'62\" },\n            { $and: [{ title: 'old' }, { 'author.age': \"'61\" }] }\n          ]\n        }\n      ]\n    })\n\n    expect(result.length).toBe(1)\n    expect(result[0]).toHaveProperty('score')\n    expect(result[0].score).toBeGreaterThan(0)\n  })\n\n  test('Search: deep nested AND + OR', () => {\n    const result = fuse2.search({\n      $and: [\n        { title: 'old' },\n        {\n          $and: [{ 'author.firstName': 'jon' }, { 'author.lastName': 'Sazi' }]\n        },\n        {\n          $or: [\n            { 'author.age': \"'62\" },\n            { $and: [{ title: 'old' }, { 'author.age': \"'62\" }] }\n          ]\n        }\n      ]\n    })\n\n    expect(result.length).toBe(1)\n    expect(result[0]).toHaveProperty('score')\n    expect(result[0].score).toBeGreaterThan(0)\n  })\n})\n\ndescribe('Logical search with dotted keys', () => {\n  const list = [\n    {\n      title: \"Old Man's War\",\n      author: {\n        'first.name': 'John',\n        'last.name': 'Scalzi',\n        age: '61'\n      }\n    }\n  ]\n\n  const options = {\n    useExtendedSearch: true,\n    includeScore: true,\n    keys: [\n      'title',\n      ['author', 'first.name'],\n      ['author', 'last.name'],\n      'author.age'\n    ]\n  }\n  const fuse = new Fuse(list, options)\n\n  test('Search: deep nested AND + OR', () => {\n    const query = {\n      $and: [\n        {\n          $path: ['author', 'first.name'],\n          $val: 'jon'\n        },\n        {\n          $path: ['author', 'last.name'],\n          $val: 'scazi'\n        }\n      ]\n    }\n\n    const result = fuse.search(query)\n\n    expect(result.length).toBe(1)\n  })\n})\n\ndescribe('Searching using logical OR with same query across fields', () => {\n  const options = { keys: ['title', 'author.lastName'] }\n  const fuse = new Fuse(Books, options)\n  let result\n  beforeEach(() => {\n    const query = {\n      $or: [{ title: 'wood' }, { 'author.lastName': 'wood' }]\n    }\n\n    result = fuse.search(query)\n  })\n\n  describe('When searching for the term \"wood\"', () => {\n    test('we get the top three results scored based matches from all their fields', () => {\n      expect(idx(result.slice(0, 3))).toMatchObject([4, 3, 5])\n    })\n  })\n})\n"
  },
  {
    "path": "test/scoring.test.js",
    "content": "import Fuse from '../dist/fuse.mjs'\n\nconst defaultList = ['Stove', 'My good friend Steve from college']\nconst defaultOptions = {}\n\nconst setup = (itemList, overwriteOptions) => {\n  const list = itemList || defaultList\n  const options = { ...defaultOptions, ...overwriteOptions }\n\n  return new Fuse(list, options)\n}\n\ndescribe('Flat list of strings: [\"Stove\", \"My good friend Steve from college\"]', () => {\n  describe('When performing a fuzzy search for the term \"Steve\" with ignoreFieldNorm off', () => {\n    let result, fuse\n    beforeEach(() => {\n      fuse = setup()\n      result = fuse.search('Steve')\n    })\n\n    test('we get a list of containing 2 items', () => {\n      expect(result).toHaveLength(2)\n    })\n\n    test('whose values represent the indices of [\"Stove\", \"My good friend Steve from college\"]', () => {\n      expect(result[0].refIndex).toBe(0)\n      expect(result[1].refIndex).toBe(1)\n    })\n  })\n\n  describe('When performing a fuzzy search for the term \"Steve\" with ignoreFieldNorm on', () => {\n    let result, fuse\n    beforeEach(() => {\n      fuse = setup(null, { ignoreFieldNorm: true })\n      result = fuse.search('Steve')\n    })\n\n    test('we get a list of containing 2 items', () => {\n      expect(result).toHaveLength(2)\n    })\n\n    test('whose values represent the indices of [\"My good friend Steve from college\", \"Stove\"]', () => {\n      expect(result[0].refIndex).toBe(1)\n      expect(result[1].refIndex).toBe(0)\n    })\n  })\n\n  describe('When performing a fuzzy search for the term \"Steve\" with ignoreFieldNorm off and fieldNormWeight decreased', () => {\n    let result, fuse\n    beforeEach(() => {\n      fuse = setup(null, { fieldNormWeight: 0.15 })\n      result = fuse.search('Steve')\n    })\n\n    test('we get a list of containing 2 items', () => {\n      expect(result).toHaveLength(2)\n    })\n\n    test('whose values represent the indices of [\"My good friend Steve from college\", \"Stove\"]', () => {\n      expect(result[0].refIndex).toBe(1)\n      expect(result[1].refIndex).toBe(0)\n    })\n  })\n})\n"
  },
  {
    "path": "test/tsconfig.json",
    "content": "{\n  \"extends\": \"../tsconfig.base.json\",\n  \"compilerOptions\": {\n    \"types\": [\"vitest/globals\"]\n  },\n  \"include\": [\".\"]\n}\n"
  },
  {
    "path": "test/typings.test.ts",
    "content": "import Fuse, { FuseResult, IFuseOptions } from '../'\nimport { BattlePokedex } from './fixtures/pokedex'\nimport { PokedexType } from './fixtures/types'\n\nconst idx = (result: FuseResult<Author>[]) => result.map((obj) => obj.refIndex)\n\nconst defaultOptions: IFuseOptions<PokedexType> = {\n  keys: ['alias', 'species', 'name', 'num'],\n  threshold: 0.2\n}\n\ndescribe('Search with typings', () => {\n  test('When searching by number', () => {\n    let pokeFuse = new Fuse(BattlePokedex, defaultOptions)\n\n    const pokemon = '2'\n    const firstSearch = pokeFuse.search(pokemon)\n\n    const poke: PokedexType = firstSearch[0].item\n\n    // let x = Fuse.createIndex<PokedexType>(\n    //   ['alias', 'species', 'name', 'num'],\n    //   BattlePokedex,\n    // )\n\n    const expected = {\n      num: 2,\n      species: 'Ivysaur',\n      types: ['Grass', 'Poison'],\n      genderRatio: { M: 0.875, F: 0.125 },\n      baseStats: { hp: 60, atk: 62, def: 63, spa: 80, spd: 80, spe: 60 },\n      abilities: { 0: 'Overgrow', H: 'Chlorophyll' },\n      heightm: 1,\n      weightkg: 13,\n      color: 'Green',\n      prevo: 'bulbasaur',\n      evos: ['venusaur'],\n      evoLevel: 16,\n      eggGroups: ['Monster', 'Grass']\n    }\n\n    expect(poke.species).toBe('Ivysaur')\n    expect(poke).toMatchObject(expected)\n  })\n})\n\ndescribe('Search results with indices', () => {\n  test('When searching by number', () => {\n    interface Board {\n      readonly name: string\n    }\n    const list: Array<Board> = [\n      {\n        name: 'Arduino Duemilanove or Diecimila'\n      }\n    ]\n    const options: IFuseOptions<Board> = {\n      includeMatches: true,\n      minMatchCharLength: 1,\n      keys: ['name']\n    }\n\n    const fuse = new Fuse(list, options)\n    const results = fuse.search(`ar due di`)\n\n    expect(results.length).toBe(1)\n\n    const matches = results[0].matches\n\n    expect(matches?.length).toBe(1)\n    expect(matches?.[0].indices.length).toBe(9)\n    expect(matches?.[0].indices[0]).toMatchObject([0, 4])\n  })\n})\n\ndescribe('Logical search results', () => {\n  const list: Array<Author> = [\n    {\n      title: 'The Code of the Wooster',\n      name: 'Woodhouse'\n    }\n  ]\n\n  const options: IFuseOptions<Author> = {\n    useExtendedSearch: true,\n    includeMatches: true,\n    includeScore: true,\n    keys: ['name', 'title']\n  }\n\n  const fuse = new Fuse(list, options)\n\n  test('Search: AND with multiple entries + exact match', () => {\n    let result = fuse.search({\n      $and: [{ name: 'Woodhose' }, { title: \"'The\" }]\n    })\n    expect(result.length).toBe(1)\n    expect(idx(result)).toMatchObject([0])\n  })\n})\n\ninterface Author {\n  readonly name: string\n  readonly title: string\n}\n"
  },
  {
    "path": "tsconfig.base.json",
    "content": "{\n  \"compilerOptions\": {\n    \"module\": \"es6\",\n    \"lib\": [\"es6\"],\n    \"target\": \"es6\",\n    \"moduleResolution\": \"node\",\n    \"resolveJsonModule\": true,\n    \"esModuleInterop\": true,\n    \"strict\": true,\n    \"declaration\": true,\n    \"noImplicitAny\": true\n  }\n}\n"
  },
  {
    "path": "vitest.config.ts",
    "content": "import { defineConfig } from 'vitest/config'\n\nexport default defineConfig({\n  test: {\n    globals: true\n  },\n  esbuild: {\n    target: 'es2015'\n  }\n})\n"
  }
]