[
  {
    "path": ".all-contributorsrc",
    "content": "{\n  \"projectName\": \"react-redux-typescript-guide\",\n  \"projectOwner\": \"piotrwitek\",\n  \"repoType\": \"github\",\n  \"repoHost\": \"https://github.com\",\n  \"files\": [\n    \"./CONTRIBUTORS.md\"\n  ],\n  \"imageSize\": 100,\n  \"commit\": false,\n  \"contributors\": [\n    {\n      \"login\": \"piotrwitek\",\n      \"name\": \"Piotrek Witek\",\n      \"avatar_url\": \"https://avatars0.githubusercontent.com/u/739075?v=4\",\n      \"profile\": \"https://github.com/piotrwitek\",\n      \"contributions\": [\n        \"code\",\n        \"doc\",\n        \"ideas\",\n        \"review\",\n        \"question\"\n      ]\n    },\n    {\n      \"login\": \"kazup01\",\n      \"name\": \"Kazz Yokomizo\",\n      \"avatar_url\": \"https://avatars3.githubusercontent.com/u/8602615?v=4\",\n      \"profile\": \"https://github.com/kazup01\",\n      \"contributions\": [\n        \"financial\",\n        \"fundingFinding\"\n      ]\n    },\n    {\n      \"login\": \"jakeboone02\",\n      \"name\": \"Jake Boone\",\n      \"avatar_url\": \"https://avatars1.githubusercontent.com/u/366438?v=4\",\n      \"profile\": \"https://github.com/jakeboone02\",\n      \"contributions\": [\n        \"doc\"\n      ]\n    },\n    {\n      \"login\": \"amitdahan\",\n      \"name\": \"Amit Dahan\",\n      \"avatar_url\": \"https://avatars1.githubusercontent.com/u/9748762?v=4\",\n      \"profile\": \"https://github.com/amitdahan\",\n      \"contributions\": [\n        \"doc\"\n      ]\n    },\n    {\n      \"login\": \"gulderov\",\n      \"name\": \"gulderov\",\n      \"avatar_url\": \"https://avatars1.githubusercontent.com/u/98167?v=4\",\n      \"profile\": \"https://github.com/gulderov\",\n      \"contributions\": [\n        \"doc\"\n      ]\n    },\n    {\n      \"login\": \"emp823\",\n      \"name\": \"Erik Pearson\",\n      \"avatar_url\": \"https://avatars1.githubusercontent.com/u/1964212?v=4\",\n      \"profile\": \"https://github.com/emp823\",\n      \"contributions\": [\n        \"doc\"\n      ]\n    },\n    {\n      \"login\": \"flymason\",\n      \"name\": \"Bryan Mason\",\n      \"avatar_url\": \"https://avatars1.githubusercontent.com/u/5342677?v=4\",\n      \"profile\": \"https://github.com/flymason\",\n      \"contributions\": [\n        \"doc\"\n      ]\n    },\n    {\n      \"login\": \"chodorowicz\",\n      \"name\": \"Jakub Chodorowicz\",\n      \"avatar_url\": \"https://avatars1.githubusercontent.com/u/119451?v=4\",\n      \"profile\": \"http://www.jakub.chodorowicz.pl/\",\n      \"contributions\": [\n        \"code\"\n      ]\n    },\n    {\n      \"login\": \"mleg\",\n      \"name\": \"Oleg Maslov\",\n      \"avatar_url\": \"https://avatars1.githubusercontent.com/u/7266431?v=4\",\n      \"profile\": \"https://github.com/mleg\",\n      \"contributions\": [\n        \"bug\"\n      ]\n    },\n    {\n      \"login\": \"awestbro\",\n      \"name\": \"Aaron Westbrook\",\n      \"avatar_url\": \"https://avatars0.githubusercontent.com/u/3393293?v=4\",\n      \"profile\": \"https://github.com/awestbro\",\n      \"contributions\": [\n        \"bug\"\n      ]\n    },\n    {\n      \"login\": \"peterblazejewicz\",\n      \"name\": \"Peter Blazejewicz\",\n      \"avatar_url\": \"https://avatars3.githubusercontent.com/u/14539?v=4\",\n      \"profile\": \"http://www.linkedin.com/in/peterblazejewicz\",\n      \"contributions\": [\n        \"doc\"\n      ]\n    },\n    {\n      \"login\": \"rubysolo\",\n      \"name\": \"Solomon White\",\n      \"avatar_url\": \"https://avatars3.githubusercontent.com/u/1642?v=4\",\n      \"profile\": \"https://github.com/rubysolo\",\n      \"contributions\": [\n        \"doc\"\n      ]\n    },\n    {\n      \"login\": \"pino\",\n      \"name\": \"Levi Rocha\",\n      \"avatar_url\": \"https://avatars2.githubusercontent.com/u/8838006?v=4\",\n      \"profile\": \"https://github.com/pino\",\n      \"contributions\": [\n        \"doc\"\n      ]\n    },\n    {\n      \"login\": \"loadbalance-sudachi-kun\",\n      \"name\": \"Sudachi-kun\",\n      \"avatar_url\": \"https://avatars1.githubusercontent.com/u/41281835?v=4\",\n      \"profile\": \"http://cloudnative.co.jp\",\n      \"contributions\": [\n        \"financial\"\n      ]\n    },\n    {\n      \"login\": \"sosukesuzuki\",\n      \"name\": \"Sosuke Suzuki\",\n      \"avatar_url\": \"https://avatars1.githubusercontent.com/u/14838850?v=4\",\n      \"profile\": \"http://sosukesuzuki.github.io\",\n      \"contributions\": [\n        \"code\"\n      ]\n    },\n    {\n      \"login\": \"chillitom\",\n      \"name\": \"Tom Rathbone\",\n      \"avatar_url\": \"https://avatars0.githubusercontent.com/u/74433?v=4\",\n      \"profile\": \"https://github.com/chillitom\",\n      \"contributions\": [\n        \"doc\"\n      ]\n    },\n    {\n      \"login\": \"arshadkazmi42\",\n      \"name\": \"Arshad Kazmi\",\n      \"avatar_url\": \"https://avatars3.githubusercontent.com/u/4654382?v=4\",\n      \"profile\": \"https://arshadkazmi42.github.io/\",\n      \"contributions\": [\n        \"doc\"\n      ]\n    },\n    {\n      \"login\": \"JeongUkJae\",\n      \"name\": \"JeongUkJae\",\n      \"avatar_url\": \"https://avatars1.githubusercontent.com/u/8815362?v=4\",\n      \"profile\": \"https://jeongukjae.github.io\",\n      \"contributions\": [\n        \"doc\"\n      ]\n    }\n  ]\n}\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\ngithub: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]\npatreon: piotrekwitek # Replace with a single Patreon username\nopen_collective: # Replace with a single Open Collective username\nko_fi: # Replace with a single Ko-fi username\ntidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel\ncommunity_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry\nliberapay: # Replace with a single Liberapay username\nissuehunt: piotrwitek # Replace with a single IssueHunt username\notechie: # Replace with a single Otechie username\ncustom: [\"https://www.buymeacoffee.com/piotrekwitek\"] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug report\nabout: Create a report to help us improve\n---\n\n## Description\n<!-- A clear description of what the bug is -->\n\n## Steps to Reproduce\n<!--\nSteps to reproduce the behavior:\n1. Go to '...'\n2. Click on '....'\n3. Scroll down to '....'\n4. See error\n-->\n\n## Expected behavior\n<!-- A clear description of what you expected to happen -->\n\n## Suggested solution(s)\n<!-- How could we solve this bug. What changes would need to be made -->\n\n## Project Dependencies\n- TypeScript Version: X.X.X\n- tsconfig.json:\n<!-- Paste contents of your tsconfig.json here -->\n\n## Environment (optional)\n<!-- Fill if you think it's relevant to your issue -->\n- Browser and Version: XXX\n- OS: XXX\n- Node Version: XXX\n- Package Manager and Version: XXX\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/custom.md",
    "content": "---\nname: Question\nabout: Have a question? Please check our spectrum community chat.\n---\n\nFirst of all please check our spectrum community chat and we recommend to ask your question there for a quickest response and the indexing in search engines: \n- https://spectrum.chat/react-redux-ts\n\nThe only good reason to use issue tracker for your questions would be for \"special requests\" that doesn't fit into bug reports and feature requests categories.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "content": "---\nname: Feature request\nabout: Suggest an idea for this project\n---\n\n## Is your feature request related to a real problem or use-case?\n<!-- A clear description of your problem or use-case-->\n\n## Describe a solution including usage in code example\n<!-- A clear description of the solution including usage with complete code examples, nicely formatted with \"```ts\" tags (especially if that's a new api proposal) -->\n\n## Who does this impact? Who is this for?\n<!-- Who is this for? All users? TypeScript users? Yourself? People using X, Y, Z, etc.? -->\n\n## Describe alternatives you've considered (optional)\n<!-- A clear and concise description of any alternative solutions or workaround you've considered  -->\n\n## Additional context (optional)\n<!-- Add any other stuff you need, like links or related issues -->\n"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "content": "<!-- Thank you for your contribution! :thumbsup: -->\n<!-- Please makes sure that these checkboxes are checked before submitting your PR, thank you! -->\n\n## Description\n<!-- Example: Added error property support to `action` API -->\n\n## Related issues:\n- Resolved #XXX\n\n## Checklist\n\n* [ ] I have read [CONTRIBUTING.md](https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/CONTRIBUTING.md)\n* [ ] I have edited `README_SOURCE.md` (NOT `README.md`)\n* [ ] I have run CI script locally `npm run ci-check` to generate an updated `README.md`\n* [ ] I have linked all related issues above\n* [ ] I have rebased my branch\n\n"
  },
  {
    "path": ".gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (http://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules\njspm_packages\n\n# Optional npm cache directory\n.npm\n\n# Optional REPL history\n.node_repl_history\n\ntemp/\nplayground/dist\nplayground/storybook-static\n"
  },
  {
    "path": ".vscode/launch.json",
    "content": "{\n  // Use IntelliSense to learn about possible attributes.\n  // Hover to view descriptions of existing attributes.\n  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"type\": \"pwa-chrome\",\n      \"request\": \"launch\",\n      \"name\": \"Launch Chrome against localhost\",\n      \"url\": \"http://localhost:3080\",\n      \"webRoot\": \"${workspaceFolder}/playground/src\",\n      \"sourceMapPathOverrides\": {\n        \"webpack:///src/*\": \"${webRoot}/*\"\n      }\n    }\n  ]\n}\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to making participation in our project and\nour community a harassment-free experience for everyone, regardless of age, body\nsize, disability, ethnicity, sex characteristics, gender identity and expression,\nlevel of experience, education, socio-economic status, nationality, personal\nappearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment\ninclude:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or\n advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic\n address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable\nbehavior and are expected to take appropriate and fair corrective action in\nresponse to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or\nreject comments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct, or to ban temporarily or\npermanently any contributor for other behaviors that they deem inappropriate,\nthreatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces\nwhen an individual is representing the project or its community. Examples of\nrepresenting a project or community include using an official project e-mail\naddress, posting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event. Representation of a project may be\nfurther defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported by contacting the project team at piotrek.witek@gmail.com. All\ncomplaints will be reviewed and investigated and will result in a response that\nis deemed necessary and appropriate to the circumstances. The project team is\nobligated to maintain confidentiality with regard to the reporter of an incident.\nFurther details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good\nfaith may face temporary or permanent repercussions as determined by other\nmembers of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,\navailable at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html\n\n[homepage]: https://www.contributor-covenant.org\n\nFor answers to common questions about this code of conduct, see\nhttps://www.contributor-covenant.org/faq\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing Guide\n\n## General\n1. Make sure you have read and understand the **Goals** section to be aligned with project goals.\n2. Before submitting a PR please comment in the relevant issue (or create a new one if it doesn't exist yet) to discuss all the requirements (this will prevent rejecting the PR and wasting your work).\n3. All workflow scripts (prettier, linter, tests) must pass successfully (it is run automatically on CI and will fail on github checks).\n\n## Edit `README_SOURCE.md` to generate an updated `README.md`\nDon't edit `README.md` directly - it is generated automatically from `README_SOURCE.md` using an automated script.\n   - Use `sh ./generate-readme.sh` script to generate updated `README.md` (this will inject code examples using type-checked source files from the `/playground` folder)\n   - So to make changes in code examples edit source files in `/playground` folder\n\n**Source code inject directives:**\n```\n# Inject code block with highlighter\n::codeblock='playground/src/components/fc-counter.tsx'::\n\n# Inject code block with highlighter and expander\n::expander='playground/src/components/fc-counter.usage.tsx'::\n```\n"
  },
  {
    "path": "CONTRIBUTORS.md",
    "content": "Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore -->\n| [<img src=\"https://avatars0.githubusercontent.com/u/739075?v=4\" width=\"100px;\"/><br /><sub><b>Piotrek Witek</b></sub>](https://github.com/piotrwitek)<br />[💻](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=piotrwitek \"Code\") [📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=piotrwitek \"Documentation\") [🤔](#ideas-piotrwitek \"Ideas, Planning, & Feedback\") [👀](#review-piotrwitek \"Reviewed Pull Requests\") [💬](#question-piotrwitek \"Answering Questions\") | [<img src=\"https://avatars3.githubusercontent.com/u/8602615?v=4\" width=\"100px;\"/><br /><sub><b>Kazz Yokomizo</b></sub>](https://github.com/kazup01)<br />[💵](#financial-kazup01 \"Financial\") [🔍](#fundingFinding-kazup01 \"Funding Finding\") | [<img src=\"https://avatars1.githubusercontent.com/u/366438?v=4\" width=\"100px;\"/><br /><sub><b>Jake Boone</b></sub>](https://github.com/jakeboone02)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=jakeboone02 \"Documentation\") | [<img src=\"https://avatars1.githubusercontent.com/u/9748762?v=4\" width=\"100px;\"/><br /><sub><b>Amit Dahan</b></sub>](https://github.com/amitdahan)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=amitdahan \"Documentation\") | [<img src=\"https://avatars1.githubusercontent.com/u/98167?v=4\" width=\"100px;\"/><br /><sub><b>gulderov</b></sub>](https://github.com/gulderov)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=gulderov \"Documentation\") | [<img src=\"https://avatars1.githubusercontent.com/u/1964212?v=4\" width=\"100px;\"/><br /><sub><b>Erik Pearson</b></sub>](https://github.com/emp823)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=emp823 \"Documentation\") | [<img src=\"https://avatars1.githubusercontent.com/u/5342677?v=4\" width=\"100px;\"/><br /><sub><b>Bryan Mason</b></sub>](https://github.com/flymason)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=flymason \"Documentation\") |\n| :---: | :---: | :---: | :---: | :---: | :---: | :---: |\n| [<img src=\"https://avatars1.githubusercontent.com/u/119451?v=4\" width=\"100px;\"/><br /><sub><b>Jakub Chodorowicz</b></sub>](http://www.jakub.chodorowicz.pl/)<br />[💻](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=chodorowicz \"Code\") | [<img src=\"https://avatars1.githubusercontent.com/u/7266431?v=4\" width=\"100px;\"/><br /><sub><b>Oleg Maslov</b></sub>](https://github.com/mleg)<br />[🐛](https://github.com/piotrwitek/react-redux-typescript-guide/issues?q=author%3Amleg \"Bug reports\") | [<img src=\"https://avatars0.githubusercontent.com/u/3393293?v=4\" width=\"100px;\"/><br /><sub><b>Aaron Westbrook</b></sub>](https://github.com/awestbro)<br />[🐛](https://github.com/piotrwitek/react-redux-typescript-guide/issues?q=author%3Aawestbro \"Bug reports\") | [<img src=\"https://avatars3.githubusercontent.com/u/14539?v=4\" width=\"100px;\"/><br /><sub><b>Peter Blazejewicz</b></sub>](http://www.linkedin.com/in/peterblazejewicz)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=peterblazejewicz \"Documentation\") | [<img src=\"https://avatars3.githubusercontent.com/u/1642?v=4\" width=\"100px;\"/><br /><sub><b>Solomon White</b></sub>](https://github.com/rubysolo)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=rubysolo \"Documentation\") | [<img src=\"https://avatars2.githubusercontent.com/u/8838006?v=4\" width=\"100px;\"/><br /><sub><b>Levi Rocha</b></sub>](https://github.com/pino)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=pino \"Documentation\") | [<img src=\"https://avatars1.githubusercontent.com/u/41281835?v=4\" width=\"100px;\"/><br /><sub><b>Sudachi-kun</b></sub>](http://cloudnative.co.jp)<br />[💵](#financial-loadbalance-sudachi-kun \"Financial\") |\n| [<img src=\"https://avatars1.githubusercontent.com/u/14838850?v=4\" width=\"100px;\"/><br /><sub><b>Sosuke Suzuki</b></sub>](http://sosukesuzuki.github.io)<br />[💻](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=sosukesuzuki \"Code\") | [<img src=\"https://avatars0.githubusercontent.com/u/74433?v=4\" width=\"100px;\"/><br /><sub><b>Tom Rathbone</b></sub>](https://github.com/chillitom)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=chillitom \"Documentation\") | [<img src=\"https://avatars3.githubusercontent.com/u/4654382?v=4\" width=\"100px;\"/><br /><sub><b>Arshad Kazmi</b></sub>](https://arshadkazmi42.github.io/)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=arshadkazmi42 \"Documentation\") | [<img src=\"https://avatars1.githubusercontent.com/u/8815362?v=4\" width=\"100px;\"/><br /><sub><b>JeongUkJae</b></sub>](https://jeongukjae.github.io)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=JeongUkJae \"Documentation\") |\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2016 Piotr Witek <piotrek.witek@gmail.com> (http://piotrwitek.github.io)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "<div align=\"center\">\n\n# React & Redux in TypeScript - Complete Guide\n\n_\"This guide is a **living compendium** documenting the most important patterns and recipes on how to use **React** (and its Ecosystem) in a **functional style** using **TypeScript**. It will help you make your code **completely type-safe** while focusing on **inferring the types from implementation** so there is less noise coming from excessive type annotations and it's easier to write and maintain correct types in the long run.\"_\n\n[![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/react-redux-ts)\n[![Join the chat at https://gitter.im/react-redux-typescript-guide/Lobby](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/react-redux-typescript-guide/Lobby)\n\n_Found it useful? Want more updates?_\n\n[**Show your support by giving a :star:**](https://github.com/piotrwitek/react-redux-typescript-guide/stargazers)\n\n<a href=\"https://www.buymeacoffee.com/piotrekwitek\">\n  <img src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy Me a Coffee\">\n</a>\n<a href=\"https://www.patreon.com/piotrekwitek\">\n  <img src=\"https://c5.patreon.com/external/logo/become_a_patron_button@2x.png\" alt=\"Become a Patron\" width=\"160\">\n</a>\n\n<br/><hr/>\n\n## **What's new?**\n\n:tada: _Now updated to support **TypeScript v4.6**_ :tada:\n:rocket: _Updated to `typesafe-actions@5.x` :rocket:\n\n<hr/><br/>\n\n</div>\n\n### **Goals**\n\n- Complete type safety (with [`--strict`](https://www.typescriptlang.org/docs/handbook/compiler-options.html) flag) without losing type information downstream through all the layers of our application (e.g. no type assertions or hacking with `any` type)\n- Make type annotations concise by eliminating redundancy in types using advanced TypeScript Language features like **Type Inference** and **Control flow analysis**\n- Reduce repetition and complexity of types with TypeScript focused [complementary libraries](#react-redux-typescript-ecosystem)\n\n### **React, Redux, Typescript Ecosystem**\n\n- [typesafe-actions](https://github.com/piotrwitek/typesafe-actions) - Typesafe utilities for \"action-creators\" in Redux / Flux Architecture  \n- [utility-types](https://github.com/piotrwitek/utility-types) - Collection of generic types for TypeScript, complementing built-in mapped types and aliases - think lodash for reusable types.  \n- [react-redux-typescript-scripts](https://github.com/piotrwitek/react-redux-typescript-scripts) - dev-tools configuration files shared between projects based on this guide  \n\n### **Examples**\n\n- Todo-App playground: [Codesandbox](https://codesandbox.io/s/github/piotrwitek/typesafe-actions/tree/master/codesandbox)\n- React, Redux, TypeScript - RealWorld App: [Github](https://github.com/piotrwitek/react-redux-typescript-realworld-app) | [Demo](https://react-redux-typescript-realworld-app.netlify.com/)\n\n### **Playground Project**\n\n[![Build Status](https://semaphoreci.com/api/v1/piotrekwitek/react-redux-typescript-guide/branches/master/shields_badge.svg)](https://semaphoreci.com/piotrekwitek/react-redux-typescript-guide)\n\nCheck out our Playground Project located in the `/playground` folder. It contains all source files of the code examples found in the guide. They are all tested with the most recent version of TypeScript and 3rd party type-definitions (like `@types/react` or `@types/react-redux`) to ensure the examples are up-to-date and not broken with updated definitions (It's based on `create-react-app --typescript`).\n> Playground project was created so that you can simply clone the repository locally and immediately play around with all the component patterns found in the guide. It will help you to learn all the examples from this guide in a real project environment without the need to create complicated environment setup by yourself.\n\n## Contributing Guide\n\nYou can help make this project better by contributing. If you're planning to contribute please make sure to check our contributing guide: [CONTRIBUTING.md](/CONTRIBUTING.md)\n\n## Funding\n\nYou can also help by funding issues.\nIssues like bug fixes or feature requests can be very quickly resolved when funded through the IssueHunt platform.\n\nI highly recommend to add a bounty to the issue that you're waiting for to increase priority and attract contributors willing to work on it.\n\n[![Let's fund issues in this repository](https://issuehunt.io/static/embed/issuehunt-button-v1.svg)](https://issuehunt.io/repos/76996763)\n\n---\n\n🌟 - _New or updated section_\n\n## Table of Contents\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n\n\n  - [React Types Cheatsheet](#react-types-cheatsheet)\n    - [`React.FC<Props>` | `React.FunctionComponent<Props>`](#reactfcprops--reactfunctioncomponentprops)\n    - [`React.Component<Props, State>`](#reactcomponentprops-state)\n    - [`React.ComponentType<Props>`](#reactcomponenttypeprops)\n    - [`React.ComponentProps<typeof XXX>`](#reactcomponentpropstypeof-xxx)\n    - [`React.ReactElement` | `JSX.Element`](#reactreactelement--jsxelement)\n    - [`React.ReactNode`](#reactreactnode)\n    - [`React.CSSProperties`](#reactcssproperties)\n    - [`React.XXXHTMLAttributes<HTMLXXXElement>`](#reactxxxhtmlattributeshtmlxxxelement)\n    - [`React.ReactEventHandler<HTMLXXXElement>`](#reactreacteventhandlerhtmlxxxelement)\n    - [`React.XXXEvent<HTMLXXXElement>`](#reactxxxeventhtmlxxxelement)\n- [React](#react)\n  - [Function Components - FC](#function-components---fc)\n    - [- Counter Component](#--counter-component)\n    - [- Counter Component with default props](#--counter-component-with-default-props)\n    - [- Spreading attributes in Component](#--spreading-attributes-in-component)\n  - [Class Components](#class-components)\n    - [- Class Counter Component](#--class-counter-component)\n    - [- Class Component with default props](#--class-component-with-default-props)\n  - [Generic Components](#generic-components)\n    - [- Generic List Component](#--generic-list-component)\n  - [Hooks](#hooks)\n    - [- useState](#--usestate)\n    - [- useContext](#--usecontext)\n    - [- useReducer](#--usereducer)\n  - [Render Props](#render-props)\n    - [- Name Provider Component](#--name-provider-component)\n    - [- Mouse Provider Component](#--mouse-provider-component)\n  - [Higher-Order Components](#higher-order-components)\n    - [- HOC wrapping a component](#--hoc-wrapping-a-component)\n    - [- HOC wrapping a component and injecting props](#--hoc-wrapping-a-component-and-injecting-props)\n    - [- Nested HOC - wrapping a component, injecting props and connecting to redux 🌟](#--nested-hoc---wrapping-a-component-injecting-props-and-connecting-to-redux-)\n  - [Redux Connected Components](#redux-connected-components)\n    - [- Redux connected counter](#--redux-connected-counter)\n    - [- Redux connected counter with own props](#--redux-connected-counter-with-own-props)\n    - [- Redux connected counter via hooks](#--redux-connected-counter-via-hooks)\n    - [- Redux connected counter with `redux-thunk` integration](#--redux-connected-counter-with-redux-thunk-integration)\n  - [Context](#context)\n    - [ThemeContext](#themecontext)\n    - [ThemeProvider](#themeprovider)\n    - [ThemeConsumer](#themeconsumer)\n    - [ThemeConsumer in class component](#themeconsumer-in-class-component)\n- [Redux](#redux)\n  - [Store Configuration](#store-configuration)\n    - [Create Global Store Types](#create-global-store-types)\n    - [Create Store](#create-store)\n  - [Action Creators 🌟](#action-creators-)\n  - [Reducers](#reducers)\n    - [State with Type-level Immutability](#state-with-type-level-immutability)\n    - [Typing reducer](#typing-reducer)\n    - [Typing reducer with `typesafe-actions`](#typing-reducer-with-typesafe-actions)\n    - [Testing reducer](#testing-reducer)\n  - [Async Flow with `redux-observable`](#async-flow-with-redux-observable)\n    - [Typing epics](#typing-epics)\n    - [Testing epics](#testing-epics)\n  - [Selectors with `reselect`](#selectors-with-reselect)\n  - [Connect with `react-redux`](#connect-with-react-redux)\n    - [Typing connected component](#typing-connected-component)\n    - [Typing `useSelector` and `useDispatch`](#typing-useselector-and-usedispatch)\n    - [Typing connected component with `redux-thunk` integration](#typing-connected-component-with-redux-thunk-integration)\n- [Configuration & Dev Tools](#configuration--dev-tools)\n  - [Common Npm Scripts](#common-npm-scripts)\n  - [tsconfig.json](#tsconfigjson)\n  - [TSLib](#tslib)\n  - [ESLint](#eslint)\n    - [.eslintrc.js](#eslintrcjs)\n  - [Jest](#jest)\n    - [jest.config.json](#jestconfigjson)\n    - [jest.stubs.js](#jeststubsjs)\n  - [Style Guides](#style-guides)\n    - [react-styleguidist](#react-styleguidist)\n- [FAQ](#faq)\n  - [Ambient Modules](#ambient-modules)\n    - [Imports in ambient modules](#imports-in-ambient-modules)\n  - [Type-Definitions](#type-definitions)\n    - [Missing type-definitions error](#missing-type-definitions-error)\n    - [Using custom `d.ts` files for npm modules](#using-custom-dts-files-for-npm-modules)\n  - [Type Augmentation](#type-augmentation)\n    - [Augmenting library internal declarations - using relative import](#augmenting-library-internal-declarations---using-relative-import)\n    - [Augmenting library public declarations - using node_modules import](#augmenting-library-public-declarations---using-node_modules-import)\n  - [Misc](#misc)\n    - [- should I still use React.PropTypes in TS?](#--should-i-still-use-reactproptypes-in-ts)\n    - [- when to use `interface` declarations and when `type` aliases?](#--when-to-use-interface-declarations-and-when-type-aliases)\n    - [- what's better default or named exports?](#--whats-better-default-or-named-exports)\n    - [- how to best initialize class instance or static properties?](#--how-to-best-initialize-class-instance-or-static-properties)\n    - [- how to best declare component handler functions?](#--how-to-best-declare-component-handler-functions)\n- [Tutorials & Articles](#tutorials--articles)\n- [Contributors](#contributors)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n---\n\n# Installation\n\n## Types for React & Redux\n\n```\nnpm i -D @types/react @types/react-dom @types/react-redux\n```\n\n\"react\" - `@types/react`  \n\"react-dom\" - `@types/react-dom`  \n\"redux\" - (types included with npm package)*  \n\"react-redux\" - `@types/react-redux`  \n\n> *NB: Guide is based on types for Redux >= v4.x.x.\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n## React Types Cheatsheet\n\n### `React.FC<Props>` | `React.FunctionComponent<Props>`\n\nType representing a functional component\n\n```tsx\nconst MyComponent: React.FC<Props> = ...\n```\n\n### `React.Component<Props, State>`\n\nType representing a class component\n\n```tsx\nclass MyComponent extends React.Component<Props, State> { ...\n```\n\n### `React.ComponentType<Props>`\n\nType representing union of (`React.FC<Props> | React.Component<Props>`) - used in HOC\n\n```tsx\nconst withState = <P extends WrappedComponentProps>(\n  WrappedComponent: React.ComponentType<P>,\n) => { ...\n```\n\n### `React.ComponentProps<typeof XXX>`\n\nGets Props type of a specified component XXX (WARNING: does not work with statically declared default props and generic props)\n\n```tsx\ntype MyComponentProps = React.ComponentProps<typeof MyComponent>;\n```\n\n### `React.ReactElement` | `JSX.Element`\n\nType representing a concept of React Element - representation of a native DOM component (e.g. `<div />`), or a user-defined composite component (e.g. `<MyComponent />`)\n\n```tsx\nconst elementOnly: React.ReactElement = <div /> || <MyComponent />;\n```\n\n### `React.ReactNode`\n\nType representing any possible type of React node (basically ReactElement (including Fragments and Portals) + primitive JS types)\n\n```tsx\nconst elementOrPrimitive: React.ReactNode = 'string' || 0 || false || null || undefined || <div /> || <MyComponent />;\nconst Component = ({ children: React.ReactNode }) => ...\n```\n\n### `React.CSSProperties`\n\nType representing style object in JSX - for css-in-js styles\n\n```tsx\nconst styles: React.CSSProperties = { flexDirection: 'row', ...\nconst element = <div style={styles} ...\n```\n\n### `React.XXXHTMLAttributes<HTMLXXXElement>`\n\nType representing HTML attributes of specified HTML Element - for extending HTML Elements\n\n```tsx\nconst Input: React.FC<Props & React.InputHTMLAttributes<HTMLInputElement>> = props => { ... }\n\n<Input about={...} accept={...} alt={...} ... />\n```\n\n### `React.ReactEventHandler<HTMLXXXElement>`\n\nType representing generic event handler - for declaring event handlers\n\n```tsx\nconst handleChange: React.ReactEventHandler<HTMLInputElement> = (ev) => { ... } \n\n<input onChange={handleChange} ... />\n```\n\n### `React.XXXEvent<HTMLXXXElement>`\n\nType representing more specific event. Some common event examples: `ChangeEvent, FormEvent, FocusEvent, KeyboardEvent, MouseEvent, DragEvent, PointerEvent, WheelEvent, TouchEvent`.\n\n```tsx\nconst handleChange = (ev: React.MouseEvent<HTMLDivElement>) => { ... }\n\n<div onMouseMove={handleChange} ... />\n```\n\nIn code above `React.MouseEvent<HTMLDivElement>` is type of mouse event, and this event happened on `HTMLDivElement`\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n# React\n\n## Function Components - FC\n\n### - Counter Component\n\n```tsx\nimport * as React from 'react';\n\ntype Props = {\n  label: string;\n  count: number;\n  onIncrement: () => void;\n};\n\nexport const FCCounter: React.FC<Props> = props => {\n  const { label, count, onIncrement } = props;\n\n  const handleIncrement = () => {\n    onIncrement();\n  };\n\n  return (\n    <div>\n      <span>\n        {label}: {count}\n      </span>\n      <button type=\"button\" onClick={handleIncrement}>\n        {`Increment`}\n      </button>\n    </div>\n  );\n};\n\n```\n\n[⟩⟩⟩ demo](https://piotrwitek.github.io/react-redux-typescript-guide/#fccounter)\n\n[⇧ back to top](#table-of-contents)\n\n### - Counter Component with default props\n\n```tsx\nimport * as React from 'react';\n\ntype Props = {\n  label: string;\n  count: number;\n  onIncrement: () => void;\n};\n\n// React.FC is unaplicable here due not working properly with default props\n// https://github.com/facebook/create-react-app/pull/8177\nexport const FCCounterWithDefaultProps = (props: Props): JSX.Element => {\n  const { label, count, onIncrement } = props;\n\n  const handleIncrement = () => {\n    onIncrement();\n  };\n\n  return (\n    <div>\n      <span>\n        {label}: {count}\n      </span>\n      <button type=\"button\" onClick={handleIncrement}>\n        {`Increment`}\n      </button>\n    </div>\n  );\n};\n\nFCCounterWithDefaultProps.defaultProps = { count: 5 };\n\n```\n\n[⟩⟩⟩ demo](https://piotrwitek.github.io/react-redux-typescript-guide/#fccounterwithdefaultprops)\n\n[⇧ back to top](#table-of-contents)\n\n### - [Spreading attributes](https://facebook.github.io/react/docs/jsx-in-depth.html#spread-attributes) in Component\n\n```tsx\nimport * as React from 'react';\n\ntype Props = React.PropsWithChildren<{\n  className?: string;\n  style?: React.CSSProperties;\n}>;\n\nexport const FCSpreadAttributes: React.FC<Props> = (props) => {\n  const { children, ...restProps } = props;\n\n  return <div {...restProps}>{children}</div>;\n};\n\n```\n\n[⟩⟩⟩ demo](https://piotrwitek.github.io/react-redux-typescript-guide/#fcspreadattributes)\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n## Class Components\n\n### - Class Counter Component\n\n```tsx\nimport * as React from 'react';\n\ntype Props = {\n  label: string;\n};\n\ntype State = {\n  count: number;\n};\n\nexport class ClassCounter extends React.Component<Props, State> {\n  readonly state: State = {\n    count: 0,\n  };\n\n  handleIncrement = () => {\n    this.setState({ count: this.state.count + 1 });\n  };\n\n  render() {\n    const { handleIncrement } = this;\n    const { label } = this.props;\n    const { count } = this.state;\n\n    return (\n      <div>\n        <span>\n          {label}: {count}\n        </span>\n        <button type=\"button\" onClick={handleIncrement}>\n          {`Increment`}\n        </button>\n      </div>\n    );\n  }\n}\n\n```\n\n[⟩⟩⟩ demo](https://piotrwitek.github.io/react-redux-typescript-guide/#classcounter)\n\n[⇧ back to top](#table-of-contents)\n\n### - Class Component with default props\n\n```tsx\nimport * as React from 'react';\n\ntype Props = {\n  label: string;\n  initialCount: number;\n};\n\ntype State = {\n  count: number;\n};\n\nexport class ClassCounterWithDefaultProps extends React.Component<\n  Props,\n  State\n> {\n  static defaultProps = {\n    initialCount: 0,\n  };\n\n  readonly state: State = {\n    count: this.props.initialCount,\n  };\n\n  handleIncrement = () => {\n    this.setState({ count: this.state.count + 1 });\n  };\n\n  render() {\n    const { handleIncrement } = this;\n    const { label } = this.props;\n    const { count } = this.state;\n\n    return (\n      <div>\n        <span>\n          {label}: {count}\n        </span>\n        <button type=\"button\" onClick={handleIncrement}>\n          {`Increment`}\n        </button>\n      </div>\n    );\n  }\n}\n\n```\n\n[⟩⟩⟩ demo](https://piotrwitek.github.io/react-redux-typescript-guide/#classcounterwithdefaultprops)\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n## Generic Components\n\n- easily create typed component variations and reuse common logic\n- common use case is a generic list components\n\n### - Generic List Component\n\n```tsx\nimport * as React from 'react';\n\nexport interface GenericListProps<T> {\n  items: T[];\n  itemRenderer: (item: T) => JSX.Element;\n}\n\nexport class GenericList<T> extends React.Component<GenericListProps<T>, {}> {\n  render() {\n    const { items, itemRenderer } = this.props;\n\n    return (\n      <div>\n        {items.map(itemRenderer)}\n      </div>\n    );\n  }\n}\n\n```\n\n[⟩⟩⟩ demo](https://piotrwitek.github.io/react-redux-typescript-guide/#genericlist)\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n## Hooks\n\n> <https://reactjs.org/docs/hooks-intro.html>\n\n### - useState\n\n> <https://reactjs.org/docs/hooks-reference.html#usestate>\n\n```tsx\nimport * as React from 'react';\n\ntype Props = { initialCount: number };\n\nexport default function Counter({initialCount}: Props) {\n  const [count, setCount] = React.useState(initialCount);\n  return (\n    <>\n      Count: {count}\n      <button onClick={() => setCount(initialCount)}>Reset</button>\n      <button onClick={() => setCount(prevCount => prevCount + 1)}>+</button>\n      <button onClick={() => setCount(prevCount => prevCount - 1)}>-</button>\n    </>\n  );\n}\n\n```\n\n[⇧ back to top](#table-of-contents)\n\n### - useContext\n\n> <https://reactjs.org/docs/hooks-reference.html#usecontext>\n\n```tsx\nimport * as React from 'react';\nimport ThemeContext from '../context/theme-context';\n\ntype Props = {};\n\nexport default function ThemeToggleButton(props: Props) {\n  const { theme, toggleTheme } = React.useContext(ThemeContext);\n  return (\n    <button onClick={toggleTheme} style={theme} >\n      Toggle Theme\n    </button>\n  );\n}\n\n```\n\n[⇧ back to top](#table-of-contents)\n\n### - useReducer\n\n> <https://reactjs.org/docs/hooks-reference.html#usereducer>\n\n```tsx\nimport * as React from 'react';\n\ninterface State {\n  count: number;\n}\n\ntype Action = { type: 'reset' } | { type: 'increment' } | { type: 'decrement' };\n\nfunction reducer(state: State, action: Action): State {\n  switch (action.type) {\n    case 'increment':\n      return { count: state.count + 1 };\n    case 'decrement':\n      return { count: state.count - 1 };\n    case 'reset':\n      return { count: 0 };\n    default:\n      throw new Error();\n  }\n}\n\ninterface CounterProps {\n  initialCount: number;\n}\n\nfunction Counter({ initialCount }: CounterProps) {\n  const [state, dispatch] = React.useReducer(reducer, {\n    count: initialCount,\n  });\n\n  return (\n    <>\n      Count: {state.count}\n      <button onClick={() => dispatch({ type: 'reset' })}>Reset</button>\n      <button onClick={() => dispatch({ type: 'increment' })}>+</button>\n      <button onClick={() => dispatch({ type: 'decrement' })}>-</button>\n    </>\n  );\n}\n\nexport default Counter;\n\n```\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n## Render Props\n\n> <https://reactjs.org/docs/render-props.html>\n\n### - Name Provider Component\n\nSimple component using children as a render prop\n\n```tsx\nimport * as React from 'react';\n\ninterface NameProviderProps {\n  children: (state: NameProviderState) => React.ReactNode;\n}\n\ninterface NameProviderState {\n  readonly name: string;\n}\n\nexport class NameProvider extends React.Component<NameProviderProps, NameProviderState> {\n  readonly state: NameProviderState = { name: 'Piotr' };\n\n  render() {\n    return this.props.children(this.state);\n  }\n}\n\n```\n\n[⟩⟩⟩ demo](https://piotrwitek.github.io/react-redux-typescript-guide/#nameprovider)\n\n[⇧ back to top](#table-of-contents)\n\n### - Mouse Provider Component\n\n`Mouse` component found in [Render Props React Docs](https://reactjs.org/docs/render-props.html#use-render-props-for-cross-cutting-concerns)\n\n```tsx\nimport * as React from 'react';\n\nexport interface MouseProviderProps {\n  render: (state: MouseProviderState) => React.ReactNode;\n}\n\ninterface MouseProviderState {\n  readonly x: number;\n  readonly y: number;\n}\n\nexport class MouseProvider extends React.Component<MouseProviderProps, MouseProviderState> {\n  readonly state: MouseProviderState = { x: 0, y: 0 };\n\n  handleMouseMove = (event: React.MouseEvent<HTMLDivElement>) => {\n    this.setState({\n      x: event.clientX,\n      y: event.clientY,\n    });\n  };\n\n  render() {\n    return (\n      <div style={{ height: '100%' }} onMouseMove={this.handleMouseMove}>\n        {/*\n          Instead of providing a static representation of what <Mouse> renders,\n          use the `render` prop to dynamically determine what to render.\n        */}\n        {this.props.render(this.state)}\n      </div>\n    );\n  }\n}\n\n```\n\n[⟩⟩⟩ demo](https://piotrwitek.github.io/react-redux-typescript-guide/#mouseprovider)\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n## Higher-Order Components\n\n> <https://reactjs.org/docs/higher-order-components.html>\n\n### - HOC wrapping a component\n\nAdds state to a stateless counter\n\n```tsx\nimport React from 'react';\nimport { Diff } from 'utility-types';\n\n// These props will be injected into the base component\ninterface InjectedProps {\n  count: number;\n  onIncrement: () => void;\n}\n\nexport const withState = <BaseProps extends InjectedProps>(\n  BaseComponent: React.ComponentType<BaseProps>\n) => {\n  type HocProps = Diff<BaseProps, InjectedProps> & {\n    // here you can extend hoc with new props\n    initialCount?: number;\n  };\n  type HocState = {\n    readonly count: number;\n  };\n\n  return class Hoc extends React.Component<HocProps, HocState> {\n    // Enhance component name for debugging and React-Dev-Tools\n    static displayName = `withState(${BaseComponent.name})`;\n    // reference to original wrapped component\n    static readonly WrappedComponent = BaseComponent;\n\n    readonly state: HocState = {\n      count: Number(this.props.initialCount) || 0,\n    };\n\n    handleIncrement = () => {\n      this.setState({ count: this.state.count + 1 });\n    };\n\n    render() {\n      const { ...restProps } = this.props;\n      const { count } = this.state;\n\n      return (\n        <BaseComponent\n        {...(restProps as BaseProps)}\n          count={count} // injected\n          onIncrement={this.handleIncrement} // injected\n        />\n      );\n    }\n  };\n};\n\n```\n<details><summary><i>Click to expand</i></summary><p>\n\n```tsx\nimport * as React from 'react';\n\nimport { withState } from '../hoc';\nimport { FCCounter } from '../components';\n\nconst FCCounterWithState = withState(FCCounter);\n\nexport default () => <FCCounterWithState label={'FCCounterWithState'} />;\n\n```\n</p></details>\n\n[⇧ back to top](#table-of-contents)\n\n### - HOC wrapping a component and injecting props\n\nAdds error handling using componentDidCatch to any component\n\n```tsx\nimport React from 'react';\n\nconst MISSING_ERROR = 'Error was swallowed during propagation.';\n\nexport const withErrorBoundary = <BaseProps extends {}>(\n  BaseComponent: React.ComponentType<BaseProps>\n) => {\n  type HocProps = React.PropsWithChildren<{\n    // here you can extend hoc with new props\n  }>;\n  type HocState = {\n    readonly error: Error | null | undefined;\n  };\n\n  return class Hoc extends React.Component<HocProps, HocState> {\n    // Enhance component name for debugging and React-Dev-Tools\n    static displayName = `withErrorBoundary(${BaseComponent.name})`;\n    // reference to original wrapped component\n    static readonly WrappedComponent = BaseComponent;\n\n    readonly state: HocState = {\n      error: undefined,\n    };\n\n    componentDidCatch(error: Error | null, info: object) {\n      this.setState({ error: error || new Error(MISSING_ERROR) });\n      this.logErrorToCloud(error, info);\n    }\n\n    logErrorToCloud = (error: Error | null, info: object) => {\n      // TODO: send error report to service provider\n    };\n\n    render() {\n      const { children, ...restProps } = this.props;\n      const { error } = this.state;\n\n      if (error) {\n        return <BaseComponent {...(restProps as BaseProps)} />;\n      }\n\n      return children;\n    }\n  };\n};\n\n```\n<details><summary><i>Click to expand</i></summary><p>\n\n```tsx\nimport React, {useState} from 'react';\n\nimport { withErrorBoundary } from '../hoc';\nimport { ErrorMessage } from '../components';\n\nconst ErrorMessageWithErrorBoundary =\n  withErrorBoundary(ErrorMessage);\n\nconst BrokenComponent = () => {\n  throw new Error('I\\'m broken! Don\\'t render me.');\n};\n\nconst BrokenButton = () => {\n  const [shouldRenderBrokenComponent, setShouldRenderBrokenComponent] =\n    useState(false);\n\n  if (shouldRenderBrokenComponent) {\n    return <BrokenComponent />;\n  }\n\n  return (\n    <button\n      type=\"button\"\n      onClick={() => {\n        setShouldRenderBrokenComponent(true);\n      }}\n    >\n      {`Throw nasty error`}\n    </button>\n  );\n};\n\nexport default () => (\n  <ErrorMessageWithErrorBoundary>\n    <BrokenButton />\n  </ErrorMessageWithErrorBoundary>\n);\n\n```\n</p></details>\n\n[⇧ back to top](#table-of-contents)\n\n### - Nested HOC - wrapping a component, injecting props and connecting to redux 🌟\n\nAdds error handling using componentDidCatch to any component\n\n```tsx\nimport { RootState } from 'MyTypes';\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { Diff } from 'utility-types';\nimport { countersActions, countersSelectors } from '../features/counters';\n\n// These props will be injected into the base component\ninterface InjectedProps {\n  count: number;\n  onIncrement: () => void;\n}\n\nexport const withConnectedCount = <BaseProps extends InjectedProps>(\n  BaseComponent: React.ComponentType<BaseProps>\n) => {\n  const mapStateToProps = (state: RootState) => ({\n    count: countersSelectors.getReduxCounter(state.counters),\n  });\n\n  const dispatchProps = {\n    onIncrement: countersActions.increment,\n  };\n\n  type HocProps = ReturnType<typeof mapStateToProps> &\n    typeof dispatchProps & {\n      // here you can extend ConnectedHoc with new props\n      overrideCount?: number;\n    };\n\n  class Hoc extends React.Component<HocProps> {\n    // Enhance component name for debugging and React-Dev-Tools\n    static displayName = `withConnectedCount(${BaseComponent.name})`;\n    // reference to original wrapped component\n    static readonly WrappedComponent = BaseComponent;\n\n    render() {\n      const { count, onIncrement, overrideCount, ...restProps } = this.props;\n\n      return (\n        <BaseComponent\n          {...(restProps as BaseProps)}\n          count={overrideCount || count} // injected\n          onIncrement={onIncrement} // injected\n        />\n      );\n    }\n  }\n\n  const ConnectedHoc = connect<\n    ReturnType<typeof mapStateToProps>,\n    typeof dispatchProps, // use \"undefined\" if NOT using dispatchProps\n    Diff<BaseProps, InjectedProps>,\n    RootState\n  >(\n    mapStateToProps,\n    dispatchProps\n  )(Hoc);\n\n  return ConnectedHoc;\n};\n\n```\n<details><summary><i>Click to expand</i></summary><p>\n\n```tsx\nimport * as React from 'react';\n\nimport { withConnectedCount } from '../hoc';\nimport { FCCounter } from '../components';\n\nconst FCCounterWithConnectedCount = withConnectedCount(FCCounter);\n\nexport default () => (\n  <FCCounterWithConnectedCount overrideCount={5} label={'FCCounterWithState'} />\n);\n\n```\n</p></details>\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n## Redux Connected Components\n\n### - Redux connected counter\n\n```tsx\nimport Types from 'MyTypes';\nimport { connect } from 'react-redux';\n\nimport { countersActions, countersSelectors } from '../features/counters';\nimport { FCCounter } from '../components';\n\nconst mapStateToProps = (state: Types.RootState) => ({\n  count: countersSelectors.getReduxCounter(state.counters),\n});\n\nconst dispatchProps = {\n  onIncrement: countersActions.increment,\n};\n\nexport const FCCounterConnected = connect(\n  mapStateToProps,\n  dispatchProps\n)(FCCounter);\n\n```\n<details><summary><i>Click to expand</i></summary><p>\n\n```tsx\nimport * as React from 'react';\n\nimport { FCCounterConnected } from '.';\n\nexport default () => <FCCounterConnected label={'FCCounterConnected'} />;\n\n```\n</p></details>\n\n[⇧ back to top](#table-of-contents)\n\n### - Redux connected counter with own props\n\n```tsx\nimport Types from 'MyTypes';\nimport { connect } from 'react-redux';\n\nimport { countersActions, countersSelectors } from '../features/counters';\nimport { FCCounter } from '../components';\n\ntype OwnProps = {\n  initialCount?: number;\n};\n\nconst mapStateToProps = (state: Types.RootState, ownProps: OwnProps) => ({\n  count:\n    countersSelectors.getReduxCounter(state.counters) +\n    (ownProps.initialCount || 0),\n});\n\nconst dispatchProps = {\n  onIncrement: countersActions.increment,\n};\n\nexport const FCCounterConnectedOwnProps = connect(\n  mapStateToProps,\n  dispatchProps\n)(FCCounter);\n\n```\n<details><summary><i>Click to expand</i></summary><p>\n\n```tsx\nimport * as React from 'react';\n\nimport { FCCounterConnectedOwnProps } from '.';\n\nexport default () => (\n  <FCCounterConnectedOwnProps\n    label={'FCCounterConnectedOwnProps'}\n    initialCount={10}\n  />\n);\n\n```\n</p></details>\n\n[⇧ back to top](#table-of-contents)\n\n### - Redux connected counter via hooks\n\n```tsx\nimport * as React from 'react';\nimport { FCCounter } from '../components';\nimport { increment } from '../features/counters/actions';\nimport { useSelector, useDispatch } from '../store/hooks';\n\nconst FCCounterConnectedHooksUsage: React.FC = () => {\n  const counter = useSelector(state => state.counters.reduxCounter);\n  const dispatch = useDispatch();\n  return <FCCounter label=\"Use selector\" count={counter} onIncrement={() => dispatch(increment())}/>;\n};\n\nexport default FCCounterConnectedHooksUsage;\n\n```\n\n[⇧ back to top](#table-of-contents)\n\n### - Redux connected counter with `redux-thunk` integration\n\n```tsx\nimport Types from 'MyTypes';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport { connect } from 'react-redux';\nimport * as React from 'react';\n\nimport { countersActions } from '../features/counters';\n\n// Thunk Action\nconst incrementWithDelay = () => async (dispatch: Dispatch): Promise<void> => {\n  setTimeout(() => dispatch(countersActions.increment()), 1000);\n};\n\nconst mapStateToProps = (state: Types.RootState) => ({\n  count: state.counters.reduxCounter,\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch<Types.RootAction>) =>\n  bindActionCreators(\n    {\n      onIncrement: incrementWithDelay,\n    },\n    dispatch\n  );\n\ntype Props = ReturnType<typeof mapStateToProps> &\n  ReturnType<typeof mapDispatchToProps> & {\n    label: string;\n  };\n\nexport const FCCounter: React.FC<Props> = props => {\n  const { label, count, onIncrement } = props;\n\n  const handleIncrement = () => {\n    // Thunk action is correctly typed as promise\n    onIncrement().then(() => {\n      // ...\n    });\n  };\n\n  return (\n    <div>\n      <span>\n        {label}: {count}\n      </span>\n      <button type=\"button\" onClick={handleIncrement}>\n        {`Increment`}\n      </button>\n    </div>\n  );\n};\n\nexport const FCCounterConnectedBindActionCreators = connect(\n  mapStateToProps,\n  mapDispatchToProps\n)(FCCounter);\n\n```\n<details><summary><i>Click to expand</i></summary><p>\n\n```tsx\nimport * as React from 'react';\n\nimport { FCCounterConnectedBindActionCreators } from '.';\n\nexport default () => (\n  <FCCounterConnectedBindActionCreators\n    label={'FCCounterConnectedBindActionCreators'}\n  />\n);\n\n```\n</p></details>\n\n[⇧ back to top](#table-of-contents)\n\n## Context\n\n> <https://reactjs.org/docs/context.html>\n\n### ThemeContext\n\n```tsx\nimport * as React from 'react';\n\nexport type Theme = React.CSSProperties;\n\ntype Themes = {\n  dark: Theme;\n  light: Theme;\n};\n\nexport const themes: Themes = {\n  dark: {\n    color: 'black',\n    backgroundColor: 'white',\n  },\n  light: {\n    color: 'white',\n    backgroundColor: 'black',\n  },\n};\n\nexport type ThemeContextProps = { theme: Theme; toggleTheme?: () => void };\nconst ThemeContext = React.createContext<ThemeContextProps>({ theme: themes.light });\n\nexport default ThemeContext;\n\n```\n\n[⇧ back to top](#table-of-contents)\n\n### ThemeProvider\n\n```tsx\nimport React from 'react';\nimport ThemeContext, { themes, Theme } from './theme-context';\nimport ToggleThemeButton from './theme-consumer';\n\ninterface State {\n  theme: Theme;\n}\nexport class ThemeProvider extends React.Component<{}, State> {\n  readonly state: State = { theme: themes.light };\n\n  toggleTheme = () => {\n    this.setState(state => ({\n      theme: state.theme === themes.light ? themes.dark : themes.light,\n    }));\n  }\n\n  render() {\n    const { theme } = this.state;\n    const { toggleTheme } = this;\n    return (\n      <ThemeContext.Provider value={{ theme, toggleTheme }}>\n        <ToggleThemeButton />\n      </ThemeContext.Provider>\n    );\n  }\n}\n\n```\n\n[⇧ back to top](#table-of-contents)\n\n### ThemeConsumer\n\n```tsx\nimport * as React from 'react';\nimport ThemeContext from './theme-context';\n\ntype Props = {};\n\nexport default function ToggleThemeButton(props: Props) {\n  return (\n    <ThemeContext.Consumer>\n      {({ theme, toggleTheme }) => <button style={theme} onClick={toggleTheme} {...props} />}\n    </ThemeContext.Consumer>\n  );\n}\n\n```\n\n### ThemeConsumer in class component\n\n```tsx\nimport * as React from 'react';\nimport ThemeContext from './theme-context';\n\ntype Props = {};\n\nexport class ToggleThemeButtonClass extends React.Component<Props> {\n  static contextType = ThemeContext;\n  declare context: React.ContextType<typeof ThemeContext>;\n\n  render() {\n    const { theme, toggleTheme } = this.context;\n    return (\n      <button style={theme} onClick={toggleTheme}>\n        Toggle Theme\n      </button>\n    );\n  }\n}\n\n```\n\n[Implementation with Hooks](#--usecontext)\n\n[⇧ back to top](#table-of-contents)\n\n\n---\n\n# Redux\n\n## Store Configuration\n\n### Create Global Store Types\n\n#### `RootState` - type representing root state-tree\n\nCan be imported in connected components to provide type-safety to Redux `connect` function\n\n#### `RootAction` - type representing union type of all action objects\n\nCan be imported in various layers receiving or sending redux actions like: reducers, sagas or redux-observables epics\n\n```tsx\nimport { StateType, ActionType } from 'typesafe-actions';\n\ndeclare module 'MyTypes' {\n  export type Store = StateType<typeof import('./store').default>;\n  export type RootAction = ActionType<typeof import('./root-action').default>;\n  export type RootState = StateType<ReturnType<typeof import('./root-reducer').default>>;\n}\n\ndeclare module 'typesafe-actions' {\n  interface Types {\n    RootAction: ActionType<typeof import('./root-action').default>;\n  }\n}\n\n```\n\n[⇧ back to top](#table-of-contents)\n\n### Create Store\n\nWhen creating a store instance we don't need to provide any additional types. It will set-up a **type-safe Store instance** using type inference.\n> The resulting store instance methods like `getState` or `dispatch` will be type checked and will expose all type errors\n\n```tsx\nimport { RootAction, RootState, Services } from 'MyTypes';\nimport { applyMiddleware, createStore } from 'redux';\nimport { createEpicMiddleware } from 'redux-observable';\n\nimport services from '../services';\nimport { routerMiddleware } from './redux-router';\nimport rootEpic from './root-epic';\nimport rootReducer from './root-reducer';\nimport { composeEnhancers } from './utils';\n\nconst epicMiddleware = createEpicMiddleware<\n  RootAction,\n  RootAction,\n  RootState,\n  Services\n>({\n  dependencies: services,\n});\n\n// configure middlewares\nconst middlewares = [epicMiddleware, routerMiddleware];\n// compose enhancers\nconst enhancer = composeEnhancers(applyMiddleware(...middlewares));\n\n// rehydrate state on app start\nconst initialState = {};\n\n// create store\nconst store = createStore(\n  rootReducer,\n  initialState,\n  enhancer\n);\n\nepicMiddleware.run(rootEpic);\n\n// export store singleton instance\nexport default store;\n\n```\n\n---\n\n## Action Creators 🌟\n\n> We'll be using a battle-tested helper library [`typesafe-actions`](https://github.com/piotrwitek/typesafe-actions#typesafe-actions) [![Latest Stable Version](https://img.shields.io/npm/v/typesafe-actions.svg)](https://www.npmjs.com/package/typesafe-actions) [![NPM Downloads](https://img.shields.io/npm/dt/typesafe-actions.svg)](https://www.npmjs.com/package/typesafe-actions) that's designed to make it easy and fun working with **Redux** in **TypeScript**.\n\n> To learn more please check this in-depth tutorial: [Typesafe-Actions - Tutorial](https://github.com/piotrwitek/typesafe-actions#tutorial)!\n\nA solution below is using a simple factory function to automate the creation of type-safe action creators. The goal is to decrease maintenance effort and reduce code repetition of type annotations for actions and creators. The result is completely typesafe action-creators and their actions.\n\n```tsx\n/* eslint-disable */\nimport { action } from 'typesafe-actions';\n\nimport { ADD, INCREMENT } from './constants';\n\n/* SIMPLE API */\n\nexport const increment = () => action(INCREMENT);\nexport const add = (amount: number) => action(ADD, amount);\n\n/* ADVANCED API */\n\n// More flexible allowing to create complex actions more easily\n// use can use \"action-creator\" instance in place of \"type constant\"\n// e.g. case getType(increment): return action.payload;\n// This will allow to completely eliminate need for \"constants\" in your application, more info here:\n// https://github.com/piotrwitek/typesafe-actions#constants\n\nimport { createAction } from 'typesafe-actions';\nimport { Todo } from '../todos/models';\n\nexport const emptyAction = createAction(INCREMENT)<void>();\nexport const payloadAction = createAction(ADD)<number>();\nexport const payloadMetaAction = createAction(ADD)<number, string>();\n\nexport const payloadCreatorAction = createAction(\n  'TOGGLE_TODO',\n  (todo: Todo) => todo.id\n)<string>();\n\n```\n<details><summary><i>Click to expand</i></summary><p>\n\n```tsx\nimport { store } from '../../store/';\nimport { countersActions as counter } from '../counters';\n\n// store.dispatch(counter.increment(1)); // Error: Expected 0 arguments, but got 1.\nstore.dispatch(counter.increment()); // OK\n\n// store.dispatch(counter.add()); // Error: Expected 1 arguments, but got 0.\nstore.dispatch(counter.add(1)); // OK\n\n```\n</p></details>\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n## Reducers\n\n### State with Type-level Immutability\n\nDeclare reducer `State` type with `readonly` modifier to get compile time immutability\n\n```ts\nexport type State = {\n  readonly counter: number;\n  readonly todos: ReadonlyArray<string>;\n};\n```\n\nReadonly modifier allow initialization, but will not allow reassignment by highlighting compiler errors\n\n```ts\nexport const initialState: State = {\n  counter: 0,\n}; // OK\n\ninitialState.counter = 3; // TS Error: cannot be mutated\n```\n\nIt's great for **Arrays in JS** because it will error when using mutator methods like (`push`, `pop`, `splice`, ...), but it'll still allow immutable methods like (`concat`, `map`, `slice`,...).\n\n```ts\nstate.todos.push('Learn about tagged union types') // TS Error: Property 'push' does not exist on type 'ReadonlyArray<string>'\nconst newTodos = state.todos.concat('Learn about tagged union types') // OK\n```\n\n#### Caveat - `Readonly` is not recursive\n\nThis means that the `readonly` modifier doesn't propagate immutability down the nested structure of objects. You'll need to mark each property on each level explicitly.\n\n> **TIP:** use `Readonly` or `ReadonlyArray` [Mapped types](https://www.typescriptlang.org/docs/handbook/advanced-types.html)\n\n```ts\nexport type State = Readonly<{\n  counterPairs: ReadonlyArray<Readonly<{\n    immutableCounter1: number,\n    immutableCounter2: number,\n  }>>,\n}>;\n\nstate.counterPairs[0] = { immutableCounter1: 1, immutableCounter2: 1 }; // TS Error: cannot be mutated\nstate.counterPairs[0].immutableCounter1 = 1; // TS Error: cannot be mutated\nstate.counterPairs[0].immutableCounter2 = 1; // TS Error: cannot be mutated\n```\n\n#### Solution - recursive `Readonly` is called `DeepReadonly`\n\nTo fix this we can use [`DeepReadonly`](https://github.com/piotrwitek/utility-types#deepreadonlyt) type (available from `utility-types`).\n\n```ts\nimport { DeepReadonly } from 'utility-types';\n\nexport type State = DeepReadonly<{\n  containerObject: {\n    innerValue: number,\n    numbers: number[],\n  }\n}>;\n\nstate.containerObject = { innerValue: 1 }; // TS Error: cannot be mutated\nstate.containerObject.innerValue = 1; // TS Error: cannot be mutated\nstate.containerObject.numbers.push(1); // TS Error: cannot use mutator methods\n```\n\n[⇧ back to top](#table-of-contents)\n\n### Typing reducer\n\n> to understand following section make sure to learn about [Type Inference](https://www.typescriptlang.org/docs/handbook/type-inference.html), [Control flow analysis](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#control-flow-based-type-analysis) and [Tagged union types](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#tagged-union-types)\n\n```tsx\nimport { combineReducers } from 'redux';\nimport { ActionType } from 'typesafe-actions';\n\nimport { Todo, TodosFilter } from './models';\nimport * as actions from './actions';\nimport { ADD, CHANGE_FILTER, TOGGLE } from './constants';\n\nexport type TodosAction = ActionType<typeof actions>;\n\nexport type TodosState = Readonly<{\n  todos: Todo[];\n  todosFilter: TodosFilter;\n}>;\nconst initialState: TodosState = {\n  todos: [],\n  todosFilter: TodosFilter.All,\n};\n\nexport default combineReducers<TodosState, TodosAction>({\n  todos: (state = initialState.todos, action) => {\n    switch (action.type) {\n      case ADD:\n        return [...state, action.payload];\n\n      case TOGGLE:\n        return state.map(item =>\n          item.id === action.payload\n            ? { ...item, completed: !item.completed }\n            : item\n        );\n\n      default:\n        return state;\n    }\n  },\n  todosFilter: (state = initialState.todosFilter, action) => {\n    switch (action.type) {\n      case CHANGE_FILTER:\n        return action.payload;\n\n      default:\n        return state;\n    }\n  },\n});\n\n```\n\n[⇧ back to top](#table-of-contents)\n\n### Typing reducer with `typesafe-actions`\n\n> Notice we are not required to use any generic type parameter in the API. Try to compare it with regular reducer as they are equivalent.\n\n```tsx\nimport { combineReducers } from 'redux';\nimport { createReducer } from 'typesafe-actions';\n\nimport { Todo, TodosFilter } from './models';\nimport { ADD, CHANGE_FILTER, TOGGLE } from './constants';\n\nexport type TodosState = Readonly<{\n  todos: Todo[];\n  todosFilter: TodosFilter;\n}>;\nconst initialState: TodosState = {\n  todos: [],\n  todosFilter: TodosFilter.All,\n};\n\nconst todos = createReducer(initialState.todos)\n  .handleType(ADD, (state, action) => [...state, action.payload])\n  .handleType(TOGGLE, (state, action) =>\n    state.map(item =>\n      item.id === action.payload\n        ? { ...item, completed: !item.completed }\n        : item\n    )\n  );\n\nconst todosFilter = createReducer(initialState.todosFilter).handleType(\n  CHANGE_FILTER,\n  (state, action) => action.payload\n);\n\nexport default combineReducers({\n  todos,\n  todosFilter,\n});\n\n```\n\n[⇧ back to top](#table-of-contents)\n\n### Testing reducer\n\n```tsx\nimport {\n  todosReducer as reducer,\n  todosActions as actions,\n} from './';\nimport { TodosState } from './reducer';\n\n/**\n * FIXTURES\n */\nconst getInitialState = (initial?: Partial<TodosState>) =>\n  reducer(initial as TodosState, {} as any);\n\n/**\n * STORIES\n */\ndescribe('Todos Stories', () => {\n  describe('initial state', () => {\n    it('should match a snapshot', () => {\n      const initialState = getInitialState();\n      expect(initialState).toMatchSnapshot();\n    });\n  });\n\n  describe('adding todos', () => {\n    it('should add a new todo as the first element', () => {\n      const initialState = getInitialState();\n      expect(initialState.todos).toHaveLength(0);\n      const state = reducer(initialState, actions.add('new todo'));\n      expect(state.todos).toHaveLength(1);\n      expect(state.todos[0].title).toEqual('new todo');\n    });\n  });\n\n  describe('toggling completion state', () => {\n    it('should mark active todo as complete', () => {\n      const activeTodo = { id: '1', completed: false, title: 'active todo' };\n      const initialState = getInitialState({ todos: [activeTodo] });\n      expect(initialState.todos[0].completed).toBeFalsy();\n      const state1 = reducer(initialState, actions.toggle(activeTodo.id));\n      expect(state1.todos[0].completed).toBeTruthy();\n    });\n  });\n});\n\n```\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n## Async Flow with `redux-observable`\n\n### Typing epics\n\n```tsx\nimport { RootAction, RootState, Services } from 'MyTypes';\nimport { Epic } from 'redux-observable';\nimport { tap, ignoreElements, filter } from 'rxjs/operators';\nimport { isOfType } from 'typesafe-actions';\n\nimport { todosConstants } from '../todos';\n\n// contrived example!!!\nexport const logAddAction: Epic<RootAction, RootAction, RootState, Services> = (\n  action$,\n  state$,\n  { logger }\n) =>\n  action$.pipe(\n    filter(isOfType(todosConstants.ADD)), // action is narrowed to: { type: \"ADD_TODO\"; payload: string; }\n    tap(action => {\n      logger.log(\n        `action type must be equal: ${todosConstants.ADD} === ${action.type}`\n      );\n    }),\n    ignoreElements()\n  );\n\n```\n\n[⇧ back to top](#table-of-contents)\n\n### Testing epics\n\n```tsx\nimport { StateObservable, ActionsObservable } from 'redux-observable';\nimport { RootState, RootAction } from 'MyTypes';\nimport { Subject } from 'rxjs';\n\nimport { add } from './actions';\nimport { logAddAction } from './epics';\n\n// Simple typesafe mock of all the services, you dont't need to mock anything else\n// It is decoupled and reusable for all your tests, just put it in a separate file\nconst services = {\n  logger: {\n    log: jest.fn(),\n  },\n  localStorage: {\n    loadState: jest.fn(),\n    saveState: jest.fn(),\n  },\n};\n\ndescribe('Todos Epics', () => {\n  let state$: StateObservable<RootState>;\n\n  beforeEach(() => {\n    state$ = new StateObservable<RootState>(\n      new Subject<RootState>(),\n      undefined as any\n    );\n  });\n\n  describe('logging todos actions', () => {\n    beforeEach(() => {\n      services.logger.log.mockClear();\n    });\n\n    it('should call the logger service when adding a new todo', done => {\n      const addTodoAction = add('new todo');\n      const action$ = ActionsObservable.of(addTodoAction);\n\n      logAddAction(action$, state$, services)\n        .toPromise()\n        .then((outputAction: RootAction) => {\n          expect(services.logger.log).toHaveBeenCalledTimes(1);\n          expect(services.logger.log).toHaveBeenCalledWith(\n            'action type must be equal: todos/ADD === todos/ADD'\n          );\n          // expect output undefined because we're using \"ignoreElements\" in epic\n          expect(outputAction).toEqual(undefined);\n          done();\n        });\n    });\n  });\n});\n\n```\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n## Selectors with `reselect`\n\n```tsx\nimport { createSelector } from 'reselect';\n\nimport { TodosState } from './reducer';\n\nexport const getTodos = (state: TodosState) => state.todos;\n\nexport const getTodosFilter = (state: TodosState) => state.todosFilter;\n\nexport const getFilteredTodos = createSelector(getTodos, getTodosFilter, (todos, todosFilter) => {\n  switch (todosFilter) {\n    case 'completed':\n      return todos.filter(t => t.completed);\n    case 'active':\n      return todos.filter(t => !t.completed);\n\n    default:\n      return todos;\n  }\n});\n\n```\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n## Connect with `react-redux`\n\n### Typing connected component\n\n_**NOTE**: Below you'll find a short explanation of concepts behind using `connect` with TypeScript. For more detailed examples please check [Redux Connected Components](#redux-connected-components) section._\n\n```tsx\nimport MyTypes from 'MyTypes';\n\nimport { bindActionCreators, Dispatch, ActionCreatorsMapObject } from 'redux';\nimport { connect } from 'react-redux';\n\nimport { countersActions } from '../features/counters';\nimport { FCCounter } from '../components';\n\n// Type annotation for \"state\" argument is mandatory to check \n// the correct shape of state object and injected props you can also\n// extend connected component Props interface by annotating `ownProps` argument\nconst mapStateToProps = (state: MyTypes.RootState, ownProps: FCCounterProps) => ({\n  count: state.counters.reduxCounter,\n});\n\n// \"dispatch\" argument needs an annotation to check the correct shape\n//  of an action object when using dispatch function\nconst mapDispatchToProps = (dispatch: Dispatch<MyTypes.RootAction>) =>\n  bindActionCreators({\n    onIncrement: countersActions.increment,\n  }, dispatch);\n\n// shorter alternative is to use an object instead of mapDispatchToProps function\nconst dispatchToProps = {\n    onIncrement: countersActions.increment,\n};\n\n// Notice we don't need to pass any generic type parameters to neither\n// the connect function below nor map functions declared above\n// because type inference will infer types from arguments annotations automatically\n// This is much cleaner and idiomatic approach\nexport const FCCounterConnected =\n  connect(mapStateToProps, mapDispatchToProps)(FCCounter);\n\n// You can add extra layer of validation of your action creators\n// by using bindActionCreators generic type parameter and RootAction type\nconst mapDispatchToProps = (dispatch: Dispatch<MyTypes.RootAction>) =>\n  bindActionCreators<ActionCreatorsMapObject<Types.RootAction>>({\n    invalidActionCreator: () => 1, // Error: Type 'number' is not assignable to type '{ type: \"todos/ADD\"; payload: Todo; } | { ... }\n  }, dispatch);\n\n```\n\n[⇧ back to top](#table-of-contents)\n\n### Typing `useSelector` and `useDispatch`\n\n```tsx\nimport { Dispatch } from 'redux';\nimport {\n  TypedUseSelectorHook,\n  useSelector as useGenericSelector,\n  useDispatch as useGenericDispatch\n} from 'react-redux';\nimport { RootState, RootAction } from 'MyTypes';\n\nexport const useSelector: TypedUseSelectorHook<RootState> = useGenericSelector;\n\nexport const useDispatch: () => Dispatch<RootAction> = useGenericDispatch;\n\n```\n\n[⇧ back to top](#table-of-contents)\n\n### Typing connected component with `redux-thunk` integration\n\n_**NOTE**: When using thunk action creators you need to use `bindActionCreators`. Only this way you can get corrected dispatch props type signature like below.*_\n\n_**WARNING**: As of now (Apr 2019) `bindActionCreators` signature of the latest `redux-thunk` release will not work as below, you need to use our modified type definitions that you can find here [`/playground/typings/redux-thunk/index.d.ts`](./playground/typings/redux-thunk/index.d.ts) and then add `paths` overload in your tsconfig like this: [`\"paths\":{\"redux-thunk\":[\"typings/redux-thunk\"]}`](./playground/tsconfig.json)._\n\n```tsx\nconst thunkAsyncAction = () => async (dispatch: Dispatch): Promise<void> => {\n  // dispatch actions, return Promise, etc.\n}\n\nconst mapDispatchToProps = (dispatch: Dispatch<Types.RootAction>) =>\n  bindActionCreators(\n    {\n      thunkAsyncAction,\n    },\n    dispatch\n  );\n\ntype DispatchProps = ReturnType<typeof mapDispatchToProps>;\n// { thunkAsyncAction: () => Promise<void>; }\n\n/* Without \"bindActionCreators\" fix signature will be the same as the original \"unbound\" thunk function: */\n// { thunkAsyncAction: () => (dispatch: Dispatch<AnyAction>) => Promise<void>; }\n```\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n# Configuration & Dev Tools\n\n## Common Npm Scripts\n\n> Common TS-related npm scripts shared across projects\n\n```json\n\"prettier\": \"prettier --list-different 'src/**/*.ts' || (echo '\\nPlease fix code formatting by running:\\nnpm run prettier:fix\\n'; exit 1)\",\n\"prettier:fix\": \"prettier --write 'src/**/*.ts'\",\n\"lint\": \"eslint ./src --ext .js,.jsx,.ts,.tsx\",\n\"tsc\": \"tsc -p ./ --noEmit\",\n\"tsc:watch\": \"tsc -p ./ --noEmit -w\",\n\"test\": \"jest --config jest.config.json\",\n\"test:watch\": \"jest --config jest.config.json --watch\",\n\"test:update\": \"jest --config jest.config.json -u\"\n\"ci-check\": \"npm run prettier && npm run lint && npm run tsc && npm run test\",\n```\n\n[⇧ back to top](#table-of-contents)\n\n## tsconfig.json\n\nWe have recommended `tsconfig.json` that you can easily add to your project thanks to [`react-redux-typescript-scripts`](https://github.com/piotrwitek/react-redux-typescript-scripts) package.\n\n<details><summary><i>Click to expand</i></summary><p>\n\n```tsx\n{\n  \"compilerOptions\": {\n    \"target\": \"ES6\",\n    \"lib\": [\n      \"dom\",\n      \"dom.iterable\",\n      \"esnext\"\n    ],\n    \"allowJs\": true,\n    \"skipLibCheck\": true,\n    \"esModuleInterop\": true,\n    \"allowSyntheticDefaultImports\": true,\n    \"strict\": true,\n    \"forceConsistentCasingInFileNames\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"module\": \"esnext\",\n    \"moduleResolution\": \"node\",\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\"\n  },\n  \"include\": [\n    \"src\",\n    \"typings\"\n  ]\n}\n\n```\n</p></details>\n\n[⇧ back to top](#table-of-contents)\n\n## TSLib\n\nThis library will cut down on your bundle size, thanks to using external runtime helpers instead of adding them per each file.\n\n> <https://www.npmjs.com/package/tslib>\n\n> Installation  \n`npm i tslib`\n\n\nThen add this to your `tsconfig.json`:\n\n```ts\n\"compilerOptions\": {\n  \"importHelpers\": true\n}\n```\n\n[⇧ back to top](#table-of-contents)\n\n## ESLint\n\nWe have recommended config that will automatically add a parser & plugin for TypeScript thanks to [`react-redux-typescript-scripts`](https://github.com/piotrwitek/react-redux-typescript-scripts) package.\n\n> <https://typescript-eslint.io>\n\n> Installation\n`npm i -D eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin`\n\n\n### .eslintrc.js\n\n<details><summary><i>Click to expand</i></summary><p>\n\n```tsx\nmodule.exports = {\n  root: true,\n  parser: '@typescript-eslint/parser',\n  plugins: ['@typescript-eslint'],\n  extends: ['react-app', 'react-app/jest', 'prettier'],\n  rules: { 'import/no-anonymous-default-export': 0 },\n};\n\n```\n</p></details>\n\n[⇧ back to top](#table-of-contents)\n\n## Jest\n\n> <https://jestjs.io/>\n\n> Installation  \n`npm i -D jest ts-jest @types/jest`\n\n### jest.config.json\n\n<details><summary><i>Click to expand</i></summary><p>\n\n```tsx\n{\n  \"verbose\": true,\n  \"transform\": {\n    \".(ts|tsx)\": \"ts-jest\"\n  },\n  \"testRegex\": \"(/spec/.*|\\\\.(test|spec))\\\\.(ts|tsx|js)$\",\n  \"moduleFileExtensions\": [\"ts\", \"tsx\", \"js\"],\n  \"moduleNameMapper\": {\n    \"^Components/(.*)\": \"./src/components/$1\"\n  },\n  \"globals\": {\n    \"window\": {},\n    \"ts-jest\": {\n      \"tsConfig\": \"./tsconfig.json\"\n    }\n  },\n  \"setupFiles\": [\"./jest.stubs.js\"],\n  \"testURL\": \"http://localhost/\"\n}\n\n```\n</p></details>\n\n### jest.stubs.js\n\n<details><summary><i>Click to expand</i></summary><p>\n\n```tsx\n// Global/Window object Stubs for Jest\nwindow.matchMedia = window.matchMedia || function () {\n  return {\n    matches: false,\n    addListener: function () { },\n    removeListener: function () { },\n  };\n};\n\nwindow.requestAnimationFrame = function (callback) {\n  setTimeout(callback);\n};\n\nwindow.localStorage = {\n  getItem: function () { },\n  setItem: function () { },\n};\n\nObject.values = () => [];\n\n```\n</p></details>\n\n[⇧ back to top](#table-of-contents)\n\n## Style Guides\n\n### [react-styleguidist](https://github.com/styleguidist/react-styleguidist)\n\n[⟩⟩⟩ styleguide.config.js](/playground/styleguide.config.js)  \n\n[⟩⟩⟩ demo](https://piotrwitek.github.io/react-redux-typescript-guide/)\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n# FAQ\n\n\n## Ambient Modules\n\n### Imports in ambient modules\n\nFor type augmentation imports should stay outside of module declaration.\n\n```ts\nimport { Operator } from 'rxjs/Operator';\nimport { Observable } from 'rxjs/Observable';\n\ndeclare module 'rxjs/Subject' {\n  interface Subject<T> {\n    lift<R>(operator: Operator<T, R>): Observable<R>;\n  }\n}\n```\n\nWhen creating 3rd party type-definitions all the imports should be kept inside the module declaration, otherwise it will be treated as augmentation and show error\n\n```ts\ndeclare module \"react-custom-scrollbars\" {\n    import * as React from \"react\";\n    export interface positionValues {\n    ...\n```\n\n[⇧ back to top](#table-of-contents)\n\n## Type-Definitions\n\n### Missing type-definitions error\n\nif you cannot find types for a third-party module you can provide your own types or disable type-checking for this module using [Shorthand Ambient Modules](https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/Modules.md#shorthand-ambient-modules)\n\n```tsx\n// typings/modules.d.ts\ndeclare module 'MyTypes';\ndeclare module 'react-test-renderer';\ndeclare module '@storybook/addon-storyshots'\n\n```\n\n### Using custom `d.ts` files for npm modules\n\nIf you want to use an alternative (customized) type-definitions for some npm module (that usually comes with it's own type-definitions), you can do it by adding an override in `paths` compiler option.\n\n```ts\n{\n  \"compilerOptions\": {\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"redux\": [\"typings/redux\"], // use an alternative type-definitions instead of the included one\n      ...\n    },\n    ...,\n  }\n}\n```\n\n[⇧ back to top](#table-of-contents)\n\n## Type Augmentation\n\nStrategies to fix issues coming from external type-definitions files (*.d.ts)\n\n### Augmenting library internal declarations - using relative import\n\n```ts\n// added missing autoFocus Prop on Input component in \"antd@2.10.0\" npm package\ndeclare module '../node_modules/antd/lib/input/Input' {\n  export interface InputProps {\n    autoFocus?: boolean;\n  }\n}\n```\n\n### Augmenting library public declarations - using node_modules import\n\n```ts\n// fixed broken public type-definitions in \"rxjs@5.4.1\" npm package\nimport { Operator } from 'rxjs/Operator';\nimport { Observable } from 'rxjs/Observable';\n\ndeclare module 'rxjs/Subject' {\n  interface Subject<T> {\n    lift<R>(operator: Operator<T, R>): Observable<R>;\n  }\n}\n```\n\n> More advanced scenarios for working with vendor type-definitions can be found here [Official TypeScript Docs](https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/Modules.md#working-with-other-javascript-libraries)\n\n[⇧ back to top](#table-of-contents)\n\n## Misc\n\n### - should I still use React.PropTypes in TS?\n\nNo. With TypeScript, using PropTypes is an unnecessary overhead. When declaring Props and State interfaces, you will get complete intellisense and design-time safety with static type checking. This way you'll be safe from runtime errors and you will save a lot of time on debugging. Additional benefit is an elegant and standardized method of documenting your component public API in the source code.  \n\n[⇧ back to top](#table-of-contents)\n\n### - when to use `interface` declarations and when `type` aliases?\n\nFrom practical side, using `interface` declaration will create an identity (interface name) in compiler errors, on the contrary `type` aliases doesn't create an identity and will be unwinded to show all the properties and nested types it consists of.  \nAlthough I prefer to use `type` most of the time there are some places this can become too noisy when reading compiler errors and that's why I like to leverage this distinction to hide some of not so important type details in errors using interfaces identity.\nRelated `ts-lint` rule: <https://palantir.github.io/tslint/rules/interface-over-type-literal/>  \n\n[⇧ back to top](#table-of-contents)\n\n### - what's better default or named exports?\n\nA common flexible solution is to use module folder pattern, because you can leverage both named and default import when you see fit.  \nWith this solution you'll achieve better encapsulation and be able to safely refactor internal naming and folders structure without breaking your consumer code:\n\n```ts\n// 1. create your component files (`select.tsx`) using default export in some folder:\n\n// components/select.tsx\nconst Select: React.FC<Props> = (props) => {\n...\nexport default Select;\n\n// 2. in this folder create an `index.ts` file that will re-export components with named exports:\n\n// components/index.ts\nexport { default as Select } from './select';\n...\n\n// 3. now you can import your components in both ways, with named export (better encapsulation) or using default export (internal access):\n\n// containers/container.tsx\nimport { Select } from '@src/components';\nor\nimport Select from '@src/components/select';\n...\n```\n\n[⇧ back to top](#table-of-contents)\n\n### - how to best initialize class instance or static properties?\n\nPrefered modern syntax is to use class Property Initializers  \n\n```tsx\nclass ClassCounterWithInitialCount extends React.Component<Props, State> {\n  // default props using Property Initializers\n  static defaultProps: DefaultProps = {\n    className: 'default-class',\n    initialCount: 0,\n  };\n  \n  // initial state using Property Initializers\n  state: State = {\n    count: this.props.initialCount,\n  };\n  ...\n}\n```\n\n[⇧ back to top](#table-of-contents)\n\n### - how to best declare component handler functions?\n\nPrefered modern syntax is to use Class Fields with arrow functions  \n\n```tsx\nclass ClassCounter extends React.Component<Props, State> {\n// handlers using Class Fields with arrow functions\n  handleIncrement = () => {\n    this.setState({ count: this.state.count + 1 });\n  };\n  ...\n}\n```\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n# Tutorials & Articles\n\n> Curated list of relevant in-depth tutorials\n\nHigher-Order Components:\n\n- <https://medium.com/@jrwebdev/react-higher-order-component-patterns-in-typescript-42278f7590fb>\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n# Contributors\n\nThanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore -->\n| [<img src=\"https://avatars0.githubusercontent.com/u/739075?v=4\" width=\"100px;\"/><br /><sub><b>Piotrek Witek</b></sub>](https://github.com/piotrwitek)<br />[💻](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=piotrwitek \"Code\") [📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=piotrwitek \"Documentation\") [🤔](#ideas-piotrwitek \"Ideas, Planning, & Feedback\") [👀](#review-piotrwitek \"Reviewed Pull Requests\") [💬](#question-piotrwitek \"Answering Questions\") | [<img src=\"https://avatars3.githubusercontent.com/u/8602615?v=4\" width=\"100px;\"/><br /><sub><b>Kazz Yokomizo</b></sub>](https://github.com/kazup01)<br />[💵](#financial-kazup01 \"Financial\") [🔍](#fundingFinding-kazup01 \"Funding Finding\") | [<img src=\"https://avatars1.githubusercontent.com/u/366438?v=4\" width=\"100px;\"/><br /><sub><b>Jake Boone</b></sub>](https://github.com/jakeboone02)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=jakeboone02 \"Documentation\") | [<img src=\"https://avatars1.githubusercontent.com/u/9748762?v=4\" width=\"100px;\"/><br /><sub><b>Amit Dahan</b></sub>](https://github.com/amitdahan)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=amitdahan \"Documentation\") | [<img src=\"https://avatars1.githubusercontent.com/u/98167?v=4\" width=\"100px;\"/><br /><sub><b>gulderov</b></sub>](https://github.com/gulderov)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=gulderov \"Documentation\") | [<img src=\"https://avatars1.githubusercontent.com/u/1964212?v=4\" width=\"100px;\"/><br /><sub><b>Erik Pearson</b></sub>](https://github.com/emp823)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=emp823 \"Documentation\") | [<img src=\"https://avatars1.githubusercontent.com/u/5342677?v=4\" width=\"100px;\"/><br /><sub><b>Bryan Mason</b></sub>](https://github.com/flymason)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=flymason \"Documentation\") |\n| :---: | :---: | :---: | :---: | :---: | :---: | :---: |\n| [<img src=\"https://avatars1.githubusercontent.com/u/119451?v=4\" width=\"100px;\"/><br /><sub><b>Jakub Chodorowicz</b></sub>](http://www.jakub.chodorowicz.pl/)<br />[💻](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=chodorowicz \"Code\") | [<img src=\"https://avatars1.githubusercontent.com/u/7266431?v=4\" width=\"100px;\"/><br /><sub><b>Oleg Maslov</b></sub>](https://github.com/mleg)<br />[🐛](https://github.com/piotrwitek/react-redux-typescript-guide/issues?q=author%3Amleg \"Bug reports\") | [<img src=\"https://avatars0.githubusercontent.com/u/3393293?v=4\" width=\"100px;\"/><br /><sub><b>Aaron Westbrook</b></sub>](https://github.com/awestbro)<br />[🐛](https://github.com/piotrwitek/react-redux-typescript-guide/issues?q=author%3Aawestbro \"Bug reports\") | [<img src=\"https://avatars3.githubusercontent.com/u/14539?v=4\" width=\"100px;\"/><br /><sub><b>Peter Blazejewicz</b></sub>](http://www.linkedin.com/in/peterblazejewicz)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=peterblazejewicz \"Documentation\") | [<img src=\"https://avatars3.githubusercontent.com/u/1642?v=4\" width=\"100px;\"/><br /><sub><b>Solomon White</b></sub>](https://github.com/rubysolo)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=rubysolo \"Documentation\") | [<img src=\"https://avatars2.githubusercontent.com/u/8838006?v=4\" width=\"100px;\"/><br /><sub><b>Levi Rocha</b></sub>](https://github.com/pino)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=pino \"Documentation\") | [<img src=\"https://avatars1.githubusercontent.com/u/41281835?v=4\" width=\"100px;\"/><br /><sub><b>Sudachi-kun</b></sub>](http://cloudnative.co.jp)<br />[💵](#financial-loadbalance-sudachi-kun \"Financial\") |\n| [<img src=\"https://avatars1.githubusercontent.com/u/14838850?v=4\" width=\"100px;\"/><br /><sub><b>Sosuke Suzuki</b></sub>](http://sosukesuzuki.github.io)<br />[💻](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=sosukesuzuki \"Code\") | [<img src=\"https://avatars0.githubusercontent.com/u/74433?v=4\" width=\"100px;\"/><br /><sub><b>Tom Rathbone</b></sub>](https://github.com/chillitom)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=chillitom \"Documentation\") | [<img src=\"https://avatars3.githubusercontent.com/u/4654382?v=4\" width=\"100px;\"/><br /><sub><b>Arshad Kazmi</b></sub>](https://arshadkazmi42.github.io/)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=arshadkazmi42 \"Documentation\") | [<img src=\"https://avatars1.githubusercontent.com/u/8815362?v=4\" width=\"100px;\"/><br /><sub><b>JeongUkJae</b></sub>](https://jeongukjae.github.io)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=JeongUkJae \"Documentation\") |\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!\n\n---\n\nMIT License\n\nCopyright (c) 2017 Piotr Witek <piotrek.witek@gmail.com> (<https://piotrwitek.github.io>)\n"
  },
  {
    "path": "README_SOURCE.md",
    "content": "<div align=\"center\">\n\n# React & Redux in TypeScript - Complete Guide\n\n_\"This guide is a **living compendium** documenting the most important patterns and recipes on how to use **React** (and its Ecosystem) in a **functional style** using **TypeScript**. It will help you make your code **completely type-safe** while focusing on **inferring the types from implementation** so there is less noise coming from excessive type annotations and it's easier to write and maintain correct types in the long run.\"_\n\n[![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/react-redux-ts)\n[![Join the chat at https://gitter.im/react-redux-typescript-guide/Lobby](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/react-redux-typescript-guide/Lobby)\n\n_Found it useful? Want more updates?_\n\n[**Show your support by giving a :star:**](https://github.com/piotrwitek/react-redux-typescript-guide/stargazers)\n\n<a href=\"https://www.buymeacoffee.com/piotrekwitek\">\n  <img src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy Me a Coffee\">\n</a>\n<a href=\"https://www.patreon.com/piotrekwitek\">\n  <img src=\"https://c5.patreon.com/external/logo/become_a_patron_button@2x.png\" alt=\"Become a Patron\" width=\"160\">\n</a>\n\n<br/><hr/>\n\n## **What's new?**\n\n:tada: _Now updated to support **TypeScript v4.6**_ :tada:\n:rocket: _Updated to `typesafe-actions@5.x` :rocket:\n\n<hr/><br/>\n\n</div>\n\n### **Goals**\n\n- Complete type safety (with [`--strict`](https://www.typescriptlang.org/docs/handbook/compiler-options.html) flag) without losing type information downstream through all the layers of our application (e.g. no type assertions or hacking with `any` type)\n- Make type annotations concise by eliminating redundancy in types using advanced TypeScript Language features like **Type Inference** and **Control flow analysis**\n- Reduce repetition and complexity of types with TypeScript focused [complementary libraries](#react-redux-typescript-ecosystem)\n\n### **React, Redux, Typescript Ecosystem**\n\n- [typesafe-actions](https://github.com/piotrwitek/typesafe-actions) - Typesafe utilities for \"action-creators\" in Redux / Flux Architecture  \n- [utility-types](https://github.com/piotrwitek/utility-types) - Collection of generic types for TypeScript, complementing built-in mapped types and aliases - think lodash for reusable types.  \n- [react-redux-typescript-scripts](https://github.com/piotrwitek/react-redux-typescript-scripts) - dev-tools configuration files shared between projects based on this guide  \n\n### **Examples**\n\n- Todo-App playground: [Codesandbox](https://codesandbox.io/s/github/piotrwitek/typesafe-actions/tree/master/codesandbox)\n- React, Redux, TypeScript - RealWorld App: [Github](https://github.com/piotrwitek/react-redux-typescript-realworld-app) | [Demo](https://react-redux-typescript-realworld-app.netlify.com/)\n\n### **Playground Project**\n\n[![Build Status](https://semaphoreci.com/api/v1/piotrekwitek/react-redux-typescript-guide/branches/master/shields_badge.svg)](https://semaphoreci.com/piotrekwitek/react-redux-typescript-guide)\n\nCheck out our Playground Project located in the `/playground` folder. It contains all source files of the code examples found in the guide. They are all tested with the most recent version of TypeScript and 3rd party type-definitions (like `@types/react` or `@types/react-redux`) to ensure the examples are up-to-date and not broken with updated definitions (It's based on `create-react-app --typescript`).\n> Playground project was created so that you can simply clone the repository locally and immediately play around with all the component patterns found in the guide. It will help you to learn all the examples from this guide in a real project environment without the need to create complicated environment setup by yourself.\n\n## Contributing Guide\n\nYou can help make this project better by contributing. If you're planning to contribute please make sure to check our contributing guide: [CONTRIBUTING.md](/CONTRIBUTING.md)\n\n## Funding\n\nYou can also help by funding issues.\nIssues like bug fixes or feature requests can be very quickly resolved when funded through the IssueHunt platform.\n\nI highly recommend to add a bounty to the issue that you're waiting for to increase priority and attract contributors willing to work on it.\n\n[![Let's fund issues in this repository](https://issuehunt.io/static/embed/issuehunt-button-v1.svg)](https://issuehunt.io/repos/76996763)\n\n---\n\n🌟 - _New or updated section_\n\n## Table of Contents\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n\n\n  - [React Types Cheatsheet](#react-types-cheatsheet)\n    - [`React.FC<Props>` | `React.FunctionComponent<Props>`](#reactfcprops--reactfunctioncomponentprops)\n    - [`React.Component<Props, State>`](#reactcomponentprops-state)\n    - [`React.ComponentType<Props>`](#reactcomponenttypeprops)\n    - [`React.ComponentProps<typeof XXX>`](#reactcomponentpropstypeof-xxx)\n    - [`React.ReactElement` | `JSX.Element`](#reactreactelement--jsxelement)\n    - [`React.ReactNode`](#reactreactnode)\n    - [`React.CSSProperties`](#reactcssproperties)\n    - [`React.XXXHTMLAttributes<HTMLXXXElement>`](#reactxxxhtmlattributeshtmlxxxelement)\n    - [`React.ReactEventHandler<HTMLXXXElement>`](#reactreacteventhandlerhtmlxxxelement)\n    - [`React.XXXEvent<HTMLXXXElement>`](#reactxxxeventhtmlxxxelement)\n- [React](#react)\n  - [Function Components - FC](#function-components---fc)\n    - [- Counter Component](#--counter-component)\n    - [- Counter Component with default props](#--counter-component-with-default-props)\n    - [- Spreading attributes in Component](#--spreading-attributes-in-component)\n  - [Class Components](#class-components)\n    - [- Class Counter Component](#--class-counter-component)\n    - [- Class Component with default props](#--class-component-with-default-props)\n  - [Generic Components](#generic-components)\n    - [- Generic List Component](#--generic-list-component)\n  - [Hooks](#hooks)\n    - [- useState](#--usestate)\n    - [- useContext](#--usecontext)\n    - [- useReducer](#--usereducer)\n  - [Render Props](#render-props)\n    - [- Name Provider Component](#--name-provider-component)\n    - [- Mouse Provider Component](#--mouse-provider-component)\n  - [Higher-Order Components](#higher-order-components)\n    - [- HOC wrapping a component](#--hoc-wrapping-a-component)\n    - [- HOC wrapping a component and injecting props](#--hoc-wrapping-a-component-and-injecting-props)\n    - [- Nested HOC - wrapping a component, injecting props and connecting to redux 🌟](#--nested-hoc---wrapping-a-component-injecting-props-and-connecting-to-redux-)\n  - [Redux Connected Components](#redux-connected-components)\n    - [- Redux connected counter](#--redux-connected-counter)\n    - [- Redux connected counter with own props](#--redux-connected-counter-with-own-props)\n    - [- Redux connected counter via hooks](#--redux-connected-counter-via-hooks)\n    - [- Redux connected counter with `redux-thunk` integration](#--redux-connected-counter-with-redux-thunk-integration)\n  - [Context](#context)\n    - [ThemeContext](#themecontext)\n    - [ThemeProvider](#themeprovider)\n    - [ThemeConsumer](#themeconsumer)\n    - [ThemeConsumer in class component](#themeconsumer-in-class-component)\n- [Redux](#redux)\n  - [Store Configuration](#store-configuration)\n    - [Create Global Store Types](#create-global-store-types)\n    - [Create Store](#create-store)\n  - [Action Creators 🌟](#action-creators-)\n  - [Reducers](#reducers)\n    - [State with Type-level Immutability](#state-with-type-level-immutability)\n    - [Typing reducer](#typing-reducer)\n    - [Typing reducer with `typesafe-actions`](#typing-reducer-with-typesafe-actions)\n    - [Testing reducer](#testing-reducer)\n  - [Async Flow with `redux-observable`](#async-flow-with-redux-observable)\n    - [Typing epics](#typing-epics)\n    - [Testing epics](#testing-epics)\n  - [Selectors with `reselect`](#selectors-with-reselect)\n  - [Connect with `react-redux`](#connect-with-react-redux)\n    - [Typing connected component](#typing-connected-component)\n    - [Typing `useSelector` and `useDispatch`](#typing-useselector-and-usedispatch)\n    - [Typing connected component with `redux-thunk` integration](#typing-connected-component-with-redux-thunk-integration)\n- [Configuration & Dev Tools](#configuration--dev-tools)\n  - [Common Npm Scripts](#common-npm-scripts)\n  - [tsconfig.json](#tsconfigjson)\n  - [TSLib](#tslib)\n  - [ESLint](#eslint)\n    - [.eslintrc.js](#eslintrcjs)\n  - [Jest](#jest)\n    - [jest.config.json](#jestconfigjson)\n    - [jest.stubs.js](#jeststubsjs)\n  - [Style Guides](#style-guides)\n    - [react-styleguidist](#react-styleguidist)\n- [FAQ](#faq)\n  - [Ambient Modules](#ambient-modules)\n    - [Imports in ambient modules](#imports-in-ambient-modules)\n  - [Type-Definitions](#type-definitions)\n    - [Missing type-definitions error](#missing-type-definitions-error)\n    - [Using custom `d.ts` files for npm modules](#using-custom-dts-files-for-npm-modules)\n  - [Type Augmentation](#type-augmentation)\n    - [Augmenting library internal declarations - using relative import](#augmenting-library-internal-declarations---using-relative-import)\n    - [Augmenting library public declarations - using node_modules import](#augmenting-library-public-declarations---using-node_modules-import)\n  - [Misc](#misc)\n    - [- should I still use React.PropTypes in TS?](#--should-i-still-use-reactproptypes-in-ts)\n    - [- when to use `interface` declarations and when `type` aliases?](#--when-to-use-interface-declarations-and-when-type-aliases)\n    - [- what's better default or named exports?](#--whats-better-default-or-named-exports)\n    - [- how to best initialize class instance or static properties?](#--how-to-best-initialize-class-instance-or-static-properties)\n    - [- how to best declare component handler functions?](#--how-to-best-declare-component-handler-functions)\n- [Tutorials & Articles](#tutorials--articles)\n- [Contributors](#contributors)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n---\n\n# Installation\n\n## Types for React & Redux\n\n```\nnpm i -D @types/react @types/react-dom @types/react-redux\n```\n\n\"react\" - `@types/react`  \n\"react-dom\" - `@types/react-dom`  \n\"redux\" - (types included with npm package)*  \n\"react-redux\" - `@types/react-redux`  \n\n> *NB: Guide is based on types for Redux >= v4.x.x.\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n## React Types Cheatsheet\n\n### `React.FC<Props>` | `React.FunctionComponent<Props>`\n\nType representing a functional component\n\n```tsx\nconst MyComponent: React.FC<Props> = ...\n```\n\n### `React.Component<Props, State>`\n\nType representing a class component\n\n```tsx\nclass MyComponent extends React.Component<Props, State> { ...\n```\n\n### `React.ComponentType<Props>`\n\nType representing union of (`React.FC<Props> | React.Component<Props>`) - used in HOC\n\n```tsx\nconst withState = <P extends WrappedComponentProps>(\n  WrappedComponent: React.ComponentType<P>,\n) => { ...\n```\n\n### `React.ComponentProps<typeof XXX>`\n\nGets Props type of a specified component XXX (WARNING: does not work with statically declared default props and generic props)\n\n```tsx\ntype MyComponentProps = React.ComponentProps<typeof MyComponent>;\n```\n\n### `React.ReactElement` | `JSX.Element`\n\nType representing a concept of React Element - representation of a native DOM component (e.g. `<div />`), or a user-defined composite component (e.g. `<MyComponent />`)\n\n```tsx\nconst elementOnly: React.ReactElement = <div /> || <MyComponent />;\n```\n\n### `React.ReactNode`\n\nType representing any possible type of React node (basically ReactElement (including Fragments and Portals) + primitive JS types)\n\n```tsx\nconst elementOrPrimitive: React.ReactNode = 'string' || 0 || false || null || undefined || <div /> || <MyComponent />;\nconst Component = ({ children: React.ReactNode }) => ...\n```\n\n### `React.CSSProperties`\n\nType representing style object in JSX - for css-in-js styles\n\n```tsx\nconst styles: React.CSSProperties = { flexDirection: 'row', ...\nconst element = <div style={styles} ...\n```\n\n### `React.XXXHTMLAttributes<HTMLXXXElement>`\n\nType representing HTML attributes of specified HTML Element - for extending HTML Elements\n\n```tsx\nconst Input: React.FC<Props & React.InputHTMLAttributes<HTMLInputElement>> = props => { ... }\n\n<Input about={...} accept={...} alt={...} ... />\n```\n\n### `React.ReactEventHandler<HTMLXXXElement>`\n\nType representing generic event handler - for declaring event handlers\n\n```tsx\nconst handleChange: React.ReactEventHandler<HTMLInputElement> = (ev) => { ... } \n\n<input onChange={handleChange} ... />\n```\n\n### `React.XXXEvent<HTMLXXXElement>`\n\nType representing more specific event. Some common event examples: `ChangeEvent, FormEvent, FocusEvent, KeyboardEvent, MouseEvent, DragEvent, PointerEvent, WheelEvent, TouchEvent`.\n\n```tsx\nconst handleChange = (ev: React.MouseEvent<HTMLDivElement>) => { ... }\n\n<div onMouseMove={handleChange} ... />\n```\n\nIn code above `React.MouseEvent<HTMLDivElement>` is type of mouse event, and this event happened on `HTMLDivElement`\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n# React\n\n## Function Components - FC\n\n### - Counter Component\n\n::codeblock='playground/src/components/fc-counter.tsx'::\n\n[⟩⟩⟩ demo](https://piotrwitek.github.io/react-redux-typescript-guide/#fccounter)\n\n[⇧ back to top](#table-of-contents)\n\n### - Counter Component with default props\n\n::codeblock='playground/src/components/fc-counter-with-default-props.tsx'::\n\n[⟩⟩⟩ demo](https://piotrwitek.github.io/react-redux-typescript-guide/#fccounterwithdefaultprops)\n\n[⇧ back to top](#table-of-contents)\n\n### - [Spreading attributes](https://facebook.github.io/react/docs/jsx-in-depth.html#spread-attributes) in Component\n\n::codeblock='playground/src/components/fc-spread-attributes.tsx'::\n\n[⟩⟩⟩ demo](https://piotrwitek.github.io/react-redux-typescript-guide/#fcspreadattributes)\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n## Class Components\n\n### - Class Counter Component\n\n::codeblock='playground/src/components/class-counter.tsx'::\n\n[⟩⟩⟩ demo](https://piotrwitek.github.io/react-redux-typescript-guide/#classcounter)\n\n[⇧ back to top](#table-of-contents)\n\n### - Class Component with default props\n\n::codeblock='playground/src/components/class-counter-with-default-props.tsx'::\n\n[⟩⟩⟩ demo](https://piotrwitek.github.io/react-redux-typescript-guide/#classcounterwithdefaultprops)\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n## Generic Components\n\n- easily create typed component variations and reuse common logic\n- common use case is a generic list components\n\n### - Generic List Component\n\n::codeblock='playground/src/components/generic-list.tsx'::\n\n[⟩⟩⟩ demo](https://piotrwitek.github.io/react-redux-typescript-guide/#genericlist)\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n## Hooks\n\n> <https://reactjs.org/docs/hooks-intro.html>\n\n### - useState\n\n> <https://reactjs.org/docs/hooks-reference.html#usestate>\n\n::codeblock='playground/src/hooks/use-state.tsx'::\n\n[⇧ back to top](#table-of-contents)\n\n### - useContext\n\n> <https://reactjs.org/docs/hooks-reference.html#usecontext>\n\n::codeblock='playground/src/hooks/use-theme-context.tsx'::\n\n[⇧ back to top](#table-of-contents)\n\n### - useReducer\n\n> <https://reactjs.org/docs/hooks-reference.html#usereducer>\n\n::codeblock='playground/src/hooks/use-reducer.tsx'::\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n## Render Props\n\n> <https://reactjs.org/docs/render-props.html>\n\n### - Name Provider Component\n\nSimple component using children as a render prop\n\n::codeblock='playground/src/components/name-provider.tsx'::\n\n[⟩⟩⟩ demo](https://piotrwitek.github.io/react-redux-typescript-guide/#nameprovider)\n\n[⇧ back to top](#table-of-contents)\n\n### - Mouse Provider Component\n\n`Mouse` component found in [Render Props React Docs](https://reactjs.org/docs/render-props.html#use-render-props-for-cross-cutting-concerns)\n\n::codeblock='playground/src/components/mouse-provider.tsx'::\n\n[⟩⟩⟩ demo](https://piotrwitek.github.io/react-redux-typescript-guide/#mouseprovider)\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n## Higher-Order Components\n\n> <https://reactjs.org/docs/higher-order-components.html>\n\n### - HOC wrapping a component\n\nAdds state to a stateless counter\n\n::codeblock='playground/src/hoc/with-state.tsx'::\n::expander='playground/src/hoc/with-state.usage.tsx'::\n\n[⇧ back to top](#table-of-contents)\n\n### - HOC wrapping a component and injecting props\n\nAdds error handling using componentDidCatch to any component\n\n::codeblock='playground/src/hoc/with-error-boundary.tsx'::\n::expander='playground/src/hoc/with-error-boundary.usage.tsx'::\n\n[⇧ back to top](#table-of-contents)\n\n### - Nested HOC - wrapping a component, injecting props and connecting to redux 🌟\n\nAdds error handling using componentDidCatch to any component\n\n::codeblock='playground/src/hoc/with-connected-count.tsx'::\n::expander='playground/src/hoc/with-connected-count.usage.tsx'::\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n## Redux Connected Components\n\n### - Redux connected counter\n\n::codeblock='playground/src/connected/fc-counter-connected.tsx'::\n::expander='playground/src/connected/fc-counter-connected.usage.tsx'::\n\n[⇧ back to top](#table-of-contents)\n\n### - Redux connected counter with own props\n\n::codeblock='playground/src/connected/fc-counter-connected-own-props.tsx'::\n::expander='playground/src/connected/fc-counter-connected-own-props.usage.tsx'::\n\n[⇧ back to top](#table-of-contents)\n\n### - Redux connected counter via hooks\n\n::codeblock='playground/src/hooks/react-redux-hooks.tsx'::\n\n[⇧ back to top](#table-of-contents)\n\n### - Redux connected counter with `redux-thunk` integration\n\n::codeblock='playground/src/connected/fc-counter-connected-bind-action-creators.tsx'::\n::expander='playground/src/connected/fc-counter-connected-bind-action-creators.usage.tsx'::\n\n[⇧ back to top](#table-of-contents)\n\n## Context\n\n> <https://reactjs.org/docs/context.html>\n\n### ThemeContext\n\n::codeblock='playground/src/context/theme-context.ts'::\n\n[⇧ back to top](#table-of-contents)\n\n### ThemeProvider\n\n::codeblock='playground/src/context/theme-provider.tsx'::\n\n[⇧ back to top](#table-of-contents)\n\n### ThemeConsumer\n\n::codeblock='playground/src/context/theme-consumer.tsx'::\n\n### ThemeConsumer in class component\n\n::codeblock='playground/src/context/theme-consumer-class.tsx'::\n\n[Implementation with Hooks](#--usecontext)\n\n[⇧ back to top](#table-of-contents)\n\n\n---\n\n# Redux\n\n## Store Configuration\n\n### Create Global Store Types\n\n#### `RootState` - type representing root state-tree\n\nCan be imported in connected components to provide type-safety to Redux `connect` function\n\n#### `RootAction` - type representing union type of all action objects\n\nCan be imported in various layers receiving or sending redux actions like: reducers, sagas or redux-observables epics\n\n::codeblock='playground/src/store/types.d.ts'::\n\n[⇧ back to top](#table-of-contents)\n\n### Create Store\n\nWhen creating a store instance we don't need to provide any additional types. It will set-up a **type-safe Store instance** using type inference.\n> The resulting store instance methods like `getState` or `dispatch` will be type checked and will expose all type errors\n\n::codeblock='playground/src/store/store.ts'::\n\n---\n\n## Action Creators 🌟\n\n> We'll be using a battle-tested helper library [`typesafe-actions`](https://github.com/piotrwitek/typesafe-actions#typesafe-actions) [![Latest Stable Version](https://img.shields.io/npm/v/typesafe-actions.svg)](https://www.npmjs.com/package/typesafe-actions) [![NPM Downloads](https://img.shields.io/npm/dt/typesafe-actions.svg)](https://www.npmjs.com/package/typesafe-actions) that's designed to make it easy and fun working with **Redux** in **TypeScript**.\n\n> To learn more please check this in-depth tutorial: [Typesafe-Actions - Tutorial](https://github.com/piotrwitek/typesafe-actions#tutorial)!\n\nA solution below is using a simple factory function to automate the creation of type-safe action creators. The goal is to decrease maintenance effort and reduce code repetition of type annotations for actions and creators. The result is completely typesafe action-creators and their actions.\n\n::codeblock='playground/src/features/counters/actions.ts'::\n::expander='playground/src/features/counters/actions.usage.ts'::\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n## Reducers\n\n### State with Type-level Immutability\n\nDeclare reducer `State` type with `readonly` modifier to get compile time immutability\n\n```ts\nexport type State = {\n  readonly counter: number;\n  readonly todos: ReadonlyArray<string>;\n};\n```\n\nReadonly modifier allow initialization, but will not allow reassignment by highlighting compiler errors\n\n```ts\nexport const initialState: State = {\n  counter: 0,\n}; // OK\n\ninitialState.counter = 3; // TS Error: cannot be mutated\n```\n\nIt's great for **Arrays in JS** because it will error when using mutator methods like (`push`, `pop`, `splice`, ...), but it'll still allow immutable methods like (`concat`, `map`, `slice`,...).\n\n```ts\nstate.todos.push('Learn about tagged union types') // TS Error: Property 'push' does not exist on type 'ReadonlyArray<string>'\nconst newTodos = state.todos.concat('Learn about tagged union types') // OK\n```\n\n#### Caveat - `Readonly` is not recursive\n\nThis means that the `readonly` modifier doesn't propagate immutability down the nested structure of objects. You'll need to mark each property on each level explicitly.\n\n> **TIP:** use `Readonly` or `ReadonlyArray` [Mapped types](https://www.typescriptlang.org/docs/handbook/advanced-types.html)\n\n```ts\nexport type State = Readonly<{\n  counterPairs: ReadonlyArray<Readonly<{\n    immutableCounter1: number,\n    immutableCounter2: number,\n  }>>,\n}>;\n\nstate.counterPairs[0] = { immutableCounter1: 1, immutableCounter2: 1 }; // TS Error: cannot be mutated\nstate.counterPairs[0].immutableCounter1 = 1; // TS Error: cannot be mutated\nstate.counterPairs[0].immutableCounter2 = 1; // TS Error: cannot be mutated\n```\n\n#### Solution - recursive `Readonly` is called `DeepReadonly`\n\nTo fix this we can use [`DeepReadonly`](https://github.com/piotrwitek/utility-types#deepreadonlyt) type (available from `utility-types`).\n\n```ts\nimport { DeepReadonly } from 'utility-types';\n\nexport type State = DeepReadonly<{\n  containerObject: {\n    innerValue: number,\n    numbers: number[],\n  }\n}>;\n\nstate.containerObject = { innerValue: 1 }; // TS Error: cannot be mutated\nstate.containerObject.innerValue = 1; // TS Error: cannot be mutated\nstate.containerObject.numbers.push(1); // TS Error: cannot use mutator methods\n```\n\n[⇧ back to top](#table-of-contents)\n\n### Typing reducer\n\n> to understand following section make sure to learn about [Type Inference](https://www.typescriptlang.org/docs/handbook/type-inference.html), [Control flow analysis](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#control-flow-based-type-analysis) and [Tagged union types](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#tagged-union-types)\n\n::codeblock='playground/src/features/todos/reducer.ts'::\n\n[⇧ back to top](#table-of-contents)\n\n### Typing reducer with `typesafe-actions`\n\n> Notice we are not required to use any generic type parameter in the API. Try to compare it with regular reducer as they are equivalent.\n\n::codeblock='playground/src/features/todos/reducer-ta.ts'::\n\n[⇧ back to top](#table-of-contents)\n\n### Testing reducer\n\n::codeblock='playground/src/features/todos/reducer.spec.ts'::\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n## Async Flow with `redux-observable`\n\n### Typing epics\n\n::codeblock='playground/src/features/todos/epics.ts'::\n\n[⇧ back to top](#table-of-contents)\n\n### Testing epics\n\n::codeblock='playground/src/features/todos/epics.spec.ts'::\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n## Selectors with `reselect`\n\n::codeblock='playground/src/features/todos/selectors.ts'::\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n## Connect with `react-redux`\n\n### Typing connected component\n\n_**NOTE**: Below you'll find a short explanation of concepts behind using `connect` with TypeScript. For more detailed examples please check [Redux Connected Components](#redux-connected-components) section._\n\n```tsx\nimport MyTypes from 'MyTypes';\n\nimport { bindActionCreators, Dispatch, ActionCreatorsMapObject } from 'redux';\nimport { connect } from 'react-redux';\n\nimport { countersActions } from '../features/counters';\nimport { FCCounter } from '../components';\n\n// Type annotation for \"state\" argument is mandatory to check \n// the correct shape of state object and injected props you can also\n// extend connected component Props interface by annotating `ownProps` argument\nconst mapStateToProps = (state: MyTypes.RootState, ownProps: FCCounterProps) => ({\n  count: state.counters.reduxCounter,\n});\n\n// \"dispatch\" argument needs an annotation to check the correct shape\n//  of an action object when using dispatch function\nconst mapDispatchToProps = (dispatch: Dispatch<MyTypes.RootAction>) =>\n  bindActionCreators({\n    onIncrement: countersActions.increment,\n  }, dispatch);\n\n// shorter alternative is to use an object instead of mapDispatchToProps function\nconst dispatchToProps = {\n    onIncrement: countersActions.increment,\n};\n\n// Notice we don't need to pass any generic type parameters to neither\n// the connect function below nor map functions declared above\n// because type inference will infer types from arguments annotations automatically\n// This is much cleaner and idiomatic approach\nexport const FCCounterConnected =\n  connect(mapStateToProps, mapDispatchToProps)(FCCounter);\n\n// You can add extra layer of validation of your action creators\n// by using bindActionCreators generic type parameter and RootAction type\nconst mapDispatchToProps = (dispatch: Dispatch<MyTypes.RootAction>) =>\n  bindActionCreators<ActionCreatorsMapObject<Types.RootAction>>({\n    invalidActionCreator: () => 1, // Error: Type 'number' is not assignable to type '{ type: \"todos/ADD\"; payload: Todo; } | { ... }\n  }, dispatch);\n\n```\n\n[⇧ back to top](#table-of-contents)\n\n### Typing `useSelector` and `useDispatch`\n\n::codeblock='playground/src/store/hooks.ts'::\n\n[⇧ back to top](#table-of-contents)\n\n### Typing connected component with `redux-thunk` integration\n\n_**NOTE**: When using thunk action creators you need to use `bindActionCreators`. Only this way you can get corrected dispatch props type signature like below.*_\n\n_**WARNING**: As of now (Apr 2019) `bindActionCreators` signature of the latest `redux-thunk` release will not work as below, you need to use our modified type definitions that you can find here [`/playground/typings/redux-thunk/index.d.ts`](./playground/typings/redux-thunk/index.d.ts) and then add `paths` overload in your tsconfig like this: [`\"paths\":{\"redux-thunk\":[\"typings/redux-thunk\"]}`](./playground/tsconfig.json)._\n\n```tsx\nconst thunkAsyncAction = () => async (dispatch: Dispatch): Promise<void> => {\n  // dispatch actions, return Promise, etc.\n}\n\nconst mapDispatchToProps = (dispatch: Dispatch<Types.RootAction>) =>\n  bindActionCreators(\n    {\n      thunkAsyncAction,\n    },\n    dispatch\n  );\n\ntype DispatchProps = ReturnType<typeof mapDispatchToProps>;\n// { thunkAsyncAction: () => Promise<void>; }\n\n/* Without \"bindActionCreators\" fix signature will be the same as the original \"unbound\" thunk function: */\n// { thunkAsyncAction: () => (dispatch: Dispatch<AnyAction>) => Promise<void>; }\n```\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n# Configuration & Dev Tools\n\n## Common Npm Scripts\n\n> Common TS-related npm scripts shared across projects\n\n```json\n\"prettier\": \"prettier --list-different 'src/**/*.ts' || (echo '\\nPlease fix code formatting by running:\\nnpm run prettier:fix\\n'; exit 1)\",\n\"prettier:fix\": \"prettier --write 'src/**/*.ts'\",\n\"lint\": \"eslint ./src --ext .js,.jsx,.ts,.tsx\",\n\"tsc\": \"tsc -p ./ --noEmit\",\n\"tsc:watch\": \"tsc -p ./ --noEmit -w\",\n\"test\": \"jest --config jest.config.json\",\n\"test:watch\": \"jest --config jest.config.json --watch\",\n\"test:update\": \"jest --config jest.config.json -u\"\n\"ci-check\": \"npm run prettier && npm run lint && npm run tsc && npm run test\",\n```\n\n[⇧ back to top](#table-of-contents)\n\n## tsconfig.json\n\nWe have recommended `tsconfig.json` that you can easily add to your project thanks to [`react-redux-typescript-scripts`](https://github.com/piotrwitek/react-redux-typescript-scripts) package.\n\n::expander='playground/tsconfig.json'::\n\n[⇧ back to top](#table-of-contents)\n\n## TSLib\n\nThis library will cut down on your bundle size, thanks to using external runtime helpers instead of adding them per each file.\n\n> <https://www.npmjs.com/package/tslib>\n\n> Installation  \n`npm i tslib`\n\n\nThen add this to your `tsconfig.json`:\n\n```ts\n\"compilerOptions\": {\n  \"importHelpers\": true\n}\n```\n\n[⇧ back to top](#table-of-contents)\n\n## ESLint\n\nWe have recommended config that will automatically add a parser & plugin for TypeScript thanks to [`react-redux-typescript-scripts`](https://github.com/piotrwitek/react-redux-typescript-scripts) package.\n\n> <https://typescript-eslint.io>\n\n> Installation\n`npm i -D eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin`\n\n\n### .eslintrc.js\n\n::expander='playground/.eslintrc.js'::\n\n[⇧ back to top](#table-of-contents)\n\n## Jest\n\n> <https://jestjs.io/>\n\n> Installation  \n`npm i -D jest ts-jest @types/jest`\n\n### jest.config.json\n\n::expander='configs/jest.config.json'::\n\n### jest.stubs.js\n\n::expander='configs/jest.stubs.js'::\n\n[⇧ back to top](#table-of-contents)\n\n## Style Guides\n\n### [react-styleguidist](https://github.com/styleguidist/react-styleguidist)\n\n[⟩⟩⟩ styleguide.config.js](/playground/styleguide.config.js)  \n\n[⟩⟩⟩ demo](https://piotrwitek.github.io/react-redux-typescript-guide/)\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n# FAQ\n\n\n## Ambient Modules\n\n### Imports in ambient modules\n\nFor type augmentation imports should stay outside of module declaration.\n\n```ts\nimport { Operator } from 'rxjs/Operator';\nimport { Observable } from 'rxjs/Observable';\n\ndeclare module 'rxjs/Subject' {\n  interface Subject<T> {\n    lift<R>(operator: Operator<T, R>): Observable<R>;\n  }\n}\n```\n\nWhen creating 3rd party type-definitions all the imports should be kept inside the module declaration, otherwise it will be treated as augmentation and show error\n\n```ts\ndeclare module \"react-custom-scrollbars\" {\n    import * as React from \"react\";\n    export interface positionValues {\n    ...\n```\n\n[⇧ back to top](#table-of-contents)\n\n## Type-Definitions\n\n### Missing type-definitions error\n\nif you cannot find types for a third-party module you can provide your own types or disable type-checking for this module using [Shorthand Ambient Modules](https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/Modules.md#shorthand-ambient-modules)\n\n::codeblock='playground/typings/modules.d.ts'::\n\n### Using custom `d.ts` files for npm modules\n\nIf you want to use an alternative (customized) type-definitions for some npm module (that usually comes with it's own type-definitions), you can do it by adding an override in `paths` compiler option.\n\n```ts\n{\n  \"compilerOptions\": {\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"redux\": [\"typings/redux\"], // use an alternative type-definitions instead of the included one\n      ...\n    },\n    ...,\n  }\n}\n```\n\n[⇧ back to top](#table-of-contents)\n\n## Type Augmentation\n\nStrategies to fix issues coming from external type-definitions files (*.d.ts)\n\n### Augmenting library internal declarations - using relative import\n\n```ts\n// added missing autoFocus Prop on Input component in \"antd@2.10.0\" npm package\ndeclare module '../node_modules/antd/lib/input/Input' {\n  export interface InputProps {\n    autoFocus?: boolean;\n  }\n}\n```\n\n### Augmenting library public declarations - using node_modules import\n\n```ts\n// fixed broken public type-definitions in \"rxjs@5.4.1\" npm package\nimport { Operator } from 'rxjs/Operator';\nimport { Observable } from 'rxjs/Observable';\n\ndeclare module 'rxjs/Subject' {\n  interface Subject<T> {\n    lift<R>(operator: Operator<T, R>): Observable<R>;\n  }\n}\n```\n\n> More advanced scenarios for working with vendor type-definitions can be found here [Official TypeScript Docs](https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/Modules.md#working-with-other-javascript-libraries)\n\n[⇧ back to top](#table-of-contents)\n\n## Misc\n\n### - should I still use React.PropTypes in TS?\n\nNo. With TypeScript, using PropTypes is an unnecessary overhead. When declaring Props and State interfaces, you will get complete intellisense and design-time safety with static type checking. This way you'll be safe from runtime errors and you will save a lot of time on debugging. Additional benefit is an elegant and standardized method of documenting your component public API in the source code.  \n\n[⇧ back to top](#table-of-contents)\n\n### - when to use `interface` declarations and when `type` aliases?\n\nFrom practical side, using `interface` declaration will create an identity (interface name) in compiler errors, on the contrary `type` aliases doesn't create an identity and will be unwinded to show all the properties and nested types it consists of.  \nAlthough I prefer to use `type` most of the time there are some places this can become too noisy when reading compiler errors and that's why I like to leverage this distinction to hide some of not so important type details in errors using interfaces identity.\nRelated `ts-lint` rule: <https://palantir.github.io/tslint/rules/interface-over-type-literal/>  \n\n[⇧ back to top](#table-of-contents)\n\n### - what's better default or named exports?\n\nA common flexible solution is to use module folder pattern, because you can leverage both named and default import when you see fit.  \nWith this solution you'll achieve better encapsulation and be able to safely refactor internal naming and folders structure without breaking your consumer code:\n\n```ts\n// 1. create your component files (`select.tsx`) using default export in some folder:\n\n// components/select.tsx\nconst Select: React.FC<Props> = (props) => {\n...\nexport default Select;\n\n// 2. in this folder create an `index.ts` file that will re-export components with named exports:\n\n// components/index.ts\nexport { default as Select } from './select';\n...\n\n// 3. now you can import your components in both ways, with named export (better encapsulation) or using default export (internal access):\n\n// containers/container.tsx\nimport { Select } from '@src/components';\nor\nimport Select from '@src/components/select';\n...\n```\n\n[⇧ back to top](#table-of-contents)\n\n### - how to best initialize class instance or static properties?\n\nPrefered modern syntax is to use class Property Initializers  \n\n```tsx\nclass ClassCounterWithInitialCount extends React.Component<Props, State> {\n  // default props using Property Initializers\n  static defaultProps: DefaultProps = {\n    className: 'default-class',\n    initialCount: 0,\n  };\n  \n  // initial state using Property Initializers\n  state: State = {\n    count: this.props.initialCount,\n  };\n  ...\n}\n```\n\n[⇧ back to top](#table-of-contents)\n\n### - how to best declare component handler functions?\n\nPrefered modern syntax is to use Class Fields with arrow functions  \n\n```tsx\nclass ClassCounter extends React.Component<Props, State> {\n// handlers using Class Fields with arrow functions\n  handleIncrement = () => {\n    this.setState({ count: this.state.count + 1 });\n  };\n  ...\n}\n```\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n# Tutorials & Articles\n\n> Curated list of relevant in-depth tutorials\n\nHigher-Order Components:\n\n- <https://medium.com/@jrwebdev/react-higher-order-component-patterns-in-typescript-42278f7590fb>\n\n[⇧ back to top](#table-of-contents)\n\n---\n\n# Contributors\n\nThanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore -->\n| [<img src=\"https://avatars0.githubusercontent.com/u/739075?v=4\" width=\"100px;\"/><br /><sub><b>Piotrek Witek</b></sub>](https://github.com/piotrwitek)<br />[💻](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=piotrwitek \"Code\") [📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=piotrwitek \"Documentation\") [🤔](#ideas-piotrwitek \"Ideas, Planning, & Feedback\") [👀](#review-piotrwitek \"Reviewed Pull Requests\") [💬](#question-piotrwitek \"Answering Questions\") | [<img src=\"https://avatars3.githubusercontent.com/u/8602615?v=4\" width=\"100px;\"/><br /><sub><b>Kazz Yokomizo</b></sub>](https://github.com/kazup01)<br />[💵](#financial-kazup01 \"Financial\") [🔍](#fundingFinding-kazup01 \"Funding Finding\") | [<img src=\"https://avatars1.githubusercontent.com/u/366438?v=4\" width=\"100px;\"/><br /><sub><b>Jake Boone</b></sub>](https://github.com/jakeboone02)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=jakeboone02 \"Documentation\") | [<img src=\"https://avatars1.githubusercontent.com/u/9748762?v=4\" width=\"100px;\"/><br /><sub><b>Amit Dahan</b></sub>](https://github.com/amitdahan)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=amitdahan \"Documentation\") | [<img src=\"https://avatars1.githubusercontent.com/u/98167?v=4\" width=\"100px;\"/><br /><sub><b>gulderov</b></sub>](https://github.com/gulderov)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=gulderov \"Documentation\") | [<img src=\"https://avatars1.githubusercontent.com/u/1964212?v=4\" width=\"100px;\"/><br /><sub><b>Erik Pearson</b></sub>](https://github.com/emp823)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=emp823 \"Documentation\") | [<img src=\"https://avatars1.githubusercontent.com/u/5342677?v=4\" width=\"100px;\"/><br /><sub><b>Bryan Mason</b></sub>](https://github.com/flymason)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=flymason \"Documentation\") |\n| :---: | :---: | :---: | :---: | :---: | :---: | :---: |\n| [<img src=\"https://avatars1.githubusercontent.com/u/119451?v=4\" width=\"100px;\"/><br /><sub><b>Jakub Chodorowicz</b></sub>](http://www.jakub.chodorowicz.pl/)<br />[💻](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=chodorowicz \"Code\") | [<img src=\"https://avatars1.githubusercontent.com/u/7266431?v=4\" width=\"100px;\"/><br /><sub><b>Oleg Maslov</b></sub>](https://github.com/mleg)<br />[🐛](https://github.com/piotrwitek/react-redux-typescript-guide/issues?q=author%3Amleg \"Bug reports\") | [<img src=\"https://avatars0.githubusercontent.com/u/3393293?v=4\" width=\"100px;\"/><br /><sub><b>Aaron Westbrook</b></sub>](https://github.com/awestbro)<br />[🐛](https://github.com/piotrwitek/react-redux-typescript-guide/issues?q=author%3Aawestbro \"Bug reports\") | [<img src=\"https://avatars3.githubusercontent.com/u/14539?v=4\" width=\"100px;\"/><br /><sub><b>Peter Blazejewicz</b></sub>](http://www.linkedin.com/in/peterblazejewicz)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=peterblazejewicz \"Documentation\") | [<img src=\"https://avatars3.githubusercontent.com/u/1642?v=4\" width=\"100px;\"/><br /><sub><b>Solomon White</b></sub>](https://github.com/rubysolo)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=rubysolo \"Documentation\") | [<img src=\"https://avatars2.githubusercontent.com/u/8838006?v=4\" width=\"100px;\"/><br /><sub><b>Levi Rocha</b></sub>](https://github.com/pino)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=pino \"Documentation\") | [<img src=\"https://avatars1.githubusercontent.com/u/41281835?v=4\" width=\"100px;\"/><br /><sub><b>Sudachi-kun</b></sub>](http://cloudnative.co.jp)<br />[💵](#financial-loadbalance-sudachi-kun \"Financial\") |\n| [<img src=\"https://avatars1.githubusercontent.com/u/14838850?v=4\" width=\"100px;\"/><br /><sub><b>Sosuke Suzuki</b></sub>](http://sosukesuzuki.github.io)<br />[💻](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=sosukesuzuki \"Code\") | [<img src=\"https://avatars0.githubusercontent.com/u/74433?v=4\" width=\"100px;\"/><br /><sub><b>Tom Rathbone</b></sub>](https://github.com/chillitom)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=chillitom \"Documentation\") | [<img src=\"https://avatars3.githubusercontent.com/u/4654382?v=4\" width=\"100px;\"/><br /><sub><b>Arshad Kazmi</b></sub>](https://arshadkazmi42.github.io/)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=arshadkazmi42 \"Documentation\") | [<img src=\"https://avatars1.githubusercontent.com/u/8815362?v=4\" width=\"100px;\"/><br /><sub><b>JeongUkJae</b></sub>](https://jeongukjae.github.io)<br />[📖](https://github.com/piotrwitek/react-redux-typescript-guide/commits?author=JeongUkJae \"Documentation\") |\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!\n\n---\n\nMIT License\n\nCopyright (c) 2017 Piotr Witek <piotrek.witek@gmail.com> (<https://piotrwitek.github.io>)\n"
  },
  {
    "path": "configs/jest.config.json",
    "content": "{\n  \"verbose\": true,\n  \"transform\": {\n    \".(ts|tsx)\": \"ts-jest\"\n  },\n  \"testRegex\": \"(/spec/.*|\\\\.(test|spec))\\\\.(ts|tsx|js)$\",\n  \"moduleFileExtensions\": [\"ts\", \"tsx\", \"js\"],\n  \"moduleNameMapper\": {\n    \"^Components/(.*)\": \"./src/components/$1\"\n  },\n  \"globals\": {\n    \"window\": {},\n    \"ts-jest\": {\n      \"tsConfig\": \"./tsconfig.json\"\n    }\n  },\n  \"setupFiles\": [\"./jest.stubs.js\"],\n  \"testURL\": \"http://localhost/\"\n}\n"
  },
  {
    "path": "configs/jest.stubs.js",
    "content": "// Global/Window object Stubs for Jest\nwindow.matchMedia = window.matchMedia || function () {\n  return {\n    matches: false,\n    addListener: function () { },\n    removeListener: function () { },\n  };\n};\n\nwindow.requestAnimationFrame = function (callback) {\n  setTimeout(callback);\n};\n\nwindow.localStorage = {\n  getItem: function () { },\n  setItem: function () { },\n};\n\nObject.values = () => [];\n"
  },
  {
    "path": "docs/build/0.6e57cfb5.js",
    "content": "webpackJsonp([0],{409:function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(0),i=n.n(r),o=n(1),s=n.n(o),a=n(113),l=n.n(a),c=n(411),u=(n.n(c),n(412)),d=(n.n(u),Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}),p=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}();n(415),n(417);var h={mode:\"jsx\",lineNumbers:!1,lineWrapping:!0,smartIndent:!1,matchBrackets:!0,viewportMargin:1/0},f=10,g=function(e){!function _inherits(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(Editor,r[\"Component\"]);function Editor(){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,Editor);var e=function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,(Editor.__proto__||Object.getPrototypeOf(Editor)).call(this));return e.handleChange=l()(e.handleChange.bind(e),f),e}return p(Editor,[{key:\"shouldComponentUpdate\",value:function shouldComponentUpdate(){return!1}},{key:\"handleChange\",value:function handleChange(e,t,n){this.props.onChange(n)}},{key:\"render\",value:function render(){var e=this.props.code,t=this.context.config.highlightTheme,n=d({},h,{theme:t});return i.a.createElement(c.UnControlled,{value:e,onChange:this.handleChange,options:n})}}]),Editor}();g.propTypes={code:s.a.string.isRequired,onChange:s.a.func.isRequired},g.contextTypes={config:s.a.object.isRequired},t.default=g},410:function(e,t,n){r=function(){\"use strict\";var e=navigator.userAgent,t=navigator.platform,n=/gecko\\/\\d/i.test(e),r=/MSIE \\d/.test(e),i=/Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(e),o=/Edge\\/(\\d+)/.exec(e),s=r||i||o,a=s&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\\//.test(e),c=l&&/Qt\\/\\d+\\.\\d+/.test(e),u=!o&&/Chrome\\//.test(e),d=/Opera\\//.test(e),p=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\\d\\D([8-9]|\\d\\d)\\D/.test(e),f=/PhantomJS/.test(e),g=!o&&/AppleWebKit/.test(e)&&/Mobile\\/\\w+/.test(e),m=/Android/.test(e),v=g||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\\bCrOS\\b/.test(e),C=/win/i.test(t),x=d&&e.match(/Version\\/(\\d*\\.\\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(d=!1,l=!0);var w=y&&(c||d&&(null==x||x<12.11)),S=n||s&&a>=9;function classTest(e){return new RegExp(\"(^|\\\\s)\"+e+\"(?:$|\\\\s)\\\\s*\")}var k=function(e,t){var n=e.className,r=classTest(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:\"\")}};function removeChildren(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function removeChildrenAndAdd(e,t){return removeChildren(e).appendChild(t)}function elt(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),\"string\"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function eltP(e,t,n,r){var i=elt(e,t,n,r);return i.setAttribute(\"role\",\"presentation\"),i}var L;L=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd(\"character\",n),r.moveStart(\"character\",t),r};function contains(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function activeElt(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function addClass(e,t){var n=e.className;classTest(t).test(n)||(e.className+=(n?\" \":\"\")+t)}function joinClasses(e,t){for(var n=e.split(\" \"),r=0;r<n.length;r++)n[r]&&!classTest(n[r]).test(t)&&(t+=\" \"+n[r]);return t}var M=function(e){e.select()};g?M=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:s&&(M=function(e){try{e.select()}catch(e){}});function bind(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function copyObj(e,t,n){t||(t={});for(var r in e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function countColumn(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\\s\\u00a0]/))&&(t=e.length);for(var o=r||0,s=i||0;;){var a=e.indexOf(\"\\t\",o);if(a<0||a>=t)return s+(t-o);s+=a-o,s+=n-s%n,o=a+1}}var T=function(){this.id=null};T.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};function indexOf(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var O=30,P={toString:function(){return\"CodeMirror.Pass\"}},A={scroll:!1},N={origin:\"*mouse\"},D={origin:\"+move\"};function findColumn(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(\"\\t\",r);-1==o&&(o=e.length);var s=o-r;if(o==e.length||i+s>=t)return r+Math.min(s,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var H=[\"\"];function spaceStr(e){for(;H.length<=e;)H.push(lst(H)+\" \");return H[e]}function lst(e){return e[e.length-1]}function map(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function nothing(){}function createObj(e,t){var n;return Object.create?n=Object.create(e):(nothing.prototype=e,n=new nothing),t&&copyObj(t,n),n}var W=/[\\u00df\\u0587\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\uac00-\\ud7af]/;function isWordCharBasic(e){return/\\w/.test(e)||e>\"\"&&(e.toUpperCase()!=e.toLowerCase()||W.test(e))}function isWordChar(e,t){return t?!!(t.source.indexOf(\"\\\\w\")>-1&&isWordCharBasic(e))||t.test(e):isWordCharBasic(e)}function isEmpty(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var E=/[\\u0300-\\u036f\\u0483-\\u0489\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u065e\\u0670\\u06d6-\\u06dc\\u06de-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07eb-\\u07f3\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0900-\\u0902\\u093c\\u0941-\\u0948\\u094d\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09bc\\u09be\\u09c1-\\u09c4\\u09cd\\u09d7\\u09e2\\u09e3\\u0a01\\u0a02\\u0a3c\\u0a41\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a70\\u0a71\\u0a75\\u0a81\\u0a82\\u0abc\\u0ac1-\\u0ac5\\u0ac7\\u0ac8\\u0acd\\u0ae2\\u0ae3\\u0b01\\u0b3c\\u0b3e\\u0b3f\\u0b41-\\u0b44\\u0b4d\\u0b56\\u0b57\\u0b62\\u0b63\\u0b82\\u0bbe\\u0bc0\\u0bcd\\u0bd7\\u0c3e-\\u0c40\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0cbc\\u0cbf\\u0cc2\\u0cc6\\u0ccc\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0d3e\\u0d41-\\u0d44\\u0d4d\\u0d57\\u0d62\\u0d63\\u0dca\\u0dcf\\u0dd2-\\u0dd4\\u0dd6\\u0ddf\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0eb1\\u0eb4-\\u0eb9\\u0ebb\\u0ebc\\u0ec8-\\u0ecd\\u0f18\\u0f19\\u0f35\\u0f37\\u0f39\\u0f71-\\u0f7e\\u0f80-\\u0f84\\u0f86\\u0f87\\u0f90-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102d-\\u1030\\u1032-\\u1037\\u1039\\u103a\\u103d\\u103e\\u1058\\u1059\\u105e-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108d\\u109d\\u135f\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b7-\\u17bd\\u17c6\\u17c9-\\u17d3\\u17dd\\u180b-\\u180d\\u18a9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193b\\u1a17\\u1a18\\u1a56\\u1a58-\\u1a5e\\u1a60\\u1a62\\u1a65-\\u1a6c\\u1a73-\\u1a7c\\u1a7f\\u1b00-\\u1b03\\u1b34\\u1b36-\\u1b3a\\u1b3c\\u1b42\\u1b6b-\\u1b73\\u1b80\\u1b81\\u1ba2-\\u1ba5\\u1ba8\\u1ba9\\u1c2c-\\u1c33\\u1c36\\u1c37\\u1cd0-\\u1cd2\\u1cd4-\\u1ce0\\u1ce2-\\u1ce8\\u1ced\\u1dc0-\\u1de6\\u1dfd-\\u1dff\\u200c\\u200d\\u20d0-\\u20f0\\u2cef-\\u2cf1\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua66f-\\ua672\\ua67c\\ua67d\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua825\\ua826\\ua8c4\\ua8e0-\\ua8f1\\ua926-\\ua92d\\ua947-\\ua951\\ua980-\\ua982\\ua9b3\\ua9b6-\\ua9b9\\ua9bc\\uaa29-\\uaa2e\\uaa31\\uaa32\\uaa35\\uaa36\\uaa43\\uaa4c\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uabe5\\uabe8\\uabed\\udc00-\\udfff\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe26\\uff9e\\uff9f]/;function isExtendingChar(e){return e.charCodeAt(0)>=768&&E.test(e)}function skipExtendingChars(e,t,n){for(;(n<0?t>0:t<e.length)&&isExtendingChar(e.charAt(t));)t+=n;return t}function findFirst(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function getLine(e,t){if((t-=e.first)<0||t>=e.size)throw new Error(\"There is no line \"+(t+e.first)+\" in the document.\");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function getBetween(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i}),r}function getLines(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function updateLineHeight(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function lineNo(e){if(null==e.parent)return null;for(var t=e.parent,n=indexOf(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function lineAtHeight(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var s=0;s<e.lines.length;++s){var a=e.lines[s].height;if(t<a)break;t-=a}return n+s}function isLine(e,t){return t>=e.first&&t<e.first+e.size}function lineNumberFor(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Pos(e,t,n){if(void 0===n&&(n=null),!(this instanceof Pos))return new Pos(e,t,n);this.line=e,this.ch=t,this.sticky=n}function cmp(e,t){return e.line-t.line||e.ch-t.ch}function equalCursorPos(e,t){return e.sticky==t.sticky&&0==cmp(e,t)}function copyPos(e){return Pos(e.line,e.ch)}function maxPos(e,t){return cmp(e,t)<0?t:e}function minPos(e,t){return cmp(e,t)<0?e:t}function clipLine(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function clipPos(e,t){if(t.line<e.first)return Pos(e.first,0);var n=e.first+e.size-1;return t.line>n?Pos(n,getLine(e,n).text.length):function clipToLen(e,t){var n=e.ch;return null==n||n>t?Pos(e.line,t):n<0?Pos(e.line,0):e}(t,getLine(e,t.line).text.length)}function clipPosArray(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=clipPos(e,t[r]);return n}var I=!1,F=!1;function MarkedSpan(e,t,n){this.marker=e,this.from=t,this.to=n}function getMarkedSpanFor(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function removeMarkedSpan(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function stretchSpansOverChange(e,t){if(t.full)return null;var n=isLine(e,t.from.line)&&getLine(e,t.from.line).markedSpans,r=isLine(e,t.to.line)&&getLine(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,s=0==cmp(t.from,t.to),a=function markedSpansBefore(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],s=o.marker;if(null==o.from||(s.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&\"bookmark\"==s.type&&(!n||!o.marker.insertLeft)){var a=null==o.to||(s.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new MarkedSpan(s,o.from,a?null:o.to))}}return r}(n,i,s),l=function markedSpansAfter(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],s=o.marker;if(null==o.to||(s.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&\"bookmark\"==s.type&&(!n||o.marker.insertLeft)){var a=null==o.from||(s.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new MarkedSpan(s,a?null:o.from-t,null==o.to?null:o.to-t))}}return r}(r,o,s),c=1==t.text.length,u=lst(t.text).length+(c?i:0);if(a)for(var d=0;d<a.length;++d){var p=a[d];if(null==p.to){var h=getMarkedSpanFor(l,p.marker);h?c&&(p.to=null==h.to?null:h.to+u):p.to=i}}if(l)for(var f=0;f<l.length;++f){var g=l[f];if(null!=g.to&&(g.to+=u),null==g.from){getMarkedSpanFor(a,g.marker)||(g.from=u,c&&(a||(a=[])).push(g))}else g.from+=u,c&&(a||(a=[])).push(g)}a&&(a=clearEmptySpans(a)),l&&l!=a&&(l=clearEmptySpans(l));var m=[a];if(!c){var v,y=t.text.length-2;if(y>0&&a)for(var b=0;b<a.length;++b)null==a[b].to&&(v||(v=[])).push(new MarkedSpan(a[b].marker,null,null));for(var C=0;C<y;++C)m.push(v);m.push(l)}return m}function clearEmptySpans(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function detachMarkedSpans(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function attachMarkedSpans(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function extraLeft(e){return e.inclusiveLeft?-1:0}function extraRight(e){return e.inclusiveRight?1:0}function compareCollapsedMarkers(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=cmp(r.from,i.from)||extraLeft(e)-extraLeft(t);if(o)return-o;var s=cmp(r.to,i.to)||extraRight(e)-extraRight(t);return s||t.id-e.id}function collapsedSpanAtSide(e,t){var n,r=F&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||compareCollapsedMarkers(n,i.marker)<0)&&(n=i.marker);return n}function collapsedSpanAtStart(e){return collapsedSpanAtSide(e,!0)}function collapsedSpanAtEnd(e){return collapsedSpanAtSide(e,!1)}function conflictingCollapsedRange(e,t,n,r,i){var o=getLine(e,t),s=F&&o.markedSpans;if(s)for(var a=0;a<s.length;++a){var l=s[a];if(l.marker.collapsed){var c=l.marker.find(0),u=cmp(c.from,n)||extraLeft(l.marker)-extraLeft(i),d=cmp(c.to,r)||extraRight(l.marker)-extraRight(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?cmp(c.to,n)>=0:cmp(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?cmp(c.from,r)<=0:cmp(c.from,r)<0)))return!0}}}function visualLine(e){for(var t;t=collapsedSpanAtStart(e);)e=t.find(-1,!0).line;return e}function visualLineNo(e,t){var n=getLine(e,t),r=visualLine(n);return n==r?t:lineNo(r)}function visualLineEndNo(e,t){if(t>e.lastLine())return t;var n,r=getLine(e,t);if(!lineIsHidden(e,r))return t;for(;n=collapsedSpanAtEnd(r);)r=n.find(1,!0).line;return lineNo(r)+1}function lineIsHidden(e,t){var n=F&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&lineIsHiddenInner(e,t,r))return!0}}function lineIsHiddenInner(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return lineIsHiddenInner(e,r.line,getMarkedSpanFor(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&lineIsHiddenInner(e,t,i))return!0}function heightAtLine(e){for(var t=0,n=(e=visualLine(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;n=o,o=n.parent)for(var s=0;s<o.children.length;++s){var a=o.children[s];if(a==n)break;t+=a.height}return t}function lineLength(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=collapsedSpanAtStart(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=collapsedSpanAtEnd(r);){var o=t.find(0,!0);n-=r.text.length-o.from.ch,n+=(r=o.to.line).text.length-o.to.ch}return n}function findMaxLine(e){var t=e.display,n=e.doc;t.maxLine=getLine(n,n.first),t.maxLineLength=lineLength(t.maxLine),t.maxLineChanged=!0,n.iter(function(e){var n=lineLength(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}var B=null;function getBidiPartAt(e,t,n){var r;B=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&\"before\"==n?r=i:B=i),o.from==t&&(o.from!=o.to&&\"before\"!=n?r=i:B=i)}return null!=r?r:B}var z=function(){var e=\"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN\",t=\"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111\";var n=/[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/,r=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,s=/[1n]/;function BidiSpan(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,l){var c=\"ltr\"==l?\"L\":\"R\";if(0==a.length||\"ltr\"==l&&!n.test(a))return!1;for(var u=a.length,d=[],p=0;p<u;++p)d.push((h=a.charCodeAt(p))<=247?e.charAt(h):1424<=h&&h<=1524?\"R\":1536<=h&&h<=1785?t.charAt(h-1536):1774<=h&&h<=2220?\"r\":8192<=h&&h<=8203?\"w\":8204==h?\"b\":\"L\");for(var h,f=0,g=c;f<u;++f){var m=d[f];\"m\"==m?d[f]=g:g=m}for(var v=0,y=c;v<u;++v){var b=d[v];\"1\"==b&&\"r\"==y?d[v]=\"n\":i.test(b)&&(y=b,\"r\"==b&&(d[v]=\"R\"))}for(var C=1,x=d[0];C<u-1;++C){var w=d[C];\"+\"==w&&\"1\"==x&&\"1\"==d[C+1]?d[C]=\"1\":\",\"!=w||x!=d[C+1]||\"1\"!=x&&\"n\"!=x||(d[C]=x),x=w}for(var S=0;S<u;++S){var k=d[S];if(\",\"==k)d[S]=\"N\";else if(\"%\"==k){var L=void 0;for(L=S+1;L<u&&\"%\"==d[L];++L);for(var M=S&&\"!\"==d[S-1]||L<u&&\"1\"==d[L]?\"1\":\"N\",T=S;T<L;++T)d[T]=M;S=L-1}}for(var O=0,P=c;O<u;++O){var A=d[O];\"L\"==P&&\"1\"==A?d[O]=\"L\":i.test(A)&&(P=A)}for(var N=0;N<u;++N)if(r.test(d[N])){var D=void 0;for(D=N+1;D<u&&r.test(d[D]);++D);for(var H=\"L\"==(N?d[N-1]:c),W=H==(\"L\"==(D<u?d[D]:c))?H?\"L\":\"R\":c,E=N;E<D;++E)d[E]=W;N=D-1}for(var I,F=[],B=0;B<u;)if(o.test(d[B])){var z=B;for(++B;B<u&&o.test(d[B]);++B);F.push(new BidiSpan(0,z,B))}else{var R=B,V=F.length;for(++B;B<u&&\"L\"!=d[B];++B);for(var U=R;U<B;)if(s.test(d[U])){R<U&&F.splice(V,0,new BidiSpan(1,R,U));var j=U;for(++U;U<B&&s.test(d[U]);++U);F.splice(V,0,new BidiSpan(2,j,U)),R=U}else++U;R<B&&F.splice(V,0,new BidiSpan(1,R,B))}return\"ltr\"==l&&(1==F[0].level&&(I=a.match(/^\\s+/))&&(F[0].from=I[0].length,F.unshift(new BidiSpan(0,0,I[0].length))),1==lst(F).level&&(I=a.match(/\\s+$/))&&(lst(F).to-=I[0].length,F.push(new BidiSpan(0,u-I[0].length,u)))),\"rtl\"==l?F.reverse():F}}();function getOrder(e,t){var n=e.order;return null==n&&(n=e.order=z(e.text,t)),n}var R=[],V=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent(\"on\"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||R).concat(n)}};function getHandlers(e,t){return e._handlers&&e._handlers[t]||R}function off(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent(\"on\"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=indexOf(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function signal(e,t){var n=getHandlers(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function signalDOMEvent(e,t,n){return\"string\"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),signal(e,n||t.type,e,t),e_defaultPrevented(t)||t.codemirrorIgnore}function signalCursorActivity(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==indexOf(n,t[r])&&n.push(t[r])}function hasHandler(e,t){return getHandlers(e,t).length>0}function eventMixin(e){e.prototype.on=function(e,t){V(this,e,t)},e.prototype.off=function(e,t){off(this,e,t)}}function e_preventDefault(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function e_stopPropagation(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function e_defaultPrevented(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function e_stop(e){e_preventDefault(e),e_stopPropagation(e)}function e_target(e){return e.target||e.srcElement}function e_button(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var U,j=function(){if(s&&a<9)return!1;var e=elt(\"div\");return\"draggable\"in e||\"dragDrop\"in e}();function zeroWidthElement(e){if(null==U){var t=elt(\"span\",\"​\");removeChildrenAndAdd(e,elt(\"span\",[t,document.createTextNode(\"x\")])),0!=e.firstChild.offsetHeight&&(U=t.offsetWidth<=1&&t.offsetHeight>2&&!(s&&a<8))}var n=U?elt(\"span\",\"​\"):elt(\"span\",\" \",null,\"display: inline-block; width: 1px; margin-right: -1px\");return n.setAttribute(\"cm-text\",\"\"),n}var G;function hasBadBidiRects(e){if(null!=G)return G;var t=removeChildrenAndAdd(e,document.createTextNode(\"AخA\")),n=L(t,0,1).getBoundingClientRect(),r=L(t,1,2).getBoundingClientRect();return removeChildren(e),!(!n||n.left==n.right)&&(G=r.right-n.right<3)}var K=3!=\"\\n\\nb\".split(/\\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(\"\\n\",t);-1==i&&(i=e.length);var o=e.slice(t,\"\\r\"==e.charAt(i-1)?i-1:i),s=o.indexOf(\"\\r\");-1!=s?(n.push(o.slice(0,s)),t+=s+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\\r\\n?|\\n/)},_=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints(\"StartToEnd\",t)},$=function(){var e=elt(\"div\");return\"oncopy\"in e||(e.setAttribute(\"oncopy\",\"return;\"),\"function\"==typeof e.oncopy)}(),q=null;var X={},Y={};function resolveMode(e){if(\"string\"==typeof e&&Y.hasOwnProperty(e))e=Y[e];else if(e&&\"string\"==typeof e.name&&Y.hasOwnProperty(e.name)){var t=Y[e.name];\"string\"==typeof t&&(t={name:t}),(e=createObj(t,e)).name=t.name}else{if(\"string\"==typeof e&&/^[\\w\\-]+\\/[\\w\\-]+\\+xml$/.test(e))return resolveMode(\"application/xml\");if(\"string\"==typeof e&&/^[\\w\\-]+\\/[\\w\\-]+\\+json$/.test(e))return resolveMode(\"application/json\")}return\"string\"==typeof e?{name:e}:e||{name:\"null\"}}function getMode(e,t){t=resolveMode(t);var n=X[t.name];if(!n)return getMode(e,\"text/plain\");var r=n(e,t);if(Z.hasOwnProperty(t.name)){var i=Z[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r[\"_\"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var s in t.modeProps)r[s]=t.modeProps[s];return r}var Z={};function extendMode(e,t){copyObj(t,Z.hasOwnProperty(e)?Z[e]:Z[e]={})}function copyState(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function innerMode(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function startState(e,t,n){return!e.startState||e.startState(t,n)}var Q=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Q.prototype.eol=function(){return this.pos>=this.string.length},Q.prototype.sol=function(){return this.pos==this.lineStart},Q.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Q.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Q.prototype.eat=function(e){var t=this.string.charAt(this.pos);if(\"string\"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Q.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Q.prototype.eatSpace=function(){for(var e=this.pos;/[\\s\\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Q.prototype.skipToEnd=function(){this.pos=this.string.length},Q.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Q.prototype.backUp=function(e){this.pos-=e},Q.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=countColumn(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?countColumn(this.string,this.lineStart,this.tabSize):0)},Q.prototype.indentation=function(){return countColumn(this.string,null,this.tabSize)-(this.lineStart?countColumn(this.string,this.lineStart,this.tabSize):0)},Q.prototype.match=function(e,t,n){if(\"string\"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Q.prototype.current=function(){return this.string.slice(this.start,this.pos)},Q.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Q.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Q.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var J=function(e,t){this.state=e,this.lookAhead=t},ee=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};ee.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ee.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,\"\"),size:this.baseTokens[this.baseTokenPos]-e}},ee.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ee.fromSaved=function(e,t,n){return t instanceof J?new ee(e,copyState(e.mode,t.state),n,t.lookAhead):new ee(e,copyState(e.mode,t),n)},ee.prototype.save=function(e){var t=!1!==e?copyState(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new J(t,this.maxLookAhead):t};function highlightLine(e,t,n,r){var i=[e.state.modeGen],o={};runMode(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},o,r);for(var s=n.state,a=function(r){n.baseTokens=i;var a=e.state.overlays[r],l=1,c=0;n.state=!0,runMode(e,t.text,a.mode,n,function(e,t){for(var n=l;c<e;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(a.opaque)i.splice(n,l-n,e,\"overlay \"+t),l=n+2;else for(;n<l;n+=2){var o=i[n+1];i[n+1]=(o?o+\" \":\"\")+\"overlay \"+t}},o),n.state=s,n.baseTokens=null,n.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)a(l);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function getLineStyles(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=getContextBefore(e,lineNo(t)),i=t.text.length>e.options.maxHighlightLength&&copyState(e.doc.mode,r.state),o=highlightLine(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function getContextBefore(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ee(r,!0,t);var o=function findStartLine(e,t,n){for(var r,i,o=e.doc,s=n?-1:t-(e.doc.mode.innerMode?1e3:100),a=t;a>s;--a){if(a<=o.first)return o.first;var l=getLine(o,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof J?c.lookAhead:0)<=o.modeFrontier))return a;var u=countColumn(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=a-1,r=u)}return i}(e,t,n),s=o>r.first&&getLine(r,o-1).stateAfter,a=s?ee.fromSaved(r,s,o):new ee(r,startState(r.mode),o);return r.iter(o,t,function(n){processLine(e,n.text,a);var r=a.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?a.save():null,a.nextLine()}),n&&(r.modeFrontier=a.line),a}function processLine(e,t,n,r){var i=e.doc.mode,o=new Q(t,e.options.tabSize,n);for(o.start=o.pos=r||0,\"\"==t&&callBlankLine(i,n.state);!o.eol();)readToken(i,o,n.state),o.start=o.pos}function callBlankLine(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=innerMode(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function readToken(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=innerMode(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error(\"Mode \"+e.name+\" failed to advance stream.\")}var te=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function takeToken(e,t,n,r){var i,o,s=e.doc,a=s.mode,l=getLine(s,(t=clipPos(s,t)).line),c=getContextBefore(e,t.line,n),u=new Q(l.text,e.options.tabSize,c);for(r&&(o=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=readToken(a,u,c.state),r&&o.push(new te(u,i,copyState(s.mode,c.state)));return r?o:new te(u,i,c.state)}function extractLineClasses(e,t){if(e)for(;;){var n=e.match(/(?:^|\\s+)line-(background-)?(\\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?\"bgClass\":\"textClass\";null==t[r]?t[r]=n[2]:new RegExp(\"(?:^|s)\"+n[2]+\"(?:$|s)\").test(t[r])||(t[r]+=\" \"+n[2])}return e}function runMode(e,t,n,r,i,o,s){var a=n.flattenSpans;null==a&&(a=e.options.flattenSpans);var l,c=0,u=null,d=new Q(t,e.options.tabSize,r),p=e.options.addModeClass&&[null];for(\"\"==t&&extractLineClasses(callBlankLine(n,r.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(a=!1,s&&processLine(e,t,r,d.pos),d.pos=t.length,l=null):l=extractLineClasses(readToken(n,d,r.state,p),o),p){var h=p[0].name;h&&(l=\"m-\"+(l?h+\" \"+l:h))}if(!a||u!=l){for(;c<d.start;)i(c=Math.min(d.start,c+5e3),u);u=l}d.start=d.pos}for(;c<d.pos;){var f=Math.min(d.pos,c+5e3);i(f,u),c=f}}var ne=function(e,t,n){this.text=e,attachMarkedSpans(this,t),this.height=n?n(this):1};ne.prototype.lineNo=function(){return lineNo(this)},eventMixin(ne);var re={},ie={};function interpretTokenStyle(e,t){if(!e||/^\\s*$/.test(e))return null;var n=t.addModeClass?ie:re;return n[e]||(n[e]=e.replace(/\\S+/g,\"cm-$&\"))}function buildLineContent(e,t){var n=eltP(\"span\",null,null,l?\"padding-right: .1px\":null),r={pre:eltP(\"pre\",[n],\"CodeMirror-line\"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(s||l)&&e.getOption(\"lineWrapping\")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=buildToken,hasBadBidiRects(e.display.measure)&&(a=getOrder(o,e.doc.direction))&&(r.addToken=buildTokenBadBidi(r.addToken,a)),r.map=[];insertLineContent(o,r,getLineStyles(e,o,t!=e.display.externalMeasured&&lineNo(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=joinClasses(o.styleClasses.bgClass,r.bgClass||\"\")),o.styleClasses.textClass&&(r.textClass=joinClasses(o.styleClasses.textClass,r.textClass||\"\"))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(zeroWidthElement(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var c=r.content.lastChild;(/\\bcm-tab\\b/.test(c.className)||c.querySelector&&c.querySelector(\".cm-tab\"))&&(r.content.className=\"cm-tab-wrap-hack\")}return signal(e,\"renderLine\",e,t.line,r.pre),r.pre.className&&(r.textClass=joinClasses(r.pre.className,r.textClass||\"\")),r}function defaultSpecialCharPlaceholder(e){var t=elt(\"span\",\"•\",\"cm-invalidchar\");return t.title=\"\\\\u\"+e.charCodeAt(0).toString(16),t.setAttribute(\"aria-label\",t.title),t}function buildToken(e,t,n,r,i,o,l){if(t){var c,u=e.splitSpaces?function splitSpaces(e,t){if(e.length>1&&!/  /.test(e))return e;for(var n=t,r=\"\",i=0;i<e.length;i++){var o=e.charAt(i);\" \"!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=\" \"),r+=o,n=\" \"==o}return r}(t,e.trailingSpace):t,d=e.cm.state.specialChars,p=!1;if(d.test(t)){c=document.createDocumentFragment();for(var h=0;;){d.lastIndex=h;var f=d.exec(t),g=f?f.index-h:t.length-h;if(g){var m=document.createTextNode(u.slice(h,h+g));s&&a<9?c.appendChild(elt(\"span\",[m])):c.appendChild(m),e.map.push(e.pos,e.pos+g,m),e.col+=g,e.pos+=g}if(!f)break;h+=g+1;var v=void 0;if(\"\\t\"==f[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(v=c.appendChild(elt(\"span\",spaceStr(b),\"cm-tab\"))).setAttribute(\"role\",\"presentation\"),v.setAttribute(\"cm-text\",\"\\t\"),e.col+=b}else\"\\r\"==f[0]||\"\\n\"==f[0]?((v=c.appendChild(elt(\"span\",\"\\r\"==f[0]?\"␍\":\"␤\",\"cm-invalidchar\"))).setAttribute(\"cm-text\",f[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(f[0])).setAttribute(\"cm-text\",f[0]),s&&a<9?c.appendChild(elt(\"span\",[v])):c.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),s&&a<9&&(p=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||i||p||l){var C=n||\"\";r&&(C+=r),i&&(C+=i);var x=elt(\"span\",[c],C,l);return o&&(x.title=o),e.content.appendChild(x)}e.content.appendChild(c)}}function buildTokenBadBidi(e,t){return function(n,r,i,o,s,a,l){i=i?i+\" cm-force-border\":\"cm-force-border\";for(var c=n.pos,u=c+r.length;;){for(var d=void 0,p=0;p<t.length&&!((d=t[p]).to>c&&d.from<=c);p++);if(d.to>=u)return e(n,r,i,o,s,a,l);e(n,r.slice(0,d.to-c),i,o,null,a,l),o=null,r=r.slice(d.to-c),c=d.to}}}function buildCollapsedSpan(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement(\"span\"))),i.setAttribute(\"cm-marker\",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function insertLineContent(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var s,a,l,c,u,d,p,h=i.length,f=0,g=1,m=\"\",v=0;;){if(v==f){l=c=u=d=a=\"\",p=null,v=1/0;for(var y=[],b=void 0,C=0;C<r.length;++C){var x=r[C],w=x.marker;\"bookmark\"==w.type&&x.from==f&&w.widgetNode?y.push(w):x.from<=f&&(null==x.to||x.to>f||w.collapsed&&x.to==f&&x.from==f)?(null!=x.to&&x.to!=f&&v>x.to&&(v=x.to,c=\"\"),w.className&&(l+=\" \"+w.className),w.css&&(a=(a?a+\";\":\"\")+w.css),w.startStyle&&x.from==f&&(u+=\" \"+w.startStyle),w.endStyle&&x.to==v&&(b||(b=[])).push(w.endStyle,x.to),w.title&&!d&&(d=w.title),w.collapsed&&(!p||compareCollapsedMarkers(p.marker,w)<0)&&(p=x)):x.from>f&&v>x.from&&(v=x.from)}if(b)for(var S=0;S<b.length;S+=2)b[S+1]==v&&(c+=\" \"+b[S]);if(!p||p.from==f)for(var k=0;k<y.length;++k)buildCollapsedSpan(t,0,y[k]);if(p&&(p.from||0)==f){if(buildCollapsedSpan(t,(null==p.to?h+1:p.to)-f,p.marker,null==p.from),null==p.to)return;p.to==f&&(p=!1)}}if(f>=h)break;for(var L=Math.min(h,v);;){if(m){var M=f+m.length;if(!p){var T=M>L?m.slice(0,L-f):m;t.addToken(t,T,s?s+l:l,u,f+T.length==v?c:\"\",d,a)}if(M>=L){m=m.slice(L-f),f=L;break}f=M,u=\"\"}m=i.slice(o,o=n[g++]),s=interpretTokenStyle(n[g++],t.cm.options)}}else for(var O=1;O<n.length;O+=2)t.addToken(t,i.slice(o,o=n[O]),interpretTokenStyle(n[O+1],t.cm.options))}function LineView(e,t,n){this.line=t,this.rest=function visualLineContinued(e){for(var t,n;t=collapsedSpanAtEnd(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?lineNo(lst(this.rest))-n+1:1,this.node=this.text=null,this.hidden=lineIsHidden(e,t)}function buildViewArray(e,t,n){for(var r,i=[],o=t;o<n;o=r){var s=new LineView(e.doc,getLine(e.doc,o),o);r=o+s.size,i.push(s)}return i}var oe=null;var se=null;function signalLater(e,t){var n=getHandlers(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);oe?r=oe.delayedCallbacks:se?r=se:(r=se=[],setTimeout(fireOrphanDelayed,0));for(var o=function(e){r.push(function(){return n[e].apply(null,i)})},s=0;s<n.length;++s)o(s)}}function fireOrphanDelayed(){var e=se;se=null;for(var t=0;t<e.length;++t)e[t]()}function updateLineForChanges(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];\"text\"==o?updateLineText(e,t):\"gutter\"==o?updateLineGutter(e,t,n,r):\"class\"==o?updateLineClasses(e,t):\"widget\"==o&&updateLineWidgets(e,t,r)}t.changes=null}function ensureLineWrapped(e){return e.node==e.text&&(e.node=elt(\"div\",null,null,\"position: relative\"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),s&&a<8&&(e.node.style.zIndex=2)),e.node}function getLineContent(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):buildLineContent(e,t)}function updateLineText(e,t){var n=t.text.className,r=getLineContent(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,updateLineClasses(e,t)):n&&(t.text.className=n)}function updateLineClasses(e,t){!function updateLineBackground(e,t){var n=t.bgClass?t.bgClass+\" \"+(t.line.bgClass||\"\"):t.line.bgClass;if(n&&(n+=\" CodeMirror-linebackground\"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=ensureLineWrapped(t);t.background=r.insertBefore(elt(\"div\",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?ensureLineWrapped(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className=\"\");var n=t.textClass?t.textClass+\" \"+(t.line.textClass||\"\"):t.line.textClass;t.text.className=n||\"\"}function updateLineGutter(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=ensureLineWrapped(t);t.gutterBackground=elt(\"div\",null,\"CodeMirror-gutter-background \"+t.line.gutterClass,\"left: \"+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+\"px; width: \"+r.gutterTotalWidth+\"px\"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var s=ensureLineWrapped(t),a=t.gutter=elt(\"div\",null,\"CodeMirror-gutter-wrapper\",\"left: \"+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+\"px\");if(e.display.input.setUneditable(a),s.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=\" \"+t.line.gutterClass),!e.options.lineNumbers||o&&o[\"CodeMirror-linenumbers\"]||(t.lineNumber=a.appendChild(elt(\"div\",lineNumberFor(e.options,n),\"CodeMirror-linenumber CodeMirror-gutter-elt\",\"left: \"+r.gutterLeft[\"CodeMirror-linenumbers\"]+\"px; width: \"+e.display.lineNumInnerWidth+\"px\"))),o)for(var l=0;l<e.options.gutters.length;++l){var c=e.options.gutters[l],u=o.hasOwnProperty(c)&&o[c];u&&a.appendChild(elt(\"div\",[u],\"CodeMirror-gutter-elt\",\"left: \"+r.gutterLeft[c]+\"px; width: \"+r.gutterWidth[c]+\"px\"))}}}function updateLineWidgets(e,t,n){t.alignable&&(t.alignable=null);for(var r=t.node.firstChild,i=void 0;r;r=i)i=r.nextSibling,\"CodeMirror-linewidget\"==r.className&&t.node.removeChild(r);insertLineWidgets(e,t,n)}function buildLineElement(e,t,n,r){var i=getLineContent(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),updateLineClasses(e,t),updateLineGutter(e,t,n,r),insertLineWidgets(e,t,r),t.node}function insertLineWidgets(e,t,n){if(insertLineWidgetsFor(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)insertLineWidgetsFor(e,t.rest[r],t,n,!1)}function insertLineWidgetsFor(e,t,n,r,i){if(t.widgets)for(var o=ensureLineWrapped(n),s=0,a=t.widgets;s<a.length;++s){var l=a[s],c=elt(\"div\",[l.node],\"CodeMirror-linewidget\");l.handleMouseEvents||c.setAttribute(\"cm-ignore-events\",\"true\"),positionLineWidget(l,c,n,r),e.display.input.setUneditable(c),i&&l.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),signalLater(l,\"redraw\")}}function positionLineWidget(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+\"px\",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+\"px\"),t.style.width=i+\"px\"}e.coverGutter&&(t.style.zIndex=5,t.style.position=\"relative\",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+\"px\"))}function widgetHeight(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!contains(document.body,e.node)){var n=\"position: relative;\";e.coverGutter&&(n+=\"margin-left: -\"+t.display.gutters.offsetWidth+\"px;\"),e.noHScroll&&(n+=\"width: \"+t.display.wrapper.clientWidth+\"px;\"),removeChildrenAndAdd(t.display.measure,elt(\"div\",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function eventInWidget(e,t){for(var n=e_target(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&\"true\"==n.getAttribute(\"cm-ignore-events\")||n.parentNode==e.sizer&&n!=e.mover)return!0}function paddingTop(e){return e.lineSpace.offsetTop}function paddingVert(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function paddingH(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=removeChildrenAndAdd(e.measure,elt(\"pre\",\"x\")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function scrollGap(e){return O-e.display.nativeBarWidth}function displayWidth(e){return e.display.scroller.clientWidth-scrollGap(e)-e.display.barWidth}function displayHeight(e){return e.display.scroller.clientHeight-scrollGap(e)-e.display.barHeight}function mapFromLineView(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(lineNo(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function measureChar(e,t,n,r){return measureCharPrepared(e,prepareMeasureForLine(e,t),n,r)}function findViewForLine(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[findViewIndex(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function prepareMeasureForLine(e,t){var n=lineNo(t),r=findViewForLine(e,n);r&&!r.text?r=null:r&&r.changes&&(updateLineForChanges(e,r,n,getDimensions(e)),e.curOp.forceUpdate=!0),r||(r=function updateExternalMeasurement(e,t){var n=lineNo(t=visualLine(t)),r=e.display.externalMeasured=new LineView(e.doc,t,n);r.lineN=n;var i=r.built=buildLineContent(e,r);return r.text=i.pre,removeChildrenAndAdd(e.display.lineMeasure,i.pre),r}(e,t));var i=mapFromLineView(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function measureCharPrepared(e,t,n,r,i){t.before&&(n=-1);var o,l=n+(r||\"\");return t.cache.hasOwnProperty(l)?o=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(!function ensureLineHeights(e,t,n){var r=e.options.lineWrapping,i=r&&displayWidth(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var s=t.text.firstChild.getClientRects(),a=0;a<s.length-1;a++){var l=s[a],c=s[a+1];Math.abs(l.bottom-c.bottom)>2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function measureCharInner(e,t,n,r){var i,o=nodeAndOffsetInLineMap(t.map,n,r),l=o.node,c=o.start,u=o.end,d=o.collapse;if(3==l.nodeType){for(var p=0;p<4;p++){for(;c&&isExtendingChar(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u<o.coverEnd&&isExtendingChar(t.line.text.charAt(o.coverStart+u));)++u;if((i=s&&a<9&&0==c&&u==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():getUsefulRect(L(l,c,u).getClientRects(),r)).left||i.right||0==c)break;u=c,c-=1,d=\"right\"}s&&a<11&&(i=function maybeUpdateRectForZooming(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function hasBadZoomedRects(e){if(null!=q)return q;var t=removeChildrenAndAdd(e,elt(\"span\",\"x\")),n=t.getBoundingClientRect(),r=L(t,0,1).getBoundingClientRect();return q=Math.abs(n.left-r.left)>1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{c>0&&(d=r=\"right\");var h;i=e.options.lineWrapping&&(h=l.getClientRects()).length>1?h[\"right\"==r?h.length-1:0]:l.getBoundingClientRect()}if(s&&a<9&&!c&&(!i||!i.left&&!i.right)){var f=l.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+charWidth(e.display),top:f.top,bottom:f.bottom}:ae}for(var g=i.top-t.rect.top,m=i.bottom-t.rect.top,v=(g+m)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(v<y[b]);b++);var C=b?y[b-1]:0,x=y[b],w={left:(\"right\"==d?i.right:i.left)-t.rect.left,right:(\"left\"==d?i.left:i.right)-t.rect.left,top:C,bottom:x};i.left||i.right||(w.bogus=!0);e.options.singleCursorHeightPerLine||(w.rtop=g,w.rbottom=m);return w}(e,t,n,r)).bogus||(t.cache[l]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var ae={left:0,right:0,top:0,bottom:0};function nodeAndOffsetInLineMap(e,t,n){for(var r,i,o,s,a,l,c=0;c<e.length;c+=3)if(a=e[c],l=e[c+1],t<a?(i=0,o=1,s=\"left\"):t<l?o=(i=t-a)+1:(c==e.length-3||t==l&&e[c+3]>t)&&(i=(o=l-a)-1,t>=l&&(s=\"right\")),null!=i){if(r=e[c+2],a==l&&n==(r.insertLeft?\"left\":\"right\")&&(s=n),\"left\"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],s=\"left\";if(\"right\"==n&&i==l-a)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],s=\"right\";break}return{node:r,start:i,end:o,collapse:s,coverStart:a,coverEnd:l}}function getUsefulRect(e,t){var n=ae;if(\"left\"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function clearLineMeasurementCacheFor(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function clearLineMeasurementCache(e){e.display.externalMeasure=null,removeChildren(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)clearLineMeasurementCacheFor(e.display.view[t])}function clearCaches(e){clearLineMeasurementCache(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function pageScrollX(){return u&&m?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function pageScrollY(){return u&&m?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function widgetTopHeight(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=widgetHeight(e.widgets[n]));return t}function intoCoordSystem(e,t,n,r,i){if(!i){var o=widgetTopHeight(t);n.top+=o,n.bottom+=o}if(\"line\"==r)return n;r||(r=\"local\");var s=heightAtLine(t);if(\"local\"==r?s+=paddingTop(e.display):s-=e.display.viewOffset,\"page\"==r||\"window\"==r){var a=e.display.lineSpace.getBoundingClientRect();s+=a.top+(\"window\"==r?0:pageScrollY());var l=a.left+(\"window\"==r?0:pageScrollX());n.left+=l,n.right+=l}return n.top+=s,n.bottom+=s,n}function fromCoordSystem(e,t,n){if(\"div\"==n)return t;var r=t.left,i=t.top;if(\"page\"==n)r-=pageScrollX(),i-=pageScrollY();else if(\"local\"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var s=e.display.lineSpace.getBoundingClientRect();return{left:r-s.left,top:i-s.top}}function charCoords(e,t,n,r,i){return r||(r=getLine(e.doc,t.line)),intoCoordSystem(e,r,measureChar(e,r,t.ch,i),n)}function cursorCoords(e,t,n,r,i,o){r=r||getLine(e.doc,t.line),i||(i=prepareMeasureForLine(e,r));function get(t,s){var a=measureCharPrepared(e,i,t,s?\"right\":\"left\",o);return s?a.left=a.right:a.right=a.left,intoCoordSystem(e,r,a,n)}var s=getOrder(r,e.doc.direction),a=t.ch,l=t.sticky;if(a>=r.text.length?(a=r.text.length,l=\"before\"):a<=0&&(a=0,l=\"after\"),!s)return get(\"before\"==l?a-1:a,\"before\"==l);function getBidi(e,t,n){var r=1==s[t].level;return get(n?e-1:e,r!=n)}var c=getBidiPartAt(s,a,l),u=B,d=getBidi(a,c,\"before\"==l);return null!=u&&(d.other=getBidi(a,u,\"before\"!=l)),d}function estimateCoords(e,t){var n=0;t=clipPos(e.doc,t),e.options.lineWrapping||(n=charWidth(e.display)*t.ch);var r=getLine(e.doc,t.line),i=heightAtLine(r)+paddingTop(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function PosWithInfo(e,t,n,r,i){var o=Pos(e,t,n);return o.xRel=i,r&&(o.outside=!0),o}function coordsChar(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return PosWithInfo(r.first,0,null,!0,-1);var i=lineAtHeight(r,n),o=r.first+r.size-1;if(i>o)return PosWithInfo(r.first+r.size-1,getLine(r,o).text.length,null,!0,1);t<0&&(t=0);for(var s=getLine(r,i);;){var a=coordsCharInner(e,s,i,t,n),l=collapsedSpanAtEnd(s),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;i=lineNo(s=c.to.line)}}function wrappedLineExtent(e,t,n,r){r-=widgetTopHeight(t);var i=t.text.length,o=findFirst(function(t){return measureCharPrepared(e,n,t-1).bottom<=r},i,0);return{begin:o,end:i=findFirst(function(t){return measureCharPrepared(e,n,t).top>r},o,i)}}function wrappedLineExtentChar(e,t,n,r){n||(n=prepareMeasureForLine(e,t));return wrappedLineExtent(e,t,n,intoCoordSystem(e,t,measureCharPrepared(e,n,r),\"line\").top)}function boxIsAfter(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function coordsCharInner(e,t,n,r,i){i-=heightAtLine(t);var o=prepareMeasureForLine(e,t),s=widgetTopHeight(t),a=0,l=t.text.length,c=!0,u=getOrder(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?function coordsBidiPartWrapped(e,t,n,r,i,o,s){var a=wrappedLineExtent(e,t,r,s),l=a.begin,c=a.end;/\\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,p=0;p<i.length;p++){var h=i[p];if(!(h.from>=c||h.to<=l)){var f=1!=h.level,g=measureCharPrepared(e,r,f?Math.min(c,h.to)-1:Math.max(l,h.from)).right,m=g<o?o-g+1e9:g-o;(!u||d>m)&&(u=h,d=m)}}u||(u=i[i.length-1]);u.from<l&&(u={from:l,to:u.to,level:u.level});u.to>c&&(u={from:u.from,to:c,level:u.level});return u}:function coordsBidiPart(e,t,n,r,i,o,s){var a=findFirst(function(a){var l=i[a],c=1!=l.level;return boxIsAfter(cursorCoords(e,Pos(n,c?l.to:l.from,c?\"before\":\"after\"),\"line\",t,r),o,s,!0)},0,i.length-1),l=i[a];if(a>0){var c=1!=l.level,u=cursorCoords(e,Pos(n,c?l.from:l.to,c?\"after\":\"before\"),\"line\",t,r);boxIsAfter(u,o,s,!0)&&u.top>s&&(l=i[a-1])}return l})(e,t,n,o,u,r,i);a=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var p,h,f=null,g=null,m=findFirst(function(t){var n=measureCharPrepared(e,o,t);return n.top+=s,n.bottom+=s,!!boxIsAfter(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(f=t,g=n),!0)},a,l),v=!1;if(g){var y=r-g.left<g.right-r,b=y==c;m=f+(b?0:1),h=b?\"after\":\"before\",p=y?g.left:g.right}else{c||m!=l&&m!=a||m++,h=0==m?\"after\":m==t.text.length?\"before\":measureCharPrepared(e,o,m-(c?1:0)).bottom+s<=i==c?\"after\":\"before\";var C=cursorCoords(e,Pos(n,m,h),\"line\",t,o);p=C.left,v=i<C.top||i>=C.bottom}return PosWithInfo(n,m=skipExtendingChars(t.text,m,1),h,v,r-p)}var le;function textHeight(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==le){le=elt(\"pre\");for(var t=0;t<49;++t)le.appendChild(document.createTextNode(\"x\")),le.appendChild(elt(\"br\"));le.appendChild(document.createTextNode(\"x\"))}removeChildrenAndAdd(e.measure,le);var n=le.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),removeChildren(e.measure),n||1}function charWidth(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=elt(\"span\",\"xxxxxxxxxx\"),n=elt(\"pre\",[t]);removeChildrenAndAdd(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function getDimensions(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,s=0;o;o=o.nextSibling,++s)n[e.options.gutters[s]]=o.offsetLeft+o.clientLeft+i,r[e.options.gutters[s]]=o.clientWidth;return{fixedPos:compensateForHScroll(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function compensateForHScroll(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function estimateHeight(e){var t=textHeight(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/charWidth(e.display)-3);return function(i){if(lineIsHidden(e.doc,i))return 0;var o=0;if(i.widgets)for(var s=0;s<i.widgets.length;s++)i.widgets[s].height&&(o+=i.widgets[s].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function estimateLineHeights(e){var t=e.doc,n=estimateHeight(e);t.iter(function(e){var t=n(e);t!=e.height&&updateLineHeight(e,t)})}function posFromMouse(e,t,n,r){var i=e.display;if(!n&&\"true\"==e_target(t).getAttribute(\"cm-not-content\"))return null;var o,s,a=i.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left,s=t.clientY-a.top}catch(t){return null}var l,c=coordsChar(e,o,s);if(r&&1==c.xRel&&(l=getLine(e.doc,c.line).text).length==c.ch){var u=countColumn(l,l.length,e.options.tabSize)-l.length;c=Pos(c.line,Math.max(0,Math.round((o-paddingH(e.display).left)/charWidth(e.display))-u))}return c}function findViewIndex(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function updateSelection(e){e.display.input.showSelection(e.display.input.prepareSelection())}function prepareSelection(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),s=0;s<n.sel.ranges.length;s++)if(t||s!=n.sel.primIndex){var a=n.sel.ranges[s];if(!(a.from().line>=e.display.viewTo||a.to().line<e.display.viewFrom)){var l=a.empty();(l||e.options.showCursorWhenSelecting)&&drawSelectionCursor(e,a.head,i),l||drawSelectionRange(e,a,o)}}return r}function drawSelectionCursor(e,t,n){var r=cursorCoords(e,t,\"div\",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(elt(\"div\",\" \",\"CodeMirror-cursor\"));if(i.style.left=r.left+\"px\",i.style.top=r.top+\"px\",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+\"px\",r.other){var o=n.appendChild(elt(\"div\",\" \",\"CodeMirror-cursor CodeMirror-secondarycursor\"));o.style.display=\"\",o.style.left=r.other.left+\"px\",o.style.top=r.other.top+\"px\",o.style.height=.85*(r.other.bottom-r.other.top)+\"px\"}}function cmpCoords(e,t){return e.top-t.top||e.left-t.left}function drawSelectionRange(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),s=paddingH(e.display),a=s.left,l=Math.max(r.sizerWidth,displayWidth(e)-r.sizer.offsetLeft)-s.right,c=\"ltr\"==i.direction;function add(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(elt(\"div\",null,\"CodeMirror-selected\",\"position: absolute; left: \"+e+\"px;\\n                             top: \"+t+\"px; width: \"+(null==n?l-e:n)+\"px;\\n                             height: \"+(r-t)+\"px\"))}function drawForLine(t,n,r){var o,s,u=getLine(i,t),d=u.text.length;function coords(n,r){return charCoords(e,Pos(t,n),\"div\",u,r)}function wrapX(t,n,r){var i=wrappedLineExtentChar(e,u,null,t),o=\"ltr\"==n==(\"after\"==r)?\"left\":\"right\";return coords(\"after\"==r?i.begin:i.end-(/\\s/.test(u.text.charAt(i.end-1))?2:1),o)[o]}var p=getOrder(u,i.direction);return function iterateBidiSections(e,t,n,r){if(!e)return r(t,n,\"ltr\",0);for(var i=!1,o=0;o<e.length;++o){var s=e[o];(s.from<n&&s.to>t||t==n&&s.to==t)&&(r(Math.max(s.from,t),Math.min(s.to,n),1==s.level?\"rtl\":\"ltr\",o),i=!0)}i||r(t,n,\"ltr\")}(p,n||0,null==r?d:r,function(e,t,i,u){var h=\"ltr\"==i,f=coords(e,h?\"left\":\"right\"),g=coords(t-1,h?\"right\":\"left\"),m=null==n&&0==e,v=null==r&&t==d,y=0==u,b=!p||u==p.length-1;if(g.top-f.top<=3){var C=(c?v:m)&&b,x=(c?m:v)&&y?a:(h?f:g).left,w=C?l:(h?g:f).right;add(x,f.top,w-x,f.bottom)}else{var S,k,L,M;h?(S=c&&m&&y?a:f.left,k=c?l:wrapX(e,i,\"before\"),L=c?a:wrapX(t,i,\"after\"),M=c&&v&&b?l:g.right):(S=c?wrapX(e,i,\"before\"):a,k=!c&&m&&y?l:f.right,L=!c&&v&&b?a:g.left,M=c?wrapX(t,i,\"after\"):l),add(S,f.top,k-S,f.bottom),f.bottom<g.top&&add(a,f.bottom,null,g.top),add(L,g.top,M-L,g.bottom)}(!o||cmpCoords(f,o)<0)&&(o=f),cmpCoords(g,o)<0&&(o=g),(!s||cmpCoords(f,s)<0)&&(s=f),cmpCoords(g,s)<0&&(s=g)}),{start:o,end:s}}var u=t.from(),d=t.to();if(u.line==d.line)drawForLine(u.line,u.ch,d.ch);else{var p=getLine(i,u.line),h=getLine(i,d.line),f=visualLine(p)==visualLine(h),g=drawForLine(u.line,u.ch,f?p.text.length+1:null).end,m=drawForLine(d.line,f?0:null,d.ch).start;f&&(g.top<m.top-2?(add(g.right,g.top,null,g.bottom),add(a,m.top,m.left,m.bottom)):add(g.right,g.top,m.left-g.right,g.bottom)),g.bottom<m.top&&add(a,g.bottom,null,m.top)}n.appendChild(o)}function restartBlink(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility=\"\",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(n=!n)?\"\":\"hidden\"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility=\"hidden\")}}function ensureFocus(e){e.state.focused||(e.display.input.focus(),onFocus(e))}function delayBlurEvent(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,onBlur(e))},100)}function onFocus(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),\"nocursor\"!=e.options.readOnly&&(e.state.focused||(signal(e,\"focus\",e,t),e.state.focused=!0,addClass(e.display.wrapper,\"CodeMirror-focused\"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),restartBlink(e))}function onBlur(e,t){e.state.delayingBlurEvent||(e.state.focused&&(signal(e,\"blur\",e,t),e.state.focused=!1,k(e.display.wrapper,\"CodeMirror-focused\")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function updateHeightsInViewport(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i=t.view[r],o=void 0;if(!i.hidden){if(s&&a<8){var l=i.node.offsetTop+i.node.offsetHeight;o=l-n,n=l}else{var c=i.node.getBoundingClientRect();o=c.bottom-c.top}var u=i.line.height-o;if(o<2&&(o=textHeight(t)),(u>.005||u<-.005)&&(updateLineHeight(i.line,o),updateWidgetHeight(i.line),i.rest))for(var d=0;d<i.rest.length;d++)updateWidgetHeight(i.rest[d])}}}function updateWidgetHeight(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function visibleLines(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-paddingTop(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=lineAtHeight(t,r),s=lineAtHeight(t,i);if(n&&n.ensure){var a=n.ensure.from.line,l=n.ensure.to.line;a<o?(o=a,s=lineAtHeight(t,heightAtLine(getLine(t,a))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=s&&(o=lineAtHeight(t,heightAtLine(getLine(t,l))-e.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function alignHorizontally(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=compensateForHScroll(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+\"px\",s=0;s<n.length;s++)if(!n[s].hidden){e.options.fixedGutter&&(n[s].gutter&&(n[s].gutter.style.left=o),n[s].gutterBackground&&(n[s].gutterBackground.style.left=o));var a=n[s].alignable;if(a)for(var l=0;l<a.length;l++)a[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+\"px\")}}function maybeUpdateLineNumberWidth(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=lineNumberFor(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(elt(\"div\",[elt(\"div\",n)],\"CodeMirror-linenumber CodeMirror-gutter-elt\")),o=i.firstChild.offsetWidth,s=i.offsetWidth-o;return r.lineGutter.style.width=\"\",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-s)+1,r.lineNumWidth=r.lineNumInnerWidth+s,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+\"px\",updateGutterSpace(e),!0}return!1}function calculateScrollPos(e,t){var n=e.display,r=textHeight(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=displayHeight(e),s={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+paddingVert(n),l=t.top<r,c=t.bottom>a-r;if(t.top<i)s.scrollTop=l?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?a:t.bottom)-o);u!=i&&(s.scrollTop=u)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,p=displayWidth(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),h=t.right-t.left>p;return h&&(t.right=t.left+p),t.left<10?s.scrollLeft=0:t.left<d?s.scrollLeft=Math.max(0,t.left-(h?0:10)):t.right>p+d-3&&(s.scrollLeft=t.right+(h?0:10)-p),s}function addToScrollTop(e,t){null!=t&&(resolveScrollToPos(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function ensureCursorVisible(e){resolveScrollToPos(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function scrollToCoords(e,t,n){null==t&&null==n||resolveScrollToPos(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function resolveScrollToPos(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;scrollToCoordsRange(e,estimateCoords(e,t.from),estimateCoords(e,t.to),t.margin)}}function scrollToCoordsRange(e,t,n,r){var i=calculateScrollPos(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});scrollToCoords(e,i.scrollLeft,i.scrollTop)}function updateScrollTop(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||updateDisplaySimple(e,{top:t}),setScrollTop(e,t,!0),n&&updateDisplaySimple(e),startWorker(e,100))}function setScrollTop(e,t,n){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function setScrollLeft(e,t,n,r){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,alignHorizontally(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function measureForScrollbars(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+paddingVert(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+scrollGap(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var ce=function(e,t,n){this.cm=n;var r=this.vert=elt(\"div\",[elt(\"div\",null,null,\"min-width: 1px\")],\"CodeMirror-vscrollbar\"),i=this.horiz=elt(\"div\",[elt(\"div\",null,null,\"height: 100%; min-height: 1px\")],\"CodeMirror-hscrollbar\");e(r),e(i),V(r,\"scroll\",function(){r.clientHeight&&t(r.scrollTop,\"vertical\")}),V(i,\"scroll\",function(){i.clientWidth&&t(i.scrollLeft,\"horizontal\")}),this.checkedZeroWidth=!1,s&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth=\"18px\")};ce.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display=\"block\",this.vert.style.bottom=t?r+\"px\":\"0\";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+\"px\"}else this.vert.style.display=\"\",this.vert.firstChild.style.height=\"0\";if(t){this.horiz.style.display=\"block\",this.horiz.style.right=n?r+\"px\":\"0\",this.horiz.style.left=e.barLeft+\"px\";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+\"px\"}else this.horiz.style.display=\"\",this.horiz.firstChild.style.width=\"0\";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},ce.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,\"horiz\")},ce.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,\"vert\")},ce.prototype.zeroWidthHack=function(){var e=y&&!h?\"12px\":\"18px\";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents=\"none\",this.disableHoriz=new T,this.disableVert=new T},ce.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents=\"auto\";t.set(1e3,function maybeDisable(){var r=e.getBoundingClientRect();(\"vert\"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=e?e.style.pointerEvents=\"none\":t.set(1e3,maybeDisable)})},ce.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ue=function(){};ue.prototype.update=function(){return{bottom:0,right:0}},ue.prototype.setScrollLeft=function(){},ue.prototype.setScrollTop=function(){},ue.prototype.clear=function(){};function updateScrollbars(e,t){t||(t=measureForScrollbars(e));var n=e.display.barWidth,r=e.display.barHeight;updateScrollbarsInner(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&updateHeightsInViewport(e),updateScrollbarsInner(e,measureForScrollbars(e)),n=e.display.barWidth,r=e.display.barHeight}function updateScrollbarsInner(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+\"px\",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+\"px\",n.heightForcer.style.borderBottom=r.bottom+\"px solid transparent\",r.right&&r.bottom?(n.scrollbarFiller.style.display=\"block\",n.scrollbarFiller.style.height=r.bottom+\"px\",n.scrollbarFiller.style.width=r.right+\"px\"):n.scrollbarFiller.style.display=\"\",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display=\"block\",n.gutterFiller.style.height=r.bottom+\"px\",n.gutterFiller.style.width=t.gutterWidth+\"px\"):n.gutterFiller.style.display=\"\"}var de={native:ce,null:ue};function initScrollbars(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&k(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new de[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),V(t,\"mousedown\",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute(\"cm-not-content\",\"true\")},function(t,n){\"horizontal\"==n?setScrollLeft(e,t):updateScrollTop(e,t)},e),e.display.scrollbars.addClass&&addClass(e.display.wrapper,e.display.scrollbars.addClass)}var pe=0;function startOperation(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++pe},function pushOperation(e){oe?oe.ops.push(e):e.ownsGroup=oe={ops:[e],delayedCallbacks:[]}}(e.curOp)}function endOperation(e){!function finishOperation(e,t){var n=e.ownsGroup;if(n)try{!function fireCallbacksForOps(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}(n)}finally{oe=null,t(n)}}(e.curOp,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function endOperations(e){for(var t=e.ops,n=0;n<t.length;n++)endOperation_R1(t[n]);for(var r=0;r<t.length;r++)(i=t[r]).updatedDisplay=i.mustUpdate&&updateDisplayIfNeeded(i.cm,i.update);var i;for(var o=0;o<t.length;o++)endOperation_R2(t[o]);for(var s=0;s<t.length;s++)endOperation_W2(t[s]);for(var a=0;a<t.length;a++)endOperation_finish(t[a])}(e)})}function endOperation_R1(e){var t=e.cm,n=t.display;!function maybeClipScrollbars(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=scrollGap(e)+\"px\",t.sizer.style.marginBottom=-t.nativeBarWidth+\"px\",t.sizer.style.borderRightWidth=scrollGap(e)+\"px\",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&findMaxLine(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new he(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function endOperation_R2(e){var t=e.cm,n=t.display;e.updatedDisplay&&updateHeightsInViewport(t),e.barMeasure=measureForScrollbars(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=measureChar(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+scrollGap(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-displayWidth(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function endOperation_W2(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+\"px\",e.maxScrollLeft<t.doc.scrollLeft&&setScrollLeft(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==activeElt();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&updateScrollbars(t,e.barMeasure),e.updatedDisplay&&setDocumentHeight(t,e.barMeasure),e.selectionChanged&&restartBlink(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&ensureFocus(e.cm)}function endOperation_finish(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&postUpdateDisplay(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&setScrollTop(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&setScrollLeft(t,e.scrollLeft,!0,!0),e.scrollToPos){!function maybeScrollWindow(e,t){if(!signalDOMEvent(e,\"scrollCursorIntoView\")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!f){var o=elt(\"div\",\"​\",null,\"position: absolute;\\n                         top: \"+(t.top-n.viewOffset-paddingTop(e.display))+\"px;\\n                         height: \"+(t.bottom-t.top+scrollGap(e)+n.barHeight)+\"px;\\n                         left: \"+t.left+\"px; width: \"+Math.max(2,t.right-t.left)+\"px;\");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function scrollPosIntoView(e,t,n,r){null==r&&(r=0);var i;e.options.lineWrapping||t!=n||(n=\"before\"==(t=t.ch?Pos(t.line,\"before\"==t.sticky?t.ch-1:t.ch,\"after\"):t).sticky?Pos(t.line,t.ch+1,\"before\"):t);for(var o=0;o<5;o++){var s=!1,a=cursorCoords(e,t),l=n&&n!=t?cursorCoords(e,n):a,c=calculateScrollPos(e,i={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-r,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+r}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(updateScrollTop(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(setScrollLeft(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(s=!0)),!s)break}return i}(t,clipPos(r,e.scrollToPos.from),clipPos(r,e.scrollToPos.to),e.scrollToPos.margin))}var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var s=0;s<i.length;++s)i[s].lines.length||signal(i[s],\"hide\");if(o)for(var a=0;a<o.length;++a)o[a].lines.length&&signal(o[a],\"unhide\");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&signal(t,\"changes\",t,e.changeObjs),e.update&&e.update.finish()}function runInOp(e,t){if(e.curOp)return t();startOperation(e);try{return t()}finally{endOperation(e)}}function operation(e,t){return function(){if(e.curOp)return t.apply(e,arguments);startOperation(e);try{return t.apply(e,arguments)}finally{endOperation(e)}}}function methodOp(e){return function(){if(this.curOp)return e.apply(this,arguments);startOperation(this);try{return e.apply(this,arguments)}finally{endOperation(this)}}}function docMethodOp(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);startOperation(t);try{return e.apply(this,arguments)}finally{endOperation(t)}}}function regChange(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)F&&visualLineNo(e.doc,t)<i.viewTo&&resetView(e);else if(n<=i.viewFrom)F&&visualLineEndNo(e.doc,n+r)>i.viewFrom?resetView(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)resetView(e);else if(t<=i.viewFrom){var o=viewCuttingPoint(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):resetView(e)}else if(n>=i.viewTo){var s=viewCuttingPoint(e,t,t,-1);s?(i.view=i.view.slice(0,s.index),i.viewTo=s.lineN):resetView(e)}else{var a=viewCuttingPoint(e,t,t,-1),l=viewCuttingPoint(e,n,n+r,1);a&&l?(i.view=i.view.slice(0,a.index).concat(buildViewArray(e,a.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):resetView(e)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(i.externalMeasured=null))}function regLineChange(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[findViewIndex(e,t)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==indexOf(s,n)&&s.push(n)}}}function resetView(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function viewCuttingPoint(e,t,n,r){var i,o=findViewIndex(e,t),s=e.display.view;if(!F||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var a=e.display.viewFrom,l=0;l<o;l++)a+=s[l].size;if(a!=t){if(r>0){if(o==s.length-1)return null;i=a+s[o].size-t,o++}else i=a-t;t+=i,n+=i}for(;visualLineNo(e.doc,n)!=n;){if(o==(r<0?0:s.length-1))return null;n+=r*s[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function countDirtyView(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function startWorker(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,bind(highlightWorker,e))}function highlightWorker(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=getContextBefore(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var s=o.styles,a=o.text.length>e.options.maxHighlightLength?copyState(t.mode,r.state):null,l=highlightLine(e,o,r,!0);a&&(r.state=a),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!s||s.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),p=0;!d&&p<s.length;++p)d=s[p]!=o.styles[p];d&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&processLine(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return startWorker(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&runInOp(e,function(){for(var t=0;t<i.length;t++)regLineChange(e,i[t],\"text\")})}}var he=function(e,t,n){var r=e.display;this.viewport=t,this.visible=visibleLines(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=displayWidth(e),this.force=n,this.dims=getDimensions(e),this.events=[]};he.prototype.signal=function(e,t){hasHandler(e,t)&&this.events.push(arguments)},he.prototype.finish=function(){for(var e=0;e<this.events.length;e++)signal.apply(null,this.events[e])};function updateDisplayIfNeeded(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return resetView(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==countDirtyView(e))return!1;maybeUpdateLineNumberWidth(e)&&(resetView(e),t.dims=getDimensions(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),s=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>s&&n.viewTo-s<20&&(s=Math.min(i,n.viewTo)),F&&(o=visualLineNo(e.doc,o),s=visualLineEndNo(e.doc,s));var a=o!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function adjustView(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=buildViewArray(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=buildViewArray(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(findViewIndex(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(buildViewArray(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,findViewIndex(e,n)))),r.viewTo=n}(e,o,s),n.viewOffset=heightAtLine(getLine(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+\"px\";var c=countDirtyView(e);if(!a&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function selectionSnapshot(e){if(e.hasFocus())return null;var t=activeElt();if(!t||!contains(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&contains(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display=\"none\"),function patchDisplay(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,s=o.firstChild;function rm(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display=\"none\":t.parentNode.removeChild(t),n}for(var a=r.view,c=r.viewFrom,u=0;u<a.length;u++){var d=a[u];if(d.hidden);else if(d.node&&d.node.parentNode==o){for(;s!=d.node;)s=rm(s);var p=i&&null!=t&&t<=c&&d.lineNumber;d.changes&&(indexOf(d.changes,\"gutter\")>-1&&(p=!1),updateLineForChanges(e,d,c,n)),p&&(removeChildren(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(lineNumberFor(e.options,c)))),s=d.node.nextSibling}else{var h=buildLineElement(e,d,c,n);o.insertBefore(h,s)}c+=d.size}for(;s;)s=rm(s)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=\"\"),n.renderedView=n.view,function restoreSelection(e){if(e&&e.activeElt&&e.activeElt!=activeElt()&&(e.activeElt.focus(),e.anchorNode&&contains(document.body,e.anchorNode)&&contains(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(u),removeChildren(n.cursorDiv),removeChildren(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,startWorker(e,400)),n.updateLineNumbers=null,!0}function postUpdateDisplay(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=displayWidth(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+paddingVert(e.display)-displayHeight(e),n.top)}),t.visible=visibleLines(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&updateDisplayIfNeeded(e,t);r=!1){updateHeightsInViewport(e);var i=measureForScrollbars(e);updateSelection(e),updateScrollbars(e,i),setDocumentHeight(e,i),t.force=!1}t.signal(e,\"update\",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,\"viewportChange\",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function updateDisplaySimple(e,t){var n=new he(e,t);if(updateDisplayIfNeeded(e,n)){updateHeightsInViewport(e),postUpdateDisplay(e,n);var r=measureForScrollbars(e);updateSelection(e),updateScrollbars(e,r),setDocumentHeight(e,r),n.finish()}}function updateGutterSpace(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+\"px\"}function setDocumentHeight(e,t){e.display.sizer.style.minHeight=t.docHeight+\"px\",e.display.heightForcer.style.top=t.docHeight+\"px\",e.display.gutters.style.height=t.docHeight+e.display.barHeight+scrollGap(e)+\"px\"}function updateGutters(e){var t=e.display.gutters,n=e.options.gutters;removeChildren(t);for(var r=0;r<n.length;++r){var i=n[r],o=t.appendChild(elt(\"div\",null,\"CodeMirror-gutter \"+i));\"CodeMirror-linenumbers\"==i&&(e.display.lineGutter=o,o.style.width=(e.display.lineNumWidth||1)+\"px\")}t.style.display=r?\"\":\"none\",updateGutterSpace(e)}function setGuttersForLineNumbers(e){var t=indexOf(e.gutters,\"CodeMirror-linenumbers\");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat([\"CodeMirror-linenumbers\"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}var fe=0,ge=null;s?ge=-.53:n?ge=15:u?ge=-.7:p&&(ge=-1/3);function wheelEventDelta(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function wheelEventPixels(e){var t=wheelEventDelta(e);return t.x*=ge,t.y*=ge,t}function onScrollWheel(e,t){var r=wheelEventDelta(t),i=r.x,o=r.y,s=e.display,a=s.scroller,c=a.scrollWidth>a.clientWidth,u=a.scrollHeight>a.clientHeight;if(i&&c||o&&u){if(o&&y&&l)e:for(var p=t.target,h=s.view;p!=a;p=p.parentNode)for(var f=0;f<h.length;f++)if(h[f].node==p){e.display.currentWheelTarget=p;break e}if(i&&!n&&!d&&null!=ge)return o&&u&&updateScrollTop(e,Math.max(0,a.scrollTop+o*ge)),setScrollLeft(e,Math.max(0,a.scrollLeft+i*ge)),(!o||o&&u)&&e_preventDefault(t),void(s.wheelStartX=null);if(o&&null!=ge){var g=o*ge,m=e.doc.scrollTop,v=m+s.wrapper.clientHeight;g<0?m=Math.max(0,m+g-50):v=Math.min(e.doc.height,v+g+50),updateDisplaySimple(e,{top:m,bottom:v})}fe<20&&(null==s.wheelStartX?(s.wheelStartX=a.scrollLeft,s.wheelStartY=a.scrollTop,s.wheelDX=i,s.wheelDY=o,setTimeout(function(){if(null!=s.wheelStartX){var e=a.scrollLeft-s.wheelStartX,t=a.scrollTop-s.wheelStartY,n=t&&s.wheelDY&&t/s.wheelDY||e&&s.wheelDX&&e/s.wheelDX;s.wheelStartX=s.wheelStartY=null,n&&(ge=(ge*fe+n)/(fe+1),++fe)}},200)):(s.wheelDX+=i,s.wheelDY+=o))}}var me=function(e,t){this.ranges=e,this.primIndex=t};me.prototype.primary=function(){return this.ranges[this.primIndex]},me.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!equalCursorPos(n.anchor,r.anchor)||!equalCursorPos(n.head,r.head))return!1}return!0},me.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new ve(copyPos(this.ranges[t].anchor),copyPos(this.ranges[t].head));return new me(e,this.primIndex)},me.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},me.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(cmp(t,r.from())>=0&&cmp(e,r.to())<=0)return n}return-1};var ve=function(e,t){this.anchor=e,this.head=t};ve.prototype.from=function(){return minPos(this.anchor,this.head)},ve.prototype.to=function(){return maxPos(this.anchor,this.head)},ve.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function normalizeSelection(e,t){var n=e[t];e.sort(function(e,t){return cmp(e.from(),t.from())}),t=indexOf(e,n);for(var r=1;r<e.length;r++){var i=e[r],o=e[r-1];if(cmp(o.to(),i.from())>=0){var s=minPos(o.from(),i.from()),a=maxPos(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;r<=t&&--t,e.splice(--r,2,new ve(l?a:s,l?s:a))}}return new me(e,t)}function simpleSelection(e,t){return new me([new ve(e,t||e)],0)}function changeEnd(e){return e.text?Pos(e.from.line+e.text.length-1,lst(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function adjustForChange(e,t){if(cmp(e,t.from)<0)return e;if(cmp(e,t.to)<=0)return changeEnd(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=changeEnd(t).ch-t.to.ch),Pos(n,r)}function computeSelAfterChange(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new ve(adjustForChange(i.anchor,t),adjustForChange(i.head,t)))}return normalizeSelection(n,e.sel.primIndex)}function offsetPos(e,t,n){return e.line==t.line?Pos(n.line,e.ch-t.ch+n.ch):Pos(n.line+(e.line-t.line),e.ch)}function loadMode(e){e.doc.mode=getMode(e.options,e.doc.modeOption),resetModeState(e)}function resetModeState(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,startWorker(e,100),e.state.modeGen++,e.curOp&&regChange(e)}function isWholeLineUpdate(e,t){return 0==t.from.ch&&0==t.to.ch&&\"\"==lst(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function updateDoc(e,t,n,r){function spansFor(e){return n?n[e]:null}function update(e,n,i){!function updateLine(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),detachMarkedSpans(e),attachMarkedSpans(e,n);var i=r?r(e):1;i!=e.height&&updateLineHeight(e,i)}(e,n,i,r),signalLater(e,\"change\",e,t)}function linesFor(e,t){for(var n=[],i=e;i<t;++i)n.push(new ne(s[i],spansFor(i),r));return n}var i=t.from,o=t.to,s=t.text,a=getLine(e,i.line),l=getLine(e,o.line),c=lst(s),u=spansFor(s.length-1),d=o.line-i.line;if(t.full)e.insert(0,linesFor(0,s.length)),e.remove(s.length,e.size-s.length);else if(isWholeLineUpdate(e,t)){var p=linesFor(0,s.length-1);update(l,l.text,u),d&&e.remove(i.line,d),p.length&&e.insert(i.line,p)}else if(a==l)if(1==s.length)update(a,a.text.slice(0,i.ch)+c+a.text.slice(o.ch),u);else{var h=linesFor(1,s.length-1);h.push(new ne(c+a.text.slice(o.ch),u,r)),update(a,a.text.slice(0,i.ch)+s[0],spansFor(0)),e.insert(i.line+1,h)}else if(1==s.length)update(a,a.text.slice(0,i.ch)+s[0]+l.text.slice(o.ch),spansFor(0)),e.remove(i.line+1,d);else{update(a,a.text.slice(0,i.ch)+s[0],spansFor(0)),update(l,c+l.text.slice(o.ch),u);var f=linesFor(1,s.length-1);d>1&&e.remove(i.line+1,d-1),e.insert(i.line+1,f)}signalLater(e,\"change\",e,t)}function linkedDocs(e,t,n){!function propagate(e,r,i){if(e.linked)for(var o=0;o<e.linked.length;++o){var s=e.linked[o];if(s.doc!=r){var a=i&&s.sharedHist;n&&!a||(t(s.doc,a),propagate(s.doc,e,a))}}}(e,null,!0)}function attachDoc(e,t){if(t.cm)throw new Error(\"This document is already in use.\");e.doc=t,t.cm=e,estimateLineHeights(e),loadMode(e),setDirectionClass(e),e.options.lineWrapping||findMaxLine(e),e.options.mode=t.modeOption,regChange(e)}function setDirectionClass(e){(\"rtl\"==e.doc.direction?addClass:k)(e.display.lineDiv,\"CodeMirror-rtl\")}function History(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function historyChangeFromChange(e,t){var n={from:copyPos(t.from),to:changeEnd(t),text:getBetween(e,t.from,t.to)};return attachLocalSpans(e,n,t.from.line,t.to.line+1),linkedDocs(e,function(e){return attachLocalSpans(e,n,t.from.line,t.to.line+1)},!0),n}function clearSelectionEvents(e){for(;e.length;){if(!lst(e).ranges)break;e.pop()}}function addChangeToHistory(e,t,n,r){var i=e.history;i.undone.length=0;var o,s,a=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(\"+\"==t.origin.charAt(0)&&e.cm&&i.lastModTime>a-e.cm.options.historyEventDelay||\"*\"==t.origin.charAt(0)))&&(o=function lastChangeEvent(e,t){return t?(clearSelectionEvents(e.done),lst(e.done)):e.done.length&&!lst(e.done).ranges?lst(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),lst(e.done)):void 0}(i,i.lastOp==r)))s=lst(o.changes),0==cmp(t.from,t.to)&&0==cmp(t.from,s.to)?s.to=changeEnd(t):o.changes.push(historyChangeFromChange(e,t));else{var l=lst(i.done);for(l&&l.ranges||pushSelectionToHistory(e.sel,i.done),o={changes:[historyChangeFromChange(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,s||signal(e,\"historyAdded\")}function addSelectionToHistory(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function selectionEventCanBeMerged(e,t,n,r){var i=t.charAt(0);return\"*\"==i||\"+\"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,lst(i.done),t))?i.done[i.done.length-1]=t:pushSelectionToHistory(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&clearSelectionEvents(i.undone)}function pushSelectionToHistory(e,t){var n=lst(t);n&&n.ranges&&n.equals(e)||t.push(e)}function attachLocalSpans(e,t,n,r){var i=t[\"spans_\"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t[\"spans_\"+e.id]={}))[o]=n.markedSpans),++o})}function removeClearedSpans(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function mergeOldSpans(e,t){var n=function getOldSpans(e,t){var n=t[\"spans_\"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(removeClearedSpans(n[i]));return r}(e,t),r=stretchSpansOverChange(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],s=r[i];if(o&&s)e:for(var a=0;a<s.length;++a){for(var l=s[a],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue e;o.push(l)}else s&&(n[i]=s)}return n}function copyHistoryArray(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?me.prototype.deepCopy.call(o):o);else{var s=o.changes,a=[];r.push({changes:a});for(var l=0;l<s.length;++l){var c=s[l],u=void 0;if(a.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\\d+)$/))&&indexOf(t,Number(u[1]))>-1&&(lst(a)[d]=c[d],delete c[d])}}}return r}function extendRange(e,t,n,r){if(r){var i=e.anchor;if(n){var o=cmp(t,i)<0;o!=cmp(n,i)<0?(i=t,t=n):o!=cmp(t,n)<0&&(t=n)}return new ve(i,t)}return new ve(n||t,t)}function extendSelection(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),setSelection(e,new me([extendRange(e.sel.primary(),t,n,i)],0),r)}function extendSelections(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=extendRange(e.sel.ranges[o],t[o],null,i);setSelection(e,normalizeSelection(r,e.sel.primIndex),n)}function replaceOneSelection(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,setSelection(e,normalizeSelection(i,e.sel.primIndex),r)}function setSimpleSelection(e,t,n,r){setSelection(e,simpleSelection(t,n),r)}function setSelectionReplaceHistory(e,t,n){var r=e.history.done,i=lst(r);i&&i.ranges?(r[r.length-1]=t,setSelectionNoUndo(e,t,n)):setSelection(e,t,n)}function setSelection(e,t,n){setSelectionNoUndo(e,t,n),addSelectionToHistory(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function setSelectionNoUndo(e,t,n){(hasHandler(e,\"beforeSelectionChange\")||e.cm&&hasHandler(e.cm,\"beforeSelectionChange\"))&&(t=function filterSelectionChange(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new ve(clipPos(e,t[n].anchor),clipPos(e,t[n].head))},origin:n&&n.origin};return signal(e,\"beforeSelectionChange\",e,r),e.cm&&signal(e.cm,\"beforeSelectionChange\",e.cm,r),r.ranges!=t.ranges?normalizeSelection(r.ranges,r.ranges.length-1):t}(e,t,n));setSelectionInner(e,skipAtomicInSelection(e,t,n&&n.bias||(cmp(t.primary().head,e.sel.primary().head)<0?-1:1),!0)),n&&!1===n.scroll||!e.cm||ensureCursorVisible(e.cm)}function setSelectionInner(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,signalCursorActivity(e.cm)),signalLater(e,\"cursorActivity\",e))}function reCheckSelection(e){setSelectionInner(e,skipAtomicInSelection(e,e.sel,null,!1))}function skipAtomicInSelection(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var s=t.ranges[o],a=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],l=skipAtomic(e,s.anchor,a&&a.anchor,n,r),c=skipAtomic(e,s.head,a&&a.head,n,r);(i||l!=s.anchor||c!=s.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new ve(l,c))}return i?normalizeSelection(i,t.primIndex):t}function skipAtomicInner(e,t,n,r,i){var o=getLine(e,t.line);if(o.markedSpans)for(var s=0;s<o.markedSpans.length;++s){var a=o.markedSpans[s],l=a.marker;if((null==a.from||(l.inclusiveLeft?a.from<=t.ch:a.from<t.ch))&&(null==a.to||(l.inclusiveRight?a.to>=t.ch:a.to>t.ch))){if(i&&(signal(l,\"beforeCursorEnter\"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(n){var c=l.find(r<0?1:-1),u=void 0;if((r<0?l.inclusiveRight:l.inclusiveLeft)&&(c=movePos(e,c,-r,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(u=cmp(c,n))&&(r<0?u<0:u>0))return skipAtomicInner(e,c,t,r,i)}var d=l.find(r<0?-1:1);return(r<0?l.inclusiveLeft:l.inclusiveRight)&&(d=movePos(e,d,r,d.line==t.line?o:null)),d?skipAtomicInner(e,d,t,r,i):null}}return t}function skipAtomic(e,t,n,r,i){var o=r||1,s=skipAtomicInner(e,t,n,o,i)||!i&&skipAtomicInner(e,t,n,o,!0)||skipAtomicInner(e,t,n,-o,i)||!i&&skipAtomicInner(e,t,n,-o,!0);return s||(e.cantEdit=!0,Pos(e.first,0))}function movePos(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?clipPos(e,Pos(t.line-1)):null:n>0&&t.ch==(r||getLine(e,t.line)).text.length?t.line<e.first+e.size-1?Pos(t.line+1,0):null:new Pos(t.line,t.ch+n)}function selectAll(e){e.setSelection(Pos(e.firstLine(),0),Pos(e.lastLine()),A)}function filterChange(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,o){t&&(r.from=clipPos(e,t)),n&&(r.to=clipPos(e,n)),i&&(r.text=i),void 0!==o&&(r.origin=o)}),signal(e,\"beforeChange\",e,r),e.cm&&signal(e.cm,\"beforeChange\",e.cm,r),r.canceled?null:{from:r.from,to:r.to,text:r.text,origin:r.origin}}function makeChange(e,t,n){if(e.cm){if(!e.cm.curOp)return operation(e.cm,makeChange)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(hasHandler(e,\"beforeChange\")||e.cm&&hasHandler(e.cm,\"beforeChange\"))||(t=filterChange(e,t,!0))){var r=I&&!n&&function removeReadOnlyRanges(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=indexOf(r,n)||(r||(r=[])).push(n)}}),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var s=r[o],a=s.find(0),l=0;l<i.length;++l){var c=i[l];if(!(cmp(c.to,a.from)<0||cmp(c.from,a.to)>0)){var u=[l,1],d=cmp(c.from,a.from),p=cmp(c.to,a.to);(d<0||!s.inclusiveLeft&&!d)&&u.push({from:c.from,to:a.from}),(p>0||!s.inclusiveRight&&!p)&&u.push({from:a.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)makeChangeInner(e,{from:r[i].from,to:r[i].to,text:i?[\"\"]:t.text,origin:t.origin});else makeChangeInner(e,t)}}function makeChangeInner(e,t){if(1!=t.text.length||\"\"!=t.text[0]||0!=cmp(t.from,t.to)){var n=computeSelAfterChange(e,t);addChangeToHistory(e,t,n,e.cm?e.cm.curOp.id:NaN),makeChangeSingleDoc(e,t,n,stretchSpansOverChange(e,t));var r=[];linkedDocs(e,function(e,n){n||-1!=indexOf(r,e.history)||(rebaseHist(e.history,t),r.push(e.history)),makeChangeSingleDoc(e,t,null,stretchSpansOverChange(e,t))})}}function makeChangeFromHistory(e,t,n){if(!e.cm||!e.cm.state.suppressEdits||n){for(var r,i=e.history,o=e.sel,s=\"undo\"==t?i.done:i.undone,a=\"undo\"==t?i.undone:i.done,l=0;l<s.length&&(r=s[l],n?!r.ranges||r.equals(e.sel):r.ranges);l++);if(l!=s.length){for(i.lastOrigin=i.lastSelOrigin=null;(r=s.pop()).ranges;){if(pushSelectionToHistory(r,a),n&&!r.equals(e.sel))return void setSelection(e,r,{clearRedo:!1});o=r}var c=[];pushSelectionToHistory(o,a),a.push({changes:c,generation:i.generation}),i.generation=r.generation||++i.maxGeneration;for(var u=hasHandler(e,\"beforeChange\")||e.cm&&hasHandler(e.cm,\"beforeChange\"),d=function(n){var i=r.changes[n];if(i.origin=t,u&&!filterChange(e,i,!1))return s.length=0,{};c.push(historyChangeFromChange(e,i));var o=n?computeSelAfterChange(e,i):lst(s);makeChangeSingleDoc(e,i,o,mergeOldSpans(e,i)),!n&&e.cm&&e.cm.scrollIntoView({from:i.from,to:changeEnd(i)});var a=[];linkedDocs(e,function(e,t){t||-1!=indexOf(a,e.history)||(rebaseHist(e.history,i),a.push(e.history)),makeChangeSingleDoc(e,i,null,mergeOldSpans(e,i))})},p=r.changes.length-1;p>=0;--p){var h=d(p);if(h)return h.v}}}}function shiftDoc(e,t){if(0!=t&&(e.first+=t,e.sel=new me(map(e.sel.ranges,function(e){return new ve(Pos(e.anchor.line+t,e.anchor.ch),Pos(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){regChange(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)regLineChange(e.cm,r,\"gutter\")}}function makeChangeSingleDoc(e,t,n,r){if(e.cm&&!e.cm.curOp)return operation(e.cm,makeChangeSingleDoc)(e,t,n,r);if(t.to.line<e.first)shiftDoc(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);shiftDoc(e,i),t={from:Pos(e.first,0),to:Pos(t.to.line+i,t.to.ch),text:[lst(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:Pos(o,getLine(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=getBetween(e,t.from,t.to),n||(n=computeSelAfterChange(e,t)),e.cm?function makeChangeSingleDocInEditor(e,t,n){var r=e.doc,i=e.display,o=t.from,s=t.to,a=!1,l=o.line;e.options.lineWrapping||(l=lineNo(visualLine(getLine(r,o.line))),r.iter(l,s.line+1,function(e){if(e==i.maxLine)return a=!0,!0}));r.sel.contains(t.from,t.to)>-1&&signalCursorActivity(e);updateDoc(r,t,n,estimateHeight(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,function(e){var t=lineLength(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0));(function retreatFrontier(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=getLine(e,r).stateAfter;if(i&&(!(i instanceof J)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}})(r,o.line),startWorker(e,400);var c=t.text.length-(s.line-o.line)-1;t.full?regChange(e):o.line!=s.line||1!=t.text.length||isWholeLineUpdate(e.doc,t)?regChange(e,o.line,s.line+1,c):regLineChange(e,o.line,\"text\");var u=hasHandler(e,\"changes\"),d=hasHandler(e,\"change\");if(d||u){var p={from:o,to:s,text:t.text,removed:t.removed,origin:t.origin};d&&signalLater(e,\"change\",e,p),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}(e.cm,t,r):updateDoc(e,t,r),setSelectionNoUndo(e,n,A)}}function replaceRange(e,t,n,r,i){if(r||(r=n),cmp(r,n)<0){var o;n=(o=[r,n])[0],r=o[1]}\"string\"==typeof t&&(t=e.splitLines(t)),makeChange(e,{from:n,to:r,text:t,origin:i})}function rebaseHistSelSingle(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function rebaseHistArray(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],s=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var a=0;a<o.ranges.length;a++)rebaseHistSelSingle(o.ranges[a].anchor,t,n,r),rebaseHistSelSingle(o.ranges[a].head,t,n,r)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(n<c.from.line)c.from=Pos(c.from.line+r,c.from.ch),c.to=Pos(c.to.line+r,c.to.ch);else if(t<=c.to.line){s=!1;break}}s||(e.splice(0,i+1),i=0)}}}function rebaseHist(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;rebaseHistArray(e.done,n,r,i),rebaseHistArray(e.undone,n,r,i)}function changeLine(e,t,n,r){var i=t,o=t;return\"number\"==typeof t?o=getLine(e,clipLine(e,t)):i=lineNo(t),null==i?null:(r(o,i)&&e.cm&&regLineChange(e.cm,i,n),o)}function LeafChunk(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}LeafChunk.prototype={chunkSize:function chunkSize(){return this.lines.length},removeInner:function removeInner(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,(o=i).parent=null,detachMarkedSpans(o),signalLater(i,\"delete\")}var o;this.lines.splice(e,t)},collapse:function collapse(e){e.push.apply(e,this.lines)},insertInner:function insertInner(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function iterN(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}};function BranchChunk(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}BranchChunk.prototype={chunkSize:function chunkSize(){return this.size},removeInner:function removeInner(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),s=r.height;if(r.removeInner(e,o),this.height-=s-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof LeafChunk))){var a=[];this.collapse(a),this.children=[new LeafChunk(a)],this.children[0].parent=this}},collapse:function collapse(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function insertInner(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var s=i.lines.length%25+25,a=s;a<i.lines.length;){var l=new LeafChunk(i.lines.slice(a,a+=25));i.height-=l.height,this.children.splice(++r,0,l),l.parent=this}i.lines=i.lines.slice(0,s),this.maybeSpill()}break}e-=o}},maybeSpill:function maybeSpill(){if(!(this.children.length<=10)){var e=this;do{var t=new BranchChunk(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=indexOf(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new BranchChunk(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function iterN(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var s=Math.min(t,o-e);if(i.iterN(e,s,n))return!0;if(0==(t-=s))break;e=0}else e-=o}}};var ye=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};ye.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=lineNo(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=widgetHeight(this);updateLineHeight(n,Math.max(0,n.height-o)),e&&(runInOp(e,function(){adjustScrollWhenAboveVisible(e,n,-o),regLineChange(e,r,\"widget\")}),signalLater(e,\"lineWidgetCleared\",e,this,r))}},ye.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=widgetHeight(this)-t;i&&(updateLineHeight(r,r.height+i),n&&runInOp(n,function(){n.curOp.forceUpdate=!0,adjustScrollWhenAboveVisible(n,r,i),signalLater(n,\"lineWidgetChanged\",n,e,lineNo(r))}))},eventMixin(ye);function adjustScrollWhenAboveVisible(e,t,n){heightAtLine(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&addToScrollTop(e,n)}var be=0,Ce=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++be};Ce.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&startOperation(e),hasHandler(this,\"clear\")){var n=this.find();n&&signalLater(this,\"clear\",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var s=this.lines[o],a=getMarkedSpanFor(s.markedSpans,this);e&&!this.collapsed?regLineChange(e,lineNo(s),\"text\"):e&&(null!=a.to&&(i=lineNo(s)),null!=a.from&&(r=lineNo(s))),s.markedSpans=removeMarkedSpan(s.markedSpans,a),null==a.from&&this.collapsed&&!lineIsHidden(this.doc,s)&&e&&updateLineHeight(s,textHeight(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=visualLine(this.lines[l]),u=lineLength(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&regChange(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&reCheckSelection(e.doc)),e&&signalLater(e,\"markerCleared\",e,this,r,i),t&&endOperation(e),this.parent&&this.parent.clear()}},Ce.prototype.find=function(e,t){null==e&&\"bookmark\"==this.type&&(e=1);for(var n,r,i=0;i<this.lines.length;++i){var o=this.lines[i],s=getMarkedSpanFor(o.markedSpans,this);if(null!=s.from&&(n=Pos(t?o:lineNo(o),s.from),-1==e))return n;if(null!=s.to&&(r=Pos(t?o:lineNo(o),s.to),1==e))return r}return n&&{from:n,to:r}},Ce.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&runInOp(r,function(){var i=t.line,o=lineNo(t.line),s=findViewForLine(r,o);if(s&&(clearLineMeasurementCacheFor(s),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!lineIsHidden(n.doc,i)&&null!=n.height){var a=n.height;n.height=null;var l=widgetHeight(n)-a;l&&updateLineHeight(i,i.height+l)}signalLater(r,\"markerChanged\",r,e)})},Ce.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=indexOf(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Ce.prototype.detachLine=function(e){if(this.lines.splice(indexOf(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},eventMixin(Ce);function markText(e,t,n,r,i){if(r&&r.shared)return function markTextShared(e,t,n,r,i){(r=copyObj(r)).shared=!1;var o=[markText(e,t,n,r,i)],s=o[0],a=r.widgetNode;return linkedDocs(e,function(e){a&&(r.widgetNode=a.cloneNode(!0)),o.push(markText(e,clipPos(e,t),clipPos(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;s=lst(o)}),new xe(o,s)}(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return operation(e.cm,markText)(e,t,n,r,i);var o=new Ce(e,i),s=cmp(t,n);if(r&&copyObj(r,o,!1),s>0||0==s&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=eltP(\"span\",[o.replacedWith],\"CodeMirror-widget\"),r.handleMouseEvents||o.widgetNode.setAttribute(\"cm-ignore-events\",\"true\"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(conflictingCollapsedRange(e,t.line,t,n,o)||t.line!=n.line&&conflictingCollapsedRange(e,n.line,t,n,o))throw new Error(\"Inserting collapsed marker partially overlapping an existing one\");!function seeCollapsedSpans(){F=!0}()}o.addToHistory&&addChangeToHistory(e,{from:t,to:n,origin:\"markText\"},e.sel,NaN);var a,l=t.line,c=e.cm;if(e.iter(l,n.line+1,function(e){c&&o.collapsed&&!c.options.lineWrapping&&visualLine(e)==c.display.maxLine&&(a=!0),o.collapsed&&l!=t.line&&updateLineHeight(e,0),function addMarkedSpan(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new MarkedSpan(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&e.iter(t.line,n.line+1,function(t){lineIsHidden(e,t)&&updateLineHeight(t,0)}),o.clearOnEnter&&V(o,\"beforeCursorEnter\",function(){return o.clear()}),o.readOnly&&(!function seeReadOnlySpans(){I=!0}(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++be,o.atomic=!0),c){if(a&&(c.curOp.updateMaxLine=!0),o.collapsed)regChange(c,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var u=t.line;u<=n.line;u++)regLineChange(c,u,\"text\");o.atomic&&reCheckSelection(c.doc),signalLater(c,\"markerAdded\",c,o)}return o}var xe=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};xe.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();signalLater(this,\"clear\")}},xe.prototype.find=function(e,t){return this.primary.find(e,t)},eventMixin(xe);function findSharedMarkers(e){return e.findMarks(Pos(e.first,0),e.clipPos(Pos(e.lastLine())),function(e){return e.parent})}function detachSharedMarkers(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];linkedDocs(n.primary.doc,function(e){return r.push(e)});for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==indexOf(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}var we=0,Se=function(e,t,n,r,i){if(!(this instanceof Se))return new Se(e,t,n,r,i);null==n&&(n=0),BranchChunk.call(this,[new LeafChunk([new ne(\"\",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=Pos(n,0);this.sel=simpleSelection(o),this.history=new History(null),this.id=++we,this.modeOption=t,this.lineSep=r,this.direction=\"rtl\"==i?\"rtl\":\"ltr\",this.extend=!1,\"string\"==typeof e&&(e=this.splitLines(e)),updateDoc(this,{from:o,to:o,text:e}),setSelection(this,simpleSelection(o),A)};Se.prototype=createObj(BranchChunk.prototype,{constructor:Se,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=getLines(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:docMethodOp(function(e){var t=Pos(this.first,0),n=this.first+this.size-1;makeChange(this,{from:t,to:Pos(n,getLine(this,n).text.length),text:this.splitLines(e),origin:\"setValue\",full:!0},!0),this.cm&&scrollToCoords(this.cm,0,0),setSelection(this,simpleSelection(t),A)}),replaceRange:function(e,t,n,r){replaceRange(this,e,t=clipPos(this,t),n=n?clipPos(this,n):t,r)},getRange:function(e,t,n){var r=getBetween(this,clipPos(this,e),clipPos(this,t));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(isLine(this,e))return getLine(this,e)},getLineNumber:function(e){return lineNo(e)},getLineHandleVisualStart:function(e){return\"number\"==typeof e&&(e=getLine(this,e)),visualLine(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return clipPos(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||\"head\"==e?t.head:\"anchor\"==e?t.anchor:\"end\"==e||\"to\"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:docMethodOp(function(e,t,n){setSimpleSelection(this,clipPos(this,\"number\"==typeof e?Pos(e,t||0):e),null,n)}),setSelection:docMethodOp(function(e,t,n){setSimpleSelection(this,clipPos(this,e),clipPos(this,t||e),n)}),extendSelection:docMethodOp(function(e,t,n){extendSelection(this,clipPos(this,e),t&&clipPos(this,t),n)}),extendSelections:docMethodOp(function(e,t){extendSelections(this,clipPosArray(this,e),t)}),extendSelectionsBy:docMethodOp(function(e,t){extendSelections(this,clipPosArray(this,map(this.sel.ranges,e)),t)}),setSelections:docMethodOp(function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new ve(clipPos(this,e[i].anchor),clipPos(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),setSelection(this,normalizeSelection(r,t),n)}}),addSelection:docMethodOp(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new ve(clipPos(this,e),clipPos(this,t||e))),setSelection(this,normalizeSelection(r,r.length-1),n)}),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=getBetween(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=getBetween(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||\"+input\")},replaceSelections:docMethodOp(function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var s=i.ranges[o];r[o]={from:s.from(),to:s.to(),text:this.splitLines(e[o]),origin:n}}for(var a=t&&\"end\"!=t&&function computeReplacedSel(e,t,n){for(var r=[],i=Pos(e.first,0),o=i,s=0;s<t.length;s++){var a=t[s],l=offsetPos(a.from,i,o),c=offsetPos(changeEnd(a),i,o);if(i=a.to,o=c,\"around\"==n){var u=e.sel.ranges[s],d=cmp(u.head,u.anchor)<0;r[s]=new ve(d?c:l,d?l:c)}else r[s]=new ve(l,l)}return new me(r,e.sel.primIndex)}(this,r,t),l=r.length-1;l>=0;l--)makeChange(this,r[l]);a?setSelectionReplaceHistory(this,a):this.cm&&ensureCursorVisible(this.cm)}),undo:docMethodOp(function(){makeChangeFromHistory(this,\"undo\")}),redo:docMethodOp(function(){makeChangeFromHistory(this,\"redo\")}),undoSelection:docMethodOp(function(){makeChangeFromHistory(this,\"undo\",!0)}),redoSelection:docMethodOp(function(){makeChangeFromHistory(this,\"redo\",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){this.history=new History(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:copyHistoryArray(this.history.done),undone:copyHistoryArray(this.history.undone)}},setHistory:function(e){var t=this.history=new History(this.history.maxGeneration);t.done=copyHistoryArray(e.done.slice(0),null,!0),t.undone=copyHistoryArray(e.undone.slice(0),null,!0)},setGutterMarker:docMethodOp(function(e,t,n){return changeLine(this,e,\"gutter\",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&isEmpty(r)&&(e.gutterMarkers=null),!0})}),clearGutter:docMethodOp(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&changeLine(t,n,\"gutter\",function(){return n.gutterMarkers[e]=null,isEmpty(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(\"number\"==typeof e){if(!isLine(this,e))return null;if(t=e,!(e=getLine(this,e)))return null}else if(null==(t=lineNo(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:docMethodOp(function(e,t,n){return changeLine(this,e,\"gutter\"==t?\"gutter\":\"class\",function(e){var r=\"text\"==t?\"textClass\":\"background\"==t?\"bgClass\":\"gutter\"==t?\"gutterClass\":\"wrapClass\";if(e[r]){if(classTest(n).test(e[r]))return!1;e[r]+=\" \"+n}else e[r]=n;return!0})}),removeLineClass:docMethodOp(function(e,t,n){return changeLine(this,e,\"gutter\"==t?\"gutter\":\"class\",function(e){var r=\"text\"==t?\"textClass\":\"background\"==t?\"bgClass\":\"gutter\"==t?\"gutterClass\":\"wrapClass\",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(classTest(n));if(!o)return!1;var s=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&s!=i.length?\" \":\"\")+i.slice(s)||null}return!0})}),addLineWidget:docMethodOp(function(e,t,n){return function addLineWidget(e,t,n,r){var i=new ye(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),changeLine(e,t,\"widget\",function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!lineIsHidden(e,t)){var r=heightAtLine(t)<e.scrollTop;updateLineHeight(t,t.height+widgetHeight(i)),r&&addToScrollTop(o,i.height),o.curOp.forceUpdate=!0}return!0}),signalLater(o,\"lineWidgetAdded\",o,i,\"number\"==typeof t?t:lineNo(t)),i}(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return markText(this,clipPos(this,e),clipPos(this,t),n,n&&n.type||\"range\")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return markText(this,e=clipPos(this,e),e,n,\"bookmark\")},findMarksAt:function(e){var t=[],n=getLine(this,(e=clipPos(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=clipPos(this,e),t=clipPos(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var s=o.markedSpans;if(s)for(var a=0;a<s.length;a++){var l=s[a];null!=l.to&&i==e.line&&e.ch>=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n}),clipPos(this,Pos(n,t))},indexFromPos:function(e){var t=(e=clipPos(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+n}),t},copy:function(e){var t=new Se(getLines(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Se(getLines(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function copySharedMarkers(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),s=e.clipPos(i.to);if(cmp(o,s)){var a=markText(e,o,s,r.primary,r.primary.type);r.markers.push(a),a.parent=r}}}(r,findSharedMarkers(this)),r},unlinkDoc:function(e){if(e instanceof CodeMirror$1&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),detachSharedMarkers(findSharedMarkers(this));break}}if(e.history==this.history){var n=[e.id];linkedDocs(e,function(e){return n.push(e.id)},!0),e.history=new History(null),e.history.done=copyHistoryArray(this.history.done,n),e.history.undone=copyHistoryArray(this.history.undone,n)}},iterLinkedDocs:function(e){linkedDocs(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):K(e)},lineSeparator:function(){return this.lineSep||\"\\n\"},setDirection:docMethodOp(function(e){\"rtl\"!=e&&(e=\"ltr\"),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&function directionChanged(e){runInOp(e,function(){setDirectionClass(e),regChange(e)})}(this.cm))})}),Se.prototype.eachLine=Se.prototype.iter;var ke=0;function onDrop(e){var t=this;if(clearDragCursor(t),!signalDOMEvent(t,e)&&!eventInWidget(t.display,e)){e_preventDefault(e),s&&(ke=+new Date);var n=posFromMouse(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),a=0,l=function(e,r){if(!t.options.allowDropFileTypes||-1!=indexOf(t.options.allowDropFileTypes,e.type)){var s=new FileReader;s.onload=operation(t,function(){var e=s.result;if(/[\\x00-\\x08\\x0e-\\x1f]{2}/.test(e)&&(e=\"\"),o[r]=e,++a==i){var l={from:n=clipPos(t.doc,n),to:n,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:\"paste\"};makeChange(t.doc,l),setSelectionReplaceHistory(t.doc,simpleSelection(n,changeEnd(l)))}}),s.readAsText(e)}},c=0;c<i;++c)l(r[c],c);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var u=e.dataTransfer.getData(\"Text\");if(u){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),setSelectionNoUndo(t.doc,simpleSelection(n,n)),d)for(var p=0;p<d.length;++p)replaceRange(t.doc,\"\",d[p].anchor,d[p].head,\"drag\");t.replaceSelection(u,\"around\",\"paste\"),t.display.input.focus()}}catch(e){}}}}function clearDragCursor(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function forEachCodeMirror(e){if(document.getElementsByClassName)for(var t=document.getElementsByClassName(\"CodeMirror\"),n=0;n<t.length;n++){var r=t[n].CodeMirror;r&&e(r)}}var Le=!1;function ensureGlobalHandlers(){Le||(!function registerGlobalHandlers(){var e;V(window,\"resize\",function(){null==e&&(e=setTimeout(function(){e=null,forEachCodeMirror(onResize)},100))}),V(window,\"blur\",function(){return forEachCodeMirror(onBlur)})}(),Le=!0)}function onResize(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}for(var Me={3:\"Enter\",8:\"Backspace\",9:\"Tab\",13:\"Enter\",16:\"Shift\",17:\"Ctrl\",18:\"Alt\",19:\"Pause\",20:\"CapsLock\",27:\"Esc\",32:\"Space\",33:\"PageUp\",34:\"PageDown\",35:\"End\",36:\"Home\",37:\"Left\",38:\"Up\",39:\"Right\",40:\"Down\",44:\"PrintScrn\",45:\"Insert\",46:\"Delete\",59:\";\",61:\"=\",91:\"Mod\",92:\"Mod\",93:\"Mod\",106:\"*\",107:\"=\",109:\"-\",110:\".\",111:\"/\",127:\"Delete\",173:\"-\",186:\";\",187:\"=\",188:\",\",189:\"-\",190:\".\",191:\"/\",192:\"`\",219:\"[\",220:\"\\\\\",221:\"]\",222:\"'\",63232:\"Up\",63233:\"Down\",63234:\"Left\",63235:\"Right\",63272:\"Delete\",63273:\"Home\",63275:\"End\",63276:\"PageUp\",63277:\"PageDown\",63302:\"Insert\"},Te=0;Te<10;Te++)Me[Te+48]=Me[Te+96]=String(Te);for(var Oe=65;Oe<=90;Oe++)Me[Oe]=String.fromCharCode(Oe);for(var Pe=1;Pe<=12;Pe++)Me[Pe+111]=Me[Pe+63235]=\"F\"+Pe;var Ae={};Ae.basic={Left:\"goCharLeft\",Right:\"goCharRight\",Up:\"goLineUp\",Down:\"goLineDown\",End:\"goLineEnd\",Home:\"goLineStartSmart\",PageUp:\"goPageUp\",PageDown:\"goPageDown\",Delete:\"delCharAfter\",Backspace:\"delCharBefore\",\"Shift-Backspace\":\"delCharBefore\",Tab:\"defaultTab\",\"Shift-Tab\":\"indentAuto\",Enter:\"newlineAndIndent\",Insert:\"toggleOverwrite\",Esc:\"singleSelection\"},Ae.pcDefault={\"Ctrl-A\":\"selectAll\",\"Ctrl-D\":\"deleteLine\",\"Ctrl-Z\":\"undo\",\"Shift-Ctrl-Z\":\"redo\",\"Ctrl-Y\":\"redo\",\"Ctrl-Home\":\"goDocStart\",\"Ctrl-End\":\"goDocEnd\",\"Ctrl-Up\":\"goLineUp\",\"Ctrl-Down\":\"goLineDown\",\"Ctrl-Left\":\"goGroupLeft\",\"Ctrl-Right\":\"goGroupRight\",\"Alt-Left\":\"goLineStart\",\"Alt-Right\":\"goLineEnd\",\"Ctrl-Backspace\":\"delGroupBefore\",\"Ctrl-Delete\":\"delGroupAfter\",\"Ctrl-S\":\"save\",\"Ctrl-F\":\"find\",\"Ctrl-G\":\"findNext\",\"Shift-Ctrl-G\":\"findPrev\",\"Shift-Ctrl-F\":\"replace\",\"Shift-Ctrl-R\":\"replaceAll\",\"Ctrl-[\":\"indentLess\",\"Ctrl-]\":\"indentMore\",\"Ctrl-U\":\"undoSelection\",\"Shift-Ctrl-U\":\"redoSelection\",\"Alt-U\":\"redoSelection\",fallthrough:\"basic\"},Ae.emacsy={\"Ctrl-F\":\"goCharRight\",\"Ctrl-B\":\"goCharLeft\",\"Ctrl-P\":\"goLineUp\",\"Ctrl-N\":\"goLineDown\",\"Alt-F\":\"goWordRight\",\"Alt-B\":\"goWordLeft\",\"Ctrl-A\":\"goLineStart\",\"Ctrl-E\":\"goLineEnd\",\"Ctrl-V\":\"goPageDown\",\"Shift-Ctrl-V\":\"goPageUp\",\"Ctrl-D\":\"delCharAfter\",\"Ctrl-H\":\"delCharBefore\",\"Alt-D\":\"delWordAfter\",\"Alt-Backspace\":\"delWordBefore\",\"Ctrl-K\":\"killLine\",\"Ctrl-T\":\"transposeChars\",\"Ctrl-O\":\"openLine\"},Ae.macDefault={\"Cmd-A\":\"selectAll\",\"Cmd-D\":\"deleteLine\",\"Cmd-Z\":\"undo\",\"Shift-Cmd-Z\":\"redo\",\"Cmd-Y\":\"redo\",\"Cmd-Home\":\"goDocStart\",\"Cmd-Up\":\"goDocStart\",\"Cmd-End\":\"goDocEnd\",\"Cmd-Down\":\"goDocEnd\",\"Alt-Left\":\"goGroupLeft\",\"Alt-Right\":\"goGroupRight\",\"Cmd-Left\":\"goLineLeft\",\"Cmd-Right\":\"goLineRight\",\"Alt-Backspace\":\"delGroupBefore\",\"Ctrl-Alt-Backspace\":\"delGroupAfter\",\"Alt-Delete\":\"delGroupAfter\",\"Cmd-S\":\"save\",\"Cmd-F\":\"find\",\"Cmd-G\":\"findNext\",\"Shift-Cmd-G\":\"findPrev\",\"Cmd-Alt-F\":\"replace\",\"Shift-Cmd-Alt-F\":\"replaceAll\",\"Cmd-[\":\"indentLess\",\"Cmd-]\":\"indentMore\",\"Cmd-Backspace\":\"delWrappedLineLeft\",\"Cmd-Delete\":\"delWrappedLineRight\",\"Cmd-U\":\"undoSelection\",\"Shift-Cmd-U\":\"redoSelection\",\"Ctrl-Up\":\"goDocStart\",\"Ctrl-Down\":\"goDocEnd\",fallthrough:[\"basic\",\"emacsy\"]},Ae.default=y?Ae.macDefault:Ae.pcDefault;function normalizeKeyName(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var n,r,i,o,s=0;s<t.length-1;s++){var a=t[s];if(/^(cmd|meta|m)$/i.test(a))o=!0;else if(/^a(lt)?$/i.test(a))n=!0;else if(/^(c|ctrl|control)$/i.test(a))r=!0;else{if(!/^s(hift)?$/i.test(a))throw new Error(\"Unrecognized modifier name: \"+a);i=!0}}return n&&(e=\"Alt-\"+e),r&&(e=\"Ctrl-\"+e),o&&(e=\"Cmd-\"+e),i&&(e=\"Shift-\"+e),e}function normalizeKeyMap(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if(\"...\"==r){delete e[n];continue}for(var i=map(n.split(\" \"),normalizeKeyName),o=0;o<i.length;o++){var s=void 0,a=void 0;o==i.length-1?(a=i.join(\" \"),s=r):(a=i.slice(0,o+1).join(\" \"),s=\"...\");var l=t[a];if(l){if(l!=s)throw new Error(\"Inconsistent bindings for \"+a)}else t[a]=s}delete e[n]}for(var c in t)e[c]=t[c];return e}function lookupKey(e,t,n,r){var i=(t=getKeyMap(t)).call?t.call(e,r):t[e];if(!1===i)return\"nothing\";if(\"...\"===i)return\"multi\";if(null!=i&&n(i))return\"handled\";if(t.fallthrough){if(\"[object Array]\"!=Object.prototype.toString.call(t.fallthrough))return lookupKey(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var s=lookupKey(e,t.fallthrough[o],n,r);if(s)return s}}}function isModifierKey(e){var t=\"string\"==typeof e?e:Me[e.keyCode];return\"Ctrl\"==t||\"Alt\"==t||\"Shift\"==t||\"Mod\"==t}function addModifierNames(e,t,n){var r=e;return t.altKey&&\"Alt\"!=r&&(e=\"Alt-\"+e),(w?t.metaKey:t.ctrlKey)&&\"Ctrl\"!=r&&(e=\"Ctrl-\"+e),(w?t.ctrlKey:t.metaKey)&&\"Cmd\"!=r&&(e=\"Cmd-\"+e),!n&&t.shiftKey&&\"Shift\"!=r&&(e=\"Shift-\"+e),e}function keyName(e,t){if(d&&34==e.keyCode&&e.char)return!1;var n=Me[e.keyCode];return null!=n&&!e.altGraphKey&&addModifierNames(n,e,t)}function getKeyMap(e){return\"string\"==typeof e?Ae[e]:e}function deleteNearSelection(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&cmp(o.from,lst(r).to)<=0;){var s=r.pop();if(cmp(s.from,o.from)<0){o.from=s.from;break}}r.push(o)}runInOp(e,function(){for(var t=r.length-1;t>=0;t--)replaceRange(e.doc,\"\",r[t].from,r[t].to,\"+delete\");ensureCursorVisible(e)})}function moveCharLogically(e,t,n){var r=skipExtendingChars(e.text,t+n,n);return r<0||r>e.text.length?null:r}function moveLogically(e,t,n){var r=moveCharLogically(e,t.ch,n);return null==r?null:new Pos(t.line,r,n<0?\"after\":\"before\")}function endOfLine(e,t,n,r,i){if(e){var o=getOrder(n,t.doc.direction);if(o){var s,a=i<0?lst(o):o[0],l=i<0==(1==a.level)?\"after\":\"before\";if(a.level>0||\"rtl\"==t.doc.direction){var c=prepareMeasureForLine(t,n);s=i<0?n.text.length-1:0;var u=measureCharPrepared(t,c,s).top;s=findFirst(function(e){return measureCharPrepared(t,c,e).top==u},i<0==(1==a.level)?a.from:a.to-1,s),\"before\"==l&&(s=moveCharLogically(n,s,1))}else s=i<0?a.to:a.from;return new Pos(r,s,l)}}return new Pos(r,i<0?n.text.length:0,i<0?\"before\":\"after\")}var Ne={selectAll:selectAll,singleSelection:function(e){return e.setSelection(e.getCursor(\"anchor\"),e.getCursor(\"head\"),A)},killLine:function(e){return deleteNearSelection(e,function(t){if(t.empty()){var n=getLine(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:Pos(t.head.line+1,0)}:{from:t.head,to:Pos(t.head.line,n)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return deleteNearSelection(e,function(t){return{from:Pos(t.from().line,0),to:clipPos(e.doc,Pos(t.to().line+1,0))}})},delLineLeft:function(e){return deleteNearSelection(e,function(e){return{from:Pos(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return deleteNearSelection(e,function(t){var n=e.charCoords(t.head,\"div\").top+5;return{from:e.coordsChar({left:0,top:n},\"div\"),to:t.from()}})},delWrappedLineRight:function(e){return deleteNearSelection(e,function(t){var n=e.charCoords(t.head,\"div\").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},\"div\");return{from:t.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(Pos(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Pos(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return lineStart(e,t.head.line)},{origin:\"+move\",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return lineStartSmart(e,t.head)},{origin:\"+move\",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return function lineEnd(e,t){var n=getLine(e.doc,t),r=function visualLineEnd(e){for(var t;t=collapsedSpanAtEnd(e);)e=t.find(1,!0).line;return e}(n);r!=n&&(t=lineNo(r));return endOfLine(!0,e,n,t,-1)}(e,t.head.line)},{origin:\"+move\",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,\"div\").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},\"div\")},D)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,\"div\").top+5;return e.coordsChar({left:0,top:n},\"div\")},D)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,\"div\").top+5,r=e.coordsChar({left:0,top:n},\"div\");return r.ch<e.getLine(r.line).search(/\\S/)?lineStartSmart(e,t.head):r},D)},goLineUp:function(e){return e.moveV(-1,\"line\")},goLineDown:function(e){return e.moveV(1,\"line\")},goPageUp:function(e){return e.moveV(-1,\"page\")},goPageDown:function(e){return e.moveV(1,\"page\")},goCharLeft:function(e){return e.moveH(-1,\"char\")},goCharRight:function(e){return e.moveH(1,\"char\")},goColumnLeft:function(e){return e.moveH(-1,\"column\")},goColumnRight:function(e){return e.moveH(1,\"column\")},goWordLeft:function(e){return e.moveH(-1,\"word\")},goGroupRight:function(e){return e.moveH(1,\"group\")},goGroupLeft:function(e){return e.moveH(-1,\"group\")},goWordRight:function(e){return e.moveH(1,\"word\")},delCharBefore:function(e){return e.deleteH(-1,\"char\")},delCharAfter:function(e){return e.deleteH(1,\"char\")},delWordBefore:function(e){return e.deleteH(-1,\"word\")},delWordAfter:function(e){return e.deleteH(1,\"word\")},delGroupBefore:function(e){return e.deleteH(-1,\"group\")},delGroupAfter:function(e){return e.deleteH(1,\"group\")},indentAuto:function(e){return e.indentSelection(\"smart\")},indentMore:function(e){return e.indentSelection(\"add\")},indentLess:function(e){return e.indentSelection(\"subtract\")},insertTab:function(e){return e.replaceSelection(\"\\t\")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),s=countColumn(e.getLine(o.line),o.ch,r);t.push(spaceStr(r-s%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection(\"add\"):e.execCommand(\"insertTab\")},transposeChars:function(e){return runInOp(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=getLine(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new Pos(i.line,i.ch-1)),i.ch>0)i=new Pos(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),Pos(i.line,i.ch-2),i,\"+transpose\");else if(i.line>e.doc.first){var s=getLine(e.doc,i.line-1).text;s&&(i=new Pos(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+s.charAt(s.length-1),Pos(i.line-1,s.length-1),i,\"+transpose\"))}n.push(new ve(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return runInOp(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,\"+input\");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);ensureCursorVisible(e)})},openLine:function(e){return e.replaceSelection(\"\\n\",\"start\")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function lineStart(e,t){var n=getLine(e.doc,t),r=visualLine(n);return r!=n&&(t=lineNo(r)),endOfLine(!0,e,r,t,1)}function lineStartSmart(e,t){var n=lineStart(e,t.line),r=getLine(e.doc,n.line),i=getOrder(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\\S/)),s=t.line==n.line&&t.ch<=o&&t.ch;return Pos(n.line,s?0:o,n.sticky)}return n}function doHandleBinding(e,t,n){if(\"string\"==typeof t&&!(t=Ne[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=P}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}var De=new T;function dispatchKey(e,t,n,r){var i=e.state.keySeq;if(i){if(isModifierKey(t))return\"handled\";if(/\\'$/.test(t)?e.state.keySeq=null:De.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),dispatchKeyInner(e,i+\" \"+t,n,r))return!0}return dispatchKeyInner(e,t,n,r)}function dispatchKeyInner(e,t,n,r){var i=function lookupKeyForEditor(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=lookupKey(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&lookupKey(t,e.options.extraKeys,n,e)||lookupKey(t,e.options.keyMap,n,e)}(e,t,r);return\"multi\"==i&&(e.state.keySeq=t),\"handled\"==i&&signalLater(e,\"keyHandled\",e,t,n),\"handled\"!=i&&\"multi\"!=i||(e_preventDefault(n),restartBlink(e)),!!i}function handleKeyBinding(e,t){var n=keyName(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?dispatchKey(e,\"Shift-\"+n,t,function(t){return doHandleBinding(e,t,!0)})||dispatchKey(e,n,t,function(t){if(\"string\"==typeof t?/^go[A-Z]/.test(t):t.motion)return doHandleBinding(e,t)}):dispatchKey(e,n,t,function(t){return doHandleBinding(e,t)}))}var He=null;function onKeyDown(e){if(this.curOp.focus=activeElt(),!signalDOMEvent(this,e)){s&&a<11&&27==e.keyCode&&(e.returnValue=!1);var t=e.keyCode;this.display.shift=16==t||e.shiftKey;var n=handleKeyBinding(this,e);d&&(He=n?t:null,!n&&88==t&&!$&&(y?e.metaKey:e.ctrlKey)&&this.replaceSelection(\"\",null,\"cut\")),18!=t||/\\bCodeMirror-crosshair\\b/.test(this.display.lineDiv.className)||function showCrossHair(e){var t=e.display.lineDiv;addClass(t,\"CodeMirror-crosshair\");function up(e){18!=e.keyCode&&e.altKey||(k(t,\"CodeMirror-crosshair\"),off(document,\"keyup\",up),off(document,\"mouseover\",up))}V(document,\"keyup\",up),V(document,\"mouseover\",up)}(this)}}function onKeyUp(e){16==e.keyCode&&(this.doc.sel.shift=!1),signalDOMEvent(this,e)}function onKeyPress(e){if(!(eventInWidget(this.display,e)||signalDOMEvent(this,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var t=e.keyCode,n=e.charCode;if(d&&t==He)return He=null,void e_preventDefault(e);if(!d||e.which&&!(e.which<10)||!handleKeyBinding(this,e)){var r=String.fromCharCode(null==n?t:n);\"\\b\"!=r&&(function handleCharBinding(e,t,n){return dispatchKey(e,\"'\"+n+\"'\",t,function(t){return doHandleBinding(e,t,!0)})}(this,e,r)||this.display.input.onKeyPress(e))}}}var We=function(e,t,n){this.time=e,this.pos=t,this.button=n};We.prototype.compare=function(e,t,n){return this.time+400>e&&0==cmp(t,this.pos)&&n==this.button};var Ee,Ie;function onMouseDown(e){var t=this.display;if(!(signalDOMEvent(this,e)||t.activeTouch&&t.input.supportsTouch()))if(t.input.ensurePolled(),t.shift=e.shiftKey,eventInWidget(t,e))l||(t.scroller.draggable=!1,setTimeout(function(){return t.scroller.draggable=!0},100));else if(!clickInGutter(this,e)){var n=posFromMouse(this,e),r=e_button(e),i=n?function clickRepeat(e,t){var n=+new Date;return Ie&&Ie.compare(n,e,t)?(Ee=Ie=null,\"triple\"):Ee&&Ee.compare(n,e,t)?(Ie=new We(n,e,t),Ee=null,\"double\"):(Ee=new We(n,e,t),Ie=null,\"single\")}(n,r):\"single\";window.focus(),1==r&&this.state.selectingText&&this.state.selectingText(e),n&&function handleMappedButton(e,t,n,r,i){var o=\"Click\";\"double\"==r?o=\"Double\"+o:\"triple\"==r&&(o=\"Triple\"+o);return dispatchKey(e,addModifierNames(o=(1==t?\"Left\":2==t?\"Middle\":\"Right\")+o,i),i,function(t){if(\"string\"==typeof t&&(t=Ne[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=P}finally{e.state.suppressEdits=!1}return r})}(this,r,n,i,e)||(1==r?n?function leftButtonDown(e,t,n,r){s?setTimeout(bind(ensureFocus,e),0):e.curOp.focus=activeElt();var i,o=function configureMouse(e,t,n){var r=e.getOption(\"configureMouse\"),i=r?r(e,t,n):{};if(null==i.unit){var o=b?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?\"rectangle\":\"single\"==t?\"char\":\"double\"==t?\"word\":\"line\"}(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey);null==i.addNew&&(i.addNew=y?n.metaKey:n.ctrlKey);null==i.moveOnDrag&&(i.moveOnDrag=!(y?n.altKey:n.ctrlKey));return i}(e,n,r),c=e.doc.sel;e.options.dragDrop&&j&&!e.isReadOnly()&&\"single\"==n&&(i=c.contains(t))>-1&&(cmp((i=c.ranges[i]).from(),t)<0||t.xRel>0)&&(cmp(i.to(),t)>0||t.xRel<0)?function leftButtonStartDrag(e,t,n,r){var i=e.display,o=!1,c=operation(e,function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,off(document,\"mouseup\",c),off(document,\"mousemove\",u),off(i.scroller,\"dragstart\",d),off(i.scroller,\"drop\",c),o||(e_preventDefault(t),r.addNew||extendSelection(e.doc,n,null,null,r.extend),l||s&&9==a?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())}),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};l&&(i.scroller.draggable=!0);e.state.draggingText=c,c.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop();V(document,\"mouseup\",c),V(document,\"mousemove\",u),V(i.scroller,\"dragstart\",d),V(i.scroller,\"drop\",c),delayBlurEvent(e),setTimeout(function(){return i.input.focus()},20)}(e,r,t,o):function leftButtonSelect(e,t,n,r){var i=e.display,o=e.doc;e_preventDefault(t);var s,a,l=o.sel,c=l.ranges;r.addNew&&!r.extend?(a=o.sel.contains(n),s=a>-1?c[a]:new ve(n,n)):(s=o.sel.primary(),a=o.sel.primIndex);if(\"rectangle\"==r.unit)r.addNew||(s=new ve(n,n)),n=posFromMouse(e,t,!0,!0),a=-1;else{var u=rangeForUnit(e,n,r.unit);s=r.extend?extendRange(s,u.anchor,u.head,r.extend):u}r.addNew?-1==a?(a=c.length,setSelection(o,normalizeSelection(c.concat([s]),a),{scroll:!1,origin:\"*mouse\"})):c.length>1&&c[a].empty()&&\"char\"==r.unit&&!r.extend?(setSelection(o,normalizeSelection(c.slice(0,a).concat(c.slice(a+1)),0),{scroll:!1,origin:\"*mouse\"}),l=o.sel):replaceOneSelection(o,a,s,N):(a=0,setSelection(o,new me([s],0),N),l=o.sel);var d=n;function extendTo(t){if(0!=cmp(d,t))if(d=t,\"rectangle\"==r.unit){for(var i=[],c=e.options.tabSize,u=countColumn(getLine(o,n.line).text,n.ch,c),p=countColumn(getLine(o,t.line).text,t.ch,c),h=Math.min(u,p),f=Math.max(u,p),g=Math.min(n.line,t.line),m=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=m;g++){var v=getLine(o,g).text,y=findColumn(v,h,c);h==f?i.push(new ve(Pos(g,y),Pos(g,y))):v.length>y&&i.push(new ve(Pos(g,y),Pos(g,findColumn(v,f,c))))}i.length||i.push(new ve(n,n)),setSelection(o,normalizeSelection(l.ranges.slice(0,a).concat(i),a),{origin:\"*mouse\",scroll:!1}),e.scrollIntoView(t)}else{var b,C=s,x=rangeForUnit(e,t,r.unit),w=C.anchor;cmp(x.anchor,w)>0?(b=x.head,w=minPos(C.from(),x.anchor)):(b=x.anchor,w=maxPos(C.to(),x.head));var S=l.ranges.slice(0);S[a]=function bidiSimplify(e,t){var n=t.anchor,r=t.head,i=getLine(e.doc,n.line);if(0==cmp(n,r)&&n.sticky==r.sticky)return t;var o=getOrder(i);if(!o)return t;var s=getBidiPartAt(o,n.ch,n.sticky),a=o[s];if(a.from!=n.ch&&a.to!=n.ch)return t;var l=s+(a.from==n.ch==(1!=a.level)?0:1);if(0==l||l==o.length)return t;var c;if(r.line!=n.line)c=(r.line-n.line)*(\"ltr\"==e.doc.direction?1:-1)>0;else{var u=getBidiPartAt(o,r.ch,r.sticky),d=u-s||(r.ch-n.ch)*(1==a.level?-1:1);c=u==l-1||u==l?d<0:d>0}var p=o[l+(c?-1:0)],h=c==(1==p.level),f=h?p.from:p.to,g=h?\"after\":\"before\";return n.ch==f&&n.sticky==g?t:new ve(new Pos(n.line,f,g),r)}(e,new ve(clipPos(o,w),b)),setSelection(o,normalizeSelection(S,a),N)}}var p=i.wrapper.getBoundingClientRect(),h=0;function done(t){e.state.selectingText=!1,h=1/0,e_preventDefault(t),i.input.focus(),off(document,\"mousemove\",f),off(document,\"mouseup\",g),o.history.lastSelOrigin=null}var f=operation(e,function(t){e_button(t)?function extend(t){var n=++h;var s=posFromMouse(e,t,!0,\"rectangle\"==r.unit);if(!s)return;if(0!=cmp(s,d)){e.curOp.focus=activeElt(),extendTo(s);var a=visibleLines(i,o);(s.line>=a.to||s.line<a.from)&&setTimeout(operation(e,function(){h==n&&extend(t)}),150)}else{var l=t.clientY<p.top?-20:t.clientY>p.bottom?20:0;l&&setTimeout(operation(e,function(){h==n&&(i.scroller.scrollTop+=l,extend(t))}),50)}}(t):done(t)}),g=operation(e,done);e.state.selectingText=g,V(document,\"mousemove\",f),V(document,\"mouseup\",g)}(e,r,t,o)}(this,n,i,e):e_target(e)==t.scroller&&e_preventDefault(e):2==r?(n&&extendSelection(this.doc,n),setTimeout(function(){return t.input.focus()},20)):3==r&&(S?onContextMenu(this,e):delayBlurEvent(this)))}}function rangeForUnit(e,t,n){if(\"char\"==n)return new ve(t,t);if(\"word\"==n)return e.findWordAt(t);if(\"line\"==n)return new ve(Pos(t.line,0),clipPos(e.doc,Pos(t.line+1,0)));var r=n(e,t);return new ve(r.from,r.to)}function gutterEvent(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&e_preventDefault(t);var s=e.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!hasHandler(e,n))return e_defaultPrevented(t);o-=a.top-s.viewOffset;for(var l=0;l<e.options.gutters.length;++l){var c=s.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=i){return signal(e,n,e,lineAtHeight(e.doc,o),e.options.gutters[l],t),e_defaultPrevented(t)}}}function clickInGutter(e,t){return gutterEvent(e,t,\"gutterClick\",!0)}function onContextMenu(e,t){eventInWidget(e.display,t)||function contextMenuInGutter(e,t){if(!hasHandler(e,\"gutterContextMenu\"))return!1;return gutterEvent(e,t,\"gutterContextMenu\",!1)}(e,t)||signalDOMEvent(e,t,\"contextmenu\")||e.display.input.onContextMenu(t)}function themeChanged(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\\s*cm-s-\\S+/g,\"\")+e.options.theme.replace(/(^|\\s)\\s*/g,\" cm-s-\"),clearCaches(e)}var Fe={toString:function(){return\"CodeMirror.Init\"}},Be={},ze={};function guttersChanged(e){updateGutters(e),regChange(e),alignHorizontally(e)}function dragDropChanged(e,t,n){if(!t!=!(n&&n!=Fe)){var r=e.display.dragFunctions,i=t?V:off;i(e.display.scroller,\"dragstart\",r.start),i(e.display.scroller,\"dragenter\",r.enter),i(e.display.scroller,\"dragover\",r.over),i(e.display.scroller,\"dragleave\",r.leave),i(e.display.scroller,\"drop\",r.drop)}}function wrappingChanged(e){e.options.lineWrapping?(addClass(e.display.wrapper,\"CodeMirror-wrap\"),e.display.sizer.style.minWidth=\"\",e.display.sizerWidth=null):(k(e.display.wrapper,\"CodeMirror-wrap\"),findMaxLine(e)),estimateLineHeights(e),regChange(e),clearCaches(e),setTimeout(function(){return updateScrollbars(e)},100)}function CodeMirror$1(e,t){var r=this;if(!(this instanceof CodeMirror$1))return new CodeMirror$1(e,t);this.options=t=t?copyObj(t):{},copyObj(Be,t,!1),setGuttersForLineNumbers(t);var i=t.value;\"string\"==typeof i&&(i=new Se(i,t.mode,null,t.lineSeparator,t.direction)),this.doc=i;var o=new CodeMirror$1.inputStyles[t.inputStyle](this),c=this.display=new function Display(e,t,r){this.input=r,this.scrollbarFiller=elt(\"div\",null,\"CodeMirror-scrollbar-filler\"),this.scrollbarFiller.setAttribute(\"cm-not-content\",\"true\"),this.gutterFiller=elt(\"div\",null,\"CodeMirror-gutter-filler\"),this.gutterFiller.setAttribute(\"cm-not-content\",\"true\"),this.lineDiv=eltP(\"div\",null,\"CodeMirror-code\"),this.selectionDiv=elt(\"div\",null,null,\"position: relative; z-index: 1\"),this.cursorDiv=elt(\"div\",null,\"CodeMirror-cursors\"),this.measure=elt(\"div\",null,\"CodeMirror-measure\"),this.lineMeasure=elt(\"div\",null,\"CodeMirror-measure\"),this.lineSpace=eltP(\"div\",[this.measure,this.lineMeasure,this.selectionDiv,this.cursorDiv,this.lineDiv],null,\"position: relative; outline: none\");var i=eltP(\"div\",[this.lineSpace],\"CodeMirror-lines\");this.mover=elt(\"div\",[i],null,\"position: relative\"),this.sizer=elt(\"div\",[this.mover],\"CodeMirror-sizer\"),this.sizerWidth=null,this.heightForcer=elt(\"div\",null,null,\"position: absolute; height: \"+O+\"px; width: 1px;\"),this.gutters=elt(\"div\",null,\"CodeMirror-gutters\"),this.lineGutter=null,this.scroller=elt(\"div\",[this.sizer,this.heightForcer,this.gutters],\"CodeMirror-scroll\"),this.scroller.setAttribute(\"tabIndex\",\"-1\"),this.wrapper=elt(\"div\",[this.scrollbarFiller,this.gutterFiller,this.scroller],\"CodeMirror\"),s&&a<8&&(this.gutters.style.zIndex=-1,this.scroller.style.paddingRight=0),l||n&&v||(this.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(this.wrapper):e(this.wrapper)),this.viewFrom=this.viewTo=t.first,this.reportedViewFrom=this.reportedViewTo=t.first,this.view=[],this.renderedView=null,this.externalMeasured=null,this.viewOffset=0,this.lastWrapHeight=this.lastWrapWidth=0,this.updateLineNumbers=null,this.nativeBarWidth=this.barHeight=this.barWidth=0,this.scrollbarsClipped=!1,this.lineNumWidth=this.lineNumInnerWidth=this.lineNumChars=null,this.alignWidgets=!1,this.cachedCharWidth=this.cachedTextHeight=this.cachedPaddingH=null,this.maxLine=null,this.maxLineLength=0,this.maxLineChanged=!1,this.wheelDX=this.wheelDY=this.wheelStartX=this.wheelStartY=null,this.shift=!1,this.selForContextMenu=null,this.activeTouch=null,r.init(this)}(e,i,o);c.wrapper.CodeMirror=this,updateGutters(this),themeChanged(this),t.lineWrapping&&(this.display.wrapper.className+=\" CodeMirror-wrap\"),initScrollbars(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new T,keySeq:null,specialChars:null},t.autofocus&&!v&&c.input.focus(),s&&a<11&&setTimeout(function(){return r.display.input.reset(!0)},20),function registerEventHandlers(e){var t=e.display;V(t.scroller,\"mousedown\",operation(e,onMouseDown)),V(t.scroller,\"dblclick\",s&&a<11?operation(e,function(t){if(!signalDOMEvent(e,t)){var n=posFromMouse(e,t);if(n&&!clickInGutter(e,t)&&!eventInWidget(e.display,t)){e_preventDefault(t);var r=e.findWordAt(n);extendSelection(e.doc,r.anchor,r.head)}}}):function(t){return signalDOMEvent(e,t)||e_preventDefault(t)});S||V(t.scroller,\"contextmenu\",function(t){return onContextMenu(e,t)});var n,r={end:0};function finishTouch(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),(r=t.activeTouch).end=+new Date)}function farAway(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}V(t.scroller,\"touchstart\",function(i){if(!signalDOMEvent(e,i)&&!function isMouseLikeTouchEvent(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!clickInGutter(e,i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),V(t.scroller,\"touchmove\",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),V(t.scroller,\"touchend\",function(n){var r=t.activeTouch;if(r&&!eventInWidget(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var i,o=e.coordsChar(t.activeTouch,\"page\");i=!r.prev||farAway(r,r.prev)?new ve(o,o):!r.prev.prev||farAway(r,r.prev.prev)?e.findWordAt(o):new ve(Pos(o.line,0),clipPos(e.doc,Pos(o.line+1,0))),e.setSelection(i.anchor,i.head),e.focus(),e_preventDefault(n)}finishTouch()}),V(t.scroller,\"touchcancel\",finishTouch),V(t.scroller,\"scroll\",function(){t.scroller.clientHeight&&(updateScrollTop(e,t.scroller.scrollTop),setScrollLeft(e,t.scroller.scrollLeft,!0),signal(e,\"scroll\",e))}),V(t.scroller,\"mousewheel\",function(t){return onScrollWheel(e,t)}),V(t.scroller,\"DOMMouseScroll\",function(t){return onScrollWheel(e,t)}),V(t.wrapper,\"scroll\",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){signalDOMEvent(e,t)||e_stop(t)},over:function(t){signalDOMEvent(e,t)||(!function onDragOver(e,t){var n=posFromMouse(e,t);if(n){var r=document.createDocumentFragment();drawSelectionCursor(e,n,r),e.display.dragCursor||(e.display.dragCursor=elt(\"div\",null,\"CodeMirror-cursors CodeMirror-dragcursors\"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),removeChildrenAndAdd(e.display.dragCursor,r)}}(e,t),e_stop(t))},start:function(t){return function onDragStart(e,t){if(s&&(!e.state.draggingText||+new Date-ke<100))e_stop(t);else if(!signalDOMEvent(e,t)&&!eventInWidget(e.display,t)&&(t.dataTransfer.setData(\"Text\",e.getSelection()),t.dataTransfer.effectAllowed=\"copyMove\",t.dataTransfer.setDragImage&&!p)){var n=elt(\"img\",null,null,\"position: fixed; left: 0; top: 0;\");n.src=\"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(e,t)},drop:operation(e,onDrop),leave:function(t){signalDOMEvent(e,t)||clearDragCursor(e)}};var i=t.input.getField();V(i,\"keyup\",function(t){return onKeyUp.call(e,t)}),V(i,\"keydown\",operation(e,onKeyDown)),V(i,\"keypress\",operation(e,onKeyPress)),V(i,\"focus\",function(t){return onFocus(e,t)}),V(i,\"blur\",function(t){return onBlur(e,t)})}(this),ensureGlobalHandlers(),startOperation(this),this.curOp.forceUpdate=!0,attachDoc(this,i),t.autofocus&&!v||this.hasFocus()?setTimeout(bind(onFocus,this),20):onBlur(this);for(var u in ze)ze.hasOwnProperty(u)&&ze[u](r,t[u],Fe);maybeUpdateLineNumberWidth(this),t.finishInit&&t.finishInit(this);for(var h=0;h<Re.length;++h)Re[h](r);endOperation(this),l&&t.lineWrapping&&\"optimizelegibility\"==getComputedStyle(c.lineDiv).textRendering&&(c.lineDiv.style.textRendering=\"auto\")}CodeMirror$1.defaults=Be,CodeMirror$1.optionHandlers=ze;var Re=[];CodeMirror$1.defineInitHook=function(e){return Re.push(e)};function indentLine(e,t,n,r){var i,o=e.doc;null==n&&(n=\"add\"),\"smart\"==n&&(o.mode.indent?i=getContextBefore(e,t).state:n=\"prev\");var s=e.options.tabSize,a=getLine(o,t),l=countColumn(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\\s*/)[0];if(r||/\\S/.test(a.text)){if(\"smart\"==n&&((c=o.mode.indent(i,a.text.slice(u.length),a.text))==P||c>150)){if(!r)return;n=\"prev\"}}else c=0,n=\"not\";\"prev\"==n?c=t>o.first?countColumn(getLine(o,t-1).text,null,s):0:\"add\"==n?c=l+e.options.indentUnit:\"subtract\"==n?c=l-e.options.indentUnit:\"number\"==typeof n&&(c=l+n),c=Math.max(0,c);var d=\"\",p=0;if(e.options.indentWithTabs)for(var h=Math.floor(c/s);h;--h)p+=s,d+=\"\\t\";if(p<c&&(d+=spaceStr(c-p)),d!=u)return replaceRange(o,d,Pos(t,0),Pos(t,u.length),\"+input\"),a.stateAfter=null,!0;for(var f=0;f<o.sel.ranges.length;f++){var g=o.sel.ranges[f];if(g.head.line==t&&g.head.ch<u.length){var m=Pos(t,u.length);replaceOneSelection(o,f,new ve(m,m));break}}}var Ve=null;function setLastCopied(e){Ve=e}function applyTextInput(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var s=e.state.pasteIncoming||\"paste\"==i,a=K(t),l=null;if(s&&r.ranges.length>1)if(Ve&&Ve.text.join(\"\\n\")==t){if(r.ranges.length%Ve.text.length==0){l=[];for(var c=0;c<Ve.text.length;c++)l.push(o.splitLines(Ve.text[c]))}}else a.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(l=map(a,function(e){return[e]}));for(var u,d=r.ranges.length-1;d>=0;d--){var p=r.ranges[d],h=p.from(),f=p.to();p.empty()&&(n&&n>0?h=Pos(h.line,h.ch-n):e.state.overwrite&&!s?f=Pos(f.line,Math.min(getLine(o,f.line).text.length,f.ch+lst(a).length)):Ve&&Ve.lineWise&&Ve.text.join(\"\\n\")==t&&(h=f=Pos(h.line,0))),u=e.curOp.updateInput;var g={from:h,to:f,text:l?l[d%l.length]:a,origin:i||(s?\"paste\":e.state.cutIncoming?\"cut\":\"+input\")};makeChange(e.doc,g),signalLater(e,\"inputRead\",e,g)}t&&!s&&triggerElectric(e,t),ensureCursorVisible(e),e.curOp.updateInput=u,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function handlePaste(e,t){var n=e.clipboardData&&e.clipboardData.getData(\"Text\");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||runInOp(t,function(){return applyTextInput(t,n,0,null,\"paste\")}),!0}function triggerElectric(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),s=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(t.indexOf(o.electricChars.charAt(a))>-1){s=indentLine(e,i.head.line,\"smart\");break}}else o.electricInput&&o.electricInput.test(getLine(e.doc,i.head.line).text.slice(0,i.head.ch))&&(s=indentLine(e,i.head.line,\"smart\"));s&&signalLater(e,\"electricInput\",e,i.head.line)}}}function copyableRanges(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:Pos(i,0),head:Pos(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function disableBrowserMagic(e,t){e.setAttribute(\"autocorrect\",\"off\"),e.setAttribute(\"autocapitalize\",\"off\"),e.setAttribute(\"spellcheck\",!!t)}function hiddenTextarea(){var e=elt(\"textarea\",null,null,\"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none\"),t=elt(\"div\",[e],null,\"overflow: hidden; position: relative; width: 3px; height: 0px;\");return l?e.style.width=\"1000px\":e.setAttribute(\"wrap\",\"off\"),g&&(e.style.border=\"1px solid black\"),disableBrowserMagic(e),t}function findPosH(e,t,n,r,i){var o=t,s=n,a=getLine(e,t.line);function moveOnce(r){var o;if(null==(o=i?function moveVisually(e,t,n,r){var i=getOrder(t,e.doc.direction);if(!i)return moveLogically(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky=\"before\"):n.ch<=0&&(n.ch=0,n.sticky=\"after\");var o=getBidiPartAt(i,n.ch,n.sticky),s=i[o];if(\"ltr\"==e.doc.direction&&s.level%2==0&&(r>0?s.to>n.ch:s.from<n.ch))return moveLogically(t,n,r);var a,l=function(e,n){return moveCharLogically(t,e instanceof Pos?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(a=a||prepareMeasureForLine(e,t),wrappedLineExtentChar(e,t,a,n)):{begin:0,end:t.text.length}},u=c(\"before\"==n.sticky?l(n,-1):n.ch);if(\"rtl\"==e.doc.direction||1==s.level){var d=1==s.level==r<0,p=l(n,d?1:-1);if(null!=p&&(d?p<=s.to&&p<=u.end:p>=s.from&&p>=u.begin)){var h=d?\"before\":\"after\";return new Pos(n.line,p,h)}}var f=function(e,t,r){for(var o=function(e,t){return t?new Pos(n.line,l(e,1),\"before\"):new Pos(n.line,e,\"after\")};e>=0&&e<i.length;e+=t){var s=i[e],a=t>0==(1!=s.level),c=a?r.begin:l(r.end,-1);if(s.from<=c&&c<s.to)return o(c,a);if(c=a?s.from:l(s.to,-1),r.begin<=c&&c<r.end)return o(c,a)}},g=f(o+r,r,u);if(g)return g;var m=r>0?u.end:l(u.begin,-1);return null==m||r>0&&m==t.text.length||!(g=f(r>0?0:i.length-1,r,c(m)))?null:g}(e.cm,a,t,n):moveLogically(a,t,n))){if(r||!function findNextLine(){var r=t.line+n;return!(r<e.first||r>=e.first+e.size)&&(t=new Pos(r,t.ch,t.sticky),a=getLine(e,r))}())return!1;t=endOfLine(i,e.cm,a,t.line,n)}else t=o;return!0}if(\"char\"==r)moveOnce();else if(\"column\"==r)moveOnce(!0);else if(\"word\"==r||\"group\"==r)for(var l=null,c=\"group\"==r,u=e.cm&&e.cm.getHelper(t,\"wordChars\"),d=!0;!(n<0)||moveOnce(!d);d=!1){var p=a.text.charAt(t.ch)||\"\\n\",h=isWordChar(p,u)?\"w\":c&&\"\\n\"==p?\"n\":!c||/\\s/.test(p)?null:\"p\";if(!c||d||h||(h=\"s\"),l&&l!=h){n<0&&(n=1,moveOnce(),t.sticky=\"after\");break}if(h&&(l=h),n>0&&!moveOnce(!d))break}var f=skipAtomic(e,t,o,s,!0);return equalCursorPos(o,f)&&(f.hitSide=!0),f}function findPosV(e,t,n,r){var i,o=e.doc,s=t.left;if(\"page\"==r){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(a-.5*textHeight(e.display),3);i=(n>0?t.bottom:t.top)+n*l}else\"line\"==r&&(i=n>0?t.bottom+3:t.top-3);for(var c;(c=coordsChar(e,s,i)).outside;){if(n<0?i<=0:i>=o.height){c.hitSide=!0;break}i+=5*n}return c}var Ue=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new T,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ue.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;disableBrowserMagic(i,r.options.spellcheck),V(i,\"paste\",function(e){signalDOMEvent(r,e)||handlePaste(e,r)||a<=11&&setTimeout(operation(r,function(){return t.updateFromDOM()}),20)}),V(i,\"compositionstart\",function(e){t.composing={data:e.data,done:!1}}),V(i,\"compositionupdate\",function(e){t.composing||(t.composing={data:e.data,done:!1})}),V(i,\"compositionend\",function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),V(i,\"touchstart\",function(){return n.forceCompositionEnd()}),V(i,\"input\",function(){t.composing||t.readFromDOMSoon()});function onCopyCut(e){if(!signalDOMEvent(r,e)){if(r.somethingSelected())setLastCopied({lineWise:!1,text:r.getSelections()}),\"cut\"==e.type&&r.replaceSelection(\"\",null,\"cut\");else{if(!r.options.lineWiseCopyCut)return;var t=copyableRanges(r);setLastCopied({lineWise:!0,text:t.text}),\"cut\"==e.type&&r.operation(function(){r.setSelections(t.ranges,0,A),r.replaceSelection(\"\",null,\"cut\")})}if(e.clipboardData){e.clipboardData.clearData();var o=Ve.text.join(\"\\n\");if(e.clipboardData.setData(\"Text\",o),e.clipboardData.getData(\"Text\")==o)return void e.preventDefault()}var s=hiddenTextarea(),a=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),a.value=Ve.text.join(\"\\n\");var l=document.activeElement;M(a),setTimeout(function(){r.display.lineSpace.removeChild(s),l.focus(),l==i&&n.showPrimarySelection()},50)}}V(i,\"copy\",onCopyCut),V(i,\"cut\",onCopyCut)},Ue.prototype.prepareSelection=function(){var e=prepareSelection(this.cm,!1);return e.focus=this.cm.state.focused,e},Ue.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ue.prototype.showPrimarySelection=function(){var e=window.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),o=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var s=domToPos(t,e.anchorNode,e.anchorOffset),a=domToPos(t,e.focusNode,e.focusOffset);if(!s||s.bad||!a||a.bad||0!=cmp(minPos(s,a),i)||0!=cmp(maxPos(s,a),o)){var l=t.display.view,c=i.line>=t.display.viewFrom&&posToDOM(t,i)||{node:l[0].measure.map[2],offset:0},u=o.line<t.display.viewTo&&posToDOM(t,o);if(!u){var d=l[l.length-1].measure,p=d.maps?d.maps[d.maps.length-1]:d.map;u={node:p[p.length-1],offset:p[p.length-2]-p[p.length-3]}}if(c&&u){var h,f=e.rangeCount&&e.getRangeAt(0);try{h=L(c.node,c.offset,u.offset,u.node)}catch(e){}h&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),h.collapsed||(e.removeAllRanges(),e.addRange(h))):(e.removeAllRanges(),e.addRange(h)),f&&null==e.anchorNode?e.addRange(f):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Ue.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Ue.prototype.showMultipleSelections=function(e){removeChildrenAndAdd(this.cm.display.cursorDiv,e.cursors),removeChildrenAndAdd(this.cm.display.selectionDiv,e.selection)},Ue.prototype.rememberSelection=function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ue.prototype.selectionInEditor=function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return contains(this.div,t)},Ue.prototype.focus=function(){\"nocursor\"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ue.prototype.blur=function(){this.div.blur()},Ue.prototype.getField=function(){return this.div},Ue.prototype.supportsTouch=function(){return!0},Ue.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():runInOp(this.cm,function(){return e.cm.curOp.selectionChanged=!0});this.polling.set(this.cm.options.pollInterval,function poll(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,poll))})},Ue.prototype.selectionChanged=function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ue.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;if(m&&u&&this.cm.options.gutters.length&&function isInGutter(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:\"keydown\",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=domToPos(t,e.anchorNode,e.anchorOffset),r=domToPos(t,e.focusNode,e.focusOffset);n&&r&&runInOp(t,function(){setSelection(t.doc,simpleSelection(n,r),A),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},Ue.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(0==r.ch&&r.line>e.firstLine()&&(r=Pos(r.line-1,getLine(e.doc,r.line-1).length)),i.ch==getLine(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=Pos(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,s,a;r.line==t.viewFrom||0==(o=findViewIndex(e,r.line))?(s=lineNo(t.view[0].line),a=t.view[0].node):(s=lineNo(t.view[o].line),a=t.view[o-1].node.nextSibling);var l,c,u=findViewIndex(e,i.line);if(u==t.view.length-1?(l=t.viewTo-1,c=t.lineDiv.lastChild):(l=lineNo(t.view[u+1].line)-1,c=t.view[u+1].node.previousSibling),!a)return!1;for(var d=e.doc.splitLines(function domTextBetween(e,t,n,r,i){var o=\"\",s=!1,a=e.doc.lineSeparator();function close(){s&&(o+=a,s=!1)}function addText(e){e&&(close(),o+=e)}function walk(t){if(1==t.nodeType){var n=t.getAttribute(\"cm-text\");if(null!=n)return void addText(n||t.textContent.replace(/\\u200b/g,\"\"));var o,l=t.getAttribute(\"cm-marker\");if(l){var c=e.findMarks(Pos(r,0),Pos(i+1,0),function recognizeMarker(e){return function(t){return t.id==e}}(+l));return void(c.length&&(o=c[0].find(0))&&addText(getBetween(e.doc,o.from,o.to).join(a)))}if(\"false\"==t.getAttribute(\"contenteditable\"))return;var u=/^(pre|div|p)$/i.test(t.nodeName);u&&close();for(var d=0;d<t.childNodes.length;d++)walk(t.childNodes[d]);u&&(s=!0)}else 3==t.nodeType&&addText(t.nodeValue)}for(;walk(t),t!=n;)t=t.nextSibling;return o}(e,a,c,s,l)),p=getBetween(e.doc,Pos(s,0),Pos(l,getLine(e.doc,l).text.length));d.length>1&&p.length>1;)if(lst(d)==lst(p))d.pop(),p.pop(),l--;else{if(d[0]!=p[0])break;d.shift(),p.shift(),s++}for(var h=0,f=0,g=d[0],m=p[0],v=Math.min(g.length,m.length);h<v&&g.charCodeAt(h)==m.charCodeAt(h);)++h;for(var y=lst(d),b=lst(p),C=Math.min(y.length-(1==d.length?h:0),b.length-(1==p.length?h:0));f<C&&y.charCodeAt(y.length-f-1)==b.charCodeAt(b.length-f-1);)++f;if(1==d.length&&1==p.length&&s==r.line)for(;h&&h>r.ch&&y.charCodeAt(y.length-f-1)==b.charCodeAt(b.length-f-1);)h--,f++;d[d.length-1]=y.slice(0,y.length-f).replace(/^\\u200b+/,\"\"),d[0]=d[0].slice(h).replace(/\\u200b+$/,\"\");var x=Pos(s,h),w=Pos(l,p.length?lst(p).length-f:0);return d.length>1||d[0]||cmp(x,w)?(replaceRange(e.doc,d,x,w,\"+input\"),!0):void 0},Ue.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ue.prototype.reset=function(){this.forceCompositionEnd()},Ue.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ue.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},Ue.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||runInOp(this.cm,function(){return regChange(e.cm)})},Ue.prototype.setUneditable=function(e){e.contentEditable=\"false\"},Ue.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||operation(this.cm,applyTextInput)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ue.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(\"nocursor\"!=e)},Ue.prototype.onContextMenu=function(){},Ue.prototype.resetPosition=function(){},Ue.prototype.needsContentAttribute=!0;function posToDOM(e,t){var n=findViewForLine(e,t.line);if(!n||n.hidden)return null;var r=getLine(e.doc,t.line),i=mapFromLineView(n,r,t.line),o=getOrder(r,e.doc.direction),s=\"left\";if(o){s=getBidiPartAt(o,t.ch)%2?\"right\":\"left\"}var a=nodeAndOffsetInLineMap(i.map,t.ch,s);return a.offset=\"right\"==a.collapse?a.end:a.start,a}function badPos(e,t){return t&&(e.bad=!0),e}function domToPos(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return badPos(e.clipPos(Pos(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return locateNodeInLineView(o,t,n)}}function locateNodeInLineView(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!contains(r,t))return badPos(Pos(lineNo(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?lst(e.rest):e.line;return badPos(Pos(lineNo(o),o.text.length),i)}var s=3==t.nodeType?t:null,a=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,n&&(n=s.nodeValue.length));a.parentNode!=r;)a=a.parentNode;var l=e.measure,c=l.maps;function find(t,n,r){for(var i=-1;i<(c?c.length:0);i++)for(var o=i<0?l.map:c[i],s=0;s<o.length;s+=3){var a=o[s+2];if(a==t||a==n){var u=lineNo(i<0?e.line:e.rest[i]),d=o[s]+r;return(r<0||a!=t)&&(d=o[s+(r?1:0)]),Pos(u,d)}}}var u=find(s,a,n);if(u)return badPos(u,i);for(var d=a.nextSibling,p=s?s.nodeValue.length-n:0;d;d=d.nextSibling){if(u=find(d,d.firstChild,0))return badPos(Pos(u.line,u.ch-p),i);p+=d.textContent.length}for(var h=a.previousSibling,f=n;h;h=h.previousSibling){if(u=find(h,h.firstChild,-1))return badPos(Pos(u.line,u.ch+f),i);f+=h.textContent.length}}var je=function(e){this.cm=e,this.prevInput=\"\",this.pollingFast=!1,this.polling=new T,this.hasSelection=!1,this.composing=null};je.prototype.init=function(e){var t=this,n=this,r=this.cm,i=this.wrapper=hiddenTextarea(),o=this.textarea=i.firstChild;e.wrapper.insertBefore(i,e.wrapper.firstChild),g&&(o.style.width=\"0px\"),V(o,\"input\",function(){s&&a>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),V(o,\"paste\",function(e){signalDOMEvent(r,e)||handlePaste(e,r)||(r.state.pasteIncoming=!0,n.fastPoll())});function prepareCopyCut(e){if(!signalDOMEvent(r,e)){if(r.somethingSelected())setLastCopied({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=copyableRanges(r);setLastCopied({lineWise:!0,text:t.text}),\"cut\"==e.type?r.setSelections(t.ranges,null,A):(n.prevInput=\"\",o.value=t.text.join(\"\\n\"),M(o))}\"cut\"==e.type&&(r.state.cutIncoming=!0)}}V(o,\"cut\",prepareCopyCut),V(o,\"copy\",prepareCopyCut),V(e.scroller,\"paste\",function(t){eventInWidget(e,t)||signalDOMEvent(r,t)||(r.state.pasteIncoming=!0,n.focus())}),V(e.lineSpace,\"selectstart\",function(t){eventInWidget(e,t)||e_preventDefault(t)}),V(o,\"compositionstart\",function(){var e=r.getCursor(\"from\");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor(\"to\"),{className:\"CodeMirror-composing\"})}}),V(o,\"compositionend\",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},je.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=prepareSelection(e);if(e.options.moveInputWithCursor){var i=cursorCoords(e,n.sel.primary().head,\"div\"),o=t.wrapper.getBoundingClientRect(),s=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+s.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+s.left-o.left))}return r},je.prototype.showSelection=function(e){var t=this.cm.display;removeChildrenAndAdd(t.cursorDiv,e.cursors),removeChildrenAndAdd(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+\"px\",this.wrapper.style.left=e.teLeft+\"px\")},je.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput=\"\";var n=t.getSelection();this.textarea.value=n,t.state.focused&&M(this.textarea),s&&a>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value=\"\",s&&a>=9&&(this.hasSelection=null))}},je.prototype.getField=function(){return this.textarea},je.prototype.supportsTouch=function(){return!1},je.prototype.focus=function(){if(\"nocursor\"!=this.cm.options.readOnly&&(!v||activeElt()!=this.textarea))try{this.textarea.focus()}catch(e){}},je.prototype.blur=function(){this.textarea.blur()},je.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},je.prototype.receivedFocus=function(){this.slowPoll()},je.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},je.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;t.polling.set(20,function p(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,p))})},je.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||_(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(s&&a>=9&&this.hasSelection===i||y&&/[\\uf700-\\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r=\"​\"),8666==o)return this.reset(),this.cm.execCommand(\"undo\")}for(var l=0,c=Math.min(r.length,i.length);l<c&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return runInOp(t,function(){applyTextInput(t,i.slice(l),r.length-l,null,e.composing?\"*compose\":null),i.length>1e3||i.indexOf(\"\\n\")>-1?n.value=e.prevInput=\"\":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor(\"to\"),{className:\"CodeMirror-composing\"}))}),!0},je.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},je.prototype.onKeyPress=function(){s&&a>=9&&(this.hasSelection=null),this.fastPoll()},je.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea,o=posFromMouse(n,e),c=r.scroller.scrollTop;if(o&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&operation(n,setSelection)(n.doc,simpleSelection(o),A);var u=i.style.cssText,p=t.wrapper.style.cssText;t.wrapper.style.cssText=\"position: absolute\";var h=t.wrapper.getBoundingClientRect();i.style.cssText=\"position: absolute; width: 30px; height: 30px;\\n      top: \"+(e.clientY-h.top-5)+\"px; left: \"+(e.clientX-h.left-5)+\"px;\\n      z-index: 1000; background: \"+(s?\"rgba(255, 255, 255, .05)\":\"transparent\")+\";\\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);\";var f;if(l&&(f=window.scrollY),r.input.focus(),l&&window.scrollTo(null,f),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=\" \"),t.contextMenuPending=!0,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),s&&a>=9&&prepareSelectAllHack(),S){e_stop(e);var g=function(){off(window,\"mouseup\",g),setTimeout(rehide,20)};V(window,\"mouseup\",g)}else setTimeout(rehide,50)}function prepareSelectAllHack(){if(null!=i.selectionStart){var e=n.somethingSelected(),o=\"​\"+(e?i.value:\"\");i.value=\"⇚\",i.value=o,t.prevInput=e?\"\":\"​\",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function rehide(){if(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=u,s&&a<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart){(!s||s&&a<9)&&prepareSelectAllHack();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&\"​\"==t.prevInput?operation(n,selectAll)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},je.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=\"nocursor\"==e},je.prototype.setUneditable=function(){},je.prototype.needsContentAttribute=!1;!function defineOptions(e){var t=e.optionHandlers;function option(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Fe&&i(e,t,n)}:i)}e.defineOption=option,e.Init=Fe,option(\"value\",\"\",function(e,t){return e.setValue(t)},!0),option(\"mode\",null,function(e,t){e.doc.modeOption=t,loadMode(e)},!0),option(\"indentUnit\",2,loadMode,!0),option(\"indentWithTabs\",!1),option(\"smartIndent\",!0),option(\"tabSize\",4,function(e){resetModeState(e),clearCaches(e),regChange(e)},!0),option(\"lineSeparator\",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(Pos(r,o))}r++});for(var i=n.length-1;i>=0;i--)replaceRange(e.doc,t,n[i],Pos(n[i].line,n[i].ch+t.length))}}),option(\"specialChars\",/[\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u061c\\u200b-\\u200f\\u2028\\u2029\\ufeff]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test(\"\\t\")?\"\":\"|\\t\"),\"g\"),n!=Fe&&e.refresh()}),option(\"specialCharPlaceholder\",defaultSpecialCharPlaceholder,function(e){return e.refresh()},!0),option(\"electricChars\",!0),option(\"inputStyle\",v?\"contenteditable\":\"textarea\",function(){throw new Error(\"inputStyle can not (yet) be changed in a running editor\")},!0),option(\"spellcheck\",!1,function(e,t){return e.getInputField().spellcheck=t},!0),option(\"rtlMoveVisually\",!C),option(\"wholeLineUpdateBefore\",!0),option(\"theme\",\"default\",function(e){themeChanged(e),guttersChanged(e)},!0),option(\"keyMap\",\"default\",function(e,t,n){var r=getKeyMap(t),i=n!=Fe&&getKeyMap(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),option(\"extraKeys\",null),option(\"configureMouse\",null),option(\"lineWrapping\",!1,wrappingChanged,!0),option(\"gutters\",[],function(e){setGuttersForLineNumbers(e.options),guttersChanged(e)},!0),option(\"fixedGutter\",!0,function(e,t){e.display.gutters.style.left=t?compensateForHScroll(e.display)+\"px\":\"0\",e.refresh()},!0),option(\"coverGutterNextToScrollbar\",!1,function(e){return updateScrollbars(e)},!0),option(\"scrollbarStyle\",\"native\",function(e){initScrollbars(e),updateScrollbars(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),option(\"lineNumbers\",!1,function(e){setGuttersForLineNumbers(e.options),guttersChanged(e)},!0),option(\"firstLineNumber\",1,guttersChanged,!0),option(\"lineNumberFormatter\",function(e){return e},guttersChanged,!0),option(\"showCursorWhenSelecting\",!1,updateSelection,!0),option(\"resetSelectionOnContextMenu\",!0),option(\"lineWiseCopyCut\",!0),option(\"pasteLinesPerSelection\",!0),option(\"readOnly\",!1,function(e,t){\"nocursor\"==t&&(onBlur(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),option(\"disableInput\",!1,function(e,t){t||e.display.input.reset()},!0),option(\"dragDrop\",!0,dragDropChanged),option(\"allowDropFileTypes\",null),option(\"cursorBlinkRate\",530),option(\"cursorScrollMargin\",0),option(\"cursorHeight\",1,updateSelection,!0),option(\"singleCursorHeightPerLine\",!0,updateSelection,!0),option(\"workTime\",100),option(\"workDelay\",100),option(\"flattenSpans\",!0,resetModeState,!0),option(\"addModeClass\",!1,resetModeState,!0),option(\"pollInterval\",100),option(\"undoDepth\",200,function(e,t){return e.doc.history.undoDepth=t}),option(\"historyEventDelay\",1250),option(\"viewportMargin\",10,function(e){return e.refresh()},!0),option(\"maxHighlightLength\",1e4,resetModeState,!0),option(\"moveInputWithCursor\",!0,function(e,t){t||e.display.input.resetPosition()}),option(\"tabindex\",null,function(e,t){return e.display.input.getField().tabIndex=t||\"\"}),option(\"autofocus\",null),option(\"direction\",\"ltr\",function(e,t){return e.doc.setDirection(t)},!0)}(CodeMirror$1),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&\"mode\"!=e||(r[e]=n,t.hasOwnProperty(e)&&operation(this,t[e])(this,n,i),signal(this,\"optionChange\",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?\"push\":\"unshift\"](getKeyMap(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:methodOp(function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error(\"Overlays may not be stateful.\");!function insertSorted(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},function(e){return e.priority}),this.state.modeGen++,regChange(this)}),removeOverlay:methodOp(function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||\"string\"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void regChange(this)}}),indentLine:methodOp(function(e,t,n){\"string\"!=typeof t&&\"number\"!=typeof t&&(t=null==t?this.options.smartIndent?\"smart\":\"prev\":t?\"add\":\"subtract\"),isLine(this.doc,e)&&indentLine(this,e,t,n)}),indentSelection:methodOp(function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(indentLine(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&ensureCursorVisible(this));else{var o=i.from(),s=i.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;l<n;++l)indentLine(this,l,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[r].from().ch>0&&replaceOneSelection(this.doc,r,new ve(o,c[r].to()),A)}}}),getTokenAt:function(e,t){return takeToken(this,e,t)},getLineTokens:function(e,t){return takeToken(this,Pos(e),t,!0)},getTokenTypeAt:function(e){e=clipPos(this.doc,e);var t,n=getLineStyles(this,getLine(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var s=r+i>>1;if((s?n[2*s-1]:0)>=o)i=s;else{if(!(n[2*s+1]<o)){t=n[2*s+2];break}r=s+1}}var a=t?t.indexOf(\"overlay \"):-1;return a<0?t:0==a?null:t.slice(0,a-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],o=this.getModeAt(e);if(\"string\"==typeof o[t])i[o[t]]&&r.push(i[o[t]]);else if(o[t])for(var s=0;s<o[t].length;s++){var a=i[o[t][s]];a&&r.push(a)}else o.helperType&&i[o.helperType]?r.push(i[o.helperType]):i[o.name]&&r.push(i[o.name]);for(var l=0;l<i._global.length;l++){var c=i._global[l];c.pred(o,this)&&-1==indexOf(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(e,t){var n=this.doc;return getContextBefore(this,(e=clipLine(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return cursorCoords(this,null==e?n.head:\"object\"==typeof e?clipPos(this.doc,e):e?n.from():n.to(),t||\"page\")},charCoords:function(e,t){return charCoords(this,clipPos(this.doc,e),t||\"page\")},coordsChar:function(e,t){return coordsChar(this,(e=fromCoordSystem(this,e,t||\"page\")).left,e.top)},lineAtHeight:function(e,t){return e=fromCoordSystem(this,{top:e,left:0},t||\"page\").top,lineAtHeight(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!1;if(\"number\"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),r=getLine(this.doc,e)}else r=e;return intoCoordSystem(this,r,{top:0,left:0},t||\"page\",n||i).top+(i?this.doc.height-heightAtLine(r):0)},defaultTextHeight:function(){return textHeight(this.display)},defaultCharWidth:function(){return charWidth(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display,s=(e=cursorCoords(this,clipPos(this.doc,e))).bottom,a=e.left;if(t.style.position=\"absolute\",t.setAttribute(\"cm-ignore-events\",\"true\"),this.display.input.setUneditable(t),o.sizer.appendChild(t),\"over\"==r)s=e.top;else if(\"above\"==r||\"near\"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);(\"above\"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(s=e.bottom),a+t.offsetWidth>c&&(a=c-t.offsetWidth)}t.style.top=s+\"px\",t.style.left=t.style.right=\"\",\"right\"==i?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right=\"0px\"):(\"left\"==i?a=0:\"middle\"==i&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+\"px\"),n&&function scrollIntoView(e,t){var n=calculateScrollPos(e,t);null!=n.scrollTop&&updateScrollTop(e,n.scrollTop),null!=n.scrollLeft&&setScrollLeft(e,n.scrollLeft)}(this,{left:a,top:s,right:a+t.offsetWidth,bottom:s+t.offsetHeight})},triggerOnKeyDown:methodOp(onKeyDown),triggerOnKeyPress:methodOp(onKeyPress),triggerOnKeyUp:onKeyUp,triggerOnMouseDown:methodOp(onMouseDown),execCommand:function(e){if(Ne.hasOwnProperty(e))return Ne[e].call(null,this)},triggerElectric:methodOp(function(e){triggerElectric(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=clipPos(this.doc,e),s=0;s<t&&!(o=findPosH(this.doc,o,i,n,r)).hitSide;++s);return o},moveH:methodOp(function(e,t){var n=this;this.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?findPosH(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()},D)}),deleteH:methodOp(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection(\"\",null,\"+delete\"):deleteNearSelection(this,function(n){var i=findPosH(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var s=clipPos(this.doc,e),a=0;a<t;++a){var l=cursorCoords(this,s,\"div\");if(null==o?o=l.left:l.left=o,(s=findPosV(this,l,i,n)).hitSide)break}return s},moveV:methodOp(function(e,t){var n=this,r=this.doc,i=[],o=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(s){if(o)return e<0?s.from():s.to();var a=cursorCoords(n,s.head,\"div\");null!=s.goalColumn&&(a.left=s.goalColumn),i.push(a.left);var l=findPosV(n,a,e,t);return\"page\"==t&&s==r.sel.primary()&&addToScrollTop(n,charCoords(n,l,\"div\").top-a.top),l},D),i.length)for(var s=0;s<r.sel.ranges.length;s++)r.sel.ranges[s].goalColumn=i[s]}),findWordAt:function(e){var t=getLine(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,\"wordChars\");\"before\"!=e.sticky&&r!=t.length||!n?++r:--n;for(var o=t.charAt(n),s=isWordChar(o,i)?function(e){return isWordChar(e,i)}:/\\s/.test(o)?function(e){return/\\s/.test(e)}:function(e){return!/\\s/.test(e)&&!isWordChar(e)};n>0&&s(t.charAt(n-1));)--n;for(;r<t.length&&s(t.charAt(r));)++r}return new ve(Pos(e.line,n),Pos(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?addClass(this.display.cursorDiv,\"CodeMirror-overwrite\"):k(this.display.cursorDiv,\"CodeMirror-overwrite\"),signal(this,\"overwriteToggle\",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==activeElt()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:methodOp(function(e,t){scrollToCoords(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-scrollGap(this)-this.display.barHeight,width:e.scrollWidth-scrollGap(this)-this.display.barWidth,clientHeight:displayHeight(this),clientWidth:displayWidth(this)}},scrollIntoView:methodOp(function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):\"number\"==typeof e?e={from:Pos(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function scrollToRange(e,t){resolveScrollToPos(e),e.curOp.scrollToPos=t}(this,e):scrollToCoordsRange(this,e.from,e.to,e.margin)}),setSize:methodOp(function(e,t){var n=this,r=function(e){return\"number\"==typeof e||/^\\d+$/.test(String(e))?e+\"px\":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&clearLineMeasurementCache(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){regLineChange(n,i,\"widget\");break}++i}),this.curOp.forceUpdate=!0,signal(this,\"refresh\",this)}),operation:function(e){return runInOp(this,e)},startOperation:function(){return startOperation(this)},endOperation:function(){return endOperation(this)},refresh:methodOp(function(){var e=this.display.cachedTextHeight;regChange(this),this.curOp.forceUpdate=!0,clearCaches(this),scrollToCoords(this,this.doc.scrollLeft,this.doc.scrollTop),updateGutterSpace(this),(null==e||Math.abs(e-textHeight(this.display))>.5)&&estimateLineHeights(this),signal(this,\"refresh\",this)}),swapDoc:methodOp(function(e){var t=this.doc;return t.cm=null,attachDoc(this,e),clearCaches(this),this.display.input.reset(),scrollToCoords(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,signalLater(this,\"swapDoc\",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},eventMixin(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(CodeMirror$1);var Ge=\"iter insert remove copy getEditor constructor\".split(\" \");for(var Ke in Se.prototype)Se.prototype.hasOwnProperty(Ke)&&indexOf(Ge,Ke)<0&&(CodeMirror$1.prototype[Ke]=function(e){return function(){return e.apply(this.doc,arguments)}}(Se.prototype[Ke]));return eventMixin(Se),CodeMirror$1.inputStyles={textarea:je,contenteditable:Ue},CodeMirror$1.defineMode=function(e){CodeMirror$1.defaults.mode||\"null\"==e||(CodeMirror$1.defaults.mode=e),function defineMode(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),X[e]=t}.apply(this,arguments)},CodeMirror$1.defineMIME=function defineMIME(e,t){Y[e]=t},CodeMirror$1.defineMode(\"null\",function(){return{token:function(e){return e.skipToEnd()}}}),CodeMirror$1.defineMIME(\"text/plain\",\"null\"),CodeMirror$1.defineExtension=function(e,t){CodeMirror$1.prototype[e]=t},CodeMirror$1.defineDocExtension=function(e,t){Se.prototype[e]=t},CodeMirror$1.fromTextArea=function fromTextArea(e,t){if((t=t?copyObj(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=activeElt();t.autofocus=n==e||null!=e.getAttribute(\"autofocus\")&&n==document.body}function save(){e.value=s.getValue()}var r;if(e.form&&(V(e.form,\"submit\",save),!t.leaveSubmitMethodAlone)){var i=e.form;r=i.submit;try{var o=i.submit=function(){save(),i.submit=r,i.submit(),i.submit=o}}catch(e){}}t.finishInit=function(t){t.save=save,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,save(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display=\"\",e.form&&(off(e.form,\"submit\",save),\"function\"==typeof e.form.submit&&(e.form.submit=r))}},e.style.display=\"none\";var s=CodeMirror$1(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s},function addLegacyProps(e){e.off=off,e.on=V,e.wheelEventPixels=wheelEventPixels,e.Doc=Se,e.splitLines=K,e.countColumn=countColumn,e.findColumn=findColumn,e.isWordChar=isWordCharBasic,e.Pass=P,e.signal=signal,e.Line=ne,e.changeEnd=changeEnd,e.scrollbarModel=de,e.Pos=Pos,e.cmpPos=cmp,e.modes=X,e.mimeModes=Y,e.resolveMode=resolveMode,e.getMode=getMode,e.modeExtensions=Z,e.extendMode=extendMode,e.copyState=copyState,e.startState=startState,e.innerMode=innerMode,e.commands=Ne,e.keyMap=Ae,e.keyName=keyName,e.isModifierKey=isModifierKey,e.lookupKey=lookupKey,e.normalizeKeyMap=normalizeKeyMap,e.StringStream=Q,e.SharedTextMarker=xe,e.TextMarker=Ce,e.LineWidget=ye,e.e_preventDefault=e_preventDefault,e.e_stopPropagation=e_stopPropagation,e.e_stop=e_stop,e.addClass=addClass,e.contains=contains,e.rmClass=k,e.keyNames=Me}(CodeMirror$1),CodeMirror$1.version=\"5.33.0\",CodeMirror$1},e.exports=r();var r},411:function(e,t,n){\"use strict\";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){e(t,n);function __(){this.constructor=t}t.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)}}();Object.defineProperty(t,\"__esModule\",{value:!0});var i,o=n(0),s=\"undefined\"==typeof navigator;s||(i=n(410));var a=function(){function Shared(e,t){this.editor=e,this.props=t,this.notifyOfDeprecation()}return Shared.prototype.notifyOfDeprecation=function(){void 0!==this.props.autoScrollCursorOnSet&&console.warn(\"`autoScrollCursorOnSet` has been deprecated. Use `autoScroll` instead\\n\\nSee https://github.com/scniro/react-codemirror2#props\"),void 0!==this.props.resetCursorOnSet&&console.warn(\"`resetCursorOnSet` has been deprecated. Use `autoCursor` instead\\n\\nSee https://github.com/scniro/react-codemirror2#props\"),void 0!==this.props.onSet&&console.warn(\"`onSet` has been deprecated. User `editorDidMount` instead. See https://github.com/scniro/react-codemirror2#events\"),void 0!==this.props.onBeforeSet&&console.warn(\"`onBeforeSet` has been deprecated. User `onBeforeChange` for `Controlled`. instead. See https://github.com/scniro/react-codemirror2#events\")},Shared.prototype.wire=function(e){var t=this;switch(e){case\"onBlur\":this.editor.on(\"blur\",function(e,n){t.props.onBlur(t.editor,n)});break;case\"onCursor\":this.editor.on(\"cursorActivity\",function(e){t.props.onCursor(t.editor,t.editor.getCursor())});break;case\"onCursorActivity\":this.editor.on(\"cursorActivity\",function(e){t.props.onCursorActivity(t.editor)});break;case\"onDragEnter\":this.editor.on(\"dragenter\",function(e,n){t.props.onDragEnter(t.editor,n)});break;case\"onDragOver\":this.editor.on(\"dragover\",function(e,n){t.props.onDragOver(t.editor,n)});break;case\"onDrop\":this.editor.on(\"drop\",function(e,n){t.props.onDrop(t.editor,n)});break;case\"onFocus\":this.editor.on(\"focus\",function(e,n){t.props.onFocus(t.editor,n)});break;case\"onGutterClick\":this.editor.on(\"gutterClick\",function(e,n,r,i){t.props.onGutterClick(t.editor,n,r,i)});break;case\"onKeyDown\":this.editor.on(\"keydown\",function(e,n){t.props.onKeyDown(t.editor,n)});break;case\"onKeyPress\":this.editor.on(\"keypress\",function(e,n){t.props.onKeyPress(t.editor,n)});break;case\"onKeyUp\":this.editor.on(\"keyup\",function(e,n){t.props.onKeyUp(t.editor,n)});break;case\"onScroll\":this.editor.on(\"scroll\",function(e){t.props.onScroll(t.editor,t.editor.getScrollInfo())});break;case\"onSelection\":this.editor.on(\"beforeSelectionChange\",function(e,n){t.props.onSelection(t.editor,n)});break;case\"onUpdate\":this.editor.on(\"update\",function(e){t.props.onUpdate(t.editor)});break;case\"onViewportChange\":this.editor.on(\"viewportChange\",function(e,n,r){t.props.onViewportChange(t.editor,n,r)})}},Shared}(),l=function(e){r(Controlled,e);function Controlled(t){var n=e.call(this,t)||this;return s?n:(n.deferred=null,n.emulating=!1,n.hydrated=!1,n.initCb=function(){n.props.editorDidConfigure&&n.props.editorDidConfigure(n.editor)},n.mounted=!1,n)}return Controlled.prototype.setCursor=function(e,t,n){var r=this.editor.getDoc();n&&this.editor.focus(),t?r.setCursor(e):r.setCursor(e,null,{scroll:!1})},Controlled.prototype.moveCursor=function(e,t){var n=this.editor.getDoc();t?n.setCursor(e):n.setCursor(e,null,{scroll:!1})},Controlled.prototype.hydrate=function(e){var t=this;Object.keys(e.options||{}).forEach(function(n){t.editor.setOption(n,e.options[n]),t.mirror.setOption(n,e.options[n])}),this.hydrated||(this.mounted&&this.deferred?this.resolveChange():this.initChange(e.value||\"\")),this.hydrated=!0},Controlled.prototype.initChange=function(e){this.emulating=!0;var t=this.editor.lastLine(),n=this.editor.getLine(this.editor.lastLine()).length;this.editor.replaceRange(e||\"\",{line:0,ch:0},{line:t,ch:n}),this.mirror.setValue(e),this.editor.clearHistory(),this.mirror.clearHistory(),this.emulating=!1},Controlled.prototype.resolveChange=function(){this.emulating=!0,\"undo\"===this.deferred.origin?this.editor.undo():\"redo\"===this.deferred.origin?this.editor.redo():this.editor.replaceRange(this.deferred.text,this.deferred.from,this.deferred.to,this.deferred.origin),this.emulating=!1,this.deferred=null},Controlled.prototype.mirrorChange=function(e){return\"undo\"===e.origin?(this.editor.setHistory(this.mirror.getHistory()),this.mirror.undo()):\"redo\"===e.origin?(this.editor.setHistory(this.mirror.getHistory()),this.mirror.redo()):this.mirror.replaceRange(e.text,e.from,e.to,e.origin),this.mirror.getValue()},Controlled.prototype.componentWillMount=function(){s||this.props.editorWillMount&&this.props.editorWillMount()},Controlled.prototype.componentDidMount=function(){var e=this;if(!s){if(this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&i.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=i(this.ref),this.shared=new a(this.editor,this.props),this.mirror=i(function(){}),this.editor.on(\"electricInput\",function(){e.mirror.setHistory(e.editor.getHistory())}),this.editor.on(\"cursorActivity\",function(){e.mirror.setCursor(e.editor.getCursor())}),this.editor.on(\"beforeChange\",function(t,n){if(!e.emulating){n.cancel(),e.deferred=n;var r=e.mirrorChange(e.deferred);e.props.onBeforeChange&&e.props.onBeforeChange(e.editor,e.deferred,r)}}),this.editor.on(\"change\",function(t,n){e.mounted&&e.props.onChange&&e.props.onChange(e.editor,n,e.editor.getValue())}),this.props.onBlur&&this.shared.wire(\"onBlur\"),this.props.onCursor&&this.shared.wire(\"onCursor\"),this.props.onCursorActivity&&this.shared.wire(\"onCursorActivity\"),this.props.onDragEnter&&this.shared.wire(\"onDragEnter\"),this.props.onDragOver&&this.shared.wire(\"onDragOver\"),this.props.onDrop&&this.shared.wire(\"onDrop\"),this.props.onFocus&&this.shared.wire(\"onFocus\"),this.props.onGutterClick&&this.shared.wire(\"onGutterClick\"),this.props.onKeyDown&&this.shared.wire(\"onKeyDown\"),this.props.onKeyPress&&this.shared.wire(\"onKeyPress\"),this.props.onKeyUp&&this.shared.wire(\"onKeyUp\"),this.props.onScroll&&this.shared.wire(\"onScroll\"),this.props.onSelection&&this.shared.wire(\"onSelection\"),this.props.onUpdate&&this.shared.wire(\"onUpdate\"),this.props.onViewportChange&&this.shared.wire(\"onViewportChange\"),this.hydrate(this.props),this.props.selection){this.editor.getDoc().setSelections(this.props.selection)}this.props.cursor&&this.setCursor(this.props.cursor,this.props.autoScroll||!1,this.props.autoFocus||!1),this.props.scroll&&this.editor.scrollTo(this.props.scroll.x,this.props.scroll.y),this.mounted=!0,this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb)}},Controlled.prototype.componentWillReceiveProps=function(e){if(!s){var t;e.value!==this.props.value&&(this.hydrated=!1),this.props.autoCursor||void 0===this.props.autoCursor||(t=this.editor.getCursor()),this.hydrate(e),this.props.autoCursor||void 0===this.props.autoCursor||this.moveCursor(t,this.props.autoScroll||!1)}},Controlled.prototype.componentWillUnmount=function(){s||this.props.editorWillUnmount&&this.props.editorWillUnmount(i)},Controlled.prototype.shouldComponentUpdate=function(e,t){return!s},Controlled.prototype.render=function(){var e=this;if(s)return null;var t=this.props.className?\"react-codemirror2 \"+this.props.className:\"react-codemirror2\";return o.createElement(\"div\",{className:t,ref:function(t){return e.ref=t}})},Controlled}(o.Component);t.Controlled=l;var c=function(e){r(UnControlled,e);function UnControlled(t){var n=e.call(this,t)||this;return s?n:(n.continueChange=!1,n.hydrated=!1,n.initCb=function(){n.props.editorDidConfigure&&n.props.editorDidConfigure(n.editor)},n.mounted=!1,n.onBeforeChangeCb=function(){n.continueChange=!0},n)}return UnControlled.prototype.setCursor=function(e,t,n){var r=this.editor.getDoc();n&&this.editor.focus(),t?r.setCursor(e):r.setCursor(e,null,{scroll:!1})},UnControlled.prototype.moveCursor=function(e,t){var n=this.editor.getDoc();t?n.setCursor(e):n.setCursor(e,null,{scroll:!1})},UnControlled.prototype.hydrate=function(e){var t=this;if(Object.keys(e.options||{}).forEach(function(n){return t.editor.setOption(n,e.options[n])}),!this.hydrated){var n=this.editor.lastLine(),r=this.editor.getLine(this.editor.lastLine()).length;this.editor.replaceRange(e.value||\"\",{line:0,ch:0},{line:n,ch:r})}this.hydrated=!0},UnControlled.prototype.componentWillMount=function(){s||this.props.editorWillMount&&this.props.editorWillMount()},UnControlled.prototype.componentDidMount=function(){var e=this;if(!s){if(this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&i.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=i(this.ref),this.shared=new a(this.editor,this.props),this.editor.on(\"beforeChange\",function(t,n){e.props.onBeforeChange&&e.props.onBeforeChange(e.editor,n,null,e.onBeforeChangeCb)}),this.editor.on(\"change\",function(t,n){if(e.mounted)if(e.props.onBeforeChange){if(!e.continueChange)return;e.props.onChange(e.editor,n,e.editor.getValue())}else e.props.onChange(e.editor,n,e.editor.getValue())}),this.props.onBlur&&this.shared.wire(\"onBlur\"),this.props.onCursor&&this.shared.wire(\"onCursor\"),this.props.onCursorActivity&&this.shared.wire(\"onCursorActivity\"),this.props.onDragEnter&&this.shared.wire(\"onDragEnter\"),this.props.onDragOver&&this.shared.wire(\"onDragOver\"),this.props.onDrop&&this.shared.wire(\"onDrop\"),this.props.onFocus&&this.shared.wire(\"onFocus\"),this.props.onGutterClick&&this.shared.wire(\"onGutterClick\"),this.props.onKeyDown&&this.shared.wire(\"onKeyDown\"),this.props.onKeyPress&&this.shared.wire(\"onKeyPress\"),this.props.onKeyUp&&this.shared.wire(\"onKeyUp\"),this.props.onScroll&&this.shared.wire(\"onScroll\"),this.props.onSelection&&this.shared.wire(\"onSelection\"),this.props.onUpdate&&this.shared.wire(\"onUpdate\"),this.props.onViewportChange&&this.shared.wire(\"onViewportChange\"),this.hydrate(this.props),this.props.selection){this.editor.getDoc().setSelections(this.props.selection)}this.props.cursor&&this.setCursor(this.props.cursor,this.props.autoScroll||!1,this.props.autoFocus||!1),this.props.scroll&&this.editor.scrollTo(this.props.scroll.x,this.props.scroll.y),this.mounted=!0,this.editor.clearHistory(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb)}},UnControlled.prototype.componentWillReceiveProps=function(e){if(!s){var t;e.value!==this.props.value&&(this.hydrated=!1),this.props.autoCursor||void 0===this.props.autoCursor||(t=this.editor.getCursor()),this.hydrate(e),this.props.autoCursor||void 0===this.props.autoCursor||this.moveCursor(t,this.props.autoScroll||!1)}},UnControlled.prototype.componentWillUnmount=function(){s||this.props.editorWillUnmount&&this.props.editorWillUnmount(i)},UnControlled.prototype.shouldComponentUpdate=function(e,t){return!s},UnControlled.prototype.render=function(){var e=this;if(s)return null;var t=this.props.className?\"react-codemirror2 \"+this.props.className:\"react-codemirror2\";return o.createElement(\"div\",{className:t,ref:function(t){return e.ref=t}})},UnControlled}(o.Component);t.UnControlled=c},412:function(e,t,n){(function(e){\"use strict\";function Context(e,t,n,r){this.state=e,this.mode=t,this.depth=n,this.prev=r}e.defineMode(\"jsx\",function(t,n){var r=e.getMode(t,{name:\"xml\",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),i=e.getMode(t,n&&n.base||\"javascript\");function flatXMLIndent(e){var t=e.tagName;e.tagName=null;var n=r.indent(e,\"\");return e.tagName=t,n}function token(n,o){return o.context.mode==r?function xmlToken(n,o,s){if(2==s.depth)return n.match(/^.*?\\*\\//)?s.depth=1:n.skipToEnd(),\"comment\";if(\"{\"==n.peek()){r.skipAttribute(s.state);var a=flatXMLIndent(s.state),l=s.state.context;if(l&&n.match(/^[^>]*>\\s*$/,!1)){for(;l.prev&&!l.startOfLine;)l=l.prev;l.startOfLine?a-=t.indentUnit:s.prev.state.lexical&&(a=s.prev.state.lexical.indented)}else 1==s.depth&&(a+=t.indentUnit);return o.context=new Context(e.startState(i,a),i,0,o.context),null}if(1==s.depth){if(\"<\"==n.peek())return r.skipAttribute(s.state),o.context=new Context(e.startState(r,flatXMLIndent(s.state)),r,0,o.context),null;if(n.match(\"//\"))return n.skipToEnd(),\"comment\";if(n.match(\"/*\"))return s.depth=2,token(n,o)}var c,u=r.token(n,s.state),d=n.current();/\\btag\\b/.test(u)?/>$/.test(d)?s.state.context?s.depth=0:o.context=o.context.prev:/^</.test(d)&&(s.depth=1):!u&&(c=d.indexOf(\"{\"))>-1&&n.backUp(d.length-c);return u}(n,o,o.context):function jsToken(t,n,o){if(\"<\"==t.peek()&&i.expressionAllowed(t,o.state))return i.skipExpression(o.state),n.context=new Context(e.startState(r,i.indent(o.state,\"\")),r,0,n.context),null;var s=i.token(t,o.state);if(!s&&null!=o.depth){var a=t.current();\"{\"==a?o.depth++:\"}\"==a&&0==--o.depth&&(n.context=n.context.prev)}return s}(n,o,o.context)}return{startState:function(){return{context:new Context(e.startState(i),i)}},copyState:function(t){return{context:function copyContext(t){return new Context(e.copyState(t.mode,t.state),t.mode,t.depth,t.prev&&copyContext(t.prev))}(t.context)}},token:token,indent:function(e,t,n){return e.context.mode.indent(e.context.state,t,n)},innerMode:function(e){return e.context}}},\"xml\",\"javascript\"),e.defineMIME(\"text/jsx\",\"jsx\"),e.defineMIME(\"text/typescript-jsx\",{name:\"jsx\",base:{name:\"javascript\",typescript:!0}})})(n(410),n(413),n(414))},413:function(e,t,n){(function(e){\"use strict\";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode(\"xml\",function(r,i){var o=r.indentUnit,s={},a=i.htmlMode?t:n;for(var l in a)s[l]=a[l];for(var l in i)s[l]=i[l];var c,u;function inText(e,t){function chain(n){return t.tokenize=n,n(e,t)}var n=e.next();if(\"<\"==n)return e.eat(\"!\")?e.eat(\"[\")?e.match(\"CDATA[\")?chain(inBlock(\"atom\",\"]]>\")):null:e.match(\"--\")?chain(inBlock(\"comment\",\"--\\x3e\")):e.match(\"DOCTYPE\",!0,!0)?(e.eatWhile(/[\\w\\._\\-]/),chain(function doctype(e){return function(t,n){for(var r;null!=(r=t.next());){if(\"<\"==r)return n.tokenize=doctype(e+1),n.tokenize(t,n);if(\">\"==r){if(1==e){n.tokenize=inText;break}return n.tokenize=doctype(e-1),n.tokenize(t,n)}}return\"meta\"}}(1))):null:e.eat(\"?\")?(e.eatWhile(/[\\w\\._\\-]/),t.tokenize=inBlock(\"meta\",\"?>\"),\"meta\"):(c=e.eat(\"/\")?\"closeTag\":\"openTag\",t.tokenize=inTag,\"tag bracket\");if(\"&\"==n){return(e.eat(\"#\")?e.eat(\"x\")?e.eatWhile(/[a-fA-F\\d]/)&&e.eat(\";\"):e.eatWhile(/[\\d]/)&&e.eat(\";\"):e.eatWhile(/[\\w\\.\\-:]/)&&e.eat(\";\"))?\"atom\":\"error\"}return e.eatWhile(/[^&<]/),null}inText.isInText=!0;function inTag(e,t){var n=e.next();if(\">\"==n||\"/\"==n&&e.eat(\">\"))return t.tokenize=inText,c=\">\"==n?\"endTag\":\"selfcloseTag\",\"tag bracket\";if(\"=\"==n)return c=\"equals\",null;if(\"<\"==n){t.tokenize=inText,t.state=baseState,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+\" tag error\":\"tag error\"}return/[\\'\\\"]/.test(n)?(t.tokenize=function inAttribute(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=inTag;break}return\"string\"};return t.isInAttribute=!0,t}(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\\s\\u00a0=<>\\\"\\']*[^\\s\\u00a0=<>\\\"\\'\\/]/),\"word\")}function inBlock(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=inText;break}n.next()}return e}}function popContext(e){e.context&&(e.context=e.context.prev)}function maybePopContext(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!s.contextGrabbers.hasOwnProperty(n)||!s.contextGrabbers[n].hasOwnProperty(t))return;popContext(e)}}function baseState(e,t,n){return\"openTag\"==e?(n.tagStart=t.column(),tagNameState):\"closeTag\"==e?closeTagNameState:baseState}function tagNameState(e,t,n){return\"word\"==e?(n.tagName=t.current(),u=\"tag\",attrState):s.allowMissingTagName&&\"endTag\"==e?(u=\"tag bracket\",attrState(e,t,n)):(u=\"error\",tagNameState)}function closeTagNameState(e,t,n){if(\"word\"==e){var r=t.current();return n.context&&n.context.tagName!=r&&s.implicitlyClosed.hasOwnProperty(n.context.tagName)&&popContext(n),n.context&&n.context.tagName==r||!1===s.matchClosing?(u=\"tag\",closeState):(u=\"tag error\",closeStateErr)}return s.allowMissingTagName&&\"endTag\"==e?(u=\"tag bracket\",closeState(e,t,n)):(u=\"error\",closeStateErr)}function closeState(e,t,n){return\"endTag\"!=e?(u=\"error\",closeState):(popContext(n),baseState)}function closeStateErr(e,t,n){return u=\"error\",closeState(e,0,n)}function attrState(e,t,n){if(\"word\"==e)return u=\"attribute\",attrEqState;if(\"endTag\"==e||\"selfcloseTag\"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,\"selfcloseTag\"==e||s.autoSelfClosers.hasOwnProperty(r)?maybePopContext(n,r):(maybePopContext(n,r),n.context=new function Context(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(s.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}(n,r,i==n.indented)),baseState}return u=\"error\",attrState}function attrEqState(e,t,n){return\"equals\"==e?attrValueState:(s.allowMissing||(u=\"error\"),attrState(e,0,n))}function attrValueState(e,t,n){return\"string\"==e?attrContinuedState:\"word\"==e&&s.allowUnquoted?(u=\"string\",attrState):(u=\"error\",attrState(e,0,n))}function attrContinuedState(e,t,n){return\"string\"==e?attrContinuedState:attrState(e,0,n)}return{startState:function(e){var t={tokenize:inText,state:baseState,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;c=null;var n=t.tokenize(e,t);return(n||c)&&\"comment\"!=n&&(u=null,t.state=t.state(c||n,e,t),u&&(n=\"error\"==u?n+\" error\":u)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+o;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=inTag&&t.tokenize!=inText)return r?r.match(/^(\\s*)/)[0].length:0;if(t.tagName)return!1!==s.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+o*(s.multilineTagIndentFactor||1);if(s.alignCDATA&&/<!\\[CDATA\\[/.test(n))return 0;var a=n&&/^<(\\/)?([\\w_:\\.-]*)/.exec(n);if(a&&a[1])for(;i;){if(i.tagName==a[2]){i=i.prev;break}if(!s.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(a)for(;i;){var l=s.contextGrabbers[i.tagName];if(!l||!l.hasOwnProperty(a[2]))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+o:t.baseIndent||0},electricInput:/<\\/[\\s\\w:]+>$/,blockCommentStart:\"\\x3c!--\",blockCommentEnd:\"--\\x3e\",configuration:s.htmlMode?\"html\":\"xml\",helperType:s.htmlMode?\"html\":\"xml\",skipAttribute:function(e){e.state==attrValueState&&(e.state=attrState)}}}),e.defineMIME(\"text/xml\",\"xml\"),e.defineMIME(\"application/xml\",\"xml\"),e.mimeModes.hasOwnProperty(\"text/html\")||e.defineMIME(\"text/html\",{name:\"xml\",htmlMode:!0})})(n(410))},414:function(e,t,n){(function(e){\"use strict\";e.defineMode(\"javascript\",function(t,n){var r=t.indentUnit,i=n.statementIndent,o=n.jsonld,s=n.json||o,a=n.typescript,l=n.wordCharacters||/[\\w$\\xa1-\\uffff]/,c=function(){function kw(e){return{type:e,style:\"keyword\"}}var e=kw(\"keyword a\"),t=kw(\"keyword b\"),n=kw(\"keyword c\"),r=kw(\"keyword d\"),i=kw(\"operator\"),o={type:\"atom\",style:\"atom\"};return{if:kw(\"if\"),while:e,with:e,else:t,do:t,try:t,finally:t,return:r,break:r,continue:r,new:kw(\"new\"),delete:n,void:n,throw:n,debugger:kw(\"debugger\"),var:kw(\"var\"),const:kw(\"var\"),let:kw(\"var\"),function:kw(\"function\"),catch:kw(\"catch\"),for:kw(\"for\"),switch:kw(\"switch\"),case:kw(\"case\"),default:kw(\"default\"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:kw(\"this\"),class:kw(\"class\"),super:kw(\"atom\"),yield:n,export:kw(\"export\"),import:kw(\"import\"),extends:n,await:n}}(),u=/[+\\-*&%=<>!?|~^@]/,d=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)\"/;var p,h;function ret(e,t,n){return p=e,h=n,t}function tokenBase(e,t){var n=e.next();if('\"'==n||\"'\"==n)return t.tokenize=function tokenString(e){return function(t,n){var r,i=!1;if(o&&\"@\"==t.peek()&&t.match(d))return n.tokenize=tokenBase,ret(\"jsonld-keyword\",\"meta\");for(;null!=(r=t.next())&&(r!=e||i);)i=!i&&\"\\\\\"==r;return i||(n.tokenize=tokenBase),ret(\"string\",\"string\")}}(n),t.tokenize(e,t);if(\".\"==n&&e.match(/^\\d+(?:[eE][+\\-]?\\d+)?/))return ret(\"number\",\"number\");if(\".\"==n&&e.match(\"..\"))return ret(\"spread\",\"meta\");if(/[\\[\\]{}\\(\\),;\\:\\.]/.test(n))return ret(n);if(\"=\"==n&&e.eat(\">\"))return ret(\"=>\",\"operator\");if(\"0\"==n&&e.eat(/x/i))return e.eatWhile(/[\\da-f]/i),ret(\"number\",\"number\");if(\"0\"==n&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),ret(\"number\",\"number\");if(\"0\"==n&&e.eat(/b/i))return e.eatWhile(/[01]/i),ret(\"number\",\"number\");if(/\\d/.test(n))return e.match(/^\\d*(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/),ret(\"number\",\"number\");if(\"/\"==n)return e.eat(\"*\")?(t.tokenize=tokenComment,tokenComment(e,t)):e.eat(\"/\")?(e.skipToEnd(),ret(\"comment\",\"comment\")):expressionAllowed(e,t,1)?(function readRegexp(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if(\"/\"==t&&!r)return;\"[\"==t?r=!0:r&&\"]\"==t&&(r=!1)}n=!n&&\"\\\\\"==t}}(e),e.match(/^\\b(([gimyu])(?![gimyu]*\\2))+\\b/),ret(\"regexp\",\"string-2\")):(e.eat(\"=\"),ret(\"operator\",\"operator\",e.current()));if(\"`\"==n)return t.tokenize=tokenQuasi,tokenQuasi(e,t);if(\"#\"==n)return e.skipToEnd(),ret(\"error\",\"error\");if(u.test(n))return\">\"==n&&t.lexical&&\">\"==t.lexical.type||(e.eat(\"=\")?\"!\"!=n&&\"=\"!=n||e.eat(\"=\"):/[<>*+\\-]/.test(n)&&(e.eat(n),\">\"==n&&e.eat(n))),ret(\"operator\",\"operator\",e.current());if(l.test(n)){e.eatWhile(l);var r=e.current();if(\".\"!=t.lastType){if(c.propertyIsEnumerable(r)){var i=c[r];return ret(i.type,i.style,r)}if(\"async\"==r&&e.match(/^(\\s|\\/\\*.*?\\*\\/)*[\\(\\w]/,!1))return ret(\"async\",\"keyword\",r)}return ret(\"variable\",\"variable\",r)}}function tokenComment(e,t){for(var n,r=!1;n=e.next();){if(\"/\"==n&&r){t.tokenize=tokenBase;break}r=\"*\"==n}return ret(\"comment\",\"comment\")}function tokenQuasi(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&(\"`\"==n||\"$\"==n&&e.eat(\"{\"))){t.tokenize=tokenBase;break}r=!r&&\"\\\\\"==n}return ret(\"quasi\",\"string-2\",e.current())}var f=\"([{}])\";function findFatArrow(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf(\"=>\",e.start);if(!(n<0)){if(a){var r=/:\\s*(?:\\w+(?:<[^>]*>|\\[\\])?|\\{[^}]*\\})\\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,o=!1,s=n-1;s>=0;--s){var c=e.string.charAt(s),u=f.indexOf(c);if(u>=0&&u<3){if(!i){++s;break}if(0==--i){\"(\"==c&&(o=!0);break}}else if(u>=3&&u<6)++i;else if(l.test(c))o=!0;else{if(/[\"'\\/]/.test(c))return;if(o&&!i){++s;break}}}o&&!i&&(t.fatArrowAt=s)}}var g={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,\"jsonld-keyword\":!0};function JSLexical(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function inScope(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}var m={state:null,column:null,marked:null,cc:null};function pass(){for(var e=arguments.length-1;e>=0;e--)m.cc.push(arguments[e])}function cont(){return pass.apply(null,arguments),!0}function register(e){function inList(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}var t=m.state;if(m.marked=\"def\",t.context){if(inList(t.localVars))return;t.localVars={name:e,next:t.localVars}}else{if(inList(t.globalVars))return;n.globalVars&&(t.globalVars={name:e,next:t.globalVars})}}function isModifier(e){return\"public\"==e||\"private\"==e||\"protected\"==e||\"abstract\"==e||\"readonly\"==e}var v={name:\"this\",next:{name:\"arguments\"}};function pushcontext(){m.state.context={prev:m.state.context,vars:m.state.localVars},m.state.localVars=v}function popcontext(){m.state.localVars=m.state.context.vars,m.state.context=m.state.context.prev}function pushlex(e,t){var n=function(){var n=m.state,r=n.indented;if(\"stat\"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&\")\"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new JSLexical(r,m.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function poplex(){var e=m.state;e.lexical.prev&&(\")\"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}poplex.lex=!0;function expect(e){return function exp(t){return t==e?cont():\";\"==e?pass():cont(exp)}}function statement(e,t){return\"var\"==e?cont(pushlex(\"vardef\",t.length),vardef,expect(\";\"),poplex):\"keyword a\"==e?cont(pushlex(\"form\"),parenExpr,statement,poplex):\"keyword b\"==e?cont(pushlex(\"form\"),statement,poplex):\"keyword d\"==e?m.stream.match(/^\\s*$/,!1)?cont():cont(pushlex(\"stat\"),maybeexpression,expect(\";\"),poplex):\"debugger\"==e?cont(expect(\";\")):\"{\"==e?cont(pushlex(\"}\"),block,poplex):\";\"==e?cont():\"if\"==e?(\"else\"==m.state.lexical.info&&m.state.cc[m.state.cc.length-1]==poplex&&m.state.cc.pop()(),cont(pushlex(\"form\"),parenExpr,statement,poplex,maybeelse)):\"function\"==e?cont(functiondef):\"for\"==e?cont(pushlex(\"form\"),forspec,statement,poplex):\"class\"==e||a&&\"interface\"==t?(m.marked=\"keyword\",cont(pushlex(\"form\"),className,poplex)):\"variable\"==e?a&&\"type\"==t?(m.marked=\"keyword\",cont(typeexpr,expect(\"operator\"),typeexpr,expect(\";\"))):a&&\"declare\"==t?(m.marked=\"keyword\",cont(statement)):a&&(\"module\"==t||\"enum\"==t)&&m.stream.match(/^\\s*\\w/,!1)?(m.marked=\"keyword\",cont(pushlex(\"form\"),pattern,expect(\"{\"),pushlex(\"}\"),block,poplex,poplex)):a&&\"namespace\"==t?(m.marked=\"keyword\",cont(pushlex(\"form\"),expression,block,poplex)):cont(pushlex(\"stat\"),maybelabel):\"switch\"==e?cont(pushlex(\"form\"),parenExpr,expect(\"{\"),pushlex(\"}\",\"switch\"),block,poplex,poplex):\"case\"==e?cont(expression,expect(\":\")):\"default\"==e?cont(expect(\":\")):\"catch\"==e?cont(pushlex(\"form\"),pushcontext,expect(\"(\"),funarg,expect(\")\"),statement,poplex,popcontext):\"export\"==e?cont(pushlex(\"stat\"),afterExport,poplex):\"import\"==e?cont(pushlex(\"stat\"),afterImport,poplex):\"async\"==e?cont(statement):\"@\"==t?cont(expression,statement):pass(pushlex(\"stat\"),expression,expect(\";\"),poplex)}function expression(e,t){return expressionInner(e,t,!1)}function expressionNoComma(e,t){return expressionInner(e,t,!0)}function parenExpr(e){return\"(\"!=e?pass():cont(pushlex(\")\"),expression,expect(\")\"),poplex)}function expressionInner(e,t,n){if(m.state.fatArrowAt==m.stream.start){var r=n?arrowBodyNoComma:arrowBody;if(\"(\"==e)return cont(pushcontext,pushlex(\")\"),commasep(funarg,\")\"),poplex,expect(\"=>\"),r,popcontext);if(\"variable\"==e)return pass(pushcontext,pattern,expect(\"=>\"),r,popcontext)}var i=n?maybeoperatorNoComma:maybeoperatorComma;return g.hasOwnProperty(e)?cont(i):\"function\"==e?cont(functiondef,i):\"class\"==e||a&&\"interface\"==t?(m.marked=\"keyword\",cont(pushlex(\"form\"),classExpression,poplex)):\"keyword c\"==e||\"async\"==e?cont(n?expressionNoComma:expression):\"(\"==e?cont(pushlex(\")\"),maybeexpression,expect(\")\"),poplex,i):\"operator\"==e||\"spread\"==e?cont(n?expressionNoComma:expression):\"[\"==e?cont(pushlex(\"]\"),arrayLiteral,poplex,i):\"{\"==e?contCommasep(objprop,\"}\",null,i):\"quasi\"==e?pass(quasi,i):\"new\"==e?cont(function maybeTarget(e){return function(t){return\".\"==t?cont(e?targetNoComma:target):\"variable\"==t&&a?cont(maybeTypeArgs,e?maybeoperatorNoComma:maybeoperatorComma):pass(e?expressionNoComma:expression)}}(n)):cont()}function maybeexpression(e){return e.match(/[;\\}\\)\\],]/)?pass():pass(expression)}function maybeoperatorComma(e,t){return\",\"==e?cont(expression):maybeoperatorNoComma(e,t,!1)}function maybeoperatorNoComma(e,t,n){var r=0==n?maybeoperatorComma:maybeoperatorNoComma,i=0==n?expression:expressionNoComma;return\"=>\"==e?cont(pushcontext,n?arrowBodyNoComma:arrowBody,popcontext):\"operator\"==e?/\\+\\+|--/.test(t)||a&&\"!\"==t?cont(r):a&&\"<\"==t&&m.stream.match(/^([^>]|<.*?>)*>\\s*\\(/,!1)?cont(pushlex(\">\"),commasep(typeexpr,\">\"),poplex,r):\"?\"==t?cont(expression,expect(\":\"),i):cont(i):\"quasi\"==e?pass(quasi,r):\";\"!=e?\"(\"==e?contCommasep(expressionNoComma,\")\",\"call\",r):\".\"==e?cont(property,r):\"[\"==e?cont(pushlex(\"]\"),maybeexpression,expect(\"]\"),poplex,r):a&&\"as\"==t?(m.marked=\"keyword\",cont(typeexpr,r)):\"regexp\"==e?(m.state.lastType=m.marked=\"operator\",m.stream.backUp(m.stream.pos-m.stream.start-1),cont(i)):void 0:void 0}function quasi(e,t){return\"quasi\"!=e?pass():\"${\"!=t.slice(t.length-2)?cont(quasi):cont(expression,continueQuasi)}function continueQuasi(e){if(\"}\"==e)return m.marked=\"string-2\",m.state.tokenize=tokenQuasi,cont(quasi)}function arrowBody(e){return findFatArrow(m.stream,m.state),pass(\"{\"==e?statement:expression)}function arrowBodyNoComma(e){return findFatArrow(m.stream,m.state),pass(\"{\"==e?statement:expressionNoComma)}function target(e,t){if(\"target\"==t)return m.marked=\"keyword\",cont(maybeoperatorComma)}function targetNoComma(e,t){if(\"target\"==t)return m.marked=\"keyword\",cont(maybeoperatorNoComma)}function maybelabel(e){return\":\"==e?cont(poplex,statement):pass(maybeoperatorComma,expect(\";\"),poplex)}function property(e){if(\"variable\"==e)return m.marked=\"property\",cont()}function objprop(e,t){if(\"async\"==e)return m.marked=\"property\",cont(objprop);if(\"variable\"==e||\"keyword\"==m.style){if(m.marked=\"property\",\"get\"==t||\"set\"==t)return cont(getterSetter);var n;return a&&m.state.fatArrowAt==m.stream.start&&(n=m.stream.match(/^\\s*:\\s*/,!1))&&(m.state.fatArrowAt=m.stream.pos+n[0].length),cont(afterprop)}return\"number\"==e||\"string\"==e?(m.marked=o?\"property\":m.style+\" property\",cont(afterprop)):\"jsonld-keyword\"==e?cont(afterprop):a&&isModifier(t)?(m.marked=\"keyword\",cont(objprop)):\"[\"==e?cont(expression,maybetype,expect(\"]\"),afterprop):\"spread\"==e?cont(expressionNoComma,afterprop):\"*\"==t?(m.marked=\"keyword\",cont(objprop)):\":\"==e?pass(afterprop):void 0}function getterSetter(e){return\"variable\"!=e?pass(afterprop):(m.marked=\"property\",cont(functiondef))}function afterprop(e){return\":\"==e?cont(expressionNoComma):\"(\"==e?pass(functiondef):void 0}function commasep(e,t,n){function proceed(r,i){if(n?n.indexOf(r)>-1:\",\"==r){var o=m.state.lexical;return\"call\"==o.info&&(o.pos=(o.pos||0)+1),cont(function(n,r){return n==t||r==t?pass():pass(e)},proceed)}return r==t||i==t?cont():cont(expect(t))}return function(n,r){return n==t||r==t?cont():pass(e,proceed)}}function contCommasep(e,t,n){for(var r=3;r<arguments.length;r++)m.cc.push(arguments[r]);return cont(pushlex(t,n),commasep(e,t),poplex)}function block(e){return\"}\"==e?cont():pass(statement,block)}function maybetype(e,t){if(a){if(\":\"==e)return cont(typeexpr);if(\"?\"==t)return cont(maybetype)}}function mayberettype(e){if(a&&\":\"==e)return m.stream.match(/^\\s*\\w+\\s+is\\b/,!1)?cont(expression,isKW,typeexpr):cont(typeexpr)}function isKW(e,t){if(\"is\"==t)return m.marked=\"keyword\",cont()}function typeexpr(e,t){return\"variable\"==e||\"void\"==t?\"keyof\"==t?(m.marked=\"keyword\",cont(typeexpr)):(m.marked=\"type\",cont(afterType)):\"string\"==e||\"number\"==e||\"atom\"==e?cont(afterType):\"[\"==e?cont(pushlex(\"]\"),commasep(typeexpr,\"]\",\",\"),poplex,afterType):\"{\"==e?cont(pushlex(\"}\"),commasep(typeprop,\"}\",\",;\"),poplex,afterType):\"(\"==e?cont(commasep(typearg,\")\"),maybeReturnType):void 0}function maybeReturnType(e){if(\"=>\"==e)return cont(typeexpr)}function typeprop(e,t){return\"variable\"==e||\"keyword\"==m.style?(m.marked=\"property\",cont(typeprop)):\"?\"==t?cont(typeprop):\":\"==e?cont(typeexpr):\"[\"==e?cont(expression,maybetype,expect(\"]\"),typeprop):void 0}function typearg(e){return\"variable\"==e?cont(typearg):\":\"==e?cont(typeexpr):void 0}function afterType(e,t){return\"<\"==t?cont(pushlex(\">\"),commasep(typeexpr,\">\"),poplex,afterType):\"|\"==t||\".\"==e?cont(typeexpr):\"[\"==e?cont(expect(\"]\"),afterType):\"extends\"==t||\"implements\"==t?(m.marked=\"keyword\",cont(typeexpr)):void 0}function maybeTypeArgs(e,t){if(\"<\"==t)return cont(pushlex(\">\"),commasep(typeexpr,\">\"),poplex,afterType)}function typeparam(){return pass(typeexpr,maybeTypeDefault)}function maybeTypeDefault(e,t){if(\"=\"==t)return cont(typeexpr)}function vardef(){return pass(pattern,maybetype,maybeAssign,vardefCont)}function pattern(e,t){return a&&isModifier(t)?(m.marked=\"keyword\",cont(pattern)):\"variable\"==e?(register(t),cont()):\"spread\"==e?cont(pattern):\"[\"==e?contCommasep(pattern,\"]\"):\"{\"==e?contCommasep(proppattern,\"}\"):void 0}function proppattern(e,t){return\"variable\"!=e||m.stream.match(/^\\s*:/,!1)?(\"variable\"==e&&(m.marked=\"property\"),\"spread\"==e?cont(pattern):\"}\"==e?pass():cont(expect(\":\"),pattern,maybeAssign)):(register(t),cont(maybeAssign))}function maybeAssign(e,t){if(\"=\"==t)return cont(expressionNoComma)}function vardefCont(e){if(\",\"==e)return cont(vardef)}function maybeelse(e,t){if(\"keyword b\"==e&&\"else\"==t)return cont(pushlex(\"form\",\"else\"),statement,poplex)}function forspec(e){if(\"(\"==e)return cont(pushlex(\")\"),forspec1,expect(\")\"),poplex)}function forspec1(e){return\"var\"==e?cont(vardef,expect(\";\"),forspec2):\";\"==e?cont(forspec2):\"variable\"==e?cont(formaybeinof):pass(expression,expect(\";\"),forspec2)}function formaybeinof(e,t){return\"in\"==t||\"of\"==t?(m.marked=\"keyword\",cont(expression)):cont(maybeoperatorComma,forspec2)}function forspec2(e,t){return\";\"==e?cont(forspec3):\"in\"==t||\"of\"==t?(m.marked=\"keyword\",cont(expression)):pass(expression,expect(\";\"),forspec3)}function forspec3(e){\")\"!=e&&cont(expression)}function functiondef(e,t){return\"*\"==t?(m.marked=\"keyword\",cont(functiondef)):\"variable\"==e?(register(t),cont(functiondef)):\"(\"==e?cont(pushcontext,pushlex(\")\"),commasep(funarg,\")\"),poplex,mayberettype,statement,popcontext):a&&\"<\"==t?cont(pushlex(\">\"),commasep(typeparam,\">\"),poplex,functiondef):void 0}function funarg(e,t){return\"@\"==t&&cont(expression,funarg),\"spread\"==e?cont(funarg):a&&isModifier(t)?(m.marked=\"keyword\",cont(funarg)):pass(pattern,maybetype,maybeAssign)}function classExpression(e,t){return\"variable\"==e?className(e,t):classNameAfter(e,t)}function className(e,t){if(\"variable\"==e)return register(t),cont(classNameAfter)}function classNameAfter(e,t){return\"<\"==t?cont(pushlex(\">\"),commasep(typeparam,\">\"),poplex,classNameAfter):\"extends\"==t||\"implements\"==t||a&&\",\"==e?cont(a?typeexpr:expression,classNameAfter):\"{\"==e?cont(pushlex(\"}\"),classBody,poplex):void 0}function classBody(e,t){return\"async\"==e||\"variable\"==e&&(\"static\"==t||\"get\"==t||\"set\"==t||a&&isModifier(t))&&m.stream.match(/^\\s+[\\w$\\xa1-\\uffff]/,!1)?(m.marked=\"keyword\",cont(classBody)):\"variable\"==e||\"keyword\"==m.style?(m.marked=\"property\",cont(a?classfield:functiondef,classBody)):\"[\"==e?cont(expression,maybetype,expect(\"]\"),a?classfield:functiondef,classBody):\"*\"==t?(m.marked=\"keyword\",cont(classBody)):\";\"==e?cont(classBody):\"}\"==e?cont():\"@\"==t?cont(expression,classBody):void 0}function classfield(e,t){return\"?\"==t?cont(classfield):\":\"==e?cont(typeexpr,maybeAssign):\"=\"==t?cont(expressionNoComma):pass(functiondef)}function afterExport(e,t){return\"*\"==t?(m.marked=\"keyword\",cont(maybeFrom,expect(\";\"))):\"default\"==t?(m.marked=\"keyword\",cont(expression,expect(\";\"))):\"{\"==e?cont(commasep(exportField,\"}\"),maybeFrom,expect(\";\")):pass(statement)}function exportField(e,t){return\"as\"==t?(m.marked=\"keyword\",cont(expect(\"variable\"))):\"variable\"==e?pass(expressionNoComma,exportField):void 0}function afterImport(e){return\"string\"==e?cont():pass(importSpec,maybeMoreImports,maybeFrom)}function importSpec(e,t){return\"{\"==e?contCommasep(importSpec,\"}\"):(\"variable\"==e&&register(t),\"*\"==t&&(m.marked=\"keyword\"),cont(maybeAs))}function maybeMoreImports(e){if(\",\"==e)return cont(importSpec,maybeMoreImports)}function maybeAs(e,t){if(\"as\"==t)return m.marked=\"keyword\",cont(importSpec)}function maybeFrom(e,t){if(\"from\"==t)return m.marked=\"keyword\",cont(expression)}function arrayLiteral(e){return\"]\"==e?cont():pass(commasep(expressionNoComma,\"]\"))}function expressionAllowed(e,t,n){return t.tokenize==tokenBase&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\\[{}\\(,;:]|=>)$/.test(t.lastType)||\"quasi\"==t.lastType&&/\\{\\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return{startState:function(e){var t={tokenize:tokenBase,lastType:\"sof\",cc:[],lexical:new JSLexical((e||0)-r,0,\"block\",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:e||0};return n.globalVars&&\"object\"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty(\"align\")||(t.lexical.align=!1),t.indented=e.indentation(),findFatArrow(e,t)),t.tokenize!=tokenComment&&e.eatSpace())return null;var n=t.tokenize(e,t);return\"comment\"==p?n:(t.lastType=\"operator\"!=p||\"++\"!=h&&\"--\"!=h?p:\"incdec\",function parseJS(e,t,n,r,i){var o=e.cc;for(m.state=e,m.stream=i,m.marked=null,m.cc=o,m.style=t,e.lexical.hasOwnProperty(\"align\")||(e.lexical.align=!0);;)if((o.length?o.pop():s?expression:statement)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return m.marked?m.marked:\"variable\"==n&&inScope(e,r)?\"variable-2\":t}}(t,n,p,h,e))},indent:function(t,o){if(t.tokenize==tokenComment)return e.Pass;if(t.tokenize!=tokenBase)return 0;var s,a=o&&o.charAt(0),l=t.lexical;if(!/^\\s*else\\b/.test(o))for(var c=t.cc.length-1;c>=0;--c){var d=t.cc[c];if(d==poplex)l=l.prev;else if(d!=maybeelse)break}for(;(\"stat\"==l.type||\"form\"==l.type)&&(\"}\"==a||(s=t.cc[t.cc.length-1])&&(s==maybeoperatorComma||s==maybeoperatorNoComma)&&!/^[,\\.=+\\-*:?[\\(]/.test(o));)l=l.prev;i&&\")\"==l.type&&\"stat\"==l.prev.type&&(l=l.prev);var p=l.type,h=a==p;return\"vardef\"==p?l.indented+(\"operator\"==t.lastType||\",\"==t.lastType?l.info+1:0):\"form\"==p&&\"{\"==a?l.indented:\"form\"==p?l.indented+r:\"stat\"==p?l.indented+(function isContinuedStatement(e,t){return\"operator\"==e.lastType||\",\"==e.lastType||u.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,o)?i||r:0):\"switch\"!=l.info||h||0==n.doubleIndentSwitch?l.align?l.column+(h?0:1):l.indented+(h?0:r):l.indented+(/^(?:case|default)\\b/.test(o)?r:2*r)},electricInput:/^\\s*(?:case .*?:|default:|\\{|\\})$/,blockCommentStart:s?null:\"/*\",blockCommentEnd:s?null:\"*/\",blockCommentContinue:s?null:\" * \",lineComment:s?null:\"//\",fold:\"brace\",closeBrackets:\"()[]{}''\\\"\\\"``\",helperType:s?\"json\":\"javascript\",jsonldMode:o,jsonMode:s,expressionAllowed:expressionAllowed,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=expression&&t!=expressionNoComma||e.cc.pop()}}}),e.registerHelper(\"wordChars\",\"javascript\",/[\\w$]/),e.defineMIME(\"text/javascript\",\"javascript\"),e.defineMIME(\"text/ecmascript\",\"javascript\"),e.defineMIME(\"application/javascript\",\"javascript\"),e.defineMIME(\"application/x-javascript\",\"javascript\"),e.defineMIME(\"application/ecmascript\",\"javascript\"),e.defineMIME(\"application/json\",{name:\"javascript\",json:!0}),e.defineMIME(\"application/x-json\",{name:\"javascript\",json:!0}),e.defineMIME(\"application/ld+json\",{name:\"javascript\",jsonld:!0}),e.defineMIME(\"text/typescript\",{name:\"javascript\",typescript:!0}),e.defineMIME(\"application/typescript\",{name:\"javascript\",typescript:!0})})(n(410))},415:function(e,t,n){var r=n(416);\"string\"==typeof r&&(r=[[e.i,r,\"\"]]);var i={hmr:!0};i.transform=void 0;n(112)(r,i);r.locals&&(e.exports=r.locals)},416:function(e,t,n){(e.exports=n(111)(void 0)).push([e.i,\"/* BASICS */\\n\\n.CodeMirror {\\n  /* Set height, width, borders, and global font properties here */\\n  font-family: monospace;\\n  height: 300px;\\n  color: black;\\n  direction: ltr;\\n}\\n\\n/* PADDING */\\n\\n.CodeMirror-lines {\\n  padding: 4px 0; /* Vertical padding around content */\\n}\\n.CodeMirror pre {\\n  padding: 0 4px; /* Horizontal padding of content */\\n}\\n\\n.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\\n  background-color: white; /* The little square between H and V scrollbars */\\n}\\n\\n/* GUTTER */\\n\\n.CodeMirror-gutters {\\n  border-right: 1px solid #ddd;\\n  background-color: #f7f7f7;\\n  white-space: nowrap;\\n}\\n.CodeMirror-linenumbers {}\\n.CodeMirror-linenumber {\\n  padding: 0 3px 0 5px;\\n  min-width: 20px;\\n  text-align: right;\\n  color: #999;\\n  white-space: nowrap;\\n}\\n\\n.CodeMirror-guttermarker { color: black; }\\n.CodeMirror-guttermarker-subtle { color: #999; }\\n\\n/* CURSOR */\\n\\n.CodeMirror-cursor {\\n  border-left: 1px solid black;\\n  border-right: none;\\n  width: 0;\\n}\\n/* Shown when moving in bi-directional text */\\n.CodeMirror div.CodeMirror-secondarycursor {\\n  border-left: 1px solid silver;\\n}\\n.cm-fat-cursor .CodeMirror-cursor {\\n  width: auto;\\n  border: 0 !important;\\n  background: #7e7;\\n}\\n.cm-fat-cursor div.CodeMirror-cursors {\\n  z-index: 1;\\n}\\n.cm-fat-cursor-mark {\\n  background-color: rgba(20, 255, 20, 0.5);\\n  -webkit-animation: blink 1.06s steps(1) infinite;\\n  -moz-animation: blink 1.06s steps(1) infinite;\\n  animation: blink 1.06s steps(1) infinite;\\n}\\n.cm-animate-fat-cursor {\\n  width: auto;\\n  border: 0;\\n  -webkit-animation: blink 1.06s steps(1) infinite;\\n  -moz-animation: blink 1.06s steps(1) infinite;\\n  animation: blink 1.06s steps(1) infinite;\\n  background-color: #7e7;\\n}\\n@-moz-keyframes blink {\\n  0% {}\\n  50% { background-color: transparent; }\\n  100% {}\\n}\\n@-webkit-keyframes blink {\\n  0% {}\\n  50% { background-color: transparent; }\\n  100% {}\\n}\\n@keyframes blink {\\n  0% {}\\n  50% { background-color: transparent; }\\n  100% {}\\n}\\n\\n/* Can style cursor different in overwrite (non-insert) mode */\\n.CodeMirror-overwrite .CodeMirror-cursor {}\\n\\n.cm-tab { display: inline-block; text-decoration: inherit; }\\n\\n.CodeMirror-rulers {\\n  position: absolute;\\n  left: 0; right: 0; top: -50px; bottom: -20px;\\n  overflow: hidden;\\n}\\n.CodeMirror-ruler {\\n  border-left: 1px solid #ccc;\\n  top: 0; bottom: 0;\\n  position: absolute;\\n}\\n\\n/* DEFAULT THEME */\\n\\n.cm-s-default .cm-header {color: blue;}\\n.cm-s-default .cm-quote {color: #090;}\\n.cm-negative {color: #d44;}\\n.cm-positive {color: #292;}\\n.cm-header, .cm-strong {font-weight: bold;}\\n.cm-em {font-style: italic;}\\n.cm-link {text-decoration: underline;}\\n.cm-strikethrough {text-decoration: line-through;}\\n\\n.cm-s-default .cm-keyword {color: #708;}\\n.cm-s-default .cm-atom {color: #219;}\\n.cm-s-default .cm-number {color: #164;}\\n.cm-s-default .cm-def {color: #00f;}\\n.cm-s-default .cm-variable,\\n.cm-s-default .cm-punctuation,\\n.cm-s-default .cm-property,\\n.cm-s-default .cm-operator {}\\n.cm-s-default .cm-variable-2 {color: #05a;}\\n.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}\\n.cm-s-default .cm-comment {color: #a50;}\\n.cm-s-default .cm-string {color: #a11;}\\n.cm-s-default .cm-string-2 {color: #f50;}\\n.cm-s-default .cm-meta {color: #555;}\\n.cm-s-default .cm-qualifier {color: #555;}\\n.cm-s-default .cm-builtin {color: #30a;}\\n.cm-s-default .cm-bracket {color: #997;}\\n.cm-s-default .cm-tag {color: #170;}\\n.cm-s-default .cm-attribute {color: #00c;}\\n.cm-s-default .cm-hr {color: #999;}\\n.cm-s-default .cm-link {color: #00c;}\\n\\n.cm-s-default .cm-error {color: #f00;}\\n.cm-invalidchar {color: #f00;}\\n\\n.CodeMirror-composing { border-bottom: 2px solid; }\\n\\n/* Default styles for common addons */\\n\\ndiv.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}\\ndiv.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}\\n.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }\\n.CodeMirror-activeline-background {background: #e8f2ff;}\\n\\n/* STOP */\\n\\n/* The rest of this file contains styles related to the mechanics of\\n   the editor. You probably shouldn't touch them. */\\n\\n.CodeMirror {\\n  position: relative;\\n  overflow: hidden;\\n  background: white;\\n}\\n\\n.CodeMirror-scroll {\\n  overflow: scroll !important; /* Things will break if this is overridden */\\n  /* 30px is the magic margin used to hide the element's real scrollbars */\\n  /* See overflow: hidden in .CodeMirror */\\n  margin-bottom: -30px; margin-right: -30px;\\n  padding-bottom: 30px;\\n  height: 100%;\\n  outline: none; /* Prevent dragging from highlighting the element */\\n  position: relative;\\n}\\n.CodeMirror-sizer {\\n  position: relative;\\n  border-right: 30px solid transparent;\\n}\\n\\n/* The fake, visible scrollbars. Used to force redraw during scrolling\\n   before actual scrolling happens, thus preventing shaking and\\n   flickering artifacts. */\\n.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\\n  position: absolute;\\n  z-index: 6;\\n  display: none;\\n}\\n.CodeMirror-vscrollbar {\\n  right: 0; top: 0;\\n  overflow-x: hidden;\\n  overflow-y: scroll;\\n}\\n.CodeMirror-hscrollbar {\\n  bottom: 0; left: 0;\\n  overflow-y: hidden;\\n  overflow-x: scroll;\\n}\\n.CodeMirror-scrollbar-filler {\\n  right: 0; bottom: 0;\\n}\\n.CodeMirror-gutter-filler {\\n  left: 0; bottom: 0;\\n}\\n\\n.CodeMirror-gutters {\\n  position: absolute; left: 0; top: 0;\\n  min-height: 100%;\\n  z-index: 3;\\n}\\n.CodeMirror-gutter {\\n  white-space: normal;\\n  height: 100%;\\n  display: inline-block;\\n  vertical-align: top;\\n  margin-bottom: -30px;\\n}\\n.CodeMirror-gutter-wrapper {\\n  position: absolute;\\n  z-index: 4;\\n  background: none !important;\\n  border: none !important;\\n}\\n.CodeMirror-gutter-background {\\n  position: absolute;\\n  top: 0; bottom: 0;\\n  z-index: 4;\\n}\\n.CodeMirror-gutter-elt {\\n  position: absolute;\\n  cursor: default;\\n  z-index: 4;\\n}\\n.CodeMirror-gutter-wrapper ::selection { background-color: transparent }\\n.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }\\n\\n.CodeMirror-lines {\\n  cursor: text;\\n  min-height: 1px; /* prevents collapsing before first draw */\\n}\\n.CodeMirror pre {\\n  /* Reset some styles that the rest of the page might have set */\\n  -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;\\n  border-width: 0;\\n  background: transparent;\\n  font-family: inherit;\\n  font-size: inherit;\\n  margin: 0;\\n  white-space: pre;\\n  word-wrap: normal;\\n  line-height: inherit;\\n  color: inherit;\\n  z-index: 2;\\n  position: relative;\\n  overflow: visible;\\n  -webkit-tap-highlight-color: transparent;\\n  -webkit-font-variant-ligatures: contextual;\\n  font-variant-ligatures: contextual;\\n}\\n.CodeMirror-wrap pre {\\n  word-wrap: break-word;\\n  white-space: pre-wrap;\\n  word-break: normal;\\n}\\n\\n.CodeMirror-linebackground {\\n  position: absolute;\\n  left: 0; right: 0; top: 0; bottom: 0;\\n  z-index: 0;\\n}\\n\\n.CodeMirror-linewidget {\\n  position: relative;\\n  z-index: 2;\\n  padding: 0.1px; /* Force widget margins to stay inside of the container */\\n}\\n\\n.CodeMirror-widget {}\\n\\n.CodeMirror-rtl pre { direction: rtl; }\\n\\n.CodeMirror-code {\\n  outline: none;\\n}\\n\\n/* Force content-box sizing for the elements where we expect it */\\n.CodeMirror-scroll,\\n.CodeMirror-sizer,\\n.CodeMirror-gutter,\\n.CodeMirror-gutters,\\n.CodeMirror-linenumber {\\n  -moz-box-sizing: content-box;\\n  box-sizing: content-box;\\n}\\n\\n.CodeMirror-measure {\\n  position: absolute;\\n  width: 100%;\\n  height: 0;\\n  overflow: hidden;\\n  visibility: hidden;\\n}\\n\\n.CodeMirror-cursor {\\n  position: absolute;\\n  pointer-events: none;\\n}\\n.CodeMirror-measure pre { position: static; }\\n\\ndiv.CodeMirror-cursors {\\n  visibility: hidden;\\n  position: relative;\\n  z-index: 3;\\n}\\ndiv.CodeMirror-dragcursors {\\n  visibility: visible;\\n}\\n\\n.CodeMirror-focused div.CodeMirror-cursors {\\n  visibility: visible;\\n}\\n\\n.CodeMirror-selected { background: #d9d9d9; }\\n.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }\\n.CodeMirror-crosshair { cursor: crosshair; }\\n.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }\\n.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }\\n\\n.cm-searching {\\n  background-color: #ffa;\\n  background-color: rgba(255, 255, 0, .4);\\n}\\n\\n/* Used to force a border model for a node */\\n.cm-force-border { padding-right: .1px; }\\n\\n@media print {\\n  /* Hide the cursor when printing */\\n  .CodeMirror div.CodeMirror-cursors {\\n    visibility: hidden;\\n  }\\n}\\n\\n/* See issue #2901 */\\n.cm-tab-wrap-hack:after { content: ''; }\\n\\n/* Help users use markselection to safely style text background */\\nspan.CodeMirror-selectedtext { background: none; }\\n\",\"\"])},417:function(e,t,n){var r=n(418);\"string\"==typeof r&&(r=[[e.i,r,\"\"]]);var i={hmr:!0};i.transform=void 0;n(112)(r,i);r.locals&&(e.exports=r.locals)},418:function(e,t,n){(e.exports=n(111)(void 0)).push([e.i,\"/*\\n\\n    Name:       Base16 Default Light\\n    Author:     Chris Kempson (http://chriskempson.com)\\n\\n    CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)\\n    Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)\\n\\n*/\\n\\n.cm-s-base16-light.CodeMirror { background: #f5f5f5; color: #202020; }\\n.cm-s-base16-light div.CodeMirror-selected { background: #e0e0e0; }\\n.cm-s-base16-light .CodeMirror-line::selection, .cm-s-base16-light .CodeMirror-line > span::selection, .cm-s-base16-light .CodeMirror-line > span > span::selection { background: #e0e0e0; }\\n.cm-s-base16-light .CodeMirror-line::-moz-selection, .cm-s-base16-light .CodeMirror-line > span::-moz-selection, .cm-s-base16-light .CodeMirror-line > span > span::-moz-selection { background: #e0e0e0; }\\n.cm-s-base16-light .CodeMirror-gutters { background: #f5f5f5; border-right: 0px; }\\n.cm-s-base16-light .CodeMirror-guttermarker { color: #ac4142; }\\n.cm-s-base16-light .CodeMirror-guttermarker-subtle { color: #b0b0b0; }\\n.cm-s-base16-light .CodeMirror-linenumber { color: #b0b0b0; }\\n.cm-s-base16-light .CodeMirror-cursor { border-left: 1px solid #505050; }\\n\\n.cm-s-base16-light span.cm-comment { color: #8f5536; }\\n.cm-s-base16-light span.cm-atom { color: #aa759f; }\\n.cm-s-base16-light span.cm-number { color: #aa759f; }\\n\\n.cm-s-base16-light span.cm-property, .cm-s-base16-light span.cm-attribute { color: #90a959; }\\n.cm-s-base16-light span.cm-keyword { color: #ac4142; }\\n.cm-s-base16-light span.cm-string { color: #f4bf75; }\\n\\n.cm-s-base16-light span.cm-variable { color: #90a959; }\\n.cm-s-base16-light span.cm-variable-2 { color: #6a9fb5; }\\n.cm-s-base16-light span.cm-def { color: #d28445; }\\n.cm-s-base16-light span.cm-bracket { color: #202020; }\\n.cm-s-base16-light span.cm-tag { color: #ac4142; }\\n.cm-s-base16-light span.cm-link { color: #aa759f; }\\n.cm-s-base16-light span.cm-error { background: #ac4142; color: #505050; }\\n\\n.cm-s-base16-light .CodeMirror-activeline-background { background: #DDDCDC; }\\n.cm-s-base16-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }\\n\",\"\"])}});"
  },
  {
    "path": "docs/build/bundle.a71e23e0.js",
    "content": "!function(e){var t=window.webpackJsonp;window.webpackJsonp=function webpackJsonpCallback(n,i,a){for(var o,s,l=0,u=[];l<n.length;l++)s=n[l],r[s]&&u.push(r[s][0]),r[s]=0;for(o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o]);for(t&&t(n,i,a);u.length;)u.shift()()};var n={},r={1:0};function __webpack_require__(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,__webpack_require__),r.l=!0,r.exports}__webpack_require__.e=function requireEnsure(e){var t=r[e];if(0===t)return new Promise(function(e){e()});if(t)return t[2];var n=new Promise(function(n,i){t=r[e]=[n,i]});t[2]=n;var i=document.getElementsByTagName(\"head\")[0],a=document.createElement(\"script\");a.type=\"text/javascript\",a.charset=\"utf-8\",a.async=!0,a.timeout=12e4,__webpack_require__.nc&&a.setAttribute(\"nonce\",__webpack_require__.nc),a.src=__webpack_require__.p+\"build/\"+({}[e]||e)+\".\"+{0:\"6e57cfb5\"}[e]+\".js\";var o=setTimeout(onScriptComplete,12e4);a.onerror=a.onload=onScriptComplete;function onScriptComplete(){a.onerror=a.onload=null,clearTimeout(o);var t=r[e];0!==t&&(t&&t[1](new Error(\"Loading chunk \"+e+\" failed.\")),r[e]=void 0)}return i.appendChild(a),n},__webpack_require__.m=e,__webpack_require__.c=n,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(e){var t=e&&e.__esModule?function getDefault(){return e.default}:function getModuleExports(){return e};return __webpack_require__.d(t,\"a\",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p=\"\",__webpack_require__.oe=function(e){throw console.error(e),e},__webpack_require__(__webpack_require__.s=114)}([function(e,t,n){\"use strict\";e.exports=n(124)},function(e,t,n){e.exports=n(137)()},function(e,t,n){\"use strict\";var r=n(140);n.d(t,\"a\",function(){return r.a})},function(e,t,n){var r=n(64),i=\"object\"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function(\"return this\")();e.exports=a},function(e,t){e.exports=function isObject(e){var t=typeof e;return null!=e&&(\"object\"==t||\"function\"==t)}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r;!function(){\"use strict\";var n={}.hasOwnProperty;function classNames(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if(\"string\"===i||\"number\"===i)e.push(r);else if(Array.isArray(r))e.push(classNames.apply(null,r));else if(\"object\"===i)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(\" \")}void 0!==e&&e.exports?e.exports=classNames:void 0===(r=function(){return classNames}.apply(t,[]))||(e.exports=r)}()},function(e,t){var n;n=function(){return this}();try{n=n||Function(\"return this\")()||(0,eval)(\"this\")}catch(e){\"object\"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function isObjectLike(e){return null!=e&&\"object\"==typeof e}},function(e,t,n){\"use strict\";var r=function(){};e.exports=r},function(e,t,n){\"use strict\";var r=n(248);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";e.exports=function requireInRuntime(e,t){if(!(t in e))throw new Error('require() statements can be added only by editing a Markdown example file: require(\"'+t+'\")');return e[t]}},function(e,t,n){\"use strict\";e.exports=function evalInContext(e,t,n){return new Function(\"require\",\"state\",\"setState\",\"__setInitialState\",e+n).bind(null,t)}},function(e,t,n){var r=n(154),i=n(159);e.exports=function getNative(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(24),i=n(155),a=n(156),o=\"[object Null]\",s=\"[object Undefined]\",l=r?r.toStringTag:void 0;e.exports=function baseGetTag(e){return null==e?void 0===e?s:o:l&&l in Object(e)?i(e):a(e)}},function(e,t,n){var r=n(35),i=n(39);e.exports=function isArrayLike(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=\"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},a=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}(),o=_interopRequireDefault(n(9)),s=_interopRequireDefault(n(46)),l=_interopRequireDefault(n(47));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var u=function(){function StyleRule(e,t,n){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,StyleRule),this.type=\"style\",this.isProcessed=!1;var r=n.sheet,i=n.Renderer,a=n.selector;this.key=e,this.options=n,this.style=t,a&&(this.selectorText=a),this.renderer=r?r.renderer:new i}return a(StyleRule,[{key:\"prop\",value:function prop(e,t){if(null!=t){if(this.style[e]!==t)if(t=this.options.jss.plugins.onChangeValue(t,e,this),this.style[e]=t,this.renderable)this.renderer.setStyle(this.renderable,e,t);else{var n=this.options.sheet;n&&n.attached&&(0,o.default)(!1,'Rule is not linked. Missing sheet option \"link: true\".')}return this}return this.style[e]}},{key:\"applyTo\",value:function applyTo(e){var t=this.toJSON();for(var n in t)this.renderer.setStyle(e,n,t[n]);return this}},{key:\"toJSON\",value:function toJSON(){var e={};for(var t in this.style){var n=this.style[t];\"object\"!==(void 0===n?\"undefined\":i(n))?e[t]=n:Array.isArray(n)&&(e[t]=(0,l.default)(n))}return e}},{key:\"toString\",value:function toString(e){var t=this.options.sheet,n=!!t&&t.options.link?r({},e,{allowEmpty:!0}):e;return(0,s.default)(this.selector,this.style,n)}},{key:\"selector\",set:function set(e){if(e!==this.selectorText&&(this.selectorText=e,this.renderable)){if(!this.renderer.setSelector(this.renderable,e)&&this.renderable){var t=this.renderer.replaceRule(this.renderable,this);t&&(this.renderable=t)}}},get:function get(){return this.selectorText}}]),StyleRule}();t.default=u},function(e,t,n){\"use strict\";n.d(t,\"a\",function(){return r});var r=Object.freeze({all:\"all\",section:\"section\",component:\"component\",example:\"example\"})},function(e,t){e.exports=function eq(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}(),a=_interopRequireDefault(n(29)),o=_interopRequireDefault(n(77)),s=_interopRequireDefault(n(16)),l=_interopRequireDefault(n(208));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var u=function(){function RuleList(e){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,RuleList),this.map={},this.raw={},this.index=[],this.options=e,this.classes=e.classes}return i(RuleList,[{key:\"add\",value:function add(e,t,n){var i=this.options,o=i.parent,u=i.sheet,c=i.jss,p=i.Renderer,h=i.generateClassName;!(n=r({classes:this.classes,parent:o,sheet:u,jss:c,Renderer:p,generateClassName:h},n)).selector&&this.classes[e]&&(n.selector=\".\"+(0,l.default)(this.classes[e])),this.raw[e]=t;var f=(0,a.default)(e,t,n),d=void 0;!n.selector&&f instanceof s.default&&(d=h(f,u),f.selector=\".\"+(0,l.default)(d)),this.register(f,d);var m=void 0===n.index?this.index.length:n.index;return this.index.splice(m,0,f),f}},{key:\"get\",value:function get(e){return this.map[e]}},{key:\"remove\",value:function remove(e){this.unregister(e),this.index.splice(this.indexOf(e),1)}},{key:\"indexOf\",value:function indexOf(e){return this.index.indexOf(e)}},{key:\"process\",value:function process(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)}},{key:\"register\",value:function register(e,t){this.map[e.key]=e,e instanceof s.default&&(this.map[e.selector]=e,t&&(this.classes[e.key]=t))}},{key:\"unregister\",value:function unregister(e){delete this.map[e.key],e instanceof s.default&&(delete this.map[e.selector],delete this.classes[e.key])}},{key:\"update\",value:function update(e,t){var n=this.options,r=n.jss.plugins,i=n.sheet;if(\"string\"!=typeof e)for(var a=0;a<this.index.length;a++)r.onUpdate(e,this.index[a],i);else r.onUpdate(t,this.get(e),i)}},{key:\"link\",value:function link(e){for(var t=this.options.sheet.renderer.getUnescapedKeysMap(this.index),n=0;n<e.length;n++){var r=e[n],i=this.options.sheet.renderer.getKey(r);t[i]&&(i=t[i]);var a=this.map[i];a&&(0,o.default)(a,r)}}},{key:\"toString\",value:function toString(e){for(var t=\"\",n=this.options.sheet,r=!!n&&n.options.link,i=0;i<this.index.length;i++){var a=this.index[i].toString(e);(a||r)&&(t&&(t+=\"\\n\"),t+=a)}return t}}]),RuleList}();t.default=u},function(e,t,n){\"use strict\";n(385);var r=n(106);n.d(t,\"a\",function(){return r.GenericList});var i=n(105);n.d(t,\"b\",function(){return i.SFCCounter});var a=n(107);n.d(t,\"c\",function(){return a.SFCSpreadAttributes});var o=n(108);n.d(t,\"d\",function(){return o.StatefulCounter});var s=n(109);n.d(t,\"e\",function(){return s.StatefulCounterWithDefault});n(59),n(60)},function(e,t,n){\"use strict\";function makeEmptyFunction(e){return function(){return e}}var r=function emptyFunction(){};r.thatReturns=makeEmptyFunction,r.thatReturnsFalse=makeEmptyFunction(!1),r.thatReturnsTrue=makeEmptyFunction(!0),r.thatReturnsNull=makeEmptyFunction(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){var r=n(144),i=n(145),a=n(146),o=n(147),s=n(148);function ListCache(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ListCache.prototype.clear=r,ListCache.prototype.delete=i,ListCache.prototype.get=a,ListCache.prototype.has=o,ListCache.prototype.set=s,e.exports=ListCache},function(e,t,n){var r=n(18);e.exports=function assocIndexOf(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(3).Symbol;e.exports=r},function(e,t,n){var r=n(13)(Object,\"create\");e.exports=r},function(e,t,n){var r=n(168);e.exports=function getMapData(e,t){var n=e.__data__;return r(t)?n[\"string\"==typeof t?\"string\":\"hash\"]:n.map}},function(e,t,n){var r=n(67);e.exports=function baseAssignValue(e,t,n){\"__proto__\"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,\"loaded\",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,\"id\",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function createRule(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"unnamed\",t=arguments[1],n=arguments[2],o=n.jss,s=(0,a.default)(t),l=o.plugins.onCreateRule(e,s,n);if(l)return l;\"@\"===e[0]&&(0,r.default)(!1,\"[JSS] Unknown at-rule %s\",e);return new i.default(e,s,n)};var r=_interopRequireDefault(n(9)),i=_interopRequireDefault(n(16)),a=_interopRequireDefault(n(204));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){var r=n(14),i=n(8),a=\"[object Symbol]\";e.exports=function isSymbol(e){return\"symbol\"==typeof e||i(e)&&r(e)==a}},function(e,t,n){var r=n(30),i=1/0;e.exports=function toKey(e){if(\"string\"==typeof e||r(e))return e;var t=e+\"\";return\"0\"==t&&1/e==-i?\"-0\":t}},function(e,t,n){\"use strict\";n.d(t,\"b\",function(){return l}),n.d(t,\"a\",function(){return u});var r=n(134),i=n(238),a=n(309),o=n(313),s=n(315),l=\"rsg-code-editor\",u=\"rsg-usage\",c=[a.a];t.c={sectionToolbar:c,componentToolbar:c,exampleToolbar:c,exampleTabButtons:[{id:l,render:o.a}],exampleTabs:[{id:l,render:r.a}],docsTabButtons:[{id:u,render:s.a}],docsTabs:[{id:u,render:i.a}]}},function(e,t,n){var r=n(22),i=n(149),a=n(150),o=n(151),s=n(152),l=n(153);function Stack(e){var t=this.__data__=new r(e);this.size=t.size}Stack.prototype.clear=i,Stack.prototype.delete=a,Stack.prototype.get=o,Stack.prototype.has=s,Stack.prototype.set=l,e.exports=Stack},function(e,t,n){var r=n(13)(n(3),\"Map\");e.exports=r},function(e,t,n){var r=n(14),i=n(4),a=\"[object AsyncFunction]\",o=\"[object Function]\",s=\"[object GeneratorFunction]\",l=\"[object Proxy]\";e.exports=function isFunction(e){if(!i(e))return!1;var t=r(e);return t==o||t==s||t==a||t==l}},function(e,t,n){var r=n(160),i=n(167),a=n(169),o=n(170),s=n(171);function MapCache(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}MapCache.prototype.clear=r,MapCache.prototype.delete=i,MapCache.prototype.get=a,MapCache.prototype.has=o,MapCache.prototype.set=s,e.exports=MapCache},function(e,t){var n=Object.prototype;e.exports=function isPrototype(e){var t=e&&e.constructor;return e===(\"function\"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(180),i=n(8),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&o.call(e,\"callee\")&&!s.call(e,\"callee\")};e.exports=l},function(e,t){var n=9007199254740991;e.exports=function isLength(e){return\"number\"==typeof e&&e>-1&&e%1==0&&e<=n}},function(e,t,n){(function(e){var r=n(3),i=n(182),a=\"object\"==typeof t&&t&&!t.nodeType&&t,o=a&&\"object\"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===a?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||i;e.exports=l}).call(t,n(28)(e))},function(e,t,n){var r=n(184),i=n(185),a=n(186),o=a&&a.isTypedArray,s=o?i(o):r;e.exports=s},function(e,t){var n=9007199254740991,r=/^(?:0|[1-9]\\d*)$/;e.exports=function isIndex(e,t){return!!(t=null==t?n:t)&&(\"number\"==typeof e||r.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t){e.exports=function identity(e){return e}},function(e,t,n){var r=n(36),i=\"Expected a function\";function memoize(e,t){if(\"function\"!=typeof e||null!=t&&\"function\"!=typeof t)throw new TypeError(i);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(memoize.Cache||r),n}memoize.Cache=r,e.exports=memoize},function(e,t,n){\"use strict\";var r=n(74),i=(n.n(r),n(224)),a=n.n(i),o=n(225),s=n.n(o),l=n(228),u=n.n(l),c=n(229),p=n.n(c),h=n(230),f=n.n(h),d=n(232),m=n.n(d),g=n(233),y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v=Object(r.create)({createGenerateClassName:function createGenerateClassName(){var e=0;return function(t){return\"rsg--\"+t.key+\"-\"+e++}},plugins:[a()(),s()({reset:y({},g.a,{boxSizing:\"border-box\",color:\"inherit\",fontFamily:\"inherit\",lineHeight:\"inherit\",fontSize:\"inherit\"})}),u()(),p()(),f()(),m()()]});t.a=v},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function toCss(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=\"\";if(!t)return i;var a=n.indent,o=void 0===a?0:a,s=t.fallbacks;if(o++,s)if(Array.isArray(s))for(var l=0;l<s.length;l++){var u=s[l];for(var c in u){var p=u[c];null!=p&&(i+=\"\\n\"+indentStr(c+\": \"+(0,r.default)(p)+\";\",o))}}else for(var h in s){var f=s[h];null!=f&&(i+=\"\\n\"+indentStr(h+\": \"+(0,r.default)(f)+\";\",o))}for(var d in t){var m=t[d];null!=m&&\"fallbacks\"!==d&&(i+=\"\\n\"+indentStr(d+\": \"+(0,r.default)(m)+\";\",o))}return i||n.allowEmpty?i=indentStr(e+\" {\"+i+\"\\n\",--o)+indentStr(\"}\",o):i};var r=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(47));function indentStr(e,t){for(var n=\"\",r=0;r<t;r++)n+=\"  \";return n+e}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function toCssValue(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!Array.isArray(e))return e;var n=\"\";if(Array.isArray(e[0]))for(var i=0;i<e.length&&\"!important\"!==e[i];i++)n&&(n+=\", \"),n+=r(e[i],\" \");else n=r(e,\", \");t||\"!important\"!==e[e.length-1]||(n+=\" !important\");return n};var r=function join(e,t){for(var n=\"\",r=0;r<e.length&&\"!important\"!==e[r];r++)n&&(n+=t),n+=e[r];return n}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(75));t.default=new r.default},function(e,t,n){\"use strict\";var r=n(247);n.d(t,\"a\",function(){return r.a})},function(e,t,n){var r=n(73),i=n(252),a=n(15);e.exports=function keys(e){return a(e)?r(e):i(e)}},function(e,t,n){var r=n(5),i=n(30),a=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,o=/^\\w*$/;e.exports=function isKey(e,t){if(r(e))return!1;var n=typeof e;return!(\"number\"!=n&&\"symbol\"!=n&&\"boolean\"!=n&&null!=e&&!i(e))||o.test(e)||!a.test(e)||null!=t&&e in Object(t)}},function(e,t,n){\"use strict\";var r=n(292);n.d(t,\"a\",function(){return r.a}),n.d(t,\"b\",function(){return r.b})},function(e,t,n){\"use strict\";var r=n(295);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(298);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(299);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(301);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=_interopRequireDefault(n(0)),a=_interopRequireDefault(n(1));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var o=function IconBase(e,t){var n=e.children,a=e.color,o=e.size,s=e.style,l=e.width,u=e.height,c=function _objectWithoutProperties(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,[\"children\",\"color\",\"size\",\"style\",\"width\",\"height\"]),p=t.reactIconBase,h=void 0===p?{}:p,f=o||h.size||\"1em\";return i.default.createElement(\"svg\",r({children:n,fill:\"currentColor\",preserveAspectRatio:\"xMidYMid meet\",height:u||f,width:l||f},h,c,{style:r({verticalAlign:\"middle\",color:a||h.color},h.style||{},s)}))};o.propTypes={color:a.default.string,size:a.default.oneOfType([a.default.string,a.default.number]),width:a.default.oneOfType([a.default.string,a.default.number]),height:a.default.oneOfType([a.default.string,a.default.number]),style:a.default.object},o.contextTypes={reactIconBase:a.default.shape(o.propTypes)},t.default=o,e.exports=t.default},function(e,t,n){\"use strict\";var r=n(342);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(0);n.n(r);t.NameProvider=class extends r.Component{constructor(){super(...arguments),this.state={name:\"Piotr\"}}render(){return this.props.children(this.state)}}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(0);n.n(r);t.MouseProvider=class extends r.Component{constructor(){super(...arguments),this.state={x:0,y:0},this.handleMouseMove=(e=>{this.setState({x:e.clientX,y:e.clientY})})}render(){return r.createElement(\"div\",{style:{height:\"100%\"},onMouseMove:this.handleMouseMove},this.props.render(this.state))}}},function(e,t,n){\"use strict\";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function shouldUseNative(){try{if(!Object.assign)return!1;var e=new String(\"abc\");if(e[5]=\"de\",\"5\"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t[\"_\"+String.fromCharCode(n)]=n;if(\"0123456789\"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(\"\"))return!1;var r={};return\"abcdefghijklmnopqrst\".split(\"\").forEach(function(e){r[e]=e}),\"abcdefghijklmnopqrst\"===Object.keys(Object.assign({},r)).join(\"\")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,o,s=function toObject(e){if(null===e||void 0===e)throw new TypeError(\"Object.assign cannot be called with null or undefined\");return Object(e)}(e),l=1;l<arguments.length;l++){n=Object(arguments[l]);for(var u in n)i.call(n,u)&&(s[u]=n[u]);if(r){o=r(n);for(var c=0;c<o.length;c++)a.call(n,o[c])&&(s[o[c]]=n[o[c]])}}return s}},function(e,t,n){\"use strict\";var r={};e.exports=r},function(e,t,n){\"use strict\";function checkDCE(){if(\"undefined\"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&\"function\"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(e){console.error(e)}}}checkDCE(),e.exports=n(125)},function(e,t,n){(function(t){var n=\"object\"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,n(7))},function(e,t){var n=Function.prototype.toString;e.exports=function toSource(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+\"\"}catch(e){}}return\"\"}},function(e,t,n){var r=n(27),i=n(18);e.exports=function assignMergeValue(e,t,n){(void 0===n||i(e[t],n))&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(13),i=function(){try{var e=r(Object,\"defineProperty\");return e({},\"\",{}),e}catch(e){}}();e.exports=i},function(e,t,n){var r=n(172)();e.exports=r},function(e,t,n){var r=n(3).Uint8Array;e.exports=r},function(e,t,n){var r=n(71)(Object.getPrototypeOf,Object);e.exports=r},function(e,t){e.exports=function overArg(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(73),i=n(191),a=n(15);e.exports=function keysIn(e){return a(e)?r(e,!0):i(e)}},function(e,t,n){var r=n(190),i=n(38),a=n(5),o=n(40),s=n(42),l=n(41),u=Object.prototype.hasOwnProperty;e.exports=function arrayLikeKeys(e,t){var n=a(e),c=!n&&i(e),p=!n&&!c&&o(e),h=!n&&!c&&!p&&l(e),f=n||c||p||h,d=f?r(e.length,String):[],m=d.length;for(var g in e)!t&&!u.call(e,g)||f&&(\"length\"==g||p&&(\"offset\"==g||\"parent\"==g)||h&&(\"buffer\"==g||\"byteLength\"==g||\"byteOffset\"==g)||s(g,m))||d.push(g);return d}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.create=t.createGenerateClassName=t.sheets=t.RuleList=t.SheetsManager=t.SheetsRegistry=t.getDynamicStyles=void 0;var r=n(202);Object.defineProperty(t,\"getDynamicStyles\",{enumerable:!0,get:function get(){return _interopRequireDefault(r).default}});var i=n(75);Object.defineProperty(t,\"SheetsRegistry\",{enumerable:!0,get:function get(){return _interopRequireDefault(i).default}});var a=n(203);Object.defineProperty(t,\"SheetsManager\",{enumerable:!0,get:function get(){return _interopRequireDefault(a).default}});var o=n(19);Object.defineProperty(t,\"RuleList\",{enumerable:!0,get:function get(){return _interopRequireDefault(o).default}});var s=n(48);Object.defineProperty(t,\"sheets\",{enumerable:!0,get:function get(){return _interopRequireDefault(s).default}});var l=n(78);Object.defineProperty(t,\"createGenerateClassName\",{enumerable:!0,get:function get(){return _interopRequireDefault(l).default}});var u=_interopRequireDefault(n(210));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var c=t.create=function create(e){return new u.default(e)};t.default=c()},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}();var i=function(){function SheetsRegistry(){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,SheetsRegistry),this.registry=[]}return r(SheetsRegistry,[{key:\"add\",value:function add(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)}},{key:\"reset\",value:function reset(){this.registry=[]}},{key:\"remove\",value:function remove(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)}},{key:\"toString\",value:function toString(e){return this.registry.filter(function(e){return e.attached}).map(function(t){return t.toString(e)}).join(\"\\n\")}},{key:\"index\",get:function get(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),SheetsRegistry}();t.default=i},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(205));t.default=function(e){return e&&e[r.default]&&e===e[r.default]()}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function linkRule(e,t){e.renderable=t,e.rules&&t.cssRules&&e.rules.link(t.cssRules)}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=_interopRequireDefault(n(9)),i=(_interopRequireDefault(n(79)),_interopRequireDefault(n(209)));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}t.default=function(){var e=0;return function(t,n){(e+=1)>1e10&&(0,r.default)(!1,\"[JSS] You might have a memory leak. Rule counter is at %s.\",e);var a=\"c\",o=\"\";return n&&(a=n.options.classNamePrefix||\"c\",null!=n.options.jss.id&&(o+=n.options.jss.id)),\"\"+a+i.default+o+e}}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}(),a=_interopRequireDefault(n(77)),o=_interopRequireDefault(n(19));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var s=function(){function StyleSheet(e,t){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,StyleSheet),this.attached=!1,this.deployed=!1,this.linked=!1,this.classes={},this.options=r({},t,{sheet:this,parent:this,classes:this.classes}),this.renderer=new t.Renderer(this),this.rules=new o.default(this.options);for(var n in e)this.rules.add(n,e[n]);this.rules.process()}return i(StyleSheet,[{key:\"attach\",value:function attach(){return this.attached?this:(this.deployed||this.deploy(),this.renderer.attach(),!this.linked&&this.options.link&&this.link(),this.attached=!0,this)}},{key:\"detach\",value:function detach(){return this.attached?(this.renderer.detach(),this.attached=!1,this):this}},{key:\"addRule\",value:function addRule(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)}},{key:\"insertRule\",value:function insertRule(e){var t=this.renderer.insertRule(e);t&&this.options.link&&(0,a.default)(e,t)}},{key:\"addRules\",value:function addRules(e,t){var n=[];for(var r in e)n.push(this.addRule(r,e[r],t));return n}},{key:\"getRule\",value:function getRule(e){return this.rules.get(e)}},{key:\"deleteRule\",value:function deleteRule(e){var t=this.rules.get(e);return!!t&&(this.rules.remove(t),!this.attached||!t.renderable||this.renderer.deleteRule(t.renderable))}},{key:\"indexOf\",value:function indexOf(e){return this.rules.indexOf(e)}},{key:\"deploy\",value:function deploy(){return this.renderer.deploy(),this.deployed=!0,this}},{key:\"link\",value:function link(){var e=this.renderer.getRules();return e&&this.rules.link(e),this.linked=!0,this}},{key:\"update\",value:function update(e,t){return this.rules.update(e,t),this}},{key:\"toString\",value:function toString(e){return this.rules.toString(e)}}]),StyleSheet}();t.default=s},function(e,t,n){var r=n(0),i=n(1);function Group(e){var t=e.children?function castArray(e){return Array.isArray(e)?e:[e]}(e.children):[],n=t=t.filter(function(e){return!!e}),i=e.separator,a=r.isValidElement(i);return t.length>1&&(n=[t.shift()],t.forEach(function(e,t){if(a){var o=\"separator-\"+(e.key||t);i=r.cloneElement(i,{key:o})}return n.push(i,e)})),r.createElement(e.inline?\"span\":\"div\",{className:e.className},n)}Group.propTypes={children:i.node,inline:i.bool,separator:i.node,className:i.string},Group.defaultProps={separator:\" \"},e.exports=Group},function(e,t,n){\"use strict\";(function(e){var r=n(243),i=n(244),a=n(245);t.Buffer=Buffer,t.SlowBuffer=function SlowBuffer(e){+e!=e&&(e=0);return Buffer.alloc(+e)},t.INSPECT_MAX_BYTES=50,Buffer.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function typedArraySupport(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&\"function\"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=kMaxLength();function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(e,t){if(kMaxLength()<t)throw new RangeError(\"Invalid typed array length\");return Buffer.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Buffer.prototype:(null===e&&(e=new Buffer(t)),e.length=t),e}function Buffer(e,t,n){if(!(Buffer.TYPED_ARRAY_SUPPORT||this instanceof Buffer))return new Buffer(e,t,n);if(\"number\"==typeof e){if(\"string\"==typeof t)throw new Error(\"If encoding is specified then the first argument must be a string\");return allocUnsafe(this,e)}return from(this,e,t,n)}Buffer.poolSize=8192,Buffer._augment=function(e){return e.__proto__=Buffer.prototype,e};function from(e,t,n,r){if(\"number\"==typeof t)throw new TypeError('\"value\" argument must not be a number');return\"undefined\"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function fromArrayBuffer(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError(\"'offset' is out of bounds\");if(t.byteLength<n+(r||0))throw new RangeError(\"'length' is out of bounds\");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);Buffer.TYPED_ARRAY_SUPPORT?(e=t).__proto__=Buffer.prototype:e=fromArrayLike(e,t);return e}(e,t,n,r):\"string\"==typeof t?function fromString(e,t,n){\"string\"==typeof n&&\"\"!==n||(n=\"utf8\");if(!Buffer.isEncoding(n))throw new TypeError('\"encoding\" must be a valid string encoding');var r=0|byteLength(t,n),i=(e=createBuffer(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function fromObject(e,t){if(Buffer.isBuffer(t)){var n=0|checked(t.length);return 0===(e=createBuffer(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if(\"undefined\"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||\"length\"in t)return\"number\"!=typeof t.length||function isnan(e){return e!=e}(t.length)?createBuffer(e,0):fromArrayLike(e,t);if(\"Buffer\"===t.type&&a(t.data))return fromArrayLike(e,t.data)}throw new TypeError(\"First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.\")}(e,t)}Buffer.from=function(e,t,n){return from(null,e,t,n)},Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,\"undefined\"!=typeof Symbol&&Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0}));function assertSize(e){if(\"number\"!=typeof e)throw new TypeError('\"size\" argument must be a number');if(e<0)throw new RangeError('\"size\" argument must not be negative')}Buffer.alloc=function(e,t,n){return function alloc(e,t,n,r){return assertSize(t),t<=0?createBuffer(e,t):void 0!==n?\"string\"==typeof r?createBuffer(e,t).fill(n,r):createBuffer(e,t).fill(n):createBuffer(e,t)}(null,e,t,n)};function allocUnsafe(e,t){if(assertSize(t),e=createBuffer(e,t<0?0:0|checked(t)),!Buffer.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}Buffer.allocUnsafe=function(e){return allocUnsafe(null,e)},Buffer.allocUnsafeSlow=function(e){return allocUnsafe(null,e)};function fromArrayLike(e,t){var n=t.length<0?0:0|checked(t.length);e=createBuffer(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function checked(e){if(e>=kMaxLength())throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+kMaxLength().toString(16)+\" bytes\");return 0|e}Buffer.isBuffer=function isBuffer(e){return!(null==e||!e._isBuffer)},Buffer.compare=function compare(e,t){if(!Buffer.isBuffer(e)||!Buffer.isBuffer(t))throw new TypeError(\"Arguments must be Buffers\");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},Buffer.isEncoding=function isEncoding(e){switch(String(e).toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"latin1\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return!0;default:return!1}},Buffer.concat=function concat(e,t){if(!a(e))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===e.length)return Buffer.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=Buffer.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!Buffer.isBuffer(o))throw new TypeError('\"list\" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r};function byteLength(e,t){if(Buffer.isBuffer(e))return e.length;if(\"undefined\"!=typeof ArrayBuffer&&\"function\"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;\"string\"!=typeof e&&(e=\"\"+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case\"ascii\":case\"latin1\":case\"binary\":return n;case\"utf8\":case\"utf-8\":case void 0:return utf8ToBytes(e).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*n;case\"hex\":return n>>>1;case\"base64\":return base64ToBytes(e).length;default:if(r)return utf8ToBytes(e).length;t=(\"\"+t).toLowerCase(),r=!0}}Buffer.byteLength=byteLength;Buffer.prototype._isBuffer=!0;function swap(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}Buffer.prototype.swap16=function swap16(){var e=this.length;if(e%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(var t=0;t<e;t+=2)swap(this,t,t+1);return this},Buffer.prototype.swap32=function swap32(){var e=this.length;if(e%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(var t=0;t<e;t+=4)swap(this,t,t+3),swap(this,t+1,t+2);return this},Buffer.prototype.swap64=function swap64(){var e=this.length;if(e%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(var t=0;t<e;t+=8)swap(this,t,t+7),swap(this,t+1,t+6),swap(this,t+2,t+5),swap(this,t+3,t+4);return this},Buffer.prototype.toString=function toString(){var e=0|this.length;return 0===e?\"\":0===arguments.length?utf8Slice(this,0,e):function slowToString(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return\"\";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return\"\";if((n>>>=0)<=(t>>>=0))return\"\";for(e||(e=\"utf8\");;)switch(e){case\"hex\":return hexSlice(this,t,n);case\"utf8\":case\"utf-8\":return utf8Slice(this,t,n);case\"ascii\":return asciiSlice(this,t,n);case\"latin1\":case\"binary\":return latin1Slice(this,t,n);case\"base64\":return base64Slice(this,t,n);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return utf16leSlice(this,t,n);default:if(r)throw new TypeError(\"Unknown encoding: \"+e);e=(e+\"\").toLowerCase(),r=!0}}.apply(this,arguments)},Buffer.prototype.equals=function equals(e){if(!Buffer.isBuffer(e))throw new TypeError(\"Argument must be a Buffer\");return this===e||0===Buffer.compare(this,e)},Buffer.prototype.inspect=function inspect(){var e=\"\",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString(\"hex\",0,n).match(/.{2}/g).join(\" \"),this.length>n&&(e+=\" ... \")),\"<Buffer \"+e+\">\"},Buffer.prototype.compare=function compare(e,t,n,r,i){if(!Buffer.isBuffer(e))throw new TypeError(\"Argument must be a Buffer\");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError(\"out of range index\");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var a=i-r,o=n-t,s=Math.min(a,o),l=this.slice(r,i),u=e.slice(t,n),c=0;c<s;++c)if(l[c]!==u[c]){a=l[c],o=u[c];break}return a<o?-1:o<a?1:0};function bidirectionalIndexOf(e,t,n,r,i){if(0===e.length)return-1;if(\"string\"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if(\"string\"==typeof t&&(t=Buffer.from(t,r)),Buffer.isBuffer(t))return 0===t.length?-1:arrayIndexOf(e,t,n,r,i);if(\"number\"==typeof t)return t&=255,Buffer.TYPED_ARRAY_SUPPORT&&\"function\"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):arrayIndexOf(e,[t],n,r,i);throw new TypeError(\"val must be string, number or Buffer\")}function arrayIndexOf(e,t,n,r,i){var a=1,o=e.length,s=t.length;if(void 0!==r&&(\"ucs2\"===(r=String(r).toLowerCase())||\"ucs-2\"===r||\"utf16le\"===r||\"utf-16le\"===r)){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,n/=2}function read(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var l;if(i){var u=-1;for(l=n;l<o;l++)if(read(e,l)===read(t,-1===u?0:l-u)){if(-1===u&&(u=l),l-u+1===s)return u*a}else-1!==u&&(l-=l-u),u=-1}else for(n+s>o&&(n=o-s),l=n;l>=0;l--){for(var c=!0,p=0;p<s;p++)if(read(e,l+p)!==read(t,p)){c=!1;break}if(c)return l}return-1}Buffer.prototype.includes=function includes(e,t,n){return-1!==this.indexOf(e,t,n)},Buffer.prototype.indexOf=function indexOf(e,t,n){return bidirectionalIndexOf(this,e,t,n,!0)},Buffer.prototype.lastIndexOf=function lastIndexOf(e,t,n){return bidirectionalIndexOf(this,e,t,n,!1)};function hexWrite(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError(\"Invalid hex string\");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[n+o]=s}return o}function asciiWrite(e,t,n,r){return blitBuffer(function asciiToBytes(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}Buffer.prototype.write=function write(e,t,n,r){if(void 0===t)r=\"utf8\",n=this.length,t=0;else if(void 0===n&&\"string\"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");t|=0,isFinite(n)?(n|=0,void 0===r&&(r=\"utf8\")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");r||(r=\"utf8\");for(var a=!1;;)switch(r){case\"hex\":return hexWrite(this,e,t,n);case\"utf8\":case\"utf-8\":return f=t,d=n,blitBuffer(utf8ToBytes(e,(h=this).length-f),h,f,d);case\"ascii\":return asciiWrite(this,e,t,n);case\"latin1\":case\"binary\":return asciiWrite(this,e,t,n);case\"base64\":return u=this,c=t,p=n,blitBuffer(base64ToBytes(e),u,c,p);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return s=t,l=n,blitBuffer(function utf16leToBytes(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}(e,(o=this).length-s),o,s,l);default:if(a)throw new TypeError(\"Unknown encoding: \"+r);r=(\"\"+r).toLowerCase(),a=!0}var o,s,l,u,c,p,h,f,d},Buffer.prototype.toJSON=function toJSON(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function utf8Slice(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a=e[i],s=null,l=a>239?4:a>223?3:a>191?2:1;if(i+l<=n){var u,c,p,h;switch(l){case 1:a<128&&(s=a);break;case 2:128==(192&(u=e[i+1]))&&(h=(31&a)<<6|63&u)>127&&(s=h);break;case 3:u=e[i+1],c=e[i+2],128==(192&u)&&128==(192&c)&&(h=(15&a)<<12|(63&u)<<6|63&c)>2047&&(h<55296||h>57343)&&(s=h);break;case 4:u=e[i+1],c=e[i+2],p=e[i+3],128==(192&u)&&128==(192&c)&&128==(192&p)&&(h=(15&a)<<18|(63&u)<<12|(63&c)<<6|63&p)>65535&&h<1114112&&(s=h)}}null===s?(s=65533,l=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=l}return function decodeCodePointsArray(e){var t=e.length;if(t<=o)return String.fromCharCode.apply(String,e);var n=\"\",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=o));return n}(r)}var o=4096;function asciiSlice(e,t,n){var r=\"\";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function latin1Slice(e,t,n){var r=\"\";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function hexSlice(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i=\"\",a=t;a<n;++a)i+=toHex(e[a]);return i}function utf16leSlice(e,t,n){for(var r=e.slice(t,n),i=\"\",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}Buffer.prototype.slice=function slice(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r;if(Buffer.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=Buffer.prototype;else{var i=t-e;r=new Buffer(i,void 0);for(var a=0;a<i;++a)r[a]=this[a+e]}return r};function checkOffset(e,t,n){if(e%1!=0||e<0)throw new RangeError(\"offset is not uint\");if(e+t>n)throw new RangeError(\"Trying to access beyond buffer length\")}Buffer.prototype.readUIntLE=function readUIntLE(e,t,n){e|=0,t|=0,n||checkOffset(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},Buffer.prototype.readUIntBE=function readUIntBE(e,t,n){e|=0,t|=0,n||checkOffset(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},Buffer.prototype.readUInt8=function readUInt8(e,t){return t||checkOffset(e,1,this.length),this[e]},Buffer.prototype.readUInt16LE=function readUInt16LE(e,t){return t||checkOffset(e,2,this.length),this[e]|this[e+1]<<8},Buffer.prototype.readUInt16BE=function readUInt16BE(e,t){return t||checkOffset(e,2,this.length),this[e]<<8|this[e+1]},Buffer.prototype.readUInt32LE=function readUInt32LE(e,t){return t||checkOffset(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Buffer.prototype.readUInt32BE=function readUInt32BE(e,t){return t||checkOffset(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Buffer.prototype.readIntLE=function readIntLE(e,t,n){e|=0,t|=0,n||checkOffset(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},Buffer.prototype.readIntBE=function readIntBE(e,t,n){e|=0,t|=0,n||checkOffset(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},Buffer.prototype.readInt8=function readInt8(e,t){return t||checkOffset(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Buffer.prototype.readInt16LE=function readInt16LE(e,t){t||checkOffset(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},Buffer.prototype.readInt16BE=function readInt16BE(e,t){t||checkOffset(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},Buffer.prototype.readInt32LE=function readInt32LE(e,t){return t||checkOffset(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(e,t){return t||checkOffset(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Buffer.prototype.readFloatLE=function readFloatLE(e,t){return t||checkOffset(e,4,this.length),i.read(this,e,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(e,t){return t||checkOffset(e,4,this.length),i.read(this,e,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(e,t){return t||checkOffset(e,8,this.length),i.read(this,e,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(e,t){return t||checkOffset(e,8,this.length),i.read(this,e,!1,52,8)};function checkInt(e,t,n,r,i,a){if(!Buffer.isBuffer(e))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('\"value\" argument is out of bounds');if(n+r>e.length)throw new RangeError(\"Index out of range\")}Buffer.prototype.writeUIntLE=function writeUIntLE(e,t,n,r){if(e=+e,t|=0,n|=0,!r){checkInt(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},Buffer.prototype.writeUIntBE=function writeUIntBE(e,t,n,r){if(e=+e,t|=0,n|=0,!r){checkInt(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},Buffer.prototype.writeUInt8=function writeUInt8(e,t,n){return e=+e,t|=0,n||checkInt(this,e,t,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1};function objectWriteUInt16(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}Buffer.prototype.writeUInt16LE=function writeUInt16LE(e,t,n){return e=+e,t|=0,n||checkInt(this,e,t,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):objectWriteUInt16(this,e,t,!0),t+2},Buffer.prototype.writeUInt16BE=function writeUInt16BE(e,t,n){return e=+e,t|=0,n||checkInt(this,e,t,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):objectWriteUInt16(this,e,t,!1),t+2};function objectWriteUInt32(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;++i)e[n+i]=t>>>8*(r?i:3-i)&255}Buffer.prototype.writeUInt32LE=function writeUInt32LE(e,t,n){return e=+e,t|=0,n||checkInt(this,e,t,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):objectWriteUInt32(this,e,t,!0),t+4},Buffer.prototype.writeUInt32BE=function writeUInt32BE(e,t,n){return e=+e,t|=0,n||checkInt(this,e,t,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):objectWriteUInt32(this,e,t,!1),t+4},Buffer.prototype.writeIntLE=function writeIntLE(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);checkInt(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},Buffer.prototype.writeIntBE=function writeIntBE(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);checkInt(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},Buffer.prototype.writeInt8=function writeInt8(e,t,n){return e=+e,t|=0,n||checkInt(this,e,t,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Buffer.prototype.writeInt16LE=function writeInt16LE(e,t,n){return e=+e,t|=0,n||checkInt(this,e,t,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):objectWriteUInt16(this,e,t,!0),t+2},Buffer.prototype.writeInt16BE=function writeInt16BE(e,t,n){return e=+e,t|=0,n||checkInt(this,e,t,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):objectWriteUInt16(this,e,t,!1),t+2},Buffer.prototype.writeInt32LE=function writeInt32LE(e,t,n){return e=+e,t|=0,n||checkInt(this,e,t,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):objectWriteUInt32(this,e,t,!0),t+4},Buffer.prototype.writeInt32BE=function writeInt32BE(e,t,n){return e=+e,t|=0,n||checkInt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):objectWriteUInt32(this,e,t,!1),t+4};function checkIEEE754(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError(\"Index out of range\");if(n<0)throw new RangeError(\"Index out of range\")}function writeFloat(e,t,n,r,a){return a||checkIEEE754(e,0,n,4),i.write(e,t,n,r,23,4),n+4}Buffer.prototype.writeFloatLE=function writeFloatLE(e,t,n){return writeFloat(this,e,t,!0,n)},Buffer.prototype.writeFloatBE=function writeFloatBE(e,t,n){return writeFloat(this,e,t,!1,n)};function writeDouble(e,t,n,r,a){return a||checkIEEE754(e,0,n,8),i.write(e,t,n,r,52,8),n+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(e,t,n){return writeDouble(this,e,t,!0,n)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(e,t,n){return writeDouble(this,e,t,!1,n)},Buffer.prototype.copy=function copy(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError(\"targetStart out of bounds\");if(n<0||n>=this.length)throw new RangeError(\"sourceStart out of bounds\");if(r<0)throw new RangeError(\"sourceEnd out of bounds\");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,a=r-n;if(this===e&&n<t&&t<r)for(i=a-1;i>=0;--i)e[i+t]=this[i+n];else if(a<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},Buffer.prototype.fill=function fill(e,t,n,r){if(\"string\"==typeof e){if(\"string\"==typeof t?(r=t,t=0,n=this.length):\"string\"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&\"string\"!=typeof r)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof r&&!Buffer.isEncoding(r))throw new TypeError(\"Unknown encoding: \"+r)}else\"number\"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError(\"Out of range index\");if(n<=t)return this;t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if(\"number\"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var o=Buffer.isBuffer(e)?e:utf8ToBytes(new Buffer(e,r).toString()),s=o.length;for(a=0;a<n-t;++a)this[a+t]=o[a%s]}return this};var s=/[^+\\/0-9A-Za-z-_]/g;function toHex(e){return e<16?\"0\"+e.toString(16):e.toString(16)}function utf8ToBytes(e,t){t=t||1/0;for(var n,r=e.length,i=null,a=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error(\"Invalid code point\");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function base64ToBytes(e){return r.toByteArray(function base64clean(e){if((e=function stringtrim(e){return e.trim?e.trim():e.replace(/^\\s+|\\s+$/g,\"\")}(e).replace(s,\"\")).length<2)return\"\";for(;e.length%4!=0;)e+=\"=\";return e}(e))}function blitBuffer(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(t,n(7))},function(e,t,n){\"use strict\";var r=n(246);n.d(t,\"a\",function(){return r.a})},function(e,t,n){var r=n(68),i=n(50);e.exports=function baseForOwn(e,t){return e&&r(e,t,i)}},function(e,t,n){var r=n(254),i=n(278),a=n(43),o=n(5),s=n(287);e.exports=function baseIteratee(e){return\"function\"==typeof e?e:null==e?a:\"object\"==typeof e?o(e)?i(e[0],e[1]):r(e):s(e)}},function(e,t,n){var r=n(256),i=n(8);e.exports=function baseIsEqual(e,t,n,a,o){return e===t||(null==e||null==t||!i(e)&&!i(t)?e!=e&&t!=t:r(e,t,n,a,baseIsEqual,o))}},function(e,t,n){var r=n(257),i=n(260),a=n(261),o=1,s=2;e.exports=function equalArrays(e,t,n,l,u,c){var p=n&o,h=e.length,f=t.length;if(h!=f&&!(p&&f>h))return!1;var d=c.get(e);if(d&&c.get(t))return d==t;var m=-1,g=!0,y=n&s?new r:void 0;for(c.set(e,t),c.set(t,e);++m<h;){var v=e[m],b=t[m];if(l)var _=p?l(b,v,m,t,e,c):l(v,b,m,e,t,c);if(void 0!==_){if(_)continue;g=!1;break}if(y){if(!i(t,function(e,t){if(!a(y,t)&&(v===e||u(v,e,n,l,c)))return y.push(t)})){g=!1;break}}else if(v!==b&&!u(v,b,n,l,c)){g=!1;break}}return c.delete(e),c.delete(t),g}},function(e,t,n){var r=n(4);e.exports=function isStrictComparable(e){return e==e&&!r(e)}},function(e,t){e.exports=function matchesStrictComparable(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},function(e,t,n){var r=n(90),i=n(31);e.exports=function baseGet(e,t){for(var n=0,a=(t=r(t,e)).length;null!=e&&n<a;)e=e[i(t[n++])];return n&&n==a?e:void 0}},function(e,t,n){var r=n(5),i=n(51),a=n(280),o=n(282);e.exports=function castPath(e,t){return r(e)?e:i(e,t)?[e]:a(o(e))}},function(e,t){e.exports=function arrayMap(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},function(e,t,n){\"use strict\";var r=n(290);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(291);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(300);n.d(t,\"a\",function(){return r.a})},function(e,t,n){var r=n(91),i=n(84),a=n(302),o=n(5);e.exports=function map(e,t){return(o(e)?r:a)(e,i(t,3))}},function(e,t,n){\"use strict\";var r=n(305);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(312);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";t.a=function getUrl(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=e.slug,r=e.example,i=e.anchor,a=e.isolated,o=e.nochrome,s=e.absolute,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location,u=l.origin,c=l.pathname;o&&(c+=\"?nochrome\");i?c+=\"#\"+n:(a||o)&&(c+=\"#!/\"+t);void 0!==r&&(c+=\"/\"+r);if(s)return u+c;return c}},function(e,t,n){\"use strict\";var r=n(314);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";t.a=function getFilterRegExp(e){return e=e.replace(/[^a-z0-9]/gi,\"\").split(\"\").join(\".*\"),new RegExp(e,\"i\")}},function(e,t,n){\"use strict\";var r=n(328);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(331);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(349);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";e.exports={HOMEPAGE:\"https://react-styleguidist.js.org/\",BUGS:\"https://github.com/styleguidist/react-styleguidist/issues\",DOCS_CONFIG:\"https://react-styleguidist.js.org/docs/configuration.html\",DOCS_COMPONENTS:\"https://react-styleguidist.js.org/docs/components.html\",DOCS_WEBPACK:\"https://react-styleguidist.js.org/docs/webpack.html\",DOCS_DOCUMENTING:\"https://react-styleguidist.js.org/docs/documenting.html\",DOCS_THIRDPARTIES:\"https://react-styleguidist.js.org/docs/thirdparties.html\"}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(0);n.n(r);t.SFCCounter=(e=>{const{label:t,count:n,onIncrement:i}=e;return r.createElement(\"div\",null,r.createElement(\"span\",null,t,\": \",n,\" \"),r.createElement(\"button\",{type:\"button\",onClick:()=>{i()}},\"Increment\"))})},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(0);n.n(r);t.GenericList=class extends r.Component{render(){const{items:e,itemRenderer:t}=this.props;return r.createElement(\"div\",null,e.map(t))}}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(386),i=n(0);n.n(i);t.SFCSpreadAttributes=(e=>{const{children:t}=e,n=r.a(e,[\"children\"]);return i.createElement(\"div\",Object.assign({},n),t)})},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(0);n.n(r);t.StatefulCounter=class extends r.Component{constructor(){super(...arguments),this.state={count:0},this.handleIncrement=(()=>{this.setState({count:this.state.count+1})})}render(){const{handleIncrement:e}=this,{label:t}=this.props,{count:n}=this.state;return r.createElement(\"div\",null,r.createElement(\"span\",null,t,\": \",n,\" \"),r.createElement(\"button\",{type:\"button\",onClick:e},\"Increment\"))}}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(0);n.n(r);const i=(a=class extends r.Component{constructor(){super(...arguments),this.state={count:this.props.initialCount},this.handleIncrement=(()=>{this.setState({count:this.state.count+1})})}componentWillReceiveProps({initialCount:e}){null!=e&&e!==this.props.initialCount&&this.setState({count:e})}render(){const{handleIncrement:e}=this,{label:t}=this.props,{count:n}=this.state;return r.createElement(\"div\",null,r.createElement(\"span\",null,t,\": \",n,\" \"),r.createElement(\"button\",{type:\"button\",onClick:e},\"Increment\"))}},a.defaultProps={initialCount:0},a);t.StatefulCounterWithDefault=i;var a},function(e,t){e.exports=function pad(e,t){var n=\"000000000\"+e;return n.substr(n.length-t)}},function(e,t){e.exports=function(e){var t=[];return t.toString=function toString(){return this.map(function(t){var n=function cssWithMappingToString(e,t){var n=e[1]||\"\",r=e[3];if(!r)return n;if(t&&\"function\"==typeof btoa){var i=function toComment(e){return\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+\" */\"}(r),a=r.sources.map(function(e){return\"/*# sourceURL=\"+r.sourceRoot+e+\" */\"});return[n].concat(a).concat([i]).join(\"\\n\")}return[n].join(\"\\n\")}(t,e);return t[2]?\"@media \"+t[2]+\"{\"+n+\"}\":n}).join(\"\")},t.i=function(e,n){\"string\"==typeof e&&(e=[[null,e,\"\"]]);for(var r={},i=0;i<this.length;i++){var a=this[i][0];\"number\"==typeof a&&(r[a]=!0)}for(i=0;i<e.length;i++){var o=e[i];\"number\"==typeof o[0]&&r[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]=\"(\"+o[2]+\") and (\"+n+\")\"),t.push(o))}},t}},function(e,t,n){var r={},i=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),a=function(e){var t={};return function(e){if(void 0===t[e]){var n=function(e){return document.querySelector(e)}.call(this,e);if(n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),o=null,s=0,l=[],u=n(237);e.exports=function(e,t){if(\"undefined\"!=typeof DEBUG&&DEBUG&&\"object\"!=typeof document)throw new Error(\"The style-loader cannot be used in a non-browser environment\");(t=t||{}).attrs=\"object\"==typeof t.attrs?t.attrs:{},t.singleton||\"boolean\"==typeof t.singleton||(t.singleton=i()),t.insertInto||(t.insertInto=\"head\"),t.insertAt||(t.insertAt=\"bottom\");var n=listToStyles(e,t);return addStylesToDom(n,t),function update(e){for(var i=[],a=0;a<n.length;a++){var o=n[a];(s=r[o.id]).refs--,i.push(s)}if(e){addStylesToDom(listToStyles(e,t),t)}for(a=0;a<i.length;a++){var s;if(0===(s=i[a]).refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete r[s.id]}}}};function addStylesToDom(e,t){for(var n=0;n<e.length;n++){var i=e[n],a=r[i.id];if(a){a.refs++;for(var o=0;o<a.parts.length;o++)a.parts[o](i.parts[o]);for(;o<i.parts.length;o++)a.parts.push(addStyle(i.parts[o],t))}else{var s=[];for(o=0;o<i.parts.length;o++)s.push(addStyle(i.parts[o],t));r[i.id]={id:i.id,refs:1,parts:s}}}}function listToStyles(e,t){for(var n=[],r={},i=0;i<e.length;i++){var a=e[i],o=t.base?a[0]+t.base:a[0],s={css:a[1],media:a[2],sourceMap:a[3]};r[o]?r[o].parts.push(s):n.push(r[o]={id:o,parts:[s]})}return n}function insertStyleElement(e,t){var n=a(e.insertInto);if(!n)throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.\");var r=l[l.length-1];if(\"top\"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),l.push(t);else if(\"bottom\"===e.insertAt)n.appendChild(t);else{if(\"object\"!=typeof e.insertAt||!e.insertAt.before)throw new Error(\"[Style Loader]\\n\\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\\n Must be 'top', 'bottom', or Object.\\n (https://github.com/webpack-contrib/style-loader#insertat)\\n\");var i=a(e.insertInto+\" \"+e.insertAt.before);n.insertBefore(t,i)}}function removeStyleElement(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=l.indexOf(e);t>=0&&l.splice(t,1)}function createStyleElement(e){var t=document.createElement(\"style\");return e.attrs.type=\"text/css\",addAttrs(t,e.attrs),insertStyleElement(e,t),t}function addAttrs(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function addStyle(e,t){var n,r,i,a;if(t.transform&&e.css){if(!(a=t.transform(e.css)))return function(){};e.css=a}if(t.singleton){var l=s++;n=o||(o=createStyleElement(t)),r=applyToSingletonTag.bind(null,n,l,!1),i=applyToSingletonTag.bind(null,n,l,!0)}else e.sourceMap&&\"function\"==typeof URL&&\"function\"==typeof URL.createObjectURL&&\"function\"==typeof URL.revokeObjectURL&&\"function\"==typeof Blob&&\"function\"==typeof btoa?(n=function createLinkElement(e){var t=document.createElement(\"link\");return e.attrs.type=\"text/css\",e.attrs.rel=\"stylesheet\",addAttrs(t,e.attrs),insertStyleElement(e,t),t}(t),r=function updateLink(e,t,n){var r=n.css,i=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||a)&&(r=u(r));i&&(r+=\"\\n/*# sourceMappingURL=data:application/json;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+\" */\");var o=new Blob([r],{type:\"text/css\"}),s=e.href;e.href=URL.createObjectURL(o),s&&URL.revokeObjectURL(s)}.bind(null,n,t),i=function(){removeStyleElement(n),n.href&&URL.revokeObjectURL(n.href)}):(n=createStyleElement(t),r=function applyToTag(e,t){var n=t.css,r=t.media;r&&e.setAttribute(\"media\",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){removeStyleElement(n)});return r(e),function updateStyle(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}var c=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join(\"\\n\")}}();function applyToSingletonTag(e,t,n,r){var i=n?\"\":r.css;if(e.styleSheet)e.styleSheet.cssText=c(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}},function(e,t,n){var r=n(4),i=n(235),a=n(236),o=\"Expected a function\",s=Math.max,l=Math.min;e.exports=function debounce(e,t,n){var u,c,p,h,f,d,m=0,g=!1,y=!1,v=!0;if(\"function\"!=typeof e)throw new TypeError(o);t=a(t)||0,r(n)&&(g=!!n.leading,p=(y=\"maxWait\"in n)?s(a(n.maxWait)||0,t):p,v=\"trailing\"in n?!!n.trailing:v);function invokeFunc(t){var n=u,r=c;return u=c=void 0,m=t,h=e.apply(r,n)}function shouldInvoke(e){var n=e-d;return void 0===d||n>=t||n<0||y&&e-m>=p}function timerExpired(){var e=i();if(shouldInvoke(e))return trailingEdge(e);f=setTimeout(timerExpired,function remainingWait(e){var n=t-(e-d);return y?l(n,p-(e-m)):n}(e))}function trailingEdge(e){return f=void 0,v&&u?invokeFunc(e):(u=c=void 0,h)}function debounced(){var e=i(),n=shouldInvoke(e);if(u=arguments,c=this,d=e,n){if(void 0===f)return function leadingEdge(e){return m=e,f=setTimeout(timerExpired,t),g?invokeFunc(e):h}(d);if(y)return f=setTimeout(timerExpired,t),invokeFunc(d)}return void 0===f&&(f=setTimeout(timerExpired,t)),h}return debounced.cancel=function cancel(){void 0!==f&&clearTimeout(f),m=0,u=d=c=f=void 0},debounced.flush=function flush(){return void 0===f?h:trailingEdge(i())},debounced}},function(e,t,n){e.exports=n(115)},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});n(116);var r=n(0),i=n.n(r),a=n(63),o=n.n(a),s=n(32),l=n(316),u=n(363),c=n(364),p=n(376),h=(n(378),0);function renderStyleguide(){var e=n(380),t=window.location.hash,r=Object(c.a)(e.sections,t),a=r.sections,f=r.displayMode;if(document.title=Object(u.a)(a,e.config.title,f),\"#/\"===t){var d=window.location.pathname+window.location.search;history.replaceState(\"\",document.title,d)}Object(p.a)(a),o.a.render(i.a.createElement(l.a,{codeRevision:h,config:e.config,slots:s.c,welcomeScreen:e.welcomeScreen,patterns:e.patterns,sections:a,displayMode:f}),document.getElementById(\"app\"))}window.addEventListener(\"hashchange\",renderStyleguide),renderStyleguide()},function(e,t,n){\"use strict\";var r=n(117),i=(n.n(r),n(118)),a=(n.n(i),n(120));n.n(a)},function(e,t){!function(){var e=/^\\s*function\\s+([^\\(\\s]*)\\s*/;function _name(){var t,n;return this===Function||this===Function.prototype.constructor?n=\"Function\":this!==Function.prototype&&(n=(t=(\"\"+this).match(e))&&t[1]),n||\"\"}var t=!(\"name\"in Function.prototype&&\"name\"in function x(){}),n=\"function\"==typeof Object.defineProperty&&function(){var e;try{Object.defineProperty(Function.prototype,\"_xyz\",{get:function(){return\"blah\"},configurable:!0}),e=\"blah\"===Function.prototype._xyz,delete Function.prototype._xyz}catch(t){e=!1}return e}(),r=\"function\"==typeof Object.prototype.__defineGetter__&&function(){var e;try{Function.prototype.__defineGetter__(\"_abc\",function(){return\"foo\"}),e=\"foo\"===Function.prototype._abc,delete Function.prototype._abc}catch(t){e=!1}return e}();Function.prototype._name=_name,t&&(n?Object.defineProperty(Function.prototype,\"name\",{get:function(){var e=_name.call(this);return this!==Function.prototype&&Object.defineProperty(this,\"name\",{value:e,configurable:!0}),e},configurable:!0}):r&&Function.prototype.__defineGetter__(\"name\",function(){var e=_name.call(this);return this!==Function.prototype&&this.__defineGetter__(\"name\",function(){return e}),e}))}()},function(e,t,n){\"use strict\";n(119).polyfill()},function(e,t,n){\"use strict\";function assign(e,t){if(void 0===e||null===e)throw new TypeError(\"Cannot convert first argument to object\");for(var n=Object(e),r=1;r<arguments.length;r++){var i=arguments[r];if(void 0!==i&&null!==i)for(var a=Object.keys(Object(i)),o=0,s=a.length;o<s;o++){var l=a[o],u=Object.getOwnPropertyDescriptor(i,l);void 0!==u&&u.enumerable&&(n[l]=i[l])}}return n}e.exports={assign:assign,polyfill:function polyfill(){Object.assign||Object.defineProperty(Object,\"assign\",{enumerable:!1,configurable:!0,writable:!0,value:assign})}}},function(e,t,n){\"use strict\";e.exports=n(121).polyfill()},function(e,t,n){(function(t,r){i=function(){\"use strict\";function isFunction(e){return\"function\"==typeof e}var e=Array.isArray?Array.isArray:function(e){return\"[object Array]\"===Object.prototype.toString.call(e)},i=0,a=void 0,o=void 0,s=function asap(e,t){f[i]=e,f[i+1]=t,2===(i+=2)&&(o?o(flush):d())};var l=\"undefined\"!=typeof window?window:void 0,u=l||{},c=u.MutationObserver||u.WebKitMutationObserver,p=\"undefined\"==typeof self&&void 0!==t&&\"[object process]\"==={}.toString.call(t),h=\"undefined\"!=typeof Uint8ClampedArray&&\"undefined\"!=typeof importScripts&&\"undefined\"!=typeof MessageChannel;function useSetTimeout(){var e=setTimeout;return function(){return e(flush,1)}}var f=new Array(1e3);function flush(){for(var e=0;e<i;e+=2){(0,f[e])(f[e+1]),f[e]=void 0,f[e+1]=void 0}i=0}function attemptVertx(){try{var e=n(123);return a=e.runOnLoop||e.runOnContext,function useVertxTimer(){return void 0!==a?function(){a(flush)}:useSetTimeout()}()}catch(e){return useSetTimeout()}}var d=void 0;d=p?function useNextTick(){return function(){return t.nextTick(flush)}}():c?function useMutationObserver(){var e=0,t=new c(flush),n=document.createTextNode(\"\");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}():h?function useMessageChannel(){var e=new MessageChannel;return e.port1.onmessage=flush,function(){return e.port2.postMessage(0)}}():void 0===l?attemptVertx():useSetTimeout();function then(e,t){var n=this,r=new this.constructor(noop);void 0===r[m]&&makePromise(r);var i=n._state;if(i){var a=arguments[i-1];s(function(){return invokeCallback(i,r,a,n._result)})}else subscribe(n,r,e,t);return r}function resolve$1(e){if(e&&\"object\"==typeof e&&e.constructor===this)return e;var t=new this(noop);return resolve(t,e),t}var m=Math.random().toString(36).substring(16);function noop(){}var g=void 0,y=1,v=2,b=new ErrorObject;function getThen(e){try{return e.then}catch(e){return b.error=e,b}}function handleMaybeThenable(e,t,n){t.constructor===e.constructor&&n===then&&t.constructor.resolve===resolve$1?function handleOwnThenable(e,t){t._state===y?fulfill(e,t._result):t._state===v?reject(e,t._result):subscribe(t,void 0,function(t){return resolve(e,t)},function(t){return reject(e,t)})}(e,t):n===b?(reject(e,b.error),b.error=null):void 0===n?fulfill(e,t):isFunction(n)?function handleForeignThenable(e,t,n){s(function(e){var r=!1,i=function tryThen(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}(n,t,function(n){r||(r=!0,t!==n?resolve(e,n):fulfill(e,n))},function(t){r||(r=!0,reject(e,t))},e._label);!r&&i&&(r=!0,reject(e,i))},e)}(e,t,n):fulfill(e,t)}function resolve(e,t){e===t?reject(e,function selfFulfillment(){return new TypeError(\"You cannot resolve a promise with itself\")}()):!function objectOrFunction(e){var t=typeof e;return null!==e&&(\"object\"===t||\"function\"===t)}(t)?fulfill(e,t):handleMaybeThenable(e,t,getThen(t))}function publishRejection(e){e._onerror&&e._onerror(e._result),publish(e)}function fulfill(e,t){e._state===g&&(e._result=t,e._state=y,0!==e._subscribers.length&&s(publish,e))}function reject(e,t){e._state===g&&(e._state=v,e._result=t,s(publishRejection,e))}function subscribe(e,t,n,r){var i=e._subscribers,a=i.length;e._onerror=null,i[a]=t,i[a+y]=n,i[a+v]=r,0===a&&e._state&&s(publish,e)}function publish(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,i=void 0,a=e._result,o=0;o<t.length;o+=3)r=t[o],i=t[o+n],r?invokeCallback(n,r,i,a):i(a);e._subscribers.length=0}}function ErrorObject(){this.error=null}var _=new ErrorObject;function invokeCallback(e,t,n,r){var i=isFunction(n),a=void 0,o=void 0,s=void 0,l=void 0;if(i){if((a=function tryCatch(e,t){try{return e(t)}catch(e){return _.error=e,_}}(n,r))===_?(l=!0,o=a.error,a.error=null):s=!0,t===a)return void reject(t,function cannotReturnOwn(){return new TypeError(\"A promises callback cannot return that same promise.\")}())}else a=r,s=!0;t._state!==g||(i&&s?resolve(t,a):l?reject(t,o):e===y?fulfill(t,a):e===v&&reject(t,a))}var x=0;function makePromise(e){e[m]=x++,e._state=void 0,e._result=void 0,e._subscribers=[]}function validationError(){return new Error(\"Array Methods must be provided an Array\")}function validationError(){return new Error(\"Array Methods must be provided an Array\")}var w=function(){function Enumerator(t,n){this._instanceConstructor=t,this.promise=new t(noop),this.promise[m]||makePromise(this.promise),e(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?fulfill(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&fulfill(this.promise,this._result))):reject(this.promise,validationError())}return Enumerator.prototype._enumerate=function _enumerate(e){for(var t=0;this._state===g&&t<e.length;t++)this._eachEntry(e[t],t)},Enumerator.prototype._eachEntry=function _eachEntry(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===resolve$1){var i=getThen(e);if(i===then&&e._state!==g)this._settledAt(e._state,t,e._result);else if(\"function\"!=typeof i)this._remaining--,this._result[t]=e;else if(n===k){var a=new n(noop);handleMaybeThenable(a,e,i),this._willSettleAt(a,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(r(e),t)},Enumerator.prototype._settledAt=function _settledAt(e,t,n){var r=this.promise;r._state===g&&(this._remaining--,e===v?reject(r,n):this._result[t]=n),0===this._remaining&&fulfill(r,this._result)},Enumerator.prototype._willSettleAt=function _willSettleAt(e,t){var n=this;subscribe(e,void 0,function(e){return n._settledAt(y,t,e)},function(e){return n._settledAt(v,t,e)})},Enumerator}();var k=function(){function Promise(e){this[m]=function nextId(){return x++}(),this._result=this._state=void 0,this._subscribers=[],noop!==e&&(\"function\"!=typeof e&&function needsResolver(){throw new TypeError(\"You must pass a resolver function as the first argument to the promise constructor\")}(),this instanceof Promise?function initializePromise(e,t){try{t(function resolvePromise(t){resolve(e,t)},function rejectPromise(t){reject(e,t)})}catch(t){reject(e,t)}}(this,e):function needsNew(){throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\")}())}return Promise.prototype.catch=function _catch(e){return this.then(null,e)},Promise.prototype.finally=function _finally(e){var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})})},Promise}();k.prototype.then=then,k.all=function all(e){return new w(this,e).promise},k.race=function race(t){var n=this;return e(t)?new n(function(e,r){for(var i=t.length,a=0;a<i;a++)n.resolve(t[a]).then(e,r)}):new n(function(e,t){return t(new TypeError(\"You must pass an array to race.\"))})},k.resolve=resolve$1,k.reject=function reject$1(e){var t=new this(noop);return reject(t,e),t},k._setScheduler=function setScheduler(e){o=e},k._setAsap=function setAsap(e){s=e},k._asap=s;return k.polyfill=function polyfill(){var e=void 0;if(void 0!==r)e=r;else if(\"undefined\"!=typeof self)e=self;else try{e=Function(\"return this\")()}catch(e){throw new Error(\"polyfill failed because global object is unavailable in this environment\")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if(\"[object Promise]\"===n&&!t.cast)return}e.Promise=k},k.Promise=k,k},e.exports=i();var i}).call(t,n(122),n(7))},function(e,t){var n,r,i=e.exports={};function defaultSetTimout(){throw new Error(\"setTimeout has not been defined\")}function defaultClearTimeout(){throw new Error(\"clearTimeout has not been defined\")}!function(){try{n=\"function\"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){n=defaultSetTimout}try{r=\"function\"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){r=defaultClearTimeout}}();function runTimeout(e){if(n===setTimeout)return setTimeout(e,0);if((n===defaultSetTimout||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}var a,o=[],s=!1,l=-1;function cleanUpNextTick(){s&&a&&(s=!1,a.length?o=a.concat(o):l=-1,o.length&&drainQueue())}function drainQueue(){if(!s){var e=runTimeout(cleanUpNextTick);s=!0;for(var t=o.length;t;){for(a=o,o=[];++l<t;)a&&a[l].run();l=-1,t=o.length}a=null,s=!1,function runClearTimeout(e){if(r===clearTimeout)return clearTimeout(e);if((r===defaultClearTimeout||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];o.push(new Item(e,t)),1!==o.length||s||runTimeout(drainQueue)};function Item(e,t){this.fun=e,this.array=t}Item.prototype.run=function(){this.fun.apply(null,this.array)},i.title=\"browser\",i.browser=!0,i.env={},i.argv=[],i.version=\"\",i.versions={};function noop(){}i.on=noop,i.addListener=noop,i.once=noop,i.off=noop,i.removeListener=noop,i.removeAllListeners=noop,i.emit=noop,i.prependListener=noop,i.prependOnceListener=noop,i.listeners=function(e){return[]},i.binding=function(e){throw new Error(\"process.binding is not supported\")},i.cwd=function(){return\"/\"},i.chdir=function(e){throw new Error(\"process.chdir is not supported\")},i.umask=function(){return 0}},function(e,t){},function(e,t,n){\"use strict\";var r=n(61),i=n(62),a=n(21),o=\"function\"==typeof Symbol&&Symbol.for,s=o?Symbol.for(\"react.element\"):60103,l=o?Symbol.for(\"react.call\"):60104,u=o?Symbol.for(\"react.return\"):60105,c=o?Symbol.for(\"react.portal\"):60106,p=o?Symbol.for(\"react.fragment\"):60107,h=\"function\"==typeof Symbol&&Symbol.iterator;function y(e){for(var t=arguments.length-1,n=\"Minified React error #\"+e+\"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=\"+e,r=0;r<t;r++)n+=\"&args[]=\"+encodeURIComponent(arguments[r+1]);throw(t=Error(n+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\")).name=\"Invariant Violation\",t.framesToPop=1,t}var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function A(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||f}A.prototype.isReactComponent={},A.prototype.setState=function(e,t){\"object\"!=typeof e&&\"function\"!=typeof e&&null!=e&&y(\"85\"),this.updater.enqueueSetState(this,e,t,\"setState\")},A.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,\"forceUpdate\")};function B(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||f}function C(){}C.prototype=A.prototype;var d=B.prototype=new C;d.constructor=B,r(d,A.prototype),d.isPureReactComponent=!0;function E(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||f}var m=E.prototype=new C;m.constructor=E,r(m,A.prototype),m.unstable_isAsyncReactComponent=!0,m.render=function(){return this.props.children};var g={current:null},v=Object.prototype.hasOwnProperty,b={key:!0,ref:!0,__self:!0,__source:!0};function J(e,t,n){var r,i={},a=null,o=null;if(null!=t)for(r in void 0!==t.ref&&(o=t.ref),void 0!==t.key&&(a=\"\"+t.key),t)v.call(t,r)&&!b.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)void 0===i[r]&&(i[r]=l[r]);return{$$typeof:s,type:e,key:a,ref:o,props:i,_owner:g.current}}function K(e){return\"object\"==typeof e&&null!==e&&e.$$typeof===s}var _=/\\/+/g,x=[];function N(e,t,n,r){if(x.length){var i=x.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function O(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>x.length&&x.push(e)}function P(e,t,n,r){var i=typeof e;\"undefined\"!==i&&\"boolean\"!==i||(e=null);var a=!1;if(null===e)a=!0;else switch(i){case\"string\":case\"number\":a=!0;break;case\"object\":switch(e.$$typeof){case s:case l:case u:case c:a=!0}}if(a)return n(r,e,\"\"===t?\".\"+Q(e,0):t),1;if(a=0,t=\"\"===t?\".\":t+\":\",Array.isArray(e))for(var o=0;o<e.length;o++){var p=t+Q(i=e[o],o);a+=P(i,p,n,r)}else if(null===e||void 0===e?p=null:(p=h&&e[h]||e[\"@@iterator\"],p=\"function\"==typeof p?p:null),\"function\"==typeof p)for(e=p.call(e),o=0;!(i=e.next()).done;)i=i.value,p=t+Q(i,o++),a+=P(i,p,n,r);else\"object\"===i&&(n=\"\"+e,y(\"31\",\"[object Object]\"===n?\"object with keys {\"+Object.keys(e).join(\", \")+\"}\":n,\"\"));return a}function Q(e,t){return\"object\"==typeof e&&null!==e&&null!=e.key?function escape(e){var t={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+(\"\"+e).replace(/[=:]/g,function(e){return t[e]})}(e.key):t.toString(36)}function R(e,t){e.func.call(e.context,t,e.count++)}function S(e,t,n){var r=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?T(e,r,n,a.thatReturnsArgument):null!=e&&(K(e)&&(t=i+(!e.key||t&&t.key===e.key?\"\":(\"\"+e.key).replace(_,\"$&/\")+\"/\")+n,e={$$typeof:s,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}),r.push(e))}function T(e,t,n,r,i){var a=\"\";null!=n&&(a=(\"\"+n).replace(_,\"$&/\")+\"/\"),t=N(t,a,r,i),null==e||P(e,\"\",S,t),O(t)}var w={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return T(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;t=N(null,null,t,n),null==e||P(e,\"\",R,t),O(t)},count:function(e){return null==e?0:P(e,\"\",a.thatReturnsNull,null)},toArray:function(e){var t=[];return T(e,t,null,a.thatReturnsArgument),t},only:function(e){return K(e)||y(\"143\"),e}},Component:A,PureComponent:B,unstable_AsyncComponent:E,Fragment:p,createElement:J,cloneElement:function(e,t,n){var i=r({},e.props),a=e.key,o=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,l=g.current),void 0!==t.key&&(a=\"\"+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(c in t)v.call(t,c)&&!b.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==u?u[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){u=Array(c);for(var p=0;p<c;p++)u[p]=arguments[p+2];i.children=u}return{$$typeof:s,type:e.type,key:a,ref:o,props:i,_owner:l}},createFactory:function(e){var t=J.bind(null,e);return t.type=e,t},isValidElement:K,version:\"16.2.0\",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:g,assign:r}},k=Object.freeze({default:w}),j=k&&w||k;e.exports=j.default?j.default:j},function(t,n,r){\"use strict\";var i=r(0),a=r(126),o=r(61),s=r(21),l=r(127),p=r(128),_=r(129),x=r(130),C=r(133),S=r(62);function E(e){for(var t=arguments.length-1,n=\"Minified React error #\"+e+\"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=\"+e,r=0;r<t;r++)n+=\"&args[]=\"+encodeURIComponent(arguments[r+1]);throw(t=Error(n+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\")).name=\"Invariant Violation\",t.framesToPop=1,t}i||E(\"227\");var R={children:!0,dangerouslySetInnerHTML:!0,defaultValue:!0,defaultChecked:!0,innerHTML:!0,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,style:!0};function pa(e,t){return(e&t)===t}var P={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,HAS_STRING_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=P,n=e.Properties||{},r=e.DOMAttributeNamespaces||{},i=e.DOMAttributeNames||{};e=e.DOMMutationMethods||{};for(var a in n){O.hasOwnProperty(a)&&E(\"48\",a);var o=a.toLowerCase(),s=n[a];1>=(o={attributeName:o,attributeNamespace:null,propertyName:a,mutationMethod:null,mustUseProperty:pa(s,t.MUST_USE_PROPERTY),hasBooleanValue:pa(s,t.HAS_BOOLEAN_VALUE),hasNumericValue:pa(s,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:pa(s,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:pa(s,t.HAS_OVERLOADED_BOOLEAN_VALUE),hasStringBooleanValue:pa(s,t.HAS_STRING_BOOLEAN_VALUE)}).hasBooleanValue+o.hasNumericValue+o.hasOverloadedBooleanValue||E(\"50\",a),i.hasOwnProperty(a)&&(o.attributeName=i[a]),r.hasOwnProperty(a)&&(o.attributeNamespace=r[a]),e.hasOwnProperty(a)&&(o.mutationMethod=e[a]),O[a]=o}}},O={};function va(e,t){if(R.hasOwnProperty(e)||2<e.length&&(\"o\"===e[0]||\"O\"===e[0])&&(\"n\"===e[1]||\"N\"===e[1]))return!1;if(null===t)return!0;switch(typeof t){case\"boolean\":return R.hasOwnProperty(e)?e=!0:(t=wa(e))?e=t.hasBooleanValue||t.hasStringBooleanValue||t.hasOverloadedBooleanValue:e=\"data-\"===(e=e.toLowerCase().slice(0,5))||\"aria-\"===e,e;case\"undefined\":case\"number\":case\"string\":case\"object\":return!0;default:return!1}}function wa(e){return O.hasOwnProperty(e)?O[e]:null}var j=P,M=j.MUST_USE_PROPERTY,D=j.HAS_BOOLEAN_VALUE,B=j.HAS_NUMERIC_VALUE,F=j.HAS_POSITIVE_NUMERIC_VALUE,$=j.HAS_OVERLOADED_BOOLEAN_VALUE,H=j.HAS_STRING_BOOLEAN_VALUE,K={Properties:{allowFullScreen:D,async:D,autoFocus:D,autoPlay:D,capture:$,checked:M|D,cols:F,contentEditable:H,controls:D,default:D,defer:D,disabled:D,download:$,draggable:H,formNoValidate:D,hidden:D,loop:D,multiple:M|D,muted:M|D,noValidate:D,open:D,playsInline:D,readOnly:D,required:D,reversed:D,rows:F,rowSpan:B,scoped:D,seamless:D,selected:M|D,size:F,start:B,span:F,spellCheck:H,style:0,tabIndex:0,itemScope:D,acceptCharset:0,className:0,htmlFor:0,httpEquiv:0,value:H},DOMAttributeNames:{acceptCharset:\"accept-charset\",className:\"class\",htmlFor:\"for\",httpEquiv:\"http-equiv\"},DOMMutationMethods:{value:function(e,t){if(null==t)return e.removeAttribute(\"value\");\"number\"!==e.type||!1===e.hasAttribute(\"value\")?e.setAttribute(\"value\",\"\"+t):e.validity&&!e.validity.badInput&&e.ownerDocument.activeElement!==e&&e.setAttribute(\"value\",\"\"+t)}}},X=j.HAS_STRING_BOOLEAN_VALUE,Q=\"http://www.w3.org/1999/xlink\",Z=\"http://www.w3.org/XML/1998/namespace\",ee={Properties:{autoReverse:X,externalResourcesRequired:X,preserveAlpha:X},DOMAttributeNames:{autoReverse:\"autoReverse\",externalResourcesRequired:\"externalResourcesRequired\",preserveAlpha:\"preserveAlpha\"},DOMAttributeNamespaces:{xlinkActuate:Q,xlinkArcrole:Q,xlinkHref:Q,xlinkRole:Q,xlinkShow:Q,xlinkTitle:Q,xlinkType:Q,xmlBase:Z,xmlLang:Z,xmlSpace:Z}},ie=/[\\-\\:]([a-z])/g;function Ia(e){return e[1].toUpperCase()}\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode x-height xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xmlns:xlink xml:lang xml:space\".split(\" \").forEach(function(e){var t=e.replace(ie,Ia);ee.Properties[t]=0,ee.DOMAttributeNames[t]=e}),j.injectDOMPropertyConfig(K),j.injectDOMPropertyConfig(ee);var he={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,injection:{injectErrorUtils:function(e){\"function\"!=typeof e.invokeGuardedCallback&&E(\"197\"),Ja=e.invokeGuardedCallback}},invokeGuardedCallback:function(e,t,n,r,i,a,o,s,l){Ja.apply(he,arguments)},invokeGuardedCallbackAndCatchFirstError:function(e,t,n,r,i,a,o,s,l){if(he.invokeGuardedCallback.apply(this,arguments),he.hasCaughtError()){var u=he.clearCaughtError();he._hasRethrowError||(he._hasRethrowError=!0,he._rethrowError=u)}},rethrowCaughtError:function(){return function Ka(){if(he._hasRethrowError){var e=he._rethrowError;throw he._rethrowError=null,he._hasRethrowError=!1,e}}.apply(he,arguments)},hasCaughtError:function(){return he._hasCaughtError},clearCaughtError:function(){if(he._hasCaughtError){var e=he._caughtError;return he._caughtError=null,he._hasCaughtError=!1,e}E(\"198\")}};function Ja(e,t,n,r,i,a,o,s,l){he._hasCaughtError=!1,he._caughtError=null;var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){he._caughtError=e,he._hasCaughtError=!0}}var fe=null,de={};function Na(){if(fe)for(var e in de){var t=de[e],n=fe.indexOf(e);if(-1<n||E(\"96\",e),!ge[n]){t.extractEvents||E(\"97\",e),ge[n]=t,n=t.eventTypes;for(var r in n){var i=void 0,a=n[r],o=t,s=r;_e.hasOwnProperty(s)&&E(\"99\",s),_e[s]=a;var l=a.phasedRegistrationNames;if(l){for(i in l)l.hasOwnProperty(i)&&Qa(l[i],o,s);i=!0}else a.registrationName?(Qa(a.registrationName,o,s),i=!0):i=!1;i||E(\"98\",r,e)}}}}function Qa(e,t,n){Se[e]&&E(\"100\",e),Se[e]=t,Re[e]=t.eventTypes[n].dependencies}var ge=[],_e={},Se={},Re={};function Ta(e){fe&&E(\"101\"),fe=Array.prototype.slice.call(e),Na()}function Ua(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];de.hasOwnProperty(t)&&de[t]===r||(de[t]&&E(\"102\",t),de[t]=r,n=!0)}n&&Na()}var Pe=Object.freeze({plugins:ge,eventNameDispatchConfigs:_e,registrationNameModules:Se,registrationNameDependencies:Re,possibleRegistrationNames:null,injectEventPluginOrder:Ta,injectEventPluginsByName:Ua}),Oe=null,Te=null,je=null;function Za(e,t,n,r){t=e.type||\"unknown-event\",e.currentTarget=je(r),he.invokeGuardedCallbackAndCatchFirstError(t,n,void 0,e),e.currentTarget=null}function $a(e,t){return null==t&&E(\"30\"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function ab(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var Ae=null;function cb(e,t){if(e){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var i=0;i<n.length&&!e.isPropagationStopped();i++)Za(e,t,n[i],r[i]);else n&&Za(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function db(e){return cb(e,!0)}function gb(e){return cb(e,!1)}var Ne={injectEventPluginOrder:Ta,injectEventPluginsByName:Ua};function ib(e,t){var n=e.stateNode;if(!n)return null;var r=Oe(n);if(!r)return null;n=r[t];e:switch(t){case\"onClick\":case\"onClickCapture\":case\"onDoubleClick\":case\"onDoubleClickCapture\":case\"onMouseDown\":case\"onMouseDownCapture\":case\"onMouseMove\":case\"onMouseMoveCapture\":case\"onMouseUp\":case\"onMouseUpCapture\":(r=!r.disabled)||(e=e.type,r=!(\"button\"===e||\"input\"===e||\"select\"===e||\"textarea\"===e)),e=!r;break e;default:e=!1}return e?null:(n&&\"function\"!=typeof n&&E(\"231\",t,typeof n),n)}function jb(e,t,n,r){for(var i,a=0;a<ge.length;a++){var o=ge[a];o&&(o=o.extractEvents(e,t,n,r))&&(i=$a(i,o))}return i}function kb(e){e&&(Ae=$a(Ae,e))}function lb(e){var t=Ae;Ae=null,t&&(ab(t,e?db:gb),Ae&&E(\"95\"),he.rethrowCaughtError())}var Me=Object.freeze({injection:Ne,getListener:ib,extractEvents:jb,enqueueEvents:kb,processEventQueue:lb}),Ue=Math.random().toString(36).slice(2),ze=\"__reactInternalInstance$\"+Ue,Ve=\"__reactEventHandlers$\"+Ue;function pb(e){if(e[ze])return e[ze];for(var t=[];!e[ze];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}var n=void 0,r=e[ze];if(5===r.tag||6===r.tag)return r;for(;e&&(r=e[ze]);e=t.pop())n=r;return n}function qb(e){if(5===e.tag||6===e.tag)return e.stateNode;E(\"33\")}function rb(e){return e[Ve]||null}var We=Object.freeze({precacheFiberNode:function(e,t){t[ze]=e},getClosestInstanceFromNode:pb,getInstanceFromNode:function(e){return!(e=e[ze])||5!==e.tag&&6!==e.tag?null:e},getNodeFromInstance:qb,getFiberCurrentPropsFromNode:rb,updateFiberProps:function(e,t){e[Ve]=t}});function tb(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function ub(e,t,n){for(var r=[];e;)r.push(e),e=tb(e);for(e=r.length;0<e--;)t(r[e],\"captured\",n);for(e=0;e<r.length;e++)t(r[e],\"bubbled\",n)}function vb(e,t,n){(t=ib(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=$a(n._dispatchListeners,t),n._dispatchInstances=$a(n._dispatchInstances,e))}function wb(e){e&&e.dispatchConfig.phasedRegistrationNames&&ub(e._targetInst,vb,e)}function xb(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst;ub(t=t?tb(t):null,vb,e)}}function yb(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=ib(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=$a(n._dispatchListeners,t),n._dispatchInstances=$a(n._dispatchInstances,e))}function zb(e){e&&e.dispatchConfig.registrationName&&yb(e._targetInst,null,e)}function Ab(e){ab(e,wb)}function Bb(e,t,n,r){if(n&&r)e:{for(var i=n,a=r,o=0,s=i;s;s=tb(s))o++;s=0;for(var l=a;l;l=tb(l))s++;for(;0<o-s;)i=tb(i),o--;for(;0<s-o;)a=tb(a),s--;for(;o--;){if(i===a||i===a.alternate)break e;i=tb(i),a=tb(a)}i=null}else i=null;for(a=i,i=[];n&&n!==a&&(null===(o=n.alternate)||o!==a);)i.push(n),n=tb(n);for(n=[];r&&r!==a&&(null===(o=r.alternate)||o!==a);)n.push(r),r=tb(r);for(r=0;r<i.length;r++)yb(i[r],\"bubbled\",e);for(e=n.length;0<e--;)yb(n[e],\"captured\",t)}var Ye=Object.freeze({accumulateTwoPhaseDispatches:Ab,accumulateTwoPhaseDispatchesSkipTarget:function(e){ab(e,xb)},accumulateEnterLeaveDispatches:Bb,accumulateDirectDispatches:function(e){ab(e,zb)}}),Qe=null;function Eb(){return!Qe&&a.canUseDOM&&(Qe=\"textContent\"in document.documentElement?\"textContent\":\"innerText\"),Qe}var et={_root:null,_startText:null,_fallbackText:null};function Fb(){if(et._fallbackText)return et._fallbackText;var e,t,n=et._startText,r=n.length,i=Gb(),a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[a-t];t++);return et._fallbackText=i.slice(e,1<t?1-t:void 0),et._fallbackText}function Gb(){return\"value\"in et._root?et._root.value:et._root[Eb()]}var tt=\"dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances\".split(\" \"),nt={type:null,target:null,currentTarget:s.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};function T(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface;for(var i in e)e.hasOwnProperty(i)&&((t=e[i])?this[i]=t(n):\"target\"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?s.thatReturnsTrue:s.thatReturnsFalse,this.isPropagationStopped=s.thatReturnsFalse,this}o(T.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():\"unknown\"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=s.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():\"unknown\"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=s.thatReturnsTrue)},persist:function(){this.isPersistent=s.thatReturnsTrue},isPersistent:s.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t<tt.length;t++)this[tt[t]]=null}}),T.Interface=nt,T.augmentClass=function(e,t){function c(){}c.prototype=this.prototype;var n=new c;o(n,e.prototype),e.prototype=n,e.prototype.constructor=e,e.Interface=o({},this.Interface,t),e.augmentClass=this.augmentClass,Jb(e)},Jb(T);function Kb(e,t,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,r),i}return new this(e,t,n,r)}function Lb(e){e instanceof this||E(\"223\"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Jb(e){e.eventPool=[],e.getPooled=Kb,e.release=Lb}function Mb(e,t,n,r){return T.call(this,e,t,n,r)}T.augmentClass(Mb,{data:null});function Nb(e,t,n,r){return T.call(this,e,t,n,r)}T.augmentClass(Nb,{data:null});var rt=[9,13,27,32],it=a.canUseDOM&&\"CompositionEvent\"in window,at=null;a.canUseDOM&&\"documentMode\"in document&&(at=document.documentMode);var ot;if(ot=a.canUseDOM&&\"TextEvent\"in window&&!at){var st=window.opera;ot=!(\"object\"==typeof st&&\"function\"==typeof st.version&&12>=parseInt(st.version(),10))}var lt=ot,ut=a.canUseDOM&&(!it||at&&8<at&&11>=at),ct=String.fromCharCode(32),pt={beforeInput:{phasedRegistrationNames:{bubbled:\"onBeforeInput\",captured:\"onBeforeInputCapture\"},dependencies:[\"topCompositionEnd\",\"topKeyPress\",\"topTextInput\",\"topPaste\"]},compositionEnd:{phasedRegistrationNames:{bubbled:\"onCompositionEnd\",captured:\"onCompositionEndCapture\"},dependencies:\"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown\".split(\" \")},compositionStart:{phasedRegistrationNames:{bubbled:\"onCompositionStart\",captured:\"onCompositionStartCapture\"},dependencies:\"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown\".split(\" \")},compositionUpdate:{phasedRegistrationNames:{bubbled:\"onCompositionUpdate\",captured:\"onCompositionUpdateCapture\"},dependencies:\"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown\".split(\" \")}},ht=!1;function dc(e,t){switch(e){case\"topKeyUp\":return-1!==rt.indexOf(t.keyCode);case\"topKeyDown\":return 229!==t.keyCode;case\"topKeyPress\":case\"topMouseDown\":case\"topBlur\":return!0;default:return!1}}function ec(e){return\"object\"==typeof(e=e.detail)&&\"data\"in e?e.data:null}var ft=!1;var dt={eventTypes:pt,extractEvents:function(e,t,n,r){var i;if(it)e:{switch(e){case\"topCompositionStart\":var a=pt.compositionStart;break e;case\"topCompositionEnd\":a=pt.compositionEnd;break e;case\"topCompositionUpdate\":a=pt.compositionUpdate;break e}a=void 0}else ft?dc(e,n)&&(a=pt.compositionEnd):\"topKeyDown\"===e&&229===n.keyCode&&(a=pt.compositionStart);return a?(ut&&(ft||a!==pt.compositionStart?a===pt.compositionEnd&&ft&&(i=Fb()):(et._root=r,et._startText=Gb(),ft=!0)),a=Mb.getPooled(a,t,n,r),i?a.data=i:null!==(i=ec(n))&&(a.data=i),Ab(a),i=a):i=null,(e=lt?function gc(e,t){switch(e){case\"topCompositionEnd\":return ec(t);case\"topKeyPress\":return 32!==t.which?null:(ht=!0,ct);case\"topTextInput\":return(e=t.data)===ct&&ht?null:e;default:return null}}(e,n):function hc(e,t){if(ft)return\"topCompositionEnd\"===e||!it&&dc(e,t)?(e=Fb(),et._root=null,et._startText=null,et._fallbackText=null,ft=!1,e):null;switch(e){case\"topPaste\":return null;case\"topKeyPress\":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case\"topCompositionEnd\":return ut?null:t.data;default:return null}}(e,n))?((t=Nb.getPooled(pt.beforeInput,t,n,r)).data=e,Ab(t)):t=null,[i,t]}},mt=null,gt=null,yt=null;function mc(e){if(e=Te(e)){mt&&\"function\"==typeof mt.restoreControlledState||E(\"194\");var t=Oe(e.stateNode);mt.restoreControlledState(e.stateNode,e.type,t)}}var vt={injectFiberControlledHostComponent:function(e){mt=e}};function oc(e){gt?yt?yt.push(e):yt=[e]:gt=e}function pc(){if(gt){var e=gt,t=yt;if(yt=gt=null,mc(e),t)for(e=0;e<t.length;e++)mc(t[e])}}var bt=Object.freeze({injection:vt,enqueueStateRestore:oc,restoreStateIfNeeded:pc});function rc(e,t){return e(t)}var _t=!1;function tc(e,t){if(_t)return rc(e,t);_t=!0;try{return rc(e,t)}finally{_t=!1,pc()}}var xt={color:!0,date:!0,datetime:!0,\"datetime-local\":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function vc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return\"input\"===t?!!xt[e.type]:\"textarea\"===t}function wc(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var wt;a.canUseDOM&&(wt=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature(\"\",\"\"));function yc(e,t){if(!a.canUseDOM||t&&!(\"addEventListener\"in document))return!1;var n=(t=\"on\"+e)in document;return n||(n=document.createElement(\"div\"),n.setAttribute(t,\"return;\"),n=\"function\"==typeof n[t]),!n&&wt&&\"wheel\"===e&&(n=document.implementation.hasFeature(\"Events.wheel\",\"3.0\")),n}function zc(e){var t=e.type;return(e=e.nodeName)&&\"input\"===e.toLowerCase()&&(\"checkbox\"===t||\"radio\"===t)}function Bc(e){e._valueTracker||(e._valueTracker=function Ac(e){var t=zc(e)?\"checked\":\"value\",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=\"\"+e[t];if(!e.hasOwnProperty(t)&&\"function\"==typeof n.get&&\"function\"==typeof n.set)return Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:!0,get:function(){return n.get.call(this)},set:function(e){r=\"\"+e,n.set.call(this,e)}}),{getValue:function(){return r},setValue:function(e){r=\"\"+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}(e))}function Cc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=\"\";return e&&(r=zc(e)?e.checked?\"true\":\"false\":e.value),(e=r)!==n&&(t.setValue(e),!0)}var kt={change:{phasedRegistrationNames:{bubbled:\"onChange\",captured:\"onChangeCapture\"},dependencies:\"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange\".split(\" \")}};function Ec(e,t,n){return(e=T.getPooled(kt.change,e,t,n)).type=\"change\",oc(n),Ab(e),e}var Et=null,Ct=null;function Hc(e){kb(e),lb(!1)}function Ic(e){if(Cc(qb(e)))return e}function Jc(e,t){if(\"topChange\"===e)return t}var St=!1;a.canUseDOM&&(St=yc(\"input\")&&(!document.documentMode||9<document.documentMode));function Lc(){Et&&(Et.detachEvent(\"onpropertychange\",Mc),Ct=Et=null)}function Mc(e){\"value\"===e.propertyName&&Ic(Ct)&&(e=Ec(Ct,e,wc(e)),tc(Hc,e))}function Nc(e,t,n){\"topFocus\"===e?(Lc(),Ct=n,(Et=t).attachEvent(\"onpropertychange\",Mc)):\"topBlur\"===e&&Lc()}function Oc(e){if(\"topSelectionChange\"===e||\"topKeyUp\"===e||\"topKeyDown\"===e)return Ic(Ct)}function Pc(e,t){if(\"topClick\"===e)return Ic(t)}function $c(e,t){if(\"topInput\"===e||\"topChange\"===e)return Ic(t)}var Rt={eventTypes:kt,_isInputEventSupported:St,extractEvents:function(e,t,n,r){var i=t?qb(t):window,a=i.nodeName&&i.nodeName.toLowerCase();if(\"select\"===a||\"input\"===a&&\"file\"===i.type)var o=Jc;else if(vc(i))if(St)o=$c;else{o=Oc;var s=Nc}else a=i.nodeName,!a||\"input\"!==a.toLowerCase()||\"checkbox\"!==i.type&&\"radio\"!==i.type||(o=Pc);if(o&&(o=o(e,t)))return Ec(o,n,r);s&&s(e,i,t),\"topBlur\"===e&&null!=t&&(e=t._wrapperState||i._wrapperState)&&e.controlled&&\"number\"===i.type&&(e=\"\"+i.value,i.getAttribute(\"value\")!==e&&i.setAttribute(\"value\",e))}};function bd(e,t,n,r){return T.call(this,e,t,n,r)}T.augmentClass(bd,{view:null,detail:null});var Pt={Alt:\"altKey\",Control:\"ctrlKey\",Meta:\"metaKey\",Shift:\"shiftKey\"};function dd(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Pt[e])&&!!t[e]}function ed(){return dd}function fd(e,t,n,r){return T.call(this,e,t,n,r)}bd.augmentClass(fd,{screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:ed,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)}});var Ot={mouseEnter:{registrationName:\"onMouseEnter\",dependencies:[\"topMouseOut\",\"topMouseOver\"]},mouseLeave:{registrationName:\"onMouseLeave\",dependencies:[\"topMouseOut\",\"topMouseOver\"]}},Tt={eventTypes:Ot,extractEvents:function(e,t,n,r){if(\"topMouseOver\"===e&&(n.relatedTarget||n.fromElement)||\"topMouseOut\"!==e&&\"topMouseOver\"!==e)return null;var i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window;if(\"topMouseOut\"===e?(e=t,t=(t=n.relatedTarget||n.toElement)?pb(t):null):e=null,e===t)return null;var a=null==e?i:qb(e);i=null==t?i:qb(t);var o=fd.getPooled(Ot.mouseLeave,e,n,r);return o.type=\"mouseleave\",o.target=a,o.relatedTarget=i,(n=fd.getPooled(Ot.mouseEnter,t,n,r)).type=\"mouseenter\",n.target=i,n.relatedTarget=a,Bb(o,n,e,t),[o,n]}},jt=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner;function jd(e){return\"string\"==typeof(e=e.type)?e:\"function\"==typeof e?e.displayName||e.name:null}function kd(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if(0!=(2&t.effectTag))return 1;for(;t.return;)if(t=t.return,0!=(2&t.effectTag))return 1}return 3===t.tag?2:3}function ld(e){return!!(e=e._reactInternalFiber)&&2===kd(e)}function md(e){2!==kd(e)&&E(\"188\")}function nd(e){var t=e.alternate;if(!t)return t=kd(e),3===t&&E(\"188\"),1===t?null:e;for(var n=e,r=t;;){var i=n.return,a=i?i.alternate:null;if(!i||!a)break;if(i.child===a.child){for(var o=i.child;o;){if(o===n)return md(i),e;if(o===r)return md(i),t;o=o.sibling}E(\"188\")}if(n.return!==r.return)n=i,r=a;else{o=!1;for(var s=i.child;s;){if(s===n){o=!0,n=i,r=a;break}if(s===r){o=!0,r=i,n=a;break}s=s.sibling}if(!o){for(s=a.child;s;){if(s===n){o=!0,n=a,r=i;break}if(s===r){o=!0,r=a,n=i;break}s=s.sibling}o||E(\"189\")}}n.alternate!==r&&E(\"190\")}return 3!==n.tag&&E(\"188\"),n.stateNode.current===n?e:t}var At=[];function rd(e){var t=e.targetInst;do{if(!t){e.ancestors.push(t);break}var n;for(n=t;n.return;)n=n.return;if(!(n=3!==n.tag?null:n.stateNode.containerInfo))break;e.ancestors.push(t),t=pb(n)}while(t);for(n=0;n<e.ancestors.length;n++)t=e.ancestors[n],Lt(e.topLevelType,t,e.nativeEvent,wc(e.nativeEvent))}var It=!0,Lt=void 0;function ud(e){It=!!e}function U(e,t,n){return n?l.listen(n,t,vd.bind(null,e)):null}function wd(e,t,n){return n?l.capture(n,t,vd.bind(null,e)):null}function vd(e,t){if(It){var n=wc(t);if(null===(n=pb(n))||\"number\"!=typeof n.tag||2===kd(n)||(n=null),At.length){var r=At.pop();r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,e=r}else e={topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]};try{tc(rd,e)}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>At.length&&At.push(e)}}}var Nt=Object.freeze({get _enabled(){return It},get _handleTopLevel(){return Lt},setHandleTopLevel:function(e){Lt=e},setEnabled:ud,isEnabled:function(){return It},trapBubbledEvent:U,trapCapturedEvent:wd,dispatchEvent:vd});function yd(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[\"Webkit\"+e]=\"webkit\"+t,n[\"Moz\"+e]=\"moz\"+t,n[\"ms\"+e]=\"MS\"+t,n[\"O\"+e]=\"o\"+t.toLowerCase(),n}var Mt={animationend:yd(\"Animation\",\"AnimationEnd\"),animationiteration:yd(\"Animation\",\"AnimationIteration\"),animationstart:yd(\"Animation\",\"AnimationStart\"),transitionend:yd(\"Transition\",\"TransitionEnd\")},Dt={},Bt={};a.canUseDOM&&(Bt=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete Mt.animationend.animation,delete Mt.animationiteration.animation,delete Mt.animationstart.animation),\"TransitionEvent\"in window||delete Mt.transitionend.transition);function Cd(e){if(Dt[e])return Dt[e];if(!Mt[e])return e;var t,n=Mt[e];for(t in n)if(n.hasOwnProperty(t)&&t in Bt)return Dt[e]=n[t];return\"\"}var Ut={topAbort:\"abort\",topAnimationEnd:Cd(\"animationend\")||\"animationend\",topAnimationIteration:Cd(\"animationiteration\")||\"animationiteration\",topAnimationStart:Cd(\"animationstart\")||\"animationstart\",topBlur:\"blur\",topCancel:\"cancel\",topCanPlay:\"canplay\",topCanPlayThrough:\"canplaythrough\",topChange:\"change\",topClick:\"click\",topClose:\"close\",topCompositionEnd:\"compositionend\",topCompositionStart:\"compositionstart\",topCompositionUpdate:\"compositionupdate\",topContextMenu:\"contextmenu\",topCopy:\"copy\",topCut:\"cut\",topDoubleClick:\"dblclick\",topDrag:\"drag\",topDragEnd:\"dragend\",topDragEnter:\"dragenter\",topDragExit:\"dragexit\",topDragLeave:\"dragleave\",topDragOver:\"dragover\",topDragStart:\"dragstart\",topDrop:\"drop\",topDurationChange:\"durationchange\",topEmptied:\"emptied\",topEncrypted:\"encrypted\",topEnded:\"ended\",topError:\"error\",topFocus:\"focus\",topInput:\"input\",topKeyDown:\"keydown\",topKeyPress:\"keypress\",topKeyUp:\"keyup\",topLoadedData:\"loadeddata\",topLoad:\"load\",topLoadedMetadata:\"loadedmetadata\",topLoadStart:\"loadstart\",topMouseDown:\"mousedown\",topMouseMove:\"mousemove\",topMouseOut:\"mouseout\",topMouseOver:\"mouseover\",topMouseUp:\"mouseup\",topPaste:\"paste\",topPause:\"pause\",topPlay:\"play\",topPlaying:\"playing\",topProgress:\"progress\",topRateChange:\"ratechange\",topScroll:\"scroll\",topSeeked:\"seeked\",topSeeking:\"seeking\",topSelectionChange:\"selectionchange\",topStalled:\"stalled\",topSuspend:\"suspend\",topTextInput:\"textInput\",topTimeUpdate:\"timeupdate\",topToggle:\"toggle\",topTouchCancel:\"touchcancel\",topTouchEnd:\"touchend\",topTouchMove:\"touchmove\",topTouchStart:\"touchstart\",topTransitionEnd:Cd(\"transitionend\")||\"transitionend\",topVolumeChange:\"volumechange\",topWaiting:\"waiting\",topWheel:\"wheel\"},Ft={},$t=0,qt=\"_reactListenersID\"+(\"\"+Math.random()).slice(2);function Hd(e){return Object.prototype.hasOwnProperty.call(e,qt)||(e[qt]=$t++,Ft[e[qt]]={}),Ft[e[qt]]}function Id(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jd(e,t){var n=Id(e);e=0;for(var r;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Id(n)}}function Kd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(\"input\"===t&&\"text\"===e.type||\"textarea\"===t||\"true\"===e.contentEditable)}var zt=a.canUseDOM&&\"documentMode\"in document&&11>=document.documentMode,Vt={select:{phasedRegistrationNames:{bubbled:\"onSelect\",captured:\"onSelectCapture\"},dependencies:\"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange\".split(\" \")}},Wt=null,Ht=null,Kt=null,Gt=!1;function Rd(e,t){if(Gt||null==Wt||Wt!==p())return null;var n=Wt;return\"selectionStart\"in n&&Kd(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?n={anchorNode:(n=window.getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}:n=void 0,Kt&&_(Kt,n)?null:(Kt=n,(e=T.getPooled(Vt.select,Ht,e,t)).type=\"select\",e.target=Wt,Ab(e),e)}var Jt={eventTypes:Vt,extractEvents:function(e,t,n,r){var i,a=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(i=!a)){e:{a=Hd(a),i=Re.onSelect;for(var o=0;o<i.length;o++){var s=i[o];if(!a.hasOwnProperty(s)||!a[s]){a=!1;break e}}a=!0}i=!a}if(i)return null;switch(a=t?qb(t):window,e){case\"topFocus\":(vc(a)||\"true\"===a.contentEditable)&&(Wt=a,Ht=t,Kt=null);break;case\"topBlur\":Kt=Ht=Wt=null;break;case\"topMouseDown\":Gt=!0;break;case\"topContextMenu\":case\"topMouseUp\":return Gt=!1,Rd(n,r);case\"topSelectionChange\":if(zt)break;case\"topKeyDown\":case\"topKeyUp\":return Rd(n,r)}return null}};function Td(e,t,n,r){return T.call(this,e,t,n,r)}T.augmentClass(Td,{animationName:null,elapsedTime:null,pseudoElement:null});function Ud(e,t,n,r){return T.call(this,e,t,n,r)}T.augmentClass(Ud,{clipboardData:function(e){return\"clipboardData\"in e?e.clipboardData:window.clipboardData}});function Vd(e,t,n,r){return T.call(this,e,t,n,r)}bd.augmentClass(Vd,{relatedTarget:null});function Wd(e){var t=e.keyCode;return\"charCode\"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,32<=e||13===e?e:0}var Yt={Esc:\"Escape\",Spacebar:\" \",Left:\"ArrowLeft\",Up:\"ArrowUp\",Right:\"ArrowRight\",Down:\"ArrowDown\",Del:\"Delete\",Win:\"OS\",Menu:\"ContextMenu\",Apps:\"ContextMenu\",Scroll:\"ScrollLock\",MozPrintableKey:\"Unidentified\"},Xt={8:\"Backspace\",9:\"Tab\",12:\"Clear\",13:\"Enter\",16:\"Shift\",17:\"Control\",18:\"Alt\",19:\"Pause\",20:\"CapsLock\",27:\"Escape\",32:\" \",33:\"PageUp\",34:\"PageDown\",35:\"End\",36:\"Home\",37:\"ArrowLeft\",38:\"ArrowUp\",39:\"ArrowRight\",40:\"ArrowDown\",45:\"Insert\",46:\"Delete\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",116:\"F5\",117:\"F6\",118:\"F7\",119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"NumLock\",145:\"ScrollLock\",224:\"Meta\"};function Zd(e,t,n,r){return T.call(this,e,t,n,r)}bd.augmentClass(Zd,{key:function(e){if(e.key){var t=Yt[e.key]||e.key;if(\"Unidentified\"!==t)return t}return\"keypress\"===e.type?13===(e=Wd(e))?\"Enter\":String.fromCharCode(e):\"keydown\"===e.type||\"keyup\"===e.type?Xt[e.keyCode]||\"Unidentified\":\"\"},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:ed,charCode:function(e){return\"keypress\"===e.type?Wd(e):0},keyCode:function(e){return\"keydown\"===e.type||\"keyup\"===e.type?e.keyCode:0},which:function(e){return\"keypress\"===e.type?Wd(e):\"keydown\"===e.type||\"keyup\"===e.type?e.keyCode:0}});function $d(e,t,n,r){return T.call(this,e,t,n,r)}fd.augmentClass($d,{dataTransfer:null});function ae(e,t,n,r){return T.call(this,e,t,n,r)}bd.augmentClass(ae,{touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:ed});function be(e,t,n,r){return T.call(this,e,t,n,r)}T.augmentClass(be,{propertyName:null,elapsedTime:null,pseudoElement:null});function ce(e,t,n,r){return T.call(this,e,t,n,r)}fd.augmentClass(ce,{deltaX:function(e){return\"deltaX\"in e?e.deltaX:\"wheelDeltaX\"in e?-e.wheelDeltaX:0},deltaY:function(e){return\"deltaY\"in e?e.deltaY:\"wheelDeltaY\"in e?-e.wheelDeltaY:\"wheelDelta\"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null});var Qt={},Zt={};\"abort animationEnd animationIteration animationStart blur cancel canPlay canPlayThrough click close contextMenu copy cut doubleClick drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error focus input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing progress rateChange reset scroll seeked seeking stalled submit suspend timeUpdate toggle touchCancel touchEnd touchMove touchStart transitionEnd volumeChange waiting wheel\".split(\" \").forEach(function(e){var t=e[0].toUpperCase()+e.slice(1),n=\"on\"+t;n={phasedRegistrationNames:{bubbled:n,captured:n+\"Capture\"},dependencies:[t=\"top\"+t]},Qt[e]=n,Zt[t]=n});var en={eventTypes:Qt,extractEvents:function(e,t,n,r){var i=Zt[e];if(!i)return null;switch(e){case\"topKeyPress\":if(0===Wd(n))return null;case\"topKeyDown\":case\"topKeyUp\":e=Zd;break;case\"topBlur\":case\"topFocus\":e=Vd;break;case\"topClick\":if(2===n.button)return null;case\"topDoubleClick\":case\"topMouseDown\":case\"topMouseMove\":case\"topMouseUp\":case\"topMouseOut\":case\"topMouseOver\":case\"topContextMenu\":e=fd;break;case\"topDrag\":case\"topDragEnd\":case\"topDragEnter\":case\"topDragExit\":case\"topDragLeave\":case\"topDragOver\":case\"topDragStart\":case\"topDrop\":e=$d;break;case\"topTouchCancel\":case\"topTouchEnd\":case\"topTouchMove\":case\"topTouchStart\":e=ae;break;case\"topAnimationEnd\":case\"topAnimationIteration\":case\"topAnimationStart\":e=Td;break;case\"topTransitionEnd\":e=be;break;case\"topScroll\":e=bd;break;case\"topWheel\":e=ce;break;case\"topCopy\":case\"topCut\":case\"topPaste\":e=Ud;break;default:e=T}return Ab(t=e.getPooled(i,t,n,r)),t}};Lt=function(e,t,n,r){kb(e=jb(e,t,n,r)),lb(!1)},Ne.injectEventPluginOrder(\"ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin\".split(\" \")),Oe=We.getFiberCurrentPropsFromNode,Te=We.getInstanceFromNode,je=We.getNodeFromInstance,Ne.injectEventPluginsByName({SimpleEventPlugin:en,EnterLeaveEventPlugin:Tt,ChangeEventPlugin:Rt,SelectEventPlugin:Jt,BeforeInputEventPlugin:dt});var tn=[],nn=-1;function V(e){0>nn||(e.current=tn[nn],tn[nn]=null,nn--)}function W(e,t){tn[++nn]=e.current,e.current=t}new Set;var rn={current:S},an={current:!1},on=S;function ke(e){return le(e)?on:rn.current}function me(e,t){var n=e.type.contextTypes;if(!n)return S;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function le(e){return 2===e.tag&&null!=e.type.childContextTypes}function ne(e){le(e)&&(V(an),V(rn))}function oe(e,t,n){null!=rn.cursor&&E(\"168\"),W(rn,t),W(an,n)}function pe(e,t){var n=e.stateNode,r=e.type.childContextTypes;if(\"function\"!=typeof n.getChildContext)return t;n=n.getChildContext();for(var i in n)i in r||E(\"108\",jd(e)||\"Unknown\",i);return o({},t,n)}function qe(e){if(!le(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||S,on=rn.current,W(rn,t),W(an,an.current),!0}function re(e,t){var n=e.stateNode;if(n||E(\"169\"),t){var r=pe(e,on);n.__reactInternalMemoizedMergedChildContext=r,V(an),V(rn),W(rn,r)}else V(an);W(an,t)}function Y(e,t,n){this.tag=e,this.key=t,this.stateNode=this.type=null,this.sibling=this.child=this.return=null,this.index=0,this.memoizedState=this.updateQueue=this.memoizedProps=this.pendingProps=this.ref=null,this.internalContextTag=n,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function se(e,t,n){var r=e.alternate;return null===r?((r=new Y(e.tag,e.key,e.internalContextTag)).type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.pendingProps=t,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function te(e,t,n){var r=void 0,i=e.type,a=e.key;return\"function\"==typeof i?((r=i.prototype&&i.prototype.isReactComponent?new Y(2,a,t):new Y(0,a,t)).type=i,r.pendingProps=e.props):\"string\"==typeof i?((r=new Y(5,a,t)).type=i,r.pendingProps=e.props):\"object\"==typeof i&&null!==i&&\"number\"==typeof i.tag?(r=i).pendingProps=e.props:E(\"130\",null==i?i:typeof i,\"\"),r.expirationTime=n,r}function ue(e,t,n,r){return(t=new Y(10,r,t)).pendingProps=e,t.expirationTime=n,t}function ve(e,t,n){return(t=new Y(6,null,t)).pendingProps=e,t.expirationTime=n,t}function we(e,t,n){return(t=new Y(7,e.key,t)).type=e.handler,t.pendingProps=e,t.expirationTime=n,t}function xe(e,t,n){return(e=new Y(9,null,t)).expirationTime=n,e}function ye(e,t,n){return(t=new Y(4,e.key,t)).pendingProps=e.children||[],t.expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var sn=null,ln=null;function Be(e){return function(t){try{return e(t)}catch(e){}}}function De(e){\"function\"==typeof sn&&sn(e)}function Ee(e){\"function\"==typeof ln&&ln(e)}function Fe(e){return{baseState:e,expirationTime:0,first:null,last:null,callbackList:null,hasForceUpdate:!1,isInitialized:!1}}function Ge(e,t){null===e.last?e.first=e.last=t:(e.last.next=t,e.last=t),(0===e.expirationTime||e.expirationTime>t.expirationTime)&&(e.expirationTime=t.expirationTime)}function He(e,t){var n=e.alternate,r=e.updateQueue;null===r&&(r=e.updateQueue=Fe(null)),null!==n?null===(e=n.updateQueue)&&(e=n.updateQueue=Fe(null)):e=null,null===(e=e!==r?e:null)?Ge(r,t):null===r.last||null===e.last?(Ge(r,t),Ge(e,t)):(Ge(r,t),e.last=t)}function Ie(e,t,n,r){return\"function\"==typeof(e=e.partialState)?e.call(t,n,r):e}function Je(e,t,n,r,i,a){null!==e&&e.updateQueue===n&&(n=t.updateQueue={baseState:n.baseState,expirationTime:n.expirationTime,first:n.first,last:n.last,isInitialized:n.isInitialized,callbackList:null,hasForceUpdate:!1}),n.expirationTime=0,n.isInitialized?e=n.baseState:(e=n.baseState=t.memoizedState,n.isInitialized=!0);for(var s=!0,l=n.first,u=!1;null!==l;){var c=l.expirationTime;if(c>a){var p=n.expirationTime;(0===p||p>c)&&(n.expirationTime=c),u||(u=!0,n.baseState=e)}else u||(n.first=l.next,null===n.first&&(n.last=null)),l.isReplace?(e=Ie(l,r,e,i),s=!0):(c=Ie(l,r,e,i))&&(e=s?o({},e,c):o(e,c),s=!1),l.isForced&&(n.hasForceUpdate=!0),null!==l.callback&&(c=n.callbackList,null===c&&(c=n.callbackList=[]),c.push(l));l=l.next}return null!==n.callbackList?t.effectTag|=32:null!==n.first||n.hasForceUpdate||(t.updateQueue=null),u||(n.baseState=e),e}function Ke(e,t){var n=e.callbackList;if(null!==n)for(e.callbackList=null,e=0;e<n.length;e++){var r=n[e],i=r.callback;r.callback=null,\"function\"!=typeof i&&E(\"191\",i),i.call(t)}}var un=\"function\"==typeof Symbol&&Symbol.for,cn=un?Symbol.for(\"react.element\"):60103,pn=un?Symbol.for(\"react.call\"):60104,hn=un?Symbol.for(\"react.return\"):60105,fn=un?Symbol.for(\"react.portal\"):60106,dn=un?Symbol.for(\"react.fragment\"):60107,mn=\"function\"==typeof Symbol&&Symbol.iterator;function Xe(e){return null===e||void 0===e?null:\"function\"==typeof(e=mn&&e[mn]||e[\"@@iterator\"])?e:null}var gn=Array.isArray;function Ze(e,t){var n=t.ref;if(null!==n&&\"function\"!=typeof n){if(t._owner){var r=void 0;(t=t._owner)&&(2!==t.tag&&E(\"110\"),r=t.stateNode),r||E(\"147\",n);var i=\"\"+n;return null!==e&&null!==e.ref&&e.ref._stringRef===i?e.ref:((e=function(e){var t=r.refs===S?r.refs={}:r.refs;null===e?delete t[i]:t[i]=e})._stringRef=i,e)}\"string\"!=typeof n&&E(\"148\"),t._owner||E(\"149\",n)}return n}function $e(e,t){\"textarea\"!==e.type&&E(\"31\",\"[object Object]\"===Object.prototype.toString.call(t)?\"object with keys {\"+Object.keys(t).join(\", \")+\"}\":t,\"\")}function af(t){function b(e,n){if(t){var r=e.lastEffect;null!==r?(r.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function c(e,n){if(!t)return null;for(;null!==n;)b(e,n),n=n.sibling;return null}function d(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function e(e,t,n){return(e=se(e,t,n)).index=0,e.sibling=null,e}function f(e,n,r){return e.index=r,t?null!==(r=e.alternate)?(r=r.index)<n?(e.effectTag=2,n):r:(e.effectTag=2,n):n}function g(e){return t&&null===e.alternate&&(e.effectTag=2),e}function h(t,n,r,i){return null===n||6!==n.tag?((n=ve(r,t.internalContextTag,i)).return=t,n):((n=e(n,r,i)).return=t,n)}function k(t,n,r,i){return null!==n&&n.type===r.type?((i=e(n,r.props,i)).ref=Ze(n,r),i.return=t,i):((i=te(r,t.internalContextTag,i)).ref=Ze(n,r),i.return=t,i)}function q(t,n,r,i){return null===n||7!==n.tag?((n=we(r,t.internalContextTag,i)).return=t,n):((n=e(n,r,i)).return=t,n)}function v(t,n,r,i){return null===n||9!==n.tag?((n=xe(r,t.internalContextTag,i)).type=r.value,n.return=t,n):((n=e(n,null,i)).type=r.value,n.return=t,n)}function y(t,n,r,i){return null===n||4!==n.tag||n.stateNode.containerInfo!==r.containerInfo||n.stateNode.implementation!==r.implementation?((n=ye(r,t.internalContextTag,i)).return=t,n):((n=e(n,r.children||[],i)).return=t,n)}function u(t,n,r,i,a){return null===n||10!==n.tag?((n=ue(r,t.internalContextTag,i,a)).return=t,n):((n=e(n,r,i)).return=t,n)}function z(e,t,n){if(\"string\"==typeof t||\"number\"==typeof t)return t=ve(\"\"+t,e.internalContextTag,n),t.return=e,t;if(\"object\"==typeof t&&null!==t){switch(t.$$typeof){case cn:return t.type===dn?((t=ue(t.props.children,e.internalContextTag,n,t.key)).return=e,t):((n=te(t,e.internalContextTag,n)).ref=Ze(null,t),n.return=e,n);case pn:return(t=we(t,e.internalContextTag,n)).return=e,t;case hn:return(n=xe(t,e.internalContextTag,n)).type=t.value,n.return=e,n;case fn:return(t=ye(t,e.internalContextTag,n)).return=e,t}if(gn(t)||Xe(t))return t=ue(t,e.internalContextTag,n,null),t.return=e,t;$e(e,t)}return null}function G(e,t,n,r){var i=null!==t?t.key:null;if(\"string\"==typeof n||\"number\"==typeof n)return null!==i?null:h(e,t,\"\"+n,r);if(\"object\"==typeof n&&null!==n){switch(n.$$typeof){case cn:return n.key===i?n.type===dn?u(e,t,n.props.children,r,i):k(e,t,n,r):null;case pn:return n.key===i?q(e,t,n,r):null;case hn:return null===i?v(e,t,n,r):null;case fn:return n.key===i?y(e,t,n,r):null}if(gn(n)||Xe(n))return null!==i?null:u(e,t,n,r,null);$e(e,n)}return null}function I(e,t,n,r,i){if(\"string\"==typeof r||\"number\"==typeof r)return e=e.get(n)||null,h(t,e,\"\"+r,i);if(\"object\"==typeof r&&null!==r){switch(r.$$typeof){case cn:return e=e.get(null===r.key?n:r.key)||null,r.type===dn?u(t,e,r.props.children,i,r.key):k(t,e,r,i);case pn:return q(t,e=e.get(null===r.key?n:r.key)||null,r,i);case hn:return v(t,e=e.get(n)||null,r,i);case fn:return y(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(gn(r)||Xe(r))return e=e.get(n)||null,u(t,e,r,i,null);$e(t,r)}return null}return function(n,r,i,a){\"object\"==typeof i&&null!==i&&i.type===dn&&null===i.key&&(i=i.props.children);var o=\"object\"==typeof i&&null!==i;if(o)switch(i.$$typeof){case cn:e:{var s=i.key;for(o=r;null!==o;){if(o.key===s){if(10===o.tag?i.type===dn:o.type===i.type){c(n,o.sibling),(r=e(o,i.type===dn?i.props.children:i.props,a)).ref=Ze(o,i),r.return=n,n=r;break e}c(n,o);break}b(n,o),o=o.sibling}i.type===dn?((r=ue(i.props.children,n.internalContextTag,a,i.key)).return=n,n=r):((a=te(i,n.internalContextTag,a)).ref=Ze(r,i),a.return=n,n=a)}return g(n);case pn:e:{for(o=i.key;null!==r;){if(r.key===o){if(7===r.tag){c(n,r.sibling),(r=e(r,i,a)).return=n,n=r;break e}c(n,r);break}b(n,r),r=r.sibling}(r=we(i,n.internalContextTag,a)).return=n,n=r}return g(n);case hn:e:{if(null!==r){if(9===r.tag){c(n,r.sibling),(r=e(r,null,a)).type=i.value,r.return=n,n=r;break e}c(n,r)}(r=xe(i,n.internalContextTag,a)).type=i.value,r.return=n,n=r}return g(n);case fn:e:{for(o=i.key;null!==r;){if(r.key===o){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){c(n,r.sibling),(r=e(r,i.children||[],a)).return=n,n=r;break e}c(n,r);break}b(n,r),r=r.sibling}(r=ye(i,n.internalContextTag,a)).return=n,n=r}return g(n)}if(\"string\"==typeof i||\"number\"==typeof i)return i=\"\"+i,null!==r&&6===r.tag?(c(n,r.sibling),r=e(r,i,a)):(c(n,r),r=ve(i,n.internalContextTag,a)),r.return=n,n=r,g(n);if(gn(i))return function L(e,n,r,i){for(var a=null,o=null,s=n,l=n=0,u=null;null!==s&&l<r.length;l++){s.index>l?(u=s,s=null):u=s.sibling;var p=G(e,s,r[l],i);if(null===p){null===s&&(s=u);break}t&&s&&null===p.alternate&&b(e,s),n=f(p,n,l),null===o?a=p:o.sibling=p,o=p,s=u}if(l===r.length)return c(e,s),a;if(null===s){for(;l<r.length;l++)(s=z(e,r[l],i))&&(n=f(s,n,l),null===o?a=s:o.sibling=s,o=s);return a}for(s=d(e,s);l<r.length;l++)(u=I(s,e,l,r[l],i))&&(t&&null!==u.alternate&&s.delete(null===u.key?l:u.key),n=f(u,n,l),null===o?a=u:o.sibling=u,o=u);return t&&s.forEach(function(t){return b(e,t)}),a}(n,r,i,a);if(Xe(i))return function N(e,n,r,i){var a=Xe(r);\"function\"!=typeof a&&E(\"150\"),null==(r=a.call(r))&&E(\"151\");for(var o=a=null,s=n,l=n=0,u=null,p=r.next();null!==s&&!p.done;l++,p=r.next()){s.index>l?(u=s,s=null):u=s.sibling;var h=G(e,s,p.value,i);if(null===h){s||(s=u);break}t&&s&&null===h.alternate&&b(e,s),n=f(h,n,l),null===o?a=h:o.sibling=h,o=h,s=u}if(p.done)return c(e,s),a;if(null===s){for(;!p.done;l++,p=r.next())p=z(e,p.value,i),null!==p&&(n=f(p,n,l),null===o?a=p:o.sibling=p,o=p);return a}for(s=d(e,s);!p.done;l++,p=r.next())p=I(s,e,l,p.value,i),null!==p&&(t&&null!==p.alternate&&s.delete(null===p.key?l:p.key),n=f(p,n,l),null===o?a=p:o.sibling=p,o=p);return t&&s.forEach(function(t){return b(e,t)}),a}(n,r,i,a);if(o&&$e(n,i),void 0===i)switch(n.tag){case 2:case 1:E(\"152\",(a=n.type).displayName||a.name||\"Component\")}return c(n,r)}}var yn=af(!0),vn=af(!1);function df(e,t,n,r,i){function f(e,t,n){var r=t.expirationTime;t.child=null===e?vn(t,null,n,r):yn(t,e.child,n,r)}function g(e,t){var n=t.ref;null===n||e&&e.ref===n||(t.effectTag|=128)}function h(e,t,n,r){if(g(e,t),!n)return r&&re(t,!1),q(e,t);n=t.stateNode,jt.current=t;var i=n.render();return t.effectTag|=1,f(e,t,i),t.memoizedState=n.state,t.memoizedProps=n.props,r&&re(t,!0),t.child}function k(e){var t=e.stateNode;t.pendingContext?oe(0,t.pendingContext,t.pendingContext!==t.context):t.context&&oe(0,t.context,!1),u(e,t.containerInfo)}function q(e,t){if(null!==e&&t.child!==e.child&&E(\"153\"),null!==t.child){var n=se(e=t.child,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,n=n.sibling=se(e,e.pendingProps,e.expirationTime),n.return=t;n.sibling=null}return t.child}function v(e,t){switch(t.tag){case 3:k(t);break;case 2:qe(t);break;case 4:u(t,t.stateNode.containerInfo)}return null}var a=e.shouldSetTextContent,o=e.useSyncScheduling,s=e.shouldDeprioritizeSubtree,l=t.pushHostContext,u=t.pushHostContainer,c=n.enterHydrationState,p=n.resetHydrationState,d=n.tryToClaimNextHydratableInstance,m=(e=function Le(t,n,r,i){function e(e,t){t.updater=a,e.stateNode=t,t._reactInternalFiber=e}var a={isMounted:ld,enqueueSetState:function(e,r,i){e=e._reactInternalFiber,i=void 0===i?null:i;var a=n(e);He(e,{expirationTime:a,partialState:r,callback:i,isReplace:!1,isForced:!1,nextCallback:null,next:null}),t(e,a)},enqueueReplaceState:function(e,r,i){e=e._reactInternalFiber,i=void 0===i?null:i;var a=n(e);He(e,{expirationTime:a,partialState:r,callback:i,isReplace:!0,isForced:!1,nextCallback:null,next:null}),t(e,a)},enqueueForceUpdate:function(e,r){e=e._reactInternalFiber,r=void 0===r?null:r;var i=n(e);He(e,{expirationTime:i,partialState:null,callback:r,isReplace:!1,isForced:!0,nextCallback:null,next:null}),t(e,i)}};return{adoptClassInstance:e,constructClassInstance:function(t,n){var r=t.type,i=ke(t),a=2===t.tag&&null!=t.type.contextTypes,o=a?me(t,i):S;return e(t,n=new r(n,o)),a&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=o),n},mountClassInstance:function(e,t){var n=e.alternate,r=e.stateNode,i=r.state||null,o=e.pendingProps;o||E(\"158\");var s=ke(e);r.props=o,r.state=e.memoizedState=i,r.refs=S,r.context=me(e,s),null!=e.type&&null!=e.type.prototype&&!0===e.type.prototype.unstable_isAsyncReactComponent&&(e.internalContextTag|=1),\"function\"==typeof r.componentWillMount&&(i=r.state,r.componentWillMount(),i!==r.state&&a.enqueueReplaceState(r,r.state,null),i=e.updateQueue,null!==i&&(r.state=Je(n,e,i,r,o,t))),\"function\"==typeof r.componentDidMount&&(e.effectTag|=4)},updateClassInstance:function(e,t,n){var o=t.stateNode;o.props=t.memoizedProps,o.state=t.memoizedState;var s=t.memoizedProps,l=t.pendingProps;l||(l=s,null==l&&E(\"159\"));var u=o.context,c=ke(t);if(c=me(t,c),\"function\"!=typeof o.componentWillReceiveProps||s===l&&u===c||(u=o.state,o.componentWillReceiveProps(l,c),o.state!==u&&a.enqueueReplaceState(o,o.state,null)),u=t.memoizedState,n=null!==t.updateQueue?Je(e,t,t.updateQueue,o,l,n):u,!(s!==l||u!==n||an.current||null!==t.updateQueue&&t.updateQueue.hasForceUpdate))return\"function\"!=typeof o.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),!1;var p=l;if(null===s||null!==t.updateQueue&&t.updateQueue.hasForceUpdate)p=!0;else{var h=t.stateNode,f=t.type;p=\"function\"==typeof h.shouldComponentUpdate?h.shouldComponentUpdate(p,n,c):!(f.prototype&&f.prototype.isPureReactComponent&&_(s,p)&&_(u,n))}return p?(\"function\"==typeof o.componentWillUpdate&&o.componentWillUpdate(l,n,c),\"function\"==typeof o.componentDidUpdate&&(t.effectTag|=4)):(\"function\"!=typeof o.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),r(t,l),i(t,n)),o.props=l,o.state=n,o.context=c,p}}}(r,i,function(e,t){e.memoizedProps=t},function(e,t){e.memoizedState=t})).adoptClassInstance,y=e.constructClassInstance,b=e.mountClassInstance,x=e.updateClassInstance;return{beginWork:function(e,t,n){if(0===t.expirationTime||t.expirationTime>n)return v(0,t);switch(t.tag){case 0:null!==e&&E(\"155\");var r=t.type,i=t.pendingProps,_=ke(t);return r=r(i,_=me(t,_)),t.effectTag|=1,\"object\"==typeof r&&null!==r&&\"function\"==typeof r.render?(t.tag=2,i=qe(t),m(t,r),b(t,n),t=h(e,t,!0,i)):(t.tag=1,f(e,t,r),t.memoizedProps=i,t=t.child),t;case 1:e:{if(i=t.type,n=t.pendingProps,r=t.memoizedProps,an.current)null===n&&(n=r);else if(null===n||r===n){t=q(e,t);break e}i=i(n,r=me(t,r=ke(t))),t.effectTag|=1,f(e,t,i),t.memoizedProps=n,t=t.child}return t;case 2:return i=qe(t),r=void 0,null===e?t.stateNode?E(\"153\"):(y(t,t.pendingProps),b(t,n),r=!0):r=x(e,t,n),h(e,t,r,i);case 3:return k(t),null!==(i=t.updateQueue)?(r=t.memoizedState)===(i=Je(e,t,i,null,null,n))?(p(),t=q(e,t)):(r=i.element,_=t.stateNode,(null===e||null===e.child)&&_.hydrate&&c(t)?(t.effectTag|=2,t.child=vn(t,null,r,n)):(p(),f(e,t,r)),t.memoizedState=i,t=t.child):(p(),t=q(e,t)),t;case 5:l(t),null===e&&d(t),i=t.type;var w=t.memoizedProps;return null===(r=t.pendingProps)&&(r=w,null===r&&E(\"154\")),_=null!==e?e.memoizedProps:null,an.current||null!==r&&w!==r?(w=r.children,a(i,r)?w=null:_&&a(i,_)&&(t.effectTag|=16),g(e,t),2147483647!==n&&!o&&s(i,r)?(t.expirationTime=2147483647,t=null):(f(e,t,w),t.memoizedProps=r,t=t.child)):t=q(e,t),t;case 6:return null===e&&d(t),null===(e=t.pendingProps)&&(e=t.memoizedProps),t.memoizedProps=e,null;case 8:t.tag=7;case 7:return i=t.pendingProps,an.current?null===i&&(i=e&&e.memoizedProps,null===i&&E(\"154\")):null!==i&&t.memoizedProps!==i||(i=t.memoizedProps),r=i.children,t.stateNode=null===e?vn(t,t.stateNode,r,n):yn(t,t.stateNode,r,n),t.memoizedProps=i,t.stateNode;case 9:return null;case 4:e:{if(u(t,t.stateNode.containerInfo),i=t.pendingProps,an.current)null===i&&(i=e&&e.memoizedProps,null==i&&E(\"154\"));else if(null===i||t.memoizedProps===i){t=q(e,t);break e}null===e?t.child=yn(t,null,i,n):f(e,t,i),t.memoizedProps=i,t=t.child}return t;case 10:e:{if(n=t.pendingProps,an.current)null===n&&(n=t.memoizedProps);else if(null===n||t.memoizedProps===n){t=q(e,t);break e}f(e,t,n),t.memoizedProps=n,t=t.child}return t;default:E(\"156\")}},beginFailedWork:function(e,t,n){switch(t.tag){case 2:qe(t);break;case 3:k(t);break;default:E(\"157\")}return t.effectTag|=64,null===e?t.child=null:t.child!==e.child&&(t.child=e.child),0===t.expirationTime||t.expirationTime>n?v(0,t):(t.firstEffect=null,t.lastEffect=null,t.child=null===e?vn(t,null,null,n):yn(t,e.child,null,n),2===t.tag&&(e=t.stateNode,t.memoizedProps=e.props,t.memoizedState=e.state),t.child)}}}var bn={};function kf(t){function b(e){ce=Q=!0;var t=e.stateNode;if(t.current===e&&E(\"177\"),t.isReadyForCommit=!1,jt.current=null,1<e.effectTag)if(null!==e.lastEffect){e.lastEffect.nextEffect=e;var n=e.firstEffect}else n=e;else n=e.firstEffect;for(F(),re=n;null!==re;){var r=!1,i=void 0;try{for(;null!==re;){var a=re.effectTag;if(16&a&&x(re),128&a){var o=re.alternate;null!==o&&j(o)}switch(-242&a){case 2:C(re),re.effectTag&=-3;break;case 6:C(re),re.effectTag&=-3,P(re.alternate,re);break;case 4:P(re.alternate,re);break;case 8:pe=!0,R(re),pe=!1}re=re.nextEffect}}catch(e){r=!0,i=e}r&&(null===re&&E(\"178\"),h(re,i),null!==re&&(re=re.nextEffect))}for($(),t.current=e,re=n;null!==re;){n=!1,r=void 0;try{for(;null!==re;){var s=re.effectTag;if(36&s&&O(re.alternate,re),128&s&&T(re),64&s)switch(i=re,a=void 0,null!==ie&&(a=ie.get(i),ie.delete(i),null==a&&null!==i.alternate&&(i=i.alternate,a=ie.get(i),ie.delete(i))),null==a&&E(\"184\"),i.tag){case 2:i.stateNode.componentDidCatch(a.error,{componentStack:a.componentStack});break;case 3:null===le&&(le=a.error);break;default:E(\"157\")}var l=re.nextEffect;re.nextEffect=null,re=l}}catch(e){n=!0,r=e}n&&(null===re&&E(\"178\"),h(re,r),null!==re&&(re=re.nextEffect))}return Q=ce=!1,De(e.stateNode),oe&&(oe.forEach(G),oe=null),null!==le&&(e=le,le=null,Ob(e)),0===(t=t.current.expirationTime)&&(ae=ie=null),t}function c(e){for(;;){var t=_(e.alternate,e,te),n=e.return,r=e.sibling,i=e;if(2147483647===te||2147483647!==i.expirationTime){if(2!==i.tag&&3!==i.tag)var a=0;else a=i.updateQueue,a=null===a?0:a.expirationTime;for(var o=i.child;null!==o;)0!==o.expirationTime&&(0===a||a>o.expirationTime)&&(a=o.expirationTime),o=o.sibling;i.expirationTime=a}if(null!==t)return t;if(null!==n&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1<e.effectTag&&(null!==n.lastEffect?n.lastEffect.nextEffect=e:n.firstEffect=e,n.lastEffect=e)),null!==r)return r;if(null===n){e.stateNode.isReadyForCommit=!0;break}e=n}return null}function d(e){var t=l(e.alternate,e,te);return null===t&&(t=c(e)),jt.current=null,t}function e(e){var t=p(e.alternate,e,te);return null===t&&(t=c(e)),jt.current=null,t}function f(t){if(null!==ie){if(!(0===te||te>t))if(te<=K)for(;null!==Z;)Z=k(Z)?e(Z):d(Z);else for(;null!==Z&&!A();)Z=k(Z)?e(Z):d(Z)}else if(!(0===te||te>t))if(te<=K)for(;null!==Z;)Z=d(Z);else for(;null!==Z&&!A();)Z=d(Z)}function g(t,n){if(Q&&E(\"243\"),Q=!0,t.isReadyForCommit=!1,t!==ee||n!==te||null===Z){for(;-1<nn;)tn[nn]=null,nn--;on=S,rn.current=S,an.current=!1,o(),te=n,Z=se((ee=t).current,null,n)}var r=!1,s=null;try{f(n)}catch(e){r=!0,s=e}for(;r;){if(ue){le=s;break}var l=Z;if(null===l)ue=!0;else{var u=h(l,s);if(null===u&&E(\"183\"),!ue){try{for(s=n,u=r=u;null!==l;){switch(l.tag){case 2:ne(l);break;case 5:a(l);break;case 3:i(l);break;case 4:i(l)}if(l===u||l.alternate===u)break;l=l.return}Z=e(r),f(s)}catch(e){r=!0,s=e;continue}break}}}return n=le,ue=Q=!1,le=null,null!==n&&Ob(n),t.isReadyForCommit?t.current.alternate:null}function h(e,t){var n=jt.current=null,r=!1,i=!1,a=null;if(3===e.tag)n=e,q(e)&&(ue=!0);else for(var o=e.return;null!==o&&null===n;){if(2===o.tag?\"function\"==typeof o.stateNode.componentDidCatch&&(r=!0,a=jd(o),n=o,i=!0):3===o.tag&&(n=o),q(o)){if(pe||null!==oe&&(oe.has(o)||null!==o.alternate&&oe.has(o.alternate)))return null;n=null,i=!1}o=o.return}if(null!==n){null===ae&&(ae=new Set),ae.add(n);var s=\"\";o=e;do{e:switch(o.tag){case 0:case 1:case 2:case 5:var l=o._debugOwner,u=o._debugSource,c=jd(o),p=null;l&&(p=jd(l)),l=u,c=\"\\n    in \"+(c||\"Unknown\")+(l?\" (at \"+l.fileName.replace(/^.*[\\\\\\/]/,\"\")+\":\"+l.lineNumber+\")\":p?\" (created by \"+p+\")\":\"\");break e;default:c=\"\"}s+=c,o=o.return}while(o);o=s,e=jd(e),null===ie&&(ie=new Map),t={componentName:e,componentStack:o,error:t,errorBoundary:r?n.stateNode:null,errorBoundaryFound:r,errorBoundaryName:a,willRetry:i},ie.set(n,t);try{var h=t.error;h&&h.suppressReactErrorLogging||console.error(h)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}return ce?(null===oe&&(oe=new Set),oe.add(n)):G(n),n}return null===le&&(le=t),null}function k(e){return null!==ie&&(ie.has(e)||null!==e.alternate&&ie.has(e.alternate))}function q(e){return null!==ae&&(ae.has(e)||null!==e.alternate&&ae.has(e.alternate))}function v(){return 20*(1+((I()+100)/20|0))}function y(e){return 0!==X?X:Q?ce?1:te:!U||1&e.internalContextTag?v():1}function u(e,t){return z(e,t)}function z(e,t){for(;null!==e;){if((0===e.expirationTime||e.expirationTime>t)&&(e.expirationTime=t),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>t)&&(e.alternate.expirationTime=t),null===e.return){if(3!==e.tag)break;var n=e.stateNode;!Q&&n===ee&&t<te&&(Z=ee=null,te=0);var r=n,i=t;if(Re>Se&&E(\"185\"),null===r.nextScheduledRoot)r.remainingExpirationTime=i,null===fe?(he=fe=r,r.nextScheduledRoot=r):(fe=fe.nextScheduledRoot=r,fe.nextScheduledRoot=he);else{var a=r.remainingExpirationTime;(0===a||i<a)&&(r.remainingExpirationTime=i)}ge||(ke?Ce&&(ye=r,ve=1,m(ye,ve)):1===i?w(1,null):L(i)),!Q&&n===ee&&t<te&&(Z=ee=null,te=0)}e=e.return}}function G(e){z(e,1)}function I(){return K=2+((M()-H)/10|0)}function L(e){if(0!==de){if(e>de)return;B(me)}var t=M()-H;de=e,me=D(J,{timeout:10*(e-2)-t})}function N(){var e=0,t=null;if(null!==fe)for(var n=fe,r=he;null!==r;){var i=r.remainingExpirationTime;if(0===i){if((null===n||null===fe)&&E(\"244\"),r===r.nextScheduledRoot){he=fe=r.nextScheduledRoot=null;break}if(r===he)he=i=r.nextScheduledRoot,fe.nextScheduledRoot=i,r.nextScheduledRoot=null;else{if(r===fe){(fe=n).nextScheduledRoot=he,r.nextScheduledRoot=null;break}n.nextScheduledRoot=r.nextScheduledRoot,r.nextScheduledRoot=null}r=n.nextScheduledRoot}else{if((0===e||i<e)&&(e=i,t=r),r===fe)break;n=r,r=r.nextScheduledRoot}}null!==(n=ye)&&n===t?Re++:Re=0,ye=t,ve=e}function J(e){w(0,e)}function w(e,t){for(we=t,N();null!==ye&&0!==ve&&(0===e||ve<=e)&&!be;)m(ye,ve),N();if(null!==we&&(de=0,me=-1),0!==ve&&L(ve),we=null,be=!1,Re=0,_e)throw e=xe,xe=null,_e=!1,e}function m(e,t){if(ge&&E(\"245\"),ge=!0,t<=I()){var n=e.finishedWork;null!==n?(e.finishedWork=null,e.remainingExpirationTime=b(n)):(e.finishedWork=null,null!==(n=g(e,t))&&(e.remainingExpirationTime=b(n)))}else n=e.finishedWork,null!==n?(e.finishedWork=null,e.remainingExpirationTime=b(n)):(e.finishedWork=null,n=g(e,t),null!==n&&(A()?e.finishedWork=n:e.remainingExpirationTime=b(n)));ge=!1}function A(){return!(null===we||we.timeRemaining()>Pe)&&(be=!0)}function Ob(e){null===ye&&E(\"246\"),ye.remainingExpirationTime=0,_e||(_e=!0,xe=e)}var n=function hf(e){function b(e){return e===bn&&E(\"174\"),e}var t=e.getChildHostContext,n=e.getRootHostContext,r={current:bn},i={current:bn},a={current:bn};return{getHostContext:function(){return b(r.current)},getRootHostContainer:function(){return b(a.current)},popHostContainer:function(e){V(r),V(i),V(a)},popHostContext:function(e){i.current===e&&(V(r),V(i))},pushHostContainer:function(e,t){W(a,t),t=n(t),W(i,e),W(r,t)},pushHostContext:function(e){var n=b(a.current),o=b(r.current);o!==(n=t(o,e.type,n))&&(W(i,e),W(r,n))},resetHostContainer:function(){r.current=bn,a.current=bn}}}(t),r=function jf(e){function b(e,t){var n=new Y(5,null,0);n.type=\"DELETED\",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function c(e,t){switch(e.tag){case 5:return null!==(t=n(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=r(t,e.pendingProps))&&(e.stateNode=t,!0);default:return!1}}function d(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;l=e}var t=e.shouldSetTextContent;if(!(e=e.hydration))return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){E(\"175\")},prepareToHydrateHostTextInstance:function(){E(\"176\")},popHydrationState:function(){return!1}};var n=e.canHydrateInstance,r=e.canHydrateTextInstance,i=e.getNextHydratableSibling,a=e.getFirstHydratableChild,o=e.hydrateInstance,s=e.hydrateTextInstance,l=null,u=null,p=!1;return{enterHydrationState:function(e){return u=a(e.stateNode.containerInfo),l=e,p=!0},resetHydrationState:function(){u=l=null,p=!1},tryToClaimNextHydratableInstance:function(e){if(p){var t=u;if(t){if(!c(e,t)){if(!(t=i(t))||!c(e,t))return e.effectTag|=2,p=!1,void(l=e);b(l,u)}l=e,u=a(t)}else e.effectTag|=2,p=!1,l=e}},prepareToHydrateHostInstance:function(e,t,n){return t=o(e.stateNode,e.type,e.memoizedProps,t,n,e),e.updateQueue=t,null!==t},prepareToHydrateHostTextInstance:function(e){return s(e.stateNode,e.memoizedProps,e)},popHydrationState:function(e){if(e!==l)return!1;if(!p)return d(e),p=!0,!1;var n=e.type;if(5!==e.tag||\"head\"!==n&&\"body\"!==n&&!t(n,e.memoizedProps))for(n=u;n;)b(e,n),n=i(n);return d(e),u=l?i(e.stateNode):null,!0}}}(t),i=n.popHostContainer,a=n.popHostContext,o=n.resetHostContainer,s=df(t,n,r,u,y),l=s.beginWork,p=s.beginFailedWork,_=function ef(e,t,n){function d(e){e.effectTag|=4}var r=e.createInstance,i=e.createTextInstance,a=e.appendInitialChild,o=e.finalizeInitialChildren,s=e.prepareUpdate,l=e.persistence,u=t.getRootHostContainer,c=t.popHostContext,p=t.getHostContext,h=t.popHostContainer,f=n.prepareToHydrateHostInstance,m=n.prepareToHydrateHostTextInstance,g=n.popHydrationState,y=void 0,v=void 0,b=void 0;return e.mutation?(y=function(){},v=function(e,t,n){(t.updateQueue=n)&&d(t)},b=function(e,t,n,r){n!==r&&d(t)}):E(l?\"235\":\"236\"),{completeWork:function(e,t,n){var l=t.pendingProps;switch(null===l?l=t.memoizedProps:2147483647===t.expirationTime&&2147483647!==n||(t.pendingProps=null),t.tag){case 1:return null;case 2:return ne(t),null;case 3:return h(t),V(an),V(rn),(l=t.stateNode).pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),null!==e&&null!==e.child||(g(t),t.effectTag&=-3),y(t),null;case 5:c(t),n=u();var _=t.type;if(null!==e&&null!=t.stateNode){var x=e.memoizedProps,w=t.stateNode,k=p();w=s(w,_,x,l,n,k),v(e,t,w,_,x,l,n),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!l)return null===t.stateNode&&E(\"166\"),null;if(e=p(),g(t))f(t,n,e)&&d(t);else{e=r(_,l,n,e,t);e:for(x=t.child;null!==x;){if(5===x.tag||6===x.tag)a(e,x.stateNode);else if(4!==x.tag&&null!==x.child){x.child.return=x,x=x.child;continue}if(x===t)break;for(;null===x.sibling;){if(null===x.return||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}o(e,_,l,n)&&d(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)b(e,t,e.memoizedProps,l);else{if(\"string\"!=typeof l)return null===t.stateNode&&E(\"166\"),null;e=u(),n=p(),g(t)?m(t)&&d(t):t.stateNode=i(l,e,n,t)}return null;case 7:(l=t.memoizedProps)||E(\"165\"),t.tag=8,_=[];e:for((x=t.stateNode)&&(x.return=t);null!==x;){if(5===x.tag||6===x.tag||4===x.tag)E(\"247\");else if(9===x.tag)_.push(x.type);else if(null!==x.child){x.child.return=x,x=x.child;continue}for(;null===x.sibling;){if(null===x.return||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}return l=(x=l.handler)(l.props,_),t.child=yn(t,null!==e?e.child:null,l,n),t.child;case 8:return t.tag=7,null;case 9:case 10:return null;case 4:return h(t),y(t),null;case 0:E(\"167\");default:E(\"156\")}}}}(t,n,r).completeWork,x=(n=function ff(t,n){function c(e){var t=e.ref;if(null!==t)try{t(null)}catch(t){n(e,t)}}function d(t){switch(Ee(t),t.tag){case 2:c(t);var r=t.stateNode;if(\"function\"==typeof r.componentWillUnmount)try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(e){n(t,e)}break;case 5:c(t);break;case 7:e(t.stateNode);break;case 4:i&&g(t)}}function e(e){for(var t=e;;)if(d(t),null===t.child||i&&4===t.tag){if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}else t.child.return=t,t=t.child}function f(e){return 5===e.tag||3===e.tag||4===e.tag}function g(t){for(var n=t,r=!1,i=void 0,a=void 0;;){if(!r){r=n.return;e:for(;;){switch(null===r&&E(\"160\"),r.tag){case 5:i=r.stateNode,a=!1;break e;case 3:case 4:i=r.stateNode.containerInfo,a=!0;break e}r=r.return}r=!0}if(5===n.tag||6===n.tag)e(n),a?v(i,n.stateNode):y(i,n.stateNode);else if(4===n.tag?i=n.stateNode.containerInfo:d(n),null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;4===(n=n.return).tag&&(r=!1)}n.sibling.return=n.return,n=n.sibling}}var r=t.getPublicInstance,i=t.mutation;t=t.persistence,i||E(t?\"235\":\"236\");var a=i.commitMount,o=i.commitUpdate,s=i.resetTextContent,l=i.commitTextUpdate,u=i.appendChild,p=i.appendChildToContainer,h=i.insertBefore,m=i.insertInContainerBefore,y=i.removeChild,v=i.removeChildFromContainer;return{commitResetTextContent:function(e){s(e.stateNode)},commitPlacement:function(e){e:{for(var t=e.return;null!==t;){if(f(t)){var n=t;break e}t=t.return}E(\"160\"),n=void 0}var r=t=void 0;switch(n.tag){case 5:t=n.stateNode,r=!1;break;case 3:case 4:t=n.stateNode.containerInfo,r=!0;break;default:E(\"161\")}16&n.effectTag&&(s(t),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||f(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var i=e;;){if(5===i.tag||6===i.tag)n?r?m(t,i.stateNode,n):h(t,i.stateNode,n):r?p(t,i.stateNode):u(t,i.stateNode);else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}},commitDeletion:function(e){g(e),e.return=null,e.child=null,e.alternate&&(e.alternate.child=null,e.alternate.return=null)},commitWork:function(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var i=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&o(n,a,i,e,r,t)}break;case 6:null===t.stateNode&&E(\"162\"),n=t.memoizedProps,l(t.stateNode,null!==e?e.memoizedProps:n,n);break;case 3:break;default:E(\"163\")}},commitLifeCycles:function(e,t){switch(t.tag){case 2:var n=t.stateNode;if(4&t.effectTag)if(null===e)n.props=t.memoizedProps,n.state=t.memoizedState,n.componentDidMount();else{var r=e.memoizedProps;e=e.memoizedState,n.props=t.memoizedProps,n.state=t.memoizedState,n.componentDidUpdate(r,e)}null!==(t=t.updateQueue)&&Ke(t,n);break;case 3:null!==(n=t.updateQueue)&&Ke(n,null!==t.child?t.child.stateNode:null);break;case 5:n=t.stateNode,null===e&&4&t.effectTag&&a(n,t.type,t.memoizedProps,t);break;case 6:case 4:break;default:E(\"163\")}},commitAttachRef:function(e){var t=e.ref;if(null!==t){var n=e.stateNode;switch(e.tag){case 5:t(r(n));break;default:t(n)}}},commitDetachRef:function(e){null!==(e=e.ref)&&e(null)}}}(t,h)).commitResetTextContent,C=n.commitPlacement,R=n.commitDeletion,P=n.commitWork,O=n.commitLifeCycles,T=n.commitAttachRef,j=n.commitDetachRef,M=t.now,D=t.scheduleDeferredCallback,B=t.cancelDeferredCallback,U=t.useSyncScheduling,F=t.prepareForCommit,$=t.resetAfterCommit,H=M(),K=2,X=0,Q=!1,Z=null,ee=null,te=0,re=null,ie=null,ae=null,oe=null,le=null,ue=!1,ce=!1,pe=!1,he=null,fe=null,de=0,me=-1,ge=!1,ye=null,ve=0,be=!1,_e=!1,xe=null,we=null,ke=!1,Ce=!1,Se=1e3,Re=0,Pe=1;return{computeAsyncExpiration:v,computeExpirationForFiber:y,scheduleWork:u,batchedUpdates:function(e,t){var n=ke;ke=!0;try{return e(t)}finally{(ke=n)||ge||w(1,null)}},unbatchedUpdates:function(e){if(ke&&!Ce){Ce=!0;try{return e()}finally{Ce=!1}}return e()},flushSync:function(e){var t=ke;ke=!0;try{e:{var n=X;X=1;try{var r=e();break e}finally{X=n}r=void 0}return r}finally{ke=t,ge&&E(\"187\"),w(1,null)}},deferredUpdates:function(e){var t=X;X=v();try{return e()}finally{X=t}}}}function lf(e){function b(e){return null===(e=function od(e){if(!(e=nd(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}(e))?null:e.stateNode}var t=e.getPublicInstance,n=(e=kf(e)).computeAsyncExpiration,r=e.computeExpirationForFiber,i=e.scheduleWork;return{createContainer:function(e,t){var n=new Y(3,null,0);return e={current:n,containerInfo:e,pendingChildren:null,remainingExpirationTime:0,isReadyForCommit:!1,finishedWork:null,context:null,pendingContext:null,hydrate:t,nextScheduledRoot:null},n.stateNode=e},updateContainer:function(e,t,a,o){var s=t.current;if(a){a=a._reactInternalFiber;var l;e:{for(2===kd(a)&&2===a.tag||E(\"170\"),l=a;3!==l.tag;){if(le(l)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}(l=l.return)||E(\"171\")}l=l.stateNode.context}a=le(a)?pe(a,l):l}else a=S;null===t.context?t.context=a:t.pendingContext=a,t=void 0===(t=o)?null:t,He(s,{expirationTime:o=null!=e&&null!=e.type&&null!=e.type.prototype&&!0===e.type.prototype.unstable_isAsyncReactComponent?n():r(s),partialState:{element:e},callback:t,isReplace:!1,isForced:!1,nextCallback:null,next:null}),i(s,o)},batchedUpdates:e.batchedUpdates,unbatchedUpdates:e.unbatchedUpdates,deferredUpdates:e.deferredUpdates,flushSync:e.flushSync,getPublicRootInstance:function(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:return t(e.child.stateNode);default:return e.child.stateNode}},findHostInstance:b,findHostInstanceWithNoPortals:function(e){return null===(e=function pd(e){if(!(e=nd(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child&&4!==t.tag)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}(e))?null:e.stateNode},injectIntoDevTools:function(e){var t=e.findFiberByHostInstance;return function Ce(e){if(\"undefined\"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);sn=Be(function(e){return t.onCommitFiberRoot(n,e)}),ln=Be(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0}(o({},e,{findHostInstanceByFiber:function(e){return b(e)},findFiberByHostInstance:function(e){return t?t(e):null}}))}}}var _n=Object.freeze({default:lf}),xn=_n&&lf||_n,wn=xn.default?xn.default:xn;var kn=\"object\"==typeof performance&&\"function\"==typeof performance.now,En=void 0;En=kn?function(){return performance.now()}:function(){return Date.now()};var Cn=void 0,Sn=void 0;if(a.canUseDOM)if(\"function\"!=typeof requestIdleCallback||\"function\"!=typeof cancelIdleCallback){var Rn,Pn=null,On=!1,Tn=-1,jn=!1,An=0,In=33,Ln=33;Rn=kn?{didTimeout:!1,timeRemaining:function(){var e=An-performance.now();return 0<e?e:0}}:{didTimeout:!1,timeRemaining:function(){var e=An-Date.now();return 0<e?e:0}};var Nn=\"__reactIdleCallback$\"+Math.random().toString(36).slice(2);window.addEventListener(\"message\",function(e){if(e.source===window&&e.data===Nn){if(On=!1,e=En(),0>=An-e){if(!(-1!==Tn&&Tn<=e))return void(jn||(jn=!0,requestAnimationFrame(Mn)));Rn.didTimeout=!0}else Rn.didTimeout=!1;Tn=-1,e=Pn,Pn=null,null!==e&&e(Rn)}},!1);var Mn=function(e){jn=!1;var t=e-An+Ln;t<Ln&&In<Ln?(8>t&&(t=8),Ln=t<In?In:t):In=t,An=e+Ln,On||(On=!0,window.postMessage(Nn,\"*\"))};Cn=function(e,t){return Pn=e,null!=t&&\"number\"==typeof t.timeout&&(Tn=En()+t.timeout),jn||(jn=!0,requestAnimationFrame(Mn)),0},Sn=function(){Pn=null,On=!1,Tn=-1}}else Cn=window.requestIdleCallback,Sn=window.cancelIdleCallback;else Cn=function(e){return setTimeout(function(){e({timeRemaining:function(){return 1/0}})})},Sn=function(e){clearTimeout(e)};var Dn=/^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$/,Bn={},Un={};function If(e,t,n){var r=wa(t);if(r&&va(t,n)){var i=r.mutationMethod;i?i(e,n):null==n||r.hasBooleanValue&&!n||r.hasNumericValue&&isNaN(n)||r.hasPositiveNumericValue&&1>n||r.hasOverloadedBooleanValue&&!1===n?Jf(e,t):r.mustUseProperty?e[r.propertyName]=n:(t=r.attributeName,(i=r.attributeNamespace)?e.setAttributeNS(i,t,\"\"+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&!0===n?e.setAttribute(t,\"\"):e.setAttribute(t,\"\"+n))}else Kf(e,t,va(t,n)?n:null)}function Kf(e,t,n){(function Hf(e){return!!Un.hasOwnProperty(e)||!Bn.hasOwnProperty(e)&&(Dn.test(e)?Un[e]=!0:(Bn[e]=!0,!1))})(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,\"\"+n))}function Jf(e,t){var n=wa(t);n?(t=n.mutationMethod)?t(e,void 0):n.mustUseProperty?e[n.propertyName]=!n.hasBooleanValue&&\"\":e.removeAttribute(n.attributeName):e.removeAttribute(t)}function Lf(e,t){var n=t.value,r=t.checked;return o({type:void 0,step:void 0,min:void 0,max:void 0},t,{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:e._wrapperState.initialValue,checked:null!=r?r:e._wrapperState.initialChecked})}function Mf(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:null!=t.checked?t.checked:t.defaultChecked,initialValue:null!=t.value?t.value:n,controlled:\"checkbox\"===t.type||\"radio\"===t.type?null!=t.checked:null!=t.value}}function Nf(e,t){null!=(t=t.checked)&&If(e,\"checked\",t)}function Of(e,t){Nf(e,t);var n=t.value;null!=n?0===n&&\"\"===e.value?e.value=\"0\":\"number\"===t.type?(n!=(t=parseFloat(e.value)||0)||n==t&&e.value!=n)&&(e.value=\"\"+n):e.value!==\"\"+n&&(e.value=\"\"+n):(null==t.value&&null!=t.defaultValue&&e.defaultValue!==\"\"+t.defaultValue&&(e.defaultValue=\"\"+t.defaultValue),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked))}function Pf(e,t){switch(t.type){case\"submit\":case\"reset\":break;case\"color\":case\"date\":case\"datetime\":case\"datetime-local\":case\"month\":case\"time\":case\"week\":e.value=\"\",e.value=e.defaultValue;break;default:e.value=e.value}\"\"!==(t=e.name)&&(e.name=\"\"),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!e.defaultChecked,\"\"!==t&&(e.name=t)}function Rf(e,t){return e=o({children:void 0},t),(t=function Qf(e){var t=\"\";return i.Children.forEach(e,function(e){null==e||\"string\"!=typeof e&&\"number\"!=typeof e||(t+=e)}),t}(t.children))&&(e.children=t),e}function Sf(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[\"$\"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(\"$\"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=\"\"+n,t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function Tf(e,t){var n=t.value;e._wrapperState={initialValue:null!=n?n:t.defaultValue,wasMultiple:!!t.multiple}}function Uf(e,t){return null!=t.dangerouslySetInnerHTML&&E(\"91\"),o({},t,{value:void 0,defaultValue:void 0,children:\"\"+e._wrapperState.initialValue})}function Vf(e,t){var n=t.value;null==n&&(n=t.defaultValue,t=t.children,null!=t&&(null!=n&&E(\"92\"),Array.isArray(t)&&(1>=t.length||E(\"93\"),t=t[0]),n=\"\"+t),null==n&&(n=\"\")),e._wrapperState={initialValue:\"\"+n}}function Wf(e,t){var n=t.value;null!=n&&(n=\"\"+n,n!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function Xf(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}var Fn=\"http://www.w3.org/1999/xhtml\",$n=\"http://www.w3.org/2000/svg\";function Zf(e){switch(e){case\"svg\":return\"http://www.w3.org/2000/svg\";case\"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function $f(e,t){return null==e||\"http://www.w3.org/1999/xhtml\"===e?Zf(t):\"http://www.w3.org/2000/svg\"===e&&\"foreignObject\"===t?\"http://www.w3.org/1999/xhtml\":e}var qn,zn=void 0,Vn=(qn=function(e,t){if(e.namespaceURI!==$n||\"innerHTML\"in e)e.innerHTML=t;else{for((zn=zn||document.createElement(\"div\")).innerHTML=\"<svg>\"+t+\"</svg>\",t=zn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},\"undefined\"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return qn(e,t)})}:qn);function cg(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var Wn={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Hn=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(Wn).forEach(function(e){Hn.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Wn[t]=Wn[e]})});function fg(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=0===n.indexOf(\"--\"),i=n,a=t[n];i=null==a||\"boolean\"==typeof a||\"\"===a?\"\":r||\"number\"!=typeof a||0===a||Wn.hasOwnProperty(i)&&Wn[i]?(\"\"+a).trim():a+\"px\",\"float\"===n&&(n=\"cssFloat\"),r?e.setProperty(n,i):e[n]=i}}var Kn=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function hg(e,t,n){t&&(Kn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&E(\"137\",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&E(\"60\"),\"object\"==typeof t.dangerouslySetInnerHTML&&\"__html\"in t.dangerouslySetInnerHTML||E(\"61\")),null!=t.style&&\"object\"!=typeof t.style&&E(\"62\",n()))}function ig(e,t){if(-1===e.indexOf(\"-\"))return\"string\"==typeof t.is;switch(e){case\"annotation-xml\":case\"color-profile\":case\"font-face\":case\"font-face-src\":case\"font-face-uri\":case\"font-face-format\":case\"font-face-name\":case\"missing-glyph\":return!1;default:return!0}}var Gn=Fn,Jn=s.thatReturns(\"\");function lg(e,t){var n=Hd(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=Re[t];for(var r=0;r<t.length;r++){var i=t[r];n.hasOwnProperty(i)&&n[i]||(\"topScroll\"===i?wd(\"topScroll\",\"scroll\",e):\"topFocus\"===i||\"topBlur\"===i?(wd(\"topFocus\",\"focus\",e),wd(\"topBlur\",\"blur\",e),n.topBlur=!0,n.topFocus=!0):\"topCancel\"===i?(yc(\"cancel\",!0)&&wd(\"topCancel\",\"cancel\",e),n.topCancel=!0):\"topClose\"===i?(yc(\"close\",!0)&&wd(\"topClose\",\"close\",e),n.topClose=!0):Ut.hasOwnProperty(i)&&U(i,Ut[i],e),n[i]=!0)}}var Yn={topAbort:\"abort\",topCanPlay:\"canplay\",topCanPlayThrough:\"canplaythrough\",topDurationChange:\"durationchange\",topEmptied:\"emptied\",topEncrypted:\"encrypted\",topEnded:\"ended\",topError:\"error\",topLoadedData:\"loadeddata\",topLoadedMetadata:\"loadedmetadata\",topLoadStart:\"loadstart\",topPause:\"pause\",topPlay:\"play\",topPlaying:\"playing\",topProgress:\"progress\",topRateChange:\"ratechange\",topSeeked:\"seeked\",topSeeking:\"seeking\",topStalled:\"stalled\",topSuspend:\"suspend\",topTimeUpdate:\"timeupdate\",topVolumeChange:\"volumechange\",topWaiting:\"waiting\"};function ng(e,t,n,r){return n=9===n.nodeType?n:n.ownerDocument,r===Gn&&(r=Zf(e)),r===Gn?\"script\"===e?((e=n.createElement(\"div\")).innerHTML=\"<script><\\/script>\",e=e.removeChild(e.firstChild)):e=\"string\"==typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function og(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function pg(e,t,n,r){var i=ig(t,n);switch(t){case\"iframe\":case\"object\":U(\"topLoad\",\"load\",e);var a=n;break;case\"video\":case\"audio\":for(a in Yn)Yn.hasOwnProperty(a)&&U(a,Yn[a],e);a=n;break;case\"source\":U(\"topError\",\"error\",e),a=n;break;case\"img\":case\"image\":U(\"topError\",\"error\",e),U(\"topLoad\",\"load\",e),a=n;break;case\"form\":U(\"topReset\",\"reset\",e),U(\"topSubmit\",\"submit\",e),a=n;break;case\"details\":U(\"topToggle\",\"toggle\",e),a=n;break;case\"input\":Mf(e,n),a=Lf(e,n),U(\"topInvalid\",\"invalid\",e),lg(r,\"onChange\");break;case\"option\":a=Rf(e,n);break;case\"select\":Tf(e,n),a=o({},n,{value:void 0}),U(\"topInvalid\",\"invalid\",e),lg(r,\"onChange\");break;case\"textarea\":Vf(e,n),a=Uf(e,n),U(\"topInvalid\",\"invalid\",e),lg(r,\"onChange\");break;default:a=n}hg(t,a,Jn);var l,u=a;for(l in u)if(u.hasOwnProperty(l)){var c=u[l];\"style\"===l?fg(e,c):\"dangerouslySetInnerHTML\"===l?null!=(c=c?c.__html:void 0)&&Vn(e,c):\"children\"===l?\"string\"==typeof c?(\"textarea\"!==t||\"\"!==c)&&cg(e,c):\"number\"==typeof c&&cg(e,\"\"+c):\"suppressContentEditableWarning\"!==l&&\"suppressHydrationWarning\"!==l&&\"autoFocus\"!==l&&(Se.hasOwnProperty(l)?null!=c&&lg(r,l):i?Kf(e,l,c):null!=c&&If(e,l,c))}switch(t){case\"input\":Bc(e),Pf(e,n);break;case\"textarea\":Bc(e),Xf(e);break;case\"option\":null!=n.value&&e.setAttribute(\"value\",n.value);break;case\"select\":e.multiple=!!n.multiple,null!=(t=n.value)?Sf(e,!!n.multiple,t,!1):null!=n.defaultValue&&Sf(e,!!n.multiple,n.defaultValue,!0);break;default:\"function\"==typeof a.onClick&&(e.onclick=s)}}function sg(e,t,n,r,i){var a=null;switch(t){case\"input\":n=Lf(e,n),r=Lf(e,r),a=[];break;case\"option\":n=Rf(e,n),r=Rf(e,r),a=[];break;case\"select\":n=o({},n,{value:void 0}),r=o({},r,{value:void 0}),a=[];break;case\"textarea\":n=Uf(e,n),r=Uf(e,r),a=[];break;default:\"function\"!=typeof n.onClick&&\"function\"==typeof r.onClick&&(e.onclick=s)}hg(t,r,Jn);var l,u;e=null;for(l in n)if(!r.hasOwnProperty(l)&&n.hasOwnProperty(l)&&null!=n[l])if(\"style\"===l)for(u in t=n[l],t)t.hasOwnProperty(u)&&(e||(e={}),e[u]=\"\");else\"dangerouslySetInnerHTML\"!==l&&\"children\"!==l&&\"suppressContentEditableWarning\"!==l&&\"suppressHydrationWarning\"!==l&&\"autoFocus\"!==l&&(Se.hasOwnProperty(l)?a||(a=[]):(a=a||[]).push(l,null));for(l in r){var c=r[l];if(t=null!=n?n[l]:void 0,r.hasOwnProperty(l)&&c!==t&&(null!=c||null!=t))if(\"style\"===l)if(t){for(u in t)!t.hasOwnProperty(u)||c&&c.hasOwnProperty(u)||(e||(e={}),e[u]=\"\");for(u in c)c.hasOwnProperty(u)&&t[u]!==c[u]&&(e||(e={}),e[u]=c[u])}else e||(a||(a=[]),a.push(l,e)),e=c;else\"dangerouslySetInnerHTML\"===l?(c=c?c.__html:void 0,t=t?t.__html:void 0,null!=c&&t!==c&&(a=a||[]).push(l,\"\"+c)):\"children\"===l?t===c||\"string\"!=typeof c&&\"number\"!=typeof c||(a=a||[]).push(l,\"\"+c):\"suppressContentEditableWarning\"!==l&&\"suppressHydrationWarning\"!==l&&(Se.hasOwnProperty(l)?(null!=c&&lg(i,l),a||t===c||(a=[])):(a=a||[]).push(l,c))}return e&&(a=a||[]).push(\"style\",e),a}function tg(e,t,n,r,i){\"input\"===n&&\"radio\"===i.type&&null!=i.name&&Nf(e,i),ig(n,r),r=ig(n,i);for(var a=0;a<t.length;a+=2){var o=t[a],s=t[a+1];\"style\"===o?fg(e,s):\"dangerouslySetInnerHTML\"===o?Vn(e,s):\"children\"===o?cg(e,s):r?null!=s?Kf(e,o,s):e.removeAttribute(o):null!=s?If(e,o,s):Jf(e,o)}switch(n){case\"input\":Of(e,i);break;case\"textarea\":Wf(e,i);break;case\"select\":e._wrapperState.initialValue=void 0,t=e._wrapperState.wasMultiple,e._wrapperState.wasMultiple=!!i.multiple,null!=(n=i.value)?Sf(e,!!i.multiple,n,!1):t!==!!i.multiple&&(null!=i.defaultValue?Sf(e,!!i.multiple,i.defaultValue,!0):Sf(e,!!i.multiple,i.multiple?[]:\"\",!1))}}function ug(e,t,n,r,i){switch(t){case\"iframe\":case\"object\":U(\"topLoad\",\"load\",e);break;case\"video\":case\"audio\":for(var a in Yn)Yn.hasOwnProperty(a)&&U(a,Yn[a],e);break;case\"source\":U(\"topError\",\"error\",e);break;case\"img\":case\"image\":U(\"topError\",\"error\",e),U(\"topLoad\",\"load\",e);break;case\"form\":U(\"topReset\",\"reset\",e),U(\"topSubmit\",\"submit\",e);break;case\"details\":U(\"topToggle\",\"toggle\",e);break;case\"input\":Mf(e,n),U(\"topInvalid\",\"invalid\",e),lg(i,\"onChange\");break;case\"select\":Tf(e,n),U(\"topInvalid\",\"invalid\",e),lg(i,\"onChange\");break;case\"textarea\":Vf(e,n),U(\"topInvalid\",\"invalid\",e),lg(i,\"onChange\")}hg(t,n,Jn),r=null;for(var o in n)n.hasOwnProperty(o)&&(a=n[o],\"children\"===o?\"string\"==typeof a?e.textContent!==a&&(r=[\"children\",a]):\"number\"==typeof a&&e.textContent!==\"\"+a&&(r=[\"children\",\"\"+a]):Se.hasOwnProperty(o)&&null!=a&&lg(i,o));switch(t){case\"input\":Bc(e),Pf(e,n);break;case\"textarea\":Bc(e),Xf(e);break;case\"select\":case\"option\":break;default:\"function\"==typeof n.onClick&&(e.onclick=s)}return r}function vg(e,t){return e.nodeValue!==t}var Xn=Object.freeze({createElement:ng,createTextNode:og,setInitialProperties:pg,diffProperties:sg,updateProperties:tg,diffHydratedProperties:ug,diffHydratedText:vg,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case\"input\":if(Of(e,n),t=n.name,\"radio\"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(\"input[name=\"+JSON.stringify(\"\"+t)+'][type=\"radio\"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=rb(r);i||E(\"90\"),Cc(r),Of(r,i)}}}break;case\"textarea\":Wf(e,n);break;case\"select\":null!=(t=n.value)&&Sf(e,!!n.multiple,t,!1)}}});vt.injectFiberControlledHostComponent(Xn);var Qn=null,Zn=null;function Ng(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||\" react-mount-point-unstable \"!==e.nodeValue))}var er=wn({getRootHostContext:function(e){var t=e.nodeType;switch(t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:$f(null,\"\");break;default:e=$f(e=(t=8===t?e.parentNode:e).namespaceURI||null,t=t.tagName)}return e},getChildHostContext:function(e,t){return $f(e,t)},getPublicInstance:function(e){return e},prepareForCommit:function(){Qn=It;var e=p();if(Kd(e)){if(\"selectionStart\"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{var n=window.getSelection&&window.getSelection();if(n&&0!==n.rangeCount){t=n.anchorNode;var r=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{t.nodeType,i.nodeType}catch(e){t=null;break e}var a=0,o=-1,s=-1,l=0,u=0,c=e,h=null;t:for(;;){for(var f;c!==t||0!==r&&3!==c.nodeType||(o=a+r),c!==i||0!==n&&3!==c.nodeType||(s=a+n),3===c.nodeType&&(a+=c.nodeValue.length),null!==(f=c.firstChild);)h=c,c=f;for(;;){if(c===e)break t;if(h===t&&++l===r&&(o=a),h===i&&++u===n&&(s=a),null!==(f=c.nextSibling))break;h=(c=h).parentNode}c=f}t=-1===o||-1===s?null:{start:o,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;Zn={focusedElem:e,selectionRange:t},ud(!1)},resetAfterCommit:function(){var e=Zn,t=p(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&x(document.documentElement,n)){if(Kd(n))if(t=r.start,e=r.end,void 0===e&&(e=t),\"selectionStart\"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(window.getSelection){t=window.getSelection();var i=n[Eb()].length;e=Math.min(r.start,i),r=void 0===r.end?e:Math.min(r.end,i),!t.extend&&e>r&&(i=r,r=e,e=i),i=Jd(n,e);var a=Jd(n,r);if(i&&a&&(1!==t.rangeCount||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)){var o=document.createRange();o.setStart(i.node,i.offset),t.removeAllRanges(),e>r?(t.addRange(o),t.extend(a.node,a.offset)):(o.setEnd(a.node,a.offset),t.addRange(o))}}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(C(n),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}Zn=null,ud(Qn),Qn=null},createInstance:function(e,t,n,r,i){return(e=ng(e,t,n,r))[ze]=i,e[Ve]=t,e},appendInitialChild:function(e,t){e.appendChild(t)},finalizeInitialChildren:function(e,t,n,r){pg(e,t,n,r);e:{switch(t){case\"button\":case\"input\":case\"select\":case\"textarea\":e=!!n.autoFocus;break e}e=!1}return e},prepareUpdate:function(e,t,n,r,i){return sg(e,t,n,r,i)},shouldSetTextContent:function(e,t){return\"textarea\"===e||\"string\"==typeof t.children||\"number\"==typeof t.children||\"object\"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&\"string\"==typeof t.dangerouslySetInnerHTML.__html},shouldDeprioritizeSubtree:function(e,t){return!!t.hidden},createTextInstance:function(e,t,n,r){return(e=og(e,t))[ze]=r,e},now:En,mutation:{commitMount:function(e){e.focus()},commitUpdate:function(e,t,n,r,i){e[Ve]=i,tg(e,t,n,r,i)},resetTextContent:function(e){e.textContent=\"\"},commitTextUpdate:function(e,t,n){e.nodeValue=n},appendChild:function(e,t){e.appendChild(t)},appendChildToContainer:function(e,t){8===e.nodeType?e.parentNode.insertBefore(t,e):e.appendChild(t)},insertBefore:function(e,t,n){e.insertBefore(t,n)},insertInContainerBefore:function(e,t,n){8===e.nodeType?e.parentNode.insertBefore(t,n):e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},removeChildFromContainer:function(e,t){8===e.nodeType?e.parentNode.removeChild(t):e.removeChild(t)}},hydration:{canHydrateInstance:function(e,t){return 1!==e.nodeType||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e},canHydrateTextInstance:function(e,t){return\"\"===t||3!==e.nodeType?null:e},getNextHydratableSibling:function(e){for(e=e.nextSibling;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e},getFirstHydratableChild:function(e){for(e=e.firstChild;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e},hydrateInstance:function(e,t,n,r,i,a){return e[ze]=a,e[Ve]=n,ug(e,t,n,i,r)},hydrateTextInstance:function(e,t,n){return e[ze]=n,vg(e,t)},didNotMatchHydratedContainerTextInstance:function(){},didNotMatchHydratedTextInstance:function(){},didNotHydrateContainerInstance:function(){},didNotHydrateInstance:function(){},didNotFindHydratableContainerInstance:function(){},didNotFindHydratableContainerTextInstance:function(){},didNotFindHydratableInstance:function(){},didNotFindHydratableTextInstance:function(){}},scheduleDeferredCallback:Cn,cancelDeferredCallback:Sn,useSyncScheduling:!0});rc=er.batchedUpdates;function Pg(e,t,n,r,i){Ng(n)||E(\"200\");var a=n._reactRootContainer;if(a)er.updateContainer(t,a,e,i);else{if(!(r=r||function Og(e){return!(!(e=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==e.nodeType||!e.hasAttribute(\"data-reactroot\"))}(n)))for(a=void 0;a=n.lastChild;)n.removeChild(a);var o=er.createContainer(n,r);a=n._reactRootContainer=o,er.unbatchedUpdates(function(){er.updateContainer(t,o,e,i)})}return er.getPublicRootInstance(a)}function Qg(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return Ng(t)||E(\"200\"),function pf(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:fn,key:null==r?null:\"\"+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)}function Rg(e,t){this._reactRootContainer=er.createContainer(e,t)}Rg.prototype.render=function(e,t){er.updateContainer(e,this._reactRootContainer,null,t)},Rg.prototype.unmount=function(e){er.updateContainer(null,this._reactRootContainer,null,e)};var tr={createPortal:Qg,findDOMNode:function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(t)return er.findHostInstance(t);\"function\"==typeof e.render?E(\"188\"):E(\"213\",Object.keys(e))},hydrate:function(e,t,n){return Pg(null,e,t,!0,n)},render:function(e,t,n){return Pg(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,r){return(null==e||void 0===e._reactInternalFiber)&&E(\"38\"),Pg(e,t,n,!1,r)},unmountComponentAtNode:function(e){return Ng(e)||E(\"40\"),!!e._reactRootContainer&&(er.unbatchedUpdates(function(){Pg(null,null,e,!1,function(){e._reactRootContainer=null})}),!0)},unstable_createPortal:Qg,unstable_batchedUpdates:tc,unstable_deferredUpdates:er.deferredUpdates,flushSync:er.flushSync,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:Me,EventPluginRegistry:Pe,EventPropagators:Ye,ReactControlledComponent:bt,ReactDOMComponentTree:We,ReactDOMEventListener:Nt}};er.injectIntoDevTools({findFiberByHostInstance:pb,bundleType:0,version:\"16.2.0\",rendererPackageName:\"react-dom\"});var nr=Object.freeze({default:tr}),rr=nr&&tr||nr;t.exports=rr.default?rr.default:rr},function(e,t,n){\"use strict\";var r=!(\"undefined\"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:\"undefined\"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=i},function(e,t,n){\"use strict\";var r=n(21),i={listen:function listen(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function remove(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent(\"on\"+t,n),{remove:function remove(){e.detachEvent(\"on\"+t,n)}}):void 0},capture:function capture(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function remove(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function registerDefault(){}};e.exports=i},function(e,t,n){\"use strict\";e.exports=function getActiveElement(e){if(void 0===(e=e||(\"undefined\"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}},function(e,t,n){\"use strict\";var r=Object.prototype.hasOwnProperty;function is(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}e.exports=function shallowEqual(e,t){if(is(e,t))return!0;if(\"object\"!=typeof e||null===e||\"object\"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var a=0;a<n.length;a++)if(!r.call(t,n[a])||!is(e[n[a]],t[n[a]]))return!1;return!0}},function(e,t,n){\"use strict\";var r=n(131);e.exports=function containsNode(e,t){return!(!e||!t)&&(e===t||!r(e)&&(r(t)?containsNode(e,t.parentNode):\"contains\"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}},function(e,t,n){\"use strict\";var r=n(132);e.exports=function isTextNode(e){return r(e)&&3==e.nodeType}},function(e,t,n){\"use strict\";e.exports=function isNode(e){var t=(e?e.ownerDocument||e:document).defaultView||window;return!(!e||!(\"function\"==typeof t.Node?e instanceof t.Node:\"object\"==typeof e&&\"number\"==typeof e.nodeType&&\"string\"==typeof e.nodeName))}},function(e,t,n){\"use strict\";e.exports=function focusNode(e){try{e.focus()}catch(e){}}},function(e,t,n){\"use strict\";var r=n(135);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(136),o=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}();function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}var s=function(e){!function _inherits(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(EditorLoader,r[\"Component\"]);function EditorLoader(){var e,t,n;!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,EditorLoader);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return t=n=_possibleConstructorReturn(this,(e=EditorLoader.__proto__||Object.getPrototypeOf(EditorLoader)).call.apply(e,[this].concat(i))),n.state={editor:null},_possibleConstructorReturn(n,t)}return o(EditorLoader,[{key:\"componentDidMount\",value:function componentDidMount(){var e=this;n.e(0).then(n.bind(null,409)).then(function(t){e.setState({editor:t.default})})}},{key:\"render\",value:function render(){var e=this.state.editor;return e?i.a.createElement(e,this.props):i.a.createElement(a.a,null)}}]),EditorLoader}();t.a=s},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(2);function EditorLoaderRenderer(e){var t=e.classes;return i.a.createElement(\"div\",{className:t.root},\"Loading…\")}EditorLoaderRenderer.propTypes={classes:o.a.object.isRequired},t.a=Object(s.a)(function styles(e){var t=e.fontFamily,n=e.color,r=e.space,i=e.fontSize;return{root:{padding:[[r[1],r[2],r[1],r[1]]],fontFamily:t.base,fontSize:i.small,color:n.light,backgroundColor:n.codeBackground},\"@global\":{\".CodeMirror.CodeMirror\":{isolate:!1,fontFamily:t.monospace,height:\"auto\",padding:[[r[1],r[2]]],fontSize:i.small},\".CodeMirror.CodeMirror pre\":{isolate:!1,padding:0},\".CodeMirror-scroll.CodeMirror-scroll\":{isolate:!1,height:\"auto\",overflowY:\"hidden\",overflowX:\"auto\"},\".cm-error.cm-error\":{isolate:!1,background:\"none\"}}}})(EditorLoaderRenderer)},function(e,t,n){\"use strict\";var r=n(21),i=n(138),a=n(139);e.exports=function(){function shim(e,t,n,r,o,s){s!==a&&i(!1,\"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types\")}shim.isRequired=shim;function getShim(){return shim}var e={array:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim};return e.checkPropTypes=r,e.PropTypes=e,e}},function(e,t,n){\"use strict\";var r=function validateFormat(e){};e.exports=function invariant(e,t,n,i,a,o,s,l){if(r(t),!e){var u;if(void 0===t)u=new Error(\"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.\");else{var c=[n,i,a,o,s,l],p=0;(u=new Error(t.replace(/%s/g,function(){return c[p++]}))).name=\"Invariant Violation\"}throw u.framesToPop=1,u}}},function(e,t,n){\"use strict\";e.exports=\"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\"},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(141),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}();t.a=function(e){return function(t){var n,a,c=t.name.replace(/Renderer$/,\"\");return a=n=function(n){!function _inherits(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(_class,r[\"Component\"]);function _class(){return function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,_class),function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,(_class.__proto__||Object.getPrototypeOf(_class)).apply(this,arguments))}return u(_class,[{key:\"componentWillMount\",value:function componentWillMount(){this.sheet=Object(s.a)(e,this.context.config||{},c),this.sheet.update(this.props).attach()}},{key:\"componentWillReceiveProps\",value:function componentWillReceiveProps(e){this.sheet.update(e)}},{key:\"render\",value:function render(){return i.a.createElement(t,l({},this.props,{classes:this.sheet.classes}))}}]),_class}(),n.displayName=\"Styled(\"+c+\")\",n.contextTypes={config:o.a.object},a}}},function(e,t,n){\"use strict\";var r=n(142),i=n.n(r),a=n(44),o=n.n(a),s=n(45),l=n(234);t.a=o()(function(e,t,n){var r=i()({},l,t.theme),a=i()({},e(r),t.styles&&t.styles[n]);return s.a.createStyleSheet(a,{meta:n,link:!0})})},function(e,t,n){var r=n(143),i=n(193)(function(e,t,n){r(e,t,n)});e.exports=i},function(e,t,n){var r=n(33),i=n(66),a=n(68),o=n(173),s=n(4),l=n(72);e.exports=function baseMerge(e,t,n,u,c){e!==t&&a(t,function(a,l){if(s(a))c||(c=new r),o(e,t,l,n,baseMerge,u,c);else{var p=u?u(e[l],a,l+\"\",e,t,c):void 0;void 0===p&&(p=a),i(e,l,p)}},l)}},function(e,t){e.exports=function listCacheClear(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(23),i=Array.prototype.splice;e.exports=function listCacheDelete(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))}},function(e,t,n){var r=n(23);e.exports=function listCacheGet(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(23);e.exports=function listCacheHas(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(23);e.exports=function listCacheSet(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},function(e,t,n){var r=n(22);e.exports=function stackClear(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function stackDelete(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function stackGet(e){return this.__data__.get(e)}},function(e,t){e.exports=function stackHas(e){return this.__data__.has(e)}},function(e,t,n){var r=n(22),i=n(34),a=n(36),o=200;e.exports=function stackSet(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.length<o-1)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(s)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(35),i=n(157),a=n(4),o=n(65),s=/^\\[object .+?Constructor\\]$/,l=Function.prototype,u=Object.prototype,c=l.toString,p=u.hasOwnProperty,h=RegExp(\"^\"+c.call(p).replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\");e.exports=function baseIsNative(e){return!(!a(e)||i(e))&&(r(e)?h:s).test(o(e))}},function(e,t,n){var r=n(24),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;e.exports=function getRawTag(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=o.call(e);return r&&(t?e[s]=n:delete e[s]),i}},function(e,t){var n=Object.prototype.toString;e.exports=function objectToString(e){return n.call(e)}},function(e,t,n){var r=n(158),i=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||\"\");return e?\"Symbol(src)_1.\"+e:\"\"}();e.exports=function isMasked(e){return!!i&&i in e}},function(e,t,n){var r=n(3)[\"__core-js_shared__\"];e.exports=r},function(e,t){e.exports=function getValue(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(161),i=n(22),a=n(34);e.exports=function mapCacheClear(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},function(e,t,n){var r=n(162),i=n(163),a=n(164),o=n(165),s=n(166);function Hash(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Hash.prototype.clear=r,Hash.prototype.delete=i,Hash.prototype.get=a,Hash.prototype.has=o,Hash.prototype.set=s,e.exports=Hash},function(e,t,n){var r=n(25);e.exports=function hashClear(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(25),i=\"__lodash_hash_undefined__\",a=Object.prototype.hasOwnProperty;e.exports=function hashGet(e){var t=this.__data__;if(r){var n=t[e];return n===i?void 0:n}return a.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(25),i=Object.prototype.hasOwnProperty;e.exports=function hashHas(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},function(e,t,n){var r=n(25),i=\"__lodash_hash_undefined__\";e.exports=function hashSet(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?i:t,this}},function(e,t,n){var r=n(26);e.exports=function mapCacheDelete(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function isKeyable(e){var t=typeof e;return\"string\"==t||\"number\"==t||\"symbol\"==t||\"boolean\"==t?\"__proto__\"!==e:null===e}},function(e,t,n){var r=n(26);e.exports=function mapCacheGet(e){return r(this,e).get(e)}},function(e,t,n){var r=n(26);e.exports=function mapCacheHas(e){return r(this,e).has(e)}},function(e,t,n){var r=n(26);e.exports=function mapCacheSet(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},function(e,t){e.exports=function createBaseFor(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var l=o[e?s:++i];if(!1===n(a[l],l,a))break}return t}}},function(e,t,n){var r=n(66),i=n(174),a=n(175),o=n(177),s=n(178),l=n(38),u=n(5),c=n(181),p=n(40),h=n(35),f=n(4),d=n(183),m=n(41),g=n(187);e.exports=function baseMergeDeep(e,t,n,y,v,b,_){var x=e[n],w=t[n],k=_.get(w);if(k)r(e,n,k);else{var E=b?b(x,w,n+\"\",e,t,_):void 0,C=void 0===E;if(C){var S=u(w),R=!S&&p(w),P=!S&&!R&&m(w);E=w,S||R||P?u(x)?E=x:c(x)?E=o(x):R?(C=!1,E=i(w,!0)):P?(C=!1,E=a(w,!0)):E=[]:d(w)||l(w)?(E=x,l(x)?E=g(x):(!f(x)||y&&h(x))&&(E=s(w))):C=!1}C&&(_.set(w,E),v(E,w,y,b,_),_.delete(w)),r(e,n,E)}}},function(e,t,n){(function(e){var r=n(3),i=\"object\"==typeof t&&t&&!t.nodeType&&t,a=i&&\"object\"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;e.exports=function cloneBuffer(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(t,n(28)(e))},function(e,t,n){var r=n(176);e.exports=function cloneTypedArray(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(69);e.exports=function cloneArrayBuffer(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t){e.exports=function copyArray(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t,n){var r=n(179),i=n(70),a=n(37);e.exports=function initCloneObject(e){return\"function\"!=typeof e.constructor||a(e)?{}:r(i(e))}},function(e,t,n){var r=n(4),i=Object.create,a=function(){function object(){}return function(e){if(!r(e))return{};if(i)return i(e);object.prototype=e;var t=new object;return object.prototype=void 0,t}}();e.exports=a},function(e,t,n){var r=n(14),i=n(8),a=\"[object Arguments]\";e.exports=function baseIsArguments(e){return i(e)&&r(e)==a}},function(e,t,n){var r=n(15),i=n(8);e.exports=function isArrayLikeObject(e){return i(e)&&r(e)}},function(e,t){e.exports=function stubFalse(){return!1}},function(e,t,n){var r=n(14),i=n(70),a=n(8),o=\"[object Object]\",s=Function.prototype,l=Object.prototype,u=s.toString,c=l.hasOwnProperty,p=u.call(Object);e.exports=function isPlainObject(e){if(!a(e)||r(e)!=o)return!1;var t=i(e);if(null===t)return!0;var n=c.call(t,\"constructor\")&&t.constructor;return\"function\"==typeof n&&n instanceof n&&u.call(n)==p}},function(e,t,n){var r=n(14),i=n(39),a=n(8),o={};o[\"[object Float32Array]\"]=o[\"[object Float64Array]\"]=o[\"[object Int8Array]\"]=o[\"[object Int16Array]\"]=o[\"[object Int32Array]\"]=o[\"[object Uint8Array]\"]=o[\"[object Uint8ClampedArray]\"]=o[\"[object Uint16Array]\"]=o[\"[object Uint32Array]\"]=!0,o[\"[object Arguments]\"]=o[\"[object Array]\"]=o[\"[object ArrayBuffer]\"]=o[\"[object Boolean]\"]=o[\"[object DataView]\"]=o[\"[object Date]\"]=o[\"[object Error]\"]=o[\"[object Function]\"]=o[\"[object Map]\"]=o[\"[object Number]\"]=o[\"[object Object]\"]=o[\"[object RegExp]\"]=o[\"[object Set]\"]=o[\"[object String]\"]=o[\"[object WeakMap]\"]=!1;e.exports=function baseIsTypedArray(e){return a(e)&&i(e.length)&&!!o[r(e)]}},function(e,t){e.exports=function baseUnary(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(64),i=\"object\"==typeof t&&t&&!t.nodeType&&t,a=i&&\"object\"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i&&r.process,s=function(){try{return o&&o.binding&&o.binding(\"util\")}catch(e){}}();e.exports=s}).call(t,n(28)(e))},function(e,t,n){var r=n(188),i=n(72);e.exports=function toPlainObject(e){return r(e,i(e))}},function(e,t,n){var r=n(189),i=n(27);e.exports=function copyObject(e,t,n,a){var o=!n;n||(n={});for(var s=-1,l=t.length;++s<l;){var u=t[s],c=a?a(n[u],e[u],u,n,e):void 0;void 0===c&&(c=e[u]),o?i(n,u,c):r(n,u,c)}return n}},function(e,t,n){var r=n(27),i=n(18),a=Object.prototype.hasOwnProperty;e.exports=function assignValue(e,t,n){var o=e[t];a.call(e,t)&&i(o,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t){e.exports=function baseTimes(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(4),i=n(37),a=n(192),o=Object.prototype.hasOwnProperty;e.exports=function baseKeysIn(e){if(!r(e))return a(e);var t=i(e),n=[];for(var s in e)(\"constructor\"!=s||!t&&o.call(e,s))&&n.push(s);return n}},function(e,t){e.exports=function nativeKeysIn(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){var r=n(194),i=n(201);e.exports=function createAssigner(e){return r(function(t,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(o=e.length>3&&\"function\"==typeof o?(a--,o):void 0,s&&i(n[0],n[1],s)&&(o=a<3?void 0:o,a=1),t=Object(t);++r<a;){var l=n[r];l&&e(t,l,r,o)}return t})}},function(e,t,n){var r=n(43),i=n(195),a=n(197);e.exports=function baseRest(e,t){return a(i(e,t,r),e+\"\")}},function(e,t,n){var r=n(196),i=Math.max;e.exports=function overRest(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=i(a.length-t,0),l=Array(s);++o<s;)l[o]=a[t+o];o=-1;for(var u=Array(t+1);++o<t;)u[o]=a[o];return u[t]=n(l),r(e,this,u)}}},function(e,t){e.exports=function apply(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},function(e,t,n){var r=n(198),i=n(200)(r);e.exports=i},function(e,t,n){var r=n(199),i=n(67),a=n(43),o=i?function(e,t){return i(e,\"toString\",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:a;e.exports=o},function(e,t){e.exports=function constant(e){return function(){return e}}},function(e,t){var n=800,r=16,i=Date.now;e.exports=function shortOut(e){var t=0,a=0;return function(){var o=i(),s=r-(o-a);if(a=o,s>0){if(++t>=n)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,n){var r=n(18),i=n(15),a=n(42),o=n(4);e.exports=function isIterateeCall(e,t,n){if(!o(n))return!1;var s=typeof t;return!!(\"number\"==s?i(n)&&a(t,n.length):\"string\"==s&&t in n)&&r(n[t],e)}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=\"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};t.default=function(e){return function extract(e){var t=null;for(var n in e){var i=e[n],a=void 0===i?\"undefined\":r(i);if(\"function\"===a)t||(t={}),t[n]=i;else if(\"object\"===a&&null!==i&&!Array.isArray(i)){var o=extract(i);o&&(t||(t={}),t[n]=o)}}return t}(e)}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}(),i=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(9));var a=function(){function SheetsManager(){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,SheetsManager),this.sheets=[],this.refs=[],this.keys=[]}return r(SheetsManager,[{key:\"get\",value:function get(e){var t=this.keys.indexOf(e);return this.sheets[t]}},{key:\"add\",value:function add(e,t){var n=this.sheets,r=this.refs,i=this.keys,a=n.indexOf(t);return-1!==a?a:(n.push(t),r.push(0),i.push(e),n.length-1)}},{key:\"manage\",value:function manage(e){var t=this.keys.indexOf(e),n=this.sheets[t];return 0===this.refs[t]&&n.attach(),this.refs[t]++,this.keys[t]||this.keys.splice(t,0,e),n}},{key:\"unmanage\",value:function unmanage(e){var t=this.keys.indexOf(e);-1!==t?this.refs[t]>0&&(this.refs[t]--,0===this.refs[t]&&this.sheets[t].detach()):(0,i.default)(!1,\"SheetsManager: can't find sheet to unmanage\")}},{key:\"size\",get:function get(){return this.keys.length}}]),SheetsManager}();t.default=a},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=\"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};t.default=function cloneStyle(e){if(null==e)return e;var t=void 0===e?\"undefined\":r(e);if(\"string\"===t||\"number\"===t||\"function\"===t)return e;if(a(e))return e.map(cloneStyle);if((0,i.default)(e))return e;var n={};for(var o in e){var s=e[o];\"object\"!==(void 0===s?\"undefined\":r(s))?n[o]=s:n[o]=cloneStyle(s)}return n};var i=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(76));var a=Array.isArray},function(e,t,n){e.exports=n(206)},function(e,t,n){\"use strict\";(function(e,r){Object.defineProperty(t,\"__esModule\",{value:!0});var i=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(207));var a;a=\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:void 0!==e?e:r;var o=(0,i.default)(a);t.default=o}).call(t,n(7),n(28)(e))},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function symbolObservablePonyfill(e){var t,n=e.Symbol;\"function\"==typeof n?n.observable?t=n.observable:(t=n(\"observable\"),n.observable=t):t=\"@@observable\";return t}},function(e,t,n){\"use strict\";(function(e){Object.defineProperty(t,\"__esModule\",{value:!0});e.CSS;t.default=function(e){return e}}).call(t,n(7))},function(e,t,n){\"use strict\";(function(e){Object.defineProperty(t,\"__esModule\",{value:!0});var n=\"2f1acc6c3a606b082e5eef5e54414ffb\";null==e[n]&&(e[n]=0),t.default=e[n]++}).call(t,n(7))},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=\"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},i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}(),o=_interopRequireDefault(n(211)),s=_interopRequireDefault(n(79)),l=_interopRequireDefault(n(212)),u=_interopRequireDefault(n(213)),c=_interopRequireDefault(n(219)),p=_interopRequireDefault(n(220)),h=_interopRequireDefault(n(48)),f=_interopRequireDefault(n(16)),d=_interopRequireDefault(n(78)),m=_interopRequireDefault(n(29)),g=_interopRequireDefault(n(222)),y=_interopRequireDefault(n(223));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var v=u.default.concat([c.default,p.default]),b=0,_=function(){function Jss(e){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,Jss),this.id=b++,this.version=\"9.4.0\",this.plugins=new l.default,this.options={createGenerateClassName:d.default,Renderer:o.default?g.default:y.default,plugins:[]},this.generateClassName=(0,d.default)(),this.use.apply(this,v),this.setup(e)}return a(Jss,[{key:\"setup\",value:function setup(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.createGenerateClassName&&(this.options.createGenerateClassName=e.createGenerateClassName,this.generateClassName=e.createGenerateClassName()),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),(e.virtual||e.Renderer)&&(this.options.Renderer=e.Renderer||(e.virtual?y.default:g.default)),e.plugins&&this.use.apply(this,e.plugins),this}},{key:\"createStyleSheet\",value:function createStyleSheet(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.index;\"number\"!=typeof n&&(n=0===h.default.index?0:h.default.index+1);var r=new s.default(e,i({},t,{jss:this,generateClassName:t.generateClassName||this.generateClassName,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r}},{key:\"removeStyleSheet\",value:function removeStyleSheet(e){return e.detach(),h.default.remove(e),this}},{key:\"createRule\",value:function createRule(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};\"object\"===(void 0===e?\"undefined\":r(e))&&(n=t,t=e,e=void 0);var i=n;i.jss=this,i.Renderer=this.options.Renderer,i.generateClassName||(i.generateClassName=this.generateClassName),i.classes||(i.classes={});var a=(0,m.default)(e,t,i);return!i.selector&&a instanceof f.default&&(a.selector=\".\"+i.generateClassName(a)),this.plugins.onProcessRule(a),a}},{key:\"use\",value:function use(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){-1===e.options.plugins.indexOf(t)&&(e.options.plugins.push(t),e.plugins.use(t))}),this}}]),Jss}();t.default=_},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),n.d(t,\"isBrowser\",function(){return i});var r=\"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},i=\"object\"===(\"undefined\"==typeof window?\"undefined\":r(window))&&\"object\"===(\"undefined\"==typeof document?\"undefined\":r(document))&&9===document.nodeType;t.default=i},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}(),i=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(9));var a=function(){function PluginsRegistry(){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,PluginsRegistry),this.hooks={onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}}return r(PluginsRegistry,[{key:\"onCreateRule\",value:function onCreateRule(e,t,n){for(var r=0;r<this.hooks.onCreateRule.length;r++){var i=this.hooks.onCreateRule[r](e,t,n);if(i)return i}return null}},{key:\"onProcessRule\",value:function onProcessRule(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.hooks.onProcessRule.length;n++)this.hooks.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}}},{key:\"onProcessStyle\",value:function onProcessStyle(e,t,n){for(var r=e,i=0;i<this.hooks.onProcessStyle.length;i++)r=this.hooks.onProcessStyle[i](r,t,n),t.style=r}},{key:\"onProcessSheet\",value:function onProcessSheet(e){for(var t=0;t<this.hooks.onProcessSheet.length;t++)this.hooks.onProcessSheet[t](e)}},{key:\"onUpdate\",value:function onUpdate(e,t,n){for(var r=0;r<this.hooks.onUpdate.length;r++)this.hooks.onUpdate[r](e,t,n)}},{key:\"onChangeValue\",value:function onChangeValue(e,t,n){for(var r=e,i=0;i<this.hooks.onChangeValue.length;i++)r=this.hooks.onChangeValue[i](r,t,n);return r}},{key:\"use\",value:function use(e){for(var t in e)this.hooks[t]?this.hooks[t].push(e[t]):(0,i.default)(!1,'[JSS] Unknown hook \"%s\".',t)}}]),PluginsRegistry}();t.default=a},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=_interopRequireDefault(n(214)),i=_interopRequireDefault(n(215)),a=_interopRequireDefault(n(216)),o=_interopRequireDefault(n(217)),s=_interopRequireDefault(n(218));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var l={\"@charset\":r.default,\"@import\":r.default,\"@namespace\":r.default,\"@keyframes\":i.default,\"@media\":a.default,\"@supports\":a.default,\"@font-face\":o.default,\"@viewport\":s.default,\"@-ms-viewport\":s.default};t.default=Object.keys(l).map(function(e){var t=new RegExp(\"^\"+e);return{onCreateRule:function onCreateRule(n,r,i){return t.test(n)?new l[e](n,r,i):null}}})},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}();var i=function(){function SimpleRule(e,t,n){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,SimpleRule),this.type=\"simple\",this.isProcessed=!1,this.key=e,this.value=t,this.options=n}return r(SimpleRule,[{key:\"toString\",value:function toString(e){if(Array.isArray(this.value)){for(var t=\"\",n=0;n<this.value.length;n++)t+=this.key+\" \"+this.value[n]+\";\",this.value[n+1]&&(t+=\"\\n\");return t}return this.key+\" \"+this.value+\";\"}}]),SimpleRule}();t.default=i},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}(),a=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(19));var o=function(){function KeyframesRule(e,t,n){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,KeyframesRule),this.type=\"keyframes\",this.isProcessed=!1,this.key=e,this.options=n,this.rules=new a.default(r({},n,{parent:this}));for(var i in t)this.rules.add(i,t[i],r({},this.options,{parent:this,selector:i}));this.rules.process()}return i(KeyframesRule,[{key:\"toString\",value:function toString(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{indent:1},t=this.rules.toString(e);return t&&(t+=\"\\n\"),this.key+\" {\\n\"+t+\"}\"}}]),KeyframesRule}();t.default=o},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}(),a=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(19));var o=function(){function ConditionalRule(e,t,n){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,ConditionalRule),this.type=\"conditional\",this.isProcessed=!1,this.key=e,this.options=n,this.rules=new a.default(r({},n,{parent:this}));for(var i in t)this.rules.add(i,t[i]);this.rules.process()}return i(ConditionalRule,[{key:\"getRule\",value:function getRule(e){return this.rules.get(e)}},{key:\"indexOf\",value:function indexOf(e){return this.rules.indexOf(e)}},{key:\"addRule\",value:function addRule(e,t,n){var r=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(r),r}},{key:\"toString\",value:function toString(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{indent:1},t=this.rules.toString(e);return t?this.key+\" {\\n\"+t+\"\\n}\":\"\"}}]),ConditionalRule}();t.default=o},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}(),i=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(46));var a=function(){function FontFaceRule(e,t,n){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,FontFaceRule),this.type=\"font-face\",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return r(FontFaceRule,[{key:\"toString\",value:function toString(e){if(Array.isArray(this.style)){for(var t=\"\",n=0;n<this.style.length;n++)t+=(0,i.default)(this.key,this.style[n]),this.style[n+1]&&(t+=\"\\n\");return t}return(0,i.default)(this.key,this.style,e)}}]),FontFaceRule}();t.default=a},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}(),i=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(46));var a=function(){function ViewportRule(e,t,n){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,ViewportRule),this.type=\"viewport\",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return r(ViewportRule,[{key:\"toString\",value:function toString(e){return(0,i.default)(this.key,this.style,e)}}]),ViewportRule}();t.default=a},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=_interopRequireDefault(n(16)),i=_interopRequireDefault(n(29)),a=_interopRequireDefault(n(76));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}t.default={onCreateRule:function onCreateRule(e,t,n){if(!(0,a.default)(t))return null;var r=t,o=(0,i.default)(e,{},n);return r.subscribe(function(e){for(var t in e)o.prop(t,e[t])}),o},onProcessRule:function onProcessRule(e){if(e instanceof r.default){var t=e,n=t.style,i=function _loop(e){var r=n[e];if(!(0,a.default)(r))return\"continue\";delete n[e],r.subscribe({next:function next(n){t.prop(e,n)}})};for(var o in n){i(o)}}}}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=_interopRequireDefault(n(19)),i=_interopRequireDefault(n(16)),a=_interopRequireDefault(n(221)),o=_interopRequireDefault(n(29));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var s=Date.now(),l=\"fnValues\"+s,u=\"fnStyle\"+ ++s;t.default={onCreateRule:function onCreateRule(e,t,n){if(\"function\"!=typeof t)return null;var r=(0,o.default)(e,{},n);return r[u]=t,r},onProcessStyle:function onProcessStyle(e,t){var n={};for(var r in e){var i=e[r];\"function\"==typeof i&&(delete e[r],n[(0,a.default)(r)]=i)}return(t=t)[l]=n,e},onUpdate:function onUpdate(e,t){if(t.rules instanceof r.default)t.rules.update(e);else if(t instanceof i.default){if((t=t)[l])for(var n in t[l])t.prop(n,t[l][n](e));var a=(t=t)[u];if(a){var o=a(e);for(var s in o)t.prop(s,o[s])}}}}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=/([A-Z])/g,i=function replace(e){return\"-\"+e.toLowerCase()};t.default=function(e){return e.replace(r,i)}},function(e,t,n){\"use strict\";(function(e){Object.defineProperty(t,\"__esModule\",{value:!0});var r=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}(),i=_interopRequireDefault(n(9)),a=_interopRequireDefault(n(48)),o=_interopRequireDefault(n(16)),s=_interopRequireDefault(n(47));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function getStyle(e,t){try{return e.style.getPropertyValue(t)}catch(e){return\"\"}}function setStyle(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=(0,s.default)(n,!0),\"!important\"===n[n.length-1]))return e.style.setProperty(t,r,\"important\"),!0;e.style.setProperty(t,r)}catch(e){return!1}return!0}var l=1,u=7,c=function(){var e=function extractKey(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.substr(t,e.indexOf(\"{\")-1)};return function(t){if(t.type===l)return t.selectorText;if(t.type===u){var n=t.name;if(n)return\"@keyframes \"+n;var r=t.cssText;return\"@\"+e(r,r.indexOf(\"keyframes\"))}return e(t.cssText)}}();function setSelector(e,t){return e.selectorText=t,e.selectorText===t}var p=function(){var e=void 0;return function(){return e||(e=document.head||document.getElementsByTagName(\"head\")[0]),e}}(),h=function(){var e=void 0,t=!1;return function(n){var r={};e||(e=document.createElement(\"style\"));for(var i=0;i<n.length;i++){var a=n[i];if(a instanceof o.default){var s=a.selector;if(s&&-1!==s.indexOf(\"\\\\\")){t||(p().appendChild(e),t=!0),e.textContent=s+\" {}\";var l=e.sheet;if(l){var u=l.cssRules;u&&(r[u[0].selectorText]=a.key)}}}}return t&&(p().removeChild(e),t=!1),r}}();function findPrevNode(e){var t=a.default.registry;if(t.length>0){var n=function findHigherSheet(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n)return n.renderer.element;if(n=function findHighestSheet(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))return n.renderer.element.nextElementSibling}var r=e.insertionPoint;if(r&&\"string\"==typeof r){var o=function findCommentNode(e){for(var t=p(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(o)return o.nextSibling;(0,i.default)(\"jss\"===r,'[JSS] Insertion point \"%s\" not found.',r)}return null}var f=function(){function DomRenderer(t){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,DomRenderer),this.getStyle=getStyle,this.setStyle=setStyle,this.setSelector=setSelector,this.getKey=c,this.getUnescapedKeysMap=h,this.hasInsertedRules=!1,t&&a.default.add(t),this.sheet=t;var n=this.sheet?this.sheet.options:{},r=n.media,i=n.meta,o=n.element;this.element=o||document.createElement(\"style\"),this.element.type=\"text/css\",this.element.setAttribute(\"data-jss\",\"\"),r&&this.element.setAttribute(\"media\",r),i&&this.element.setAttribute(\"data-meta\",i);var s=e.__webpack_nonce__;s&&this.element.setAttribute(\"nonce\",s)}return r(DomRenderer,[{key:\"attach\",value:function attach(){!this.element.parentNode&&this.sheet&&(this.hasInsertedRules&&(this.deploy(),this.hasInsertedRules=!1),function insertStyle(e,t){var n=t.insertionPoint,r=findPrevNode(t);if(r){var a=r.parentNode;a&&a.insertBefore(e,r)}else if(n&&\"number\"==typeof n.nodeType){var o=n,s=o.parentNode;s?s.insertBefore(e,o.nextSibling):(0,i.default)(!1,\"[JSS] Insertion point is not in the DOM.\")}else p().insertBefore(e,r)}(this.element,this.sheet.options))}},{key:\"detach\",value:function detach(){this.element.parentNode.removeChild(this.element)}},{key:\"deploy\",value:function deploy(){this.sheet&&(this.element.textContent=\"\\n\"+this.sheet.toString()+\"\\n\")}},{key:\"insertRule\",value:function insertRule(e,t){var n=this.element.sheet,r=n.cssRules,a=e.toString();if(t||(t=r.length),!a)return!1;try{n.insertRule(a,t)}catch(t){return(0,i.default)(!1,\"[JSS] Can not insert an unsupported rule \\n\\r%s\",e),!1}return this.hasInsertedRules=!0,r[t]}},{key:\"deleteRule\",value:function deleteRule(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),!0)}},{key:\"indexOf\",value:function indexOf(e){for(var t=this.element.sheet.cssRules,n=0;n<t.length;n++)if(e===t[n])return n;return-1}},{key:\"replaceRule\",value:function replaceRule(e,t){var n=this.indexOf(e),r=this.insertRule(t,n);return this.element.sheet.deleteRule(n),r}},{key:\"getRules\",value:function getRules(){return this.element.sheet.cssRules}}]),DomRenderer}();t.default=f}).call(t,n(7))},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}();var i=function(){function VirtualRenderer(){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,VirtualRenderer)}return r(VirtualRenderer,[{key:\"setStyle\",value:function setStyle(){return!0}},{key:\"getStyle\",value:function getStyle(){return\"\"}},{key:\"setSelector\",value:function setSelector(){return!0}},{key:\"getKey\",value:function getKey(){return\"\"}},{key:\"attach\",value:function attach(){}},{key:\"detach\",value:function detach(){}},{key:\"deploy\",value:function deploy(){}},{key:\"insertRule\",value:function insertRule(){return!1}},{key:\"deleteRule\",value:function deleteRule(){return!0}},{key:\"replaceRule\",value:function replaceRule(){return!1}},{key:\"getRules\",value:function getRules(){}},{key:\"indexOf\",value:function indexOf(){return-1}}]),VirtualRenderer}();t.default=i},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}();t.default=function jssGlobal(){return{onCreateRule:function onCreateRule(e,t,n){if(e===o)return new l(e,t,n);if(\"@\"===e[0]&&e.substr(0,s.length)===s)return new u(e,t,n);var r=n.parent;r&&(\"global\"!==r.type&&\"global\"!==r.options.parent.type||(n.global=!0));n.global&&(n.selector=e);return null},onProcessRule:function onProcessRule(e){if(\"style\"!==e.type)return;(function handleNestedGlobalContainerRule(e){var t=e.options,n=e.style,i=n[o];if(!i)return;for(var a in i)t.sheet.addRule(a,i[a],r({},t,{selector:addScope(a,e.selector)}));delete n[o]})(e),function handlePrefixedGlobalRule(e){var t=e.options,n=e.style;for(var i in n)if(i.substr(0,o.length)===o){var a=addScope(i.substr(o.length),e.selector);t.sheet.addRule(a,n[i],r({},t,{selector:a})),delete n[i]}}(e)}}};var a=n(74);function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}var o=\"@global\",s=\"@global \",l=function(){function GlobalContainerRule(e,t,n){_classCallCheck(this,GlobalContainerRule),this.type=\"global\",this.key=e,this.options=n,this.rules=new a.RuleList(r({},n,{parent:this}));for(var i in t)this.rules.add(i,t[i],{selector:i});this.rules.process()}return i(GlobalContainerRule,[{key:\"getRule\",value:function getRule(e){return this.rules.get(e)}},{key:\"addRule\",value:function addRule(e,t,n){var r=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(r),r}},{key:\"indexOf\",value:function indexOf(e){return this.rules.indexOf(e)}},{key:\"toString\",value:function toString(){return this.rules.toString()}}]),GlobalContainerRule}(),u=function(){function GlobalPrefixedRule(e,t,n){_classCallCheck(this,GlobalPrefixedRule),this.name=e,this.options=n;var i=e.substr(s.length);this.rule=n.jss.createRule(i,t,r({},n,{parent:this,selector:i}))}return i(GlobalPrefixedRule,[{key:\"toString\",value:function toString(e){return this.rule.toString(e)}}]),GlobalPrefixedRule}(),c=/\\s*,\\s*/g;function addScope(e,t){for(var n=e.split(c),r=\"\",i=0;i<n.length;i++)r+=t+\" \"+n[i].trim(),n[i+1]&&(r+=\", \");return r}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=\"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};t.default=function jssIsolate(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!1,n=[],r=void 0,i=void 0,a=function setSelector(){i.selector=n.join(\",\\n\")},o=h(a);return{onProcessRule:function onProcessRule(a,l){if(!l||l===r||\"style\"!==a.type)return;if(!p(a,l,e))return;i||(r=a.options.jss.createStyleSheet(null,s),i=r.addRule(\"reset\",u(e.reset)),r.attach());var c=a.selector;-1===n.indexOf(c)&&(n.push(c),t=o())},onProcessSheet:function onProcessSheet(){!t&&n.length&&a()}}};var a=_interopRequireDefault(n(226)),o=_interopRequireDefault(n(227));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var s={meta:\"jss-isolate\",index:-1/0,link:!0},l={inherited:a.default,all:o.default},u=function getStyle(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"inherited\";if(\"string\"==typeof e)return l[e];if(\"object\"===(void 0===e?\"undefined\":i(e))){if(Array.isArray(e)){var t=e[0],n=e[1];return r({},l[t],n)}return r({},a.default,e)}return a.default},c={keyframes:!0,conditional:!0},p=function shouldIsolate(e,t,n){var r=e.options.parent;if(r&&c[r.type])return!1;var i=null==n.isolate||n.isolate;return null!=t.options.isolate&&(i=t.options.isolate),null!=e.style.isolate&&(i=e.style.isolate,delete e.style.isolate),\"string\"==typeof i?i===e.key:i},h=function createDebounced(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=Date.now();return function(){var r=Date.now();return!(r-n<t)&&(n=r,e(),!0)}}},function(e,t){e.exports={\"-ms-overflow-style\":\"auto\",\"-moz-context-properties\":\"none\",\"-moz-image-region\":\"auto\",\"-moz-stack-sizing\":\"stretch-to-fit\",\"-moz-user-input\":\"auto\",\"-moz-user-modify\":\"read-only\",\"-webkit-border-before-color\":\"currentcolor\",\"-webkit-border-before-style\":\"none\",\"-webkit-border-before-width\":\"medium\",\"-webkit-text-fill-color\":\"currentcolor\",\"-webkit-text-stroke-color\":\"currentcolor\",\"-webkit-text-stroke-width\":\"0\",\"-webkit-touch-callout\":\"default\",azimuth:\"center\",\"border-collapse\":\"separate\",\"border-spacing\":\"0\",\"caption-side\":\"top\",\"caret-color\":\"auto\",color:\"initial\",cursor:\"auto\",\"empty-cells\":\"show\",\"font-family\":\"initial\",\"font-feature-settings\":\"normal\",\"font-kerning\":\"auto\",\"font-language-override\":\"normal\",\"font-size\":\"medium\",\"font-size-adjust\":\"none\",\"font-stretch\":\"normal\",\"font-style\":\"normal\",\"font-synthesis\":\"weight style\",\"font-variant\":\"normal\",\"font-variant-alternates\":\"normal\",\"font-variant-caps\":\"normal\",\"font-variant-east-asian\":\"normal\",\"font-variant-ligatures\":\"normal\",\"font-variant-numeric\":\"normal\",\"font-variant-position\":\"normal\",\"font-weight\":\"normal\",hyphens:\"manual\",\"image-orientation\":\"0deg\",\"image-rendering\":\"auto\",\"image-resolution\":\"1dppx\",\"letter-spacing\":\"normal\",\"line-height\":\"normal\",\"list-style-image\":\"none\",\"list-style-position\":\"outside\",\"list-style-type\":\"disc\",\"object-position\":\"50% 50%\",orphans:\"2\",\"overflow-wrap\":\"normal\",\"pointer-events\":\"auto\",quotes:\"initial\",\"ruby-align\":\"space-around\",\"ruby-merge\":\"separate\",\"ruby-position\":\"over\",\"tab-size\":\"8\",\"text-align\":\"initial\",\"text-align-last\":\"auto\",\"text-combine-upright\":\"none\",\"text-indent\":\"0\",\"text-justify\":\"auto\",\"text-orientation\":\"mixed\",\"text-rendering\":\"auto\",\"text-shadow\":\"none\",\"text-transform\":\"none\",\"text-underline-position\":\"auto\",visibility:\"visible\",\"white-space\":\"normal\",widows:\"2\",\"word-break\":\"normal\",\"word-spacing\":\"normal\",\"word-wrap\":\"normal\",\"writing-mode\":\"horizontal-tb\",\"-webkit-appearance\":\"none\",\"-moz-appearance\":\"none\",\"-ms-appearance\":\"none\",appearance:\"none\"}},function(e,t){e.exports={\"-ms-overflow-style\":\"auto\",\"-moz-appearance\":\"none\",\"-moz-binding\":\"none\",\"-moz-border-bottom-colors\":\"none\",\"-moz-border-left-colors\":\"none\",\"-moz-border-right-colors\":\"none\",\"-moz-border-top-colors\":\"none\",\"-moz-context-properties\":\"none\",\"-moz-float-edge\":\"content-box\",\"-moz-force-broken-image-icon\":\"0\",\"-moz-image-region\":\"auto\",\"-moz-orient\":\"inline\",\"-moz-outline-radius-bottomleft\":\"0\",\"-moz-outline-radius-bottomright\":\"0\",\"-moz-outline-radius-topleft\":\"0\",\"-moz-outline-radius-topright\":\"0\",\"-moz-stack-sizing\":\"stretch-to-fit\",\"-moz-text-blink\":\"none\",\"-moz-user-focus\":\"none\",\"-moz-user-input\":\"auto\",\"-moz-user-modify\":\"read-only\",\"-moz-window-shadow\":\"default\",\"-webkit-border-before-color\":\"currentcolor\",\"-webkit-border-before-style\":\"none\",\"-webkit-border-before-width\":\"medium\",\"-webkit-box-reflect\":\"none\",\"-webkit-mask-attachment\":\"scroll\",\"-webkit-mask-clip\":\"border\",\"-webkit-mask-composite\":\"source-over\",\"-webkit-mask-image\":\"none\",\"-webkit-mask-origin\":\"padding\",\"-webkit-mask-position\":\"0% 0%\",\"-webkit-mask-position-x\":\"0%\",\"-webkit-mask-position-y\":\"0%\",\"-webkit-mask-repeat\":\"repeat\",\"-webkit-mask-repeat-x\":\"repeat\",\"-webkit-mask-repeat-y\":\"repeat\",\"-webkit-tap-highlight-color\":\"black\",\"-webkit-text-fill-color\":\"currentcolor\",\"-webkit-text-stroke-color\":\"currentcolor\",\"-webkit-text-stroke-width\":\"0\",\"-webkit-touch-callout\":\"default\",\"align-content\":\"stretch\",\"align-items\":\"stretch\",\"align-self\":\"auto\",\"animation-delay\":\"0s\",\"animation-direction\":\"normal\",\"animation-duration\":\"0s\",\"animation-fill-mode\":\"none\",\"animation-iteration-count\":\"1\",\"animation-name\":\"none\",\"animation-play-state\":\"running\",\"animation-timing-function\":\"ease\",azimuth:\"center\",\"backface-visibility\":\"visible\",\"background-attachment\":\"scroll\",\"background-blend-mode\":\"normal\",\"background-clip\":\"border-box\",\"background-color\":\"transparent\",\"background-image\":\"none\",\"background-origin\":\"padding-box\",\"background-position\":\"0% 0%\",\"background-repeat\":\"repeat\",\"background-size\":\"auto auto\",\"block-size\":\"auto\",\"border-block-end-color\":\"currentcolor\",\"border-block-end-style\":\"none\",\"border-block-end-width\":\"medium\",\"border-block-start-color\":\"currentcolor\",\"border-block-start-style\":\"none\",\"border-block-start-width\":\"medium\",\"border-bottom-color\":\"currentcolor\",\"border-bottom-left-radius\":\"0\",\"border-bottom-right-radius\":\"0\",\"border-bottom-style\":\"none\",\"border-bottom-width\":\"medium\",\"border-collapse\":\"separate\",\"border-image-outset\":\"0s\",\"border-image-repeat\":\"stretch\",\"border-image-slice\":\"100%\",\"border-image-source\":\"none\",\"border-image-width\":\"1\",\"border-inline-end-color\":\"currentcolor\",\"border-inline-end-style\":\"none\",\"border-inline-end-width\":\"medium\",\"border-inline-start-color\":\"currentcolor\",\"border-inline-start-style\":\"none\",\"border-inline-start-width\":\"medium\",\"border-left-color\":\"currentcolor\",\"border-left-style\":\"none\",\"border-left-width\":\"medium\",\"border-right-color\":\"currentcolor\",\"border-right-style\":\"none\",\"border-right-width\":\"medium\",\"border-spacing\":\"0\",\"border-top-color\":\"currentcolor\",\"border-top-left-radius\":\"0\",\"border-top-right-radius\":\"0\",\"border-top-style\":\"none\",\"border-top-width\":\"medium\",bottom:\"auto\",\"box-align\":\"stretch\",\"box-decoration-break\":\"slice\",\"box-direction\":\"normal\",\"box-flex\":\"0\",\"box-flex-group\":\"1\",\"box-lines\":\"single\",\"box-ordinal-group\":\"1\",\"box-orient\":\"initial\",\"box-pack\":\"start\",\"box-shadow\":\"none\",\"box-sizing\":\"content-box\",\"break-after\":\"auto\",\"break-before\":\"auto\",\"break-inside\":\"auto\",\"caption-side\":\"top\",\"caret-color\":\"auto\",clear:\"none\",clip:\"auto\",\"clip-path\":\"none\",color:\"initial\",\"column-count\":\"auto\",\"column-fill\":\"balance\",\"column-gap\":\"normal\",\"column-rule-color\":\"currentcolor\",\"column-rule-style\":\"none\",\"column-rule-width\":\"medium\",\"column-span\":\"none\",\"column-width\":\"auto\",content:\"normal\",\"counter-increment\":\"none\",\"counter-reset\":\"none\",cursor:\"auto\",display:\"inline\",\"empty-cells\":\"show\",filter:\"none\",\"flex-basis\":\"auto\",\"flex-direction\":\"row\",\"flex-grow\":\"0\",\"flex-shrink\":\"1\",\"flex-wrap\":\"nowrap\",float:\"none\",\"font-family\":\"initial\",\"font-feature-settings\":\"normal\",\"font-kerning\":\"auto\",\"font-language-override\":\"normal\",\"font-size\":\"medium\",\"font-size-adjust\":\"none\",\"font-stretch\":\"normal\",\"font-style\":\"normal\",\"font-synthesis\":\"weight style\",\"font-variant\":\"normal\",\"font-variant-alternates\":\"normal\",\"font-variant-caps\":\"normal\",\"font-variant-east-asian\":\"normal\",\"font-variant-ligatures\":\"normal\",\"font-variant-numeric\":\"normal\",\"font-variant-position\":\"normal\",\"font-weight\":\"normal\",\"grid-auto-columns\":\"auto\",\"grid-auto-flow\":\"row\",\"grid-auto-rows\":\"auto\",\"grid-column-end\":\"auto\",\"grid-column-gap\":\"0\",\"grid-column-start\":\"auto\",\"grid-row-end\":\"auto\",\"grid-row-gap\":\"0\",\"grid-row-start\":\"auto\",\"grid-template-areas\":\"none\",\"grid-template-columns\":\"none\",\"grid-template-rows\":\"none\",height:\"auto\",hyphens:\"manual\",\"image-orientation\":\"0deg\",\"image-rendering\":\"auto\",\"image-resolution\":\"1dppx\",\"ime-mode\":\"auto\",\"inline-size\":\"auto\",isolation:\"auto\",\"justify-content\":\"flex-start\",left:\"auto\",\"letter-spacing\":\"normal\",\"line-break\":\"auto\",\"line-height\":\"normal\",\"list-style-image\":\"none\",\"list-style-position\":\"outside\",\"list-style-type\":\"disc\",\"margin-block-end\":\"0\",\"margin-block-start\":\"0\",\"margin-bottom\":\"0\",\"margin-inline-end\":\"0\",\"margin-inline-start\":\"0\",\"margin-left\":\"0\",\"margin-right\":\"0\",\"margin-top\":\"0\",\"marker-offset\":\"auto\",\"mask-clip\":\"border-box\",\"mask-composite\":\"add\",\"mask-image\":\"none\",\"mask-mode\":\"match-source\",\"mask-origin\":\"border-box\",\"mask-position\":\"0% 0%\",\"mask-repeat\":\"repeat\",\"mask-size\":\"auto\",\"mask-type\":\"luminance\",\"max-height\":\"none\",\"max-width\":\"none\",\"min-block-size\":\"0\",\"min-height\":\"0\",\"min-inline-size\":\"0\",\"min-width\":\"0\",\"mix-blend-mode\":\"normal\",\"object-fit\":\"fill\",\"object-position\":\"50% 50%\",\"offset-block-end\":\"auto\",\"offset-block-start\":\"auto\",\"offset-inline-end\":\"auto\",\"offset-inline-start\":\"auto\",opacity:\"1.0\",order:\"0\",orphans:\"2\",\"outline-color\":\"initial\",\"outline-offset\":\"0\",\"outline-style\":\"none\",\"outline-width\":\"medium\",overflow:\"visible\",\"overflow-clip-box\":\"padding-box\",\"overflow-wrap\":\"normal\",\"overflow-x\":\"visible\",\"overflow-y\":\"visible\",\"padding-block-end\":\"0\",\"padding-block-start\":\"0\",\"padding-bottom\":\"0\",\"padding-inline-end\":\"0\",\"padding-inline-start\":\"0\",\"padding-left\":\"0\",\"padding-right\":\"0\",\"padding-top\":\"0\",\"page-break-after\":\"auto\",\"page-break-before\":\"auto\",\"page-break-inside\":\"auto\",perspective:\"none\",\"perspective-origin\":\"50% 50%\",\"pointer-events\":\"auto\",position:\"static\",quotes:\"initial\",resize:\"none\",right:\"auto\",\"ruby-align\":\"space-around\",\"ruby-merge\":\"separate\",\"ruby-position\":\"over\",\"scroll-behavior\":\"auto\",\"scroll-snap-coordinate\":\"none\",\"scroll-snap-destination\":\"0px 0px\",\"scroll-snap-points-x\":\"none\",\"scroll-snap-points-y\":\"none\",\"scroll-snap-type\":\"none\",\"scroll-snap-type-x\":\"none\",\"scroll-snap-type-y\":\"none\",\"shape-image-threshold\":\"0.0\",\"shape-margin\":\"0\",\"shape-outside\":\"none\",\"tab-size\":\"8\",\"table-layout\":\"auto\",\"text-align\":\"initial\",\"text-align-last\":\"auto\",\"text-combine-upright\":\"none\",\"text-decoration-color\":\"currentcolor\",\"text-decoration-line\":\"none\",\"text-decoration-style\":\"solid\",\"text-emphasis-color\":\"currentcolor\",\"text-emphasis-position\":\"over right\",\"text-emphasis-style\":\"none\",\"text-indent\":\"0\",\"text-justify\":\"auto\",\"text-orientation\":\"mixed\",\"text-overflow\":\"clip\",\"text-rendering\":\"auto\",\"text-shadow\":\"none\",\"text-transform\":\"none\",\"text-underline-position\":\"auto\",top:\"auto\",\"touch-action\":\"auto\",transform:\"none\",\"transform-box\":\"border-box \",\"transform-origin\":\"50% 50% 0\",\"transform-style\":\"flat\",\"transition-delay\":\"0s\",\"transition-duration\":\"0s\",\"transition-property\":\"all\",\"transition-timing-function\":\"ease\",\"user-select\":\"auto\",\"vertical-align\":\"baseline\",visibility:\"visible\",\"white-space\":\"normal\",widows:\"2\",width:\"auto\",\"will-change\":\"auto\",\"word-break\":\"normal\",\"word-spacing\":\"normal\",\"word-wrap\":\"normal\",\"writing-mode\":\"horizontal-tb\",\"z-index\":\"auto\",\"-webkit-appearance\":\"none\",\"-ms-appearance\":\"none\",appearance:\"none\"}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function jssNested(){function getReplaceRef(e){return function(t,n){var r=e.getRule(n);return r?r.selector:((0,i.default)(!1,\"[JSS] Could not find the referenced rule %s in %s.\",n,e.options.meta||e),n)}}var e=function hasAnd(e){return-1!==e.indexOf(\"&\")};function replaceParentRefs(t,n){for(var r=n.split(a),i=t.split(a),s=\"\",l=0;l<r.length;l++)for(var u=r[l],c=0;c<i.length;c++){var p=i[c];s&&(s+=\", \"),s+=e(p)?p.replace(o,u):u+\" \"+p}return s}function getOptions(e,t,n){if(n)return r({},n,{index:n.index+1});var i=e.options.nestingLevel;return i=void 0===i?1:i+1,r({},e.options,{nestingLevel:i,index:t.indexOf(e)+1})}return{onProcessStyle:function onProcessStyle(t,n){if(\"style\"!==n.type)return t;var i=n.options.parent,a=void 0,o=void 0;for(var l in t){var u=e(l),c=\"@\"===l[0];if(u||c){if(a=getOptions(n,i,a),u){var p=replaceParentRefs(l,n.selector);o||(o=getReplaceRef(i)),p=p.replace(s,o),i.addRule(p,t[l],r({},a,{selector:p}))}else c&&i.addRule(l,null,a).addRule(n.key,t[l],{selector:n.selector});delete t[l]}}return t}}};var i=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(9));var a=/\\s*,\\s*/g,o=/&/g,s=/\\$([\\w-]+)/g},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function camelCase(){return{onProcessStyle:function onProcessStyle(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=convertCase(e[t]);return e}return convertCase(e)}}};var r=/([A-Z])/g;function replace(e){return\"-\"+e.toLowerCase()}function convertCase(e){var t={};for(var n in e)t[n.replace(r,replace)]=e[n];return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(convertCase):t.fallbacks=convertCase(e.fallbacks)),t}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=\"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};t.default=function defaultUnit(){var e=addCamelCasedVersion(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});return{onProcessStyle:function onProcessStyle(t,n){if(\"style\"!==n.type)return t;for(var r in t)t[r]=iterate(r,t[r],e);return t},onChangeValue:function onChangeValue(t,n){return iterate(n,t,e)}}};function addCamelCasedVersion(e){var t=/(-[a-z])/g,n=function replace(e){return e[1].toUpperCase()},r={};for(var i in e)r[i]=e[i],r[i.replace(t,n)]=e[i];return r}var i=addCamelCasedVersion(function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(231)).default);function iterate(e,t,n){if(!t)return t;var a=t,o=void 0===t?\"undefined\":r(t);switch(\"object\"===o&&Array.isArray(t)&&(o=\"array\"),o){case\"object\":if(\"fallbacks\"===e){for(var s in t)t[s]=iterate(s,t[s],n);break}for(var l in t)t[l]=iterate(e+\"-\"+l,t[l],n);break;case\"array\":for(var u=0;u<t.length;u++)t[u]=iterate(e,t[u],n);break;case\"number\":0!==t&&(a=t+(n[e]||i[e]||\"\"))}return a}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default={\"animation-delay\":\"ms\",\"animation-duration\":\"ms\",\"background-position\":\"px\",\"background-position-x\":\"px\",\"background-position-y\":\"px\",\"background-size\":\"px\",border:\"px\",\"border-bottom\":\"px\",\"border-bottom-left-radius\":\"px\",\"border-bottom-right-radius\":\"px\",\"border-bottom-width\":\"px\",\"border-left\":\"px\",\"border-left-width\":\"px\",\"border-radius\":\"px\",\"border-right\":\"px\",\"border-right-width\":\"px\",\"border-spacing\":\"px\",\"border-top\":\"px\",\"border-top-left-radius\":\"px\",\"border-top-right-radius\":\"px\",\"border-top-width\":\"px\",\"border-width\":\"px\",\"border-after-width\":\"px\",\"border-before-width\":\"px\",\"border-end-width\":\"px\",\"border-horizontal-spacing\":\"px\",\"border-start-width\":\"px\",\"border-vertical-spacing\":\"px\",bottom:\"px\",\"box-shadow\":\"px\",\"column-gap\":\"px\",\"column-rule\":\"px\",\"column-rule-width\":\"px\",\"column-width\":\"px\",\"flex-basis\":\"px\",\"font-size\":\"px\",\"font-size-delta\":\"px\",height:\"px\",left:\"px\",\"letter-spacing\":\"px\",\"logical-height\":\"px\",\"logical-width\":\"px\",margin:\"px\",\"margin-after\":\"px\",\"margin-before\":\"px\",\"margin-bottom\":\"px\",\"margin-left\":\"px\",\"margin-right\":\"px\",\"margin-top\":\"px\",\"max-height\":\"px\",\"max-width\":\"px\",\"margin-end\":\"px\",\"margin-start\":\"px\",\"mask-position-x\":\"px\",\"mask-position-y\":\"px\",\"mask-size\":\"px\",\"max-logical-height\":\"px\",\"max-logical-width\":\"px\",\"min-height\":\"px\",\"min-width\":\"px\",\"min-logical-height\":\"px\",\"min-logical-width\":\"px\",motion:\"px\",\"motion-offset\":\"px\",outline:\"px\",\"outline-offset\":\"px\",\"outline-width\":\"px\",padding:\"px\",\"padding-bottom\":\"px\",\"padding-left\":\"px\",\"padding-right\":\"px\",\"padding-top\":\"px\",\"padding-after\":\"px\",\"padding-before\":\"px\",\"padding-end\":\"px\",\"padding-start\":\"px\",\"perspective-origin-x\":\"%\",\"perspective-origin-y\":\"%\",perspective:\"px\",right:\"px\",\"shape-margin\":\"px\",size:\"px\",\"text-indent\":\"px\",\"text-stroke\":\"px\",\"text-stroke-width\":\"px\",top:\"px\",\"transform-origin\":\"%\",\"transform-origin-x\":\"%\",\"transform-origin-y\":\"%\",\"transform-origin-z\":\"%\",\"transition-delay\":\"ms\",\"transition-duration\":\"ms\",\"vertical-align\":\"px\",width:\"px\",\"word-spacing\":\"px\",\"box-shadow-x\":\"px\",\"box-shadow-y\":\"px\",\"box-shadow-blur\":\"px\",\"box-shadow-spread\":\"px\",\"font-line-height\":\"px\",\"text-shadow-x\":\"px\",\"text-shadow-y\":\"px\",\"text-shadow-blur\":\"px\"}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function jssCompose(){return{onProcessStyle:function onProcessStyle(e,t){return e.composes?(function registerClass(e,t){if(!t)return!0;if(Array.isArray(t)){for(var n=0;n<t.length;n++){var i=registerClass(e,t[n]);if(!i)return!1}return!0}if(t.indexOf(\" \")>-1)return registerClass(e,t.split(\" \"));var a=e.options.parent;if(\"$\"===t[0]){var o=a.getRule(t.substr(1));return o?o===e?((0,r.default)(!1,\"[JSS] Cyclic composition detected. \\r\\n%s\",e),!1):(a.classes[e.key]+=\" \"+a.classes[o.key],!0):((0,r.default)(!1,\"[JSS] Referenced rule is not defined. \\r\\n%s\",e),!1)}return e.options.parent.classes[e.key]+=\" \"+t,!0}(t,e.composes),delete e.composes,e):e}}};var r=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(9))},function(e,t,n){\"use strict\";t.a={animation:\"none 0s ease 0s 1 normal none running\",\"backface-visibility\":\"visible\",background:\"transparent none repeat 0 0 / auto auto padding-box border-box scroll\",border:\"medium none currentColor\",\"border-image\":\"none\",\"border-radius\":\"0\",bottom:\"auto\",\"box-shadow\":\"none\",clear:\"none\",clip:\"auto\",columns:\"auto\",\"column-count\":\"auto\",\"column-fill\":\"balance\",\"column-gap\":\"normal\",\"column-rule\":\"medium none currentColor\",\"column-span\":\"1\",\"column-width\":\"auto\",content:\"normal\",\"counter-increment\":\"none\",\"counter-reset\":\"none\",float:\"none\",height:\"auto\",hyphens:\"none\",left:\"auto\",margin:\"0\",\"max-height\":\"none\",\"max-width\":\"none\",\"min-height\":\"0\",\"min-width\":\"0\",opacity:\"1\",outline:\"medium none invert\",overflow:\"visible\",\"overflow-x\":\"visible\",\"overflow-y\":\"visible\",padding:\"0\",\"page-break-after\":\"auto\",\"page-break-before\":\"auto\",\"page-break-inside\":\"auto\",perspective:\"none\",\"perspective-origin\":\"50% 50%\",position:\"static\",right:\"auto\",\"table-layout\":\"auto\",\"text-decoration\":\"none\",top:\"auto\",transform:\"none\",\"transform-origin\":\"50% 50% 0\",\"transform-style\":\"flat\",transition:\"none 0s ease 0s\",\"unicode-bidi\":\"normal\",\"vertical-align\":\"baseline\",width:\"auto\",\"z-index\":\"auto\"}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),n.d(t,\"spaceFactor\",function(){return r}),n.d(t,\"space\",function(){return i}),n.d(t,\"color\",function(){return a}),n.d(t,\"fontFamily\",function(){return o}),n.d(t,\"fontSize\",function(){return s}),n.d(t,\"mq\",function(){return l}),n.d(t,\"borderRadius\",function(){return u}),n.d(t,\"maxWidth\",function(){return c}),n.d(t,\"sidebarWidth\",function(){return p}),n.d(t,\"buttonTextTransform\",function(){return h});var r=8,i=[r/2,r,2*r,3*r,4*r,5*r,6*r],a={base:\"#333\",light:\"#999\",lightest:\"#ccc\",link:\"#1978c8\",linkHover:\"#f28a25\",border:\"#e8e8e8\",name:\"#7f9a44\",type:\"#b77daa\",error:\"#c00\",baseBackground:\"#fff\",codeBackground:\"#f5f5f5\",sidebarBackground:\"#f5f5f5\"},o={base:[\"-apple-system\",\"BlinkMacSystemFont\",'\"Segoe UI\"','\"Roboto\"','\"Oxygen\"','\"Ubuntu\"','\"Cantarell\"','\"Fira Sans\"','\"Droid Sans\"','\"Helvetica Neue\"',\"sans-serif\"],monospace:[\"Consolas\",'\"Liberation Mono\"',\"Menlo\",\"monospace\"]},s={base:15,text:16,small:13,h1:48,h2:36,h3:24,h4:18,h5:16,h6:16},l={small:\"@media (max-width: 600px)\"},u=3,c=1e3,p=200,h=\"uppercase\"},function(e,t,n){var r=n(3);e.exports=function(){return r.Date.now()}},function(e,t,n){var r=n(4),i=n(30),a=NaN,o=/^\\s+|\\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function toNumber(e){if(\"number\"==typeof e)return e;if(i(e))return a;if(r(e)){var t=\"function\"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+\"\":t}if(\"string\"!=typeof e)return 0===e?e:+e;e=e.replace(o,\"\");var n=l.test(e);return n||u.test(e)?c(e.slice(2),n?2:8):s.test(e)?a:+e}},function(e,t){e.exports=function(e){var t=\"undefined\"!=typeof window&&window.location;if(!t)throw new Error(\"fixUrls requires window.location\");if(!e||\"string\"!=typeof e)return e;var n=t.protocol+\"//\"+t.host,r=n+t.pathname.replace(/\\/[^\\/]*$/,\"/\");return e.replace(/url\\s*\\(((?:[^)(]|\\((?:[^)(]+|\\([^)(]*\\))*\\))*)\\)/gi,function(e,t){var i=t.trim().replace(/^\"(.*)\"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});if(/^(#|data:|http:\\/\\/|https:\\/\\/|file:\\/\\/\\/)/i.test(i))return e;var a;return a=0===i.indexOf(\"//\")?i:0===i.indexOf(\"/\")?n+i:r+i.replace(/^\\.\\//,\"\"),\"url(\"+JSON.stringify(a)+\")\"})}},function(e,t,n){\"use strict\";var r=n(239);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";t.a=Usage;var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(240),l=n(307);function Usage(e){var t=e.props,n=t.props,r=t.methods,a=n&&i.a.createElement(s.a,{props:n}),o=r&&r.length>0&&i.a.createElement(l.a,{methods:r});return a||o?i.a.createElement(\"div\",null,a,o):null}Usage.propTypes={props:o.a.shape({props:o.a.object,methods:o.a.array}).isRequired}},function(e,t,n){\"use strict\";var r=n(241);n.d(t,\"a\",function(){return r.a})},function(module,__webpack_exports__,__webpack_require__){\"use strict\";__webpack_exports__.a=PropsRenderer;var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(0),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_prop_types__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__),__WEBPACK_IMPORTED_MODULE_2_react_group__=__webpack_require__(80),__WEBPACK_IMPORTED_MODULE_2_react_group___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_group__),__WEBPACK_IMPORTED_MODULE_3_javascript_stringify__=__webpack_require__(242),__WEBPACK_IMPORTED_MODULE_3_javascript_stringify___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_javascript_stringify__),__WEBPACK_IMPORTED_MODULE_4_rsg_components_Arguments__=__webpack_require__(82),__WEBPACK_IMPORTED_MODULE_5_rsg_components_Argument__=__webpack_require__(49),__WEBPACK_IMPORTED_MODULE_6_rsg_components_Code__=__webpack_require__(55),__WEBPACK_IMPORTED_MODULE_7_rsg_components_JsDoc__=__webpack_require__(56),__WEBPACK_IMPORTED_MODULE_8_rsg_components_Markdown__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_9_rsg_components_Name__=__webpack_require__(54),__WEBPACK_IMPORTED_MODULE_10_rsg_components_Type__=__webpack_require__(94),__WEBPACK_IMPORTED_MODULE_11_rsg_components_Text__=__webpack_require__(93),__WEBPACK_IMPORTED_MODULE_12_rsg_components_Para__=__webpack_require__(52),__WEBPACK_IMPORTED_MODULE_13_rsg_components_Table__=__webpack_require__(96),__WEBPACK_IMPORTED_MODULE_14_lodash_map__=__webpack_require__(95),__WEBPACK_IMPORTED_MODULE_14_lodash_map___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14_lodash_map__),__WEBPACK_IMPORTED_MODULE_15__util__=__webpack_require__(306),_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function renderType(e){if(!e)return\"unknown\";var t=e.name;switch(t){case\"arrayOf\":return e.value.name+\"[]\";case\"objectOf\":return\"{\"+renderType(e.value)+\"}\";case\"instanceOf\":return e.value;default:return t}}function renderEnum(e){if(!Array.isArray(Object(__WEBPACK_IMPORTED_MODULE_15__util__.a)(e).value))return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\"span\",null,Object(__WEBPACK_IMPORTED_MODULE_15__util__.a)(e).value);var t=Object(__WEBPACK_IMPORTED_MODULE_15__util__.a)(e).value.map(function(e){var t=e.value;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_rsg_components_Code__.a,{key:t},Object(__WEBPACK_IMPORTED_MODULE_15__util__.b)(Object(__WEBPACK_IMPORTED_MODULE_15__util__.c)(t)))});return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\"span\",null,\"One of:\",\" \",__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_group___default.a,{separator:\", \",inline:!0},t))}function renderShape(e){var t=[];for(var n in e){var r=e[n],i=renderDefault(r),a=r.description;t.push(__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\"div\",{key:n},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_rsg_components_Name__.a,null,n),\": \",__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_rsg_components_Type__.a,null,renderType(r)),i&&\" — \",i,a&&\" — \",a&&__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_rsg_components_Markdown__.a,{text:a,inline:!0})))}return t}var defaultValueBlacklist=[\"null\",\"undefined\"];function renderDefault(prop){if(prop.required)return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_rsg_components_Text__.a,{size:\"small\",color:\"light\"},\"Required\");if(prop.defaultValue){if(prop.type){var propName=prop.type.name;if(defaultValueBlacklist.indexOf(prop.defaultValue.value)>-1)return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_rsg_components_Code__.a,null,Object(__WEBPACK_IMPORTED_MODULE_15__util__.b)(Object(__WEBPACK_IMPORTED_MODULE_15__util__.c)(prop.defaultValue.value)));if(\"func\"===propName)return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_rsg_components_Text__.a,{size:\"small\",color:\"light\",underlined:!0,title:Object(__WEBPACK_IMPORTED_MODULE_15__util__.b)(Object(__WEBPACK_IMPORTED_MODULE_15__util__.c)(prop.defaultValue.value))},\"Function\");if(\"shape\"===propName||\"object\"===propName)try{var object=eval(\"(\"+prop.defaultValue.value+\")\");return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_rsg_components_Text__.a,{size:\"small\",color:\"light\",underlined:!0,title:__WEBPACK_IMPORTED_MODULE_3_javascript_stringify___default()(object,null,2)},\"Shape\")}catch(e){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_rsg_components_Text__.a,{size:\"small\",color:\"light\",underlined:!0,title:prop.defaultValue.value},\"Shape\")}}return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_rsg_components_Code__.a,null,Object(__WEBPACK_IMPORTED_MODULE_15__util__.b)(Object(__WEBPACK_IMPORTED_MODULE_15__util__.c)(prop.defaultValue.value)))}return\"\"}function renderDescription(e){var t=e.description,n=e.tags,r=void 0===n?{}:n,i=renderExtra(e),a=[].concat(_toConsumableArray(r.arg||[]),_toConsumableArray(r.argument||[]),_toConsumableArray(r.param||[])),o=r.return&&r.return[0]||r.returns&&r.returns[0];return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\"div\",null,t&&__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_rsg_components_Markdown__.a,{text:t}),i&&__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12_rsg_components_Para__.a,null,i),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_rsg_components_JsDoc__.a,r),a.length>0&&__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4_rsg_components_Arguments__.a,{args:a,heading:!0}),o&&__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_rsg_components_Argument__.a,_extends({},o,{returns:!0})))}function renderExtra(e){var t=Object(__WEBPACK_IMPORTED_MODULE_15__util__.a)(e);if(!t)return null;switch(t.name){case\"enum\":return renderEnum(e);case\"union\":return renderUnion(e);case\"shape\":return renderShape(e.type.value);case\"arrayOf\":case\"objectOf\":return\"shape\"===t.value.name?renderShape(e.type.value.value):null;default:return null}}function renderUnion(e){if(!Array.isArray(Object(__WEBPACK_IMPORTED_MODULE_15__util__.a)(e).value))return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\"span\",null,Object(__WEBPACK_IMPORTED_MODULE_15__util__.a)(e).value);var t=Object(__WEBPACK_IMPORTED_MODULE_15__util__.a)(e).value.map(function(e,t){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_rsg_components_Type__.a,{key:e.name+\"-\"+t},renderType(e))});return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\"span\",null,\"One of type:\",\" \",__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_group___default.a,{separator:\", \",inline:!0},t))}function renderName(e){var t=e.name,n=e.tags,r=void 0===n?{}:n;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_rsg_components_Name__.a,{deprecated:!!r.deprecated},t)}function renderTypeColumn(e){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_rsg_components_Type__.a,null,renderType(Object(__WEBPACK_IMPORTED_MODULE_15__util__.a)(e)))}function getRowKey(e){return e.name}function propsToArray(e){return __WEBPACK_IMPORTED_MODULE_14_lodash_map___default()(e,function(e,t){return _extends({},e,{name:t})})}var columns=[{caption:\"Prop name\",render:renderName},{caption:\"Type\",render:renderTypeColumn},{caption:\"Default\",render:renderDefault},{caption:\"Description\",render:renderDescription}];function PropsRenderer(e){var t=e.props;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13_rsg_components_Table__.a,{columns:columns,rows:(n=t,__WEBPACK_IMPORTED_MODULE_14_lodash_map___default()(n,function(e,t){return _extends({},e,{name:t})})),getRowKey:getRowKey});var n}PropsRenderer.propTypes={props:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object.isRequired}},function(e,t,n){(function(t){n=function(){var e=/[\\\\\\'\\x00-\\x1f\\x7f-\\x9f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,n={\"\\b\":\"\\\\b\",\"\\t\":\"\\\\t\",\"\\n\":\"\\\\n\",\"\\f\":\"\\\\f\",\"\\r\":\"\\\\r\",\"'\":\"\\\\'\",'\"':'\\\\\"',\"\\\\\":\"\\\\\\\\\"};function escapeChar(e){return n[e]||\"\\\\u\"+(\"0000\"+e.charCodeAt(0).toString(16)).slice(-4)}var r={};\"break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield\".split(\" \").map(function(e){r[e]=!0});var i=/^[A-Za-z_$][A-Za-z0-9_$]*$/;function isValidVariableName(e){return!r[e]&&i.test(e)}function toGlobalVariable(e){return\"Function(\"+stringify(\"return this;\")+\")()\"}function toPath(e){for(var t=\"\",n=0;n<e.length;n++)isValidVariableName(e[n])?t+=\".\"+e[n]:t+=\"[\"+stringify(e[n])+\"]\";return t}function stringifyArray(e,t,n){var r=e.map(function(e,r){var i=n(e,r);return void 0===i?String(i):t+i.split(\"\\n\").join(\"\\n\"+t)}).join(t?\",\\n\":\",\");return t&&r?\"[\\n\"+r+\"\\n]\":\"[\"+r+\"]\"}var a={\"[object Array]\":stringifyArray,\"[object Object]\":function stringifyObject(e,t,n){var r=Object.keys(e).reduce(function(r,i){var a=n(e[i],i);return void 0===a?r:(i=isValidVariableName(i)?i:stringify(i),a=String(a).split(\"\\n\").join(\"\\n\"+t),r.push(t+i+\":\"+(t?\" \":\"\")+a),r)},[]).join(t?\",\\n\":\",\");return t&&r?\"{\\n\"+r+\"\\n}\":\"{\"+r+\"}\"},\"[object Error]\":function(e){return\"new Error(\"+stringify(e.message)+\")\"},\"[object Date]\":function(e){return\"new Date(\"+e.getTime()+\")\"},\"[object String]\":function(e){return\"new String(\"+stringify(e.toString())+\")\"},\"[object Number]\":function(e){return\"new Number(\"+e+\")\"},\"[object Boolean]\":function(e){return\"new Boolean(\"+e+\")\"},\"[object Uint8Array]\":function(e,t){return\"new Uint8Array(\"+stringifyArray(e)+\")\"},\"[object Set]\":function(e,t,n){return\"function\"==typeof Array.from?\"new Set(\"+stringify(Array.from(e),t,n)+\")\":void 0},\"[object Map]\":function(e,t,n){return\"function\"==typeof Array.from?\"new Map(\"+stringify(Array.from(e),t,n)+\")\":void 0},\"[object RegExp]\":String,\"[object Function]\":String,\"[object global]\":toGlobalVariable,\"[object Window]\":toGlobalVariable},o={string:function(t){return\"'\"+t.replace(e,escapeChar)+\"'\"},number:String,object:String,boolean:String,symbol:String,undefined:String};function stringify(e,n,r){if(Object(e)!==e)return o[typeof e](e,n,r);if(\"function\"==typeof t&&t.isBuffer(e))return\"new Buffer(\"+r(e.toString())+\")\";var i=a[Object.prototype.toString.call(e)];return i?i(e,n,r):void 0}return function(e,t,n,r){r=r||{},\"string\"!=typeof n&&(n=new Array(Math.max(0,0|n)+1).join(\" \"));var i=Number(r.maxDepth)||100,a=!!r.references,o=!!r.skipUndefinedProperties,s=Number(r.maxValues)||1e5,l=[],u=[],c=[],p=[],h=[];function next(e,t){if(!o||void 0!==e){l.push(t);var n=f(e,stringify);return l.pop(),n}}var f=a?function(e,t){if(e&&(\"object\"==typeof e||\"function\"==typeof e)){var r=c.indexOf(e);if(r>-1)return void h.push(l.slice(),p[r]);c.push(e),p.push(l.slice())}if(!(l.length>i||s--<=0))return t(e,n,next)}:function(e,t){if(!(u.indexOf(e)>-1||l.length>i||s--<=0)){u.push(e);e=t(e,n,next);return u.pop(),e}};if(\"function\"==typeof t){var d=f;f=function(e,n){return d(e,function(e,r,i){return t(e,r,function(e){return n(e,r,i)})})}}var m=f(e,stringify);if(h.length){for(var g=n?\"\\n\":\"\",y=n?\" = \":\"=\",v=\";\"+g,b=(d=n?\"(function () {\":\"(function(){\",[\"var x\"+y+m]),_=0;_<h.length;_+=2)b.push(\"x\"+toPath(h[_])+y+\"x\"+toPath(h[_+1]));return b.push(\"return x\"),d+g+b.join(v)+v+\"}())\"}return m}},e.exports=n();var n}).call(t,n(81).Buffer)},function(e,t,n){\"use strict\";t.byteLength=function byteLength(e){return 3*e.length/4-placeHoldersCount(e)},t.toByteArray=function toByteArray(e){var t,n,r,o,s,l=e.length;o=placeHoldersCount(e),s=new a(3*l/4-o),n=o>0?l-4:l;var u=0;for(t=0;t<n;t+=4)r=i[e.charCodeAt(t)]<<18|i[e.charCodeAt(t+1)]<<12|i[e.charCodeAt(t+2)]<<6|i[e.charCodeAt(t+3)],s[u++]=r>>16&255,s[u++]=r>>8&255,s[u++]=255&r;2===o?(r=i[e.charCodeAt(t)]<<2|i[e.charCodeAt(t+1)]>>4,s[u++]=255&r):1===o&&(r=i[e.charCodeAt(t)]<<10|i[e.charCodeAt(t+1)]<<4|i[e.charCodeAt(t+2)]>>2,s[u++]=r>>8&255,s[u++]=255&r);return s},t.fromByteArray=function fromByteArray(e){for(var t,n=e.length,i=n%3,a=\"\",o=[],s=0,l=n-i;s<l;s+=16383)o.push(encodeChunk(e,s,s+16383>l?l:s+16383));1===i?(t=e[n-1],a+=r[t>>2],a+=r[t<<4&63],a+=\"==\"):2===i&&(t=(e[n-2]<<8)+e[n-1],a+=r[t>>10],a+=r[t>>4&63],a+=r[t<<2&63],a+=\"=\");return o.push(a),o.join(\"\")};for(var r=[],i=[],a=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",s=0,l=o.length;s<l;++s)r[s]=o[s],i[o.charCodeAt(s)]=s;i[\"-\".charCodeAt(0)]=62,i[\"_\".charCodeAt(0)]=63;function placeHoldersCount(e){var t=e.length;if(t%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");return\"=\"===e[t-2]?2:\"=\"===e[t-1]?1:0}function encodeChunk(e,t,n){for(var i,a=[],o=t;o<n;o+=3)i=(e[o]<<16)+(e[o+1]<<8)+e[o+2],a.push(r[(s=i)>>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);var s;return a.join(\"\")}},function(e,t){t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<<s)-1,u=l>>1,c=-7,p=n?i-1:0,h=n?-1:1,f=e[t+p];for(p+=h,a=f&(1<<-c)-1,f>>=-c,c+=s;c>0;a=256*a+e[t+p],p+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+p],p+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),a-=u}return(f?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,l,u=8*a-i-1,c=(1<<u)-1,p=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,d=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+p>=1?h/l:h*Math.pow(2,1-p))*l>=2&&(o++,l/=2),o+p>=c?(s=0,o=c):o+p>=1?(s=(t*l-1)*Math.pow(2,i),o+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&s,f+=d,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;e[n+f]=255&o,f+=d,o/=256,u-=8);e[n+f-d]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return\"[object Array]\"==n.call(e)}},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(49),l=n(53),u=n(2),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function ArgumentsRenderer(e){var t=e.classes,n=e.args,r=e.heading;return 0===n.length?null:i.a.createElement(\"div\",{className:t.root},r&&i.a.createElement(\"div\",{className:t.headingWrapper},i.a.createElement(l.a,{level:5},\"Arguments\")),n.map(function(e){return i.a.createElement(s.a,c({key:e.name},e))}))}ArgumentsRenderer.propTypes={classes:o.a.object.isRequired,args:o.a.arrayOf(o.a.shape({name:o.a.string.isRequired,type:o.a.object,description:o.a.string})).isRequired,heading:o.a.bool},t.a=Object(u.a)(function styles(e){var t=e.space;return{root:{marginBottom:t[2],fontSize:\"inherit\"},headingWrapper:{marginBottom:t[0]}}})(ArgumentsRenderer)},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(2),l=n(10),u=n(54),c=n(94),p=n(80),h=n.n(p),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function ArgumentRenderer(e){var t=e.classes,n=e.name,r=e.type,a=e.description,o=e.returns,s=e.block,p=function _objectWithoutProperties(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,[\"classes\",\"name\",\"type\",\"description\",\"returns\",\"block\"]);return i.a.createElement(h.a,f({className:s&&t.block},p),o&&\"Returns\",n&&i.a.createElement(\"span\",null,i.a.createElement(u.a,null,n),r&&\":\"),r&&i.a.createElement(c.a,null,r.name),r&&a&&\" — \",a&&i.a.createElement(l.a,{text:\"\"+a,inline:!0}))}ArgumentRenderer.propTypes={classes:o.a.object.isRequired,name:o.a.string,type:o.a.object,description:o.a.string,returns:o.a.bool,block:o.a.bool},t.a=Object(s.a)(function styles(e){return{block:{marginBottom:e.space[2]}}})(ArgumentRenderer)},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(249),l=n(251),u=n.n(l),c=n(44),p=n.n(c),h=n(2),f=n(92),d=n(93),m=n(52),g=n(293),y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};n(296);function Code(e){var t=e.children,n=e.className;return n&&-1!==n.indexOf(\"lang-\")?i.a.createElement(\"code\",{className:n,dangerouslySetInnerHTML:{__html:t}}):i.a.createElement(\"code\",{className:n},t)}Code.propTypes={children:o.a.node,className:o.a.string};var v=p()(function(e){var t=u()(e,function(e){return{props:{className:e}}});return y({},t,{a:{component:f.a},h1:{component:g.a,props:{level:1}},h2:{component:g.a,props:{level:2}},h3:{component:g.a,props:{level:3}},h4:{component:g.a,props:{level:4}},h5:{component:g.a,props:{level:5}},h6:{component:g.a,props:{level:6}},p:{component:m.a,props:{semantic:\"p\"}},em:{component:d.a,props:{semantic:\"em\"}},strong:{component:d.a,props:{semantic:\"strong\"}},code:{component:Code,props:{className:e.code}}})},function(){return\"getBaseOverrides\"}),b=p()(function(e){var t=v(e);return y({},t,{p:{component:d.a}})},function(){return\"getInlineOverrides\"});function Markdown(e){var t=e.classes,n=e.text,r=e.inline?b(t):v(t);return Object(s.a)(n+\"\\n\",{overrides:r})}Markdown.propTypes={classes:o.a.object.isRequired,text:o.a.string.isRequired,inline:o.a.bool},t.a=Object(h.a)(function styles(e){var t=e.space,n=e.fontFamily,r=e.fontSize,i=e.color,a=e.borderRadius;return{base:{color:i.base,fontFamily:n.base,fontSize:\"inherit\"},para:Object(m.b)({space:t,color:i,fontFamily:n}).para,ul:{composes:\"$para\",paddingLeft:t[3]},ol:{composes:\"$para\",listStyleType:\"decimal\",paddingLeft:t[3]},li:{composes:\"$base\",listStyleType:\"inherit\"},input:{isolate:!1,display:\"inline-block\",verticalAlign:\"middle\"},blockquote:{composes:\"$para\",fontSize:r.base,margin:[[t[2],t[4]]],padding:0},hr:{composes:\"$para\",borderWidth:[[0,0,1,0]],borderColor:i.border,borderStyle:\"solid\"},code:{fontFamily:n.monospace,fontSize:\"inherit\",color:\"inherit\",background:\"transparent\",whiteSpace:\"inherit\"},pre:{composes:\"$para\",backgroundColor:i.codeBackground,border:[[1,i.border,\"solid\"]],padding:[[t[1],t[2]]],fontSize:r.small,borderRadius:a,whiteSpace:\"pre\"},table:{composes:\"$para\",borderCollapse:\"collapse\"},thead:{composes:\"$hr\"},tbody:{},td:{fontFamily:n.base,padding:[[t[0],t[2],t[0],0]],fontSize:r.base},th:{composes:\"$td\",fontWeight:\"bold\"},tr:{}}})(Markdown)},function(e,t,n){\"use strict\";t.a=compiler;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(0),a=n(250),o={accesskey:\"accessKey\",allowfullscreen:\"allowFullScreen\",allowtransparency:\"allowTransparency\",autocomplete:\"autoComplete\",autofocus:\"autoFocus\",autoplay:\"autoPlay\",cellpadding:\"cellPadding\",cellspacing:\"cellSpacing\",charset:\"charSet\",class:\"className\",classid:\"classId\",colspan:\"colSpan\",contenteditable:\"contentEditable\",contextmenu:\"contextMenu\",crossorigin:\"crossOrigin\",enctype:\"encType\",for:\"htmlFor\",formaction:\"formAction\",formenctype:\"formEncType\",formmethod:\"formMethod\",formnovalidate:\"formNoValidate\",formtarget:\"formTarget\",frameborder:\"frameBorder\",hreflang:\"hrefLang\",inputmode:\"inputMode\",keyparams:\"keyParams\",keytype:\"keyType\",marginheight:\"marginHeight\",marginwidth:\"marginWidth\",maxlength:\"maxLength\",mediagroup:\"mediaGroup\",minlength:\"minLength\",novalidate:\"noValidate\",radiogroup:\"radioGroup\",readonly:\"readOnly\",rowspan:\"rowSpan\",spellcheck:\"spellCheck\",srcdoc:\"srcDoc\",srclang:\"srcLang\",srcset:\"srcSet\",tabindex:\"tabIndex\",usemap:\"useMap\"},s=/([-A-Z0-9_:]+)(?:\\s*=\\s*(?:(?:\"((?:\\\\.|[^\"])*)\")|(?:'((?:\\\\.|[^'])*)')|(?:\\{((?:\\\\.|{[^}]*?}|[^}])*)\\})))?/gi,l=/mailto:/i,u=/\\n{2,}$/,c=/^( *>[^\\n]+(\\n[^\\n]+)*\\n*)+\\n{2,}/,p=/^ *> ?/gm,f=/^ {2,}\\n/,d=/^(?:( *[-*_]) *){3,}(?:\\n *)+\\n/,m=/^\\s*(`{3,}|~{3,}) *(\\S+)? *\\n([\\s\\S]+?)\\s*\\1 *(?:\\n *)+\\n/,g=/^(?: {4}[^\\n]+\\n*)+(?:\\n *)+\\n/,y=/^(`+)\\s*([\\s\\S]*?[^`])\\s*\\1(?!`)/,v=/^(?:\\n *)*\\n/,b=/\\r\\n?/g,_=/^\\[\\^(.*)\\](:.*)\\n/,x=/^\\[\\^(.*)\\]/,w=/\\f/g,k=/^\\s*?\\[(x|\\s)\\]/,E=/^ *(#{1,6}) *([^\\n]+?) *#* *\\n+/,C=/^([^\\n]+)\\n *(=|-){3,} *(?:\\n *)+\\n/,S=/^ *<([^ >/]+) ?([^>]*)\\/{0}>(?=[\\s\\S]*<\\/\\1>)((?:[\\s\\S]*?(?:<\\1[^>]*>[\\s\\S]*?<\\/\\1>)*[\\s\\S]*?)*?)<\\/\\1>\\n*/,R=/^<!--.*?-->/,P=/^(data|aria)-[a-z_][a-z\\d_.-]*$/,O=/^ *<([\\w:]+)\\s*((?:<.*?>|[^>])*)>(?!<\\/\\1>)\\s*/,T=/^\\{.*\\}$/,j=/^(https?:\\/\\/[^\\s<]+[^<.,:;\"')\\]\\s])/,A=/^<([^ >]+@[^ >]+)>/,I=/^<([^ >]+:\\/[^ >]+)>/,L=/ *\\n+$/,N=/^$|\\n *$/,M=/-([a-z])?/gi,D=/^(.*\\|?.*)\\n *(\\|? *[-:]+ *\\|[-| :]*)\\n((?:.*\\|.*\\n)*)\\n?/,B=/^((?:[^\\n]|\\n(?! *\\n))+)(?:\\n *)+\\n/,U=/^\\[([^\\]]*)\\]:\\s*(\\S+)\\s*(\"([^\"]*)\")?/,F=/^!\\[([^\\]]*)\\] ?\\[([^\\]]*)\\]/,$=/^\\[([^\\]]*)\\] ?\\[([^\\]]*)\\]/,q=/\\t/g,z=/(^ *\\||\\| *$)/g,V=/^ *:-+: *$/,W=/^ *:-+ *$/,H=/^ *-+: *$/,K=/ *\\| */,G=/^[*_]{2}([\\s\\S]+?)[*_]{2}(?!\\*|_)/,J=/^[*_]{1}([\\s\\S]+?)[*_]{1}(?!\\*|_)/,Y=/^\\\\([^0-9A-Za-z\\s])/,X=/^[\\s\\S]+?(?=[^0-9A-Z\\s\\u00c0-\\uffff]|\\d+\\.|\\n\\n| {2,}\\n|\\w+:\\S|$)/i,Q=/^~~(?=\\S)([\\s\\S]*?\\S)~~/,Z=/(^\\n+|(\\n|\\s)+$)/g,ee=/\\\\([^0-9A-Z\\s])/gi,te=\"(?:[*+-]|\\\\d+\\\\.)\",ne=\"( *)(\"+te+\") +\",re=new RegExp(\"^\"+ne),ie=new RegExp(ne+\"[^\\\\n]*(?:\\\\n(?!\\\\1\"+te+\" )[^\\\\n]*)*(\\\\n|$)\",\"gm\"),ae=new RegExp(\"^( *)(\"+te+\") [\\\\s\\\\S]+?(?:\\\\n{2,}(?! )(?!\\\\1\"+te+\" )\\\\n*|\\\\s*\\\\n*$)\"),oe=\"(?:\\\\[[^\\\\]]*\\\\]|[^\\\\[\\\\]]|\\\\](?=[^\\\\[]*\\\\]))*\",se=\"\\\\s*<?((?:[^\\\\s\\\\\\\\]|\\\\\\\\.)*?)>?(?:\\\\s+['\\\"]([\\\\s\\\\S]*?)['\\\"])?\\\\s*\",le=new RegExp(\"^\\\\[(\"+oe+\")\\\\]\\\\(\"+se+\"\\\\)\"),ue=new RegExp(\"^!\\\\[(\"+oe+\")\\\\]\\\\(\"+se+\"\\\\)\");function parseTableAlignCapture(e){return H.test(e)?\"right\":V.test(e)?\"center\":W.test(e)?\"left\":null}function parseTable(e,t,n){n.inline=!0;var r=function parseTableHeader(e,t,n){return e[1].replace(z,\"\").trim().split(K).map(function(e){return t(e,n)})}(e,t,n),i=function parseTableAlign(e){return e[2].replace(z,\"\").trim().split(K).map(parseTableAlignCapture)}(e),a=function parseTableCells(e,t,n){return e[3].replace(z,\"\").trim().split(\"\\n\").map(function(e){return e.replace(z,\"\").split(K).map(function(e){return t(e.trim(),n)})})}(e,t,n);return n.inline=!1,{align:i,cells:a,header:r,type:\"table\"}}function getTableStyle(e,t){return null==e.align[t]?{}:{textAlign:e.align[t]}}function attributeValueToJSXPropValue(e,t){return\"style\"===e?t.split(/;\\s?/).reduce(function(e,t){var n=t.slice(0,t.indexOf(\":\"));return e[n.replace(/(-[a-z])/g,function toUpper(e){return e[1].toUpperCase()})]=t.slice(n.length+1).trim(),e},{}):(function isInterpolation(e){return T.test(e)}(t)&&(t=t.slice(1,t.length-1)),\"true\"===t||\"false\"!==t&&t)}function parserFor(e){var t=Object.keys(e);t.sort(function(t,n){var r=e[t].order,i=e[n].order;return r!==i?r-i:t<n?-1:1});function nestedParse(n,r){for(var i=[],a=\"\";n;)for(var o=0;o<t.length;){var s=t[o],l=e[s],u=l.match(n,r,a);if(u){var c=u[0];n=n.substring(c.length);var p=l.parse(u,nestedParse,r);null==p.type&&(p.type=s),i.push(p),a=c;break}o++}return i}return function outerParse(e,t){return nestedParse(function normalizeWhitespace(e){return e.replace(b,\"\\n\").replace(w,\"\").replace(q,\"    \")}(e),t)}}function inlineRegex(e){return function match(t,n){return n.inline?e.exec(t):null}}function blockRegex(e){return function match(t,n){return n.inline?null:e.exec(t)}}function anyScopeRegex(e){return function match(t){return e.exec(t)}}function sanitizeUrl(e){try{if(0===decodeURIComponent(e).replace(/[^A-Z0-9/:]/gi,\"\").toLowerCase().indexOf(\"javascript:\"))return null}catch(e){return null}return e}function unescapeUrl(e){return e.replace(ee,\"$1\")}function parseInline(e,t,n){var r=n.inline||!1;n.inline=!0;var i=e(t,n);return n.inline=r,i}function parseBlock(e,t,n){return n.inline=!1,e(t+\"\\n\\n\",n)}function parseCaptureInline(e,t,n){return{content:parseInline(t,e[1],n)}}function captureNothing(){return{}}function renderNothing(){return null}function get(e,t,n){for(var r=e,i=t.split(\".\");i.length&&void 0!==(r=r[i[0]]);)i.shift();return r||n}var ce=1,pe=2,he=3,fe=4,de=5;function compiler(e,t){(t=t||{}).overrides=t.overrides||{};function h(e,n){for(var a=get(t.overrides,e+\".props\",{}),o=arguments.length,s=Array(o>2?o-2:0),l=2;l<o;l++)s[l-2]=arguments[l];return i.createElement.apply(i,[function getTag(e,t){var n=get(t,e);return\"function\"==typeof n?n:get(t,e+\".component\",e)}(e,t.overrides),r({},a,n,{className:function cx(){return Array.prototype.slice.call(arguments).filter(Boolean).join(\" \")}(n&&n.className,a.className)||void 0})].concat(s))}function compile(e){var n=!1;t.forceInline?n=!0:t.forceBlock||(n=!1===/(\\n|^[-*]\\s|^#|^ {2,}|^-{2,}|^>\\s)/g.test(e));var r=q(T(n?e:e.replace(Z,\"\")+\"\\n\\n\",{inline:n})),i=void 0;return r.length>1?i=h(n?\"span\":\"div\",null,r):1===r.length?\"string\"==typeof(i=r[0])&&(i=h(\"span\",null,i)):i=h(\"span\",null),i}function attrStringToMap(e){var t=e.match(s);return t?t.reduce(function(e,t,n){var r=t.indexOf(\"=\");if(-1!==r){var s=function normalizeAttributeKey(e){return-1!==e.indexOf(\"-\")&&null===e.match(P)&&(e=e.replace(M,function(e,t){return t.toUpperCase()})),e}(t.slice(0,r)),l=a(t.slice(r+1)),u=o[s]||s,c=e[u]=attributeValueToJSXPropValue(s,l);(S.test(c)||O.test(c))&&(e[u]=i.cloneElement(compile(c.trim()),{key:n}))}else e[o[t]||t]=!0;return e},{}):void 0}var n=[],b={},w={blockQuote:{match:blockRegex(c),order:pe,parse:function parse(e,t,n){return{content:t(e[0].replace(p,\"\"),n)}},react:function react(e,t,n){return h(\"blockquote\",{key:n.key},t(e.content,n))}},breakLine:{match:anyScopeRegex(f),order:pe,parse:captureNothing,react:function react(e,t,n){return h(\"br\",{key:n.key})}},breakThematic:{match:blockRegex(d),order:pe,parse:captureNothing,react:function react(e,t,n){return h(\"hr\",{key:n.key})}},codeBlock:{match:blockRegex(g),order:ce,parse:function parse(e){return{content:e[0].replace(/^ {4}/gm,\"\").replace(/\\n+$/,\"\"),lang:void 0}},react:function react(e,t,n){return h(\"pre\",{key:n.key},h(\"code\",{className:e.lang?\"lang-\"+e.lang:\"\"},e.content))}},codeFenced:{match:blockRegex(m),order:ce,parse:function parse(e){return{content:e[3],lang:e[2]||void 0,type:\"codeBlock\"}}},codeInline:{match:inlineRegex(y),order:fe,parse:function parse(e){return{content:e[2]}},react:function react(e,t,n){return h(\"code\",{key:n.key},e.content)}},footnote:{match:blockRegex(_),order:ce,parse:function parse(e){return n.push({footnote:e[2],identifier:e[1]}),{}},react:renderNothing},footnoteReference:{match:inlineRegex(x),order:pe,parse:function parse(e){return{content:e[1],target:\"#\"+e[1]}},react:function react(e,t,n){return h(\"a\",{key:n.key,href:sanitizeUrl(e.target)},h(\"sup\",{key:n.key},e.content))}},gfmTask:{match:inlineRegex(k),order:pe,parse:function parse(e){return{completed:\"x\"===e[1].toLowerCase()}},react:function react(e,t,n){return h(\"input\",{checked:e.completed,key:n.key,readOnly:!0,type:\"checkbox\"})}},heading:{match:blockRegex(E),order:pe,parse:function parse(e,t,n){return{content:parseInline(t,e[2],n),level:e[1].length}},react:function react(e,t,n){return h(\"h\"+e.level,{key:n.key},t(e.content,n))}},headingSetext:{match:blockRegex(C),order:ce,parse:function parse(e,t,n){return{content:parseInline(t,e[1],n),level:\"=\"===e[2]?1:2,type:\"heading\"}}},htmlBlock:{match:anyScopeRegex(S),order:pe,parse:function parse(e,t,n){var r=e[3].match(S)?parseBlock:parseInline;return{attrs:attrStringToMap(e[2]),content:r(t,e[3].trim(),n),tag:e[1]}},react:function react(e,t,n){return h(e.tag,r({key:n.key},e.attrs),t(e.content,n))}},htmlComment:{match:anyScopeRegex(R),order:pe,parse:function parse(){return{}},react:renderNothing},htmlSelfClosing:{match:anyScopeRegex(O),order:pe,parse:function parse(e){return{attrs:attrStringToMap(e[2]),tag:e[1]}},react:function react(e,t,n){return h(e.tag,r({},e.attrs,{key:n.key}))}},image:{match:inlineRegex(ue),order:pe,parse:function parse(e){return{alt:e[1],target:unescapeUrl(e[2]),title:e[3]}},react:function react(e,t,n){return h(\"img\",{key:n.key,alt:e.alt||void 0,title:e.title||void 0,src:sanitizeUrl(e.target)})}},link:{match:inlineRegex(le),order:fe,parse:function parse(e,t,n){return{content:t(e[1],n),target:unescapeUrl(e[2]),title:e[3]}},react:function react(e,t,n){return h(\"a\",{key:n.key,href:sanitizeUrl(e.target),title:e.title},t(e.content,n))}},linkAngleBraceStyleDetector:{match:inlineRegex(I),order:ce,parse:function parse(e){return{content:[{content:e[1],type:\"text\"}],target:e[1],type:\"link\"}}},linkBareUrlDetector:{match:inlineRegex(j),order:ce,parse:function parse(e){return{content:[{content:e[1],type:\"text\"}],target:e[1],title:void 0,type:\"link\"}}},linkMailtoDetector:{match:inlineRegex(A),order:ce,parse:function parse(e){var t=e[1],n=e[1];return l.test(n)||(n=\"mailto:\"+n),{content:[{content:t.replace(\"mailto:\",\"\"),type:\"text\"}],target:n,type:\"link\"}}},list:{match:function match(e,t,n){var r=N.test(n),i=t._list||!t.inline;return r&&i?ae.exec(e):null},order:pe,parse:function parse(e,t,n){var r=e[2],i=r.length>1,a=i?+r:void 0,o=e[0].replace(u,\"\\n\").match(ie),s=!1;return{items:o.map(function(e,r){var i=re.exec(e)[0].length,a=new RegExp(\"^ {1,\"+i+\"}\",\"gm\"),l=e.replace(a,\"\").replace(re,\"\"),u=r===o.length-1,c=-1!==l.indexOf(\"\\n\\n\")||u&&s;s=c;var p=n.inline,h=n._list;n._list=!0;var f=void 0;c?(n.inline=!1,f=l.replace(L,\"\\n\\n\")):(n.inline=!0,f=l.replace(L,\"\"));var d=t(f,n);return n.inline=p,n._list=h,d}),ordered:i,start:a}},react:function react(e,t,n){return h(e.ordered?\"ol\":\"ul\",{key:n.key,start:e.start},e.items.map(function generateListItem(e,r){return h(\"li\",{key:r},t(e,n))}))}},newlineCoalescer:{match:blockRegex(v),order:fe,parse:captureNothing,react:function react(){return\"\\n\"}},paragraph:{match:blockRegex(B),order:fe,parse:parseCaptureInline,react:function react(e,t,n){return h(\"p\",{key:n.key},t(e.content,n))}},ref:{match:inlineRegex(U),order:ce,parse:function parse(e){return b[e[1]]={target:e[2],title:e[4]},{}},react:renderNothing},refImage:{match:inlineRegex(F),order:ce,parse:function parse(e){return{alt:e[1]||void 0,ref:e[2]}},react:function react(e,t,n){return h(\"img\",{key:n.key,alt:e.alt,src:sanitizeUrl(b[e.ref].target),title:b[e.ref].title})}},refLink:{match:inlineRegex($),order:ce,parse:function parse(e,t,n){return{content:t(e[1],n),ref:e[2]}},react:function react(e,t,n){return h(\"a\",{key:n.key,href:sanitizeUrl(b[e.ref].target),title:b[e.ref].title},t(e.content,n))}},table:{match:blockRegex(D),order:pe,parse:parseTable,react:function react(e,t,n){return h(\"table\",{key:n.key},h(\"thead\",null,h(\"tr\",null,e.header.map(function generateHeaderCell(r,i){return h(\"th\",{key:i,style:getTableStyle(e,i),scope:\"col\"},t(r,n))}))),h(\"tbody\",null,e.cells.map(function generateTableRow(r,i){return h(\"tr\",{key:i},r.map(function generateTableCell(r,i){return h(\"td\",{key:i,style:getTableStyle(e,i)},t(r,n))}))})))}},text:{match:inlineRegex(X),order:de,parse:function parse(e){return{content:e[0]}},react:function react(e){return e.content}},textBolded:{match:inlineRegex(G),order:he,parse:parseCaptureInline,react:function react(e,t,n){return h(\"strong\",{key:n.key},t(e.content,n))}},textEmphasized:{match:inlineRegex(J),order:fe,parse:function parse(e,t,n){return{content:t(e[2]||e[1],n)}},react:function react(e,t,n){return h(\"em\",{key:n.key},t(e.content,n))}},textEscaped:{match:inlineRegex(Y),order:pe,parse:function parse(e){return{content:e[1],type:\"text\"}}},textStrikethroughed:{match:inlineRegex(Q),order:fe,parse:parseCaptureInline,react:function react(e,t,n){return h(\"del\",{key:n.key},t(e.content,n))}}},T=parserFor(w),q=function reactFor(e){return function nestedReactOutput(t,n){if(n=n||{},Array.isArray(t)){for(var r=n.key,i=[],a=!1,o=0;o<t.length;o++){n.key=o;var s=nestedReactOutput(t[o],n),l=\"string\"==typeof s;l&&a?i[i.length-1]+=s:i.push(s),a=l}return n.key=r,i}return e(t,nestedReactOutput,n)}}(function ruleOutput(e){return function nestedRuleOutput(t,n,r){return e[t.type].react(t,n,r)}}(w)),z=compile(e);return n.length&&z.props.children.push(h(\"footer\",null,n.map(function createFootnote(e){return h(\"div\",{id:e.identifier,key:e.identifier},e.identifier,q(T(e.footnote,{inline:!0})))}))),z}},function(e,t){var n=/[\\'\\\"]/;e.exports=function unquote(e){return e?(n.test(e.charAt(0))&&(e=e.substr(1)),n.test(e.charAt(e.length-1))&&(e=e.substr(0,e.length-1)),e):\"\"}},function(e,t,n){var r=n(27),i=n(83),a=n(84);e.exports=function mapValues(e,t){var n={};return t=a(t,3),i(e,function(e,i,a){r(n,i,t(e,i,a))}),n}},function(e,t,n){var r=n(37),i=n(253),a=Object.prototype.hasOwnProperty;e.exports=function baseKeys(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))a.call(e,n)&&\"constructor\"!=n&&t.push(n);return t}},function(e,t,n){var r=n(71)(Object.keys,Object);e.exports=r},function(e,t,n){var r=n(255),i=n(277),a=n(88);e.exports=function baseMatches(e){var t=i(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(33),i=n(85),a=1,o=2;e.exports=function baseIsMatch(e,t,n,s){var l=n.length,u=l,c=!s;if(null==e)return!u;for(e=Object(e);l--;){var p=n[l];if(c&&p[2]?p[1]!==e[p[0]]:!(p[0]in e))return!1}for(;++l<u;){var h=(p=n[l])[0],f=e[h],d=p[1];if(c&&p[2]){if(void 0===f&&!(h in e))return!1}else{var m=new r;if(s)var g=s(f,d,h,e,t,m);if(!(void 0===g?i(d,f,a|o,s,m):g))return!1}}return!0}},function(e,t,n){var r=n(33),i=n(86),a=n(262),o=n(265),s=n(272),l=n(5),u=n(40),c=n(41),p=1,h=\"[object Arguments]\",f=\"[object Array]\",d=\"[object Object]\",m=Object.prototype.hasOwnProperty;e.exports=function baseIsEqualDeep(e,t,n,g,y,v){var b=l(e),_=l(t),x=b?f:s(e),w=_?f:s(t),k=(x=x==h?d:x)==d,E=(w=w==h?d:w)==d,C=x==w;if(C&&u(e)){if(!u(t))return!1;b=!0,k=!1}if(C&&!k)return v||(v=new r),b||c(e)?i(e,t,n,g,y,v):a(e,t,x,n,g,y,v);if(!(n&p)){var S=k&&m.call(e,\"__wrapped__\"),R=E&&m.call(t,\"__wrapped__\");if(S||R){var P=S?e.value():e,O=R?t.value():t;return v||(v=new r),y(P,O,n,g,v)}}return!!C&&(v||(v=new r),o(e,t,n,g,y,v))}},function(e,t,n){var r=n(36),i=n(258),a=n(259);function SetCache(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}SetCache.prototype.add=SetCache.prototype.push=i,SetCache.prototype.has=a,e.exports=SetCache},function(e,t){var n=\"__lodash_hash_undefined__\";e.exports=function setCacheAdd(e){return this.__data__.set(e,n),this}},function(e,t){e.exports=function setCacheHas(e){return this.__data__.has(e)}},function(e,t){e.exports=function arraySome(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t){e.exports=function cacheHas(e,t){return e.has(t)}},function(e,t,n){var r=n(24),i=n(69),a=n(18),o=n(86),s=n(263),l=n(264),u=1,c=2,p=\"[object Boolean]\",h=\"[object Date]\",f=\"[object Error]\",d=\"[object Map]\",m=\"[object Number]\",g=\"[object RegExp]\",y=\"[object Set]\",v=\"[object String]\",b=\"[object Symbol]\",_=\"[object ArrayBuffer]\",x=\"[object DataView]\",w=r?r.prototype:void 0,k=w?w.valueOf:void 0;e.exports=function equalByTag(e,t,n,r,w,E,C){switch(n){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case _:return!(e.byteLength!=t.byteLength||!E(new i(e),new i(t)));case p:case h:case m:return a(+e,+t);case f:return e.name==t.name&&e.message==t.message;case g:case v:return e==t+\"\";case d:var S=s;case y:var R=r&u;if(S||(S=l),e.size!=t.size&&!R)return!1;var P=C.get(e);if(P)return P==t;r|=c,C.set(e,t);var O=o(S(e),S(t),r,w,E,C);return C.delete(e),O;case b:if(k)return k.call(e)==k.call(t)}return!1}},function(e,t){e.exports=function mapToArray(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},function(e,t){e.exports=function setToArray(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},function(e,t,n){var r=n(266),i=1,a=Object.prototype.hasOwnProperty;e.exports=function equalObjects(e,t,n,o,s,l){var u=n&i,c=r(e),p=c.length;if(p!=r(t).length&&!u)return!1;for(var h=p;h--;){var f=c[h];if(!(u?f in t:a.call(t,f)))return!1}var d=l.get(e);if(d&&l.get(t))return d==t;var m=!0;l.set(e,t),l.set(t,e);for(var g=u;++h<p;){var y=e[f=c[h]],v=t[f];if(o)var b=u?o(v,y,f,t,e,l):o(y,v,f,e,t,l);if(!(void 0===b?y===v||s(y,v,n,o,l):b)){m=!1;break}g||(g=\"constructor\"==f)}if(m&&!g){var _=e.constructor,x=t.constructor;_!=x&&\"constructor\"in e&&\"constructor\"in t&&!(\"function\"==typeof _&&_ instanceof _&&\"function\"==typeof x&&x instanceof x)&&(m=!1)}return l.delete(e),l.delete(t),m}},function(e,t,n){var r=n(267),i=n(269),a=n(50);e.exports=function getAllKeys(e){return r(e,a,i)}},function(e,t,n){var r=n(268),i=n(5);e.exports=function baseGetAllKeys(e,t,n){var a=t(e);return i(e)?a:r(a,n(e))}},function(e,t){e.exports=function arrayPush(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},function(e,t,n){var r=n(270),i=n(271),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(e){return null==e?[]:(e=Object(e),r(o(e),function(t){return a.call(e,t)}))}:i;e.exports=s},function(e,t){e.exports=function arrayFilter(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}},function(e,t){e.exports=function stubArray(){return[]}},function(e,t,n){var r=n(273),i=n(34),a=n(274),o=n(275),s=n(276),l=n(14),u=n(65),c=\"[object Promise]\",p=\"[object WeakMap]\",h=\"[object DataView]\",f=u(r),d=u(i),m=u(a),g=u(o),y=u(s),v=l;(r&&v(new r(new ArrayBuffer(1)))!=h||i&&\"[object Map]\"!=v(new i)||a&&v(a.resolve())!=c||o&&\"[object Set]\"!=v(new o)||s&&v(new s)!=p)&&(v=function(e){var t=l(e),n=\"[object Object]\"==t?e.constructor:void 0,r=n?u(n):\"\";if(r)switch(r){case f:return h;case d:return\"[object Map]\";case m:return c;case g:return\"[object Set]\";case y:return p}return t}),e.exports=v},function(e,t,n){var r=n(13)(n(3),\"DataView\");e.exports=r},function(e,t,n){var r=n(13)(n(3),\"Promise\");e.exports=r},function(e,t,n){var r=n(13)(n(3),\"Set\");e.exports=r},function(e,t,n){var r=n(13)(n(3),\"WeakMap\");e.exports=r},function(e,t,n){var r=n(87),i=n(50);e.exports=function getMatchData(e){for(var t=i(e),n=t.length;n--;){var a=t[n],o=e[a];t[n]=[a,o,r(o)]}return t}},function(e,t,n){var r=n(85),i=n(279),a=n(284),o=n(51),s=n(87),l=n(88),u=n(31),c=1,p=2;e.exports=function baseMatchesProperty(e,t){return o(e)&&s(t)?l(u(e),t):function(n){var o=i(n,e);return void 0===o&&o===t?a(n,e):r(t,o,c|p)}}},function(e,t,n){var r=n(89);e.exports=function get(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},function(e,t,n){var r=/^\\./,i=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,a=/\\\\(\\\\)?/g,o=n(281)(function(e){var t=[];return r.test(e)&&t.push(\"\"),e.replace(i,function(e,n,r,i){t.push(r?i.replace(a,\"$1\"):n||e)}),t});e.exports=o},function(e,t,n){var r=n(44),i=500;e.exports=function memoizeCapped(e){var t=r(e,function(e){return n.size===i&&n.clear(),e}),n=t.cache;return t}},function(e,t,n){var r=n(283);e.exports=function toString(e){return null==e?\"\":r(e)}},function(e,t,n){var r=n(24),i=n(91),a=n(5),o=n(30),s=1/0,l=r?r.prototype:void 0,u=l?l.toString:void 0;e.exports=function baseToString(e){if(\"string\"==typeof e)return e;if(a(e))return i(e,baseToString)+\"\";if(o(e))return u?u.call(e):\"\";var t=e+\"\";return\"0\"==t&&1/e==-s?\"-0\":t}},function(e,t,n){var r=n(285),i=n(286);e.exports=function hasIn(e,t){return null!=e&&i(e,t,r)}},function(e,t){e.exports=function baseHasIn(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(90),i=n(38),a=n(5),o=n(42),s=n(39),l=n(31);e.exports=function hasPath(e,t,n){for(var u=-1,c=(t=r(t,e)).length,p=!1;++u<c;){var h=l(t[u]);if(!(p=null!=e&&n(e,h)))break;e=e[h]}return p||++u!=c?p:!!(c=null==e?0:e.length)&&s(c)&&o(h,c)&&(a(e)||i(e))}},function(e,t,n){var r=n(288),i=n(289),a=n(51),o=n(31);e.exports=function property(e){return a(e)?r(o(e)):i(e)}},function(e,t){e.exports=function baseProperty(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(89);e.exports=function basePropertyDeep(e){return function(t){return r(t,e)}}},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(6),l=n.n(s),u=n(2),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function LinkRenderer(e){var t=e.classes,n=e.children,r=function _objectWithoutProperties(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,[\"classes\",\"children\"]);return i.a.createElement(\"a\",c({},r,{className:l()(t.link,r.className)}),n)}LinkRenderer.propTypes={children:o.a.node,className:o.a.string,classes:o.a.object.isRequired},t.a=Object(u.a)(function styles(e){var t=e.color;return{link:{\"&, &:link, &:visited\":{fontSize:\"inherit\",color:t.link,textDecoration:\"none\"},\"&:hover, &:active\":{isolate:!1,color:t.linkHover,cursor:\"pointer\"}}}})(LinkRenderer)},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(2),l=n(6),u=n.n(l),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TextRenderer(e){var t,n=e.classes,r=e.semantic,a=e.size,o=e.color,s=e.underlined,l=e.children,p=function _objectWithoutProperties(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,[\"classes\",\"semantic\",\"size\",\"color\",\"underlined\",\"children\"]),h=r||\"span\",f=u()(n.text,n[a+\"Size\"],n[o+\"Color\"],(t={},_defineProperty(t,n[r],r),_defineProperty(t,n.isUnderlined,s),t));return i.a.createElement(h,c({},p,{className:f}),l)}TextRenderer.propTypes={classes:o.a.object.isRequired,semantic:o.a.oneOf([\"em\",\"strong\"]),size:o.a.oneOf([\"inherit\",\"small\",\"base\",\"text\"]),color:o.a.oneOf([\"base\",\"light\"]),underlined:o.a.bool,children:o.a.node.isRequired},TextRenderer.defaultProps={size:\"inherit\",color:\"base\",underlined:!1},t.a=Object(s.a)(function styles(e){var t=e.fontFamily,n=e.fontSize,r=e.color;return{text:{fontFamily:t.base},inheritSize:{fontSize:\"inherit\"},smallSize:{fontSize:n.small},baseSize:{fontSize:n.base},textSize:{fontSize:n.text},baseColor:{color:r.base},lightColor:{color:r.light},em:{fontStyle:\"italic\"},strong:{fontWeight:\"bold\"},isUnderlined:{borderBottom:[[1,\"dotted\",r.lightest]]}}})(TextRenderer)},function(e,t,n){\"use strict\";n.d(t,\"b\",function(){return l});var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(2),l=function styles(e){var t=e.space,n=e.color,r=e.fontFamily;return{para:{marginTop:0,marginBottom:t[2],color:n.base,fontFamily:r.base,fontSize:\"inherit\",lineHeight:1.5}}};function ParaRenderer(e){var t=e.classes,n=e.semantic,r=e.children,a=n||\"div\";return i.a.createElement(a,{className:t.para},r)}ParaRenderer.propTypes={classes:o.a.object.isRequired,semantic:o.a.oneOf([\"p\"]),children:o.a.node.isRequired},t.a=Object(s.a)(l)(ParaRenderer)},function(e,t,n){\"use strict\";var r=n(294);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(2),l=n(53);function MarkdownHeadingRenderer(e){var t=e.classes,n=e.level,r=e.children;return i.a.createElement(\"div\",{className:t.spacing},i.a.createElement(l.a,{level:n},r))}MarkdownHeadingRenderer.propTypes={classes:o.a.object.isRequired,level:o.a.oneOf([1,2,3,4,5,6]).isRequired,children:o.a.node},t.a=Object(s.a)(function styles(e){return{spacing:{marginBottom:e.space[2]}}})(MarkdownHeadingRenderer)},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(6),l=n.n(s),u=n(2),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function HeadingRenderer(e){var t=e.classes,n=e.level,r=e.children,a=function _objectWithoutProperties(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,[\"classes\",\"level\",\"children\"]),o=\"h\"+n,s=l()(t.heading,t[\"heading\"+n]);return i.a.createElement(o,c({},a,{className:s}),r)}HeadingRenderer.propTypes={classes:o.a.object.isRequired,level:o.a.oneOf([1,2,3,4,5,6]).isRequired,children:o.a.node},t.a=Object(u.a)(function styles(e){var t=e.color,n=e.fontFamily,r=e.fontSize;return{heading:{margin:0,color:t.base,fontFamily:n.base,fontWeight:\"normal\"},heading1:{fontSize:r.h1},heading2:{fontSize:r.h2},heading3:{fontSize:r.h3},heading4:{fontSize:r.h4},heading5:{fontSize:r.h5},heading6:{fontSize:r.h6}}})(HeadingRenderer)},function(e,t,n){var r=n(297);\"string\"==typeof r&&(r=[[e.i,r,\"\"]]);var i={hmr:!0};i.transform=void 0;n(112)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(111)(void 0)).push([e.i,\"/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */\\n\\n/* Tomorrow Comment */\\n.hljs-comment,\\n.hljs-quote {\\n  color: #8e908c;\\n}\\n\\n/* Tomorrow Red */\\n.hljs-variable,\\n.hljs-template-variable,\\n.hljs-tag,\\n.hljs-name,\\n.hljs-selector-id,\\n.hljs-selector-class,\\n.hljs-regexp,\\n.hljs-deletion {\\n  color: #c82829;\\n}\\n\\n/* Tomorrow Orange */\\n.hljs-number,\\n.hljs-built_in,\\n.hljs-builtin-name,\\n.hljs-literal,\\n.hljs-type,\\n.hljs-params,\\n.hljs-meta,\\n.hljs-link {\\n  color: #f5871f;\\n}\\n\\n/* Tomorrow Yellow */\\n.hljs-attribute {\\n  color: #eab700;\\n}\\n\\n/* Tomorrow Green */\\n.hljs-string,\\n.hljs-symbol,\\n.hljs-bullet,\\n.hljs-addition {\\n  color: #718c00;\\n}\\n\\n/* Tomorrow Blue */\\n.hljs-title,\\n.hljs-section {\\n  color: #4271ae;\\n}\\n\\n/* Tomorrow Purple */\\n.hljs-keyword,\\n.hljs-selector-tag {\\n  color: #8959a8;\\n}\\n\\n.hljs {\\n  display: block;\\n  overflow-x: auto;\\n  background: white;\\n  color: #4d4d4c;\\n  padding: 0.5em;\\n}\\n\\n.hljs-emphasis {\\n  font-style: italic;\\n}\\n\\n.hljs-strong {\\n  font-weight: bold;\\n}\\n\",\"\"])},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(55),l=n(2),u=n(6),c=n.n(u);function NameRenderer(e){var t=e.classes,n=e.children,r=e.deprecated,a=c()(t.name,function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t.isDeprecated,r));return i.a.createElement(s.a,{className:a},n)}NameRenderer.propTypes={classes:o.a.object.isRequired,children:o.a.node.isRequired,deprecated:o.a.bool},t.a=Object(l.a)(function styles(e){var t=e.fontFamily,n=e.fontSize,r=e.color;return{name:{fontFamily:t.monospace,fontSize:n.small,color:r.name},isDeprecated:{color:r.light,textDecoration:\"line-through\"}}})(NameRenderer)},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(2);function CodeRenderer(e){var t=e.classes,n=e.className,r=e.children;return i.a.createElement(\"span\",{className:n},i.a.createElement(\"code\",{className:t.code},r))}CodeRenderer.propTypes={classes:o.a.object.isRequired,className:o.a.string,children:o.a.node},t.a=Object(s.a)(function styles(e){return{code:{display:\"inline\",fontFamily:e.fontFamily.monospace,fontSize:\"inherit\",color:\"inherit\",background:\"transparent\"}}})(CodeRenderer)},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(55),l=n(2);function TypeRenderer(e){var t=e.classes,n=e.children;return i.a.createElement(s.a,{className:t.type},n)}TypeRenderer.propTypes={classes:o.a.object.isRequired,children:o.a.node.isRequired},t.a=Object(l.a)(function styles(e){var t=e.fontFamily,n=e.fontSize,r=e.color;return{type:{fontFamily:t.monospace,fontSize:n.small,color:r.type}}})(TypeRenderer)},function(e,t,n){\"use strict\";t.a=JsDoc;var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(10),l=n(95),u=n.n(l),c=function paragraphs(e){return e.map(function(e){return e.description}).join(\"\\n\\n\")},p={deprecated:function deprecated(e){return\"**Deprecated:** \"+e[0].description},see:function see(e){return c(e)},link:function link(e){return c(e)},author:function author(e){return function plural(e,t){return 1===e.length?t:t+\"s\"}(e,\"Author\")+\": \"+function list(e){return e.map(function(e){return e.description}).join(\", \")}(e)},version:function version(e){return\"Version: \"+e[0].description},since:function since(e){return\"Since: \"+e[0].description}};function JsDoc(e){var t=function getMarkdown(e){return u()(p,function(t,n){return e[n]&&t(e[n])}).filter(Boolean).join(\"\\n\\n\")}(e);return t?i.a.createElement(s.a,{text:t}):null}JsDoc.propTypes={deprecated:o.a.array,see:o.a.array,link:o.a.array,author:o.a.array,version:o.a.array,since:o.a.array}},function(e,t,n){var r=n(303),i=n(15);e.exports=function baseMap(e,t){var n=-1,a=i(e)?Array(e.length):[];return r(e,function(e,r,i){a[++n]=t(e,r,i)}),a}},function(e,t,n){var r=n(83),i=n(304)(r);e.exports=i},function(e,t,n){var r=n(15);e.exports=function createBaseEach(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var a=n.length,o=t?a:-1,s=Object(n);(t?o--:++o<a)&&!1!==i(s[o],o,s););return n}}},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(2);function TableRenderer(e){var t=e.classes,n=e.columns,r=e.rows,a=e.getRowKey;return i.a.createElement(\"table\",{className:t.table},i.a.createElement(\"thead\",{className:t.tableHead},i.a.createElement(\"tr\",null,n.map(function(e){var n=e.caption;return i.a.createElement(\"th\",{key:n,className:t.cellHeading},n)}))),i.a.createElement(\"tbody\",null,r.map(function(e){return i.a.createElement(\"tr\",{key:a(e)},n.map(function(n,r){var a=n.render;return i.a.createElement(\"td\",{key:r,className:t.cell},a(e))}))})))}TableRenderer.propTypes={classes:o.a.object.isRequired,columns:o.a.arrayOf(o.a.shape({caption:o.a.string.isRequired,render:o.a.func.isRequired})).isRequired,rows:o.a.arrayOf(o.a.object).isRequired,getRowKey:o.a.func.isRequired},t.a=Object(s.a)(function styles(e){var t=e.space,n=e.color,r=e.fontFamily,i=e.fontSize;return{table:{width:\"100%\",borderCollapse:\"collapse\",marginBottom:t[4]},tableHead:{borderBottom:[[1,n.border,\"solid\"]]},cellHeading:{color:n.base,paddingRight:t[2],paddingBottom:t[1],textAlign:\"left\",fontFamily:r.base,fontWeight:\"bold\",fontSize:i.small,whiteSpace:\"nowrap\"},cell:{color:n.base,paddingRight:t[2],paddingTop:t[1],paddingBottom:t[1],verticalAlign:\"top\",fontFamily:r.base,fontSize:i.small,\"&:last-child\":{isolate:!1,width:\"99%\",paddingRight:0},\"& p:last-child\":{isolate:!1,marginBottom:0}}}})(TableRenderer)},function(e,t,n){\"use strict\";t.c=function unquote(e){return e.replace(/^['\"]|['\"]$/g,\"\")},t.a=function getType(e){return e.flowType||e.type},t.b=function showSpaces(e){return e.replace(/^\\s|\\s$/g,\"␣\")}},function(e,t,n){\"use strict\";var r=n(308);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";t.a=MethodsRenderer;var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(10),l=n(49),u=n(82),c=n(54),p=n(56),h=n(96),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d=function getRowKey(e){return e.name},m=[{caption:\"Method name\",render:function render(e){var t=e.name,n=e.tags,r=void 0===n?{}:n;return i.a.createElement(c.a,{deprecated:!!r.deprecated},t+\"()\")}},{caption:\"Parameters\",render:function render(e){var t=e.params,n=void 0===t?[]:t;return i.a.createElement(u.a,{args:n})}},{caption:\"Description\",render:function render(e){var t=e.description,n=e.returns,r=e.tags,a=void 0===r?{}:r;return i.a.createElement(\"div\",null,t&&i.a.createElement(s.a,{text:t}),n&&i.a.createElement(l.a,f({block:!0,returns:!0},n)),i.a.createElement(p.a,a))}}];function MethodsRenderer(e){var t=e.methods;return i.a.createElement(h.a,{columns:m,rows:t,getRowKey:d})}MethodsRenderer.propTypes={methods:o.a.arrayOf(o.a.shape({name:o.a.string.isRequired,description:o.a.string,returns:o.a.object,params:o.a.array,tags:o.a.object})).isRequired}},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(310),l=n.n(s),u=n(311),c=n.n(u),p=n(97),h=n(98),f=function IsolateButton(e){var t=e.name,n=e.example;return e.isolated?i.a.createElement(p.a,{href:Object(h.a)({anchor:!0,slug:\"/\"}),title:\"Show all components\"},i.a.createElement(c.a,null)):i.a.createElement(p.a,{href:Object(h.a)({name:t,example:n,isolated:!0}),title:\"Open isolated\"},i.a.createElement(l.a,null))};f.propTypes={name:o.a.string.isRequired,example:o.a.number,isolated:o.a.bool},t.a=f},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=_interopRequireDefault(n(0)),a=_interopRequireDefault(n(57));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}t.default=function MdFullscreen(e){return i.default.createElement(a.default,r({viewBox:\"0 0 40 40\"},e),i.default.createElement(\"g\",null,i.default.createElement(\"path\",{d:\"m23.4 8.4h8.2v8.2h-3.2v-5h-5v-3.2z m5 20v-5h3.2v8.2h-8.2v-3.2h5z m-20-11.8v-8.2h8.2v3.2h-5v5h-3.2z m3.2 6.8v5h5v3.2h-8.2v-8.2h3.2z\"})))},e.exports=t.default},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=_interopRequireDefault(n(0)),a=_interopRequireDefault(n(57));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}t.default=function MdFullscreenExit(e){return i.default.createElement(a.default,r({viewBox:\"0 0 40 40\"},e),i.default.createElement(\"g\",null,i.default.createElement(\"path\",{d:\"m26.6 13.4h5v3.2h-8.2v-8.2h3.2v5z m-3.2 18.2v-8.2h8.2v3.2h-5v5h-3.2z m-10-18.2v-5h3.2v8.2h-8.2v-3.2h5z m-5 13.2v-3.2h8.2v8.2h-3.2v-5h-5z\"})))},e.exports=t.default},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(2),l=n(6),u=n.n(l);function ToolbarButtonRenderer(e){var t=e.classes,n=e.className,r=e.onClick,a=e.href,o=e.title,s=e.small,l=e.children,c=u()(t.button,n,function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t.isSmall,s));return void 0!==a?i.a.createElement(\"a\",{href:a,title:o,className:c},l):i.a.createElement(\"button\",{type:\"button\",onClick:r,title:o,className:c},l)}ToolbarButtonRenderer.propTypes={classes:o.a.object.isRequired,className:o.a.string,href:o.a.string,onClick:o.a.func,title:o.a.string,small:o.a.bool,children:o.a.node},t.a=Object(s.a)(function styles(e){var t=e.space,n=e.color;return{button:{padding:2,color:n.light,background:\"transparent\",transition:\"color 750ms ease-out\",cursor:\"pointer\",\"&:hover, &:focus\":{isolate:!1,color:n.linkHover,transition:\"color 150ms ease-in\"},\"&:focus\":{isolate:!1,outline:[[1,\"dotted\",n.linkHover]]},\"& + &\":{isolate:!1,marginLeft:t[1]},\"& svg\":{width:t[3],height:t[3],color:\"currentColor\",cursor:\"inherit\"}},isSmall:{\"& svg\":{width:14,height:14}}}})(ToolbarButtonRenderer)},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(99),l=function CodeTabButton(e){return i.a.createElement(s.a,e,\"View Code\")};l.propTypes={onClick:o.a.func.isRequired,name:o.a.string.isRequired,active:o.a.bool},t.a=l},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(2),l=n(6),u=n.n(l);function TabButtonRenderer(e){var t=e.classes,n=e.name,r=e.className,a=e.onClick,o=e.active,s=e.children,l=u()(t.button,r,function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t.isActive,o));return i.a.createElement(\"button\",{type:\"button\",name:n,className:l,onClick:a},s)}TabButtonRenderer.propTypes={classes:o.a.object.isRequired,name:o.a.string,className:o.a.string,onClick:o.a.func,active:o.a.bool,children:o.a.node},t.a=Object(s.a)(function styles(e){var t=e.space,n=e.color,r=e.fontFamily,i=e.fontSize,a=e.buttonTextTransform;return{button:{padding:[[t[1],0]],fontFamily:r.base,fontSize:i.base,color:n.light,background:\"transparent\",textTransform:a,transition:\"color 750ms ease-out\",border:\"none\",cursor:\"pointer\",\"&:hover, &:focus\":{isolate:!1,outline:0,color:n.linkHover,transition:\"color 150ms ease-in\"},\"&:focus:not($isActive)\":{isolate:!1,outline:[[1,\"dotted\",n.linkHover]]},\"& + &\":{isolate:!1,marginLeft:t[1]}},isActive:{borderBottom:[[2,n.linkHover,\"solid\"]]}}})(TabButtonRenderer)},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(99),l=function UsageTabButton(e){var t=e.props;return t.props||t.methods&&t.methods.length>0?i.a.createElement(s.a,e,\"Props & methods\"):null};l.propTypes={onClick:o.a.func.isRequired,name:o.a.string.isRequired,props:o.a.shape({props:o.a.object,methods:o.a.array}).isRequired,active:o.a.bool},t.a=l},function(e,t,n){\"use strict\";var r=n(317);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(318),l=n(325),u=n(101),c=n(359),p=n(361),h=n(104),f=(n.n(h),n(17)),d=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}();function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}var m=function(e){!function _inherits(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(StyleGuide,r[\"Component\"]);function StyleGuide(){var e,t,n;!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,StyleGuide);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return t=n=_possibleConstructorReturn(this,(e=StyleGuide.__proto__||Object.getPrototypeOf(StyleGuide)).call.apply(e,[this].concat(i))),n.state={error:!1,info:null},_possibleConstructorReturn(n,t)}return d(StyleGuide,[{key:\"getChildContext\",value:function getChildContext(){return{codeRevision:this.props.codeRevision,config:this.props.config,slots:this.props.slots,displayMode:this.props.displayMode}}},{key:\"componentDidCatch\",value:function componentDidCatch(e,t){this.setState({error:e,info:t})}},{key:\"render\",value:function render(){var e=this.props,t=e.config,n=e.sections,r=e.welcomeScreen,a=e.patterns,o=e.displayMode;return this.state.error?i.a.createElement(p.a,{error:this.state.error,info:this.state.info}):r?i.a.createElement(c.a,{patterns:a}):i.a.createElement(l.a,{title:t.title,homepageUrl:h.HOMEPAGE,toc:i.a.createElement(s.a,{sections:n}),hasSidebar:t.showSidebar&&o===f.a.all},i.a.createElement(u.a,{sections:n,depth:1}))}}]),StyleGuide}();m.propTypes={codeRevision:o.a.number.isRequired,config:o.a.object.isRequired,slots:o.a.object.isRequired,sections:o.a.array.isRequired,welcomeScreen:o.a.bool,patterns:o.a.array,displayMode:o.a.string},m.childContextTypes={codeRevision:o.a.number.isRequired,config:o.a.object.isRequired,slots:o.a.object.isRequired,displayMode:o.a.string},m.defaultProps={displayMode:f.a.all},t.a=m},function(e,t,n){\"use strict\";var r=n(319);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(320),l=n(322),u=n(323),c=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}();function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}var p=function(e){!function _inherits(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(TableOfContents,r[\"Component\"]);function TableOfContents(){var e,t,n;!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,TableOfContents);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return t=n=_possibleConstructorReturn(this,(e=TableOfContents.__proto__||Object.getPrototypeOf(TableOfContents)).call.apply(e,[this].concat(i))),n.state={searchTerm:\"\"},_possibleConstructorReturn(n,t)}return c(TableOfContents,[{key:\"renderLevel\",value:function renderLevel(e){var t=this,n=e.map(function(e){var n=[].concat(_toConsumableArray(e.sections||[]),_toConsumableArray(e.components||[]));return Object.assign({},e,{heading:!!e.name&&n.length>0,content:n.length>0&&t.renderLevel(n)})});return i.a.createElement(s.a,{items:n})}},{key:\"renderSections\",value:function renderSections(){var e=this.state.searchTerm,t=this.props.sections,n=1===t.length?t[0].components:t,r=Object(u.a)(n,e);return this.renderLevel(r)}},{key:\"render\",value:function render(){var e=this,t=this.state.searchTerm;return i.a.createElement(l.a,{searchTerm:t,onSearchTermChange:function onSearchTermChange(t){return e.setState({searchTerm:t})}},this.renderSections())}}]),TableOfContents}();p.propTypes={sections:o.a.array.isRequired},t.a=p},function(e,t,n){\"use strict\";var r=n(321);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(6),l=n.n(s),u=n(92),c=n(2);function ComponentsListRenderer(e){var t=e.classes,n=e.items;return(n=n.filter(function(e){return e.name})).length?i.a.createElement(\"ul\",{className:t.list},n.map(function(e){var n=e.heading,r=e.name,a=e.slug,o=e.content;return i.a.createElement(\"li\",{className:l()(t.item,(!o||!o.props.items.length)&&t.isChild),key:r},i.a.createElement(u.a,{className:l()(n&&t.heading),href:\"#\"+a},r),o)})):null}ComponentsListRenderer.propTypes={items:o.a.array.isRequired,classes:o.a.object.isRequired},t.a=Object(c.a)(function styles(e){var t=e.color,n=e.fontFamily,r=e.fontSize,i=e.space,a=e.mq;return{list:{margin:0,paddingLeft:i[2]},item:{color:t.base,display:\"block\",margin:[[i[1],0,i[1],0]],fontFamily:n.base,fontSize:r.base,listStyle:\"none\",overflow:\"hidden\",textOverflow:\"ellipsis\"},isChild:function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},a.small,{display:\"inline-block\",margin:[[0,i[1],0,0]]}),heading:{color:t.base,marginTop:i[1],fontFamily:n.base,fontWeight:\"bold\"}}})(ComponentsListRenderer)},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(2);function TableOfContentsRenderer(e){var t=e.classes,n=e.children,r=e.searchTerm,a=e.onSearchTermChange;return i.a.createElement(\"div\",null,i.a.createElement(\"div\",{className:t.root},i.a.createElement(\"div\",{className:t.search},i.a.createElement(\"input\",{value:r,className:t.input,placeholder:\"Filter by name\",onChange:function onChange(e){return a(e.target.value)}})),n))}TableOfContentsRenderer.propTypes={classes:o.a.object.isRequired,children:o.a.node,searchTerm:o.a.string.isRequired,onSearchTermChange:o.a.func.isRequired},t.a=Object(s.a)(function styles(e){var t=e.space,n=e.color,r=e.fontFamily,i=e.fontSize,a=e.borderRadius;return{root:{fontFamily:r.base},search:{padding:t[2]},input:{display:\"block\",width:\"100%\",padding:t[1],color:n.base,backgroundColor:n.baseBackground,fontFamily:r.base,fontSize:i.base,border:[[1,n.border,\"solid\"]],borderRadius:a,transition:\"border-color ease-in-out .15s\",\"&:focus\":{isolate:!1,borderColor:n.link,outline:0},\"&::placeholder\":{isolate:!1,fontFamily:r.base,fontSize:i.base,color:n.light}}}})(TableOfContentsRenderer)},function(e,t,n){\"use strict\";t.a=function filterSectionsByName(e,t){var n=Object(r.a)(t);return e.map(function(e){return a({},e,{sections:e.sections?filterSectionsByName(e.sections,t):[],components:e.components?Object(i.a)(e.components,t):[]})}).filter(function(e){return e.components.length>0||e.sections.length>0||n.test(e.name)})};var r=n(100),i=n(324),a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}},function(e,t,n){\"use strict\";t.a=function filterComponentsByName(e,t){var n=Object(r.a)(t);return e.filter(function(e){var t=e.name;return n.test(t)})};var r=n(100)},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(326),l=n(10),u=n(2),c=n(6),p=n.n(c);function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function StyleGuideRenderer(e){var t=e.classes,n=e.title,r=e.homepageUrl,a=e.children,o=e.toc,u=e.hasSidebar;return i.a.createElement(\"div\",{className:p()(t.root,u&&t.hasSidebar)},i.a.createElement(\"main\",{className:t.content},a,i.a.createElement(\"footer\",{className:t.footer},i.a.createElement(l.a,{text:\"Generated with [React Styleguidist](\"+r+\")\"}))),u&&i.a.createElement(\"div\",{className:t.sidebar},i.a.createElement(\"div\",{className:t.logo},i.a.createElement(s.a,null,n)),o))}StyleGuideRenderer.propTypes={classes:o.a.object.isRequired,title:o.a.string.isRequired,homepageUrl:o.a.string.isRequired,children:o.a.node.isRequired,toc:o.a.node.isRequired,hasSidebar:o.a.bool},t.a=Object(u.a)(function styles(e){var t,n=e.color,r=e.fontFamily,i=e.fontSize,a=e.sidebarWidth,o=e.mq,s=e.space,l=e.maxWidth;return{root:{color:n.base,backgroundColor:n.baseBackground},hasSidebar:_defineProperty({paddingLeft:a},o.small,{paddingLeft:0}),content:(t={maxWidth:l,padding:[[s[2],s[4]]],margin:[[0,\"auto\"]]},_defineProperty(t,o.small,{padding:s[2]}),_defineProperty(t,\"display\",\"block\"),t),sidebar:_defineProperty({backgroundColor:n.sidebarBackground,border:[[n.border,\"solid\"]],borderWidth:[[0,1,0,0]],position:\"fixed\",top:0,left:0,bottom:0,width:a,overflow:\"auto\",\"-webkit-overflow-scrolling\":\"touch\"},o.small,{position:\"static\",width:\"auto\",borderWidth:[[1,0,0,0]],paddingBottom:s[0]}),logo:{padding:s[2],borderBottom:[[1,n.border,\"solid\"]]},footer:{display:\"block\",color:n.light,fontFamily:r.base,fontSize:i.small}}})(StyleGuideRenderer)},function(e,t,n){\"use strict\";var r=n(327);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(2);function LogoRenderer(e){var t=e.classes,n=e.children;return i.a.createElement(\"h1\",{className:t.logo},n)}LogoRenderer.propTypes={classes:o.a.object.isRequired,children:o.a.node},t.a=Object(s.a)(function styles(e){var t=e.color,n=e.fontFamily,r=e.fontSize;return{logo:{color:t.base,margin:0,fontFamily:n.base,fontSize:r.h4,fontWeight:\"normal\"}}})(LogoRenderer)},function(e,t,n){\"use strict\";t.a=Sections;var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(329),l=n(358);function Sections(e){var t=e.sections,n=e.depth;return i.a.createElement(l.a,null,t.map(function(e,t){return i.a.createElement(s.a,{key:t,section:e,depth:n})}))}Sections.propTypes={sections:o.a.array.isRequired,root:o.a.bool,depth:o.a.number.isRequired}},function(e,t,n){\"use strict\";var r=n(330);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";t.a=Section;var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(102),l=n(345),u=n(101),c=n(357),p=n(17);function Section(e,t){var n=e.section,r=e.depth,a=t.displayMode,o=n.name,h=n.slug,f=n.content,d=n.components,m=n.sections,g=f&&i.a.createElement(s.a,{examples:f,name:o}),y=d&&i.a.createElement(l.a,{components:d,depth:r+1}),v=m&&i.a.createElement(u.a,{sections:m,depth:r+1});return i.a.createElement(c.a,{name:o,slug:h,content:g,components:y,sections:v,isolated:a!==p.a.all,depth:r})}Section.propTypes={section:o.a.object.isRequired,depth:o.a.number.isRequired},Section.contextTypes={displayMode:o.a.string}},function(e,t,n){\"use strict\";t.a=Examples;var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(332),l=n(10),u=n(344);function Examples(e,t){var n=e.examples,r=e.name,a=t.codeRevision;return i.a.createElement(u.a,null,n.map(function(e,t){switch(e.type){case\"code\":return i.a.createElement(s.a,{code:e.content,evalInContext:e.evalInContext,key:a+\"/\"+t,name:r,index:t,settings:e.settings});case\"markdown\":return i.a.createElement(l.a,{text:e.content,key:t});default:return null}}))}Examples.propTypes={examples:o.a.array.isRequired,name:o.a.string.isRequired},Examples.contextTypes={codeRevision:o.a.number.isRequired}},function(e,t,n){\"use strict\";var r=n(333);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(113),l=n.n(s),u=n(334),c=n(52),p=n(58),h=n(343),f=n(32),d=n(17),m=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}();var g=function(e){!function _inherits(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(Playground,r[\"Component\"]);function Playground(e,t){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,Playground);var n=function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,(Playground.__proto__||Object.getPrototypeOf(Playground)).call(this,e,t)),r=e.code,i=e.settings,a=t.config,o=void 0!==i.showcode?i.showcode:a.showCode;return n.state={code:r,activeTab:o?f.b:void 0},n.handleTabChange=n.handleTabChange.bind(n),n.handleChange=l()(n.handleChange.bind(n),a.previewDelay),n}return m(Playground,[{key:\"componentWillReceiveProps\",value:function componentWillReceiveProps(e){var t=e.code;this.setState({code:t})}},{key:\"componentWillUnmount\",value:function componentWillUnmount(){this.handleChange.cancel()}},{key:\"handleChange\",value:function handleChange(e){this.setState({code:e})}},{key:\"handleTabChange\",value:function handleTabChange(e){this.setState(function(t){return{activeTab:t.activeTab!==e?e:void 0}})}},{key:\"render\",value:function render(){var e=this.state,t=e.code,n=e.activeTab,r=this.props,a=r.evalInContext,o=r.index,s=r.name,l=r.settings,f=this.context.displayMode,m=i.a.createElement(u.a,{code:t,evalInContext:a});return l.noeditor?i.a.createElement(c.a,null,m):i.a.createElement(h.a,{name:s,preview:m,previewProps:l.props||{},tabButtons:i.a.createElement(p.a,{name:\"exampleTabButtons\",active:n,props:{onClick:this.handleTabChange}}),tabBody:i.a.createElement(p.a,{name:\"exampleTabs\",active:n,onlyActive:!0,props:{code:t,onChange:this.handleChange}}),toolbar:i.a.createElement(p.a,{name:\"exampleToolbar\",props:{name:s,isolated:f===d.a.example,example:o}})})}}]),Playground}();g.propTypes={code:o.a.string.isRequired,evalInContext:o.a.func.isRequired,index:o.a.number.isRequired,name:o.a.string.isRequired,settings:o.a.object},g.contextTypes={config:o.a.object.isRequired,displayMode:o.a.string},t.a=g},function(e,t,n){\"use strict\";var r=n(335);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(63),l=n.n(s),u=n(336),c=n.n(u),p=n(337),h=(n.n(p),n(338)),f=n(340),d=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}();function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}function _inherits(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var m=function(e){_inherits(PreviewComponent,r[\"Component\"]);function PreviewComponent(){_classCallCheck(this,PreviewComponent);var e=_possibleConstructorReturn(this,(PreviewComponent.__proto__||Object.getPrototypeOf(PreviewComponent)).call(this));return e.state={},e.setState=e.setState.bind(e),e.setInitialState=e.setInitialState.bind(e),e}return d(PreviewComponent,[{key:\"setInitialState\",value:function setInitialState(e){Object.assign(this.state,e),this.setInitialState=c.a}},{key:\"render\",value:function render(){return this.props.component(this.state,this.setState,this.setInitialState)}}]),PreviewComponent}();m.propTypes={component:o.a.func.isRequired};var g=function(e){_inherits(Preview,r[\"Component\"]);function Preview(){_classCallCheck(this,Preview);var e=_possibleConstructorReturn(this,(Preview.__proto__||Object.getPrototypeOf(Preview)).call(this));return e.state={error:null},e.handleError=e.handleError.bind(e),e}return d(Preview,[{key:\"componentDidMount\",value:function componentDidMount(){this.context.codeRevision>0&&console.clear(),this.executeCode()}},{key:\"shouldComponentUpdate\",value:function shouldComponentUpdate(e,t){return this.state.error!==t.error||this.props.code!==e.code}},{key:\"componentDidUpdate\",value:function componentDidUpdate(e){this.props.code!==e.code&&this.executeCode()}},{key:\"componentWillUnmount\",value:function componentWillUnmount(){this.unmountPreview()}},{key:\"unmountPreview\",value:function unmountPreview(){this.mountNode&&l.a.unmountComponentAtNode(this.mountNode)}},{key:\"executeCode\",value:function executeCode(){var e=this;this.setState({error:null});var t=this.props.code;if(t){var n=this.compileCode(t);if(n){var r=this.evalInContext(n),a=i.a.createElement(f.a,{onError:this.handleError},i.a.createElement(m,{component:r}));window.requestAnimationFrame(function(){e.unmountPreview();try{l.a.render(a,e.mountNode)}catch(t){e.handleError(t)}})}}}},{key:\"compileCode\",value:function compileCode(e){try{return function _compileCode(e,t){return Object(p.transform)(e,t).code}(e,this.context.config.compilerConfig)}catch(e){this.handleError(e)}return!1}},{key:\"evalInContext\",value:function evalInContext(e){var t=\"\\n\\t\\t\\tvar stateWrapper = {\\n\\t\\t\\t\\tset initialState(value) {\\n\\t\\t\\t\\t\\t__setInitialState(value)\\n\\t\\t\\t\\t},\\n\\t\\t\\t}\\n\\t\\t\\twith (stateWrapper) {\\n\\t\\t\\t\\treturn eval(\"+JSON.stringify(e)+\")\\n\\t\\t\\t}\\n\\t\\t\";return this.props.evalInContext(t)}},{key:\"handleError\",value:function handleError(e){this.unmountPreview(),this.setState({error:e.toString()}),console.error(e)}},{key:\"render\",value:function render(){var e=this,t=this.state.error;return i.a.createElement(\"div\",null,i.a.createElement(\"div\",{ref:function ref(t){return e.mountNode=t}}),t&&i.a.createElement(h.a,{message:t}))}}]),Preview}();g.propTypes={code:o.a.string.isRequired,evalInContext:o.a.func.isRequired},g.contextTypes={config:o.a.object.isRequired,codeRevision:o.a.number.isRequired},t.a=g},function(e,t){e.exports=function noop(){}},function(e,t,n){(function(e,n){(function(t){\"use strict\";var r={3:\"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile\",5:\"class enum extends super const export import\",6:\"enum\",strict:\"implements interface let package private protected public static yield\",strictBind:\"eval arguments\"},i=\"break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this\",a={5:i,6:i+\" const class extends export import super\"},o=\"ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ﬀ-ﬆﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼＡ-Ｚａ-ｚｦ-ﾾￂ-ￇￊ-ￏￒ-ￗￚ-ￜ\",s=\"‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏０-９＿\",l=new RegExp(\"[\"+o+\"]\"),u=new RegExp(\"[\"+o+s+\"]\");o=s=null;var c=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541],p=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239];function isInAstralSet(e,t){for(var n=65536,r=0;r<t.length;r+=2){if((n+=t[r])>e)return!1;if((n+=t[r+1])>=e)return!0}}function isIdentifierStart(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&l.test(String.fromCharCode(e)):!1!==t&&isInAstralSet(e,c)))}function isIdentifierChar(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&u.test(String.fromCharCode(e)):!1!==t&&(isInAstralSet(e,c)||isInAstralSet(e,p)))))}var h=function TokenType(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function binop(e,t){return new h(e,{beforeExpr:!0,binop:t})}var f={beforeExpr:!0},d={startsExpr:!0},m={};function kw(e,t){return void 0===t&&(t={}),t.keyword=e,m[e]=new h(e,t)}var g={num:new h(\"num\",d),regexp:new h(\"regexp\",d),string:new h(\"string\",d),name:new h(\"name\",d),eof:new h(\"eof\"),bracketL:new h(\"[\",{beforeExpr:!0,startsExpr:!0}),bracketR:new h(\"]\"),braceL:new h(\"{\",{beforeExpr:!0,startsExpr:!0}),braceR:new h(\"}\"),parenL:new h(\"(\",{beforeExpr:!0,startsExpr:!0}),parenR:new h(\")\"),comma:new h(\",\",f),semi:new h(\";\",f),colon:new h(\":\",f),dot:new h(\".\"),question:new h(\"?\",f),arrow:new h(\"=>\",f),template:new h(\"template\"),invalidTemplate:new h(\"invalidTemplate\"),ellipsis:new h(\"...\",f),backQuote:new h(\"`\",d),dollarBraceL:new h(\"${\",{beforeExpr:!0,startsExpr:!0}),eq:new h(\"=\",{beforeExpr:!0,isAssign:!0}),assign:new h(\"_=\",{beforeExpr:!0,isAssign:!0}),incDec:new h(\"++/--\",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new h(\"!/~\",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:binop(\"||\",1),logicalAND:binop(\"&&\",2),bitwiseOR:binop(\"|\",3),bitwiseXOR:binop(\"^\",4),bitwiseAND:binop(\"&\",5),equality:binop(\"==/!=/===/!==\",6),relational:binop(\"</>/<=/>=\",7),bitShift:binop(\"<</>>/>>>\",8),plusMin:new h(\"+/-\",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:binop(\"%\",10),star:binop(\"*\",10),slash:binop(\"/\",10),starstar:new h(\"**\",{beforeExpr:!0}),_break:kw(\"break\"),_case:kw(\"case\",f),_catch:kw(\"catch\"),_continue:kw(\"continue\"),_debugger:kw(\"debugger\"),_default:kw(\"default\",f),_do:kw(\"do\",{isLoop:!0,beforeExpr:!0}),_else:kw(\"else\",f),_finally:kw(\"finally\"),_for:kw(\"for\",{isLoop:!0}),_function:kw(\"function\",d),_if:kw(\"if\"),_return:kw(\"return\",f),_switch:kw(\"switch\"),_throw:kw(\"throw\",f),_try:kw(\"try\"),_var:kw(\"var\"),_const:kw(\"const\"),_while:kw(\"while\",{isLoop:!0}),_with:kw(\"with\"),_new:kw(\"new\",{beforeExpr:!0,startsExpr:!0}),_this:kw(\"this\",d),_super:kw(\"super\",d),_class:kw(\"class\",d),_extends:kw(\"extends\",f),_export:kw(\"export\"),_import:kw(\"import\"),_null:kw(\"null\",d),_true:kw(\"true\",d),_false:kw(\"false\",d),_in:kw(\"in\",{beforeExpr:!0,binop:7}),_instanceof:kw(\"instanceof\",{beforeExpr:!0,binop:7}),_typeof:kw(\"typeof\",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:kw(\"void\",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:kw(\"delete\",{beforeExpr:!0,prefix:!0,startsExpr:!0})},y=/\\r\\n?|\\n|\\u2028|\\u2029/,v=new RegExp(y.source,\"g\");function isNewLine(e){return 10===e||13===e||8232===e||8233===e}var b=/[\\u1680\\u180e\\u2000-\\u200a\\u202f\\u205f\\u3000\\ufeff]/,_=/(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g,x=Object.prototype,w=x.hasOwnProperty,k=x.toString;function has(e,t){return w.call(e,t)}var E=Array.isArray||function(e){return\"[object Array]\"===k.call(e)},C=function Position(e,t){this.line=e,this.column=t};C.prototype.offset=function offset(e){return new C(this.line,this.column+e)};var S=function SourceLocation(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function getLineInfo(e,t){for(var n=1,r=0;;){v.lastIndex=r;var i=v.exec(e);if(!(i&&i.index<t))return new C(n,t-r);++n,r=i.index+i[0].length}}var R={ecmaVersion:7,sourceType:\"script\",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1,plugins:{}};function getOptions(e){var t={};for(var n in R)t[n]=e&&has(e,n)?e[n]:R[n];if(t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),E(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return E(t.onComment)&&(t.onComment=function pushComment(e,t){return function(n,r,i,a,o,s){var l={type:n?\"Block\":\"Line\",value:r,start:i,end:a};e.locations&&(l.loc=new S(this,o,s)),e.ranges&&(l.range=[i,a]),t.push(l)}}(t,t.onComment)),t}var P={};function keywordRegexp(e){return new RegExp(\"^(?:\"+e.replace(/ /g,\"|\")+\")$\")}var O=function Parser(e,t,n){this.options=e=getOptions(e),this.sourceFile=e.sourceFile,this.keywords=keywordRegexp(a[e.ecmaVersion>=6?6:5]);var i=\"\";if(!e.allowReserved){for(var o=e.ecmaVersion;!(i=r[o]);o--);\"module\"==e.sourceType&&(i+=\" await\")}this.reservedWords=keywordRegexp(i);var s=(i?i+\" \":\"\")+r.strict;this.reservedWordsStrict=keywordRegexp(s),this.reservedWordsStrictBind=keywordRegexp(s+\" \"+r.strictBind),this.input=String(t),this.containsEsc=!1,this.loadPlugins(e.plugins),n?(this.pos=n,this.lineStart=this.input.lastIndexOf(\"\\n\",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(y).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=g.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=\"module\"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.inFunction=this.inGenerator=this.inAsync=!1,this.yieldPos=this.awaitPos=0,this.labels=[],0===this.pos&&e.allowHashBang&&\"#!\"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterFunctionScope()};O.prototype.isKeyword=function isKeyword(e){return this.keywords.test(e)},O.prototype.isReservedWord=function isReservedWord(e){return this.reservedWords.test(e)},O.prototype.extend=function extend(e,t){this[e]=t(this[e])},O.prototype.loadPlugins=function loadPlugins(e){for(var t in e){var n=P[t];if(!n)throw new Error(\"Plugin '\"+t+\"' not found\");n(this,e[t])}},O.prototype.parse=function parse(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};var T=O.prototype,j=/^(?:'((?:\\\\.|[^'])*?)'|\"((?:\\\\.|[^\"])*?)\"|;)/;T.strictDirective=function(e){for(;;){_.lastIndex=e,e+=_.exec(this.input)[0].length;var t=j.exec(this.input.slice(e));if(!t)return!1;if(\"use strict\"==(t[1]||t[2]))return!0;e+=t[0].length}},T.eat=function(e){return this.type===e&&(this.next(),!0)},T.isContextual=function(e){return this.type===g.name&&this.value===e},T.eatContextual=function(e){return this.value===e&&this.eat(g.name)},T.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},T.canInsertSemicolon=function(){return this.type===g.eof||this.type===g.braceR||y.test(this.input.slice(this.lastTokEnd,this.start))},T.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},T.semicolon=function(){this.eat(g.semi)||this.insertSemicolon()||this.unexpected()},T.afterTrailingComma=function(e,t){if(this.type==e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},T.expect=function(e){this.eat(e)||this.unexpected()},T.unexpected=function(e){this.raise(null!=e?e:this.start,\"Unexpected token\")};function DestructuringErrors(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=-1}T.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,\"Comma is not permitted after the rest element\");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,\"Parenthesized pattern\")}},T.checkExpressionErrors=function(e,t){var n=e?e.shorthandAssign:-1;if(!t)return n>=0;n>-1&&this.raise(n,\"Shorthand property assignments are valid only in destructuring patterns\")},T.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,\"Yield expression cannot be a default value\"),this.awaitPos&&this.raise(this.awaitPos,\"Await expression cannot be a default value\")},T.isSimpleAssignTarget=function(e){return\"ParenthesizedExpression\"===e.type?this.isSimpleAssignTarget(e.expression):\"Identifier\"===e.type||\"MemberExpression\"===e.type};var A=O.prototype;A.parseTopLevel=function(e){var t={};for(e.body||(e.body=[]);this.type!==g.eof;){var n=this.parseStatement(!0,!0,t);e.body.push(n)}return this.adaptDirectivePrologue(e.body),this.next(),this.options.ecmaVersion>=6&&(e.sourceType=this.options.sourceType),this.finishNode(e,\"Program\")};var I={kind:\"loop\"},L={kind:\"switch\"};A.isLet=function(){if(this.type!==g.name||this.options.ecmaVersion<6||\"let\"!=this.value)return!1;_.lastIndex=this.pos;var e=_.exec(this.input),t=this.pos+e[0].length,n=this.input.charCodeAt(t);if(91===n||123==n)return!0;if(isIdentifierStart(n,!0)){for(var r=t+1;isIdentifierChar(this.input.charCodeAt(r),!0);)++r;var i=this.input.slice(t,r);if(!this.isKeyword(i))return!0}return!1},A.isAsyncFunction=function(){if(this.type!==g.name||this.options.ecmaVersion<8||\"async\"!=this.value)return!1;_.lastIndex=this.pos;var e=_.exec(this.input),t=this.pos+e[0].length;return!(y.test(this.input.slice(this.pos,t))||\"function\"!==this.input.slice(t,t+8)||t+8!=this.input.length&&isIdentifierChar(this.input.charAt(t+8)))},A.parseStatement=function(e,t,n){var r,i=this.type,a=this.startNode();switch(this.isLet()&&(i=g._var,r=\"let\"),i){case g._break:case g._continue:return this.parseBreakContinueStatement(a,i.keyword);case g._debugger:return this.parseDebuggerStatement(a);case g._do:return this.parseDoStatement(a);case g._for:return this.parseForStatement(a);case g._function:return!e&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(a,!1);case g._class:return e||this.unexpected(),this.parseClass(a,!0);case g._if:return this.parseIfStatement(a);case g._return:return this.parseReturnStatement(a);case g._switch:return this.parseSwitchStatement(a);case g._throw:return this.parseThrowStatement(a);case g._try:return this.parseTryStatement(a);case g._const:case g._var:return r=r||this.value,e||\"var\"==r||this.unexpected(),this.parseVarStatement(a,r);case g._while:return this.parseWhileStatement(a);case g._with:return this.parseWithStatement(a);case g.braceL:return this.parseBlock();case g.semi:return this.parseEmptyStatement(a);case g._export:case g._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.start,\"'import' and 'export' may only appear at the top level\"),this.inModule||this.raise(this.start,\"'import' and 'export' may appear only with 'sourceType: module'\")),i===g._import?this.parseImport(a):this.parseExport(a,n);default:if(this.isAsyncFunction()&&e)return this.next(),this.parseFunctionStatement(a,!0);var o=this.value,s=this.parseExpression();return i===g.name&&\"Identifier\"===s.type&&this.eat(g.colon)?this.parseLabeledStatement(a,o,s):this.parseExpressionStatement(a,s)}},A.parseBreakContinueStatement=function(e,t){var n=\"break\"==t;this.next(),this.eat(g.semi)||this.insertSemicolon()?e.label=null:this.type!==g.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(n||\"loop\"===i.kind))break;if(e.label&&n)break}}return r===this.labels.length&&this.raise(e.start,\"Unsyntactic \"+t),this.finishNode(e,n?\"BreakStatement\":\"ContinueStatement\")},A.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,\"DebuggerStatement\")},A.parseDoStatement=function(e){return this.next(),this.labels.push(I),e.body=this.parseStatement(!1),this.labels.pop(),this.expect(g._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(g.semi):this.semicolon(),this.finishNode(e,\"DoWhileStatement\")},A.parseForStatement=function(e){if(this.next(),this.labels.push(I),this.enterLexicalScope(),this.expect(g.parenL),this.type===g.semi)return this.parseFor(e,null);var t=this.isLet();if(this.type===g._var||this.type===g._const||t){var n=this.startNode(),r=t?\"let\":this.value;return this.next(),this.parseVar(n,!0,r),this.finishNode(n,\"VariableDeclaration\"),!(this.type===g._in||this.options.ecmaVersion>=6&&this.isContextual(\"of\"))||1!==n.declarations.length||\"var\"!==r&&n.declarations[0].init?this.parseFor(e,n):this.parseForIn(e,n)}var i=new DestructuringErrors,a=this.parseExpression(!0,i);return this.type===g._in||this.options.ecmaVersion>=6&&this.isContextual(\"of\")?(this.toAssignable(a),this.checkLVal(a),this.checkPatternErrors(i,!0),this.parseForIn(e,a)):(this.checkExpressionErrors(i,!0),this.parseFor(e,a))},A.parseFunctionStatement=function(e,t){return this.next(),this.parseFunction(e,!0,!1,t)},A.isFunction=function(){return this.type===g._function||this.isAsyncFunction()},A.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!this.strict&&this.isFunction()),e.alternate=this.eat(g._else)?this.parseStatement(!this.strict&&this.isFunction()):null,this.finishNode(e,\"IfStatement\")},A.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,\"'return' outside of function\"),this.next(),this.eat(g.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,\"ReturnStatement\")},A.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(g.braceL),this.labels.push(L),this.enterLexicalScope();for(var t,n=!1;this.type!=g.braceR;)if(this.type===g._case||this.type===g._default){var r=this.type===g._case;t&&this.finishNode(t,\"SwitchCase\"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,\"Multiple default clauses\"),n=!0,t.test=null),this.expect(g.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(!0));return this.exitLexicalScope(),t&&this.finishNode(t,\"SwitchCase\"),this.next(),this.labels.pop(),this.finishNode(e,\"SwitchStatement\")},A.parseThrowStatement=function(e){return this.next(),y.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,\"Illegal newline after throw\"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,\"ThrowStatement\")};var N=[];A.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===g._catch){var t=this.startNode();this.next(),this.expect(g.parenL),t.param=this.parseBindingAtom(),this.enterLexicalScope(),this.checkLVal(t.param,\"let\"),this.expect(g.parenR),t.body=this.parseBlock(!1),this.exitLexicalScope(),e.handler=this.finishNode(t,\"CatchClause\")}return e.finalizer=this.eat(g._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,\"Missing catch or finally clause\"),this.finishNode(e,\"TryStatement\")},A.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,\"VariableDeclaration\")},A.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(I),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,\"WhileStatement\")},A.parseWithStatement=function(e){return this.strict&&this.raise(this.start,\"'with' in strict mode\"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(!1),this.finishNode(e,\"WithStatement\")},A.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,\"EmptyStatement\")},A.parseLabeledStatement=function(e,t,n){for(var r=0,i=this.labels;r<i.length;r+=1){i[r].name===t&&this.raise(n.start,\"Label '\"+t+\"' is already declared\")}for(var a=this.type.isLoop?\"loop\":this.type===g._switch?\"switch\":null,o=this.labels.length-1;o>=0;o--){var s=this.labels[o];if(s.statementStart!=e.start)break;s.statementStart=this.start,s.kind=a}return this.labels.push({name:t,kind:a,statementStart:this.start}),e.body=this.parseStatement(!0),(\"ClassDeclaration\"==e.body.type||\"VariableDeclaration\"==e.body.type&&\"var\"!=e.body.kind||\"FunctionDeclaration\"==e.body.type&&(this.strict||e.body.generator))&&this.raiseRecoverable(e.body.start,\"Invalid labeled declaration\"),this.labels.pop(),e.label=n,this.finishNode(e,\"LabeledStatement\")},A.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,\"ExpressionStatement\")},A.parseBlock=function(e){void 0===e&&(e=!0);var t=this.startNode();for(t.body=[],this.expect(g.braceL),e&&this.enterLexicalScope();!this.eat(g.braceR);){var n=this.parseStatement(!0);t.body.push(n)}return e&&this.exitLexicalScope(),this.finishNode(t,\"BlockStatement\")},A.parseFor=function(e,t){return e.init=t,this.expect(g.semi),e.test=this.type===g.semi?null:this.parseExpression(),this.expect(g.semi),e.update=this.type===g.parenR?null:this.parseExpression(),this.expect(g.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,\"ForStatement\")},A.parseForIn=function(e,t){var n=this.type===g._in?\"ForInStatement\":\"ForOfStatement\";return this.next(),e.left=t,e.right=this.parseExpression(),this.expect(g.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,n)},A.parseVar=function(e,t,n){for(e.declarations=[],e.kind=n;;){var r=this.startNode();if(this.parseVarId(r,n),this.eat(g.eq)?r.init=this.parseMaybeAssign(t):\"const\"!==n||this.type===g._in||this.options.ecmaVersion>=6&&this.isContextual(\"of\")?\"Identifier\"==r.id.type||t&&(this.type===g._in||this.isContextual(\"of\"))?r.init=null:this.raise(this.lastTokEnd,\"Complex binding patterns require an initialization value\"):this.unexpected(),e.declarations.push(this.finishNode(r,\"VariableDeclarator\")),!this.eat(g.comma))break}return e},A.parseVarId=function(e,t){e.id=this.parseBindingAtom(t),this.checkLVal(e.id,t,!1)},A.parseFunction=function(e,t,n,r){this.initFunction(e),this.options.ecmaVersion>=6&&!r&&(e.generator=this.eat(g.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&&(e.id=\"nullableID\"===t&&this.type!=g.name?null:this.parseIdent(),e.id&&this.checkLVal(e.id,\"var\"));var i=this.inGenerator,a=this.inAsync,o=this.yieldPos,s=this.awaitPos,l=this.inFunction;return this.inGenerator=e.generator,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),t||(e.id=this.type==g.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n),this.inGenerator=i,this.inAsync=a,this.yieldPos=o,this.awaitPos=s,this.inFunction=l,this.finishNode(e,t?\"FunctionDeclaration\":\"FunctionExpression\")},A.parseFunctionParams=function(e){this.expect(g.parenL),e.params=this.parseBindingList(g.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},A.parseClass=function(e,t){this.next(),this.parseClassId(e,t),this.parseClassSuper(e);var n=this.startNode(),r=!1;for(n.body=[],this.expect(g.braceL);!this.eat(g.braceR);)if(!this.eat(g.semi)){var i=this.startNode(),a=this.eat(g.star),o=!1,s=this.type===g.name&&\"static\"===this.value;this.parsePropertyName(i),i.static=s&&this.type!==g.parenL,i.static&&(a&&this.unexpected(),a=this.eat(g.star),this.parsePropertyName(i)),this.options.ecmaVersion>=8&&!a&&!i.computed&&\"Identifier\"===i.key.type&&\"async\"===i.key.name&&this.type!==g.parenL&&!this.canInsertSemicolon()&&(o=!0,this.parsePropertyName(i)),i.kind=\"method\";var l=!1;if(!i.computed){var u=i.key;a||o||\"Identifier\"!==u.type||this.type===g.parenL||\"get\"!==u.name&&\"set\"!==u.name||(l=!0,i.kind=u.name,u=this.parsePropertyName(i)),!i.static&&(\"Identifier\"===u.type&&\"constructor\"===u.name||\"Literal\"===u.type&&\"constructor\"===u.value)&&(r&&this.raise(u.start,\"Duplicate constructor in the same class\"),l&&this.raise(u.start,\"Constructor can't have get/set modifier\"),a&&this.raise(u.start,\"Constructor can't be a generator\"),o&&this.raise(u.start,\"Constructor can't be an async method\"),i.kind=\"constructor\",r=!0)}if(this.parseClassMethod(n,i,a,o),l){var c=\"get\"===i.kind?0:1;if(i.value.params.length!==c){var p=i.value.start;\"get\"===i.kind?this.raiseRecoverable(p,\"getter should have no params\"):this.raiseRecoverable(p,\"setter should have exactly one param\")}else\"set\"===i.kind&&\"RestElement\"===i.value.params[0].type&&this.raiseRecoverable(i.value.params[0].start,\"Setter cannot use rest params\")}}return e.body=this.finishNode(n,\"ClassBody\"),this.finishNode(e,t?\"ClassDeclaration\":\"ClassExpression\")},A.parseClassMethod=function(e,t,n,r){t.value=this.parseMethod(n,r),e.body.push(this.finishNode(t,\"MethodDefinition\"))},A.parseClassId=function(e,t){e.id=this.type===g.name?this.parseIdent():!0===t?this.unexpected():null},A.parseClassSuper=function(e){e.superClass=this.eat(g._extends)?this.parseExprSubscripts():null},A.parseExport=function(e,t){if(this.next(),this.eat(g.star))return this.expectContextual(\"from\"),e.source=this.type===g.string?this.parseExprAtom():this.unexpected(),this.semicolon(),this.finishNode(e,\"ExportAllDeclaration\");if(this.eat(g._default)){this.checkExport(t,\"default\",this.lastTokStart);var n;if(this.type===g._function||(n=this.isAsyncFunction())){var r=this.startNode();this.next(),n&&this.next(),e.declaration=this.parseFunction(r,\"nullableID\",!1,n)}else if(this.type===g._class){var i=this.startNode();e.declaration=this.parseClass(i,\"nullableID\")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,\"ExportDefaultDeclaration\")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(!0),\"VariableDeclaration\"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual(\"from\"))e.source=this.type===g.string?this.parseExprAtom():this.unexpected();else{for(var a=0,o=e.specifiers;a<o.length;a+=1){var s=o[a];this.checkUnreserved(s.local)}e.source=null}this.semicolon()}return this.finishNode(e,\"ExportNamedDeclaration\")},A.checkExport=function(e,t,n){e&&(has(e,t)&&this.raiseRecoverable(n,\"Duplicate export '\"+t+\"'\"),e[t]=!0)},A.checkPatternExport=function(e,t){var n=t.type;if(\"Identifier\"==n)this.checkExport(e,t.name,t.start);else if(\"ObjectPattern\"==n)for(var r=0,i=t.properties;r<i.length;r+=1){var a=i[r];this.checkPatternExport(e,a.value)}else if(\"ArrayPattern\"==n)for(var o=0,s=t.elements;o<s.length;o+=1){var l=s[o];l&&this.checkPatternExport(e,l)}else\"AssignmentPattern\"==n?this.checkPatternExport(e,t.left):\"ParenthesizedExpression\"==n&&this.checkPatternExport(e,t.expression)},A.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}},A.shouldParseExportStatement=function(){return\"var\"===this.type.keyword||\"const\"===this.type.keyword||\"class\"===this.type.keyword||\"function\"===this.type.keyword||this.isLet()||this.isAsyncFunction()},A.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(g.braceL);!this.eat(g.braceR);){if(n)n=!1;else if(this.expect(g.comma),this.afterTrailingComma(g.braceR))break;var r=this.startNode();r.local=this.parseIdent(!0),r.exported=this.eatContextual(\"as\")?this.parseIdent(!0):r.local,this.checkExport(e,r.exported.name,r.exported.start),t.push(this.finishNode(r,\"ExportSpecifier\"))}return t},A.parseImport=function(e){return this.next(),this.type===g.string?(e.specifiers=N,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual(\"from\"),e.source=this.type===g.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,\"ImportDeclaration\")},A.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===g.name){var n=this.startNode();if(n.local=this.parseIdent(),this.checkLVal(n.local,\"let\"),e.push(this.finishNode(n,\"ImportDefaultSpecifier\")),!this.eat(g.comma))return e}if(this.type===g.star){var r=this.startNode();return this.next(),this.expectContextual(\"as\"),r.local=this.parseIdent(),this.checkLVal(r.local,\"let\"),e.push(this.finishNode(r,\"ImportNamespaceSpecifier\")),e}for(this.expect(g.braceL);!this.eat(g.braceR);){if(t)t=!1;else if(this.expect(g.comma),this.afterTrailingComma(g.braceR))break;var i=this.startNode();i.imported=this.parseIdent(!0),this.eatContextual(\"as\")?i.local=this.parseIdent():(this.checkUnreserved(i.imported),i.local=i.imported),this.checkLVal(i.local,\"let\"),e.push(this.finishNode(i,\"ImportSpecifier\"))}return e},A.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},A.isDirectiveCandidate=function(e){return\"ExpressionStatement\"===e.type&&\"Literal\"===e.expression.type&&\"string\"==typeof e.expression.value&&('\"'===this.input[e.start]||\"'\"===this.input[e.start])};var M=O.prototype;M.toAssignable=function(e,t){if(this.options.ecmaVersion>=6&&e)switch(e.type){case\"Identifier\":this.inAsync&&\"await\"===e.name&&this.raise(e.start,\"Can not use 'await' as identifier inside an async function\");break;case\"ObjectPattern\":case\"ArrayPattern\":break;case\"ObjectExpression\":e.type=\"ObjectPattern\";for(var n=0,r=e.properties;n<r.length;n+=1){var i=r[n];\"init\"!==i.kind&&this.raise(i.key.start,\"Object pattern can't contain getter or setter\"),this.toAssignable(i.value,t)}break;case\"ArrayExpression\":e.type=\"ArrayPattern\",this.toAssignableList(e.elements,t);break;case\"AssignmentExpression\":if(\"=\"!==e.operator){this.raise(e.left.end,\"Only '=' operator can be used for specifying default value.\");break}e.type=\"AssignmentPattern\",delete e.operator,this.toAssignable(e.left,t);case\"AssignmentPattern\":break;case\"ParenthesizedExpression\":this.toAssignable(e.expression,t);break;case\"MemberExpression\":if(!t)break;default:this.raise(e.start,\"Assigning to rvalue\")}return e},M.toAssignableList=function(e,t){var n=e.length;if(n){var r=e[n-1];if(r&&\"RestElement\"==r.type)--n;else if(r&&\"SpreadElement\"==r.type){r.type=\"RestElement\";var i=r.argument;this.toAssignable(i,t),--n}6===this.options.ecmaVersion&&t&&r&&\"RestElement\"===r.type&&\"Identifier\"!==r.argument.type&&this.unexpected(r.argument.start)}for(var a=0;a<n;a++){var o=e[a];o&&this.toAssignable(o,t)}return e},M.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,\"SpreadElement\")},M.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==g.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,\"RestElement\")},M.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case g.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(g.bracketR,!0,!0),this.finishNode(e,\"ArrayPattern\");case g.braceL:return this.parseObj(!0)}return this.parseIdent()},M.parseBindingList=function(e,t,n){for(var r=[],i=!0;!this.eat(e);)if(i?i=!1:this.expect(g.comma),t&&this.type===g.comma)r.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===g.ellipsis){var a=this.parseRestBinding();this.parseBindingListItem(a),r.push(a),this.type===g.comma&&this.raise(this.start,\"Comma is not permitted after the rest element\"),this.expect(e);break}var o=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(o),r.push(o)}return r},M.parseBindingListItem=function(e){return e},M.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(g.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,\"AssignmentPattern\")},M.checkLVal=function(e,t,n){switch(e.type){case\"Identifier\":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(t?\"Binding \":\"Assigning to \")+e.name+\" in strict mode\"),n&&(has(n,e.name)&&this.raiseRecoverable(e.start,\"Argument name clash\"),n[e.name]=!0),t&&\"none\"!==t&&((\"var\"===t&&!this.canDeclareVarName(e.name)||\"var\"!==t&&!this.canDeclareLexicalName(e.name))&&this.raiseRecoverable(e.start,\"Identifier '\"+e.name+\"' has already been declared\"),\"var\"===t?this.declareVarName(e.name):this.declareLexicalName(e.name));break;case\"MemberExpression\":t&&this.raiseRecoverable(e.start,(t?\"Binding\":\"Assigning to\")+\" member expression\");break;case\"ObjectPattern\":for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.checkLVal(a.value,t,n)}break;case\"ArrayPattern\":for(var o=0,s=e.elements;o<s.length;o+=1){var l=s[o];l&&this.checkLVal(l,t,n)}break;case\"AssignmentPattern\":this.checkLVal(e.left,t,n);break;case\"RestElement\":this.checkLVal(e.argument,t,n);break;case\"ParenthesizedExpression\":this.checkLVal(e.expression,t,n);break;default:this.raise(e.start,(t?\"Binding\":\"Assigning to\")+\" rvalue\")}};var D=O.prototype;D.checkPropClash=function(e,t){if(!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var n,r=e.key;switch(r.type){case\"Identifier\":n=r.name;break;case\"Literal\":n=String(r.value);break;default:return}var i=e.kind;if(this.options.ecmaVersion>=6)\"__proto__\"===n&&\"init\"===i&&(t.proto&&this.raiseRecoverable(r.start,\"Redefinition of __proto__ property\"),t.proto=!0);else{var a=t[n=\"$\"+n];if(a){(\"init\"===i?this.strict&&a.init||a.get||a.set:a.init||a[i])&&this.raiseRecoverable(r.start,\"Redefinition of property\")}else a=t[n]={init:!1,get:!1,set:!1};a[i]=!0}}},D.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===g.comma){var a=this.startNodeAt(n,r);for(a.expressions=[i];this.eat(g.comma);)a.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(a,\"SequenceExpression\")}return i},D.parseMaybeAssign=function(e,t,n){if(this.inGenerator&&this.isContextual(\"yield\"))return this.parseYield();var r=!1,i=-1,a=-1;t?(i=t.parenthesizedAssign,a=t.trailingComma,t.parenthesizedAssign=t.trailingComma=-1):(t=new DestructuringErrors,r=!0);var o=this.start,s=this.startLoc;this.type!=g.parenL&&this.type!=g.name||(this.potentialArrowAt=this.start);var l=this.parseMaybeConditional(e,t);if(n&&(l=n.call(this,l,o,s)),this.type.isAssign){this.checkPatternErrors(t,!0),r||DestructuringErrors.call(t);var u=this.startNodeAt(o,s);return u.operator=this.value,u.left=this.type===g.eq?this.toAssignable(l):l,t.shorthandAssign=-1,this.checkLVal(l),this.next(),u.right=this.parseMaybeAssign(e),this.finishNode(u,\"AssignmentExpression\")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),a>-1&&(t.trailingComma=a),l},D.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(g.question)){var a=this.startNodeAt(n,r);return a.test=i,a.consequent=this.parseMaybeAssign(),this.expect(g.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,\"ConditionalExpression\")}return i},D.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)?i:i.start==n&&\"ArrowFunctionExpression\"===i.type?i:this.parseExprOp(i,n,r,-1,e)},D.parseExprOp=function(e,t,n,r,i){var a=this.type.binop;if(null!=a&&(!i||this.type!==g._in)&&a>r){var o=this.type===g.logicalOR||this.type===g.logicalAND,s=this.value;this.next();var l=this.start,u=this.startLoc,c=this.parseExprOp(this.parseMaybeUnary(null,!1),l,u,a,i),p=this.buildBinary(t,n,e,c,s,o);return this.parseExprOp(p,t,n,r,i)}return e},D.buildBinary=function(e,t,n,r,i,a){var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,a?\"LogicalExpression\":\"BinaryExpression\")},D.parseMaybeUnary=function(e,t){var n,r=this.start,i=this.startLoc;if(this.inAsync&&this.isContextual(\"await\"))n=this.parseAwait(),t=!0;else if(this.type.prefix){var a=this.startNode(),o=this.type===g.incDec;a.operator=this.value,a.prefix=!0,this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),o?this.checkLVal(a.argument):this.strict&&\"delete\"===a.operator&&\"Identifier\"===a.argument.type?this.raiseRecoverable(a.start,\"Deleting local variable in strict mode\"):t=!0,n=this.finishNode(a,o?\"UpdateExpression\":\"UnaryExpression\")}else{if(n=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var s=this.startNodeAt(r,i);s.operator=this.value,s.prefix=!1,s.argument=n,this.checkLVal(n),this.next(),n=this.finishNode(s,\"UpdateExpression\")}}return!t&&this.eat(g.starstar)?this.buildBinary(r,i,n,this.parseMaybeUnary(null,!1),\"**\",!1):n},D.parseExprSubscripts=function(e){var t=this.start,n=this.startLoc,r=this.parseExprAtom(e),i=\"ArrowFunctionExpression\"===r.type&&\")\"!==this.input.slice(this.lastTokStart,this.lastTokEnd);if(this.checkExpressionErrors(e)||i)return r;var a=this.parseSubscripts(r,t,n);return e&&\"MemberExpression\"===a.type&&(e.parenthesizedAssign>=a.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=a.start&&(e.parenthesizedBind=-1)),a},D.parseSubscripts=function(e,t,n,r){for(var i=this.options.ecmaVersion>=8&&\"Identifier\"===e.type&&\"async\"===e.name&&this.lastTokEnd==e.end&&!this.canInsertSemicolon(),a=void 0;;)if((a=this.eat(g.bracketL))||this.eat(g.dot)){var o=this.startNodeAt(t,n);o.object=e,o.property=a?this.parseExpression():this.parseIdent(!0),o.computed=!!a,a&&this.expect(g.bracketR),e=this.finishNode(o,\"MemberExpression\")}else if(!r&&this.eat(g.parenL)){var s=new DestructuringErrors,l=this.yieldPos,u=this.awaitPos;this.yieldPos=0,this.awaitPos=0;var c=this.parseExprList(g.parenR,this.options.ecmaVersion>=8,!1,s);if(i&&!this.canInsertSemicolon()&&this.eat(g.arrow))return this.checkPatternErrors(s,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=l,this.awaitPos=u,this.parseArrowExpression(this.startNodeAt(t,n),c,!0);this.checkExpressionErrors(s,!0),this.yieldPos=l||this.yieldPos,this.awaitPos=u||this.awaitPos;var p=this.startNodeAt(t,n);p.callee=e,p.arguments=c,e=this.finishNode(p,\"CallExpression\")}else{if(this.type!==g.backQuote)return e;var h=this.startNodeAt(t,n);h.tag=e,h.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(h,\"TaggedTemplateExpression\")}},D.parseExprAtom=function(e){var t,n=this.potentialArrowAt==this.start;switch(this.type){case g._super:return this.inFunction||this.raise(this.start,\"'super' outside of function or class\"),t=this.startNode(),this.next(),this.type!==g.dot&&this.type!==g.bracketL&&this.type!==g.parenL&&this.unexpected(),this.finishNode(t,\"Super\");case g._this:return t=this.startNode(),this.next(),this.finishNode(t,\"ThisExpression\");case g.name:var r=this.start,i=this.startLoc,a=this.parseIdent(this.type!==g.name);if(this.options.ecmaVersion>=8&&\"async\"===a.name&&!this.canInsertSemicolon()&&this.eat(g._function))return this.parseFunction(this.startNodeAt(r,i),!1,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(g.arrow))return this.parseArrowExpression(this.startNodeAt(r,i),[a],!1);if(this.options.ecmaVersion>=8&&\"async\"===a.name&&this.type===g.name)return a=this.parseIdent(),!this.canInsertSemicolon()&&this.eat(g.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,i),[a],!0)}return a;case g.regexp:var o=this.value;return(t=this.parseLiteral(o.value)).regex={pattern:o.pattern,flags:o.flags},t;case g.num:case g.string:return this.parseLiteral(this.value);case g._null:case g._true:case g._false:return(t=this.startNode()).value=this.type===g._null?null:this.type===g._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,\"Literal\");case g.parenL:var s=this.start,l=this.parseParenAndDistinguishExpression(n);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(l)&&(e.parenthesizedAssign=s),e.parenthesizedBind<0&&(e.parenthesizedBind=s)),l;case g.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(g.bracketR,!0,!0,e),this.finishNode(t,\"ArrayExpression\");case g.braceL:return this.parseObj(!1,e);case g._function:return t=this.startNode(),this.next(),this.parseFunction(t,!1);case g._class:return this.parseClass(this.startNode(),!1);case g._new:return this.parseNew();case g.backQuote:return this.parseTemplate();default:this.unexpected()}},D.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(t,\"Literal\")},D.parseParenExpression=function(){this.expect(g.parenL);var e=this.parseExpression();return this.expect(g.parenR),e},D.parseParenAndDistinguishExpression=function(e){var t,n=this.start,r=this.startLoc,i=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a,o,s=this.start,l=this.startLoc,u=[],c=!0,p=!1,h=new DestructuringErrors,f=this.yieldPos,d=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==g.parenR;){if(c?c=!1:this.expect(g.comma),i&&this.afterTrailingComma(g.parenR,!0)){p=!0;break}if(this.type===g.ellipsis){a=this.start,u.push(this.parseParenItem(this.parseRestBinding())),this.type===g.comma&&this.raise(this.start,\"Comma is not permitted after the rest element\");break}this.type!==g.parenL||o||(o=this.start),u.push(this.parseMaybeAssign(!1,h,this.parseParenItem))}var m=this.start,y=this.startLoc;if(this.expect(g.parenR),e&&!this.canInsertSemicolon()&&this.eat(g.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),o&&this.unexpected(o),this.yieldPos=f,this.awaitPos=d,this.parseParenArrowList(n,r,u);u.length&&!p||this.unexpected(this.lastTokStart),a&&this.unexpected(a),this.checkExpressionErrors(h,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=d||this.awaitPos,u.length>1?((t=this.startNodeAt(s,l)).expressions=u,this.finishNodeAt(t,\"SequenceExpression\",m,y)):t=u[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var v=this.startNodeAt(n,r);return v.expression=t,this.finishNode(v,\"ParenthesizedExpression\")}return t},D.parseParenItem=function(e){return e},D.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var B=[];D.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(g.dot))return e.meta=t,e.property=this.parseIdent(!0),\"target\"!==e.property.name&&this.raiseRecoverable(e.property.start,\"The only valid meta property for new is new.target\"),this.inFunction||this.raiseRecoverable(e.start,\"new.target can only be used in functions\"),this.finishNode(e,\"MetaProperty\");var n=this.start,r=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(),n,r,!0),this.eat(g.parenL)?e.arguments=this.parseExprList(g.parenR,this.options.ecmaVersion>=8,!1):e.arguments=B,this.finishNode(e,\"NewExpression\")},D.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===g.invalidTemplate?(t||this.raiseRecoverable(this.start,\"Bad escape sequence in untagged template literal\"),n.value={raw:this.value,cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\\r\\n?/g,\"\\n\"),cooked:this.value},this.next(),n.tail=this.type===g.backQuote,this.finishNode(n,\"TemplateElement\")},D.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.expect(g.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(g.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,\"TemplateLiteral\")},D.isAsyncProp=function(e){return!e.computed&&\"Identifier\"===e.key.type&&\"async\"===e.key.name&&(this.type===g.name||this.type===g.num||this.type===g.string||this.type===g.bracketL||this.type.keyword)&&!y.test(this.input.slice(this.lastTokEnd,this.start))},D.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(g.braceR);){if(r)r=!1;else if(this.expect(g.comma),this.afterTrailingComma(g.braceR))break;var a=this.parseProperty(e,t);this.checkPropClash(a,i),n.properties.push(a)}return this.finishNode(n,e?\"ObjectPattern\":\"ObjectExpression\")},D.parseProperty=function(e,t){var n,r,i,a,o=this.startNode();return this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||t)&&(i=this.start,a=this.startLoc),e||(n=this.eat(g.star))),this.parsePropertyName(o),!e&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(o)?(r=!0,this.parsePropertyName(o,t)):r=!1,this.parsePropertyValue(o,e,n,r,i,a,t),this.finishNode(o,\"Property\")},D.parsePropertyValue=function(e,t,n,r,i,a,o){if((n||r)&&this.type===g.colon&&this.unexpected(),this.eat(g.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind=\"init\";else if(this.options.ecmaVersion>=6&&this.type===g.parenL)t&&this.unexpected(),e.kind=\"init\",e.method=!0,e.value=this.parseMethod(n,r);else if(t||!(this.options.ecmaVersion>=5)||e.computed||\"Identifier\"!==e.key.type||\"get\"!==e.key.name&&\"set\"!==e.key.name||this.type==g.comma||this.type==g.braceR)this.options.ecmaVersion>=6&&!e.computed&&\"Identifier\"===e.key.type?(this.checkUnreserved(e.key),e.kind=\"init\",t?e.value=this.parseMaybeDefault(i,a,e.key):this.type===g.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,a,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected();else{(n||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var s=\"get\"===e.kind?0:1;if(e.value.params.length!==s){var l=e.value.start;\"get\"===e.kind?this.raiseRecoverable(l,\"getter should have no params\"):this.raiseRecoverable(l,\"setter should have exactly one param\")}else\"set\"===e.kind&&\"RestElement\"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,\"Setter cannot use rest params\")}},D.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(g.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(g.bracketR),e.key;e.computed=!1}return e.key=this.type===g.num||this.type===g.string?this.parseExprAtom():this.parseIdent(!0)},D.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=!1,e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},D.parseMethod=function(e,t){var n=this.startNode(),r=this.inGenerator,i=this.inAsync,a=this.yieldPos,o=this.awaitPos,s=this.inFunction;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.inGenerator=n.generator,this.inAsync=n.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),this.expect(g.parenL),n.params=this.parseBindingList(g.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1),this.inGenerator=r,this.inAsync=i,this.yieldPos=a,this.awaitPos=o,this.inFunction=s,this.finishNode(n,\"FunctionExpression\")},D.parseArrowExpression=function(e,t,n){var r=this.inGenerator,i=this.inAsync,a=this.yieldPos,o=this.awaitPos,s=this.inFunction;return this.enterFunctionScope(),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.inGenerator=!1,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0),this.inGenerator=r,this.inAsync=i,this.yieldPos=a,this.awaitPos=o,this.inFunction=s,this.finishNode(e,\"ArrowFunctionExpression\")},D.parseFunctionBody=function(e,t){var n=t&&this.type!==g.braceL,r=this.strict,i=!1;if(n)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);r&&!a||(i=this.strictDirective(this.end))&&a&&this.raiseRecoverable(e.start,\"Illegal 'use strict' directive in function with non-simple parameter list\");var o=this.labels;this.labels=[],i&&(this.strict=!0),this.checkParams(e,!r&&!i&&!t&&this.isSimpleParamList(e.params)),e.body=this.parseBlock(!1),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=o}this.exitFunctionScope(),this.strict&&e.id&&this.checkLVal(e.id,\"none\"),this.strict=r},D.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1){if(\"Identifier\"!==n[t].type)return!1}return!0},D.checkParams=function(e,t){for(var n={},r=0,i=e.params;r<i.length;r+=1){var a=i[r];this.checkLVal(a,\"var\",t?null:n)}},D.parseExprList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);){if(a)a=!1;else if(this.expect(g.comma),t&&this.afterTrailingComma(e))break;var o=void 0;n&&this.type===g.comma?o=null:this.type===g.ellipsis?(o=this.parseSpread(r),r&&this.type===g.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),i.push(o)}return i},D.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;if(this.inGenerator&&\"yield\"===r&&this.raiseRecoverable(t,\"Can not use 'yield' as identifier inside a generator\"),this.inAsync&&\"await\"===r&&this.raiseRecoverable(t,\"Can not use 'await' as identifier inside an async function\"),this.isKeyword(r)&&this.raise(t,\"Unexpected keyword '\"+r+\"'\"),!(this.options.ecmaVersion<6&&-1!=this.input.slice(t,n).indexOf(\"\\\\\"))){(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&this.raiseRecoverable(t,\"The keyword '\"+r+\"' is reserved\")}},D.parseIdent=function(e,t){var n=this.startNode();return e&&\"never\"==this.options.allowReserved&&(e=!1),this.type===g.name?n.name=this.value:this.type.keyword?(n.name=this.type.keyword,\"class\"!==n.name&&\"function\"!==n.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop()):this.unexpected(),this.next(),this.finishNode(n,\"Identifier\"),e||this.checkUnreserved(n),n},D.parseYield=function(){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type==g.semi||this.canInsertSemicolon()||this.type!=g.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(g.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,\"YieldExpression\")},D.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0),this.finishNode(e,\"AwaitExpression\")};var U=O.prototype;U.raise=function(e,t){var n=getLineInfo(this.input,e);t+=\" (\"+n.line+\":\"+n.column+\")\";var r=new SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},U.raiseRecoverable=U.raise,U.curPosition=function(){if(this.options.locations)return new C(this.curLine,this.pos-this.lineStart)};var F=O.prototype,$=Object.assign||function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var r=0,i=t;r<i.length;r+=1){var a=i[r];for(var o in a)has(a,o)&&(e[o]=a[o])}return e};F.enterFunctionScope=function(){this.scopeStack.push({var:{},lexical:{},childVar:{},parentLexical:{}})},F.exitFunctionScope=function(){this.scopeStack.pop()},F.enterLexicalScope=function(){var e=this.scopeStack[this.scopeStack.length-1],t={var:{},lexical:{},childVar:{},parentLexical:{}};this.scopeStack.push(t),$(t.parentLexical,e.lexical,e.parentLexical)},F.exitLexicalScope=function(){var e=this.scopeStack.pop(),t=this.scopeStack[this.scopeStack.length-1];$(t.childVar,e.var,e.childVar)},F.canDeclareVarName=function(e){var t=this.scopeStack[this.scopeStack.length-1];return!has(t.lexical,e)&&!has(t.parentLexical,e)},F.canDeclareLexicalName=function(e){var t=this.scopeStack[this.scopeStack.length-1];return!has(t.lexical,e)&&!has(t.var,e)&&!has(t.childVar,e)},F.declareVarName=function(e){this.scopeStack[this.scopeStack.length-1].var[e]=!0},F.declareLexicalName=function(e){this.scopeStack[this.scopeStack.length-1].lexical[e]=!0};var q=function Node(e,t,n){this.type=\"\",this.start=t,this.end=0,e.options.locations&&(this.loc=new S(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},z=O.prototype;z.startNode=function(){return new q(this,this.start,this.startLoc)},z.startNodeAt=function(e,t){return new q(this,e,t)};function finishNodeAt(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}z.finishNode=function(e,t){return finishNodeAt.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},z.finishNodeAt=function(e,t,n,r){return finishNodeAt.call(this,e,t,n,r)};var V=function TokContext(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},W={b_stat:new V(\"{\",!1),b_expr:new V(\"{\",!0),b_tmpl:new V(\"${\",!1),p_stat:new V(\"(\",!1),p_expr:new V(\"(\",!0),q_tmpl:new V(\"`\",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new V(\"function\",!1),f_expr:new V(\"function\",!0),f_expr_gen:new V(\"function\",!0,!1,null,!0),f_gen:new V(\"function\",!1,!1,null,!0)},H=O.prototype;H.initialContext=function(){return[W.b_stat]},H.braceIsBlock=function(e){var t=this.curContext();return t===W.f_expr||t===W.f_stat||(e!==g.colon||t!==W.b_stat&&t!==W.b_expr?e===g._return||e==g.name&&this.exprAllowed?y.test(this.input.slice(this.lastTokEnd,this.start)):e===g._else||e===g.semi||e===g.eof||e===g.parenR||e==g.arrow||(e==g.braceL?t===W.b_stat:e!=g._var&&e!=g.name&&!this.exprAllowed):!t.isExpr)},H.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(\"function\"===t.token)return t.generator}return!1},H.updateContext=function(e){var t,n=this.type;n.keyword&&e==g.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},g.parenR.updateContext=g.braceR.updateContext=function(){if(1!=this.context.length){var e=this.context.pop();e===W.b_stat&&\"function\"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},g.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?W.b_stat:W.b_expr),this.exprAllowed=!0},g.dollarBraceL.updateContext=function(){this.context.push(W.b_tmpl),this.exprAllowed=!0},g.parenL.updateContext=function(e){var t=e===g._if||e===g._for||e===g._with||e===g._while;this.context.push(t?W.p_stat:W.p_expr),this.exprAllowed=!0},g.incDec.updateContext=function(){},g._function.updateContext=g._class.updateContext=function(e){e.beforeExpr&&e!==g.semi&&e!==g._else&&(e!==g.colon&&e!==g.braceL||this.curContext()!==W.b_stat)?this.context.push(W.f_expr):this.context.push(W.f_stat),this.exprAllowed=!1},g.backQuote.updateContext=function(){this.curContext()===W.q_tmpl?this.context.pop():this.context.push(W.q_tmpl),this.exprAllowed=!1},g.star.updateContext=function(e){if(e==g._function){var t=this.context.length-1;this.context[t]===W.f_expr?this.context[t]=W.f_expr_gen:this.context[t]=W.f_gen}this.exprAllowed=!0},g.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&(\"of\"==this.value&&!this.exprAllowed||\"yield\"==this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var K=function Token(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new S(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},G=O.prototype,J=\"object\"==typeof Packages&&\"[object JavaPackage]\"==Object.prototype.toString.call(Packages);G.next=function(){this.options.onToken&&this.options.onToken(new K(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},G.getToken=function(){return this.next(),new K(this)},\"undefined\"!=typeof Symbol&&(G[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===g.eof,value:t}}}}),G.curContext=function(){return this.context[this.context.length-1]},G.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(g.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},G.readToken=function(e){return isIdentifierStart(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},G.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=57344)return e;return(e<<10)+this.input.charCodeAt(this.pos+1)-56613888},G.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf(\"*/\",this.pos+=2);if(-1===n&&this.raise(this.pos-2,\"Unterminated comment\"),this.pos=n+2,this.options.locations){v.lastIndex=t;for(var r;(r=v.exec(this.input))&&r.index<this.pos;)++this.curLine,this.lineStart=r.index+r[0].length}this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},G.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!isNewLine(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},G.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&b.test(String.fromCharCode(e))))break e;++this.pos}}},G.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},G.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(g.ellipsis)):(++this.pos,this.finishToken(g.dot))},G.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(g.assign,2):this.finishOp(g.slash,1)},G.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?g.star:g.modulo;return this.options.ecmaVersion>=7&&42==e&&42===t&&(++n,r=g.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(g.assign,n+1):this.finishOp(r,n)},G.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?g.logicalOR:g.logicalAND,2):61===t?this.finishOp(g.assign,2):this.finishOp(124===e?g.bitwiseOR:g.bitwiseAND,1)},G.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(g.assign,2):this.finishOp(g.bitwiseXOR,1)},G.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!=t||this.inModule||62!=this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!y.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(g.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(g.assign,2):this.finishOp(g.plusMin,1)},G.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(g.assign,n+1):this.finishOp(g.bitShift,n)):33!=t||60!=e||this.inModule||45!=this.input.charCodeAt(this.pos+2)||45!=this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(g.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},G.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(g.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(g.arrow)):this.finishOp(61===e?g.eq:g.prefix,1)},G.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(g.parenL);case 41:return++this.pos,this.finishToken(g.parenR);case 59:return++this.pos,this.finishToken(g.semi);case 44:return++this.pos,this.finishToken(g.comma);case 91:return++this.pos,this.finishToken(g.bracketL);case 93:return++this.pos,this.finishToken(g.bracketR);case 123:return++this.pos,this.finishToken(g.braceL);case 125:return++this.pos,this.finishToken(g.braceR);case 58:return++this.pos,this.finishToken(g.colon);case 63:return++this.pos,this.finishToken(g.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(g.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(g.prefix,1)}this.raise(this.pos,\"Unexpected character '\"+codePointToString(e)+\"'\")},G.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};function tryCreateRegexp(e,t,n,r){try{return new RegExp(e,t)}catch(e){if(void 0!==n)throw e instanceof SyntaxError&&r.raise(n,\"Error parsing regular expression: \"+e.message),e}}var Y=!!tryCreateRegexp(\"￿\",\"u\");G.readRegexp=function(){for(var e,t,n=this,r=this.pos;;){n.pos>=n.input.length&&n.raise(r,\"Unterminated regular expression\");var i=n.input.charAt(n.pos);if(y.test(i)&&n.raise(r,\"Unterminated regular expression\"),e)e=!1;else{if(\"[\"===i)t=!0;else if(\"]\"===i&&t)t=!1;else if(\"/\"===i&&!t)break;e=\"\\\\\"===i}++n.pos}var a=this.input.slice(r,this.pos);++this.pos;var o=this.readWord1(),s=a,l=\"\";if(o){var u=/^[gim]*$/;this.options.ecmaVersion>=6&&(u=/^[gimuy]*$/),u.test(o)||this.raise(r,\"Invalid regular expression flag\"),o.indexOf(\"u\")>=0&&(Y?l=\"u\":(s=(s=s.replace(/\\\\u\\{([0-9a-fA-F]+)\\}/g,function(e,t,i){return(t=Number(\"0x\"+t))>1114111&&n.raise(r+i+3,\"Code point out of bounds\"),\"x\"})).replace(/\\\\u([a-fA-F0-9]{4})|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g,\"x\"),l=l.replace(\"u\",\"\")))}var c=null;return J||(tryCreateRegexp(s,l,r,this),c=tryCreateRegexp(a,o)),this.finishToken(g.regexp,{pattern:a,flags:o,value:c})},G.readInt=function(e,t){for(var n=this.pos,r=0,i=0,a=null==t?1/0:t;i<a;++i){var o=this.input.charCodeAt(this.pos),s=void 0;if((s=o>=97?o-97+10:o>=65?o-65+10:o>=48&&o<=57?o-48:1/0)>=e)break;++this.pos,r=r*e+s}return this.pos===n||null!=t&&this.pos-n!==t?null:r},G.readRadixNumber=function(e){this.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.start+2,\"Expected number in radix \"+e),isIdentifierStart(this.fullCharCodeAtPos())&&this.raise(this.pos,\"Identifier directly after number\"),this.finishToken(g.num,t)},G.readNumber=function(e){var t=this.pos,n=!1,r=48===this.input.charCodeAt(this.pos);e||null!==this.readInt(10)||this.raise(t,\"Invalid number\"),r&&this.pos==t+1&&(r=!1);var i=this.input.charCodeAt(this.pos);46!==i||r||(++this.pos,this.readInt(10),n=!0,i=this.input.charCodeAt(this.pos)),69!==i&&101!==i||r||(43!==(i=this.input.charCodeAt(++this.pos))&&45!==i||++this.pos,null===this.readInt(10)&&this.raise(t,\"Invalid number\"),n=!0),isIdentifierStart(this.fullCharCodeAtPos())&&this.raise(this.pos,\"Identifier directly after number\");var a,o=this.input.slice(t,this.pos);return n?a=parseFloat(o):r&&1!==o.length?this.strict?this.raise(t,\"Invalid number\"):a=/[89]/.test(o)?parseInt(o,10):parseInt(o,8):a=parseInt(o,10),this.finishToken(g.num,a)},G.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf(\"}\",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,\"Code point out of bounds\")}else e=this.readHexChar(4);return e};function codePointToString(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}G.readString=function(e){for(var t=\"\",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,\"Unterminated string constant\");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):(isNewLine(r)&&this.raise(this.start,\"Unterminated string constant\"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(g.string,t)};var X={};G.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==X)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},G.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw X;this.raise(e,t)},G.readTmplToken=function(){for(var e=\"\",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,\"Unterminated template\");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==g.template&&this.type!==g.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(g.template,e)):36===n?(this.pos+=2,this.finishToken(g.dollarBraceL)):(++this.pos,this.finishToken(g.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(isNewLine(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+=\"\\n\";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},G.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case\"\\\\\":++this.pos;break;case\"$\":if(\"{\"!==this.input[this.pos+1])break;case\"`\":return this.finishToken(g.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,\"Unterminated template\")},G.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return\"\\n\";case 114:return\"\\r\";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return codePointToString(this.readCodePoint());case 116:return\"\\t\";case 98:return\"\\b\";case 118:return\"\\v\";case 102:return\"\\f\";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),\"\";default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(n,8);return r>255&&(n=n.slice(0,-1),r=parseInt(n,8)),\"0\"!==n&&(this.strict||e)&&this.invalidStringToken(this.pos-2,\"Octal literal in strict mode\"),this.pos+=n.length-1,String.fromCharCode(r)}return String.fromCharCode(t)}},G.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,\"Bad character escape sequence\"),n},G.readWord1=function(){this.containsEsc=!1;for(var e=\"\",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(isIdentifierChar(i,r))this.pos+=i<=65535?1:2;else{if(92!==i)break;this.containsEsc=!0,e+=this.input.slice(n,this.pos);var a=this.pos;117!=this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,\"Expecting Unicode escape sequence \\\\uXXXX\"),++this.pos;var o=this.readCodePoint();(t?isIdentifierStart:isIdentifierChar)(o,r)||this.invalidStringToken(a,\"Invalid Unicode escape\"),e+=codePointToString(o),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},G.readWord=function(){var e=this.readWord1(),t=g.name;return this.keywords.test(e)&&(this.containsEsc&&this.raiseRecoverable(this.start,\"Escape sequence in keyword \"+e),t=m[e]),this.finishToken(t,e)};var Q,Z,ee;var te=Object.freeze({version:\"5.2.1\",parse:function parse$1(e,t){return new O(t,e).parse()},parseExpressionAt:function parseExpressionAt(e,t,n){var r=new O(n,e,t);return r.nextToken(),r.parseExpression()},tokenizer:function tokenizer(e,t){return new O(t,e)},get parse_dammit(){return Q},get LooseParser(){return Z},get pluginsLoose(){return ee},addLooseExports:function addLooseExports(e,t,n){Q=e,Z=t,ee=n},Parser:O,plugins:P,defaultOptions:R,Position:C,SourceLocation:S,getLineInfo:getLineInfo,Node:q,TokenType:h,tokTypes:g,keywordTypes:m,TokContext:V,tokContexts:W,isIdentifierChar:isIdentifierChar,isIdentifierStart:isIdentifierStart,Token:K,isNewLine:isNewLine,lineBreak:y,lineBreakG:v,nonASCIIwhitespace:b}),ne={quot:'\"',amp:\"&\",apos:\"'\",lt:\"<\",gt:\">\",nbsp:\" \",iexcl:\"¡\",cent:\"¢\",pound:\"£\",curren:\"¤\",yen:\"¥\",brvbar:\"¦\",sect:\"§\",uml:\"¨\",copy:\"©\",ordf:\"ª\",laquo:\"«\",not:\"¬\",shy:\"­\",reg:\"®\",macr:\"¯\",deg:\"°\",plusmn:\"±\",sup2:\"²\",sup3:\"³\",acute:\"´\",micro:\"µ\",para:\"¶\",middot:\"·\",cedil:\"¸\",sup1:\"¹\",ordm:\"º\",raquo:\"»\",frac14:\"¼\",frac12:\"½\",frac34:\"¾\",iquest:\"¿\",Agrave:\"À\",Aacute:\"Á\",Acirc:\"Â\",Atilde:\"Ã\",Auml:\"Ä\",Aring:\"Å\",AElig:\"Æ\",Ccedil:\"Ç\",Egrave:\"È\",Eacute:\"É\",Ecirc:\"Ê\",Euml:\"Ë\",Igrave:\"Ì\",Iacute:\"Í\",Icirc:\"Î\",Iuml:\"Ï\",ETH:\"Ð\",Ntilde:\"Ñ\",Ograve:\"Ò\",Oacute:\"Ó\",Ocirc:\"Ô\",Otilde:\"Õ\",Ouml:\"Ö\",times:\"×\",Oslash:\"Ø\",Ugrave:\"Ù\",Uacute:\"Ú\",Ucirc:\"Û\",Uuml:\"Ü\",Yacute:\"Ý\",THORN:\"Þ\",szlig:\"ß\",agrave:\"à\",aacute:\"á\",acirc:\"â\",atilde:\"ã\",auml:\"ä\",aring:\"å\",aelig:\"æ\",ccedil:\"ç\",egrave:\"è\",eacute:\"é\",ecirc:\"ê\",euml:\"ë\",igrave:\"ì\",iacute:\"í\",icirc:\"î\",iuml:\"ï\",eth:\"ð\",ntilde:\"ñ\",ograve:\"ò\",oacute:\"ó\",ocirc:\"ô\",otilde:\"õ\",ouml:\"ö\",divide:\"÷\",oslash:\"ø\",ugrave:\"ù\",uacute:\"ú\",ucirc:\"û\",uuml:\"ü\",yacute:\"ý\",thorn:\"þ\",yuml:\"ÿ\",OElig:\"Œ\",oelig:\"œ\",Scaron:\"Š\",scaron:\"š\",Yuml:\"Ÿ\",fnof:\"ƒ\",circ:\"ˆ\",tilde:\"˜\",Alpha:\"Α\",Beta:\"Β\",Gamma:\"Γ\",Delta:\"Δ\",Epsilon:\"Ε\",Zeta:\"Ζ\",Eta:\"Η\",Theta:\"Θ\",Iota:\"Ι\",Kappa:\"Κ\",Lambda:\"Λ\",Mu:\"Μ\",Nu:\"Ν\",Xi:\"Ξ\",Omicron:\"Ο\",Pi:\"Π\",Rho:\"Ρ\",Sigma:\"Σ\",Tau:\"Τ\",Upsilon:\"Υ\",Phi:\"Φ\",Chi:\"Χ\",Psi:\"Ψ\",Omega:\"Ω\",alpha:\"α\",beta:\"β\",gamma:\"γ\",delta:\"δ\",epsilon:\"ε\",zeta:\"ζ\",eta:\"η\",theta:\"θ\",iota:\"ι\",kappa:\"κ\",lambda:\"λ\",mu:\"μ\",nu:\"ν\",xi:\"ξ\",omicron:\"ο\",pi:\"π\",rho:\"ρ\",sigmaf:\"ς\",sigma:\"σ\",tau:\"τ\",upsilon:\"υ\",phi:\"φ\",chi:\"χ\",psi:\"ψ\",omega:\"ω\",thetasym:\"ϑ\",upsih:\"ϒ\",piv:\"ϖ\",ensp:\" \",emsp:\" \",thinsp:\" \",zwnj:\"‌\",zwj:\"‍\",lrm:\"‎\",rlm:\"‏\",ndash:\"–\",mdash:\"—\",lsquo:\"‘\",rsquo:\"’\",sbquo:\"‚\",ldquo:\"“\",rdquo:\"”\",bdquo:\"„\",dagger:\"†\",Dagger:\"‡\",bull:\"•\",hellip:\"…\",permil:\"‰\",prime:\"′\",Prime:\"″\",lsaquo:\"‹\",rsaquo:\"›\",oline:\"‾\",frasl:\"⁄\",euro:\"€\",image:\"ℑ\",weierp:\"℘\",real:\"ℜ\",trade:\"™\",alefsym:\"ℵ\",larr:\"←\",uarr:\"↑\",rarr:\"→\",darr:\"↓\",harr:\"↔\",crarr:\"↵\",lArr:\"⇐\",uArr:\"⇑\",rArr:\"⇒\",dArr:\"⇓\",hArr:\"⇔\",forall:\"∀\",part:\"∂\",exist:\"∃\",empty:\"∅\",nabla:\"∇\",isin:\"∈\",notin:\"∉\",ni:\"∋\",prod:\"∏\",sum:\"∑\",minus:\"−\",lowast:\"∗\",radic:\"√\",prop:\"∝\",infin:\"∞\",ang:\"∠\",and:\"∧\",or:\"∨\",cap:\"∩\",cup:\"∪\",int:\"∫\",there4:\"∴\",sim:\"∼\",cong:\"≅\",asymp:\"≈\",ne:\"≠\",equiv:\"≡\",le:\"≤\",ge:\"≥\",sub:\"⊂\",sup:\"⊃\",nsub:\"⊄\",sube:\"⊆\",supe:\"⊇\",oplus:\"⊕\",otimes:\"⊗\",perp:\"⊥\",sdot:\"⋅\",lceil:\"⌈\",rceil:\"⌉\",lfloor:\"⌊\",rfloor:\"⌋\",lang:\"〈\",rang:\"〉\",loz:\"◊\",spades:\"♠\",clubs:\"♣\",hearts:\"♥\",diams:\"♦\"},re=/^[\\da-fA-F]+$/,ie=/^\\d+$/,ae={};\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\".split(\"\").forEach(function(e,t){ae[t]=e});function encodeInteger(e){var t=\"\";e<0?e=-e<<1|1:e<<=1;do{var n=31&e;(e>>=5)>0&&(n|=32),t+=ae[n]}while(e>0);return t}function Chunk(e,t,n){this.start=e,this.end=t,this.original=n,this.intro=\"\",this.outro=\"\",this.content=n,this.storeName=!1,this.edited=!1,Object.defineProperties(this,{previous:{writable:!0,value:null},next:{writable:!0,value:null}})}Chunk.prototype={appendLeft:function appendLeft(e){this.outro+=e},appendRight:function appendRight(e){this.intro=this.intro+e},clone:function clone(){var e=new Chunk(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e},contains:function contains(e){return this.start<e&&e<this.end},eachNext:function eachNext(e){for(var t=this;t;)e(t),t=t.next},eachPrevious:function eachPrevious(e){for(var t=this;t;)e(t),t=t.previous},edit:function edit(e,t,n){return this.content=e,n||(this.intro=\"\",this.outro=\"\"),this.storeName=t,this.edited=!0,this},prependLeft:function prependLeft(e){this.outro=e+this.outro},prependRight:function prependRight(e){this.intro=e+this.intro},split:function split(e){var t=e-this.start,n=this.original.slice(0,t),r=this.original.slice(t);this.original=n;var i=new Chunk(e,this.end,r);return i.outro=this.outro,this.outro=\"\",this.end=e,this.edited?(i.edit(\"\",!1),this.content=\"\"):this.content=n,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i},toString:function toString(){return this.intro+this.content+this.outro},trimEnd:function trimEnd(e){if(this.outro=this.outro.replace(e,\"\"),this.outro.length)return!0;var t=this.content.replace(e,\"\");return t.length?(t!==this.content&&this.split(this.start+t.length).edit(\"\",!1),!0):(this.edit(\"\",!1),this.intro=this.intro.replace(e,\"\"),!!this.intro.length||void 0)},trimStart:function trimStart(e){if(this.intro=this.intro.replace(e,\"\"),this.intro.length)return!0;var t=this.content.replace(e,\"\");return t.length?(t!==this.content&&(this.split(this.end-t.length),this.edit(\"\",!1)),!0):(this.edit(\"\",!1),this.outro=this.outro.replace(e,\"\"),!!this.outro.length||void 0)}};var oe=\"undefined\"!=typeof window&&\"function\"==typeof window.btoa?window.btoa:\"function\"==typeof e?function(t){return new e(t).toString(\"base64\")}:function(){throw new Error(\"Unsupported environment: `window.btoa` or `Buffer` should be supported.\")};function SourceMap(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=e.mappings}SourceMap.prototype={toString:function toString(){return JSON.stringify(this)},toUrl:function toUrl(){return\"data:application/json;charset=utf-8;base64,\"+oe(this.toString())}};var se=Object.prototype.toString;function getLocator(e){var t=0,n=e.split(\"\\n\").map(function(e,n){var r=t+e.length+1,i={start:t,end:r,line:n};return t=r,i}),r=0;return function locate(e){for(var t=n[r],i=e>=t.end?1:-1;t;){if(l=e,(s=t).start<=l&&l<s.end)return o=e,{line:(a=t).line,column:o-a.start};t=n[r+=i]}var a,o,s,l}}function Mappings(e){var t=this,n={generatedCodeColumn:0,sourceIndex:0,sourceCodeLine:0,sourceCodeColumn:0,sourceCodeName:0},r=0,i=0;this.raw=[];var a=this.raw[r]=[],o=null;this.addEdit=function(e,n,r,s,l){n.length?a.push([i,e,s.line,s.column,l]):o&&a.push(o),t.advance(n),o=null},this.addUneditedChunk=function(n,s,l,u,c){for(var p=s.start,h=!0;p<s.end;)(e||h||c[p])&&a.push([i,n,u.line,u.column,-1]),\"\\n\"===l[p]?(u.line+=1,u.column=0,r+=1,t.raw[r]=a=[],i=0):(u.column+=1,i+=1),p+=1,h=!1;o=[i,n,u.line,u.column,-1]},this.advance=function(e){if(e){var n=e.split(\"\\n\"),o=n.pop();n.length?(r+=n.length,t.raw[r]=a=[],i=o.length):i+=o.length}},this.encode=function(){return t.raw.map(function(e){var t=0;return e.map(function(e){var r=[e[0]-t,e[1]-n.sourceIndex,e[2]-n.sourceCodeLine,e[3]-n.sourceCodeColumn];return t=e[0],n.sourceIndex=e[1],n.sourceCodeLine=e[2],n.sourceCodeColumn=e[3],~e[4]&&(r.push(e[4]-n.sourceCodeName),n.sourceCodeName=e[4]),function encode(e){var t;if(\"number\"==typeof e)t=encodeInteger(e);else{t=\"\";for(var n=0;n<e.length;n+=1)t+=encodeInteger(e[n])}return t}(r)}).join(\",\")}).join(\";\")}}var le={insertLeft:!1,insertRight:!1,storeName:!1};function MagicString$1(e,t){void 0===t&&(t={});var n=new Chunk(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:\"\"},intro:{writable:!0,value:\"\"},firstChunk:{writable:!0,value:n},lastChunk:{writable:!0,value:n},lastSearchedChunk:{writable:!0,value:n},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:t.filename},indentExclusionRanges:{writable:!0,value:t.indentExclusionRanges},sourcemapLocations:{writable:!0,value:{}},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:function guessIndent(e){var t=e.split(\"\\n\"),n=t.filter(function(e){return/^\\t+/.test(e)}),r=t.filter(function(e){return/^ {2,}/.test(e)});if(0===n.length&&0===r.length)return null;if(n.length>=r.length)return\"\\t\";var i=r.reduce(function(e,t){var n=/^ +/.exec(t)[0].length;return Math.min(n,e)},1/0);return new Array(i+1).join(\" \")}(e)}}),this.byStart[0]=n,this.byEnd[e.length]=n}MagicString$1.prototype={addSourcemapLocation:function addSourcemapLocation(e){this.sourcemapLocations[e]=!0},append:function append(e){if(\"string\"!=typeof e)throw new TypeError(\"outro content must be a string\");return this.outro+=e,this},appendLeft:function appendLeft(e,t){if(\"string\"!=typeof t)throw new TypeError(\"inserted content must be a string\");this._split(e);var n=this.byEnd[e];return n?n.appendLeft(t):this.intro+=t,this},appendRight:function appendRight(e,t){if(\"string\"!=typeof t)throw new TypeError(\"inserted content must be a string\");this._split(e);var n=this.byStart[e];return n?n.appendRight(t):this.outro+=t,this},clone:function clone(){for(var e=new MagicString$1(this.original,{filename:this.filename}),t=this.firstChunk,n=e.firstChunk=e.lastSearchedChunk=t.clone();t;){e.byStart[n.start]=n,e.byEnd[n.end]=n;var r=t.next,i=r&&r.clone();i&&(n.next=i,i.previous=n,n=i),t=r}return e.lastChunk=n,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),Object.keys(this.sourcemapLocations).forEach(function(t){e.sourcemapLocations[t]=!0}),e},generateMap:function generateMap(e){var t=this;e=e||{};var n=Object.keys(this.storedNames),r=new Mappings(e.hires),i=getLocator(this.original);this.intro&&r.advance(this.intro),this.firstChunk.eachNext(function(e){var a=i(e.start);e.intro.length&&r.advance(e.intro),e.edited?r.addEdit(0,e.content,e.original,a,e.storeName?n.indexOf(e.original):-1):r.addUneditedChunk(0,e,t.original,a,t.sourcemapLocations),e.outro.length&&r.advance(e.outro)});return new SourceMap({file:e.file?e.file.split(/[\\/\\\\]/).pop():null,sources:[e.source?function getRelativePath(e,t){var n=e.split(/[\\/\\\\]/),r=t.split(/[\\/\\\\]/);for(n.pop();n[0]===r[0];)n.shift(),r.shift();if(n.length)for(var i=n.length;i--;)n[i]=\"..\";return n.concat(r).join(\"/\")}(e.file||\"\",e.source):null],sourcesContent:e.includeContent?[this.original]:[null],names:n,mappings:r.encode()})},getIndentString:function getIndentString(){return null===this.indentStr?\"\\t\":this.indentStr},indent:function indent(e,t){var n=/^[^\\r\\n]/gm;if(function isObject(e){return\"[object Object]\"===se.call(e)}(e)&&(t=e,e=void 0),\"\"===(e=void 0!==e?e:this.indentStr||\"\\t\"))return this;var r={};if((t=t||{}).exclude){(\"number\"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach(function(e){for(var t=e[0];t<e[1];t+=1)r[t]=!0})}var i=!1!==t.indentStart,a=function(t){return i?\"\"+e+t:(i=!0,t)};this.intro=this.intro.replace(n,a);for(var o=0,s=this.firstChunk;s;){var l=s.end;if(s.edited)r[o]||(s.content=s.content.replace(n,a),s.content.length&&(i=\"\\n\"===s.content[s.content.length-1]));else for(o=s.start;o<l;){if(!r[o]){var u=this.original[o];\"\\n\"===u?i=!0:\"\\r\"!==u&&i&&(i=!1,o===s.start?s.prependRight(e):(this._splitChunk(s,o),(s=s.next).prependRight(e)))}o+=1}o=s.end,s=s.next}return this.outro=this.outro.replace(n,a),this},insert:function insert(){throw new Error(\"magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)\")},insertLeft:function insertLeft(e,t){return le.insertLeft||(console.warn(\"magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead\"),le.insertLeft=!0),this.appendLeft(e,t)},insertRight:function insertRight(e,t){return le.insertRight||(console.warn(\"magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead\"),le.insertRight=!0),this.prependRight(e,t)},move:function move(e,t,n){if(n>=e&&n<=t)throw new Error(\"Cannot move a selection inside itself\");this._split(e),this._split(t),this._split(n);var r=this.byStart[e],i=this.byEnd[t],a=r.previous,o=i.next,s=this.byStart[n];if(!s&&i===this.lastChunk)return this;var l=s?s.previous:this.lastChunk;return a&&(a.next=o),o&&(o.previous=a),l&&(l.next=r),s&&(s.previous=i),r.previous||(this.firstChunk=i.next),i.next||(this.lastChunk=r.previous,this.lastChunk.next=null),r.previous=l,i.next=s||null,l||(this.firstChunk=r),s||(this.lastChunk=i),this},overwrite:function overwrite(e,t,n,r){if(\"string\"!=typeof n)throw new TypeError(\"replacement content must be a string\");for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;if(t>this.original.length)throw new Error(\"end is out of bounds\");if(e===t)throw new Error(\"Cannot overwrite a zero-length range – use appendLeft or prependRight instead\");this._split(e),this._split(t),!0===r&&(le.storeName||(console.warn(\"The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string\"),le.storeName=!0),r={storeName:!0});var i=void 0!==r&&r.storeName,a=void 0!==r&&r.contentOnly;if(i){var o=this.original.slice(e,t);this.storedNames[o]=!0}var s=this.byStart[e],l=this.byEnd[t];if(s){if(t>s.end&&s.next!==this.byStart[s.end])throw new Error(\"Cannot overwrite across a split point\");if(s.edit(n,i,a),s!==l){for(var u=s.next;u!==l;)u.edit(\"\",!1),u=u.next;u.edit(\"\",!1)}}else{var c=new Chunk(e,t,\"\").edit(n,i);l.next=c,c.previous=l}return this},prepend:function prepend(e){if(\"string\"!=typeof e)throw new TypeError(\"outro content must be a string\");return this.intro=e+this.intro,this},prependLeft:function prependLeft(e,t){if(\"string\"!=typeof t)throw new TypeError(\"inserted content must be a string\");this._split(e);var n=this.byEnd[e];return n?n.prependLeft(t):this.intro=t+this.intro,this},prependRight:function prependRight(e,t){if(\"string\"!=typeof t)throw new TypeError(\"inserted content must be a string\");this._split(e);var n=this.byStart[e];return n?n.prependRight(t):this.outro=t+this.outro,this},remove:function remove(e,t){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;if(e===t)return this;if(e<0||t>this.original.length)throw new Error(\"Character is out of bounds\");if(e>t)throw new Error(\"end must be greater than start\");this._split(e),this._split(t);for(var n=this.byStart[e];n;)n.intro=\"\",n.outro=\"\",n.edit(\"\"),n=t>n.end?this.byStart[n.end]:null;return this},slice:function slice(e,t){for(void 0===e&&(e=0),void 0===t&&(t=this.original.length);e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;for(var n=\"\",r=this.firstChunk;r&&(r.start>e||r.end<=e);){if(r.start<t&&r.end>=t)return n;r=r.next}if(r&&r.edited&&r.start!==e)throw new Error(\"Cannot use replaced character \"+e+\" as slice start anchor.\");for(var i=r;r;){!r.intro||i===r&&r.start!==e||(n+=r.intro);var a=r.start<t&&r.end>=t;if(a&&r.edited&&r.end!==t)throw new Error(\"Cannot use replaced character \"+t+\" as slice end anchor.\");var o=i===r?e-r.start:0,s=a?r.content.length+t-r.end:r.content.length;if(n+=r.content.slice(o,s),!r.outro||a&&r.end!==t||(n+=r.outro),a)break;r=r.next}return n},snip:function snip(e,t){var n=this.clone();return n.remove(0,e),n.remove(t,n.original.length),n},_split:function _split(e){if(!this.byStart[e]&&!this.byEnd[e])for(var t=this.lastSearchedChunk,n=e>t.end;;){if(t.contains(e))return this._splitChunk(t,e);t=n?this.byStart[t.end]:this.byEnd[t.start]}},_splitChunk:function _splitChunk(e,t){if(e.edited&&e.content.length){var n=getLocator(this.original)(t);throw new Error(\"Cannot split a chunk that has already been edited (\"+n.line+\":\"+n.column+' – \"'+e.original+'\")')}var r=e.split(t);return this.byEnd[t]=e,this.byStart[t]=r,this.byEnd[r.end]=r,e===this.lastChunk&&(this.lastChunk=r),this.lastSearchedChunk=e,!0},toString:function toString(){for(var e=this.intro,t=this.firstChunk;t;)e+=t.toString(),t=t.next;return e+this.outro},trimLines:function trimLines(){return this.trim(\"[\\\\r\\\\n]\")},trim:function trim(e){return this.trimStart(e).trimEnd(e)},trimEnd:function trimEnd(e){var t=new RegExp((e||\"\\\\s\")+\"+$\");if(this.outro=this.outro.replace(t,\"\"),this.outro.length)return this;var n=this.lastChunk;do{var r=n.end,i=n.trimEnd(t);if(n.end!==r&&(this.lastChunk===n&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),i)return this;n=n.previous}while(n);return this},trimStart:function trimStart(e){var t=new RegExp(\"^\"+(e||\"\\\\s\")+\"+\");if(this.intro=this.intro.replace(t,\"\"),this.intro.length)return this;var n=this.firstChunk;do{var r=n.end,i=n.trimStart(t);if(n.end!==r&&(n===this.lastChunk&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),i)return this;n=n.next}while(n);return this}};var ue={Program:[\"body\"],Literal:[]};function toJSON(e){var t={};return Object.keys(e).forEach(n=>{\"parent\"!==n&&\"program\"!==n&&\"keys\"!==n&&\"__wrapped\"!==n&&(Array.isArray(e[n])?t[n]=e[n].map(toJSON):e[n]&&e[n].toJSON?t[n]=e[n].toJSON():t[n]=e[n])}),t}class ce{constructor(e,t){e.parent=t,e.program=t.program||t,e.depth=t.depth+1,e.keys=ue[e.type],e.indentation=void 0;for(var n=0,r=ue[e.type];n<r.length;n+=1){wrap(e[r[n]],e)}e.program.magicString.addSourcemapLocation(e.start),e.program.magicString.addSourcemapLocation(e.end)}ancestor(e){let t=this;for(;e--;)if(!(t=t.parent))return null;return t}contains(e){for(;e;){if(e===this)return!0;e=e.parent}return!1}findLexicalBoundary(){return this.parent.findLexicalBoundary()}findNearest(e){return\"string\"==typeof e&&(e=new RegExp(`^${e}$`)),e.test(this.type)?this:this.parent.findNearest(e)}unparenthesizedParent(){let e=this.parent;for(;e&&\"ParenthesizedExpression\"===e.type;)e=e.parent;return e}unparenthesize(){let e=this;for(;\"ParenthesizedExpression\"===e.type;)e=e.expression;return e}findScope(e){return this.parent.findScope(e)}getIndentation(){return this.parent.getIndentation()}initialise(e){for(var t=0,n=this.keys;t<n.length;t+=1){var r=n[t];const i=this[r];Array.isArray(i)?i.forEach(t=>t&&t.initialise(e)):i&&\"object\"==typeof i&&i.initialise(e)}}toJSON(){return toJSON(this)}toString(){return this.program.magicString.original.slice(this.start,this.end)}transpile(e,t){for(var n=0,r=this.keys;n<r.length;n+=1){const i=this[r[n]];Array.isArray(i)?i.forEach(n=>n&&n.transpile(e,t)):i&&\"object\"==typeof i&&i.transpile(e,t)}}}function isArguments(e){return\"Identifier\"===e.type&&\"arguments\"===e.name}function spread(e,t,n,r,i){let a=t.length,o=-1;for(;a--;){const n=t[a];n&&\"SpreadElement\"===n.type&&(isArguments(n.argument)&&e.overwrite(n.argument.start,n.argument.end,r),o=a)}if(-1===o)return!1;if(i){for(a=0;a<t.length;a+=1){let n=t[a];\"SpreadElement\"===n.type?e.remove(n.start,n.argument.start):(e.prependRight(n.start,\"[\"),e.prependRight(n.end,\"]\"))}return!0}let s=t[o];const l=t[o-1];for(l?e.overwrite(l.end,s.start,\" ].concat( \"):(e.remove(n,s.start),e.overwrite(s.end,t[1].start,\".concat( \")),a=o;a<t.length;a+=1)(s=t[a])&&(\"SpreadElement\"===s.type?e.remove(s.start,s.argument.start):(e.appendLeft(s.start,\"[\"),e.appendLeft(s.end,\"]\")));return!0}function removeTrailingComma(e,t){for(;\")\"!==e.original[t];){if(\",\"===e.original[t])return void e.remove(t,t+1);t+=1}}function repeat(e,t){let n=\"\";for(;t--;)n+=e;return n}function getSnippet(e,t,n){void 0===n&&(n=1);const r=Math.max(t.line-5,0),i=t.line,a=String(i).length,o=e.split(\"\\n\").slice(r,i),s=o[o.length-1].slice(0,t.column).replace(/\\t/g,\"  \").length;let l=o.map((e,t)=>`${function pad(e,t){let n=String(e);return n+repeat(\" \",t-n.length)}(t+r+1,a)} : ${e.replace(/\\t/g,\"  \")}`).join(\"\\n\");return l+=\"\\n\"+repeat(\" \",a+3+s)+repeat(\"^\",n)}class pe extends Error{constructor(e,t){if(super(e),this.name=\"CompileError\",!t)return;const n=t.program.magicString.original,r=function locate(e,t){var n,r=e.split(\"\\n\"),i=r.length,a=0;for(n=0;n<i;n+=1){var o=a+r[n].length+1;if(o>t)return{line:n+1,column:t-a,char:n};a=o}throw new Error(\"Could not determine location of character\")}(n,t.start);this.message=e+` (${r.line}:${r.column})`,this.stack=(new Error).stack.replace(new RegExp(`.+new ${this.name}.+\\\\n`,\"m\"),\"\"),this.loc=r,this.snippet=getSnippet(n,r,t.end-t.start)}toString(){return`${this.name}: ${this.message}\\n${this.snippet}`}}const he=/(?:For(?:In|Of)?|While)Statement/;function findIndex(e,t){for(let n=0;n<e.length;n+=1)if(t(e[n],n))return n;return-1}let fe=Object.create(null);\"do if in for let new try var case else enum eval null this true void with await break catch class const false super throw while yield delete export import public return static switch typeof default extends finally package private continue debugger function arguments interface protected implements instanceof\".split(\" \").forEach(e=>fe[e]=!0);class de extends ce{findScope(e){return e||!this.createdScope?this.parent.findScope(e):this.body.scope}initialise(e){if(this.body.createScope(),this.createdScope=!0,this.reassigned=Object.create(null),this.aliases=Object.create(null),super.initialise(e),e.letConst){const e=Object.keys(this.body.scope.declarations);let t=e.length;for(;t--;){const n=e[t],r=this.body.scope.declarations[n];let i=r.instances.length;for(;i--;){const e=r.instances[i].findNearest(/Function/);if(e&&e.depth>this.depth){this.shouldRewriteAsFunction=!0;break}}if(this.shouldRewriteAsFunction)break}}}transpile(e,t){const n=\"ForOfStatement\"!=this.type&&(\"BlockStatement\"!==this.body.type||\"BlockStatement\"===this.body.type&&this.body.synthetic);if(this.shouldRewriteAsFunction){const t=this.getIndentation(),n=t+e.getIndentString(),r=this.args?` ${this.args.join(\", \")} `:\"\",i=this.params?` ${this.params.join(\", \")} `:\"\",a=this.findScope(!0),o=a.createIdentifier(\"loop\"),s=`var ${o} = function (${i}) `+(this.body.synthetic?`{\\n${t}${e.getIndentString()}`:\"\"),l=(this.body.synthetic?`\\n${t}}`:\"\")+`;\\n\\n${t}`;if(e.prependRight(this.body.start,s),e.appendLeft(this.body.end,l),e.move(this.start,this.body.start,this.body.end),this.canBreak||this.canReturn){const i=a.createIdentifier(\"returned\");let s=`{\\n${n}var ${i} = ${o}(${r});\\n`;this.canBreak&&(s+=`\\n${n}if ( ${i} === 'break' ) break;`),this.canReturn&&(s+=`\\n${n}if ( ${i} ) return ${i}.v;`),s+=`\\n${t}}`,e.prependRight(this.body.end,s)}else{const i=`${o}(${r});`;\"DoWhileStatement\"===this.type?e.overwrite(this.start,this.body.start,`do {\\n${n}${i}\\n${t}}`):e.prependRight(this.body.end,i)}}else n&&(e.appendLeft(this.body.start,\"{ \"),e.prependRight(this.body.end,\" }\"));super.transpile(e,t)}}function extractNames(e){const t=[];return me[e.type](t,e),t}const me={Identifier(e,t){e.push(t)},ObjectPattern(e,t){for(var n=0,r=t.properties;n<r.length;n+=1){const t=r[n];me[t.type](e,t)}},Property(e,t){me[t.value.type](e,t.value)},ArrayPattern(e,t){for(var n=0,r=t.elements;n<r.length;n+=1){const t=r[n];t&&me[t.type](e,t)}},RestElement(e,t){me[t.argument.type](e,t.argument)},AssignmentPattern(e,t){me[t.left.type](e,t.left)}};const ge={Identifier:destructureIdentifier,AssignmentPattern:function destructureAssignmentPattern(e,t,n,r,i,a){const o=\"Identifier\"===n.left.type,s=o?n.left.name:r;i||a.push((t,r,i)=>{e.prependRight(n.left.end,`${r}if ( ${s} === void 0 ) ${s}`),e.move(n.left.end,n.right.end,t),e.appendLeft(n.right.end,i)});o||destructure(e,t,n.left,r,i,a)},ArrayPattern:function destructureArrayPattern(e,t,n,r,i,a){let o=n.start;n.elements.forEach((n,s)=>{n&&(\"RestElement\"===n.type?handleProperty(e,t,o,n.argument,`${r}.slice(${s})`,i,a):handleProperty(e,t,o,n,`${r}[${s}]`,i,a),o=n.end)}),e.remove(o,n.end)},ObjectPattern:destructureObjectPattern};function destructure(e,t,n,r,i,a){ge[n.type](e,t,n,r,i,a)}function destructureIdentifier(e,t,n,r,i,a){a.push((t,a,o)=>{e.prependRight(n.start,i?a:`${a}var `),e.appendLeft(n.end,` = ${r}${o}`),e.move(n.start,n.end,t)})}function destructureObjectPattern(e,t,n,r,i,a){let o=n.start;const s=[];n.properties.forEach(n=>{let l,u;if(\"Property\"===n.type){const t=n.computed||\"Identifier\"!==n.key.type,i=t?e.slice(n.key.start,n.key.end):n.key.name;l=t?`${r}[${i}]`:`${r}.${i}`,u=n.value,s.push(t?i:'\"'+i+'\"')}else{if(\"RestElement\"!==n.type)throw new pe(this,`Unexpected node of type ${n.type} in object pattern`);{u=n.argument,l=t.createIdentifier(\"rest\");const i=t.createIdentifier(\"n\");a.push((t,a,u)=>{e.overwrite(n.start,o=n.argument.start,`${a}var ${l} = {}; for (var ${i} in ${r}) if([${s.join(\", \")}].indexOf(${i}) === -1) ${l}[${i}] = ${r}[${i}]${u}`),e.move(n.start,o,t)})}}handleProperty(e,t,o,u,l,i,a),o=n.end}),e.remove(o,n.end)}function handleProperty(e,t,n,r,i,a,o){switch(r.type){case\"Identifier\":e.remove(n,r.start),destructureIdentifier(e,0,r,i,a,o);break;case\"AssignmentPattern\":{let s;const l=\"Identifier\"===r.left.type;if(l){s=r.left.name;const e=t.findDeclaration(s);e&&(s=e.name)}else s=t.createIdentifier(i);o.push((t,n,o)=>{a?(e.prependRight(r.right.start,`${s} = ${i} === undefined ? `),e.appendLeft(r.right.end,` : ${i}`)):(e.prependRight(r.right.start,`${n}var ${s} = ${i}; if ( ${s} === void 0 ) ${s} = `),e.appendLeft(r.right.end,o)),e.move(r.right.start,r.right.end,t)}),l?e.remove(n,r.right.start):(e.remove(n,r.left.start),e.remove(r.left.end,r.right.start),handleProperty(e,t,n,r.left,s,a,o));break}case\"ObjectPattern\":{e.remove(n,n=r.start);let s=i;r.properties.length>1&&(s=t.createIdentifier(i),o.push((t,a,o)=>{e.prependRight(r.start,`${a}var ${s} = `),e.overwrite(r.start,n=r.start+1,i),e.appendLeft(n,o),e.overwrite(r.start,n=r.start+1,`${a}var ${s} = ${i}${o}`),e.move(r.start,n,t)})),destructureObjectPattern(e,t,r,s,a,o);break}case\"ArrayPattern\":if(e.remove(n,n=r.start),r.elements.filter(Boolean).length>1){const s=t.createIdentifier(i);o.push((t,a,o)=>{e.prependRight(r.start,`${a}var ${s} = `),e.overwrite(r.start,n=r.start+1,i,{contentOnly:!0}),e.appendLeft(n,o),e.move(r.start,n,t)}),r.elements.forEach((r,i)=>{r&&(\"RestElement\"===r.type?handleProperty(e,t,n,r.argument,`${s}.slice(${i})`,a,o):handleProperty(e,t,n,r,`${s}[${i}]`,a,o),n=r.end)})}else{const s=findIndex(r.elements,Boolean),l=r.elements[s];\"RestElement\"===l.type?handleProperty(e,t,n,l.argument,`${i}.slice(${s})`,a,o):handleProperty(e,t,n,l,`${i}[${s}]`,a,o),n=l.end}e.remove(n,r.end);break;default:throw new Error(`Unexpected node type in destructuring (${r.type})`)}}const ye=e=>(ve=e,/-/.test(ve)?`'${e}'`:e);var ve;const be=e=>e?\"\":\"true\";var _e=\"undefined\"!=typeof window?window:void 0!==n?n:\"undefined\"!=typeof self?self:{};function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var xe=createCommonjsModule(function(e,t){(function(){var n={function:!0,object:!0},r=n[typeof window]&&window||this,i=n.object&&t,a=n.object&&e&&!e.nodeType&&e,o=i&&a&&\"object\"==typeof _e&&_e;!o||o.global!==o&&o.window!==o&&o.self!==o||(r=o);var s=Object.prototype.hasOwnProperty,l=String.fromCharCode,u=Math.floor;function fromCodePoint(){var e,t,n=[],r=-1,i=arguments.length;if(!i)return\"\";for(var a=\"\";++r<i;){var o=Number(arguments[r]);if(!isFinite(o)||o<0||o>1114111||u(o)!=o)throw RangeError(\"Invalid code point: \"+o);o<=65535?n.push(o):(e=55296+((o-=65536)>>10),t=o%1024+56320,n.push(e,t)),(r+1==i||n.length>16384)&&(a+=l.apply(null,n),n.length=0)}return a}var c={};function assertType(e,t){if(-1==t.indexOf(\"|\")){if(e==t)return;throw Error(\"Invalid node type: \"+e+\"; expected type: \"+t)}if(!(t=s.call(c,t)?c[t]:c[t]=RegExp(\"^(?:\"+t+\")$\")).test(e))throw Error(\"Invalid node type: \"+e+\"; expected types: \"+t)}function generate(e){var t=e.type;if(s.call(p,t))return p[t](e);throw Error(\"Invalid node type: \"+t)}function generateClassAtom(e){return assertType(e.type,\"anchor|characterClassEscape|characterClassRange|dot|value\"),generate(e)}var p={alternative:function generateAlternative(e){assertType(e.type,\"alternative\");for(var t=e.body,n=-1,r=t.length,i=\"\";++n<r;)i+=(a=t[n],assertType(a.type,\"anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|unicodePropertyEscape|value\"),generate(a));var a;return i},anchor:function generateAnchor(e){switch(assertType(e.type,\"anchor\"),e.kind){case\"start\":return\"^\";case\"end\":return\"$\";case\"boundary\":return\"\\\\b\";case\"not-boundary\":return\"\\\\B\";default:throw Error(\"Invalid assertion\")}},characterClass:function generateCharacterClass(e){assertType(e.type,\"characterClass\");var t=e.body,n=-1,r=t.length,i=\"\";for(e.negative&&(i+=\"^\");++n<r;)i+=generateClassAtom(t[n]);return\"[\"+i+\"]\"},characterClassEscape:function generateCharacterClassEscape(e){return assertType(e.type,\"characterClassEscape\"),\"\\\\\"+e.value},characterClassRange:function generateCharacterClassRange(e){assertType(e.type,\"characterClassRange\");var t=e.min,n=e.max;if(\"characterClassRange\"==t.type||\"characterClassRange\"==n.type)throw Error(\"Invalid character class range\");return generateClassAtom(t)+\"-\"+generateClassAtom(n)},unicodePropertyEscape:function generateUnicodePropertyEscape(e){return assertType(e.type,\"unicodePropertyEscape\"),\"\\\\\"+(e.negative?\"P\":\"p\")+\"{\"+e.value+\"}\"},disjunction:function generateDisjunction(e){assertType(e.type,\"disjunction\");for(var t=e.body,n=-1,r=t.length,i=\"\";++n<r;)0!=n&&(i+=\"|\"),i+=generate(t[n]);return i},dot:function generateDot(e){return assertType(e.type,\"dot\"),\".\"},group:function generateGroup(e){assertType(e.type,\"group\");var t=\"\";switch(e.behavior){case\"normal\":break;case\"ignore\":t+=\"?:\";break;case\"lookahead\":t+=\"?=\";break;case\"negativeLookahead\":t+=\"?!\";break;default:throw Error(\"Invalid behaviour: \"+e.behaviour)}for(var n=e.body,r=-1,i=n.length;++r<i;)t+=generate(n[r]);return\"(\"+t+\")\"},quantifier:function generateQuantifier(e){assertType(e.type,\"quantifier\");var t=\"\",n=e.min,r=e.max;return t=null==r?0==n?\"*\":1==n?\"+\":\"{\"+n+\",}\":n==r?\"{\"+n+\"}\":0==n&&1==r?\"?\":\"{\"+n+\",\"+r+\"}\",e.greedy||(t+=\"?\"),function generateAtom(e){return assertType(e.type,\"anchor|characterClass|characterClassEscape|dot|group|reference|value\"),generate(e)}(e.body[0])+t},reference:function generateReference(e){return assertType(e.type,\"reference\"),\"\\\\\"+e.matchIndex},value:function generateValue(e){assertType(e.type,\"value\");var t=e.kind,n=e.codePoint;switch(t){case\"controlLetter\":return\"\\\\c\"+fromCodePoint(n+64);case\"hexadecimalEscape\":return\"\\\\x\"+(\"00\"+n.toString(16).toUpperCase()).slice(-2);case\"identifier\":return\"\\\\\"+fromCodePoint(n);case\"null\":return\"\\\\\"+n;case\"octal\":return\"\\\\\"+n.toString(8);case\"singleEscape\":switch(n){case 8:return\"\\\\b\";case 9:return\"\\\\t\";case 10:return\"\\\\n\";case 11:return\"\\\\v\";case 12:return\"\\\\f\";case 13:return\"\\\\r\";default:throw Error(\"Invalid codepoint: \"+n)}case\"symbol\":return fromCodePoint(n);case\"unicodeEscape\":return\"\\\\u\"+(\"0000\"+n.toString(16).toUpperCase()).slice(-4);case\"unicodeCodePointEscape\":return\"\\\\u{\"+n.toString(16).toUpperCase()+\"}\";default:throw Error(\"Unsupported node kind: \"+t)}}};i&&a?i.generate=generate:r.regjsgen={generate:generate}}).call(_e)}),we=createCommonjsModule(function(e){!function(){var t={parse:function parse(e,t,n){n||(n={});function addRaw(t){return t.raw=e.substring(t.range[0],t.range[1]),t}function updateRawStart(e,t){return e.range[0]=t,addRaw(e)}function createAnchor(e,t){return addRaw({type:\"anchor\",kind:e,range:[s-t,s]})}function createValue(e,t,n,r){return addRaw({type:\"value\",kind:e,codePoint:t,range:[n,r]})}function createEscaped(e,t,n,r){return r=r||0,createValue(e,t,s-(n.length+r),s)}function createCharacter(e){var t=e[0],n=t.charCodeAt(0);if(o){var r;if(1===t.length&&n>=55296&&n<=56319&&(r=lookahead().charCodeAt(0))>=56320&&r<=57343)return createValue(\"symbol\",1024*(n-55296)+r-56320+65536,++s-2,s)}return createValue(\"symbol\",n,s-1,s)}function createQuantifier(e,t,n,r){return null==r&&(n=s-1,r=s),addRaw({type:\"quantifier\",min:e,max:t,greedy:!0,body:null,range:[n,r]})}function createCharacterClass(e,t,n,r){return addRaw({type:\"characterClass\",body:e,negative:t,range:[n,r]})}function createClassRange(e,t,n,r){return e.codePoint>t.codePoint&&bail(\"invalid range in character class\",e.raw+\"-\"+t.raw,n,r),addRaw({type:\"characterClassRange\",min:e,max:t,range:[n,r]})}function flattenBody(e){return\"alternative\"===e.type?e.body:[e]}function incr(t){t=t||1;var n=e.substring(s,s+t);return s+=t||1,n}function skip(e){match(e)||bail(\"character\",e)}function match(t){if(e.indexOf(t,s)===s)return incr(t.length)}function lookahead(){return e[s]}function current(t){return e.indexOf(t,s)===s}function next(t){return e[s+1]===t}function matchReg(t){var n=e.substring(s).match(t);return n&&(n.range=[],n.range[0]=s,incr(n[0].length),n.range[1]=s),n}function parseDisjunction(){var e=[],t=s;for(e.push(parseAlternative());match(\"|\");)e.push(parseAlternative());return 1===e.length?e[0]:function createDisjunction(e,t,n){return addRaw({type:\"disjunction\",body:e,range:[t,n]})}(e,t,s)}function parseAlternative(){for(var e,t=[],n=s;e=parseTerm();)t.push(e);return 1===t.length?t[0]:function createAlternative(e,t,n){return addRaw({type:\"alternative\",body:e,range:[t,n]})}(t,n,s)}function parseTerm(){if(s>=e.length||current(\"|\")||current(\")\"))return null;var t=function parseAnchor(){return match(\"^\")?createAnchor(\"start\",1):match(\"$\")?createAnchor(\"end\",1):match(\"\\\\b\")?createAnchor(\"boundary\",2):match(\"\\\\B\")?createAnchor(\"not-boundary\",2):parseGroup(\"(?=\",\"lookahead\",\"(?!\",\"negativeLookahead\")}();if(t)return t;var n=function parseAtom(){var e;return(e=matchReg(/^[^^$\\\\.*+?(){[|]/))?createCharacter(e):match(\".\")?function createDot(){return addRaw({type:\"dot\",range:[s-1,s]})}():match(\"\\\\\")?((e=parseAtomEscape())||bail(\"atomEscape\"),e):(e=function parseCharacterClass(){var e,t=s;return(e=matchReg(/^\\[\\^/))?(e=parseClassRanges(),skip(\"]\"),createCharacterClass(e,!0,t,s)):match(\"[\")?(e=parseClassRanges(),skip(\"]\"),createCharacterClass(e,!1,t,s)):null}())?e:parseGroup(\"(?:\",\"ignore\",\"(\",\"normal\")}();n||bail(\"Expected atom\");var r=function parseQuantifier(){var e,t,n,r,i=s;return match(\"*\")?t=createQuantifier(0):match(\"+\")?t=createQuantifier(1):match(\"?\")?t=createQuantifier(0,1):(e=matchReg(/^\\{([0-9]+)\\}/))?(n=parseInt(e[1],10),t=createQuantifier(n,n,e.range[0],e.range[1])):(e=matchReg(/^\\{([0-9]+),\\}/))?(n=parseInt(e[1],10),t=createQuantifier(n,void 0,e.range[0],e.range[1])):(e=matchReg(/^\\{([0-9]+),([0-9]+)\\}/))&&(n=parseInt(e[1],10),r=parseInt(e[2],10),n>r&&bail(\"numbers out of order in {} quantifier\",\"\",i,s),t=createQuantifier(n,r,e.range[0],e.range[1])),t&&match(\"?\")&&(t.greedy=!1,t.range[1]+=1),t}()||!1;return r?(r.body=flattenBody(n),updateRawStart(r,n.range[0]),r):n}function parseGroup(e,t,n,r){var o=null,l=s;if(match(e))o=t;else{if(!match(n))return!1;o=r}var u=parseDisjunction();u||bail(\"Expected disjunction\"),skip(\")\");var c=function createGroup(e,t,n,r){return addRaw({type:\"group\",behavior:e,body:t,range:[n,r]})}(o,flattenBody(u),l,s);return\"normal\"==o&&a&&i++,c}function parseUnicodeSurrogatePairEscape(e){if(o){var t,n;if(\"unicodeEscape\"==e.kind&&(t=e.codePoint)>=55296&&t<=56319&&current(\"\\\\\")&&next(\"u\")){var r=s;s++;var i=parseClassEscape();\"unicodeEscape\"==i.kind&&(n=i.codePoint)>=56320&&n<=57343?(e.range[1]=i.range[1],e.codePoint=1024*(t-55296)+n-56320+65536,e.type=\"value\",e.kind=\"unicodeCodePointEscape\",addRaw(e)):s=r}}return e}function parseClassEscape(){return parseAtomEscape(!0)}function parseAtomEscape(e){var t,a=s;if(t=function parseDecimalEscape(){var e,t;if(e=matchReg(/^(?!0)\\d+/)){t=e[0];var n=parseInt(e[0],10);return n<=i?function createReference(e){return addRaw({type:\"reference\",matchIndex:parseInt(e,10),range:[s-1-e.length,s]})}(e[0]):(r.push(n),incr(-e[0].length),(e=matchReg(/^[0-7]{1,3}/))?createEscaped(\"octal\",parseInt(e[0],8),e[0],1):updateRawStart(e=createCharacter(matchReg(/^[89]/)),e.range[0]-1))}return(e=matchReg(/^[0-7]{1,3}/))?(t=e[0],/^0{1,3}$/.test(t)?createEscaped(\"null\",0,\"0\",t.length+1):createEscaped(\"octal\",parseInt(t,8),t,1)):!!(e=matchReg(/^[dDsSwW]/))&&function createCharacterClassEscape(e){return addRaw({type:\"characterClassEscape\",value:e,range:[s-2,s]})}(e[0])}())return t;if(e){if(match(\"b\"))return createEscaped(\"singleEscape\",8,\"\\\\b\");match(\"B\")&&bail(\"\\\\B not possible inside of CharacterClass\",\"\",a)}return t=function parseCharacterEscape(){var e;if(e=matchReg(/^[fnrtv]/)){var t=0;switch(e[0]){case\"t\":t=9;break;case\"n\":t=10;break;case\"v\":t=11;break;case\"f\":t=12;break;case\"r\":t=13}return createEscaped(\"singleEscape\",t,\"\\\\\"+e[0])}return(e=matchReg(/^c([a-zA-Z])/))?createEscaped(\"controlLetter\",e[1].charCodeAt(0)%32,e[1],2):(e=matchReg(/^x([0-9a-fA-F]{2})/))?createEscaped(\"hexadecimalEscape\",parseInt(e[1],16),e[1],2):(e=matchReg(/^u([0-9a-fA-F]{4})/))?parseUnicodeSurrogatePairEscape(createEscaped(\"unicodeEscape\",parseInt(e[1],16),e[1],2)):o&&(e=matchReg(/^u\\{([0-9a-fA-F]+)\\}/))?createEscaped(\"unicodeCodePointEscape\",parseInt(e[1],16),e[1],4):n.unicodePropertyEscape&&o&&(e=matchReg(/^([pP])\\{([^\\}]+)\\}/))?addRaw({type:\"unicodePropertyEscape\",negative:\"P\"===e[1],value:e[2],range:[e.range[0]-1,e.range[1]],raw:e[0]}):function parseIdentityEscape(){var e;return function isIdentifierPart(e){var t=new RegExp(\"[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ﬀ-ﬆﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ０-９Ａ-Ｚ＿ａ-ｚｦ-ﾾￂ-ￇￊ-ￏￒ-ￗￚ-ￜ]\");return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&t.test(String.fromCharCode(e))}(lookahead())?match(\"‌\")?createEscaped(\"identifier\",8204,\"‌\"):match(\"‍\")?createEscaped(\"identifier\",8205,\"‍\"):null:createEscaped(\"identifier\",(e=incr()).charCodeAt(0),e,1)}()}()}function parseClassRanges(){var e;return current(\"]\")?[]:((e=function parseNonemptyClassRanges(){var e=parseClassAtom();return e||bail(\"classAtom\"),current(\"]\")?[e]:parseHelperClassRanges(e)}())||bail(\"nonEmptyClassRanges\"),e)}function parseHelperClassRanges(e){var t,n,r;if(current(\"-\")&&!next(\"]\")){skip(\"-\"),(r=parseClassAtom())||bail(\"classAtom\"),n=s;var i=parseClassRanges();return i||bail(\"classRanges\"),t=e.range[0],\"empty\"===i.type?[createClassRange(e,r,t,n)]:[createClassRange(e,r,t,n)].concat(i)}return(r=function parseNonemptyClassRangesNoDash(){var e=parseClassAtom();return e||bail(\"classAtom\"),current(\"]\")?e:parseHelperClassRanges(e)}())||bail(\"nonEmptyClassRangesNoDash\"),[e].concat(r)}function parseClassAtom(){return match(\"-\")?createCharacter(\"-\"):function parseClassAtomNoDash(){var e;return(e=matchReg(/^[^\\\\\\]-]/))?createCharacter(e[0]):match(\"\\\\\")?((e=parseClassEscape())||bail(\"classEscape\"),parseUnicodeSurrogatePairEscape(e)):void 0}()}function bail(t,n,r,i){r=null==r?s:r,i=null==i?r:i;var a=Math.max(0,r-10),o=Math.min(i+10,e.length),l=\"    \"+e.substring(a,o),u=\"    \"+new Array(r-a+1).join(\" \")+\"^\";throw SyntaxError(t+\" at position \"+r+(n?\": \"+n:\"\")+\"\\n\"+l+\"\\n\"+u)}var r=[],i=0,a=!0,o=-1!==(t||\"\").indexOf(\"u\"),s=0;\"\"===(e=String(e))&&(e=\"(?:)\");var l=parseDisjunction();l.range[1]!==e.length&&bail(\"Could not parse entire input - got stuck\",\"\",l.range[1]);for(var u=0;u<r.length;u++)if(r[u]<=i)return s=0,a=!1,parseDisjunction();return l}};e.exports?e.exports=t:window.regjsparser=t}()}),ke=createCommonjsModule(function(e,t){!function(n){var r=t,i=e&&e.exports==r&&e,a=\"object\"==typeof _e&&_e;a.global!==a&&a.window!==a||(n=a);var o=\"A range’s `stop` value must be greater than or equal to the `start` value.\",s=\"Invalid code point value. Code points range from U+000000 to U+10FFFF.\",l=/\\\\x00([^0123456789]|$)/g,u={},c=u.hasOwnProperty,p=function(e,t){for(var n=-1,r=e.length;++n<r;)t(e[n],n)},h=u.toString,f=function(e){return\"[object Array]\"==h.call(e)},d=function(e){return\"number\"==typeof e||\"[object Number]\"==h.call(e)},m=function(e,t){var n=String(e);return n.length<t?(\"0000\"+n).slice(-t):n},g=function(e){return Number(e).toString(16).toUpperCase()},y=[].slice,v=function(e,t){for(var n,r,i=0,a=e.length;i<a;){if(n=e[i],r=e[i+1],t>=n&&t<r)return t==n?r==n+1?(e.splice(i,2),e):(e[i]=t+1,e):t==r-1?(e[i+1]=t,e):(e.splice(i,2,n,t,t+1,r),e);i+=2}return e},b=function(e,t,n){if(n<t)throw Error(o);for(var r,i,a=0;a<e.length;){if(r=e[a],i=e[a+1]-1,r>n)return e;if(t<=r&&n>=i)e.splice(a,2);else{if(t>=r&&n<i)return t==r?(e[a]=n+1,e[a+1]=i+1,e):(e.splice(a,2,r,t,n+1,i+1),e);if(t>=r&&t<=i)e[a+1]=t;else if(n>=r&&n<=i)return e[a]=n+1,e;a+=2}}return e},_=function(e,t){var n,r,i=0,a=null,o=e.length;if(t<0||t>1114111)throw RangeError(s);for(;i<o;){if(n=e[i],r=e[i+1],t>=n&&t<r)return e;if(t==n-1)return e[i]=t,e;if(n>t)return e.splice(null!=a?a+2:0,0,t,t+1),e;if(t==r)return t+1==e[i+2]?(e.splice(i,4,n,e[i+3]),e):(e[i+1]=t+1,e);a=i,i+=2}return e.push(t,t+1),e},x=function(e,t){for(var n,r,i=0,a=e.slice(),o=t.length;i<o;)a=(n=t[i])==(r=t[i+1]-1)?_(a,n):w(a,n,r),i+=2;return a},w=function(e,t,n){if(n<t)throw Error(o);if(t<0||t>1114111||n<0||n>1114111)throw RangeError(s);for(var r,i,a=0,l=!1,u=e.length;a<u;){if(r=e[a],i=e[a+1],l){if(r==n+1)return e.splice(a-1,2),e;if(r>n)return e;r>=t&&r<=n&&(i>t&&i-1<=n?(e.splice(a,2),a-=2):(e.splice(a-1,2),a-=2))}else{if(r==n+1)return e[a]=t,e;if(r>n)return e.splice(a,0,t,n+1),e;if(t>=r&&t<i&&n+1<=i)return e;t>=r&&t<i||i==t?(e[a+1]=n+1,l=!0):t<=r&&n+1>=i&&(e[a]=t,e[a+1]=n+1,l=!0)}a+=2}return l||e.push(t,n+1),e},k=function(e,t){var n=0,r=e.length,i=e[n],a=e[r-1];if(r>=2&&(t<i||t>a))return!1;for(;n<r;){if(i=e[n],a=e[n+1],t>=i&&t<a)return!0;n+=2}return!1},E=function(e){return!e.length},C=function(e){return 2==e.length&&e[0]+1==e[1]},S=function(e){for(var t,n,r=0,i=[],a=e.length;r<a;){for(t=e[r],n=e[r+1];t<n;)i.push(t),++t;r+=2}return i},R=Math.floor,P=function(e){return parseInt(R((e-65536)/1024)+55296,10)},O=function(e){return parseInt((e-65536)%1024+56320,10)},T=String.fromCharCode,j=function(e){return 9==e?\"\\\\t\":10==e?\"\\\\n\":12==e?\"\\\\f\":13==e?\"\\\\r\":92==e?\"\\\\\\\\\":36==e||e>=40&&e<=43||e>=45&&e<=47||63==e||e>=91&&e<=94||e>=123&&e<=125?\"\\\\\"+T(e):e>=32&&e<=126?T(e):e<=255?\"\\\\x\"+m(g(e),2):\"\\\\u\"+m(g(e),4)},A=function(e){return e<=65535?j(e):\"\\\\u{\"+e.toString(16).toUpperCase()+\"}\"},I=function(e){var t=e.length,n=e.charCodeAt(0);return n>=55296&&n<=56319&&t>1?1024*(n-55296)+e.charCodeAt(1)-56320+65536:n},L=function(e){var t,n,r=\"\",i=0,a=e.length;if(C(e))return j(e[0]);for(;i<a;)r+=(t=e[i])==(n=e[i+1]-1)?j(t):t+1==n?j(t)+j(n):j(t)+\"-\"+j(n),i+=2;return\"[\"+r+\"]\"},N=function(e){if(1==e.length)return e;for(var t=-1,n=-1;++t<e.length;){var r=e[t],i=r[1],a=i[0],o=i[1];for(n=t;++n<e.length;){var s=e[n],l=s[1],u=l[0],c=l[1];a==u&&o==c&&(C(s[0])?r[0]=_(r[0],s[0][0]):r[0]=w(r[0],s[0][0],s[0][1]-1),e.splice(n,1),--n)}}return e},M=function(e){if(!e.length)return[];for(var t,n,r,i,a,o,s=0,l=[],u=e.length;s<u;){t=e[s],n=e[s+1]-1,r=P(t),i=O(t),a=P(n);var c=57343==(o=O(n)),p=!1;r==a||56320==i&&c?(l.push([[r,a+1],[i,o+1]]),p=!0):l.push([[r,r+1],[i,57344]]),!p&&r+1<a&&(c?(l.push([[r+1,a+1],[56320,o+1]]),p=!0):l.push([[r+1,a],[56320,57344]])),p||l.push([[a,a+1],[56320,o+1]]),s+=2}return function(e){for(var t,n,r,i,a,o,s=[],l=[],u=!1,c=-1,p=e.length;++c<p;)if(t=e[c],n=e[c+1]){for(r=t[0],i=t[1],a=n[0],o=n[1],l=i;a&&r[0]==a[0]&&r[1]==a[1];)l=C(o)?_(l,o[0]):w(l,o[0],o[1]-1),r=(t=e[++c])[0],i=t[1],a=(n=e[c+1])&&n[0],o=n&&n[1],u=!0;s.push([r,u?l:i]),u=!1}else s.push(t);return N(s)}(l)},D=function(e,t,n){if(n)return function(e){var t,n,r=\"\",i=0,a=e.length;if(C(e))return A(e[0]);for(;i<a;)r+=(t=e[i])==(n=e[i+1]-1)?A(t):t+1==n?A(t)+A(n):A(t)+\"-\"+A(n),i+=2;return\"[\"+r+\"]\"}(e);var r=[],i=function(e){for(var t,n,r=[],i=[],a=[],o=[],s=0,l=e.length;s<l;)t=e[s],n=e[s+1]-1,t<55296?(n<55296&&a.push(t,n+1),n>=55296&&n<=56319&&(a.push(t,55296),r.push(55296,n+1)),n>=56320&&n<=57343&&(a.push(t,55296),r.push(55296,56320),i.push(56320,n+1)),n>57343&&(a.push(t,55296),r.push(55296,56320),i.push(56320,57344),n<=65535?a.push(57344,n+1):(a.push(57344,65536),o.push(65536,n+1)))):t>=55296&&t<=56319?(n>=55296&&n<=56319&&r.push(t,n+1),n>=56320&&n<=57343&&(r.push(t,56320),i.push(56320,n+1)),n>57343&&(r.push(t,56320),i.push(56320,57344),n<=65535?a.push(57344,n+1):(a.push(57344,65536),o.push(65536,n+1)))):t>=56320&&t<=57343?(n>=56320&&n<=57343&&i.push(t,n+1),n>57343&&(i.push(t,57344),n<=65535?a.push(57344,n+1):(a.push(57344,65536),o.push(65536,n+1)))):t>57343&&t<=65535?n<=65535?a.push(t,n+1):(a.push(t,65536),o.push(65536,n+1)):o.push(t,n+1),s+=2;return{loneHighSurrogates:r,loneLowSurrogates:i,bmp:a,astral:o}}(e),a=i.loneHighSurrogates,o=i.loneLowSurrogates,s=i.bmp,l=i.astral,u=!E(a),c=!E(o),h=M(l);return t&&(s=x(s,a),u=!1,s=x(s,o),c=!1),E(s)||r.push(L(s)),h.length&&r.push(function(e){var t=[];return p(e,function(e){var n=e[0],r=e[1];t.push(L(n)+L(r))}),t.join(\"|\")}(h)),u&&r.push(L(a)+\"(?![\\\\uDC00-\\\\uDFFF])\"),c&&r.push(\"(?:[^\\\\uD800-\\\\uDBFF]|^)\"+L(o)),r.join(\"|\")},B=function(e){return arguments.length>1&&(e=y.call(arguments)),this instanceof B?(this.data=[],e?this.add(e):this):(new B).add(e)};B.version=\"1.3.3\";var U=B.prototype;!function(e,t){var n;for(n in t)c.call(t,n)&&(e[n]=t[n])}(U,{add:function(e){var t=this;return null==e?t:e instanceof B?(t.data=x(t.data,e.data),t):(arguments.length>1&&(e=y.call(arguments)),f(e)?(p(e,function(e){t.add(e)}),t):(t.data=_(t.data,d(e)?e:I(e)),t))},remove:function(e){var t=this;return null==e?t:e instanceof B?(t.data=function(e,t){for(var n,r,i=0,a=e.slice(),o=t.length;i<o;)a=(n=t[i])==(r=t[i+1]-1)?v(a,n):b(a,n,r),i+=2;return a}(t.data,e.data),t):(arguments.length>1&&(e=y.call(arguments)),f(e)?(p(e,function(e){t.remove(e)}),t):(t.data=v(t.data,d(e)?e:I(e)),t))},addRange:function(e,t){return this.data=w(this.data,d(e)?e:I(e),d(t)?t:I(t)),this},removeRange:function(e,t){var n=d(e)?e:I(e),r=d(t)?t:I(t);return this.data=b(this.data,n,r),this},intersection:function(e){var t=e instanceof B?S(e.data):e;return this.data=function(e,t){for(var n,r=0,i=t.length,a=[];r<i;)n=t[r],k(e,n)&&a.push(n),++r;return function(e){for(var t,n=-1,r=e.length,i=r-1,a=[],o=!0,s=0;++n<r;)if(t=e[n],o)a.push(t),s=t,o=!1;else if(t==s+1){if(n!=i){s=t;continue}o=!0,a.push(t+1)}else a.push(s+1,t),s=t;return o||a.push(t+1),a}(a)}(this.data,t),this},contains:function(e){return k(this.data,d(e)?e:I(e))},clone:function(){var e=new B;return e.data=this.data.slice(0),e},toString:function(e){var t=D(this.data,!!e&&e.bmpOnly,!!e&&e.hasUnicodeFlag);return t?t.replace(l,\"\\\\0$1\"):\"[]\"},toRegExp:function(e){var t=this.toString(e&&-1!=e.indexOf(\"u\")?{hasUnicodeFlag:!0}:null);return RegExp(t,e||\"\")},valueOf:function(){return S(this.data)}}),U.toArray=U.valueOf,r&&!r.nodeType?i?i.exports=B:r.regenerate=B:n.regenerate=B}(_e)}),Ee=new Set([\"General_Category\",\"Script\",\"Script_Extensions\",\"Alphabetic\",\"Any\",\"ASCII\",\"ASCII_Hex_Digit\",\"Assigned\",\"Bidi_Control\",\"Bidi_Mirrored\",\"Case_Ignorable\",\"Cased\",\"Changes_When_Casefolded\",\"Changes_When_Casemapped\",\"Changes_When_Lowercased\",\"Changes_When_NFKC_Casefolded\",\"Changes_When_Titlecased\",\"Changes_When_Uppercased\",\"Dash\",\"Default_Ignorable_Code_Point\",\"Deprecated\",\"Diacritic\",\"Emoji\",\"Emoji_Component\",\"Emoji_Modifier\",\"Emoji_Modifier_Base\",\"Emoji_Presentation\",\"Extender\",\"Grapheme_Base\",\"Grapheme_Extend\",\"Hex_Digit\",\"ID_Continue\",\"ID_Start\",\"Ideographic\",\"IDS_Binary_Operator\",\"IDS_Trinary_Operator\",\"Join_Control\",\"Logical_Order_Exception\",\"Lowercase\",\"Math\",\"Noncharacter_Code_Point\",\"Pattern_Syntax\",\"Pattern_White_Space\",\"Quotation_Mark\",\"Radical\",\"Regional_Indicator\",\"Sentence_Terminal\",\"Soft_Dotted\",\"Terminal_Punctuation\",\"Unified_Ideograph\",\"Uppercase\",\"Variation_Selector\",\"White_Space\",\"XID_Continue\",\"XID_Start\"]),Ce=new Map([[\"scx\",\"Script_Extensions\"],[\"sc\",\"Script\"],[\"gc\",\"General_Category\"],[\"AHex\",\"ASCII_Hex_Digit\"],[\"Alpha\",\"Alphabetic\"],[\"Bidi_C\",\"Bidi_Control\"],[\"Bidi_M\",\"Bidi_Mirrored\"],[\"Cased\",\"Cased\"],[\"CI\",\"Case_Ignorable\"],[\"CWCF\",\"Changes_When_Casefolded\"],[\"CWCM\",\"Changes_When_Casemapped\"],[\"CWKCF\",\"Changes_When_NFKC_Casefolded\"],[\"CWL\",\"Changes_When_Lowercased\"],[\"CWT\",\"Changes_When_Titlecased\"],[\"CWU\",\"Changes_When_Uppercased\"],[\"Dash\",\"Dash\"],[\"Dep\",\"Deprecated\"],[\"DI\",\"Default_Ignorable_Code_Point\"],[\"Dia\",\"Diacritic\"],[\"Ext\",\"Extender\"],[\"Gr_Base\",\"Grapheme_Base\"],[\"Gr_Ext\",\"Grapheme_Extend\"],[\"Hex\",\"Hex_Digit\"],[\"IDC\",\"ID_Continue\"],[\"Ideo\",\"Ideographic\"],[\"IDS\",\"ID_Start\"],[\"IDSB\",\"IDS_Binary_Operator\"],[\"IDST\",\"IDS_Trinary_Operator\"],[\"Join_C\",\"Join_Control\"],[\"LOE\",\"Logical_Order_Exception\"],[\"Lower\",\"Lowercase\"],[\"Math\",\"Math\"],[\"NChar\",\"Noncharacter_Code_Point\"],[\"Pat_Syn\",\"Pattern_Syntax\"],[\"Pat_WS\",\"Pattern_White_Space\"],[\"QMark\",\"Quotation_Mark\"],[\"Radical\",\"Radical\"],[\"RI\",\"Regional_Indicator\"],[\"SD\",\"Soft_Dotted\"],[\"STerm\",\"Sentence_Terminal\"],[\"Term\",\"Terminal_Punctuation\"],[\"UIdeo\",\"Unified_Ideograph\"],[\"Upper\",\"Uppercase\"],[\"VS\",\"Variation_Selector\"],[\"WSpace\",\"White_Space\"],[\"space\",\"White_Space\"],[\"XIDC\",\"XID_Continue\"],[\"XIDS\",\"XID_Start\"]]);var Se=function(e){if(Ee.has(e))return e;if(Ce.has(e))return Ce.get(e);throw new Error(`Unknown property: ${e}`)},Re=new Map([[\"General_Category\",new Map([[\"C\",\"Other\"],[\"Cc\",\"Control\"],[\"cntrl\",\"Control\"],[\"Cf\",\"Format\"],[\"Cn\",\"Unassigned\"],[\"Co\",\"Private_Use\"],[\"Cs\",\"Surrogate\"],[\"L\",\"Letter\"],[\"LC\",\"Cased_Letter\"],[\"Ll\",\"Lowercase_Letter\"],[\"Lm\",\"Modifier_Letter\"],[\"Lo\",\"Other_Letter\"],[\"Lt\",\"Titlecase_Letter\"],[\"Lu\",\"Uppercase_Letter\"],[\"M\",\"Mark\"],[\"Combining_Mark\",\"Mark\"],[\"Mc\",\"Spacing_Mark\"],[\"Me\",\"Enclosing_Mark\"],[\"Mn\",\"Nonspacing_Mark\"],[\"N\",\"Number\"],[\"Nd\",\"Decimal_Number\"],[\"digit\",\"Decimal_Number\"],[\"Nl\",\"Letter_Number\"],[\"No\",\"Other_Number\"],[\"P\",\"Punctuation\"],[\"punct\",\"Punctuation\"],[\"Pc\",\"Connector_Punctuation\"],[\"Pd\",\"Dash_Punctuation\"],[\"Pe\",\"Close_Punctuation\"],[\"Pf\",\"Final_Punctuation\"],[\"Pi\",\"Initial_Punctuation\"],[\"Po\",\"Other_Punctuation\"],[\"Ps\",\"Open_Punctuation\"],[\"S\",\"Symbol\"],[\"Sc\",\"Currency_Symbol\"],[\"Sk\",\"Modifier_Symbol\"],[\"Sm\",\"Math_Symbol\"],[\"So\",\"Other_Symbol\"],[\"Z\",\"Separator\"],[\"Zl\",\"Line_Separator\"],[\"Zp\",\"Paragraph_Separator\"],[\"Zs\",\"Space_Separator\"],[\"Other\",\"Other\"],[\"Control\",\"Control\"],[\"Format\",\"Format\"],[\"Unassigned\",\"Unassigned\"],[\"Private_Use\",\"Private_Use\"],[\"Surrogate\",\"Surrogate\"],[\"Letter\",\"Letter\"],[\"Cased_Letter\",\"Cased_Letter\"],[\"Lowercase_Letter\",\"Lowercase_Letter\"],[\"Modifier_Letter\",\"Modifier_Letter\"],[\"Other_Letter\",\"Other_Letter\"],[\"Titlecase_Letter\",\"Titlecase_Letter\"],[\"Uppercase_Letter\",\"Uppercase_Letter\"],[\"Mark\",\"Mark\"],[\"Spacing_Mark\",\"Spacing_Mark\"],[\"Enclosing_Mark\",\"Enclosing_Mark\"],[\"Nonspacing_Mark\",\"Nonspacing_Mark\"],[\"Number\",\"Number\"],[\"Decimal_Number\",\"Decimal_Number\"],[\"Letter_Number\",\"Letter_Number\"],[\"Other_Number\",\"Other_Number\"],[\"Punctuation\",\"Punctuation\"],[\"Connector_Punctuation\",\"Connector_Punctuation\"],[\"Dash_Punctuation\",\"Dash_Punctuation\"],[\"Close_Punctuation\",\"Close_Punctuation\"],[\"Final_Punctuation\",\"Final_Punctuation\"],[\"Initial_Punctuation\",\"Initial_Punctuation\"],[\"Other_Punctuation\",\"Other_Punctuation\"],[\"Open_Punctuation\",\"Open_Punctuation\"],[\"Symbol\",\"Symbol\"],[\"Currency_Symbol\",\"Currency_Symbol\"],[\"Modifier_Symbol\",\"Modifier_Symbol\"],[\"Math_Symbol\",\"Math_Symbol\"],[\"Other_Symbol\",\"Other_Symbol\"],[\"Separator\",\"Separator\"],[\"Line_Separator\",\"Line_Separator\"],[\"Paragraph_Separator\",\"Paragraph_Separator\"],[\"Space_Separator\",\"Space_Separator\"]])],[\"Script\",new Map([[\"Adlm\",\"Adlam\"],[\"Aghb\",\"Caucasian_Albanian\"],[\"Ahom\",\"Ahom\"],[\"Arab\",\"Arabic\"],[\"Armi\",\"Imperial_Aramaic\"],[\"Armn\",\"Armenian\"],[\"Avst\",\"Avestan\"],[\"Bali\",\"Balinese\"],[\"Bamu\",\"Bamum\"],[\"Bass\",\"Bassa_Vah\"],[\"Batk\",\"Batak\"],[\"Beng\",\"Bengali\"],[\"Bhks\",\"Bhaiksuki\"],[\"Bopo\",\"Bopomofo\"],[\"Brah\",\"Brahmi\"],[\"Brai\",\"Braille\"],[\"Bugi\",\"Buginese\"],[\"Buhd\",\"Buhid\"],[\"Cakm\",\"Chakma\"],[\"Cans\",\"Canadian_Aboriginal\"],[\"Cari\",\"Carian\"],[\"Cham\",\"Cham\"],[\"Cher\",\"Cherokee\"],[\"Copt\",\"Coptic\"],[\"Qaac\",\"Coptic\"],[\"Cprt\",\"Cypriot\"],[\"Cyrl\",\"Cyrillic\"],[\"Deva\",\"Devanagari\"],[\"Dsrt\",\"Deseret\"],[\"Dupl\",\"Duployan\"],[\"Egyp\",\"Egyptian_Hieroglyphs\"],[\"Elba\",\"Elbasan\"],[\"Ethi\",\"Ethiopic\"],[\"Geor\",\"Georgian\"],[\"Glag\",\"Glagolitic\"],[\"Gonm\",\"Masaram_Gondi\"],[\"Goth\",\"Gothic\"],[\"Gran\",\"Grantha\"],[\"Grek\",\"Greek\"],[\"Gujr\",\"Gujarati\"],[\"Guru\",\"Gurmukhi\"],[\"Hang\",\"Hangul\"],[\"Hani\",\"Han\"],[\"Hano\",\"Hanunoo\"],[\"Hatr\",\"Hatran\"],[\"Hebr\",\"Hebrew\"],[\"Hira\",\"Hiragana\"],[\"Hluw\",\"Anatolian_Hieroglyphs\"],[\"Hmng\",\"Pahawh_Hmong\"],[\"Hrkt\",\"Katakana_Or_Hiragana\"],[\"Hung\",\"Old_Hungarian\"],[\"Ital\",\"Old_Italic\"],[\"Java\",\"Javanese\"],[\"Kali\",\"Kayah_Li\"],[\"Kana\",\"Katakana\"],[\"Khar\",\"Kharoshthi\"],[\"Khmr\",\"Khmer\"],[\"Khoj\",\"Khojki\"],[\"Knda\",\"Kannada\"],[\"Kthi\",\"Kaithi\"],[\"Lana\",\"Tai_Tham\"],[\"Laoo\",\"Lao\"],[\"Latn\",\"Latin\"],[\"Lepc\",\"Lepcha\"],[\"Limb\",\"Limbu\"],[\"Lina\",\"Linear_A\"],[\"Linb\",\"Linear_B\"],[\"Lisu\",\"Lisu\"],[\"Lyci\",\"Lycian\"],[\"Lydi\",\"Lydian\"],[\"Mahj\",\"Mahajani\"],[\"Mand\",\"Mandaic\"],[\"Mani\",\"Manichaean\"],[\"Marc\",\"Marchen\"],[\"Mend\",\"Mende_Kikakui\"],[\"Merc\",\"Meroitic_Cursive\"],[\"Mero\",\"Meroitic_Hieroglyphs\"],[\"Mlym\",\"Malayalam\"],[\"Modi\",\"Modi\"],[\"Mong\",\"Mongolian\"],[\"Mroo\",\"Mro\"],[\"Mtei\",\"Meetei_Mayek\"],[\"Mult\",\"Multani\"],[\"Mymr\",\"Myanmar\"],[\"Narb\",\"Old_North_Arabian\"],[\"Nbat\",\"Nabataean\"],[\"Newa\",\"Newa\"],[\"Nkoo\",\"Nko\"],[\"Nshu\",\"Nushu\"],[\"Ogam\",\"Ogham\"],[\"Olck\",\"Ol_Chiki\"],[\"Orkh\",\"Old_Turkic\"],[\"Orya\",\"Oriya\"],[\"Osge\",\"Osage\"],[\"Osma\",\"Osmanya\"],[\"Palm\",\"Palmyrene\"],[\"Pauc\",\"Pau_Cin_Hau\"],[\"Perm\",\"Old_Permic\"],[\"Phag\",\"Phags_Pa\"],[\"Phli\",\"Inscriptional_Pahlavi\"],[\"Phlp\",\"Psalter_Pahlavi\"],[\"Phnx\",\"Phoenician\"],[\"Plrd\",\"Miao\"],[\"Prti\",\"Inscriptional_Parthian\"],[\"Rjng\",\"Rejang\"],[\"Runr\",\"Runic\"],[\"Samr\",\"Samaritan\"],[\"Sarb\",\"Old_South_Arabian\"],[\"Saur\",\"Saurashtra\"],[\"Sgnw\",\"SignWriting\"],[\"Shaw\",\"Shavian\"],[\"Shrd\",\"Sharada\"],[\"Sidd\",\"Siddham\"],[\"Sind\",\"Khudawadi\"],[\"Sinh\",\"Sinhala\"],[\"Sora\",\"Sora_Sompeng\"],[\"Soyo\",\"Soyombo\"],[\"Sund\",\"Sundanese\"],[\"Sylo\",\"Syloti_Nagri\"],[\"Syrc\",\"Syriac\"],[\"Tagb\",\"Tagbanwa\"],[\"Takr\",\"Takri\"],[\"Tale\",\"Tai_Le\"],[\"Talu\",\"New_Tai_Lue\"],[\"Taml\",\"Tamil\"],[\"Tang\",\"Tangut\"],[\"Tavt\",\"Tai_Viet\"],[\"Telu\",\"Telugu\"],[\"Tfng\",\"Tifinagh\"],[\"Tglg\",\"Tagalog\"],[\"Thaa\",\"Thaana\"],[\"Thai\",\"Thai\"],[\"Tibt\",\"Tibetan\"],[\"Tirh\",\"Tirhuta\"],[\"Ugar\",\"Ugaritic\"],[\"Vaii\",\"Vai\"],[\"Wara\",\"Warang_Citi\"],[\"Xpeo\",\"Old_Persian\"],[\"Xsux\",\"Cuneiform\"],[\"Yiii\",\"Yi\"],[\"Zanb\",\"Zanabazar_Square\"],[\"Zinh\",\"Inherited\"],[\"Qaai\",\"Inherited\"],[\"Zyyy\",\"Common\"],[\"Zzzz\",\"Unknown\"],[\"Adlam\",\"Adlam\"],[\"Caucasian_Albanian\",\"Caucasian_Albanian\"],[\"Arabic\",\"Arabic\"],[\"Imperial_Aramaic\",\"Imperial_Aramaic\"],[\"Armenian\",\"Armenian\"],[\"Avestan\",\"Avestan\"],[\"Balinese\",\"Balinese\"],[\"Bamum\",\"Bamum\"],[\"Bassa_Vah\",\"Bassa_Vah\"],[\"Batak\",\"Batak\"],[\"Bengali\",\"Bengali\"],[\"Bhaiksuki\",\"Bhaiksuki\"],[\"Bopomofo\",\"Bopomofo\"],[\"Brahmi\",\"Brahmi\"],[\"Braille\",\"Braille\"],[\"Buginese\",\"Buginese\"],[\"Buhid\",\"Buhid\"],[\"Chakma\",\"Chakma\"],[\"Canadian_Aboriginal\",\"Canadian_Aboriginal\"],[\"Carian\",\"Carian\"],[\"Cherokee\",\"Cherokee\"],[\"Coptic\",\"Coptic\"],[\"Cypriot\",\"Cypriot\"],[\"Cyrillic\",\"Cyrillic\"],[\"Devanagari\",\"Devanagari\"],[\"Deseret\",\"Deseret\"],[\"Duployan\",\"Duployan\"],[\"Egyptian_Hieroglyphs\",\"Egyptian_Hieroglyphs\"],[\"Elbasan\",\"Elbasan\"],[\"Ethiopic\",\"Ethiopic\"],[\"Georgian\",\"Georgian\"],[\"Glagolitic\",\"Glagolitic\"],[\"Masaram_Gondi\",\"Masaram_Gondi\"],[\"Gothic\",\"Gothic\"],[\"Grantha\",\"Grantha\"],[\"Greek\",\"Greek\"],[\"Gujarati\",\"Gujarati\"],[\"Gurmukhi\",\"Gurmukhi\"],[\"Hangul\",\"Hangul\"],[\"Han\",\"Han\"],[\"Hanunoo\",\"Hanunoo\"],[\"Hatran\",\"Hatran\"],[\"Hebrew\",\"Hebrew\"],[\"Hiragana\",\"Hiragana\"],[\"Anatolian_Hieroglyphs\",\"Anatolian_Hieroglyphs\"],[\"Pahawh_Hmong\",\"Pahawh_Hmong\"],[\"Katakana_Or_Hiragana\",\"Katakana_Or_Hiragana\"],[\"Old_Hungarian\",\"Old_Hungarian\"],[\"Old_Italic\",\"Old_Italic\"],[\"Javanese\",\"Javanese\"],[\"Kayah_Li\",\"Kayah_Li\"],[\"Katakana\",\"Katakana\"],[\"Kharoshthi\",\"Kharoshthi\"],[\"Khmer\",\"Khmer\"],[\"Khojki\",\"Khojki\"],[\"Kannada\",\"Kannada\"],[\"Kaithi\",\"Kaithi\"],[\"Tai_Tham\",\"Tai_Tham\"],[\"Lao\",\"Lao\"],[\"Latin\",\"Latin\"],[\"Lepcha\",\"Lepcha\"],[\"Limbu\",\"Limbu\"],[\"Linear_A\",\"Linear_A\"],[\"Linear_B\",\"Linear_B\"],[\"Lycian\",\"Lycian\"],[\"Lydian\",\"Lydian\"],[\"Mahajani\",\"Mahajani\"],[\"Mandaic\",\"Mandaic\"],[\"Manichaean\",\"Manichaean\"],[\"Marchen\",\"Marchen\"],[\"Mende_Kikakui\",\"Mende_Kikakui\"],[\"Meroitic_Cursive\",\"Meroitic_Cursive\"],[\"Meroitic_Hieroglyphs\",\"Meroitic_Hieroglyphs\"],[\"Malayalam\",\"Malayalam\"],[\"Mongolian\",\"Mongolian\"],[\"Mro\",\"Mro\"],[\"Meetei_Mayek\",\"Meetei_Mayek\"],[\"Multani\",\"Multani\"],[\"Myanmar\",\"Myanmar\"],[\"Old_North_Arabian\",\"Old_North_Arabian\"],[\"Nabataean\",\"Nabataean\"],[\"Nko\",\"Nko\"],[\"Nushu\",\"Nushu\"],[\"Ogham\",\"Ogham\"],[\"Ol_Chiki\",\"Ol_Chiki\"],[\"Old_Turkic\",\"Old_Turkic\"],[\"Oriya\",\"Oriya\"],[\"Osage\",\"Osage\"],[\"Osmanya\",\"Osmanya\"],[\"Palmyrene\",\"Palmyrene\"],[\"Pau_Cin_Hau\",\"Pau_Cin_Hau\"],[\"Old_Permic\",\"Old_Permic\"],[\"Phags_Pa\",\"Phags_Pa\"],[\"Inscriptional_Pahlavi\",\"Inscriptional_Pahlavi\"],[\"Psalter_Pahlavi\",\"Psalter_Pahlavi\"],[\"Phoenician\",\"Phoenician\"],[\"Miao\",\"Miao\"],[\"Inscriptional_Parthian\",\"Inscriptional_Parthian\"],[\"Rejang\",\"Rejang\"],[\"Runic\",\"Runic\"],[\"Samaritan\",\"Samaritan\"],[\"Old_South_Arabian\",\"Old_South_Arabian\"],[\"Saurashtra\",\"Saurashtra\"],[\"SignWriting\",\"SignWriting\"],[\"Shavian\",\"Shavian\"],[\"Sharada\",\"Sharada\"],[\"Siddham\",\"Siddham\"],[\"Khudawadi\",\"Khudawadi\"],[\"Sinhala\",\"Sinhala\"],[\"Sora_Sompeng\",\"Sora_Sompeng\"],[\"Soyombo\",\"Soyombo\"],[\"Sundanese\",\"Sundanese\"],[\"Syloti_Nagri\",\"Syloti_Nagri\"],[\"Syriac\",\"Syriac\"],[\"Tagbanwa\",\"Tagbanwa\"],[\"Takri\",\"Takri\"],[\"Tai_Le\",\"Tai_Le\"],[\"New_Tai_Lue\",\"New_Tai_Lue\"],[\"Tamil\",\"Tamil\"],[\"Tangut\",\"Tangut\"],[\"Tai_Viet\",\"Tai_Viet\"],[\"Telugu\",\"Telugu\"],[\"Tifinagh\",\"Tifinagh\"],[\"Tagalog\",\"Tagalog\"],[\"Thaana\",\"Thaana\"],[\"Tibetan\",\"Tibetan\"],[\"Tirhuta\",\"Tirhuta\"],[\"Ugaritic\",\"Ugaritic\"],[\"Vai\",\"Vai\"],[\"Warang_Citi\",\"Warang_Citi\"],[\"Old_Persian\",\"Old_Persian\"],[\"Cuneiform\",\"Cuneiform\"],[\"Yi\",\"Yi\"],[\"Zanabazar_Square\",\"Zanabazar_Square\"],[\"Inherited\",\"Inherited\"],[\"Common\",\"Common\"],[\"Unknown\",\"Unknown\"]])],[\"Script_Extensions\",new Map([[\"Adlm\",\"Adlam\"],[\"Aghb\",\"Caucasian_Albanian\"],[\"Ahom\",\"Ahom\"],[\"Arab\",\"Arabic\"],[\"Armi\",\"Imperial_Aramaic\"],[\"Armn\",\"Armenian\"],[\"Avst\",\"Avestan\"],[\"Bali\",\"Balinese\"],[\"Bamu\",\"Bamum\"],[\"Bass\",\"Bassa_Vah\"],[\"Batk\",\"Batak\"],[\"Beng\",\"Bengali\"],[\"Bhks\",\"Bhaiksuki\"],[\"Bopo\",\"Bopomofo\"],[\"Brah\",\"Brahmi\"],[\"Brai\",\"Braille\"],[\"Bugi\",\"Buginese\"],[\"Buhd\",\"Buhid\"],[\"Cakm\",\"Chakma\"],[\"Cans\",\"Canadian_Aboriginal\"],[\"Cari\",\"Carian\"],[\"Cham\",\"Cham\"],[\"Cher\",\"Cherokee\"],[\"Copt\",\"Coptic\"],[\"Qaac\",\"Coptic\"],[\"Cprt\",\"Cypriot\"],[\"Cyrl\",\"Cyrillic\"],[\"Deva\",\"Devanagari\"],[\"Dsrt\",\"Deseret\"],[\"Dupl\",\"Duployan\"],[\"Egyp\",\"Egyptian_Hieroglyphs\"],[\"Elba\",\"Elbasan\"],[\"Ethi\",\"Ethiopic\"],[\"Geor\",\"Georgian\"],[\"Glag\",\"Glagolitic\"],[\"Gonm\",\"Masaram_Gondi\"],[\"Goth\",\"Gothic\"],[\"Gran\",\"Grantha\"],[\"Grek\",\"Greek\"],[\"Gujr\",\"Gujarati\"],[\"Guru\",\"Gurmukhi\"],[\"Hang\",\"Hangul\"],[\"Hani\",\"Han\"],[\"Hano\",\"Hanunoo\"],[\"Hatr\",\"Hatran\"],[\"Hebr\",\"Hebrew\"],[\"Hira\",\"Hiragana\"],[\"Hluw\",\"Anatolian_Hieroglyphs\"],[\"Hmng\",\"Pahawh_Hmong\"],[\"Hrkt\",\"Katakana_Or_Hiragana\"],[\"Hung\",\"Old_Hungarian\"],[\"Ital\",\"Old_Italic\"],[\"Java\",\"Javanese\"],[\"Kali\",\"Kayah_Li\"],[\"Kana\",\"Katakana\"],[\"Khar\",\"Kharoshthi\"],[\"Khmr\",\"Khmer\"],[\"Khoj\",\"Khojki\"],[\"Knda\",\"Kannada\"],[\"Kthi\",\"Kaithi\"],[\"Lana\",\"Tai_Tham\"],[\"Laoo\",\"Lao\"],[\"Latn\",\"Latin\"],[\"Lepc\",\"Lepcha\"],[\"Limb\",\"Limbu\"],[\"Lina\",\"Linear_A\"],[\"Linb\",\"Linear_B\"],[\"Lisu\",\"Lisu\"],[\"Lyci\",\"Lycian\"],[\"Lydi\",\"Lydian\"],[\"Mahj\",\"Mahajani\"],[\"Mand\",\"Mandaic\"],[\"Mani\",\"Manichaean\"],[\"Marc\",\"Marchen\"],[\"Mend\",\"Mende_Kikakui\"],[\"Merc\",\"Meroitic_Cursive\"],[\"Mero\",\"Meroitic_Hieroglyphs\"],[\"Mlym\",\"Malayalam\"],[\"Modi\",\"Modi\"],[\"Mong\",\"Mongolian\"],[\"Mroo\",\"Mro\"],[\"Mtei\",\"Meetei_Mayek\"],[\"Mult\",\"Multani\"],[\"Mymr\",\"Myanmar\"],[\"Narb\",\"Old_North_Arabian\"],[\"Nbat\",\"Nabataean\"],[\"Newa\",\"Newa\"],[\"Nkoo\",\"Nko\"],[\"Nshu\",\"Nushu\"],[\"Ogam\",\"Ogham\"],[\"Olck\",\"Ol_Chiki\"],[\"Orkh\",\"Old_Turkic\"],[\"Orya\",\"Oriya\"],[\"Osge\",\"Osage\"],[\"Osma\",\"Osmanya\"],[\"Palm\",\"Palmyrene\"],[\"Pauc\",\"Pau_Cin_Hau\"],[\"Perm\",\"Old_Permic\"],[\"Phag\",\"Phags_Pa\"],[\"Phli\",\"Inscriptional_Pahlavi\"],[\"Phlp\",\"Psalter_Pahlavi\"],[\"Phnx\",\"Phoenician\"],[\"Plrd\",\"Miao\"],[\"Prti\",\"Inscriptional_Parthian\"],[\"Rjng\",\"Rejang\"],[\"Runr\",\"Runic\"],[\"Samr\",\"Samaritan\"],[\"Sarb\",\"Old_South_Arabian\"],[\"Saur\",\"Saurashtra\"],[\"Sgnw\",\"SignWriting\"],[\"Shaw\",\"Shavian\"],[\"Shrd\",\"Sharada\"],[\"Sidd\",\"Siddham\"],[\"Sind\",\"Khudawadi\"],[\"Sinh\",\"Sinhala\"],[\"Sora\",\"Sora_Sompeng\"],[\"Soyo\",\"Soyombo\"],[\"Sund\",\"Sundanese\"],[\"Sylo\",\"Syloti_Nagri\"],[\"Syrc\",\"Syriac\"],[\"Tagb\",\"Tagbanwa\"],[\"Takr\",\"Takri\"],[\"Tale\",\"Tai_Le\"],[\"Talu\",\"New_Tai_Lue\"],[\"Taml\",\"Tamil\"],[\"Tang\",\"Tangut\"],[\"Tavt\",\"Tai_Viet\"],[\"Telu\",\"Telugu\"],[\"Tfng\",\"Tifinagh\"],[\"Tglg\",\"Tagalog\"],[\"Thaa\",\"Thaana\"],[\"Thai\",\"Thai\"],[\"Tibt\",\"Tibetan\"],[\"Tirh\",\"Tirhuta\"],[\"Ugar\",\"Ugaritic\"],[\"Vaii\",\"Vai\"],[\"Wara\",\"Warang_Citi\"],[\"Xpeo\",\"Old_Persian\"],[\"Xsux\",\"Cuneiform\"],[\"Yiii\",\"Yi\"],[\"Zanb\",\"Zanabazar_Square\"],[\"Zinh\",\"Inherited\"],[\"Qaai\",\"Inherited\"],[\"Zyyy\",\"Common\"],[\"Zzzz\",\"Unknown\"],[\"Adlam\",\"Adlam\"],[\"Caucasian_Albanian\",\"Caucasian_Albanian\"],[\"Arabic\",\"Arabic\"],[\"Imperial_Aramaic\",\"Imperial_Aramaic\"],[\"Armenian\",\"Armenian\"],[\"Avestan\",\"Avestan\"],[\"Balinese\",\"Balinese\"],[\"Bamum\",\"Bamum\"],[\"Bassa_Vah\",\"Bassa_Vah\"],[\"Batak\",\"Batak\"],[\"Bengali\",\"Bengali\"],[\"Bhaiksuki\",\"Bhaiksuki\"],[\"Bopomofo\",\"Bopomofo\"],[\"Brahmi\",\"Brahmi\"],[\"Braille\",\"Braille\"],[\"Buginese\",\"Buginese\"],[\"Buhid\",\"Buhid\"],[\"Chakma\",\"Chakma\"],[\"Canadian_Aboriginal\",\"Canadian_Aboriginal\"],[\"Carian\",\"Carian\"],[\"Cherokee\",\"Cherokee\"],[\"Coptic\",\"Coptic\"],[\"Cypriot\",\"Cypriot\"],[\"Cyrillic\",\"Cyrillic\"],[\"Devanagari\",\"Devanagari\"],[\"Deseret\",\"Deseret\"],[\"Duployan\",\"Duployan\"],[\"Egyptian_Hieroglyphs\",\"Egyptian_Hieroglyphs\"],[\"Elbasan\",\"Elbasan\"],[\"Ethiopic\",\"Ethiopic\"],[\"Georgian\",\"Georgian\"],[\"Glagolitic\",\"Glagolitic\"],[\"Masaram_Gondi\",\"Masaram_Gondi\"],[\"Gothic\",\"Gothic\"],[\"Grantha\",\"Grantha\"],[\"Greek\",\"Greek\"],[\"Gujarati\",\"Gujarati\"],[\"Gurmukhi\",\"Gurmukhi\"],[\"Hangul\",\"Hangul\"],[\"Han\",\"Han\"],[\"Hanunoo\",\"Hanunoo\"],[\"Hatran\",\"Hatran\"],[\"Hebrew\",\"Hebrew\"],[\"Hiragana\",\"Hiragana\"],[\"Anatolian_Hieroglyphs\",\"Anatolian_Hieroglyphs\"],[\"Pahawh_Hmong\",\"Pahawh_Hmong\"],[\"Katakana_Or_Hiragana\",\"Katakana_Or_Hiragana\"],[\"Old_Hungarian\",\"Old_Hungarian\"],[\"Old_Italic\",\"Old_Italic\"],[\"Javanese\",\"Javanese\"],[\"Kayah_Li\",\"Kayah_Li\"],[\"Katakana\",\"Katakana\"],[\"Kharoshthi\",\"Kharoshthi\"],[\"Khmer\",\"Khmer\"],[\"Khojki\",\"Khojki\"],[\"Kannada\",\"Kannada\"],[\"Kaithi\",\"Kaithi\"],[\"Tai_Tham\",\"Tai_Tham\"],[\"Lao\",\"Lao\"],[\"Latin\",\"Latin\"],[\"Lepcha\",\"Lepcha\"],[\"Limbu\",\"Limbu\"],[\"Linear_A\",\"Linear_A\"],[\"Linear_B\",\"Linear_B\"],[\"Lycian\",\"Lycian\"],[\"Lydian\",\"Lydian\"],[\"Mahajani\",\"Mahajani\"],[\"Mandaic\",\"Mandaic\"],[\"Manichaean\",\"Manichaean\"],[\"Marchen\",\"Marchen\"],[\"Mende_Kikakui\",\"Mende_Kikakui\"],[\"Meroitic_Cursive\",\"Meroitic_Cursive\"],[\"Meroitic_Hieroglyphs\",\"Meroitic_Hieroglyphs\"],[\"Malayalam\",\"Malayalam\"],[\"Mongolian\",\"Mongolian\"],[\"Mro\",\"Mro\"],[\"Meetei_Mayek\",\"Meetei_Mayek\"],[\"Multani\",\"Multani\"],[\"Myanmar\",\"Myanmar\"],[\"Old_North_Arabian\",\"Old_North_Arabian\"],[\"Nabataean\",\"Nabataean\"],[\"Nko\",\"Nko\"],[\"Nushu\",\"Nushu\"],[\"Ogham\",\"Ogham\"],[\"Ol_Chiki\",\"Ol_Chiki\"],[\"Old_Turkic\",\"Old_Turkic\"],[\"Oriya\",\"Oriya\"],[\"Osage\",\"Osage\"],[\"Osmanya\",\"Osmanya\"],[\"Palmyrene\",\"Palmyrene\"],[\"Pau_Cin_Hau\",\"Pau_Cin_Hau\"],[\"Old_Permic\",\"Old_Permic\"],[\"Phags_Pa\",\"Phags_Pa\"],[\"Inscriptional_Pahlavi\",\"Inscriptional_Pahlavi\"],[\"Psalter_Pahlavi\",\"Psalter_Pahlavi\"],[\"Phoenician\",\"Phoenician\"],[\"Miao\",\"Miao\"],[\"Inscriptional_Parthian\",\"Inscriptional_Parthian\"],[\"Rejang\",\"Rejang\"],[\"Runic\",\"Runic\"],[\"Samaritan\",\"Samaritan\"],[\"Old_South_Arabian\",\"Old_South_Arabian\"],[\"Saurashtra\",\"Saurashtra\"],[\"SignWriting\",\"SignWriting\"],[\"Shavian\",\"Shavian\"],[\"Sharada\",\"Sharada\"],[\"Siddham\",\"Siddham\"],[\"Khudawadi\",\"Khudawadi\"],[\"Sinhala\",\"Sinhala\"],[\"Sora_Sompeng\",\"Sora_Sompeng\"],[\"Soyombo\",\"Soyombo\"],[\"Sundanese\",\"Sundanese\"],[\"Syloti_Nagri\",\"Syloti_Nagri\"],[\"Syriac\",\"Syriac\"],[\"Tagbanwa\",\"Tagbanwa\"],[\"Takri\",\"Takri\"],[\"Tai_Le\",\"Tai_Le\"],[\"New_Tai_Lue\",\"New_Tai_Lue\"],[\"Tamil\",\"Tamil\"],[\"Tangut\",\"Tangut\"],[\"Tai_Viet\",\"Tai_Viet\"],[\"Telugu\",\"Telugu\"],[\"Tifinagh\",\"Tifinagh\"],[\"Tagalog\",\"Tagalog\"],[\"Thaana\",\"Thaana\"],[\"Tibetan\",\"Tibetan\"],[\"Tirhuta\",\"Tirhuta\"],[\"Ugaritic\",\"Ugaritic\"],[\"Vai\",\"Vai\"],[\"Warang_Citi\",\"Warang_Citi\"],[\"Old_Persian\",\"Old_Persian\"],[\"Cuneiform\",\"Cuneiform\"],[\"Yi\",\"Yi\"],[\"Zanabazar_Square\",\"Zanabazar_Square\"],[\"Inherited\",\"Inherited\"],[\"Common\",\"Common\"],[\"Unknown\",\"Unknown\"]])]]);var Pe=function(e,t){const n=Re.get(e);if(!n)throw new Error(`Unknown property \\`${e}\\`.`);const r=n.get(t);if(r)return r;throw new Error(`Unknown value \\`${t}\\` for property \\`${e}\\`.`)},Oe=new Map([[75,8490],[83,383],[107,8490],[115,383],[181,924],[197,8491],[223,7838],[229,8491],[383,83],[452,453],[453,452],[455,456],[456,455],[458,459],[459,458],[497,498],[498,497],[618,42926],[669,42930],[837,8126],[914,976],[917,1013],[920,1012],[921,8126],[922,1008],[924,181],[928,982],[929,1009],[931,962],[934,981],[937,8486],[952,1012],[962,931],[969,8486],[976,914],[977,1012],[981,934],[982,928],[1008,922],[1009,929],[1012,[920,977,952]],[1013,917],[1042,7296],[1044,7297],[1054,7298],[1057,7299],[1058,7301],[1066,7302],[1074,7296],[1076,7297],[1086,7298],[1089,7299],[1090,[7300,7301]],[1098,7302],[1122,7303],[1123,7303],[5024,43888],[5025,43889],[5026,43890],[5027,43891],[5028,43892],[5029,43893],[5030,43894],[5031,43895],[5032,43896],[5033,43897],[5034,43898],[5035,43899],[5036,43900],[5037,43901],[5038,43902],[5039,43903],[5040,43904],[5041,43905],[5042,43906],[5043,43907],[5044,43908],[5045,43909],[5046,43910],[5047,43911],[5048,43912],[5049,43913],[5050,43914],[5051,43915],[5052,43916],[5053,43917],[5054,43918],[5055,43919],[5056,43920],[5057,43921],[5058,43922],[5059,43923],[5060,43924],[5061,43925],[5062,43926],[5063,43927],[5064,43928],[5065,43929],[5066,43930],[5067,43931],[5068,43932],[5069,43933],[5070,43934],[5071,43935],[5072,43936],[5073,43937],[5074,43938],[5075,43939],[5076,43940],[5077,43941],[5078,43942],[5079,43943],[5080,43944],[5081,43945],[5082,43946],[5083,43947],[5084,43948],[5085,43949],[5086,43950],[5087,43951],[5088,43952],[5089,43953],[5090,43954],[5091,43955],[5092,43956],[5093,43957],[5094,43958],[5095,43959],[5096,43960],[5097,43961],[5098,43962],[5099,43963],[5100,43964],[5101,43965],[5102,43966],[5103,43967],[5104,5112],[5105,5113],[5106,5114],[5107,5115],[5108,5116],[5109,5117],[5112,5104],[5113,5105],[5114,5106],[5115,5107],[5116,5108],[5117,5109],[7296,[1042,1074]],[7297,[1044,1076]],[7298,[1054,1086]],[7299,[1057,1089]],[7300,[7301,1090]],[7301,[1058,7300,1090]],[7302,[1066,1098]],[7303,[1122,1123]],[7304,[42570,42571]],[7776,7835],[7835,7776],[7838,223],[8064,8072],[8065,8073],[8066,8074],[8067,8075],[8068,8076],[8069,8077],[8070,8078],[8071,8079],[8072,8064],[8073,8065],[8074,8066],[8075,8067],[8076,8068],[8077,8069],[8078,8070],[8079,8071],[8080,8088],[8081,8089],[8082,8090],[8083,8091],[8084,8092],[8085,8093],[8086,8094],[8087,8095],[8088,8080],[8089,8081],[8090,8082],[8091,8083],[8092,8084],[8093,8085],[8094,8086],[8095,8087],[8096,8104],[8097,8105],[8098,8106],[8099,8107],[8100,8108],[8101,8109],[8102,8110],[8103,8111],[8104,8096],[8105,8097],[8106,8098],[8107,8099],[8108,8100],[8109,8101],[8110,8102],[8111,8103],[8115,8124],[8124,8115],[8126,[837,921]],[8131,8140],[8140,8131],[8179,8188],[8188,8179],[8486,[937,969]],[8490,75],[8491,[197,229]],[42570,7304],[42571,7304],[42926,618],[42930,669],[42931,43859],[42932,42933],[42933,42932],[42934,42935],[42935,42934],[43859,42931],[43888,5024],[43889,5025],[43890,5026],[43891,5027],[43892,5028],[43893,5029],[43894,5030],[43895,5031],[43896,5032],[43897,5033],[43898,5034],[43899,5035],[43900,5036],[43901,5037],[43902,5038],[43903,5039],[43904,5040],[43905,5041],[43906,5042],[43907,5043],[43908,5044],[43909,5045],[43910,5046],[43911,5047],[43912,5048],[43913,5049],[43914,5050],[43915,5051],[43916,5052],[43917,5053],[43918,5054],[43919,5055],[43920,5056],[43921,5057],[43922,5058],[43923,5059],[43924,5060],[43925,5061],[43926,5062],[43927,5063],[43928,5064],[43929,5065],[43930,5066],[43931,5067],[43932,5068],[43933,5069],[43934,5070],[43935,5071],[43936,5072],[43937,5073],[43938,5074],[43939,5075],[43940,5076],[43941,5077],[43942,5078],[43943,5079],[43944,5080],[43945,5081],[43946,5082],[43947,5083],[43948,5084],[43949,5085],[43950,5086],[43951,5087],[43952,5088],[43953,5089],[43954,5090],[43955,5091],[43956,5092],[43957,5093],[43958,5094],[43959,5095],[43960,5096],[43961,5097],[43962,5098],[43963,5099],[43964,5100],[43965,5101],[43966,5102],[43967,5103],[66560,66600],[66561,66601],[66562,66602],[66563,66603],[66564,66604],[66565,66605],[66566,66606],[66567,66607],[66568,66608],[66569,66609],[66570,66610],[66571,66611],[66572,66612],[66573,66613],[66574,66614],[66575,66615],[66576,66616],[66577,66617],[66578,66618],[66579,66619],[66580,66620],[66581,66621],[66582,66622],[66583,66623],[66584,66624],[66585,66625],[66586,66626],[66587,66627],[66588,66628],[66589,66629],[66590,66630],[66591,66631],[66592,66632],[66593,66633],[66594,66634],[66595,66635],[66596,66636],[66597,66637],[66598,66638],[66599,66639],[66600,66560],[66601,66561],[66602,66562],[66603,66563],[66604,66564],[66605,66565],[66606,66566],[66607,66567],[66608,66568],[66609,66569],[66610,66570],[66611,66571],[66612,66572],[66613,66573],[66614,66574],[66615,66575],[66616,66576],[66617,66577],[66618,66578],[66619,66579],[66620,66580],[66621,66581],[66622,66582],[66623,66583],[66624,66584],[66625,66585],[66626,66586],[66627,66587],[66628,66588],[66629,66589],[66630,66590],[66631,66591],[66632,66592],[66633,66593],[66634,66594],[66635,66595],[66636,66596],[66637,66597],[66638,66598],[66639,66599],[66736,66776],[66737,66777],[66738,66778],[66739,66779],[66740,66780],[66741,66781],[66742,66782],[66743,66783],[66744,66784],[66745,66785],[66746,66786],[66747,66787],[66748,66788],[66749,66789],[66750,66790],[66751,66791],[66752,66792],[66753,66793],[66754,66794],[66755,66795],[66756,66796],[66757,66797],[66758,66798],[66759,66799],[66760,66800],[66761,66801],[66762,66802],[66763,66803],[66764,66804],[66765,66805],[66766,66806],[66767,66807],[66768,66808],[66769,66809],[66770,66810],[66771,66811],[66776,66736],[66777,66737],[66778,66738],[66779,66739],[66780,66740],[66781,66741],[66782,66742],[66783,66743],[66784,66744],[66785,66745],[66786,66746],[66787,66747],[66788,66748],[66789,66749],[66790,66750],[66791,66751],[66792,66752],[66793,66753],[66794,66754],[66795,66755],[66796,66756],[66797,66757],[66798,66758],[66799,66759],[66800,66760],[66801,66761],[66802,66762],[66803,66763],[66804,66764],[66805,66765],[66806,66766],[66807,66767],[66808,66768],[66809,66769],[66810,66770],[66811,66771],[68736,68800],[68737,68801],[68738,68802],[68739,68803],[68740,68804],[68741,68805],[68742,68806],[68743,68807],[68744,68808],[68745,68809],[68746,68810],[68747,68811],[68748,68812],[68749,68813],[68750,68814],[68751,68815],[68752,68816],[68753,68817],[68754,68818],[68755,68819],[68756,68820],[68757,68821],[68758,68822],[68759,68823],[68760,68824],[68761,68825],[68762,68826],[68763,68827],[68764,68828],[68765,68829],[68766,68830],[68767,68831],[68768,68832],[68769,68833],[68770,68834],[68771,68835],[68772,68836],[68773,68837],[68774,68838],[68775,68839],[68776,68840],[68777,68841],[68778,68842],[68779,68843],[68780,68844],[68781,68845],[68782,68846],[68783,68847],[68784,68848],[68785,68849],[68786,68850],[68800,68736],[68801,68737],[68802,68738],[68803,68739],[68804,68740],[68805,68741],[68806,68742],[68807,68743],[68808,68744],[68809,68745],[68810,68746],[68811,68747],[68812,68748],[68813,68749],[68814,68750],[68815,68751],[68816,68752],[68817,68753],[68818,68754],[68819,68755],[68820,68756],[68821,68757],[68822,68758],[68823,68759],[68824,68760],[68825,68761],[68826,68762],[68827,68763],[68828,68764],[68829,68765],[68830,68766],[68831,68767],[68832,68768],[68833,68769],[68834,68770],[68835,68771],[68836,68772],[68837,68773],[68838,68774],[68839,68775],[68840,68776],[68841,68777],[68842,68778],[68843,68779],[68844,68780],[68845,68781],[68846,68782],[68847,68783],[68848,68784],[68849,68785],[68850,68786],[71840,71872],[71841,71873],[71842,71874],[71843,71875],[71844,71876],[71845,71877],[71846,71878],[71847,71879],[71848,71880],[71849,71881],[71850,71882],[71851,71883],[71852,71884],[71853,71885],[71854,71886],[71855,71887],[71856,71888],[71857,71889],[71858,71890],[71859,71891],[71860,71892],[71861,71893],[71862,71894],[71863,71895],[71864,71896],[71865,71897],[71866,71898],[71867,71899],[71868,71900],[71869,71901],[71870,71902],[71871,71903],[71872,71840],[71873,71841],[71874,71842],[71875,71843],[71876,71844],[71877,71845],[71878,71846],[71879,71847],[71880,71848],[71881,71849],[71882,71850],[71883,71851],[71884,71852],[71885,71853],[71886,71854],[71887,71855],[71888,71856],[71889,71857],[71890,71858],[71891,71859],[71892,71860],[71893,71861],[71894,71862],[71895,71863],[71896,71864],[71897,71865],[71898,71866],[71899,71867],[71900,71868],[71901,71869],[71902,71870],[71903,71871],[125184,125218],[125185,125219],[125186,125220],[125187,125221],[125188,125222],[125189,125223],[125190,125224],[125191,125225],[125192,125226],[125193,125227],[125194,125228],[125195,125229],[125196,125230],[125197,125231],[125198,125232],[125199,125233],[125200,125234],[125201,125235],[125202,125236],[125203,125237],[125204,125238],[125205,125239],[125206,125240],[125207,125241],[125208,125242],[125209,125243],[125210,125244],[125211,125245],[125212,125246],[125213,125247],[125214,125248],[125215,125249],[125216,125250],[125217,125251],[125218,125184],[125219,125185],[125220,125186],[125221,125187],[125222,125188],[125223,125189],[125224,125190],[125225,125191],[125226,125192],[125227,125193],[125228,125194],[125229,125195],[125230,125196],[125231,125197],[125232,125198],[125233,125199],[125234,125200],[125235,125201],[125236,125202],[125237,125203],[125238,125204],[125239,125205],[125240,125206],[125241,125207],[125242,125208],[125243,125209],[125244,125210],[125245,125211],[125246,125212],[125247,125213],[125248,125214],[125249,125215],[125250,125216],[125251,125217]]),Te={REGULAR:new Map([[\"d\",ke().addRange(48,57)],[\"D\",ke().addRange(0,47).addRange(58,65535)],[\"s\",ke(32,160,5760,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233)],[\"S\",ke().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,65535)],[\"w\",ke(95).addRange(48,57).addRange(65,90).addRange(97,122)],[\"W\",ke(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,65535)]]),UNICODE:new Map([[\"d\",ke().addRange(48,57)],[\"D\",ke().addRange(0,47).addRange(58,1114111)],[\"s\",ke(32,160,5760,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233)],[\"S\",ke().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111)],[\"w\",ke(95).addRange(48,57).addRange(65,90).addRange(97,122)],[\"W\",ke(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)]]),UNICODE_IGNORE_CASE:new Map([[\"d\",ke().addRange(48,57)],[\"D\",ke().addRange(0,47).addRange(58,1114111)],[\"s\",ke(32,160,5760,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233)],[\"S\",ke().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111)],[\"w\",ke(95,383,8490).addRange(48,57).addRange(65,90).addRange(97,122)],[\"W\",ke(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,382).addRange(384,8489).addRange(8491,1114111)]])},je=createCommonjsModule(function(e){const t=xe.generate,n=we.parse,r=ke().addRange(0,1114111),i=ke().addRange(0,65535),a=r.clone().remove(10,13,8232,8233),o=a.clone().intersection(i),s=(e,t,n)=>t?n?Te.UNICODE_IGNORE_CASE.get(e):Te.UNICODE.get(e):Te.REGULAR.get(e),l=(e,t)=>{try{return function commonjsRequire(){throw new Error(\"Dynamic requires are not currently supported by rollup-plugin-commonjs\")}()}catch(n){throw new Error(`Failed to recognize value \\`${t}\\` for property `+`\\`${e}\\`.`)}},u=(e,t)=>{const n=e.split(\"=\"),i=n[0];let a;if(1==n.length)a=(e=>{try{const t=Pe(\"General_Category\",e);return l(\"General_Category\",t)}catch(e){}const t=Se(e);return l(t)})(i);else{const e=Se(i),t=Pe(e,n[1]);a=l(e,t)}return t?r.clone().remove(a):a.clone()};ke.prototype.iuAddRange=function(e,t){do{const t=h(e);t&&this.add(t)}while(++e<=t);return this};const c=(e,t)=>{let r=n(t,g.useUnicodeFlag?\"u\":\"\");switch(r.type){case\"characterClass\":case\"group\":case\"value\":break;default:r=p(r,t)}Object.assign(e,r)},p=(e,t)=>({type:\"group\",behavior:\"ignore\",body:[e],raw:`(?:${t})`}),h=e=>Oe.get(e)||!1,f=(e,t)=>{switch(e.type){case\"dot\":c(e,(d=g.unicode,m=g.dotAll,m?d?r:i:d?a:o).toString(t));break;case\"characterClass\":e=((e,t)=>{let n=ke();for(var a=0,o=e.body;a<o.length;a+=1){const e=o[a];switch(e.type){case\"value\":if(n.add(e.codePoint),g.ignoreCase&&g.unicode&&!g.useUnicodeFlag){const t=h(e.codePoint);t&&n.add(t)}break;case\"characterClassRange\":const t=e.min.codePoint,r=e.max.codePoint;n.addRange(t,r),g.ignoreCase&&g.unicode&&!g.useUnicodeFlag&&n.iuAddRange(t,r);break;case\"characterClassEscape\":n.add(s(e.value,g.unicode,g.ignoreCase));break;case\"unicodePropertyEscape\":n.add(u(e.value,e.negative));break;default:throw new Error(`Unknown term type: ${e.type}`)}}return e.negative&&(n=(g.unicode?r:i).clone().remove(n)),c(e,n.toString(t)),e})(e,t);break;case\"unicodePropertyEscape\":c(e,u(e.value,e.negative).toString(t));break;case\"characterClassEscape\":c(e,s(e.value,g.unicode,g.ignoreCase).toString(t));break;case\"alternative\":case\"disjunction\":case\"group\":case\"quantifier\":e.body=e.body.map(e=>f(e,t));break;case\"value\":const n=e.codePoint,l=ke(n);if(g.ignoreCase&&g.unicode&&!g.useUnicodeFlag){const e=h(n);e&&l.add(e)}c(e,l.toString(t));break;case\"anchor\":case\"empty\":case\"group\":case\"reference\":break;default:throw new Error(`Unknown term type: ${e.type}`)}return e};var d,m;const g={ignoreCase:!1,unicode:!1,dotAll:!1,useUnicodeFlag:!1};e.exports=((e,r,i)=>{const a={unicodePropertyEscape:i&&i.unicodePropertyEscape};g.ignoreCase=r&&r.includes(\"i\"),g.unicode=r&&r.includes(\"u\");const o=i&&i.dotAllFlag;g.dotAll=o&&r&&r.includes(\"s\"),g.useUnicodeFlag=i&&i.useUnicodeFlag;const s={hasUnicodeFlag:g.useUnicodeFlag,bmpOnly:!g.unicode},l=n(e,r,a);return f(l,s),t(l)})});var Ae={ArrayExpression:class extends ce{initialise(e){if(e.spreadRest&&this.elements.length){const e=this.findLexicalBoundary();let t=this.elements.length;for(;t--;){const n=this.elements[t];n&&\"SpreadElement\"===n.type&&isArguments(n.argument)&&(this.argumentsArrayAlias=e.getArgumentsArrayAlias())}}super.initialise(e)}transpile(e,t){if(t.spreadRest){if(this.elements.length){let t=this.elements[this.elements.length-1];t&&/\\s*,/.test(e.original.slice(t.end,this.end))&&e.overwrite(t.end,this.end-1,\" \")}if(1===this.elements.length){const t=this.elements[0];t&&\"SpreadElement\"===t.type&&(isArguments(t.argument)?e.overwrite(this.start,this.end,`[].concat( ${this.argumentsArrayAlias} )`):(e.overwrite(this.start,t.argument.start,\"[].concat( \"),e.overwrite(t.end,this.end,\" )\")))}else spread(e,this.elements,this.start,this.argumentsArrayAlias)&&e.overwrite(this.end-1,this.end,\")\")}super.transpile(e,t)}},ArrowFunctionExpression:class extends ce{initialise(e){this.body.createScope(),super.initialise(e)}transpile(e,t){const n=1===this.params.length&&this.start===this.params[0].start;if(t.arrow||this.needsArguments(t)){let r=this.body.start;for(;\"=\"!==e.original[r];)r-=1;e.remove(r,this.body.start),super.transpile(e,t),n&&(e.prependRight(this.params[0].start,\"(\"),e.appendLeft(this.params[0].end,\")\")),this.parent&&\"ExpressionStatement\"===this.parent.type?e.prependRight(this.start,\"!function\"):e.prependRight(this.start,\"function \")}else super.transpile(e,t);t.trailingFunctionCommas&&this.params.length&&!n&&removeTrailingComma(e,this.params[this.params.length-1].end)}needsArguments(e){return e.spreadRest&&this.params.filter(e=>\"RestElement\"===e.type).length>0}},AssignmentExpression:class extends ce{initialise(e){if(\"Identifier\"===this.left.type){const e=this.findScope(!1).findDeclaration(this.left.name);if(e&&\"const\"===e.kind)throw new pe(`${this.left.name} is read-only`,this.left);const t=e&&e.node.ancestor(3);t&&\"ForStatement\"===t.type&&t.body.contains(this)&&(t.reassigned[this.left.name]=!0)}super.initialise(e)}transpile(e,t){\"**=\"===this.operator&&t.exponentiation?this.transpileExponentiation(e,t):/Pattern/.test(this.left.type)&&t.destructuring&&this.transpileDestructuring(e,t),super.transpile(e,t)}transpileDestructuring(e){const t=this.findScope(!0),n=t.createIdentifier(\"assign\"),r=[n],i=this.start;let a=\"\";function use(t){e.prependRight(t.start,a),e.move(t.start,t.end,i),a=\"\"}function write(e){a+=e}write(`(${n} = `),use(this.right);function destructure(n,i,a){if(\"Identifier\"===n.type||\"MemberExpression\"===n.type)write(\", \"),use(n),write(` = ${i}`);else if(\"AssignmentPattern\"===n.type)if(\"Identifier\"===n.left.type){e.remove(n.start,n.right.start);const t=n.left.name;let r=i;a||(write(`, ${t} = ${i}`),r=t),write(`, ${t} = ${r} === void 0 ? `),use(n.right),write(` : ${r}`)}else{e.remove(n.left.end,n.right.start);const o=t.createIdentifier(\"temp\");let s=i;r.push(o),a||(write(`, ${o} = ${i}`),s=o),write(`, ${o} = ${s} === void 0 ? `),use(n.right),write(` : ${s}`),destructure(n.left,o,!0)}else if(\"ArrayPattern\"===n.type){const o=n.elements;if(1===o.length)e.remove(n.start,o[0].start),destructure(o[0],`${i}[0]`,!1),e.remove(o[0].end,n.end);else{if(!a){const e=t.createIdentifier(\"array\");r.push(e),write(`, ${e} = ${i}`),i=e}let s=n.start;o.forEach((t,n)=>{t&&(e.remove(s,t.start),s=t.end,\"RestElement\"===t.type?(e.remove(t.start,t.argument.start),destructure(t.argument,`${i}.slice(${n})`,!1)):destructure(t,`${i}[${n}]`,!1))}),e.remove(s,n.end)}}else{if(\"ObjectPattern\"!==n.type)throw new Error(`Unexpected node type in destructuring assignment (${n.type})`);{const o=n.properties;if(1==o.length){const t=o[0],r=t.computed||\"Identifier\"!==t.key.type?`${i}[${e.slice(t.key.start,t.key.end)}]`:`${i}.${t.key.name}`;e.remove(n.start,t.value.start),destructure(t.value,r,!1),e.remove(t.end,n.end)}else{if(!a){const e=t.createIdentifier(\"obj\");r.push(e),write(`, ${e} = ${i}`),i=e}let s=n.start;o.forEach(t=>{const n=t.computed||\"Identifier\"!==t.key.type?`${i}[${e.slice(t.key.start,t.key.end)}]`:`${i}.${t.key.name}`;e.remove(s,t.value.start),s=t.end,destructure(t.value,n,!1)}),e.remove(s,n.end)}}}}destructure(this.left,n,!0),e.remove(this.left.end,this.right.start),\"ExpressionStatement\"===this.unparenthesizedParent().type?e.prependRight(i,`${a})`):e.prependRight(i,`${a}, ${n})`);const o=this.findNearest(/(?:Statement|Declaration)$/);e.appendLeft(o.start,`var ${r.join(\", \")};\\n${o.getIndentation()}`)}transpileExponentiation(e){const t=this.findScope(!1),n=e=>{const n=t.findDeclaration(e);return n?n.name:e};let r=this.left.end;for(;\"*\"!==e.original[r];)r+=1;e.remove(r,r+2);let i;const a=this.left.unparenthesize();if(\"Identifier\"===a.type)i=n(a.name);else if(\"MemberExpression\"===a.type){let r,o,s=!1,l=!1;const u=this.findNearest(/(?:Statement|Declaration)$/),c=u.getIndentation();if(\"Identifier\"===a.property.type?o=a.computed?n(a.property.name):a.property.name:(o=t.createIdentifier(\"property\"),l=!0),\"Identifier\"===a.object.type?r=n(a.object.name):(r=t.createIdentifier(\"object\"),s=!0),a.start===u.start)s&&l?(e.prependRight(u.start,`var ${r} = `),e.overwrite(a.object.end,a.property.start,`;\\n${c}var ${o} = `),e.overwrite(a.property.end,a.end,`;\\n${c}${r}[${o}]`)):s?(e.prependRight(u.start,`var ${r} = `),e.appendLeft(a.object.end,`;\\n${c}`),e.appendLeft(a.object.end,r)):l&&(e.prependRight(a.property.start,`var ${o} = `),e.appendLeft(a.property.end,`;\\n${c}`),e.move(a.property.start,a.property.end,this.start),e.appendLeft(a.object.end,`[${o}]`),e.remove(a.object.end,a.property.start),e.remove(a.property.end,a.end));else{let t=[];s&&t.push(r),l&&t.push(o),t.length&&e.prependRight(u.start,`var ${t.join(\", \")};\\n${c}`),s&&l?(e.prependRight(a.start,`( ${r} = `),e.overwrite(a.object.end,a.property.start,`, ${o} = `),e.overwrite(a.property.end,a.end,`, ${r}[${o}]`)):s?(e.prependRight(a.start,`( ${r} = `),e.appendLeft(a.object.end,`, ${r}`)):l&&(e.prependRight(a.property.start,`( ${o} = `),e.appendLeft(a.property.end,\", \"),e.move(a.property.start,a.property.end,a.start),e.overwrite(a.object.end,a.property.start,`[${o}]`),e.remove(a.property.end,a.end)),l&&e.appendLeft(this.end,\" )\")}i=r+(a.computed||l?`[${o}]`:`.${o}`)}e.prependRight(this.right.start,`Math.pow( ${i}, `),e.appendLeft(this.right.end,\" )\")}},BinaryExpression:class extends ce{transpile(e,t){\"**\"===this.operator&&t.exponentiation&&(e.prependRight(this.start,\"Math.pow( \"),e.overwrite(this.left.end,this.right.start,\", \"),e.appendLeft(this.end,\" )\")),super.transpile(e,t)}},BreakStatement:class extends ce{initialise(){const e=this.findNearest(he),t=this.findNearest(\"SwitchCase\");e&&(!t||e.depth>t.depth)&&(e.canBreak=!0,this.loop=e)}transpile(e){if(this.loop&&this.loop.shouldRewriteAsFunction){if(this.label)throw new pe(\"Labels are not currently supported in a loop with locally-scoped variables\",this);e.overwrite(this.start,this.start+5,\"return 'break'\")}}},CallExpression:class extends ce{initialise(e){if(e.spreadRest&&this.arguments.length>1){const e=this.findLexicalBoundary();let t=this.arguments.length;for(;t--;){const n=this.arguments[t];\"SpreadElement\"===n.type&&isArguments(n.argument)&&(this.argumentsArrayAlias=e.getArgumentsArrayAlias())}}super.initialise(e)}transpile(e,t){if(t.spreadRest&&this.arguments.length){let t,n=!1;const r=this.arguments[0];if(1===this.arguments.length?\"SpreadElement\"===r.type&&(e.remove(r.start,r.argument.start),n=!0):n=spread(e,this.arguments,r.start,this.argumentsArrayAlias),n){let n=null;if(\"Super\"===this.callee.type?n=this.callee:\"MemberExpression\"===this.callee.type&&\"Super\"===this.callee.object.type&&(n=this.callee.object),n||\"MemberExpression\"!==this.callee.type)t=\"void 0\";else if(\"Identifier\"===this.callee.object.type)t=this.callee.object.name;else{t=this.findScope(!0).createIdentifier(\"ref\");const n=this.callee.object,r=n.findNearest(/Function/),i=r?r.body.body:n.findNearest(/^Program$/).body,a=i[i.length-1],o=a.getIndentation();e.prependRight(n.start,`(${t} = `),e.appendLeft(n.end,\")\"),e.appendLeft(a.end,`\\n${o}var ${t};`)}e.appendLeft(this.callee.end,\".apply\"),n?(n.noCall=!0,this.arguments.length>1&&(\"SpreadElement\"!==r.type&&e.prependRight(r.start,\"[ \"),e.appendLeft(this.arguments[this.arguments.length-1].end,\" )\"))):1===this.arguments.length?e.prependRight(r.start,`${t}, `):(\"SpreadElement\"===r.type?e.appendLeft(r.start,`${t}, `):e.appendLeft(r.start,`${t}, [ `),e.appendLeft(this.arguments[this.arguments.length-1].end,\" )\"))}}t.trailingFunctionCommas&&this.arguments.length&&removeTrailingComma(e,this.arguments[this.arguments.length-1].end),super.transpile(e,t)}},ClassBody:class extends ce{transpile(e,t,n,r){if(t.classes){const t=this.parent.name,i=e.getIndentString(),a=this.getIndentation()+(n?i:\"\"),o=a+i,s=findIndex(this.body,e=>\"constructor\"===e.kind),l=this.body[s];let u=\"\",c=\"\";if(this.body.length?(e.remove(this.start,this.body[0].start),e.remove(this.body[this.body.length-1].end,this.end)):e.remove(this.start,this.end),l){l.value.body.isConstructorBody=!0;const t=this.body[s-1],r=this.body[s+1];s>0&&(e.remove(t.end,l.start),e.move(l.start,r?r.start:this.end-1,this.body[0].start)),n||e.appendLeft(l.end,\";\")}let p=!1!==this.program.options.namedFunctionExpressions,h=p||this.parent.superClass||\"ClassDeclaration\"!==this.parent.type;if(this.parent.superClass){let e=`if ( ${r} ) ${t}.__proto__ = ${r};\\n${a}${t}.prototype = Object.create( ${r} && ${r}.prototype );\\n${a}${t}.prototype.constructor = ${t};`;u+=l?`\\n\\n${a}`+e:(e=`function ${t} () {`+(r?`\\n${o}${r}.apply(this, arguments);\\n${a}}`:\"}\")+(n?\"\":\";\")+(this.body.length?`\\n\\n${a}`:\"\")+e)+`\\n\\n${a}`}else if(!l){let e=\"function \"+(h?t+\" \":\"\")+\"() {}\";\"ClassDeclaration\"===this.parent.type&&(e+=\";\"),this.body.length&&(e+=`\\n\\n${a}`),u+=e}const f=this.findScope(!1);let d,m,g=[],y=[];if(this.body.forEach((n,r)=>{if(\"constructor\"===n.kind){let r=h?\" \"+t:\"\";return void e.overwrite(n.key.start,n.key.end,`function${r}`)}if(n.static){const t=\" \"==e.original[n.start+6]?7:6;e.remove(n.start,n.start+t)}const i=\"method\"!==n.kind;let o,l=n.key.name;(fe[l]||n.value.body.scope.references[l])&&(l=f.createIdentifier(l));let u=!1;if(n.computed||\"Literal\"!==n.key.type||(u=!0,n.computed=!0),i){if(n.computed)throw new Error(\"Computed accessor properties are not currently supported\");e.remove(n.start,n.key.start),n.static?(~y.indexOf(n.key.name)||y.push(n.key.name),m||(m=f.createIdentifier(\"staticAccessors\")),o=`${m}`):(~g.indexOf(n.key.name)||g.push(n.key.name),d||(d=f.createIdentifier(\"prototypeAccessors\")),o=`${d}`)}else o=n.static?`${t}`:`${t}.prototype`;n.computed||(o+=\".\"),(s>0&&r===s+1||0===r&&s===this.body.length-1)&&(o=`\\n\\n${a}${o}`);let c=n.key.end;if(n.computed)if(u)e.prependRight(n.key.start,\"[\"),e.appendLeft(n.key.end,\"]\");else{for(;\"]\"!==e.original[c];)c+=1;c+=1}const v=n.computed||i||!p?\"\":`${l} `,b=(i?`.${n.kind}`:\"\")+\" = function\"+(n.value.generator?\"* \":\" \")+v;e.remove(c,n.value.start),e.prependRight(n.value.start,b),e.appendLeft(n.end,\";\"),n.value.generator&&e.remove(n.start,n.key.start),e.prependRight(n.start,o)}),g.length||y.length){let e=[],n=[];g.length&&(e.push(`var ${d} = { ${g.map(e=>`${e}: { configurable: true }`).join(\",\")} };`),n.push(`Object.defineProperties( ${t}.prototype, ${d} );`)),y.length&&(e.push(`var ${m} = { ${y.map(e=>`${e}: { configurable: true }`).join(\",\")} };`),n.push(`Object.defineProperties( ${t}, ${m} );`)),l&&(u+=`\\n\\n${a}`),u+=e.join(`\\n${a}`),l||(u+=`\\n\\n${a}`),c+=`\\n\\n${a}`+n.join(`\\n${a}`)}l?e.appendLeft(l.end,u):e.prependRight(this.start,u),e.appendLeft(this.end,c)}super.transpile(e,t)}},ClassDeclaration:class extends ce{initialise(e){this.id?(this.name=this.id.name,this.findScope(!0).addDeclaration(this.id,\"class\")):this.name=this.findScope(!0).createIdentifier(\"defaultExport\"),super.initialise(e)}transpile(e,t){if(t.classes){this.superClass||function deindent(e,t){const n=e.start,r=e.end,i=t.getIndentString(),a=i.length,o=n-a;e.program.indentExclusions[o]||t.original.slice(o,n)!==i||t.remove(o,n);const s=new RegExp(i+\"\\\\S\",\"g\"),l=t.original.slice(n,r);let u;for(;u=s.exec(l);){const r=n+u.index;e.program.indentExclusions[r]||t.remove(r,r+a)}}(this.body,e);const n=this.superClass&&(this.superClass.name||\"superclass\"),r=this.getIndentation(),i=r+e.getIndentString(),a=\"ExportDefaultDeclaration\"===this.parent.type;a&&e.remove(this.parent.start,this.start);let o=this.start;this.id?(e.overwrite(o,this.id.start,\"var \"),o=this.id.end):e.prependLeft(o,`var ${this.name}`),this.superClass?this.superClass.end===this.body.start?(e.remove(o,this.superClass.start),e.appendLeft(o,` = (function (${n}) {\\n${i}`)):(e.overwrite(o,this.superClass.start,\" = \"),e.overwrite(this.superClass.end,this.body.start,`(function (${n}) {\\n${i}`)):o===this.body.start?e.appendLeft(o,\" = \"):e.overwrite(o,this.body.start,\" = \"),this.body.transpile(e,t,!!this.superClass,n);const s=a?`\\n\\n${r}export default ${this.name};`:\"\";this.superClass?(e.appendLeft(this.end,`\\n\\n${i}return ${this.name};\\n${r}}(`),e.move(this.superClass.start,this.superClass.end,this.end),e.prependRight(this.end,`));${s}`)):s&&e.prependRight(this.end,s)}else this.body.transpile(e,t,!1,null)}},ClassExpression:class extends ce{initialise(e){this.name=(this.id?this.id.name:\"VariableDeclarator\"===this.parent.type?this.parent.id.name:\"AssignmentExpression\"!==this.parent.type?null:\"Identifier\"===this.parent.left.type?this.parent.left.name:\"MemberExpression\"===this.parent.left.type?this.parent.left.property.name:null)||this.findScope(!0).createIdentifier(\"anonymous\"),super.initialise(e)}transpile(e,t){if(t.classes){const n=this.superClass&&(this.superClass.name||\"superclass\"),r=this.getIndentation(),i=r+e.getIndentString();this.superClass?(e.remove(this.start,this.superClass.start),e.remove(this.superClass.end,this.body.start),e.appendLeft(this.start,`(function (${n}) {\\n${i}`)):e.overwrite(this.start,this.body.start,`(function () {\\n${i}`),this.body.transpile(e,t,!0,n);const a=`\\n\\n${i}return ${this.name};\\n${r}}(`;this.superClass?(e.appendLeft(this.end,a),e.move(this.superClass.start,this.superClass.end,this.end),e.prependRight(this.end,\"))\")):e.appendLeft(this.end,`\\n\\n${i}return ${this.name};\\n${r}}())`)}else this.body.transpile(e,t,!1)}},ContinueStatement:class extends ce{transpile(e){const t=this.findNearest(he);if(t.shouldRewriteAsFunction){if(this.label)throw new pe(\"Labels are not currently supported in a loop with locally-scoped variables\",this);e.overwrite(this.start,this.start+8,\"return\")}}},DoWhileStatement:de,ExportNamedDeclaration:class extends ce{initialise(e){if(e.moduleExport)throw new pe(\"export is not supported\",this);super.initialise(e)}},ExportDefaultDeclaration:class extends ce{initialise(e){if(e.moduleExport)throw new pe(\"export is not supported\",this);super.initialise(e)}},ForStatement:class extends de{findScope(e){return e||!this.createdScope?this.parent.findScope(e):this.body.scope}transpile(e,t){const n=this.getIndentation()+e.getIndentString();if(this.shouldRewriteAsFunction){const t=\"VariableDeclaration\"===this.init.type?[].concat.apply([],this.init.declarations.map(e=>extractNames(e.id))):[],r=this.aliases;this.args=t.map(e=>e in this.aliases?this.aliases[e].outer:e),this.params=t.map(e=>e in this.aliases?this.aliases[e].inner:e);const i=Object.keys(this.reassigned).map(e=>`${r[e].outer} = ${r[e].inner};`);if(i.length)if(this.body.synthetic)e.appendLeft(this.body.body[0].end,`; ${i.join(\" \")}`);else{const t=this.body.body[this.body.body.length-1];e.appendLeft(t.end,`\\n\\n${n}${i.join(`\\n${n}`)}`)}}super.transpile(e,t)}},ForInStatement:class extends de{findScope(e){return e||!this.createdScope?this.parent.findScope(e):this.body.scope}transpile(e,t){if(this.shouldRewriteAsFunction){const e=\"VariableDeclaration\"===this.left.type?[].concat.apply([],this.left.declarations.map(e=>extractNames(e.id))):[];this.args=e.map(e=>e in this.aliases?this.aliases[e].outer:e),this.params=e.map(e=>e in this.aliases?this.aliases[e].inner:e)}super.transpile(e,t)}},ForOfStatement:class extends de{initialise(e){if(e.forOf&&!e.dangerousForOf)throw new pe(\"for...of statements are not supported. Use `transforms: { forOf: false }` to skip transformation and disable this error, or `transforms: { dangerousForOf: true }` if you know what you're doing\",this);super.initialise(e)}transpile(e,t){if(super.transpile(e,t),!t.dangerousForOf)return;if(!this.body.body[0])return void(\"VariableDeclaration\"===this.left.type&&\"var\"===this.left.kind?(e.remove(this.start,this.left.start),e.appendLeft(this.left.end,\";\"),e.remove(this.left.end,this.end)):e.remove(this.start,this.end));const n=this.findScope(!0),r=this.getIndentation(),i=r+e.getIndentString(),a=n.createIdentifier(\"i\"),o=n.createIdentifier(\"list\");this.body.synthetic&&(e.prependRight(this.left.start,`{\\n${i}`),e.appendLeft(this.body.body[0].end,`\\n${r}}`));const s=this.body.body[0].start;e.remove(this.left.end,this.right.start),e.move(this.left.start,this.left.end,s),e.prependRight(this.right.start,`var ${a} = 0, ${o} = `),e.appendLeft(this.right.end,`; ${a} < ${o}.length; ${a} += 1`);const l=\"VariableDeclaration\"===this.left.type&&this.left.declarations[0];if(l&&\"Identifier\"!==l.id.type){let t=[];const r=n.createIdentifier(\"ref\");destructure(e,n,l.id,r,!1,t);let u=`;\\n${i}`;t.forEach((e,n)=>{n===t.length-1&&(u=`;\\n\\n${i}`),e(s,\"\",u)}),e.appendLeft(this.left.start+this.left.kind.length+1,r),e.appendLeft(this.left.end,` = ${o}[${a}];\\n${i}`)}else e.appendLeft(this.left.end,` = ${o}[${a}];\\n\\n${i}`)}},FunctionDeclaration:class extends ce{initialise(e){if(this.generator&&e.generator)throw new pe(\"Generators are not supported\",this);this.body.createScope(),this.id&&this.findScope(!0).addDeclaration(this.id,\"function\"),super.initialise(e)}transpile(e,t){super.transpile(e,t),t.trailingFunctionCommas&&this.params.length&&removeTrailingComma(e,this.params[this.params.length-1].end)}},FunctionExpression:class extends ce{initialise(e){if(this.generator&&e.generator)throw new pe(\"Generators are not supported\",this);this.body.createScope(),this.id&&this.body.scope.addDeclaration(this.id,\"function\"),super.initialise(e);const t=this.parent;let n;if(e.conciseMethodProperty&&\"Property\"===t.type&&\"init\"===t.kind&&t.method&&\"Identifier\"===t.key.type?n=t.key.name:e.classes&&\"MethodDefinition\"===t.type&&\"method\"===t.kind&&\"Identifier\"===t.key.type?n=t.key.name:this.id&&\"Identifier\"===this.id.type&&(n=this.id.alias||this.id.name),n)for(var r=0,i=this.params;r<i.length;r+=1){const e=i[r];if(\"Identifier\"===e.type&&n===e.name){const t=this.body.scope,r=t.declarations[n],i=t.createIdentifier(n);e.alias=i;for(var a=0,o=r.instances;a<o.length;a+=1)o[a].alias=i;break}}}transpile(e,t){super.transpile(e,t),t.trailingFunctionCommas&&this.params.length&&removeTrailingComma(e,this.params[this.params.length-1].end)}},Identifier:class extends ce{findScope(e){return this.parent.params&&~this.parent.params.indexOf(this)?this.parent.body.scope:\"FunctionExpression\"===this.parent.type&&this===this.parent.id?this.parent.body.scope:this.parent.findScope(e)}initialise(e){if(e.arrow&&function isReference(e,t){return\"MemberExpression\"===e.type?!e.computed&&isReference(e.object,e):\"Identifier\"===e.type?!t||!/(Function|Class)Expression/.test(t.type)&&(\"VariableDeclarator\"===t.type?e===t.init:\"MemberExpression\"===t.type||\"MethodDefinition\"===t.type?t.computed||e===t.object:\"ArrayPattern\"!==t.type&&(\"Property\"===t.type?\"ObjectPattern\"!==t.parent.type&&(t.computed||e===t.value):\"MethodDefinition\"!==t.type&&(\"ExportSpecifier\"!==t.type||e===t.local))):void 0}(this,this.parent)){if(\"arguments\"===this.name&&!this.findScope(!1).contains(this.name)){const e=this.findLexicalBoundary(),t=this.findNearest(\"ArrowFunctionExpression\"),n=this.findNearest(he);t&&t.depth>e.depth&&(this.alias=e.getArgumentsAlias()),n&&n.body.contains(this)&&n.depth>e.depth&&(this.alias=e.getArgumentsAlias())}this.findScope(!1).addReference(this)}}transpile(e){this.alias&&e.overwrite(this.start,this.end,this.alias,{storeName:!0,contentOnly:!0})}},IfStatement:class extends ce{initialise(e){super.initialise(e)}transpile(e,t){(\"BlockStatement\"!==this.consequent.type||\"BlockStatement\"===this.consequent.type&&this.consequent.synthetic)&&(e.appendLeft(this.consequent.start,\"{ \"),e.prependRight(this.consequent.end,\" }\")),this.alternate&&\"IfStatement\"!==this.alternate.type&&(\"BlockStatement\"!==this.alternate.type||\"BlockStatement\"===this.alternate.type&&this.alternate.synthetic)&&(e.appendLeft(this.alternate.start,\"{ \"),e.prependRight(this.alternate.end,\" }\")),super.transpile(e,t)}},ImportDeclaration:class extends ce{initialise(e){if(e.moduleImport)throw new pe(\"import is not supported\",this);super.initialise(e)}},ImportDefaultSpecifier:class extends ce{initialise(e){this.findScope(!0).addDeclaration(this.local,\"import\"),super.initialise(e)}},ImportSpecifier:class extends ce{initialise(e){this.findScope(!0).addDeclaration(this.local,\"import\"),super.initialise(e)}},JSXAttribute:class extends ce{transpile(e,t){const n=this.name;var r=n.start,i=n.name;const a=this.value?this.value.start:this.name.end;e.overwrite(r,a,`${ye(i)}: ${be(this.value)}`),super.transpile(e,t)}},JSXClosingElement:class extends ce{transpile(e){let t=!0;const n=this.parent.children[this.parent.children.length-1];(n&&function containsNewLine(e){return\"Literal\"===e.type&&!/\\S/.test(e.value)&&/\\n/.test(e.value)}(n)||this.parent.openingElement.attributes.length)&&(t=!1),e.overwrite(this.start,this.end,t?\" )\":\")\")}},JSXElement:class extends ce{transpile(e,t){super.transpile(e,t);const n=this.children.filter(e=>\"Literal\"!==e.type||/\\S/.test(e.raw)||!/\\n/.test(e.raw));if(n.length){let t,a=this.openingElement.end;for(t=0;t<n.length;t+=1){const o=n[t];if(\"JSXExpressionContainer\"===o.type&&\"JSXEmptyExpression\"===o.expression.type);else{const t=\"\\n\"===e.original[a]&&\"Literal\"!==o.type?\"\":\" \";e.appendLeft(a,`,${t}`)}if(\"Literal\"===o.type){const a=(r=o.raw,i=t===n.length-1,i&&/\\n/.test(r)&&(r=r.replace(/\\s+$/,\"\")),r=r.replace(/^\\n\\r?\\s+/,\"\").replace(/\\s*\\n\\r?\\s*/gm,\" \"),JSON.stringify(r));e.overwrite(o.start,o.end,a)}a=o.end}}var r,i}},JSXExpressionContainer:class extends ce{transpile(e,t){e.remove(this.start,this.expression.start),e.remove(this.expression.end,this.end),super.transpile(e,t)}},JSXOpeningElement:class extends ce{transpile(e,t){super.transpile(e,t),e.overwrite(this.start,this.name.start,`${this.program.jsx}( `);const n=\"JSXIdentifier\"===this.name.type&&this.name.name[0]===this.name.name[0].toLowerCase();n&&e.prependRight(this.name.start,\"'\");const r=this.attributes.length;let i=this.name.end;if(r){let t,a=!1;for(t=0;t<r;t+=1)if(\"JSXSpreadAttribute\"===this.attributes[t].type){a=!0;break}for(i=this.attributes[0].end,t=0;t<r;t+=1){const n=this.attributes[t];if(t>0&&(n.start===i?e.prependRight(i,\", \"):e.overwrite(i,n.start,\", \")),a&&\"JSXSpreadAttribute\"!==n.type){const r=this.attributes[t-1],i=this.attributes[t+1];r&&\"JSXSpreadAttribute\"!==r.type||e.prependRight(n.start,\"{ \"),i&&\"JSXSpreadAttribute\"!==i.type||e.appendLeft(n.end,\" }\")}i=n.end}let o,s;if(a)if(1===r)s=n?\"',\":\",\";else{if(!this.program.options.objectAssign)throw new pe(\"Mixed JSX attributes ending in spread requires specified objectAssign option with 'Object.assign' or polyfill helper.\",this);s=n?`', ${this.program.options.objectAssign}({},`:`, ${this.program.options.objectAssign}({},`,o=\")\"}else s=n?\"', {\":\", {\",o=\" }\";e.prependRight(this.name.end,s),o&&e.appendLeft(this.attributes[r-1].end,o)}else e.appendLeft(this.name.end,n?\"', null\":\", null\"),i=this.name.end;this.selfClosing?e.overwrite(i,this.end,this.attributes.length?\")\":\" )\"):e.remove(i,this.end)}},JSXSpreadAttribute:class extends ce{transpile(e,t){e.remove(this.start,this.argument.start),e.remove(this.argument.end,this.end),super.transpile(e,t)}},Literal:class extends ce{initialise(){\"string\"==typeof this.value&&this.program.indentExclusionElements.push(this)}transpile(e,t){if(t.numericLiteral){const t=this.raw.slice(0,2);\"0b\"!==t&&\"0o\"!==t||e.overwrite(this.start,this.end,String(this.value),{storeName:!0,contentOnly:!0})}if(this.regex){const i=this.regex;var n=i.pattern,r=i.flags;if(t.stickyRegExp&&/y/.test(r))throw new pe(\"Regular expression sticky flag is not supported\",this);t.unicodeRegExp&&/u/.test(r)&&e.overwrite(this.start,this.end,`/${je(n,r)}/${r.replace(\"u\",\"\")}`,{contentOnly:!0})}}},MemberExpression:class extends ce{transpile(e,t){t.reservedProperties&&fe[this.property.name]&&(e.overwrite(this.object.end,this.property.start,\"['\"),e.appendLeft(this.property.end,\"']\")),super.transpile(e,t)}},NewExpression:class extends ce{initialise(e){if(e.spreadRest&&this.arguments.length){const e=this.findLexicalBoundary();let t=this.arguments.length;for(;t--;){const n=this.arguments[t];if(\"SpreadElement\"===n.type&&isArguments(n.argument)){this.argumentsArrayAlias=e.getArgumentsArrayAlias();break}}}super.initialise(e)}transpile(e,t){if(t.spreadRest&&this.arguments.length){const t=this.arguments[0];spread(e,this.arguments,t.start,this.argumentsArrayAlias,!0)&&(e.prependRight(this.start+\"new\".length,\" (Function.prototype.bind.apply(\"),e.overwrite(this.callee.end,t.start,\", [ null ].concat( \"),e.appendLeft(this.end,\" ))\"))}super.transpile(e,t)}},ObjectExpression:class extends ce{transpile(e,t){super.transpile(e,t);let n=this.start+1,r=0,i=0,a=0,o=null,s=null;for(let e=0;e<this.properties.length;++e){const t=this.properties[e];\"SpreadElement\"===t.type?(i+=1,null===o&&(o=e)):t.computed?(a+=1,null===s&&(s=e)):\"Property\"===t.type&&(r+=1)}if(i){if(!this.program.options.objectAssign)throw new pe(\"Object spread operator requires specified objectAssign option with 'Object.assign' or polyfill helper.\",this);let t=this.properties.length;if(r&&!a)for(;t--;){const n=this.properties[t];if(\"Property\"===n.type&&!n.computed){const r=this.properties[t-1],i=this.properties[t+1];r&&\"Property\"===r.type&&!r.computed||e.prependRight(n.start,\"{\"),i&&\"Property\"===i.type&&!i.computed||e.appendLeft(n.end,\"}\")}}n=this.properties[0].start,a?\"SpreadElement\"===this.properties[0].type?(e.overwrite(this.start,n,`${this.program.options.objectAssign}({}, `),e.remove(this.end-1,this.end),e.appendRight(this.end,\")\")):(e.prependLeft(this.start,`${this.program.options.objectAssign}(`),e.appendRight(this.end,\")\")):(e.overwrite(this.start,n,`${this.program.options.objectAssign}({}, `),e.overwrite(this.properties[this.properties.length-1].end,this.end,\")\"))}if(a&&t.computedProperty){const r=this.getIndentation();let l,u;\"VariableDeclarator\"===this.parent.type&&1===this.parent.parent.declarations.length&&\"Identifier\"===this.parent.id.type?(l=!0,u=this.parent.id.alias||this.parent.id.name):\"AssignmentExpression\"===this.parent.type&&\"ExpressionStatement\"===this.parent.parent.type&&\"Identifier\"===this.parent.left.type?(l=!0,u=this.parent.left.alias||this.parent.left.name):\"AssignmentPattern\"===this.parent.type&&\"Identifier\"===this.parent.left.type&&(l=!0,u=this.parent.left.alias||this.parent.left.name),i&&(l=!1);const c=this.findScope(!1).findDeclaration(u);c&&(u=c.name);const p=n,h=this.end;l||(null===o||s<o?(u=this.findLexicalBoundary().declareIdentifier(\"obj\"),e.prependRight(this.start,`( ${u} = `)):u=null);const f=this.properties.length;let d,m=!1,g=!0;for(let n=0;n<f;n+=1){const a=this.properties[n];let o=n>0?this.properties[n-1].end:p;if(\"Property\"===a.type&&(a.computed||d&&!i)){if(0===n&&(o=this.start+1),d=a,u){const t=(l?`;\\n${r}${u}`:`, ${u}`)+(a.computed?\"\":\".\");o<a.start?e.overwrite(o,a.start,t):e.prependRight(a.start,t)}else{const t=(u=this.findLexicalBoundary().declareIdentifier(\"obj\"))+(a.computed?\"\":\".\");e.appendRight(a.start,`( ${u} = {}, ${t}`)}let i=a.key.end;if(a.computed){for(;\"]\"!==e.original[i];)i+=1;i+=1}a.shorthand?e.overwrite(a.start,a.key.end,e.slice(a.start,a.key.end).replace(/:/,\" =\")):(a.value.start>i&&e.remove(i,a.value.start),e.appendLeft(i,\" = \")),a.method&&t.conciseMethodProperty&&e.prependRight(a.value.start,\"function \")}else\"SpreadElement\"===a.type?u&&n>0&&(d||(d=this.properties[n-1]),e.appendLeft(d.end,`, ${u} )`),d=null,u=null):(!g&&i&&(e.prependRight(a.start,\"{\"),e.appendLeft(a.end,\"}\")),m=!0);if(g&&(\"SpreadElement\"===a.type||a.computed)){let t=m?this.properties[this.properties.length-1].end:this.end-1;\",\"==e.original[t]&&++t;const n=e.slice(t,h);e.prependLeft(o,n),e.remove(t,h),g=!1}let s=a.end;if(n<f-1&&!m)for(;\",\"!==e.original[s];)s+=1;else n==f-1&&(s=this.end);e.remove(a.end,s)}a===f&&e.remove(this.properties[f-1].end,this.end-1),!l&&u&&e.appendLeft(d.end,`, ${u} )`)}}},Property:class extends ce{transpile(e,t){if(super.transpile(e,t),t.conciseMethodProperty&&!this.computed&&\"ObjectPattern\"!==this.parent.type)if(this.shorthand)e.prependRight(this.start,`${this.key.name}: `);else if(this.method){let t=\"\";!1!==this.program.options.namedFunctionExpressions&&(t=\" \"+(t=\"Literal\"===this.key.type&&\"number\"==typeof this.key.value?\"\":\"Identifier\"===this.key.type?fe[this.key.name]||!/^[a-z_$][a-z0-9_$]*$/i.test(this.key.name)||this.value.body.scope.references[this.key.name]?this.findScope(!0).createIdentifier(this.key.name):this.key.name:this.findScope(!0).createIdentifier(this.key.value))),this.value.generator&&e.remove(this.start,this.key.start),e.appendLeft(this.key.end,`: function${this.value.generator?\"*\":\"\"}${t}`)}t.reservedProperties&&fe[this.key.name]&&(e.prependRight(this.key.start,\"'\"),e.appendLeft(this.key.end,\"'\"))}},ReturnStatement:class extends ce{initialise(e){this.loop=this.findNearest(he),this.nearestFunction=this.findNearest(/Function/),this.loop&&(!this.nearestFunction||this.loop.depth>this.nearestFunction.depth)&&(this.loop.canReturn=!0,this.shouldWrap=!0),this.argument&&this.argument.initialise(e)}transpile(e,t){const n=this.shouldWrap&&this.loop&&this.loop.shouldRewriteAsFunction;this.argument?(n&&e.prependRight(this.argument.start,\"{ v: \"),this.argument.transpile(e,t),n&&e.appendLeft(this.argument.end,\" }\")):n&&e.appendLeft(this.start+6,\" {}\")}},SpreadElement:class extends ce{transpile(e,t){\"ObjectExpression\"==this.parent.type&&(e.remove(this.start,this.argument.start),e.remove(this.argument.end,this.end)),super.transpile(e,t)}},Super:class extends ce{initialise(e){if(e.classes){if(this.method=this.findNearest(\"MethodDefinition\"),!this.method)throw new pe(this,\"use of super outside class method\");const e=this.findNearest(\"ClassBody\").parent;if(this.superClassName=e.superClass&&(e.superClass.name||\"superclass\"),!this.superClassName)throw new pe(\"super used in base class\",this);if(this.isCalled=\"CallExpression\"===this.parent.type&&this===this.parent.callee,\"constructor\"!==this.method.kind&&this.isCalled)throw new pe(\"super() not allowed outside class constructor\",this);if(this.isMember=\"MemberExpression\"===this.parent.type,!this.isCalled&&!this.isMember)throw new pe(\"Unexpected use of `super` (expected `super(...)` or `super.*`)\",this)}if(e.arrow){const e=this.findLexicalBoundary(),t=this.findNearest(\"ArrowFunctionExpression\"),n=this.findNearest(he);t&&t.depth>e.depth&&(this.thisAlias=e.getThisAlias()),n&&n.body.contains(this)&&n.depth>e.depth&&(this.thisAlias=e.getThisAlias())}}transpile(e,t){if(t.classes){const t=this.isCalled||this.method.static?this.superClassName:`${this.superClassName}.prototype`;e.overwrite(this.start,this.end,t,{storeName:!0,contentOnly:!0});const n=this.isCalled?this.parent:this.parent.parent;if(n&&\"CallExpression\"===n.type){this.noCall||e.appendLeft(n.callee.end,\".call\");const t=this.thisAlias||\"this\";n.arguments.length?e.appendLeft(n.arguments[0].start,`${t}, `):e.appendLeft(n.end-1,`${t}`)}}}},TaggedTemplateExpression:class extends ce{initialise(e){if(e.templateString&&!e.dangerousTaggedTemplateString)throw new pe(\"Tagged template strings are not supported. Use `transforms: { templateString: false }` to skip transformation and disable this error, or `transforms: { dangerousTaggedTemplateString: true }` if you know what you're doing\",this);super.initialise(e)}transpile(e,t){if(t.templateString&&t.dangerousTaggedTemplateString){const t=this.quasi.expressions.concat(this.quasi.quasis).sort((e,t)=>e.start-t.start),n=this.quasi.quasis.map(e=>JSON.stringify(e.value.cooked));e.overwrite(this.tag.end,t[0].start,`([${n.join(\", \")}]`);let r=t[0].start;t.forEach(t=>{\"TemplateElement\"===t.type?e.remove(r,t.end):e.overwrite(r,t.start,\", \"),r=t.end}),e.overwrite(r,this.end,\")\")}super.transpile(e,t)}},TemplateElement:class extends ce{initialise(){this.program.indentExclusionElements.push(this)}},TemplateLiteral:class extends ce{transpile(e,t){if(super.transpile(e,t),t.templateString&&\"TaggedTemplateExpression\"!==this.parent.type){let t=this.expressions.concat(this.quasis).sort((e,t)=>e.start-t.start||e.end-t.end).filter((e,t)=>\"TemplateElement\"!==e.type||!!e.value.raw||!t);if(t.length>=3){const e=t[0];var n=t[2];\"TemplateElement\"===e.type&&\"\"===e.value.raw&&\"TemplateElement\"===n.type&&t.shift()}const r=!(1===this.quasis.length&&0===this.expressions.length||\"TemplateLiteral\"===this.parent.type||\"AssignmentExpression\"===this.parent.type||\"AssignmentPattern\"===this.parent.type||\"VariableDeclarator\"===this.parent.type||\"BinaryExpression\"===this.parent.type&&\"+\"===this.parent.operator);r&&e.appendRight(this.start,\"(\");let i=this.start;t.forEach((t,n)=>{let a=0===n?r?\"(\":\"\":\" + \";if(\"TemplateElement\"===t.type)e.overwrite(i,t.end,a+JSON.stringify(t.value.cooked));else{const n=\"Identifier\"!==t.type;n&&(a+=\"(\"),e.remove(i,t.start),a&&e.prependRight(t.start,a),n&&e.appendLeft(t.end,\")\")}i=t.end}),r&&e.appendLeft(i,\")\"),e.remove(i,this.end)}}},ThisExpression:class extends ce{initialise(e){if(e.arrow){const e=this.findLexicalBoundary(),t=this.findNearest(\"ArrowFunctionExpression\"),n=this.findNearest(he);(t&&t.depth>e.depth||n&&n.body.contains(this)&&n.depth>e.depth||n&&n.right&&n.right.contains(this))&&(this.alias=e.getThisAlias())}}transpile(e){this.alias&&e.overwrite(this.start,this.end,this.alias,{storeName:!0,contentOnly:!0})}},UpdateExpression:class extends ce{initialise(e){if(\"Identifier\"===this.argument.type){const e=this.findScope(!1).findDeclaration(this.argument.name);if(e&&\"const\"===e.kind)throw new pe(`${this.argument.name} is read-only`,this);const t=e&&e.node.ancestor(3);t&&\"ForStatement\"===t.type&&t.body.contains(this)&&(t.reassigned[this.argument.name]=!0)}super.initialise(e)}},VariableDeclaration:class extends ce{initialise(e){this.scope=this.findScope(\"var\"===this.kind),this.declarations.forEach(t=>t.initialise(e))}transpile(e,t){const n=this.getIndentation();let r=this.kind;if(t.letConst&&\"var\"!==r&&(r=\"var\",e.overwrite(this.start,this.start+this.kind.length,r,{storeName:!0})),t.destructuring&&\"ForOfStatement\"!==this.parent.type){let r,i=this.start;this.declarations.forEach((a,o)=>{if(a.transpile(e,t),\"Identifier\"===a.id.type)o>0&&\"Identifier\"!==this.declarations[o-1].id.type&&e.overwrite(i,a.id.start,\"var \");else{const t=he.test(this.parent.type);0===o?e.remove(i,a.id.start):e.overwrite(i,a.id.start,`;\\n${n}`);const r=\"Identifier\"===a.init.type&&!a.init.rewritten,s=r?a.init.name:a.findScope(!0).createIdentifier(\"ref\");i=a.start;let l=[];r?e.remove(a.id.end,a.end):l.push((t,n,r)=>{e.prependRight(a.id.end,`var ${s}`),e.appendLeft(a.init.end,`${r}`),e.move(a.id.end,a.end,t)}),destructure(e,a.findScope(!1),a.id,s,t,l);let u=t?\"var \":\"\",c=t?\", \":`;\\n${n}`;l.forEach((e,n)=>{o===this.declarations.length-1&&n===l.length-1&&(c=t?\"\":\";\"),e(a.start,0===n?u:\"\",c)})}i=a.end,r=\"Identifier\"!==a.id.type}),r&&this.end>i&&e.overwrite(i,this.end,\"\",{contentOnly:!0})}else this.declarations.forEach(n=>{n.transpile(e,t)})}},VariableDeclarator:class extends ce{initialise(e){let t=this.parent.kind;\"let\"===t&&\"ForStatement\"===this.parent.parent.type&&(t=\"for.let\"),this.parent.scope.addDeclaration(this.id,t),super.initialise(e)}transpile(e,t){if(!this.init&&t.letConst&&\"var\"!==this.parent.kind){let t=this.findNearest(/Function|^For(In|Of)?Statement|^(?:Do)?WhileStatement/);!t||/Function/.test(t.type)||this.isLeftDeclaratorOfLoop()||e.appendLeft(this.id.end,\" = (void 0)\")}this.id&&this.id.transpile(e,t),this.init&&this.init.transpile(e,t)}isLeftDeclaratorOfLoop(){return this.parent&&\"VariableDeclaration\"===this.parent.type&&this.parent.parent&&(\"ForInStatement\"===this.parent.parent.type||\"ForOfStatement\"===this.parent.parent.type)&&this.parent.parent.left&&this.parent.parent.left.declarations[0]===this}},WhileStatement:de};const Ie={IfStatement:\"consequent\",ForStatement:\"body\",ForInStatement:\"body\",ForOfStatement:\"body\",WhileStatement:\"body\",DoWhileStatement:\"body\",ArrowFunctionExpression:\"body\"};function wrap(e,t){if(!e)return;if(\"length\"in e){let n=e.length;for(;n--;)wrap(e[n],t);return}if(e.__wrapped)return;e.__wrapped=!0,ue[e.type]||(ue[e.type]=Object.keys(e).filter(t=>\"object\"==typeof e[t]));const n=Ie[e.type];if(n&&\"BlockStatement\"!==e[n].type){const t=e[n];e[n]={start:t.start,end:t.end,type:\"BlockStatement\",body:[t],synthetic:!0}}new ce(e,t);const r=(\"BlockStatement\"===e.type?Le:Ae[e.type])||ce;e.__proto__=r.prototype}function Scope(e){e=e||{},this.parent=e.parent,this.isBlockScope=!!e.block;let t=this;for(;t.isBlockScope;)t=t.parent;this.functionScope=t,this.identifiers=[],this.declarations=Object.create(null),this.references=Object.create(null),this.blockScopedDeclarations=this.isBlockScope?null:Object.create(null),this.aliases=this.isBlockScope?null:Object.create(null)}Scope.prototype={addDeclaration(e,t){for(var n=0,r=extractNames(e);n<r.length;n+=1){const e=r[n],i=e.name,a={name:i,node:e,kind:t,instances:[]};this.declarations[i]=a,this.isBlockScope&&(this.functionScope.blockScopedDeclarations[i]||(this.functionScope.blockScopedDeclarations[i]=[]),this.functionScope.blockScopedDeclarations[i].push(a))}},addReference(e){this.consolidated?this.consolidateReference(e):this.identifiers.push(e)},consolidate(){for(let e=0;e<this.identifiers.length;e+=1){const t=this.identifiers[e];this.consolidateReference(t)}this.consolidated=!0},consolidateReference(e){const t=this.declarations[e.name];t?t.instances.push(e):(this.references[e.name]=!0,this.parent&&this.parent.addReference(e))},contains(e){return this.declarations[e]||!!this.parent&&this.parent.contains(e)},createIdentifier(e){\"number\"==typeof e&&(e=e.toString());let t=e=e.replace(/\\s/g,\"\").replace(/\\[([^\\]]+)\\]/g,\"_$1\").replace(/[^a-zA-Z0-9_$]/g,\"_\").replace(/_{2,}/,\"_\"),n=1;for(;this.declarations[t]||this.references[t]||this.aliases[t]||t in fe;)t=`${e}$${n++}`;return this.aliases[t]=!0,t},findDeclaration(e){return this.declarations[e]||this.parent&&this.parent.findDeclaration(e)}};class Le extends ce{createScope(){this.parentIsFunction=/Function/.test(this.parent.type),this.isFunctionBlock=this.parentIsFunction||\"Root\"===this.parent.type,this.scope=new Scope({block:!this.isFunctionBlock,parent:this.parent.findScope(!1)}),this.parentIsFunction&&this.parent.params.forEach(e=>{this.scope.addDeclaration(e,\"param\")})}initialise(e){this.thisAlias=null,this.argumentsAlias=null,this.defaultParameters=[],this.createdDeclarations=[],this.scope||this.createScope(),this.body.forEach(t=>t.initialise(e)),this.scope.consolidate()}findLexicalBoundary(){return\"Program\"===this.type?this:/^Function/.test(this.parent.type)?this:this.parent.findLexicalBoundary()}findScope(e){return e&&!this.isFunctionBlock?this.parent.findScope(e):this.scope}getArgumentsAlias(){return this.argumentsAlias||(this.argumentsAlias=this.scope.createIdentifier(\"arguments\")),this.argumentsAlias}getArgumentsArrayAlias(){return this.argumentsArrayAlias||(this.argumentsArrayAlias=this.scope.createIdentifier(\"argsArray\")),this.argumentsArrayAlias}getThisAlias(){return this.thisAlias||(this.thisAlias=this.scope.createIdentifier(\"this\")),this.thisAlias}getIndentation(){if(void 0===this.indentation){const e=this.program.magicString.original,t=this.synthetic||!this.body.length;let n=t?this.start:this.body[0].start;for(;n&&\"\\n\"!==e[n];)n-=1;for(this.indentation=\"\";;){const t=e[n+=1];if(\" \"!==t&&\"\\t\"!==t)break;this.indentation+=t}const r=this.program.magicString.getIndentString();let i=this.parent;for(;i;)\"constructor\"!==i.kind||i.parent.parent.superClass||(this.indentation=this.indentation.replace(r,\"\")),i=i.parent;t&&(this.indentation+=r)}return this.indentation}transpile(e,t){const n=this.getIndentation();let r=[];if(this.argumentsAlias&&r.push((t,n,r)=>{const i=`${n}var ${this.argumentsAlias} = arguments${r}`;e.appendLeft(t,i)}),this.thisAlias&&r.push((t,n,r)=>{const i=`${n}var ${this.thisAlias} = this${r}`;e.appendLeft(t,i)}),this.argumentsArrayAlias&&r.push((t,r,i)=>{const a=this.scope.createIdentifier(\"i\"),o=`${r}var ${a} = arguments.length, ${this.argumentsArrayAlias} = Array(${a});\\n${n}while ( ${a}-- ) ${this.argumentsArrayAlias}[${a}] = arguments[${a}]${i}`;e.appendLeft(t,o)}),/Function/.test(this.parent.type)&&this.transpileParameters(e,t,n,r),t.letConst&&this.isFunctionBlock&&this.transpileBlockScopedIdentifiers(e),super.transpile(e,t),this.createdDeclarations.length&&r.push((t,n,r)=>{const i=`${n}var ${this.createdDeclarations.join(\", \")}${r}`;e.appendLeft(t,i)}),this.synthetic)if(\"ArrowFunctionExpression\"===this.parent.type){const i=this.body[0];r.length?(e.appendLeft(this.start,\"{\").prependRight(this.end,`${this.parent.getIndentation()}}`),e.prependRight(i.start,`\\n${n}return `),e.appendLeft(i.end,\";\\n\")):t.arrow&&(e.prependRight(i.start,\"{ return \"),e.appendLeft(i.end,\"; }\"))}else r.length&&e.prependRight(this.start,\"{\").appendLeft(this.end,\"}\");let i;i=function isUseStrict(e){return!!e&&\"ExpressionStatement\"===e.type&&\"Literal\"===e.expression.type&&\"use strict\"===e.expression.value}(this.body[0])?this.body[0].end:this.synthetic||\"Root\"===this.parent.type?this.start:this.start+1;let a=`\\n${n}`,o=\";\";r.forEach((e,t)=>{t===r.length-1&&(o=\";\\n\"),e(i,a,o)})}declareIdentifier(e){const t=this.scope.createIdentifier(e);return this.createdDeclarations.push(t),t}transpileParameters(e,t,n,r){const i=this.parent.params;i.forEach(a=>{if(\"AssignmentPattern\"===a.type&&\"Identifier\"===a.left.type)t.defaultParameter&&r.push((t,n,r)=>{const i=`${n}if ( ${a.left.name} === void 0 ) ${a.left.name}`;e.prependRight(a.left.end,i).move(a.left.end,a.right.end,t).appendLeft(a.right.end,r)});else if(\"RestElement\"===a.type)t.spreadRest&&r.push((t,r,o)=>{const s=i[i.length-2];if(s)e.remove(s?s.end:a.start,a.end);else{let t=a.start,n=a.end;for(;/\\s/.test(e.original[t-1]);)t-=1;for(;/\\s/.test(e.original[n]);)n+=1;e.remove(t,n)}const l=a.argument.name,u=this.scope.createIdentifier(\"len\"),c=i.length-1;c?e.prependRight(t,`${r}var ${l} = [], ${u} = arguments.length - ${c};\\n${n}while ( ${u}-- > 0 ) ${l}[ ${u} ] = arguments[ ${u} + ${c} ]${o}`):e.prependRight(t,`${r}var ${l} = [], ${u} = arguments.length;\\n${n}while ( ${u}-- ) ${l}[ ${u} ] = arguments[ ${u} ]${o}`)});else if(\"Identifier\"!==a.type&&t.parameterDestructuring){const t=this.scope.createIdentifier(\"ref\");destructure(e,this.scope,a,t,!1,r),e.prependRight(a.start,t)}})}transpileBlockScopedIdentifiers(e){Object.keys(this.scope.blockScopedDeclarations).forEach(t=>{for(var n=0,r=this.scope.blockScopedDeclarations[t];n<r.length;n+=1){let l=r[n],u=!1;if(\"for.let\"===l.kind){const n=l.node.findNearest(\"ForStatement\");if(n.shouldRewriteAsFunction){const r=this.scope.createIdentifier(t),o=n.reassigned[t]?this.scope.createIdentifier(t):t;l.name=r,e.overwrite(l.node.start,l.node.end,r,{storeName:!0}),n.aliases[t]={outer:r,inner:o};for(var i=0,a=l.instances;i<a.length;i+=1){const s=a[i],l=n.body.contains(s)?o:r;t!==l&&e.overwrite(s.start,s.end,l,{storeName:!0})}u=!0}}if(!u){const n=this.scope.createIdentifier(t);if(t!==n){l.name=n,e.overwrite(l.node.start,l.node.end,n,{storeName:!0});for(var o=0,s=l.instances;o<s.length;o+=1){const t=s[o];t.rewritten=!0,e.overwrite(t.start,t.end,n,{storeName:!0})}}}}})}}function Program(e,t,n,r){this.type=\"Root\",this.jsx=r.jsx||\"React.createElement\",this.options=r,this.source=e,this.magicString=new MagicString$1(e),this.ast=t,this.depth=0,wrap(this.body=t,this),this.body.__proto__=Le.prototype,this.indentExclusionElements=[],this.body.initialise(n),this.indentExclusions=Object.create(null);for(var i=0,a=this.indentExclusionElements;i<a.length;i+=1){const e=a[i];for(let t=e.start;t<e.end;t+=1)this.indentExclusions[t]=!0}this.body.transpile(this.magicString,n)}Program.prototype={export(e){return void 0===e&&(e={}),{code:this.magicString.toString(),map:this.magicString.generateMap({file:e.file,source:e.source,includeContent:!1!==e.includeContent})}},findNearest:()=>null,findScope:()=>null};const Ne={chrome:{48:1333689725,49:1342078975,50:1610514431,51:1610514431,52:2147385343},firefox:{43:1207307741,44:1207307741,45:1207307741,46:1476267485,47:1476296671,48:1476296671},safari:{8:1073741824,9:1328940894},ie:{8:0,9:1073741824,10:1073741824,11:1073770592},edge:{12:1591620701,13:1608399967},node:{\"0.10\":1075052608,.12:1091830852,4:1327398527,5:1327398527,6:1610514431}},Me=[\"arrow\",\"classes\",\"collections\",\"computedProperty\",\"conciseMethodProperty\",\"constLoop\",\"constRedef\",\"defaultParameter\",\"destructuring\",\"extendNatives\",\"forOf\",\"generator\",\"letConst\",\"letLoop\",\"letLoopScope\",\"moduleExport\",\"moduleImport\",\"numericLiteral\",\"objectProto\",\"objectSuper\",\"oldOctalLiteral\",\"parameterDestructuring\",\"spreadRest\",\"stickyRegExp\",\"symbol\",\"templateString\",\"unicodeEscape\",\"unicodeIdentifier\",\"unicodeRegExp\",\"exponentiation\",\"reservedProperties\",\"trailingFunctionCommas\"];var De=[function(e){if(\"5\"!==e.version.substr(0,1))throw new Error(\"Unsupported acorn version \"+e.version+\", please use acorn 5\");var t=e.tokTypes,n=e.Parser.prototype;function parseObj(e,n){let r=this.startNode(),i=!0,a={};for(r.properties=[],this.next();!this.eat(t.braceR);){if(i)i=!1;else if(this.expect(t.comma),this.afterTrailingComma(t.braceR))break;let o,s,l,u,c=this.startNode();if(this.options.ecmaVersion>=6){if(this.type===t.ellipsis){e?(this.next(),c.argument=this.parseIdent(),this.finishNode(c,\"RestElement\")):c=this.parseSpread(n),r.properties.push(c),this.type===t.comma&&(e?this.raise(this.start,\"Comma is not permitted after the rest element\"):n&&n.trailingComma<0&&(n.trailingComma=this.start));continue}c.method=!1,c.shorthand=!1,(e||n)&&(l=this.start,u=this.startLoc),e||(o=this.eat(t.star))}this.parsePropertyName(c),!e&&this.options.ecmaVersion>=8&&!o&&this.isAsyncProp(c)?(s=!0,this.parsePropertyName(c,n)):s=!1,this.parsePropertyValue(c,e,o,s,l,u,n),e||this.checkPropClash(c,a),r.properties.push(this.finishNode(c,\"Property\"))}return this.finishNode(r,e?\"ObjectPattern\":\"ObjectExpression\")}const r=e=>(function(t,n,r){if(\"ObjectPattern\"!=t.type)return\"Property\"===t.type?this.checkLVal(t.value,n,r):e.apply(this,arguments);for(let e of t.properties)this.checkLVal(e,n,r)});return e.plugins.objectSpread=function objectSpreadPlugin(e){n.parseObj=parseObj,e.extend(\"checkLVal\",r),e.extend(\"toAssignable\",e=>(function(t,n){if(this.options.ecmaVersion>=6&&t){if(\"ObjectExpression\"==t.type){t.type=\"ObjectPattern\";for(let e of t.properties)this.toAssignable(e,n);return t}if(\"Property\"===t.type)return\"init\"!==t.kind&&this.raise(t.key.start,\"Object pattern can't contain getter or setter\"),this.toAssignable(t.value,n);if(\"SpreadElement\"===t.type)return t.type=\"RestElement\",this.toAssignable(t.argument,n)}return e.apply(this,arguments)})),e.extend(\"checkPatternExport\",e=>(function(t,n){if(\"ObjectPattern\"!=n.type)return\"Property\"===n.type?this.checkPatternExport(t,n.value):\"RestElement\"===n.type?this.checkPatternExport(t,n.argument):void e.apply(this,arguments);for(let e of n.properties)this.checkPatternExport(t,e)}))},e},function(e){var t=e.tokTypes,n=e.tokContexts;n.j_oTag=new e.TokContext(\"<tag\",!1),n.j_cTag=new e.TokContext(\"</tag\",!1),n.j_expr=new e.TokContext(\"<tag>...</tag>\",!0,!0),t.jsxName=new e.TokenType(\"jsxName\"),t.jsxText=new e.TokenType(\"jsxText\",{beforeExpr:!0}),t.jsxTagStart=new e.TokenType(\"jsxTagStart\"),t.jsxTagEnd=new e.TokenType(\"jsxTagEnd\"),t.jsxTagStart.updateContext=function(){this.context.push(n.j_expr),this.context.push(n.j_oTag),this.exprAllowed=!1},t.jsxTagEnd.updateContext=function(e){var r=this.context.pop();r===n.j_oTag&&e===t.slash||r===n.j_cTag?(this.context.pop(),this.exprAllowed=this.curContext()===n.j_expr):this.exprAllowed=!0};var r=e.Parser.prototype;r.jsx_readToken=function(){for(var n=\"\",r=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,\"Unterminated JSX contents\");var i=this.input.charCodeAt(this.pos);switch(i){case 60:case 123:return this.pos===this.start?60===i&&this.exprAllowed?(++this.pos,this.finishToken(t.jsxTagStart)):this.getTokenFromCode(i):(n+=this.input.slice(r,this.pos),this.finishToken(t.jsxText,n));case 38:n+=this.input.slice(r,this.pos),n+=this.jsx_readEntity(),r=this.pos;break;default:e.isNewLine(i)?(n+=this.input.slice(r,this.pos),n+=this.jsx_readNewLine(!0),r=this.pos):++this.pos}}},r.jsx_readNewLine=function(e){var t,n=this.input.charCodeAt(this.pos);return++this.pos,13===n&&10===this.input.charCodeAt(this.pos)?(++this.pos,t=e?\"\\n\":\"\\r\\n\"):t=String.fromCharCode(n),this.options.locations&&(++this.curLine,this.lineStart=this.pos),t},r.jsx_readString=function(n){for(var r=\"\",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,\"Unterminated string constant\");var a=this.input.charCodeAt(this.pos);if(a===n)break;38===a?(r+=this.input.slice(i,this.pos),r+=this.jsx_readEntity(),i=this.pos):e.isNewLine(a)?(r+=this.input.slice(i,this.pos),r+=this.jsx_readNewLine(!1),i=this.pos):++this.pos}return r+=this.input.slice(i,this.pos++),this.finishToken(t.string,r)},r.jsx_readEntity=function(){var e,t=\"\",n=0,r=this.input[this.pos];\"&\"!==r&&this.raise(this.pos,\"Entity must start with an ampersand\");for(var i=++this.pos;this.pos<this.input.length&&n++<10;){if(\";\"===(r=this.input[this.pos++])){\"#\"===t[0]?\"x\"===t[1]?(t=t.substr(2),re.test(t)&&(e=String.fromCharCode(parseInt(t,16)))):(t=t.substr(1),ie.test(t)&&(e=String.fromCharCode(parseInt(t,10)))):e=ne[t];break}t+=r}return e||(this.pos=i,\"&\")},r.jsx_readWord=function(){var n,r=this.pos;do{n=this.input.charCodeAt(++this.pos)}while(e.isIdentifierChar(n)||45===n);return this.finishToken(t.jsxName,this.input.slice(r,this.pos))};function getQualifiedJSXName(e){return\"JSXIdentifier\"===e.type?e.name:\"JSXNamespacedName\"===e.type?e.namespace.name+\":\"+e.name.name:\"JSXMemberExpression\"===e.type?getQualifiedJSXName(e.object)+\".\"+getQualifiedJSXName(e.property):void 0}return r.jsx_parseIdentifier=function(){var e=this.startNode();return this.type===t.jsxName?e.name=this.value:this.type.keyword?e.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(e,\"JSXIdentifier\")},r.jsx_parseNamespacedName=function(){var e=this.start,n=this.startLoc,r=this.jsx_parseIdentifier();if(!this.options.plugins.jsx.allowNamespaces||!this.eat(t.colon))return r;var i=this.startNodeAt(e,n);return i.namespace=r,i.name=this.jsx_parseIdentifier(),this.finishNode(i,\"JSXNamespacedName\")},r.jsx_parseElementName=function(){var e=this.start,n=this.startLoc,r=this.jsx_parseNamespacedName();for(this.type!==t.dot||\"JSXNamespacedName\"!==r.type||this.options.plugins.jsx.allowNamespacedObjects||this.unexpected();this.eat(t.dot);){var i=this.startNodeAt(e,n);i.object=r,i.property=this.jsx_parseIdentifier(),r=this.finishNode(i,\"JSXMemberExpression\")}return r},r.jsx_parseAttributeValue=function(){switch(this.type){case t.braceL:var e=this.jsx_parseExpressionContainer();return\"JSXEmptyExpression\"===e.expression.type&&this.raise(e.start,\"JSX attributes must only be assigned a non-empty expression\"),e;case t.jsxTagStart:case t.string:return this.parseExprAtom();default:this.raise(this.start,\"JSX value should be either an expression or a quoted JSX text\")}},r.jsx_parseEmptyExpression=function(){var e=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(e,\"JSXEmptyExpression\",this.start,this.startLoc)},r.jsx_parseExpressionContainer=function(){var e=this.startNode();return this.next(),e.expression=this.type===t.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(t.braceR),this.finishNode(e,\"JSXExpressionContainer\")},r.jsx_parseAttribute=function(){var e=this.startNode();return this.eat(t.braceL)?(this.expect(t.ellipsis),e.argument=this.parseMaybeAssign(),this.expect(t.braceR),this.finishNode(e,\"JSXSpreadAttribute\")):(e.name=this.jsx_parseNamespacedName(),e.value=this.eat(t.eq)?this.jsx_parseAttributeValue():null,this.finishNode(e,\"JSXAttribute\"))},r.jsx_parseOpeningElementAt=function(e,n){var r=this.startNodeAt(e,n);for(r.attributes=[],r.name=this.jsx_parseElementName();this.type!==t.slash&&this.type!==t.jsxTagEnd;)r.attributes.push(this.jsx_parseAttribute());return r.selfClosing=this.eat(t.slash),this.expect(t.jsxTagEnd),this.finishNode(r,\"JSXOpeningElement\")},r.jsx_parseClosingElementAt=function(e,n){var r=this.startNodeAt(e,n);return r.name=this.jsx_parseElementName(),this.expect(t.jsxTagEnd),this.finishNode(r,\"JSXClosingElement\")},r.jsx_parseElementAt=function(e,n){var r=this.startNodeAt(e,n),i=[],a=this.jsx_parseOpeningElementAt(e,n),o=null;if(!a.selfClosing){e:for(;;)switch(this.type){case t.jsxTagStart:if(e=this.start,n=this.startLoc,this.next(),this.eat(t.slash)){o=this.jsx_parseClosingElementAt(e,n);break e}i.push(this.jsx_parseElementAt(e,n));break;case t.jsxText:i.push(this.parseExprAtom());break;case t.braceL:i.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}getQualifiedJSXName(o.name)!==getQualifiedJSXName(a.name)&&this.raise(o.start,\"Expected corresponding JSX closing tag for <\"+getQualifiedJSXName(a.name)+\">\")}return r.openingElement=a,r.closingElement=o,r.children=i,this.type===t.relational&&\"<\"===this.value&&this.raise(this.start,\"Adjacent JSX elements must be wrapped in an enclosing tag\"),this.finishNode(r,\"JSXElement\")},r.jsx_parseElement=function(){var e=this.start,t=this.startLoc;return this.next(),this.jsx_parseElementAt(e,t)},e.plugins.jsx=function(r,i){i&&(\"object\"!=typeof i&&(i={}),r.options.plugins.jsx={allowNamespaces:!1!==i.allowNamespaces,allowNamespacedObjects:!!i.allowNamespacedObjects},r.extend(\"parseExprAtom\",function(e){return function(n){return this.type===t.jsxText?this.parseLiteral(this.value):this.type===t.jsxTagStart?this.jsx_parseElement():e.call(this,n)}}),r.extend(\"readToken\",function(r){return function(i){var a=this.curContext();if(a===n.j_expr)return this.jsx_readToken();if(a===n.j_oTag||a===n.j_cTag){if(e.isIdentifierStart(i))return this.jsx_readWord();if(62==i)return++this.pos,this.finishToken(t.jsxTagEnd);if((34===i||39===i)&&a==n.j_oTag)return this.jsx_readString(i)}return 60===i&&this.exprAllowed?(++this.pos,this.finishToken(t.jsxTagStart)):r.call(this,i)}}),r.extend(\"updateContext\",function(e){return function(r){if(this.type==t.braceL){var i=this.curContext();i==n.j_oTag?this.context.push(n.b_expr):i==n.j_expr?this.context.push(n.b_tmpl):e.call(this,r),this.exprAllowed=!0}else{if(this.type!==t.slash||r!==t.jsxTagStart)return e.call(this,r);this.context.length-=2,this.context.push(n.j_cTag),this.exprAllowed=!1}}}))},e}].reduce((e,t)=>t(e),te).parse;const Be=[\"dangerousTaggedTemplateString\",\"dangerousForOf\"];function target(e){let t=Object.keys(e).length?4294967295:1073741824;Object.keys(e).forEach(n=>{const r=Ne[n];if(!r)throw new Error(`Unknown environment '${n}'. Please raise an issue at https://github.com/Rich-Harris/buble/issues`);const i=e[n];if(!(i in r))throw new Error(`Support data exists for the following versions of ${n}: ${Object.keys(r).join(\", \")}. Please raise an issue at https://github.com/Rich-Harris/buble/issues`);const a=r[i];t&=a});let n=Object.create(null);return Me.forEach((e,r)=>{n[e]=!(t&1<<r)}),Be.forEach(e=>{n[e]=!1}),n}t.target=target,t.transform=function transform(e,t){void 0===t&&(t={});let n,r=null;try{n=De(e,{ecmaVersion:8,preserveParens:!0,sourceType:\"module\",onComment:(e,t)=>{if(!r){let e=/@jsx\\s+([^\\s]+)/.exec(t);e&&(r=e[1])}},plugins:{jsx:!0,objectSpread:!0}}),t.jsx=r||t.jsx}catch(t){throw t.snippet=getSnippet(e,t.loc),t.toString=(()=>`${t.name}: ${t.message}\\n${t.snippet}`),t}let i=target(t.target||{});return Object.keys(t.transforms||{}).forEach(e=>{if(\"modules\"===e)return\"moduleImport\"in t.transforms||(i.moduleImport=t.transforms.modules),void(\"moduleExport\"in t.transforms||(i.moduleExport=t.transforms.modules));if(!(e in i))throw new Error(`Unknown transform '${e}'`);i[e]=t.transforms[e]}),new Program(e,n,i,t).export(t)},t.VERSION=\"0.18.0\",Object.defineProperty(t,\"__esModule\",{value:!0})})(t)}).call(t,n(81).Buffer,n(7))},function(e,t,n){\"use strict\";var r=n(339);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(2);function PlaygroundErrorRenderer(e){var t=e.classes,n=e.message;return i.a.createElement(\"pre\",{className:t.root},n)}PlaygroundErrorRenderer.propTypes={classes:o.a.object.isRequired,message:o.a.string.isRequired},t.a=Object(s.a)(function styles(e){var t=e.fontFamily,n=e.fontSize,r=e.color;return{root:{margin:0,lineHeight:1.2,fontSize:n.small,fontFamily:t.monospace,color:r.error,whiteSpace:\"pre\"}}})(PlaygroundErrorRenderer)},function(e,t,n){\"use strict\";var r=n(341);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(0),i=(n.n(r),n(1)),a=n.n(i),o=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}();var s=function(e){!function _inherits(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(Wrapper,r[\"Component\"]);function Wrapper(){return function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,Wrapper),function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,(Wrapper.__proto__||Object.getPrototypeOf(Wrapper)).apply(this,arguments))}return o(Wrapper,[{key:\"componentDidCatch\",value:function componentDidCatch(e){this.props.onError(e)}},{key:\"render\",value:function render(){return this.props.children}}]),Wrapper}();s.propTypes={children:a.a.node.isRequired,onError:a.a.func.isRequired},t.a=s},function(e,t,n){\"use strict\";t.a=Slot;var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function Slot(e,t){var n=e.name,r=e.active,a=e.onlyActive,o=e.className,l=e.props,u=void 0===l?{}:l,c=t.slots,p=c[n];if(!p)throw new Error('Slot \"'+n+'\" not found, available slots: '+Object.keys(c).join(\", \"));var h=p.map(function(e,t){var n=e,o=n.id,l=n.render;if(o&&l){if(a&&o!==r)return null;var c=u.onClick;u=s({},u,{name:o,active:r&&o===r,onClick:c&&function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.apply(void 0,[o].concat(t))}}),e=l}return i.a.createElement(e,s({key:t},u))}).filter(Boolean);return 0===h.length?null:i.a.createElement(\"div\",{className:o},h)}Slot.propTypes={name:o.a.string.isRequired,active:o.a.string,onlyActive:o.a.bool,props:o.a.object,className:o.a.string},Slot.contextTypes={slots:o.a.object.isRequired}},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(6),l=n.n(s),u=n(2),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function PlaygroundRenderer(e){var t=e.classes,n=e.name,r=e.preview,a=e.previewProps,o=e.tabButtons,s=e.tabBody,u=e.toolbar,p=a.className,h=function _objectWithoutProperties(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(a,[\"className\"]);return i.a.createElement(\"div\",{className:t.root},i.a.createElement(\"div\",c({className:l()(t.preview,p)},h,{\"data-preview\":n}),r),i.a.createElement(\"div\",{className:t.controls},i.a.createElement(\"div\",{className:t.tabs},o),i.a.createElement(\"div\",{className:t.toolbar},u)),i.a.createElement(\"div\",{className:t.tab},s))}PlaygroundRenderer.propTypes={classes:o.a.object.isRequired,name:o.a.string.isRequired,preview:o.a.node.isRequired,previewProps:o.a.object.isRequired,tabButtons:o.a.node.isRequired,tabBody:o.a.node.isRequired,toolbar:o.a.node.isRequired},t.a=Object(u.a)(function styles(e){var t=e.space,n=e.color,r=e.borderRadius;return{root:{marginBottom:t[4]},preview:{padding:t[2],border:[[1,n.border,\"solid\"]],borderRadius:r},controls:{display:\"flex\",alignItems:\"center\"},toolbar:{marginLeft:\"auto\"},tab:{}}})(PlaygroundRenderer)},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(2);function ExamplesRenderer(e){var t=e.classes,n=e.children;return i.a.createElement(\"article\",{className:t.root},n)}ExamplesRenderer.propTypes={classes:o.a.object.isRequired,children:o.a.node},t.a=Object(s.a)(function styles(){return{root:{}}})(ExamplesRenderer)},function(e,t,n){\"use strict\";var r=n(346);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";t.a=Components;var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(347),l=n(356);function Components(e){var t=e.components,n=e.depth;return i.a.createElement(l.a,null,t.map(function(e){return i.a.createElement(s.a,{key:e.filepath,component:e,depth:n})}))}Components.propTypes={components:o.a.array.isRequired,depth:o.a.number.isRequired}},function(e,t,n){\"use strict\";var r=n(348);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(102),l=n(103),u=n(56),c=n(10),p=n(58),h=n(351),f=n(32),d=n(17),m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g=function(){function defineProperties(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,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}();var y=function(){return i.a.createElement(\"div\",null)},v=function(e){!function _inherits(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(ReactComponent,r[\"Component\"]);function ReactComponent(e,t){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,ReactComponent);var n=function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,(ReactComponent.__proto__||Object.getPrototypeOf(ReactComponent)).call(this,e,t)),r=t.config.showUsage;return n.handleTabChange=n.handleTabChange.bind(n),n.state={activeTab:r?f.a:void 0},n}return g(ReactComponent,[{key:\"handleTabChange\",value:function handleTabChange(e){this.setState(function(t){return{activeTab:t.activeTab!==e?e:void 0}})}},{key:\"render\",value:function render(){var e=this.state.activeTab,t=this.context.displayMode,n=this.props,r=n.component,a=n.depth,o=r.name,f=r.slug,g=r.pathLine,v=r.props,b=v.description,_=v.examples,x=void 0===_?[]:_,w=v.tags,k=void 0===w?{}:w;return o?i.a.createElement(h.a,{name:o,slug:f,pathLine:g,docs:i.a.createElement(u.a,k),description:b&&i.a.createElement(c.a,{text:b}),heading:i.a.createElement(l.a,{id:f,deprecated:!!k.deprecated,slotName:\"componentToolbar\",slotProps:m({},r,{isolated:t!==d.a.all}),depth:a},o),examples:x.length>0?i.a.createElement(s.a,{examples:x,name:o}):i.a.createElement(y,{name:o}),tabButtons:i.a.createElement(p.a,{name:\"docsTabButtons\",active:e,props:m({},r,{onClick:this.handleTabChange})}),tabBody:i.a.createElement(p.a,{name:\"docsTabs\",active:e,onlyActive:!0,props:r})}):null}}]),ReactComponent}();v.propTypes={component:o.a.object.isRequired,depth:o.a.number.isRequired},v.contextTypes={config:o.a.object.isRequired,displayMode:o.a.string},t.a=v},function(e,t,n){\"use strict\";t.a=SectionHeading;var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(58),l=n(350),u=n(98),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function SectionHeading(e){var t=e.slotName,n=e.slotProps,r=e.children,a=e.id,o=function _objectWithoutProperties(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,[\"slotName\",\"slotProps\",\"children\",\"id\"]),p=Object(u.a)({slug:a,anchor:!0});return i.a.createElement(l.a,c({toolbar:i.a.createElement(s.a,{name:t,props:n}),id:a,href:p},o),r)}SectionHeading.propTypes={children:o.a.node,id:o.a.string.isRequired,slotName:o.a.string.isRequired,slotProps:o.a.object.isRequired,depth:o.a.number.isRequired,deprecated:o.a.bool}},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(6),l=n.n(s),u=n(53),c=n(2);function SectionHeadingRenderer(e){var t=e.classes,n=e.children,r=e.toolbar,a=e.id,o=e.href,s=e.depth,c=e.deprecated,p=Math.min(6,s),h=l()(t.sectionName,function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t.isDeprecated,c));return i.a.createElement(\"div\",{className:t.wrapper},i.a.createElement(u.a,{level:p,id:a},i.a.createElement(\"a\",{href:o,className:h},n)),i.a.createElement(\"div\",{className:t.toolbar},r))}SectionHeadingRenderer.propTypes={classes:o.a.object.isRequired,children:o.a.node,toolbar:o.a.node,id:o.a.string.isRequired,href:o.a.string.isRequired,depth:o.a.number.isRequired,deprecated:o.a.bool},t.a=Object(c.a)(function styles(e){var t=e.color;return{wrapper:{display:\"flex\",flexDirection:\"row\",alignItems:\"center\",marginBottom:e.space[1]},toolbar:{marginLeft:\"auto\"},sectionName:{\"&:hover, &:active\":{isolate:!1,textDecoration:\"underline\",cursor:\"pointer\"}},isDeprecated:{textDecoration:\"line-through\",color:t.light}}})(SectionHeadingRenderer)},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(352),l=n(2);function ReactComponentRenderer(e){var t=e.classes,n=e.name,r=e.heading,a=e.pathLine,o=e.description,l=e.docs,u=e.examples,c=e.tabButtons,p=e.tabBody;return i.a.createElement(\"div\",{className:t.root,id:n+\"-container\"},i.a.createElement(\"header\",{className:t.header},r,a&&i.a.createElement(s.a,null,a)),(o||l)&&i.a.createElement(\"div\",{className:t.docs},o,l),c&&i.a.createElement(\"div\",{className:t.tabs},i.a.createElement(\"div\",{className:t.tabButtons},c),p),u)}ReactComponentRenderer.propTypes={classes:o.a.object.isRequired,name:o.a.string.isRequired,heading:o.a.node.isRequired,pathLine:o.a.string,tabButtons:o.a.node,tabBody:o.a.node,description:o.a.node,docs:o.a.node,examples:o.a.node,isolated:o.a.bool},t.a=Object(l.a)(function styles(e){var t=e.color,n=e.fontSize,r=e.space;return{root:{marginBottom:r[6]},header:{marginBottom:r[3]},tabs:{marginBottom:r[3]},tabButtons:{marginBottom:r[2]},docs:{color:t.base,fontSize:n.text}}})(ReactComponentRenderer)},function(e,t,n){\"use strict\";var r=n(353);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(354),l=n.n(s),u=n(355),c=n.n(u),p=n(97),h=n(2);function PathlineRenderer(e){var t=e.classes,n=e.children;return i.a.createElement(\"div\",{className:t.pathline},n,i.a.createElement(p.a,{small:!0,className:t.copyButton,onClick:function onClick(){return l()(n)},title:\"Copy to clipboard\"},i.a.createElement(c.a,null)))}PathlineRenderer.propTypes={classes:o.a.object.isRequired,children:o.a.string},t.a=Object(h.a)(function styles(e){var t=e.space,n=e.fontFamily,r=e.fontSize,i=e.color;return{pathline:{fontFamily:n.monospace,fontSize:r.small,color:i.light},copyButton:{marginLeft:t[0]}}})(PathlineRenderer)},function(e,t){e.exports=function clipboardCopy(e){var t=document.createElement(\"span\");t.textContent=e,t.style.whiteSpace=\"pre\";var n=document.createElement(\"iframe\");n.sandbox=\"allow-same-origin\",document.body.appendChild(n);var r=n.contentWindow;r.document.body.appendChild(t);var i=r.getSelection();i||(r=window,i=r.getSelection(),document.body.appendChild(t));var a=r.document.createRange();i.removeAllRanges(),a.selectNode(t),i.addRange(a);var o=!1;try{o=r.document.execCommand(\"copy\")}catch(e){}return i.removeAllRanges(),t.remove(),n.remove(),o}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=_interopRequireDefault(n(0)),a=_interopRequireDefault(n(57));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}t.default=function MdContentCopy(e){return i.default.createElement(a.default,r({viewBox:\"0 0 40 40\"},e),i.default.createElement(\"g\",null,i.default.createElement(\"path\",{d:\"m31.6 35v-23.4h-18.2v23.4h18.2z m0-26.6c1.8 0 3.4 1.4 3.4 3.2v23.4c0 1.8-1.6 3.4-3.4 3.4h-18.2c-1.8 0-3.4-1.6-3.4-3.4v-23.4c0-1.8 1.6-3.2 3.4-3.2h18.2z m-5-6.8v3.4h-20v23.4h-3.2v-23.4c0-1.8 1.4-3.4 3.2-3.4h20z\"})))},e.exports=t.default},function(e,t,n){\"use strict\";t.a=ComponentsRenderer;var r=n(0),i=n.n(r),a=n(1),o=n.n(a);function ComponentsRenderer(e){var t=e.children;return i.a.createElement(\"div\",null,t)}ComponentsRenderer.propTypes={children:o.a.node.isRequired}},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(2),l=n(103);function SectionRenderer(e){var t=e.classes,n=e.name,r=e.slug,a=e.content,o=e.components,s=e.sections,u=e.depth;return i.a.createElement(\"section\",{className:t.root},n&&i.a.createElement(l.a,{depth:u,id:r,slotName:\"sectionToolbar\",slotProps:e},n),a,o,s)}SectionRenderer.propTypes={classes:o.a.object.isRequired,name:o.a.string,slug:o.a.string,content:o.a.node,components:o.a.node,sections:o.a.node,isolated:o.a.bool,depth:o.a.number.isRequired},t.a=Object(s.a)(function styles(e){return{root:{marginBottom:e.space[4]}}})(SectionRenderer)},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(2);function SectionsRenderer(e){var t=e.classes,n=e.children;return i.a.createElement(\"section\",{className:t.root},n)}SectionsRenderer.propTypes={classes:o.a.object.isRequired,children:o.a.node},t.a=Object(s.a)(function styles(){return{root:{}}})(SectionsRenderer)},function(e,t,n){\"use strict\";var r=n(360);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(10),l=n(2),u=n(104);n.n(u);function WelcomeRenderer(e){var t=e.classes,n=e.patterns;return i.a.createElement(\"div\",{className:t.root},i.a.createElement(s.a,{text:\"\\n# Welcome to React Styleguidist!\\n\\n**We couldn’t find any components** using these patterns:\\n\\n\"+n.map(function(e){return\"- `\"+e+\"`\"}).join(\"\\n\")+\"\\n\\nCreate **styleguide.config.js** file in your project root directory like this:\\n\\n    module.exports = {\\n      components: 'src/components/**/*.js'\\n    };\\n\\nRead more in the [locating components guide](\"+u.DOCS_COMPONENTS+\").\\n\\t\\t\\t\\t\"}))}WelcomeRenderer.propTypes={classes:o.a.object.isRequired,patterns:o.a.array.isRequired},t.a=Object(l.a)(function styles(e){var t=e.space;return{root:{maxWidth:e.maxWidth,margin:[[0,\"auto\"]],padding:t[4]}}})(WelcomeRenderer)},function(e,t,n){\"use strict\";var r=n(362);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(2);function ErrorRenderer(e){var t=e.classes,n=e.error,r=e.info;return i.a.createElement(\"div\",{className:t.root},i.a.createElement(\"pre\",{className:t.stack},n.toString(),r.componentStack.toString()),i.a.createElement(\"div\",{className:t.message},i.a.createElement(\"p\",null,\"This may be due to an error in a component you are overriding, or a bug in React Styleguidist.\"),i.a.createElement(\"p\",null,\"If you believe this is a bug, \",i.a.createElement(\"a\",{style:{color:\"inherit\"},href:\"https://github.com/styleguidist/react-styleguidist/issues\"},\"please submit an issue\"),\".\")))}ErrorRenderer.propTypes={classes:o.a.object.isRequired,error:o.a.object.isRequired,info:o.a.shape({componentStack:o.a.object.isRequired}).isRequired},t.a=Object(s.a)(function styles(e){var t=e.fontFamily,n=e.fontSize,r=e.color;return{root:{margin:e.space[2],lineHeight:1.2,fontSize:n.small},stack:{color:r.error,whiteSpace:\"pre\",fontFamily:t.monospace},message:{color:r.error,fontFamily:t.base}}})(ErrorRenderer)},function(e,t,n){\"use strict\";t.a=function getPageTitle(e,t,n){if(n===r.a.component||n===r.a.example)return e[0].components[0].name+\" — \"+t;if(n===r.a.section)return e[0].name+\" — \"+t;return t};var r=n(17)},function(e,t,n){\"use strict\";t.a=function getRouteData(e,t){var n=Object(u.a)(t),r=n.targetName,h=n.targetIndex,f=p.a.all,d=Object(c.a)(e);if(r){var m=Object(o.a)(d,r);if(m.length)d=[{components:m}],f=p.a.component;else{var g=Object(l.a)(d,r);d=g?[g]:[],f=p.a.section}i()(h)&&(1===m.length?(d=[{components:[Object(a.a)(m[0],h)]}],f=p.a.example):1===d.length&&(d=[Object(s.a)(d[0],h)],f=p.a.example))}return{sections:d,displayMode:f}};var r=n(365),i=n.n(r),a=n(366),o=n(367),s=n(369),l=n(370),u=n(371),c=n(374),p=n(17)},function(e,t,n){var r=n(3).isFinite;e.exports=function isFinite(e){return\"number\"==typeof e&&r(e)}},function(e,t,n){\"use strict\";t.a=function filterComponentExamples(e,t){return r({},e,{props:r({},e.props,{examples:[e.props.examples[t]]})})};var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}},function(e,t,n){\"use strict\";t.a=function filterComponentsInSectionsByExactName(e,t){var n=[];e.forEach(function(e){e.components&&n.push.apply(n,_toConsumableArray(Object(r.a)(e.components,t))),e.sections&&n.push.apply(n,_toConsumableArray(filterComponentsInSectionsByExactName(e.sections,t)))});return n};var r=n(368);function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}},function(e,t,n){\"use strict\";t.a=function filterComponentsByExactName(e,t){return e.filter(function(e){return e.name===t})}},function(e,t,n){\"use strict\";t.a=function filterSectionExamples(e,t){return r({},e,{content:[e.content[t]]})};var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}},function(e,t,n){\"use strict\";t.a=function findSection(e,t){var n=e.find(function(e){return e.name===t});if(n)return n;var r=!0;var i=!1;var a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var l=o.value;if(l.sections&&0!==l.sections.length){var u=findSection(l.sections,t);if(u)return u}}}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return}},function(e,t,n){\"use strict\";t.a=function getInfoFromHash(e){if(\"#!/\"===e.substr(0,3)){var t=e.substr(3).split(\"/\"),n=parseInt(t[1],10);return{targetName:t[0],targetIndex:i()(n)?void 0:n}}return{}};var r=n(372),i=n.n(r)},function(e,t,n){var r=n(373);e.exports=function isNaN(e){return r(e)&&e!=+e}},function(e,t,n){var r=n(14),i=n(8),a=\"[object Number]\";e.exports=function isNumber(e){return\"number\"==typeof e||i(e)&&r(e)==a}},function(e,t,n){\"use strict\";t.a=function processSections(e){return e.map(function(e){return i({},e,{components:Object(r.a)(e.components||[]),sections:processSections(e.sections||[])})})};var r=n(375),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}},function(e,t,n){\"use strict\";t.a=function processComponents(e){return e.map(function(e){var t=r({},e,{name:e.props.displayName,props:r({},e.props,{examples:[].concat(_toConsumableArray(e.props.examples||[]),_toConsumableArray(e.props.example||[]))})});return t})};var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}},function(e,t,n){\"use strict\";t.a=function globalizeComponents(e){e.forEach(function(e){e.components&&e.components.forEach(r.a),e.sections&&globalizeComponents(e.sections)})};var r=n(377)},function(e,t,n){\"use strict\";(function(e){t.a=function globalizeComponent(t){if(!t.name)return;e[t.name]=t.props.path&&\"default\"!==t.props.path?t.module[t.props.path]:t.module.default||t.module}}).call(t,n(7))},function(e,t,n){\"use strict\";n(45),n(379)},function(e,t,n){\"use strict\";var r=n(45).a.createStyleSheet({body:{isolate:!1,margin:0,padding:0,border:0}}).attach().classes.body;document.body.classList.add(r)},function(e,t,n){e.exports={config:{title:\"React & Redux in TypeScript - Component Typing Patterns\",highlightTheme:\"base16-light\",showCode:!1,showUsage:!1,showSidebar:!0,previewDelay:500,theme:{sidebarWidth:300},styles:{},compilerConfig:{objectAssign:\"Object.assign\"}},welcomeScreen:!1,patterns:void 0,sections:[{name:\"Introduction\",slug:\"introduction\",components:[],sections:[],content:n(381)},{name:\"Stateless Components - SFC\",slug:\"stateless-components---sfc\",components:[{filepath:\"src/components/sfc-counter.tsx\",slug:\"sfccounter\",pathLine:\"src/components/sfc-counter.tsx\",module:n(105),props:n(382),hasExamples:!0,metadata:{}},{filepath:\"src/components/sfc-spread-attributes.tsx\",slug:\"sfcspreadattributes\",pathLine:\"src/components/sfc-spread-attributes.tsx\",module:n(107),props:n(387),hasExamples:!0,metadata:{}}],sections:[],content:void 0},{name:\"Stateful Components - Class\",slug:\"stateful-components---class\",components:[{filepath:\"src/components/stateful-counter.tsx\",slug:\"statefulcounter\",pathLine:\"src/components/stateful-counter.tsx\",module:n(108),props:n(390),hasExamples:!0,metadata:{}},{filepath:\"src/components/stateful-counter-with-default.tsx\",slug:\"statefulcounterwithdefault\",pathLine:\"src/components/stateful-counter-with-default.tsx\",module:n(109),props:n(393),hasExamples:!0,metadata:{}}],sections:[],content:void 0},{name:\"Generic Components\",slug:\"generic-components\",components:[{filepath:\"src/components/generic-list.tsx\",slug:\"genericlist\",pathLine:\"src/components/generic-list.tsx\",module:n(106),props:n(396),hasExamples:!0,metadata:{}}],sections:[],content:void 0},{name:\"Render Props\",slug:\"render-props\",components:[{filepath:\"src/components/name-provider.tsx\",slug:\"nameprovider\",pathLine:\"src/components/name-provider.tsx\",module:n(59),props:n(403),hasExamples:!0,metadata:{}},{filepath:\"src/components/mouse-provider.tsx\",slug:\"mouseprovider\",pathLine:\"src/components/mouse-provider.tsx\",module:n(60),props:n(406),hasExamples:!0,metadata:{}}],sections:[],content:void 0}]}},function(e,t,n){var r={react:n(0)},i=n(11).bind(null,r);n(12).bind(null,\"var React = require('react');\",i);e.exports=[{type:\"markdown\",content:\"### Playground Project\\n\\n[![Codeship Status for piotrwitek/react-redux-typescript-guide](https://app.codeship.com/projects/11eb8c10-d117-0135-6c51-26e28af241d2/status?branch=master)](https://app.codeship.com/projects/262359)\\n\\nYou should check Playground Project located in the `/playground` folder. It is a source of all the code examples found in the guide. They are all tested with the most recent version of TypeScript and 3rd party type definitions (like `@types/react` or `@types/react-redux`) to ensure the examples are up-to-date and not broken with updated definitions.\\n\\n[⇦ back to guide](https://github.com/piotrwitek/react-redux-typescript-guide#table-of-contents)\"}]},function(e,t,n){e.exports={displayName:\"SFCCounter\",description:\"\",props:{label:{required:!0,type:{name:\"string\"},description:\"\",defaultValue:null,tags:{}},count:{required:!0,type:{name:\"number\"},description:\"\",defaultValue:null,tags:{}},onIncrement:{required:!0,type:{name:\"() => any\"},description:\"\",defaultValue:null,tags:{}},children:{required:!1,type:{name:\"ReactNode\"},description:\"\",defaultValue:null,tags:{}}},methods:[],doclets:{},examples:n(383)}},function(e,t,n){var r={\"./sfc-counter.usage\":n(384),react:n(0)},i=n(11).bind(null,r),a=n(12).bind(null,\"var React = require('react');\",i);e.exports=[{type:\"markdown\",content:'Usage:\\n\\n```jsx\\n<span class=\"hljs-keyword\">import</span> * <span class=\"hljs-keyword\">as</span> React <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">\\'react\\'</span>;\\n\\n<span class=\"hljs-keyword\">import</span> { SFCCounter } <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">\\'@src/components\\'</span>;\\n\\n<span class=\"hljs-keyword\">export</span> <span class=\"hljs-keyword\">default</span> <span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-keyword\">extends</span> <span class=\"hljs-title\">React</span>.<span class=\"hljs-title\">Component</span>&lt;</span>{}, { <span class=\"hljs-attr\">count</span>: number }&gt; {\\n  state = { <span class=\"hljs-attr\">count</span>: <span class=\"hljs-number\">0</span> };\\n\\n  render() {\\n    <span class=\"hljs-keyword\">return</span> (\\n      <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">SFCCounter</span>\\n        <span class=\"hljs-attr\">label</span>=<span class=\"hljs-string\">{</span>\\'<span class=\"hljs-attr\">SFCCounter</span>\\'}\\n        <span class=\"hljs-attr\">count</span>=<span class=\"hljs-string\">{this.state.count}</span>\\n        <span class=\"hljs-attr\">onIncrement</span>=<span class=\"hljs-string\">{()</span> =&gt;</span> { this.setState({ count: this.state.count + 1 }); }}\\n      /&gt;\\n    );\\n  }\\n}\\n</span>\\n```\\n\\nUsage Demo:'},{type:\"code\",content:\"const Demo = require('./sfc-counter.usage').default;\\n<Demo />\",settings:{},evalInContext:a},{type:\"markdown\",content:\"[⇦ back to guide](https://github.com/piotrwitek/react-redux-typescript-guide#--stateless-counter)\"}]},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(0),i=(n.n(r),n(20));t.default=class extends r.Component{constructor(){super(...arguments),this.state={count:0}}render(){return r.createElement(i.b,{label:\"SFCCounter\",count:this.state.count,onIncrement:()=>{this.setState({count:this.state.count+1})}})}}},function(e,t,n){\"use strict\";var r=n(0);n.n(r)},function(e,t,n){\"use strict\";t.a=function __rest(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]]);return n};Object.setPrototypeOf||Array;Object.assign},function(e,t,n){e.exports={displayName:\"SFCSpreadAttributes\",description:\"\",props:{className:{required:!1,type:{name:\"string\"},description:\"\",defaultValue:null,tags:{}},style:{required:!1,type:{name:\"CSSProperties\"},description:\"\",defaultValue:null,tags:{}},children:{required:!1,type:{name:\"ReactNode\"},description:\"\",defaultValue:null,tags:{}}},methods:[],doclets:{},examples:n(388)}},function(e,t,n){var r={\"./sfc-spread-attributes.usage\":n(389),react:n(0)},i=n(11).bind(null,r),a=n(12).bind(null,\"var React = require('react');\",i);e.exports=[{type:\"markdown\",content:'Usage:\\n\\n```jsx\\n<span class=\"hljs-keyword\">import</span> * <span class=\"hljs-keyword\">as</span> React <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">\\'react\\'</span>;\\n\\n<span class=\"hljs-keyword\">import</span> { SFCSpreadAttributes } <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">\\'@src/components\\'</span>;\\n\\n<span class=\"hljs-keyword\">export</span> <span class=\"hljs-keyword\">default</span> () =&gt; (\\n  <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">SFCSpreadAttributes</span>\\n    <span class=\"hljs-attr\">className</span>=<span class=\"hljs-string\">{</span>\\'<span class=\"hljs-attr\">classy</span>\\'}\\n    <span class=\"hljs-attr\">style</span>=<span class=\"hljs-string\">{{</span> <span class=\"hljs-attr\">backgroundColor:</span> \\'<span class=\"hljs-attr\">lightcyan</span>\\' }}\\n  &gt;</span>\\n    {`I\\'ll spread every property you give me!`}\\n  <span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">SFCSpreadAttributes</span>&gt;</span></span>\\n);\\n\\n```\\n\\nUsage Demo:'},{type:\"code\",content:\"const Demo = require('./sfc-spread-attributes.usage').default;\\n<Demo />\",settings:{},evalInContext:a},{type:\"markdown\",content:\"[⇦ back to guide](https://github.com/piotrwitek/react-redux-typescript-guide#--spread-attributes-link)\"}]},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(0),i=(n.n(r),n(20));t.default=(()=>r.createElement(i.c,{className:\"classy\",style:{backgroundColor:\"lightcyan\"}},\"I'll spread every property you give me!\"))},function(e,t,n){e.exports={displayName:\"StatefulCounter\",description:\"\",props:{children:{required:!1,type:{name:\"ReactNode\"},description:\"\",defaultValue:null,tags:{}},label:{required:!0,type:{name:\"string\"},description:\"\",defaultValue:null,tags:{}}},methods:[],doclets:{},examples:n(391)}},function(e,t,n){var r={\"./stateful-counter.usage\":n(392),react:n(0)},i=n(11).bind(null,r),a=n(12).bind(null,\"var React = require('react');\",i);e.exports=[{type:\"markdown\",content:'Usage:\\n\\n```jsx\\n<span class=\"hljs-keyword\">import</span> * <span class=\"hljs-keyword\">as</span> React <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">\\'react\\'</span>;\\n\\n<span class=\"hljs-keyword\">import</span> { StatefulCounter } <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">\\'@src/components\\'</span>;\\n\\n<span class=\"hljs-keyword\">export</span> <span class=\"hljs-keyword\">default</span> () =&gt; (\\n  <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">StatefulCounter</span>\\n    <span class=\"hljs-attr\">label</span>=<span class=\"hljs-string\">{</span>\\'<span class=\"hljs-attr\">StatefulCounter</span>\\'}\\n  /&gt;</span>\\n);\\n</span>\\n```\\n\\nUsage Demo:'},{type:\"code\",content:\"const Demo = require('./stateful-counter.usage').default;\\n<Demo />\",settings:{},evalInContext:a},{type:\"markdown\",content:\"[⇦ back to guide](https://github.com/piotrwitek/react-redux-typescript-guide#--stateful-counter)\"}]},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(0),i=(n.n(r),n(20));t.default=(()=>r.createElement(i.d,{label:\"StatefulCounter\"}))},function(e,t,n){e.exports={displayName:\"StatefulCounterWithDefault\",description:\"\",props:{children:{required:!1,type:{name:\"ReactNode\"},description:\"\",defaultValue:null,tags:{}},label:{required:!0,type:{name:\"string\"},description:\"\",defaultValue:null,tags:{}},initialCount:{required:!1,type:{name:\"number\"},description:\"\",defaultValue:null,tags:{}}},methods:[],doclets:{},examples:n(394)}},function(e,t,n){var r={\"./stateful-counter-with-default.usage\":n(395),react:n(0)},i=n(11).bind(null,r),a=n(12).bind(null,\"var React = require('react');\",i);e.exports=[{type:\"markdown\",content:'Usage:\\n\\n```jsx\\n<span class=\"hljs-keyword\">import</span> * <span class=\"hljs-keyword\">as</span> React <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">\\'react\\'</span>;\\n\\n<span class=\"hljs-keyword\">import</span> { StatefulCounterWithDefault } <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">\\'@src/components\\'</span>;\\n\\n<span class=\"hljs-keyword\">export</span> <span class=\"hljs-keyword\">default</span> () =&gt; (\\n  <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">StatefulCounterWithDefault</span>\\n    <span class=\"hljs-attr\">label</span>=<span class=\"hljs-string\">{</span>\\'<span class=\"hljs-attr\">StatefulCounter</span>\\'}\\n  /&gt;</span>\\n);\\n</span>\\n```\\n\\nUsage Demo:'},{type:\"code\",content:\"const Demo = require('./stateful-counter-with-default.usage').default;\\n<Demo />\",settings:{},evalInContext:a},{type:\"markdown\",content:\"[⇦ back to guide](https://github.com/piotrwitek/react-redux-typescript-guide#--with-default-props)\"}]},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(0),i=(n.n(r),n(20));t.default=(()=>r.createElement(i.e,{label:\"StatefulCounter\"}))},function(e,t,n){e.exports={displayName:\"GenericList\",description:\"\",props:{children:{required:!1,type:{name:\"ReactNode\"},description:\"\",defaultValue:null,tags:{}},items:{required:!0,type:{name:\"T[]\"},description:\"\",defaultValue:null,tags:{}},itemRenderer:{required:!0,type:{name:\"(item: T) => Element\"},description:\"\",defaultValue:null,tags:{}}},methods:[],doclets:{},examples:n(397)}},function(e,t,n){var r={\"./generic-list.usage\":n(398),react:n(0)},i=n(11).bind(null,r),a=n(12).bind(null,\"var React = require('react');\",i);e.exports=[{type:\"markdown\",content:'Usage:\\n\\n```jsx\\n<span class=\"hljs-keyword\">import</span> * <span class=\"hljs-keyword\">as</span> React <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">\\'react\\'</span>;\\n\\n<span class=\"hljs-keyword\">import</span> { IUser, User } <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">\\'@src/models\\'</span>;\\n<span class=\"hljs-keyword\">import</span> { GenericList } <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">\\'@src/components\\'</span>;\\n\\n<span class=\"hljs-keyword\">const</span> users = [\\n  <span class=\"hljs-keyword\">new</span> User(<span class=\"hljs-string\">\\'Rosamonte\\'</span>, <span class=\"hljs-string\">\\'Especial\\'</span>),\\n  <span class=\"hljs-keyword\">new</span> User(<span class=\"hljs-string\">\\'Aguantadora\\'</span>, <span class=\"hljs-string\">\\'Despalada\\'</span>),\\n  <span class=\"hljs-keyword\">new</span> User(<span class=\"hljs-string\">\\'Taragui\\'</span>, <span class=\"hljs-string\">\\'Vitality\\'</span>),\\n];\\n\\n<span class=\"hljs-keyword\">export</span> <span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">UserList</span> <span class=\"hljs-keyword\">extends</span> <span class=\"hljs-title\">GenericList</span>&lt;<span class=\"hljs-title\">IUser</span>&gt; </span>{ }\\n\\n<span class=\"hljs-keyword\">export</span> <span class=\"hljs-keyword\">default</span> () =&gt; (\\n  <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">UserList</span>\\n    <span class=\"hljs-attr\">items</span>=<span class=\"hljs-string\">{users}</span>\\n    <span class=\"hljs-attr\">itemRenderer</span>=<span class=\"hljs-string\">{(item)</span> =&gt;</span> <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div</span> <span class=\"hljs-attr\">key</span>=<span class=\"hljs-string\">{item.id}</span>&gt;</span>{item.fullName}<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">div</span>&gt;</span>}\\n  /&gt;\\n);\\n</span>\\n```\\n\\nUsage Demo:'},{type:\"code\",content:\"const Demo = require('./generic-list.usage').default;\\n<Demo />\",settings:{},evalInContext:a},{type:\"markdown\",content:\"[⇦ back to guide](https://github.com/piotrwitek/react-redux-typescript-guide#--generic-list)\"}]},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(0),i=(n.n(r),n(399)),a=n(20);const o=[new i.a(\"Rosamonte\",\"Especial\"),new i.a(\"Aguantadora\",\"Despalada\"),new i.a(\"Taragui\",\"Vitality\")];class s extends a.a{}t.UserList=s,t.default=(()=>r.createElement(s,{items:o,itemRenderer:e=>r.createElement(\"div\",{key:e.id},e.fullName)}))},function(e,t,n){\"use strict\";var r=n(400);n.d(t,\"a\",function(){return r.a})},function(e,t,n){\"use strict\";var r=n(401),i=n.n(r);class a{constructor(e,t){this.firstName=e,this.lastName=t,this.id=i()()}get fullName(){return`${this.firstName} ${this.lastName}`}static create(e){const t=new a(e.first_name,e.last_name);return t.id=e.id,t}serialize(){return{id:this.id,first_name:this.firstName,last_name:this.lastName}}}t.a=a},function(e,t,n){var r=n(402),i=n(110),a=0,o=4,s=36,l=Math.pow(s,o);function randomBlock(){return i((Math.random()*l<<0).toString(s),o)}function safeCounter(){return a=a<l?a:0,++a-1}function cuid(){return\"c\"+(new Date).getTime().toString(s)+i(safeCounter().toString(s),o)+r()+(randomBlock()+randomBlock())}cuid.slug=function slug(){var e=(new Date).getTime().toString(36),t=safeCounter().toString(36).slice(-4),n=r().slice(0,1)+r().slice(-1),i=randomBlock().slice(-2);return e.slice(-2)+t+n+i},cuid.fingerprint=r,e.exports=cuid},function(e,t,n){var r=n(110),i=\"object\"==typeof window?window:self,a=Object.keys(i),o=r(((navigator.mimeTypes?navigator.mimeTypes.length:0)+navigator.userAgent.length).toString(36)+a.toString(36),4);e.exports=function fingerprint(){return o}},function(e,t,n){e.exports={displayName:\"NameProvider\",description:\"\",props:{children:{required:!0,type:{name:\"((state: NameProviderState) => ReactNode) | (string & ((state: NameProviderState) => ReactNode)) ...\"},description:\"\",defaultValue:null,tags:{}}},methods:[],doclets:{},examples:n(404)}},function(e,t,n){var r={\"./name-provider.usage\":n(405),react:n(0)},i=n(11).bind(null,r),a=n(12).bind(null,\"var React = require('react');\",i);e.exports=[{type:\"markdown\",content:'Usage:\\n\\n```jsx\\n<span class=\"hljs-keyword\">import</span> * <span class=\"hljs-keyword\">as</span> React <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">\\'react\\'</span>;\\n\\n<span class=\"hljs-keyword\">import</span> { NameProvider } <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">\\'./name-provider\\'</span>;\\n\\n<span class=\"hljs-keyword\">export</span> <span class=\"hljs-keyword\">default</span> () =&gt; (\\n  <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">NameProvider</span>&gt;</span>\\n    {({ name }) =&gt; (\\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div</span>&gt;</span>{name}<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">div</span>&gt;</span>\\n    )}\\n  <span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">NameProvider</span>&gt;</span></span>\\n);\\n\\n```\\n\\nUsage Demo:'},{type:\"code\",content:\"const Demo = require('./name-provider.usage').default;\\n<Demo />\",settings:{},evalInContext:a},{type:\"markdown\",content:\"[⇦ back to guide](https://github.com/piotrwitek/react-redux-typescript-guide#--name-provider)\"}]},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(0),i=(n.n(r),n(59));t.default=(()=>r.createElement(i.NameProvider,null,({name:e})=>r.createElement(\"div\",null,e)))},function(e,t,n){e.exports={displayName:\"MouseProvider\",description:\"\",props:{children:{required:!1,type:{name:\"ReactNode\"},description:\"\",defaultValue:null,tags:{}},render:{required:!0,type:{name:\"(state: MouseProviderState) => ReactNode\"},description:\"\",defaultValue:null,tags:{}}},methods:[],doclets:{},examples:n(407)}},function(e,t,n){var r={\"./mouse-provider.usage\":n(408),react:n(0)},i=n(11).bind(null,r),a=n(12).bind(null,\"var React = require('react');\",i);e.exports=[{type:\"markdown\",content:'Usage:\\n\\n```jsx\\n<span class=\"hljs-keyword\">import</span> * <span class=\"hljs-keyword\">as</span> React <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">\\'react\\'</span>;\\n\\n<span class=\"hljs-keyword\">import</span> { MouseProvider } <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">\\'./mouse-provider\\'</span>;\\n\\n<span class=\"hljs-keyword\">export</span> <span class=\"hljs-keyword\">default</span> () =&gt; (\\n  <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">MouseProvider</span>\\n    <span class=\"hljs-attr\">render</span>=<span class=\"hljs-string\">{mouse</span> =&gt;</span> (\\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p</span>&gt;</span>The mouse position is {mouse.x}, {mouse.y}<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">p</span>&gt;</span>\\n    )}\\n  /&gt;\\n);\\n</span>\\n```\\n\\nUsage Demo:'},{type:\"code\",content:\"const Demo = require('./mouse-provider.usage').default;\\n<Demo />\",settings:{},evalInContext:a},{type:\"markdown\",content:\"[⇦ back to guide](https://github.com/piotrwitek/react-redux-typescript-guide#--mouse-provider)\"}]},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(0),i=(n.n(r),n(60));t.default=(()=>r.createElement(i.MouseProvider,{render:e=>r.createElement(\"p\",null,\"The mouse position is \",e.x,\", \",e.y)}))}]);"
  },
  {
    "path": "docs/index.html",
    "content": "<!doctype html>\n<html>\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\t\t<title>React & Redux in TypeScript - Component Typing Patterns</title>\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n\t</head>\n\t<body>\n\t\t<div id=\"app\"></div>\n\t<script type=\"text/javascript\" src=\"build/bundle.a71e23e0.js\"></script></body>\n</html>\n"
  },
  {
    "path": "generate-readme.js",
    "content": "const fs = require('fs');\n\nconst ROOT_PATH = `${__dirname}/`;\nconst inputFiles = [ROOT_PATH + 'README_SOURCE.md'];\nconst outputFile = ROOT_PATH + 'README.md';\n\nconst result = inputFiles\n    .map(filePath => fs.readFileSync(filePath, 'utf8'))\n    .map(injectCodeBlocks)\n    .map(injectExpanders)\n    .toString();\n\nfs.writeFileSync(outputFile, result, 'utf8');\n\nfunction injectCodeBlocks(text) {\n    const regex = /::codeblock='(.+?)'::/g;\n    return text.replace(regex, createMatchReplacer(withSourceWrapper));\n}\n\nfunction injectExpanders(text) {\n    const regex = /::expander='(.+?)'::/g;\n    return text.replace(regex, createMatchReplacer(withDetailsWrapper));\n}\n\nfunction createMatchReplacer(wrapper) {\n    return (match, filePath) => {\n        console.log(ROOT_PATH + filePath);\n        const text = fs.readFileSync(ROOT_PATH + filePath, 'utf8');\n        return wrapper(text);\n    };\n}\n\nfunction withSourceWrapper(text) {\n    return `\n${'```tsx'}\n${text}\n${'```'}\n  `.trim();\n}\n\nfunction withDetailsWrapper(text) {\n    return `\n<details><summary><i>Click to expand</i></summary><p>\n\n${'```tsx'}\n${text}\n${'```'}\n</p></details>\n  `.trim();\n}\n"
  },
  {
    "path": "generate-readme.sh",
    "content": "#!/bin/bash\nnode generate-readme.js\n"
  },
  {
    "path": "generate-styleguide.sh",
    "content": "#!/bin/bash\ncd playground && npm run styleguide:build\n"
  },
  {
    "path": "is-git-status-clean.sh",
    "content": "#!/bin/bash\nif output=$(git status --porcelain) && [ -z \"$output\" ]; then echo \"Success!\"; else (echo \">>> Please check CONTRIBUTING.md to learn how to properly amend README.md <<<\\n\" && false); fi\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"devDependencies\": {\n    \"all-contributors-cli\": \"6.9.3\",\n    \"doctoc\": \"1.4.0\",\n    \"husky\": \"3.0.9\"\n  },\n  \"scripts\": {\n    \"ci-check\": \"npm run doctoc && npm run readme:generate\",\n    \"doctoc\": \"doctoc --maxlevel=3 README_SOURCE.md\",\n    \"readme:generate\": \"node generate-readme.js\",\n    \"contributors:check\": \"all-contributors check\",\n    \"contributors:add\": \"all-contributors add\",\n    \"contributors:generate\": \"all-contributors generate\",\n    \"is-git-status-clean\": \"sh ./is-git-status-clean.sh\"\n  },\n  \"husky\": {\n    \"hooks\": {\n      \"pre-push\": \"npm run ci-check && npm run is-git-status-clean \"\n    }\n  },\n  \"dependencies\": {\n    \"react\": \"18.1.0\",\n    \"react-dom\": \"18.1.0\"\n  }\n}\n"
  },
  {
    "path": "playground/.eslintrc.js",
    "content": "module.exports = {\n  root: true,\n  parser: '@typescript-eslint/parser',\n  plugins: ['@typescript-eslint'],\n  extends: ['react-app', 'react-app/jest', 'prettier'],\n  rules: { 'import/no-anonymous-default-export': 0 },\n};\n"
  },
  {
    "path": "playground/.gitignore",
    "content": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pnp\n.pnp.js\n\n# testing\n/coverage\n\n# production\n/build\n\n# misc\n.DS_Store\n.env.local\n.env.development.local\n.env.test.local\n.env.production.local\n\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n"
  },
  {
    "path": "playground/.prettierrc",
    "content": "{\n  \"printWidth\": 80,\n  \"semi\": true,\n  \"singleQuote\": true,\n  \"trailingComma\": \"es5\"\n}\n"
  },
  {
    "path": "playground/.storybook/addons.js",
    "content": "import '@storybook/addon-actions/register';\nimport '@storybook/addon-links/register';\n"
  },
  {
    "path": "playground/.storybook/config.js",
    "content": "import { configure } from '@storybook/react';\nimport requireContext from 'require-context.macro';\n\n// We load every file in src directory ending with .stories.tsx\n\nconst req = requireContext('../src', true, /.stories.tsx$/);\nfunction loadStories() {\n  req.keys().forEach(filename => req(filename));\n}\nconfigure(loadStories, module);\n"
  },
  {
    "path": "playground/.storybook/webpack.config.js",
    "content": "module.exports = ({ config, mode }) => {\n  config.module.rules.push({\n    test: /\\.(ts|tsx)$/,\n    loader: require.resolve('babel-loader'),\n    options: {\n      presets: [['react-app', { flow: false, typescript: true }]],\n    },\n  });\n  config.resolve.extensions.push('.ts', '.tsx');\n  return config;\n};\n"
  },
  {
    "path": "playground/.vscode/settings.json",
    "content": "{\n  \"typescript.tsdk\": \"node_modules/typescript/lib\"\n}"
  },
  {
    "path": "playground/README.md",
    "content": "This folder is a playground project for testing the code examples that can be found in the guide. They are all tested with the most recent supported version of TypeScript and third-party type-definitions (like `@types/react` or `@types/react-redux`) to ensure the examples are still working when new third-party type-definitions are released.\n"
  },
  {
    "path": "playground/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n  <title>React, Redux, Typescript Guide</title>\n</head>\n<body>\n  <div id=\"root\"></div>\n  \n  <script src=\"/out/index.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "playground/package.json",
    "content": "{\n  \"name\": \"playground\",\n  \"description\": \"Playground Project for https://github.com/piotrwitek/react-redux-typescript-guide\",\n  \"version\": \"1.0.0\",\n  \"private\": true,\n  \"author\": \"Piotr Witek <piotrek.witek@gmail.com> (http://piotrwitek.github.io/)\",\n  \"repository\": \"https://github.com/piotrwitek/react-redux-typescript-guide.git\",\n  \"license\": \"MIT\",\n  \"main\": \"src/index.tsx\",\n  \"scripts\": {\n    \"start\": \"react-scripts start\",\n    \"build\": \"react-scripts build\",\n    \"test\": \"react-scripts test\",\n    \"eject\": \"react-scripts eject\",\n    \"reinstall\": \"rm -rf node_modules && npm install\",\n    \"ci-check\": \"npm run lint && npm run tsc && npm run test\",\n    \"lint\": \"eslint ./src --ext .js,.jsx,.ts,.tsx\",\n    \"tsc\": \"tsc -p ./ --noEmit\",\n    \"tsc:watch\": \"tsc -p ./ --noEmit -w\",\n    \"storybook\": \"start-storybook -p 9009 -s public\",\n    \"build-storybook\": \"build-storybook -s public\"\n  },\n  \"dependencies\": {\n    \"@lagunovsky/redux-react-router\": \"2.2.0\",\n    \"@testing-library/jest-dom\": \"5.16.4\",\n    \"@testing-library/react\": \"13.1.1\",\n    \"@testing-library/user-event\": \"13.5.0\",\n    \"@types/jest\": \"27.5.0\",\n    \"@types/node\": \"16.11.33\",\n    \"@types/react\": \"18.0.8\",\n    \"@types/react-dom\": \"18.0.3\",\n    \"@types/react-redux\": \"7.1.24\",\n    \"@types/react-router-dom\": \"5.3.3\",\n    \"axios\": \"0.26.1\",\n    \"cuid\": \"2.1.8\",\n    \"react\": \"18.1.0\",\n    \"react-dom\": \"18.1.0\",\n    \"react-redux\": \"7.2.8\",\n    \"react-router-dom\": \"6.3.0\",\n    \"react-scripts\": \"5.0.1\",\n    \"redux\": \"4.1.2\",\n    \"redux-observable\": \"1.2.0\",\n    \"redux-thunk\": \"2.4.1\",\n    \"reselect\": \"4.0.0\",\n    \"rxjs\": \"6.5.3\",\n    \"tslib\": \"2.4.0\",\n    \"typesafe-actions\": \"5.1.0\",\n    \"utility-types\": \"3.10.0\"\n  },\n  \"devDependencies\": {\n    \"@storybook/addon-actions\": \"5.2.5\",\n    \"@storybook/addon-links\": \"5.2.5\",\n    \"@storybook/addon-storyshots\": \"5.2.5\",\n    \"@storybook/addons\": \"5.2.5\",\n    \"@storybook/react\": \"5.2.5\",\n    \"@typescript-eslint/eslint-plugin\": \"5.22.0\",\n    \"@typescript-eslint/parser\": \"5.22.0\",\n    \"eslint\": \"8.14.0\",\n    \"eslint-config-prettier\": \"8.5.0\",\n    \"require-context.macro\": \"1.2.2\",\n    \"typescript\": \"4.6.4\",\n    \"web-vitals\": \"2.1.4\"\n  },\n  \"browserslist\": {\n    \"production\": [\n      \">0.2%\",\n      \"not dead\",\n      \"not op_mini all\"\n    ],\n    \"development\": [\n      \"last 1 chrome version\",\n      \"last 1 firefox version\",\n      \"last 1 safari version\"\n    ]\n  }\n}\n"
  },
  {
    "path": "playground/public/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <link rel=\"shortcut icon\" href=\"%PUBLIC_URL%/favicon.ico\" />\n    <meta\n      name=\"viewport\"\n      content=\"width=device-width, initial-scale=1, shrink-to-fit=no\"\n    />\n    <meta name=\"theme-color\" content=\"#000000\" />\n    <!--\n      manifest.json provides metadata used when your web app is installed on a\n      user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/\n    -->\n    <link rel=\"manifest\" href=\"%PUBLIC_URL%/manifest.json\" />\n    <!--\n      Notice the use of %PUBLIC_URL% in the tags above.\n      It will be replaced with the URL of the `public` folder during the build.\n      Only files inside the `public` folder can be referenced from the HTML.\n\n      Unlike \"/favicon.ico\" or \"favicon.ico\", \"%PUBLIC_URL%/favicon.ico\" will\n      work correctly both with client-side routing and a non-root public URL.\n      Learn how to configure a non-root public URL by running `npm run build`.\n    -->\n    <title>React, Redux, TypeScript Guide - Playground</title>\n  </head>\n  <body>\n    <noscript>You need to enable JavaScript to run this app.</noscript>\n    <div id=\"root\"></div>\n    <!--\n      This HTML file is a template.\n      If you open it directly in the browser, you will see an empty page.\n\n      You can add webfonts, meta tags, or analytics to this file.\n      The build step will place the bundled scripts into the <body> tag.\n\n      To begin the development, run `npm start` or `yarn start`.\n      To create a production bundle, use `npm run build` or `yarn build`.\n    -->\n  </body>\n</html>\n"
  },
  {
    "path": "playground/public/manifest.json",
    "content": "{\n  \"short_name\": \"RRTS Guide - Playground\",\n  \"name\": \"React, Redux, TypeScript Guide - Playground\",\n  \"icons\": [\n    {\n      \"src\": \"favicon.ico\",\n      \"sizes\": \"64x64 32x32 24x24 16x16\",\n      \"type\": \"image/x-icon\"\n    }\n  ],\n  \"start_url\": \".\",\n  \"display\": \"standalone\",\n  \"theme_color\": \"#000000\",\n  \"background_color\": \"#ffffff\"\n}\n"
  },
  {
    "path": "playground/src/api/agent.ts",
    "content": "import axios from 'axios';\n\nconst URL = 'http://localhost:3000/api/';\n\nconst getToken = () => 'some-token';\n\nconst formatToken = (token: string) => {\n  return `Token ${token}`;\n};\n\n// Public\n\nexport const setToken = (token: string) => {\n  agentInstance.defaults.headers.common.Authorization = formatToken(token);\n};\n\nconst agentInstance = axios.create({\n  baseURL: URL,\n  timeout: 4000,\n  headers: {\n    Authorization: formatToken(getToken()),\n  },\n});\nexport default agentInstance;\n"
  },
  {
    "path": "playground/src/api/fixtures/todos.json",
    "content": "{\n  \"id\": 0,\n  \"text\": \"Example todo\",\n  \"completed\": false\n}\n"
  },
  {
    "path": "playground/src/api/index.ts",
    "content": "export { default as agent } from './agent';\nexport * from './agent';\nexport * from './models';\nexport * from './todos';\nexport * from './utils';\n"
  },
  {
    "path": "playground/src/api/models.ts",
    "content": "export interface ITodoModel {\n  id: string;\n  text: string;\n  completed: false;\n}\n"
  },
  {
    "path": "playground/src/api/todos.ts",
    "content": "import { ITodoModel } from './models';\nimport { resolveWithDelay } from './utils';\n\nconst pageSize = 10;\n\n// Mock API\n// tslint:disable-next-line:no-var-requires\nconst todosResponse: ITodoModel[] = require('../fixtures/todos.json');\nexport const Todos = {\n  getAll: (pageNumber: number = 0) => resolveWithDelay(todosResponse\n    .slice(pageNumber * pageSize, (pageNumber * pageSize) + pageSize - 1)),\n  get: (id: string) => resolveWithDelay(todosResponse\n    .find(t => t.id === id)),\n  create: (payload: ITodoModel) => resolveWithDelay(todosResponse\n    .push(payload)),\n  update: (payload: ITodoModel) => resolveWithDelay(todosResponse\n    .map(t => t.id === payload.id ? payload : t)),\n  delete: (id: string) => resolveWithDelay(todosResponse\n    .filter(t => t.id !== id)),\n};\n\n// Real API\n// const URL = '/todos';\n// export const Todos = {\n//   getAll: (pageNumber?: number) =>\n//     requests.get(`${URL}?${rangeQueryString(pageSize, pageNumber)}`),\n//   get: (id: string) =>\n//     requests.get(`${URL}/${id}`),\n//   create: (payload: ITodoModel) =>\n//     requests.post(`${URL}`, { payload }),\n//   update: (payload: ITodoModel) =>\n//     requests.put(`${URL}/${payload.id}`, { todo: removeKeys(payload, ['id']) }),\n//   delete: (id: string) =>\n//     requests.delete(`${URL}/${id}`),\n// };\n"
  },
  {
    "path": "playground/src/api/utils.ts",
    "content": "export const resolveWithDelay = <T>(value: T, time: number = 1000) => new Promise(\n  (resolve) => setTimeout(() => resolve(value), time)\n);\n\nexport const rangeQueryString = (count: number, pageNumber?: number) =>\n  `limit=${count}&offset=${pageNumber ? pageNumber * count : 0}`;\n\nexport const removeKeys = <T>(payload: T, keys: Array<keyof T>) => {\n  keys.forEach((key) => {\n    delete payload[key];\n  });\n\n  return payload;\n};\n"
  },
  {
    "path": "playground/src/app.test.tsx",
    "content": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { App } from './app';\n\nit('renders without crashing', () => {\n  const div = document.createElement('div');\n  ReactDOM.render(<App />, div);\n  ReactDOM.unmountComponentAtNode(div);\n});\n"
  },
  {
    "path": "playground/src/app.tsx",
    "content": "import React from 'react';\nimport { Provider } from 'react-redux';\nimport { Outlet, Route, Routes } from 'react-router-dom';\nimport { ReduxRouter } from '@lagunovsky/redux-react-router'\n\nimport { Layout } from './layout/layout';\nimport { LayoutFooter } from './layout/layout-footer';\nimport { LayoutHeader } from './layout/layout-header';\nimport { Home } from './routes/home';\nimport { NotFound } from './routes/not-found';\nimport { history, store } from './store';\n\nexport function App() {\n  return (\n    <Provider store={store}>\n      <ReduxRouter history={history} store={store}>\n          <Routes>\n            <Route\n              path=\"/\"\n              element={\n                <Layout\n                  renderHeader={() => <LayoutHeader />}\n                  renderFooter={() => <LayoutFooter />}\n                  renderContent={() => <Outlet />}\n                />\n              }\n            >\n              <Route index element={<Home />} />\n              <Route path=\"*\" element={<NotFound />} />\n            </Route>\n          </Routes>\n      </ReduxRouter>\n    </Provider>\n  );\n}\n"
  },
  {
    "path": "playground/src/components/__snapshots__/class-counter-with-default-props.stories.storyshot",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`Storyshots ClassCounterWithDefaultProps with defaut initial count 1`] = `\n<div>\n  <span>\n    ClassCounterWithDefaultProps\n    : \n    0\n  </span>\n  <button\n    onClick={[Function]}\n    type=\"button\"\n  >\n    Increment\n  </button>\n</div>\n`;\n\nexports[`Storyshots ClassCounterWithDefaultProps with initial count set 1`] = `\n<div>\n  <span>\n    ClassCounterWithDefaultProps\n    : \n    5\n  </span>\n  <button\n    onClick={[Function]}\n    type=\"button\"\n  >\n    Increment\n  </button>\n</div>\n`;\n"
  },
  {
    "path": "playground/src/components/__snapshots__/class-counter.stories.storyshot",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`Storyshots ClassCounter default 1`] = `\n<div>\n  <span>\n    ClassCounter\n    : \n    0\n  </span>\n  <button\n    onClick={[Function]}\n    type=\"button\"\n  >\n    Increment\n  </button>\n</div>\n`;\n"
  },
  {
    "path": "playground/src/components/__snapshots__/fc-counter-with-default-props.stories.storyshot",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`Storyshots FCCounterWithDefaultProps default 1`] = `\n<div>\n  <span>\n    FCCounterWithDefaultProps\n    : \n    5\n  </span>\n  <button\n    onClick={[Function]}\n    type=\"button\"\n  >\n    Increment\n  </button>\n</div>\n`;\n"
  },
  {
    "path": "playground/src/components/__snapshots__/fc-counter.stories.storyshot",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`Storyshots FCCounter default 1`] = `\n<div>\n  <span>\n    FCCounter\n    : \n    0\n  </span>\n  <button\n    onClick={[Function]}\n    type=\"button\"\n  >\n    Increment\n  </button>\n</div>\n`;\n"
  },
  {
    "path": "playground/src/components/__snapshots__/fc-spread-attributes.stories.storyshot",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`Storyshots FCSpreadAttributes default 1`] = `\n<div\n  className=\"classy\"\n  style={\n    Object {\n      \"backgroundColor\": \"lightcyan\",\n    }\n  }\n>\n  I'll spread every property you give me!\n</div>\n`;\n"
  },
  {
    "path": "playground/src/components/__snapshots__/generic-list.stories.storyshot",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`Storyshots GenericList default 1`] = `\n<div>\n  <div>\n    Rosamonte Especial\n  </div>\n  <div>\n    Aguantadora Despalada\n  </div>\n  <div>\n    Taragui Vitality\n  </div>\n</div>\n`;\n"
  },
  {
    "path": "playground/src/components/__snapshots__/mouse-provider.stories.storyshot",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`Storyshots MouseProvider default 1`] = `\n<div\n  onMouseMove={[Function]}\n  style={\n    Object {\n      \"height\": \"100%\",\n    }\n  }\n>\n  <p>\n    The mouse position is \n    0\n    , \n    0\n  </p>\n</div>\n`;\n"
  },
  {
    "path": "playground/src/components/class-counter-with-default-props.md",
    "content": "Usage:\n```jsx { \"filePath\": \"./class-counter-with-default-props.usage.tsx\" }\n```\n\nUsage Demo:\n```jsx \nconst Demo = require('./class-counter-with-default-props.usage').default;\n<Demo />\n```\n\n[⇦ back to guide](https://github.com/piotrwitek/react-redux-typescript-guide#--with-default-props)\n"
  },
  {
    "path": "playground/src/components/class-counter-with-default-props.stories.tsx",
    "content": "import React from 'react';\nimport { storiesOf } from '@storybook/react';\n\nimport { ClassCounterWithDefaultProps } from '../components';\n\nstoriesOf('ClassCounterWithDefaultProps', module)\n  .add('with defaut initial count', () => (\n    <ClassCounterWithDefaultProps label={'ClassCounterWithDefaultProps'} />\n  ))\n  .add('with initial count set', () => (\n    <ClassCounterWithDefaultProps\n      label={'ClassCounterWithDefaultProps'}\n      initialCount={5}\n    />\n  ));\n"
  },
  {
    "path": "playground/src/components/class-counter-with-default-props.tsx",
    "content": "import * as React from 'react';\n\ntype Props = {\n  label: string;\n  initialCount: number;\n};\n\ntype State = {\n  count: number;\n};\n\nexport class ClassCounterWithDefaultProps extends React.Component<\n  Props,\n  State\n> {\n  static defaultProps = {\n    initialCount: 0,\n  };\n\n  readonly state: State = {\n    count: this.props.initialCount,\n  };\n\n  handleIncrement = () => {\n    this.setState({ count: this.state.count + 1 });\n  };\n\n  render() {\n    const { handleIncrement } = this;\n    const { label } = this.props;\n    const { count } = this.state;\n\n    return (\n      <div>\n        <span>\n          {label}: {count}\n        </span>\n        <button type=\"button\" onClick={handleIncrement}>\n          {`Increment`}\n        </button>\n      </div>\n    );\n  }\n}\n"
  },
  {
    "path": "playground/src/components/class-counter-with-default-props.usage.tsx",
    "content": "import * as React from 'react';\n\nimport { ClassCounterWithDefaultProps } from '.';\n\nexport default () => (\n  <ClassCounterWithDefaultProps label={'ClassCounterWithDefaultProps'} />\n);\n"
  },
  {
    "path": "playground/src/components/class-counter.md",
    "content": "Usage:\n```jsx { \"filePath\": \"./class-counter.usage.tsx\" }\n```\n\nUsage Demo:\n```jsx\nconst Demo = require('./class-counter.usage').default;\n<Demo />\n```\n\n[⇦ back to guide](https://github.com/piotrwitek/react-redux-typescript-guide#--class-counter)\n"
  },
  {
    "path": "playground/src/components/class-counter.stories.tsx",
    "content": "import React from 'react';\nimport { storiesOf } from '@storybook/react';\n\nimport { ClassCounter } from '../components';\n\nstoriesOf('ClassCounter', module).add('default', () => (\n  <ClassCounter label={'ClassCounter'} />\n));\n"
  },
  {
    "path": "playground/src/components/class-counter.tsx",
    "content": "import * as React from 'react';\n\ntype Props = {\n  label: string;\n};\n\ntype State = {\n  count: number;\n};\n\nexport class ClassCounter extends React.Component<Props, State> {\n  readonly state: State = {\n    count: 0,\n  };\n\n  handleIncrement = () => {\n    this.setState({ count: this.state.count + 1 });\n  };\n\n  render() {\n    const { handleIncrement } = this;\n    const { label } = this.props;\n    const { count } = this.state;\n\n    return (\n      <div>\n        <span>\n          {label}: {count}\n        </span>\n        <button type=\"button\" onClick={handleIncrement}>\n          {`Increment`}\n        </button>\n      </div>\n    );\n  }\n}\n"
  },
  {
    "path": "playground/src/components/class-counter.usage.tsx",
    "content": "import * as React from 'react';\n\nimport { ClassCounter } from '.';\n\nexport default () => <ClassCounter label={'ClassCounter'} />;\n"
  },
  {
    "path": "playground/src/components/error-message.tsx",
    "content": "import * as React from 'react';\n\nexport const ErrorMessage: React.FC<{ onReset: () => void }> = ({\n  onReset,\n}) => {\n  return (\n    <div>\n      <h2>{`Sorry there was an unexpected error`}</h2>\n      {`To continue: `}\n      <a\n        href=\"/\"\n        onClick={() => {\n          onReset();\n        }}\n      >\n        {`go to home page`}\n      </a>\n    </div>\n  );\n};\n\nexport function test(props: any) {\n  const Container = props.componentClass;\n  return <Container />;\n}\n"
  },
  {
    "path": "playground/src/components/fc-counter-with-default-props.md",
    "content": "Usage:\n```jsx { \"filePath\": \"./fc-counter-with-default-props.usage.tsx\" }\n```\n\nUsage Demo:\n```jsx\nconst Demo = require('./fc-counter-with-default-props.usage').default;\n<Demo />\n```\n\n[⇦ back to guide](https://github.com/piotrwitek/react-redux-typescript-guide#--fc-counter-with-default-props)\n"
  },
  {
    "path": "playground/src/components/fc-counter-with-default-props.stories.tsx",
    "content": "\nimport React from 'react';\nimport { storiesOf } from '@storybook/react';\nimport { action } from '@storybook/addon-actions';\n\nimport { FCCounterWithDefaultProps } from '.';\n\nstoriesOf('FCCounterWithDefaultProps', module).add('default', () => (\n  <FCCounterWithDefaultProps\n    label={'FCCounterWithDefaultProps'}\n    onIncrement={action('onIncrement')}\n  />\n));\n"
  },
  {
    "path": "playground/src/components/fc-counter-with-default-props.tsx",
    "content": "import * as React from 'react';\n\ntype Props = {\n  label: string;\n  count: number;\n  onIncrement: () => void;\n};\n\n// React.FC is unaplicable here due not working properly with default props\n// https://github.com/facebook/create-react-app/pull/8177\nexport const FCCounterWithDefaultProps = (props: Props): JSX.Element => {\n  const { label, count, onIncrement } = props;\n\n  const handleIncrement = () => {\n    onIncrement();\n  };\n\n  return (\n    <div>\n      <span>\n        {label}: {count}\n      </span>\n      <button type=\"button\" onClick={handleIncrement}>\n        {`Increment`}\n      </button>\n    </div>\n  );\n};\n\nFCCounterWithDefaultProps.defaultProps = { count: 5 };\n"
  },
  {
    "path": "playground/src/components/fc-counter-with-default-props.usage.tsx",
    "content": "import { action } from '@storybook/addon-actions';\nimport * as React from 'react';\n\nimport { FCCounterWithDefaultProps } from '.';\n\nexport default () => (\n  <FCCounterWithDefaultProps\n    label={'FCCounterWithDefaultProps'}\n    onIncrement={action('onIncrement')}\n  />\n);\n"
  },
  {
    "path": "playground/src/components/fc-counter.md",
    "content": "Usage:\n```jsx { \"filePath\": \"./fc-counter.usage.tsx\" }\n```\n\nUsage Demo:\n```jsx\nconst Demo = require('./fc-counter.usage').default;\n<Demo />\n```\n\n[⇦ back to guide](https://github.com/piotrwitek/react-redux-typescript-guide#--fc-counter)\n"
  },
  {
    "path": "playground/src/components/fc-counter.stories.tsx",
    "content": "import React from 'react';\nimport { storiesOf } from '@storybook/react';\nimport { action } from '@storybook/addon-actions';\n\nimport { FCCounter } from '../components';\n\nstoriesOf('FCCounter', module).add('default', () => (\n  <FCCounter\n    label={'FCCounter'}\n    count={0}\n    onIncrement={action('onIncrement')}\n  />\n));\n"
  },
  {
    "path": "playground/src/components/fc-counter.tsx",
    "content": "import * as React from 'react';\n\ntype Props = {\n  label: string;\n  count: number;\n  onIncrement: () => void;\n};\n\nexport const FCCounter: React.FC<Props> = props => {\n  const { label, count, onIncrement } = props;\n\n  const handleIncrement = () => {\n    onIncrement();\n  };\n\n  return (\n    <div>\n      <span>\n        {label}: {count}\n      </span>\n      <button type=\"button\" onClick={handleIncrement}>\n        {`Increment`}\n      </button>\n    </div>\n  );\n};\n"
  },
  {
    "path": "playground/src/components/fc-counter.usage.tsx",
    "content": "import * as React from 'react';\n\nimport { FCCounter } from '.';\n\nexport default class extends React.Component<{}, { count: number }> {\n  state = { count: 0 };\n\n  render() {\n    return (\n      <FCCounter\n        label={'FCCounter'}\n        count={this.state.count}\n        onIncrement={() => {\n          this.setState({ count: this.state.count + 1 });\n        }}\n      />\n    );\n  }\n}\n"
  },
  {
    "path": "playground/src/components/fc-spread-attributes.md",
    "content": "Usage:\n```jsx { \"filePath\": \"./fc-spread-attributes.usage.tsx\" }\n```\n\nUsage Demo:\n```jsx\nconst Demo = require('./fc-spread-attributes.usage').default;\n<Demo />\n```\n\n[⇦ back to guide](https://github.com/piotrwitek/react-redux-typescript-guide#--spread-attributes-link)\n"
  },
  {
    "path": "playground/src/components/fc-spread-attributes.stories.tsx",
    "content": "import React from 'react';\nimport { storiesOf } from '@storybook/react';\n\nimport { FCSpreadAttributes } from '../components';\n\nstoriesOf('FCSpreadAttributes', module).add('default', () => (\n  <FCSpreadAttributes\n    className={'classy'}\n    style={{ backgroundColor: 'lightcyan' }}\n  >\n    {`I'll spread every property you give me!`}\n  </FCSpreadAttributes>\n));\n"
  },
  {
    "path": "playground/src/components/fc-spread-attributes.tsx",
    "content": "import * as React from 'react';\n\ntype Props = React.PropsWithChildren<{\n  className?: string;\n  style?: React.CSSProperties;\n}>;\n\nexport const FCSpreadAttributes: React.FC<Props> = (props) => {\n  const { children, ...restProps } = props;\n\n  return <div {...restProps}>{children}</div>;\n};\n"
  },
  {
    "path": "playground/src/components/fc-spread-attributes.usage.tsx",
    "content": "import * as React from 'react';\n\nimport { FCSpreadAttributes } from '.';\n\nexport default () => (\n  <FCSpreadAttributes\n    className={'classy'}\n    style={{ backgroundColor: 'lightcyan' }}\n  >\n    {`I'll spread every property you give me!`}\n  </FCSpreadAttributes>\n);\n"
  },
  {
    "path": "playground/src/components/generic-list.md",
    "content": "Usage:\n```jsx { \"filePath\": \"./generic-list.usage.tsx\" }\n```\n\nUsage Demo:\n```jsx \nconst Demo = require('./generic-list.usage').default;\n<Demo />\n```\n\n[⇦ back to guide](https://github.com/piotrwitek/react-redux-typescript-guide#--generic-list)\n"
  },
  {
    "path": "playground/src/components/generic-list.stories.tsx",
    "content": "import React from 'react';\nimport { storiesOf } from '@storybook/react';\n\nimport { IUser, User } from '../models';\nimport { GenericList } from '../components';\n\nconst users = [\n  new User('Rosamonte', 'Especial'),\n  new User('Aguantadora', 'Despalada'),\n  new User('Taragui', 'Vitality'),\n];\n\nexport class UserList extends GenericList<IUser> {}\n\nstoriesOf('GenericList', module).add('default', () => (\n  <UserList\n    items={users}\n    itemRenderer={item => <div key={item.id}>{item.fullName}</div>}\n  />\n));\n"
  },
  {
    "path": "playground/src/components/generic-list.tsx",
    "content": "import * as React from 'react';\n\nexport interface GenericListProps<T> {\n  items: T[];\n  itemRenderer: (item: T) => JSX.Element;\n}\n\nexport class GenericList<T> extends React.Component<GenericListProps<T>, {}> {\n  render() {\n    const { items, itemRenderer } = this.props;\n\n    return (\n      <div>\n        {items.map(itemRenderer)}\n      </div>\n    );\n  }\n}\n"
  },
  {
    "path": "playground/src/components/generic-list.usage.tsx",
    "content": "import * as React from 'react';\n\nimport { IUser, User } from '../models';\nimport { GenericList } from '../components';\n\nconst users = [\n  new User('Rosamonte', 'Especial'),\n  new User('Aguantadora', 'Despalada'),\n  new User('Taragui', 'Vitality'),\n];\n\nexport class UserList extends GenericList<IUser> {}\n\nexport default () => (\n  <UserList\n    items={users}\n    itemRenderer={item => <div key={item.id}>{item.fullName}</div>}\n  />\n);\n"
  },
  {
    "path": "playground/src/components/index.ts",
    "content": "export * from './error-message';\nexport * from './generic-list';\nexport * from './fc-counter';\nexport * from './fc-counter-with-default-props';\nexport * from './fc-spread-attributes';\nexport * from './class-counter';\nexport * from './class-counter-with-default-props';\nexport * from './name-provider';\nexport * from './mouse-provider';\n"
  },
  {
    "path": "playground/src/components/mouse-provider.md",
    "content": "Usage:\n```jsx { \"filePath\": \"./mouse-provider.usage.tsx\" }\n```\n\nUsage Demo:\n```jsx \nconst Demo = require('./mouse-provider.usage').default;\n<Demo />\n```\n\n[⇦ back to guide](https://github.com/piotrwitek/react-redux-typescript-guide#--mouse-provider)\n"
  },
  {
    "path": "playground/src/components/mouse-provider.stories.tsx",
    "content": "import React from 'react';\nimport { storiesOf } from '@storybook/react';\n\nimport { MouseProvider } from '../components';\n\nstoriesOf('MouseProvider', module).add('default', () => (\n  <MouseProvider\n    render={mouse => (\n      <p>\n        The mouse position is {mouse.x}, {mouse.y}\n      </p>\n    )}\n  />\n));\n"
  },
  {
    "path": "playground/src/components/mouse-provider.tsx",
    "content": "import * as React from 'react';\n\nexport interface MouseProviderProps {\n  render: (state: MouseProviderState) => React.ReactNode;\n}\n\ninterface MouseProviderState {\n  readonly x: number;\n  readonly y: number;\n}\n\nexport class MouseProvider extends React.Component<MouseProviderProps, MouseProviderState> {\n  readonly state: MouseProviderState = { x: 0, y: 0 };\n\n  handleMouseMove = (event: React.MouseEvent<HTMLDivElement>) => {\n    this.setState({\n      x: event.clientX,\n      y: event.clientY,\n    });\n  };\n\n  render() {\n    return (\n      <div style={{ height: '100%' }} onMouseMove={this.handleMouseMove}>\n        {/*\n          Instead of providing a static representation of what <Mouse> renders,\n          use the `render` prop to dynamically determine what to render.\n        */}\n        {this.props.render(this.state)}\n      </div>\n    );\n  }\n}\n"
  },
  {
    "path": "playground/src/components/mouse-provider.usage.tsx",
    "content": "import * as React from 'react';\n\nimport { MouseProvider } from './mouse-provider';\n\nexport default () => (\n  <MouseProvider\n    render={mouse => (\n      <p>The mouse position is {mouse.x}, {mouse.y}</p>\n    )}\n  />\n);\n"
  },
  {
    "path": "playground/src/components/name-provider.md",
    "content": "Usage:\n```jsx { \"filePath\": \"./name-provider.usage.tsx\" }\n```\n\nUsage Demo:\n```jsx \nconst Demo = require('./name-provider.usage').default;\n<Demo />\n```\n\n[⇦ back to guide](https://github.com/piotrwitek/react-redux-typescript-guide#--name-provider)\n"
  },
  {
    "path": "playground/src/components/name-provider.tsx",
    "content": "import * as React from 'react';\n\ninterface NameProviderProps {\n  children: (state: NameProviderState) => React.ReactNode;\n}\n\ninterface NameProviderState {\n  readonly name: string;\n}\n\nexport class NameProvider extends React.Component<NameProviderProps, NameProviderState> {\n  readonly state: NameProviderState = { name: 'Piotr' };\n\n  render() {\n    return this.props.children(this.state);\n  }\n}\n"
  },
  {
    "path": "playground/src/components/name-provider.usage.tsx",
    "content": "import * as React from 'react';\n\nimport { NameProvider } from './name-provider';\n\nexport default () => (\n  <NameProvider>\n    {({ name }) => (\n      <div>{name}</div>\n    )}\n  </NameProvider>\n);\n"
  },
  {
    "path": "playground/src/connected/fc-counter-connected-bind-action-creators.tsx",
    "content": "import Types from 'MyTypes';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport { connect } from 'react-redux';\nimport * as React from 'react';\n\nimport { countersActions } from '../features/counters';\n\n// Thunk Action\nconst incrementWithDelay = () => async (dispatch: Dispatch): Promise<void> => {\n  setTimeout(() => dispatch(countersActions.increment()), 1000);\n};\n\nconst mapStateToProps = (state: Types.RootState) => ({\n  count: state.counters.reduxCounter,\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch<Types.RootAction>) =>\n  bindActionCreators(\n    {\n      onIncrement: incrementWithDelay,\n    },\n    dispatch\n  );\n\ntype Props = ReturnType<typeof mapStateToProps> &\n  ReturnType<typeof mapDispatchToProps> & {\n    label: string;\n  };\n\nexport const FCCounter: React.FC<Props> = props => {\n  const { label, count, onIncrement } = props;\n\n  const handleIncrement = () => {\n    // Thunk action is correctly typed as promise\n    onIncrement().then(() => {\n      // ...\n    });\n  };\n\n  return (\n    <div>\n      <span>\n        {label}: {count}\n      </span>\n      <button type=\"button\" onClick={handleIncrement}>\n        {`Increment`}\n      </button>\n    </div>\n  );\n};\n\nexport const FCCounterConnectedBindActionCreators = connect(\n  mapStateToProps,\n  mapDispatchToProps\n)(FCCounter);\n"
  },
  {
    "path": "playground/src/connected/fc-counter-connected-bind-action-creators.usage.tsx",
    "content": "import * as React from 'react';\n\nimport { FCCounterConnectedBindActionCreators } from '.';\n\nexport default () => (\n  <FCCounterConnectedBindActionCreators\n    label={'FCCounterConnectedBindActionCreators'}\n  />\n);\n"
  },
  {
    "path": "playground/src/connected/fc-counter-connected-own-props.spec.tsx",
    "content": "import React from 'react';\nimport { createStore, combineReducers } from 'redux';\nimport { Provider } from 'react-redux';\nimport { render, fireEvent, cleanup, screen } from '@testing-library/react';\n\nimport { FCCounterConnectedOwnProps as ConnectedCounter } from './fc-counter-connected-own-props';\n\nconst reducer = combineReducers({\n  counters: combineReducers({\n    reduxCounter: (state: number = 0, action: any) => {\n      switch (action.type) {\n        case 'counters/INCREMENT':\n          return state + 1; // action: { type: \"INCREMENT\"; }\n\n        default:\n          return state;\n      }\n    },\n  }),\n});\n\nafterEach(cleanup);\n\ntest('can render with redux with defaults', () => {\n  const label = 'Counter 1';\n  renderWithRedux(<ConnectedCounter label={label} />);\n\n  fireEvent.click(screen.getByText('Increment'));\n  expect(screen.getByText(RegExp(label)).textContent).toBe(label + ': 1');\n});\n\ntest('can render with redux with custom initial state', () => {\n  const label = 'Counter 1';\n  renderWithRedux(<ConnectedCounter label={label} />, {\n    initialState: { counters: { reduxCounter: 3 } },\n  });\n  fireEvent.click(screen.getByText('Increment'));\n  expect(screen.getByText(RegExp(label)).textContent).toBe(label + ': 4');\n});\n\n// TODO: move to external utils\n// Redux Provider utility\nfunction renderWithRedux(\n  jsx: JSX.Element,\n  options: { initialState?: object } = {}\n) {\n  const store = createStore(reducer, options.initialState);\n  const view = render(<Provider store={store}>{jsx}</Provider>);\n\n  return {\n    view,\n    store,\n  };\n}\n"
  },
  {
    "path": "playground/src/connected/fc-counter-connected-own-props.tsx",
    "content": "import Types from 'MyTypes';\nimport { connect } from 'react-redux';\n\nimport { countersActions, countersSelectors } from '../features/counters';\nimport { FCCounter } from '../components';\n\ntype OwnProps = {\n  initialCount?: number;\n};\n\nconst mapStateToProps = (state: Types.RootState, ownProps: OwnProps) => ({\n  count:\n    countersSelectors.getReduxCounter(state.counters) +\n    (ownProps.initialCount || 0),\n});\n\nconst dispatchProps = {\n  onIncrement: countersActions.increment,\n};\n\nexport const FCCounterConnectedOwnProps = connect(\n  mapStateToProps,\n  dispatchProps\n)(FCCounter);\n"
  },
  {
    "path": "playground/src/connected/fc-counter-connected-own-props.usage.tsx",
    "content": "import * as React from 'react';\n\nimport { FCCounterConnectedOwnProps } from '.';\n\nexport default () => (\n  <FCCounterConnectedOwnProps\n    label={'FCCounterConnectedOwnProps'}\n    initialCount={10}\n  />\n);\n"
  },
  {
    "path": "playground/src/connected/fc-counter-connected.tsx",
    "content": "import Types from 'MyTypes';\nimport { connect } from 'react-redux';\n\nimport { countersActions, countersSelectors } from '../features/counters';\nimport { FCCounter } from '../components';\n\nconst mapStateToProps = (state: Types.RootState) => ({\n  count: countersSelectors.getReduxCounter(state.counters),\n});\n\nconst dispatchProps = {\n  onIncrement: countersActions.increment,\n};\n\nexport const FCCounterConnected = connect(\n  mapStateToProps,\n  dispatchProps\n)(FCCounter);\n"
  },
  {
    "path": "playground/src/connected/fc-counter-connected.usage.tsx",
    "content": "import * as React from 'react';\n\nimport { FCCounterConnected } from '.';\n\nexport default () => <FCCounterConnected label={'FCCounterConnected'} />;\n"
  },
  {
    "path": "playground/src/connected/index.ts",
    "content": "export * from './fc-counter-connected-bind-action-creators';\nexport * from './fc-counter-connected-own-props';\nexport * from './fc-counter-connected';\n"
  },
  {
    "path": "playground/src/context/theme-consumer-class.tsx",
    "content": "import * as React from 'react';\nimport ThemeContext from './theme-context';\n\ntype Props = {};\n\nexport class ToggleThemeButtonClass extends React.Component<Props> {\n  static contextType = ThemeContext;\n  declare context: React.ContextType<typeof ThemeContext>;\n\n  render() {\n    const { theme, toggleTheme } = this.context;\n    return (\n      <button style={theme} onClick={toggleTheme}>\n        Toggle Theme\n      </button>\n    );\n  }\n}\n"
  },
  {
    "path": "playground/src/context/theme-consumer.tsx",
    "content": "import * as React from 'react';\nimport ThemeContext from './theme-context';\n\ntype Props = {};\n\nexport default function ToggleThemeButton(props: Props) {\n  return (\n    <ThemeContext.Consumer>\n      {({ theme, toggleTheme }) => <button style={theme} onClick={toggleTheme} {...props} />}\n    </ThemeContext.Consumer>\n  );\n}\n"
  },
  {
    "path": "playground/src/context/theme-context.ts",
    "content": "import * as React from 'react';\n\nexport type Theme = React.CSSProperties;\n\ntype Themes = {\n  dark: Theme;\n  light: Theme;\n};\n\nexport const themes: Themes = {\n  dark: {\n    color: 'black',\n    backgroundColor: 'white',\n  },\n  light: {\n    color: 'white',\n    backgroundColor: 'black',\n  },\n};\n\nexport type ThemeContextProps = { theme: Theme; toggleTheme?: () => void };\nconst ThemeContext = React.createContext<ThemeContextProps>({ theme: themes.light });\n\nexport default ThemeContext;\n"
  },
  {
    "path": "playground/src/context/theme-provider.tsx",
    "content": "import React from 'react';\nimport ThemeContext, { themes, Theme } from './theme-context';\nimport ToggleThemeButton from './theme-consumer';\n\ninterface State {\n  theme: Theme;\n}\nexport class ThemeProvider extends React.Component<{}, State> {\n  readonly state: State = { theme: themes.light };\n\n  toggleTheme = () => {\n    this.setState(state => ({\n      theme: state.theme === themes.light ? themes.dark : themes.light,\n    }));\n  }\n\n  render() {\n    const { theme } = this.state;\n    const { toggleTheme } = this;\n    return (\n      <ThemeContext.Provider value={{ theme, toggleTheme }}>\n        <ToggleThemeButton />\n      </ThemeContext.Provider>\n    );\n  }\n}\n"
  },
  {
    "path": "playground/src/features/app/epics.ts",
    "content": "import { RootAction, RootState, Services } from 'MyTypes';\nimport { combineEpics, Epic } from 'redux-observable';\nimport { debounceTime, tap, ignoreElements } from 'rxjs/operators';\n\nimport { saveState } from '../../services/local-storage-service';\n\nconst SAVING_DELAY = 1000;\n\n// persist state in local storage every 1s\nconst saveStateInLocalStorage: Epic<\n  RootAction,\n  RootAction,\n  RootState,\n  Services\n> = (action$, store) =>\n  action$.pipe(\n    debounceTime(SAVING_DELAY),\n    tap(action => {\n      // handle side-effects\n      saveState(store.value);\n    }),\n    ignoreElements()\n  );\n\nexport const epics = combineEpics(saveStateInLocalStorage);\n"
  },
  {
    "path": "playground/src/features/counters/actions.ts",
    "content": "/* eslint-disable */\nimport { action } from 'typesafe-actions';\n\nimport { ADD, INCREMENT } from './constants';\n\n/* SIMPLE API */\n\nexport const increment = () => action(INCREMENT);\nexport const add = (amount: number) => action(ADD, amount);\n\n/* ADVANCED API */\n\n// More flexible allowing to create complex actions more easily\n// use can use \"action-creator\" instance in place of \"type constant\"\n// e.g. case getType(increment): return action.payload;\n// This will allow to completely eliminate need for \"constants\" in your application, more info here:\n// https://github.com/piotrwitek/typesafe-actions#constants\n\nimport { createAction } from 'typesafe-actions';\nimport { Todo } from '../todos/models';\n\nexport const emptyAction = createAction(INCREMENT)<void>();\nexport const payloadAction = createAction(ADD)<number>();\nexport const payloadMetaAction = createAction(ADD)<number, string>();\n\nexport const payloadCreatorAction = createAction(\n  'TOGGLE_TODO',\n  (todo: Todo) => todo.id\n)<string>();\n"
  },
  {
    "path": "playground/src/features/counters/actions.usage.ts",
    "content": "import { store } from '../../store/';\nimport { countersActions as counter } from '../counters';\n\n// store.dispatch(counter.increment(1)); // Error: Expected 0 arguments, but got 1.\nstore.dispatch(counter.increment()); // OK\n\n// store.dispatch(counter.add()); // Error: Expected 1 arguments, but got 0.\nstore.dispatch(counter.add(1)); // OK\n"
  },
  {
    "path": "playground/src/features/counters/constants.ts",
    "content": "export const INCREMENT = 'counters/INCREMENT';\nexport const ADD = 'counters/ADD';\n"
  },
  {
    "path": "playground/src/features/counters/index.ts",
    "content": "import * as countersConstants from './constants';\nimport * as countersActions from './actions';\nimport countersReducer from './reducer';\nimport * as countersSelectors from './selectors';\n\nexport {\n  countersConstants,\n  countersActions,\n  countersSelectors,\n  countersReducer,\n};\n"
  },
  {
    "path": "playground/src/features/counters/reducer.ts",
    "content": "import { combineReducers } from 'redux';\nimport { ActionType } from 'typesafe-actions';\n\nimport * as counters from './actions';\nimport { ADD, INCREMENT } from './constants';\n\nexport type CountersAction = ActionType<typeof counters>;\n\nexport type CountersState = {\n  readonly reduxCounter: number;\n};\n\nexport default combineReducers<CountersState, CountersAction>({\n  reduxCounter: (state = 0, action) => {\n    switch (action.type) {\n      case INCREMENT:\n        return state + 1; // action: { type: \"INCREMENT\"; }\n\n      case ADD:\n        return state + action.payload; // action: { type: \"ADD\"; payload: number; }\n\n      default:\n        return state;\n    }\n  },\n});\n"
  },
  {
    "path": "playground/src/features/counters/selectors.ts",
    "content": "import { CountersState } from './reducer';\n\nexport const getReduxCounter = (state: CountersState) => state.reduxCounter;\n"
  },
  {
    "path": "playground/src/features/todos/__snapshots__/reducer.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`Todos Stories initial state should match a snapshot 1`] = `\nObject {\n  \"todos\": Array [],\n  \"todosFilter\": \"\",\n}\n`;\n"
  },
  {
    "path": "playground/src/features/todos/actions.ts",
    "content": "import cuid from 'cuid';\nimport { action } from 'typesafe-actions';\n\nimport { TodosFilter, Todo } from './models';\nimport { ADD, TOGGLE, CHANGE_FILTER } from './constants';\n\nexport const add = (title: string) =>\n  action(ADD, {\n    title,\n    id: cuid(),\n    completed: false,\n  } as Todo);\n\nexport const toggle = (id: string) => action(TOGGLE, id);\n\nexport const changeFilter = (filter: TodosFilter) =>\n  action(CHANGE_FILTER, filter);\n"
  },
  {
    "path": "playground/src/features/todos/constants.ts",
    "content": "export const ADD = 'todos/ADD';\nexport const TOGGLE = 'todos/TOGGLE';\nexport const CHANGE_FILTER = 'todos/CHANGE_FILTER';\n"
  },
  {
    "path": "playground/src/features/todos/epics.spec.ts",
    "content": "import { StateObservable, ActionsObservable } from 'redux-observable';\nimport { RootState, RootAction } from 'MyTypes';\nimport { Subject } from 'rxjs';\n\nimport { add } from './actions';\nimport { logAddAction } from './epics';\n\n// Simple typesafe mock of all the services, you dont't need to mock anything else\n// It is decoupled and reusable for all your tests, just put it in a separate file\nconst services = {\n  logger: {\n    log: jest.fn(),\n  },\n  localStorage: {\n    loadState: jest.fn(),\n    saveState: jest.fn(),\n  },\n};\n\ndescribe('Todos Epics', () => {\n  let state$: StateObservable<RootState>;\n\n  beforeEach(() => {\n    state$ = new StateObservable<RootState>(\n      new Subject<RootState>(),\n      undefined as any\n    );\n  });\n\n  describe('logging todos actions', () => {\n    beforeEach(() => {\n      services.logger.log.mockClear();\n    });\n\n    it('should call the logger service when adding a new todo', done => {\n      const addTodoAction = add('new todo');\n      const action$ = ActionsObservable.of(addTodoAction);\n\n      logAddAction(action$, state$, services)\n        .toPromise()\n        .then((outputAction: RootAction) => {\n          expect(services.logger.log).toHaveBeenCalledTimes(1);\n          expect(services.logger.log).toHaveBeenCalledWith(\n            'action type must be equal: todos/ADD === todos/ADD'\n          );\n          // expect output undefined because we're using \"ignoreElements\" in epic\n          expect(outputAction).toEqual(undefined);\n          done();\n        });\n    });\n  });\n});\n"
  },
  {
    "path": "playground/src/features/todos/epics.ts",
    "content": "import { RootAction, RootState, Services } from 'MyTypes';\nimport { Epic } from 'redux-observable';\nimport { tap, ignoreElements, filter } from 'rxjs/operators';\nimport { isOfType } from 'typesafe-actions';\n\nimport { todosConstants } from '../todos';\n\n// contrived example!!!\nexport const logAddAction: Epic<RootAction, RootAction, RootState, Services> = (\n  action$,\n  state$,\n  { logger }\n) =>\n  action$.pipe(\n    filter(isOfType(todosConstants.ADD)), // action is narrowed to: { type: \"ADD_TODO\"; payload: string; }\n    tap(action => {\n      logger.log(\n        `action type must be equal: ${todosConstants.ADD} === ${action.type}`\n      );\n    }),\n    ignoreElements()\n  );\n"
  },
  {
    "path": "playground/src/features/todos/index.ts",
    "content": "// public API\nimport * as todosConstants from './constants';\nimport * as todosActions from './actions';\nimport todosReducer from './reducer';\nimport * as todosSelectors from './selectors';\nexport { todosConstants, todosActions, todosSelectors, todosReducer };\n"
  },
  {
    "path": "playground/src/features/todos/models.ts",
    "content": "export type Todo = {\n  id: string;\n  title: string;\n  completed: boolean;\n};\n\nexport enum TodosFilter {\n  All = '',\n  Completed = 'completed',\n  Active = 'active',\n}\n"
  },
  {
    "path": "playground/src/features/todos/reducer-ta.ts",
    "content": "import { combineReducers } from 'redux';\nimport { createReducer } from 'typesafe-actions';\n\nimport { Todo, TodosFilter } from './models';\nimport { ADD, CHANGE_FILTER, TOGGLE } from './constants';\n\nexport type TodosState = Readonly<{\n  todos: Todo[];\n  todosFilter: TodosFilter;\n}>;\nconst initialState: TodosState = {\n  todos: [],\n  todosFilter: TodosFilter.All,\n};\n\nconst todos = createReducer(initialState.todos)\n  .handleType(ADD, (state, action) => [...state, action.payload])\n  .handleType(TOGGLE, (state, action) =>\n    state.map(item =>\n      item.id === action.payload\n        ? { ...item, completed: !item.completed }\n        : item\n    )\n  );\n\nconst todosFilter = createReducer(initialState.todosFilter).handleType(\n  CHANGE_FILTER,\n  (state, action) => action.payload\n);\n\nexport default combineReducers({\n  todos,\n  todosFilter,\n});\n"
  },
  {
    "path": "playground/src/features/todos/reducer.spec.ts",
    "content": "import {\n  todosReducer as reducer,\n  todosActions as actions,\n} from './';\nimport { TodosState } from './reducer';\n\n/**\n * FIXTURES\n */\nconst getInitialState = (initial?: Partial<TodosState>) =>\n  reducer(initial as TodosState, {} as any);\n\n/**\n * STORIES\n */\ndescribe('Todos Stories', () => {\n  describe('initial state', () => {\n    it('should match a snapshot', () => {\n      const initialState = getInitialState();\n      expect(initialState).toMatchSnapshot();\n    });\n  });\n\n  describe('adding todos', () => {\n    it('should add a new todo as the first element', () => {\n      const initialState = getInitialState();\n      expect(initialState.todos).toHaveLength(0);\n      const state = reducer(initialState, actions.add('new todo'));\n      expect(state.todos).toHaveLength(1);\n      expect(state.todos[0].title).toEqual('new todo');\n    });\n  });\n\n  describe('toggling completion state', () => {\n    it('should mark active todo as complete', () => {\n      const activeTodo = { id: '1', completed: false, title: 'active todo' };\n      const initialState = getInitialState({ todos: [activeTodo] });\n      expect(initialState.todos[0].completed).toBeFalsy();\n      const state1 = reducer(initialState, actions.toggle(activeTodo.id));\n      expect(state1.todos[0].completed).toBeTruthy();\n    });\n  });\n});\n"
  },
  {
    "path": "playground/src/features/todos/reducer.ts",
    "content": "import { combineReducers } from 'redux';\nimport { ActionType } from 'typesafe-actions';\n\nimport { Todo, TodosFilter } from './models';\nimport * as actions from './actions';\nimport { ADD, CHANGE_FILTER, TOGGLE } from './constants';\n\nexport type TodosAction = ActionType<typeof actions>;\n\nexport type TodosState = Readonly<{\n  todos: Todo[];\n  todosFilter: TodosFilter;\n}>;\nconst initialState: TodosState = {\n  todos: [],\n  todosFilter: TodosFilter.All,\n};\n\nexport default combineReducers<TodosState, TodosAction>({\n  todos: (state = initialState.todos, action) => {\n    switch (action.type) {\n      case ADD:\n        return [...state, action.payload];\n\n      case TOGGLE:\n        return state.map(item =>\n          item.id === action.payload\n            ? { ...item, completed: !item.completed }\n            : item\n        );\n\n      default:\n        return state;\n    }\n  },\n  todosFilter: (state = initialState.todosFilter, action) => {\n    switch (action.type) {\n      case CHANGE_FILTER:\n        return action.payload;\n\n      default:\n        return state;\n    }\n  },\n});\n"
  },
  {
    "path": "playground/src/features/todos/selectors.ts",
    "content": "import { createSelector } from 'reselect';\n\nimport { TodosState } from './reducer';\n\nexport const getTodos = (state: TodosState) => state.todos;\n\nexport const getTodosFilter = (state: TodosState) => state.todosFilter;\n\nexport const getFilteredTodos = createSelector(getTodos, getTodosFilter, (todos, todosFilter) => {\n  switch (todosFilter) {\n    case 'completed':\n      return todos.filter(t => t.completed);\n    case 'active':\n      return todos.filter(t => !t.completed);\n\n    default:\n      return todos;\n  }\n});\n"
  },
  {
    "path": "playground/src/features/todos-typesafe/actions.ts",
    "content": "import cuid from 'cuid';\nimport { createAction } from 'typesafe-actions';\n\nimport { TodosFilter, Todo } from './models';\n\nconst ADD = 'todos/ADD';\nconst TOGGLE = 'todos/TOGGLE';\nconst CHANGE_FILTER = 'todos/CHANGE_FILTER';\n\nexport const add = createAction(ADD, (title: string) => ({\n  id: cuid(),\n  title,\n}))<Todo>();\n\nexport const toggle = createAction(TOGGLE)<{ id: string }>();\n\nexport const changeFilter = createAction(CHANGE_FILTER)<TodosFilter>();\n"
  },
  {
    "path": "playground/src/features/todos-typesafe/index.ts",
    "content": "// public API\nimport * as todosActions from './actions';\nimport todosReducer from './reducer';\nimport * as todosSelectors from './selectors';\nexport { todosActions, todosSelectors, todosReducer };\n"
  },
  {
    "path": "playground/src/features/todos-typesafe/models.ts",
    "content": "export type Todo = {\n  id: string;\n  title: string;\n  completed: boolean;\n};\n\nexport enum TodosFilter {\n  All = '',\n  Completed = 'completed',\n  Active = 'active',\n}\n"
  },
  {
    "path": "playground/src/features/todos-typesafe/reducer.ts",
    "content": "import { combineReducers } from 'redux';\nimport { ActionType, getType } from 'typesafe-actions';\n\nimport { Todo, TodosFilter } from './models';\nimport * as todos from './actions';\n\nexport type TodosState = Readonly<{\n  todos: Todo[];\n  todosFilter: TodosFilter;\n}>;\n\nexport type TodosAction = ActionType<typeof todos>;\n\nexport default combineReducers<TodosState, TodosAction>({\n  todos: (state = [], action) => {\n    switch (action.type) {\n      case getType(todos.add):\n        return [...state, action.payload];\n\n      case getType(todos.toggle):\n        return state.map(item => (item.id === action.payload.id ? { ...item, completed: !item.completed } : item));\n\n      default:\n        return state;\n    }\n  },\n  todosFilter: (state = TodosFilter.All, action) => {\n    switch (action.type) {\n      case getType(todos.changeFilter):\n        return action.payload;\n\n      default:\n        return state;\n    }\n  },\n});\n"
  },
  {
    "path": "playground/src/features/todos-typesafe/selectors.ts",
    "content": "import { createSelector } from 'reselect';\n\nimport { TodosState } from './reducer';\n\nexport const getTodos = (state: TodosState) => state.todos;\n\nexport const getTodosFilter = (state: TodosState) => state.todosFilter;\n\nexport const getFilteredTodos = createSelector(getTodos, getTodosFilter, (todos, todosFilter) => {\n  switch (todosFilter) {\n    case 'completed':\n      return todos.filter(t => t.completed);\n    case 'active':\n      return todos.filter(t => !t.completed);\n\n    default:\n      return todos;\n  }\n});\n"
  },
  {
    "path": "playground/src/hoc/index.ts",
    "content": "export * from './with-connected-count';\nexport * from './with-error-boundary';\nexport * from './with-state';\n"
  },
  {
    "path": "playground/src/hoc/with-connected-count.tsx",
    "content": "import { RootState } from 'MyTypes';\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { Diff } from 'utility-types';\nimport { countersActions, countersSelectors } from '../features/counters';\n\n// These props will be injected into the base component\ninterface InjectedProps {\n  count: number;\n  onIncrement: () => void;\n}\n\nexport const withConnectedCount = <BaseProps extends InjectedProps>(\n  BaseComponent: React.ComponentType<BaseProps>\n) => {\n  const mapStateToProps = (state: RootState) => ({\n    count: countersSelectors.getReduxCounter(state.counters),\n  });\n\n  const dispatchProps = {\n    onIncrement: countersActions.increment,\n  };\n\n  type HocProps = ReturnType<typeof mapStateToProps> &\n    typeof dispatchProps & {\n      // here you can extend ConnectedHoc with new props\n      overrideCount?: number;\n    };\n\n  class Hoc extends React.Component<HocProps> {\n    // Enhance component name for debugging and React-Dev-Tools\n    static displayName = `withConnectedCount(${BaseComponent.name})`;\n    // reference to original wrapped component\n    static readonly WrappedComponent = BaseComponent;\n\n    render() {\n      const { count, onIncrement, overrideCount, ...restProps } = this.props;\n\n      return (\n        <BaseComponent\n          {...(restProps as BaseProps)}\n          count={overrideCount || count} // injected\n          onIncrement={onIncrement} // injected\n        />\n      );\n    }\n  }\n\n  const ConnectedHoc = connect<\n    ReturnType<typeof mapStateToProps>,\n    typeof dispatchProps, // use \"undefined\" if NOT using dispatchProps\n    Diff<BaseProps, InjectedProps>,\n    RootState\n  >(\n    mapStateToProps,\n    dispatchProps\n  )(Hoc);\n\n  return ConnectedHoc;\n};\n"
  },
  {
    "path": "playground/src/hoc/with-connected-count.usage.tsx",
    "content": "import * as React from 'react';\n\nimport { withConnectedCount } from '../hoc';\nimport { FCCounter } from '../components';\n\nconst FCCounterWithConnectedCount = withConnectedCount(FCCounter);\n\nexport default () => (\n  <FCCounterWithConnectedCount overrideCount={5} label={'FCCounterWithState'} />\n);\n"
  },
  {
    "path": "playground/src/hoc/with-error-boundary.tsx",
    "content": "import React from 'react';\n\nconst MISSING_ERROR = 'Error was swallowed during propagation.';\n\nexport const withErrorBoundary = <BaseProps extends {}>(\n  BaseComponent: React.ComponentType<BaseProps>\n) => {\n  type HocProps = React.PropsWithChildren<{\n    // here you can extend hoc with new props\n  }>;\n  type HocState = {\n    readonly error: Error | null | undefined;\n  };\n\n  return class Hoc extends React.Component<HocProps, HocState> {\n    // Enhance component name for debugging and React-Dev-Tools\n    static displayName = `withErrorBoundary(${BaseComponent.name})`;\n    // reference to original wrapped component\n    static readonly WrappedComponent = BaseComponent;\n\n    readonly state: HocState = {\n      error: undefined,\n    };\n\n    componentDidCatch(error: Error | null, info: object) {\n      this.setState({ error: error || new Error(MISSING_ERROR) });\n      this.logErrorToCloud(error, info);\n    }\n\n    logErrorToCloud = (error: Error | null, info: object) => {\n      // TODO: send error report to service provider\n    };\n\n    render() {\n      const { children, ...restProps } = this.props;\n      const { error } = this.state;\n\n      if (error) {\n        return <BaseComponent {...(restProps as BaseProps)} />;\n      }\n\n      return children;\n    }\n  };\n};\n"
  },
  {
    "path": "playground/src/hoc/with-error-boundary.usage.tsx",
    "content": "import React, {useState} from 'react';\n\nimport { withErrorBoundary } from '../hoc';\nimport { ErrorMessage } from '../components';\n\nconst ErrorMessageWithErrorBoundary =\n  withErrorBoundary(ErrorMessage);\n\nconst BrokenComponent = () => {\n  throw new Error('I\\'m broken! Don\\'t render me.');\n};\n\nconst BrokenButton = () => {\n  const [shouldRenderBrokenComponent, setShouldRenderBrokenComponent] =\n    useState(false);\n\n  if (shouldRenderBrokenComponent) {\n    return <BrokenComponent />;\n  }\n\n  return (\n    <button\n      type=\"button\"\n      onClick={() => {\n        setShouldRenderBrokenComponent(true);\n      }}\n    >\n      {`Throw nasty error`}\n    </button>\n  );\n};\n\nexport default () => (\n  <ErrorMessageWithErrorBoundary>\n    <BrokenButton />\n  </ErrorMessageWithErrorBoundary>\n);\n"
  },
  {
    "path": "playground/src/hoc/with-state.tsx",
    "content": "import React from 'react';\nimport { Diff } from 'utility-types';\n\n// These props will be injected into the base component\ninterface InjectedProps {\n  count: number;\n  onIncrement: () => void;\n}\n\nexport const withState = <BaseProps extends InjectedProps>(\n  BaseComponent: React.ComponentType<BaseProps>\n) => {\n  type HocProps = Diff<BaseProps, InjectedProps> & {\n    // here you can extend hoc with new props\n    initialCount?: number;\n  };\n  type HocState = {\n    readonly count: number;\n  };\n\n  return class Hoc extends React.Component<HocProps, HocState> {\n    // Enhance component name for debugging and React-Dev-Tools\n    static displayName = `withState(${BaseComponent.name})`;\n    // reference to original wrapped component\n    static readonly WrappedComponent = BaseComponent;\n\n    readonly state: HocState = {\n      count: Number(this.props.initialCount) || 0,\n    };\n\n    handleIncrement = () => {\n      this.setState({ count: this.state.count + 1 });\n    };\n\n    render() {\n      const { ...restProps } = this.props;\n      const { count } = this.state;\n\n      return (\n        <BaseComponent\n        {...(restProps as BaseProps)}\n          count={count} // injected\n          onIncrement={this.handleIncrement} // injected\n        />\n      );\n    }\n  };\n};\n"
  },
  {
    "path": "playground/src/hoc/with-state.usage.tsx",
    "content": "import * as React from 'react';\n\nimport { withState } from '../hoc';\nimport { FCCounter } from '../components';\n\nconst FCCounterWithState = withState(FCCounter);\n\nexport default () => <FCCounterWithState label={'FCCounterWithState'} />;\n"
  },
  {
    "path": "playground/src/hooks/react-redux-hooks.tsx",
    "content": "import * as React from 'react';\nimport { FCCounter } from '../components';\nimport { increment } from '../features/counters/actions';\nimport { useSelector, useDispatch } from '../store/hooks';\n\nconst FCCounterConnectedHooksUsage: React.FC = () => {\n  const counter = useSelector(state => state.counters.reduxCounter);\n  const dispatch = useDispatch();\n  return <FCCounter label=\"Use selector\" count={counter} onIncrement={() => dispatch(increment())}/>;\n};\n\nexport default FCCounterConnectedHooksUsage;\n"
  },
  {
    "path": "playground/src/hooks/use-reducer.tsx",
    "content": "import * as React from 'react';\n\ninterface State {\n  count: number;\n}\n\ntype Action = { type: 'reset' } | { type: 'increment' } | { type: 'decrement' };\n\nfunction reducer(state: State, action: Action): State {\n  switch (action.type) {\n    case 'increment':\n      return { count: state.count + 1 };\n    case 'decrement':\n      return { count: state.count - 1 };\n    case 'reset':\n      return { count: 0 };\n    default:\n      throw new Error();\n  }\n}\n\ninterface CounterProps {\n  initialCount: number;\n}\n\nfunction Counter({ initialCount }: CounterProps) {\n  const [state, dispatch] = React.useReducer(reducer, {\n    count: initialCount,\n  });\n\n  return (\n    <>\n      Count: {state.count}\n      <button onClick={() => dispatch({ type: 'reset' })}>Reset</button>\n      <button onClick={() => dispatch({ type: 'increment' })}>+</button>\n      <button onClick={() => dispatch({ type: 'decrement' })}>-</button>\n    </>\n  );\n}\n\nexport default Counter;\n"
  },
  {
    "path": "playground/src/hooks/use-state.tsx",
    "content": "import * as React from 'react';\n\ntype Props = { initialCount: number };\n\nexport default function Counter({initialCount}: Props) {\n  const [count, setCount] = React.useState(initialCount);\n  return (\n    <>\n      Count: {count}\n      <button onClick={() => setCount(initialCount)}>Reset</button>\n      <button onClick={() => setCount(prevCount => prevCount + 1)}>+</button>\n      <button onClick={() => setCount(prevCount => prevCount - 1)}>-</button>\n    </>\n  );\n}\n"
  },
  {
    "path": "playground/src/hooks/use-theme-context.tsx",
    "content": "import * as React from 'react';\nimport ThemeContext from '../context/theme-context';\n\ntype Props = {};\n\nexport default function ThemeToggleButton(props: Props) {\n  const { theme, toggleTheme } = React.useContext(ThemeContext);\n  return (\n    <button onClick={toggleTheme} style={theme} >\n      Toggle Theme\n    </button>\n  );\n}\n"
  },
  {
    "path": "playground/src/index.css",
    "content": "body {\n  margin: 0;\n  padding: 0;\n  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n    sans-serif;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n    monospace;\n}\n"
  },
  {
    "path": "playground/src/index.tsx",
    "content": "// tslint:disable-next-line:no-import-side-effect\nimport 'tslib';\n// tslint:disable-next-line:no-import-side-effect\nimport './index.css';\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport * as serviceWorker from './serviceWorker';\nimport { App } from './app';\n\nReactDOM.render(<App />, document.getElementById('root'));\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"
  },
  {
    "path": "playground/src/layout/layout-footer.tsx",
    "content": "import React from 'react';\n\nexport function LayoutFooter() {\n  return (\n    <div>\n      React & Redux in TypeScript - Complete Guide\n    </div>\n  );\n}\n"
  },
  {
    "path": "playground/src/layout/layout-header.tsx",
    "content": "import React from 'react';\nimport { Link } from 'react-router-dom';\n\nexport function LayoutHeader() {\n  return (\n    <nav>\n      <ul>\n        <li>\n          <Link to=\"/\">Home</Link>\n        </li>\n      </ul>\n    </nav>\n  );\n}\n"
  },
  {
    "path": "playground/src/layout/layout.tsx",
    "content": "import React from 'react';\n\ntype Props = {\n  renderHeader: () => JSX.Element;\n  renderContent: () => JSX.Element;\n  renderFooter?: () => JSX.Element;\n};\n\nexport function Layout({ renderHeader, renderContent, renderFooter }: Props) {\n  return (\n    <div>\n      {renderHeader()}\n      <hr />\n      {renderContent()}\n      {renderFooter && renderFooter()}\n    </div>\n  );\n}\n\n"
  },
  {
    "path": "playground/src/models/index.ts",
    "content": "export * from './user';\n"
  },
  {
    "path": "playground/src/models/nominal-types.ts",
    "content": "// Nominal Typing\n// Usefull to model domain concepts that are using primitive data type for it's value\n\n// Method 1: using \"interface\"\nexport interface Name extends String {\n  _brand: 'Name';\n}\nconst createName = (name: string): Name => {\n  // validation of business rules\n  return name as any;\n};\n\n// Method 2: using \"type\"\ntype Surname = string & { _brand: 'Surname' };\nconst createSurname = (surname: string): Surname => {\n  // validation of business rules\n  return surname as any;\n};\n\ntype Person = {\n  name: Name;\n  surname: Surname;\n};\n\nconst person: Person = {\n  name: createName('Piotr'),\n  surname: createSurname('Witek'),\n};\n\n// Type system will ensure that the domain objects can only contain correct data\n// person.name = 'Karol'; // error\n// person.name = person.surname; // error\nperson.name = createName('Karol'); // OK!\n// person.surname = 'Mate'; // error\n// person.surname = person.name; // error\nperson.surname = createSurname('Mate'); // OK!\n\n// easy casting to supertype\nexport let str: string;\nstr = person.name.toString(); // Method 1 & Method 2\nstr = person.surname; // Method 2 only\n"
  },
  {
    "path": "playground/src/models/user.ts",
    "content": "import cuid from 'cuid';\n\nexport interface IUserDTO {\n  id: string;\n  first_name: string;\n  last_name: string;\n}\n\nexport interface IUser {\n  id: string;\n  firstName: string;\n  lastName: string;\n  fullName: string;\n\n  serialize(): IUserDTO;\n}\n\nexport class User implements IUser {\n  id: string = cuid();\n  get fullName(): string {\n    return `${this.firstName} ${this.lastName}`;\n  }\n\n  constructor(public firstName: string, public lastName: string) {}\n\n  static deserialize(dto: IUserDTO): IUser {\n    const model = new User(dto.first_name, dto.last_name);\n    model.id = dto.id;\n\n    return model;\n  }\n\n  serialize(): IUserDTO {\n    return {\n      id: this.id,\n      first_name: this.firstName,\n      last_name: this.lastName,\n    };\n  }\n}\n"
  },
  {
    "path": "playground/src/react-app-env.d.ts",
    "content": "/// <reference types=\"react-scripts\" />\n"
  },
  {
    "path": "playground/src/routes/home.tsx",
    "content": "import React from 'react'\nimport FCCounterUsage from '../components/fc-counter.usage';\nimport FCCounterWithDefaultPropsUsage from '../components/fc-counter-with-default-props.usage';\nimport FCSpreadAttributesUsage from '../components/fc-spread-attributes.usage';\nimport ClassCounterUsage from '../components/class-counter.usage';\nimport ClassCounterWithDefaultPropsUsage from '../components/class-counter-with-default-props.usage';\nimport UserListUsage from '../components/generic-list.usage';\nimport WithErrorBoundaryUsage from '../hoc/with-error-boundary.usage';\nimport WithStateUsage from '../hoc/with-state.usage';\nimport WithConnectedCountUsage from '../hoc/with-connected-count.usage';\n\nexport function Home() {\n  return (\n    <section>\n      <FCCounterUsage />\n      <FCCounterWithDefaultPropsUsage />\n      <FCSpreadAttributesUsage />\n      <ClassCounterUsage />\n      <ClassCounterWithDefaultPropsUsage />\n      <UserListUsage />\n      <WithErrorBoundaryUsage />\n      <WithStateUsage />\n      <WithConnectedCountUsage />\n    </section>\n  );\n};\n"
  },
  {
    "path": "playground/src/routes/not-found.tsx",
    "content": "import React from 'react';\nimport { Link } from 'react-router-dom';\n\nexport function NotFound() {\n  return (\n    <div>\n      <h2>Not found!</h2>\n      <p>\n        <Link to=\"/\">Go to the home page</Link>\n      </p>\n    </div>\n  );\n}\n"
  },
  {
    "path": "playground/src/serviceWorker.ts",
    "content": "// tslint:disable:no-console\n// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n  window.location.hostname === 'localhost' ||\n    // [::1] is the IPv6 localhost address.\n    window.location.hostname === '[::1]' ||\n    // 127.0.0.1/8 is considered localhost for IPv4.\n    window.location.hostname.match(\n      /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n    )\n);\n\ntype Config = {\n  onSuccess?: (registration: ServiceWorkerRegistration) => void;\n  onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n  if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n    // The URL constructor is available in all browsers that support SW.\n    const publicUrl = new URL(\n      (process as { env: { [key: string]: string } }).env.PUBLIC_URL,\n      window.location.href\n    );\n    if (publicUrl.origin !== window.location.origin) {\n      // Our service worker won't work if PUBLIC_URL is on a different origin\n      // from what our page is served on. This might happen if a CDN is used to\n      // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n      return;\n    }\n\n    window.addEventListener('load', () => {\n      const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n      if (isLocalhost) {\n        // This is running on localhost. Let's check if a service worker still exists or not.\n        checkValidServiceWorker(swUrl, config);\n\n        // Add some additional logging to localhost, pointing developers to the\n        // service worker/PWA documentation.\n        navigator.serviceWorker.ready.then(() => {\n          console.log(\n            'This web app is being served cache-first by a service ' +\n              'worker. To learn more, visit https://bit.ly/CRA-PWA'\n          );\n        });\n      } else {\n        // Is not localhost. Just register service worker\n        registerValidSW(swUrl, config);\n      }\n    });\n  }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n  navigator.serviceWorker\n    .register(swUrl)\n    .then(registration => {\n      registration.onupdatefound = () => {\n        const installingWorker = registration.installing;\n        if (installingWorker == null) {\n          return;\n        }\n        installingWorker.onstatechange = () => {\n          if (installingWorker.state === 'installed') {\n            if (navigator.serviceWorker.controller) {\n              // At this point, the updated precached content has been fetched,\n              // but the previous service worker will still serve the older\n              // content until all client tabs are closed.\n              console.log(\n                'New content is available and will be used when all ' +\n                  'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n              );\n\n              // Execute callback\n              if (config && config.onUpdate) {\n                config.onUpdate(registration);\n              }\n            } else {\n              // At this point, everything has been precached.\n              // It's the perfect time to display a\n              // \"Content is cached for offline use.\" message.\n              console.log('Content is cached for offline use.');\n\n              // Execute callback\n              if (config && config.onSuccess) {\n                config.onSuccess(registration);\n              }\n            }\n          }\n        };\n      };\n    })\n    .catch(error => {\n      console.error('Error during service worker registration:', error);\n    });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n  // Check if the service worker can be found. If it can't reload the page.\n  fetch(swUrl)\n    .then(response => {\n      // Ensure service worker exists, and that we really are getting a JS file.\n      const contentType = response.headers.get('content-type');\n      if (\n        response.status === 404 ||\n        (contentType != null && contentType.indexOf('javascript') === -1)\n      ) {\n        // No service worker found. Probably a different app. Reload the page.\n        navigator.serviceWorker.ready.then(registration => {\n          registration.unregister().then(() => {\n            window.location.reload();\n          });\n        });\n      } else {\n        // Service worker found. Proceed as normal.\n        registerValidSW(swUrl, config);\n      }\n    })\n    .catch(() => {\n      console.log(\n        'No internet connection found. App is running in offline mode.'\n      );\n    });\n}\n\nexport function unregister() {\n  if ('serviceWorker' in navigator) {\n    navigator.serviceWorker.ready.then(registration => {\n      registration.unregister();\n    });\n  }\n}\n"
  },
  {
    "path": "playground/src/services/index.ts",
    "content": "import * as logger from './logger-service';\nimport * as localStorage from './local-storage-service';\n\nexport default {\n  logger,\n  localStorage,\n};\n"
  },
  {
    "path": "playground/src/services/local-storage-service.ts",
    "content": "const version = process.env.APP_VERSION;\nconst STORAGE_KEY = `__SERIALIZED_STATE_TREE_v${version}__`;\n\nexport function saveState<T = object>(storeState: T): boolean {\n  if (!localStorage) {\n    return false;\n  }\n\n  try {\n    const serializedState = JSON.stringify(storeState);\n    localStorage.setItem(STORAGE_KEY, serializedState);\n    return true;\n  } catch (error) {\n    throw new Error('store serialization failed');\n  }\n}\n\nexport function loadState<T = object>(): T | undefined {\n  if (!localStorage) {\n    return;\n  }\n\n  try {\n    const serializedState = localStorage.getItem(STORAGE_KEY);\n    if (serializedState == null) {\n      return;\n    }\n    return JSON.parse(serializedState);\n  } catch (error) {\n    throw new Error('store deserialization failed');\n  }\n}\n"
  },
  {
    "path": "playground/src/services/logger-service.ts",
    "content": "// tslint:disable-next-line:no-console\nexport const log = console.log;\n"
  },
  {
    "path": "playground/src/services/types.d.ts",
    "content": "declare module 'MyTypes' {\n  export type Services = typeof import('./index').default;\n}\n"
  },
  {
    "path": "playground/src/store/hooks.ts",
    "content": "import { Dispatch } from 'redux';\nimport {\n  TypedUseSelectorHook,\n  useSelector as useGenericSelector,\n  useDispatch as useGenericDispatch\n} from 'react-redux';\nimport { RootState, RootAction } from 'MyTypes';\n\nexport const useSelector: TypedUseSelectorHook<RootState> = useGenericSelector;\n\nexport const useDispatch: () => Dispatch<RootAction> = useGenericDispatch;\n"
  },
  {
    "path": "playground/src/store/index.ts",
    "content": "export { default as store } from './store';\nexport * from './redux-router';\n"
  },
  {
    "path": "playground/src/store/redux-router.ts",
    "content": "import { createBrowserHistory } from 'history';\nimport { createRouterReducer } from '@lagunovsky/redux-react-router';\nimport { createRouterMiddleware } from '@lagunovsky/redux-react-router'\n\nexport const history = createBrowserHistory();\nexport const routerReducer = createRouterReducer(history);\nexport const routerMiddleware = createRouterMiddleware(history)\n"
  },
  {
    "path": "playground/src/store/root-action.ts",
    "content": "import * as todosActions from '../features/todos/actions';\nimport * as countersActions from '../features/counters/actions';\nimport { routerActions } from '@lagunovsky/redux-react-router'\n\nexport default {\n  router: routerActions,\n  todos: todosActions,\n  counters: countersActions,\n};\n"
  },
  {
    "path": "playground/src/store/root-epic.ts",
    "content": "import { combineEpics } from 'redux-observable';\n\nimport * as todosEpics from '../features/todos/epics';\n\nexport default combineEpics(...Object.values(todosEpics));\n"
  },
  {
    "path": "playground/src/store/root-reducer.ts",
    "content": "import { combineReducers } from 'redux';\n\nimport countersReducer from '../features/counters/reducer';\nimport todosReducer from '../features/todos/reducer';\nimport { routerReducer } from './redux-router';\n\nconst rootReducer = combineReducers({\n  router: routerReducer,\n  todos: todosReducer,\n  counters: countersReducer,\n});\n\nexport default rootReducer;\n"
  },
  {
    "path": "playground/src/store/store.ts",
    "content": "import { RootAction, RootState, Services } from 'MyTypes';\nimport { applyMiddleware, createStore } from 'redux';\nimport { createEpicMiddleware } from 'redux-observable';\n\nimport services from '../services';\nimport { routerMiddleware } from './redux-router';\nimport rootEpic from './root-epic';\nimport rootReducer from './root-reducer';\nimport { composeEnhancers } from './utils';\n\nconst epicMiddleware = createEpicMiddleware<\n  RootAction,\n  RootAction,\n  RootState,\n  Services\n>({\n  dependencies: services,\n});\n\n// configure middlewares\nconst middlewares = [epicMiddleware, routerMiddleware];\n// compose enhancers\nconst enhancer = composeEnhancers(applyMiddleware(...middlewares));\n\n// rehydrate state on app start\nconst initialState = {};\n\n// create store\nconst store = createStore(\n  rootReducer,\n  initialState,\n  enhancer\n);\n\nepicMiddleware.run(rootEpic);\n\n// export store singleton instance\nexport default store;\n"
  },
  {
    "path": "playground/src/store/types.d.ts",
    "content": "import { StateType, ActionType } from 'typesafe-actions';\n\ndeclare module 'MyTypes' {\n  export type Store = StateType<typeof import('./store').default>;\n  export type RootAction = ActionType<typeof import('./root-action').default>;\n  export type RootState = StateType<ReturnType<typeof import('./root-reducer').default>>;\n}\n\ndeclare module 'typesafe-actions' {\n  interface Types {\n    RootAction: ActionType<typeof import('./root-action').default>;\n  }\n}\n"
  },
  {
    "path": "playground/src/store/utils.ts",
    "content": "import { compose } from 'redux';\n\nexport const composeEnhancers =\n  (process.env.NODE_ENV === 'development' &&\n    window &&\n    window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) ||\n  compose;\n"
  },
  {
    "path": "playground/src/storyshots.disabled-test.ts",
    "content": "// import initStoryshots, {\n//   multiSnapshotWithOptions,\n// } from '@storybook/addon-storyshots';\n\n// initStoryshots({\n//   integrityOptions: { cwd: __dirname },\n//   test: multiSnapshotWithOptions({}),\n// });\n\nexport {}\n"
  },
  {
    "path": "playground/src-old/App.css",
    "content": ".App {\n  text-align: center;\n}\n\n.App-logo {\n  height: 40vmin;\n  pointer-events: none;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n  .App-logo {\n    animation: App-logo-spin infinite 20s linear;\n  }\n}\n\n.App-header {\n  background-color: #282c34;\n  min-height: 100vh;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  font-size: calc(10px + 2vmin);\n  color: white;\n}\n\n.App-link {\n  color: #61dafb;\n}\n\n@keyframes App-logo-spin {\n  from {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(360deg);\n  }\n}\n"
  },
  {
    "path": "playground/src-old/App.test.tsx",
    "content": "import React from 'react';\nimport { render, screen } from '@testing-library/react';\nimport App from './App';\n\ntest('renders learn react link', () => {\n  render(<App />);\n  const linkElement = screen.getByText(/learn react/i);\n  expect(linkElement).toBeInTheDocument();\n});\n"
  },
  {
    "path": "playground/src-old/App.tsx",
    "content": "import React from 'react';\nimport logo from './logo.svg';\nimport './App.css';\n\nfunction App() {\n  return (\n    <div className=\"App\">\n      <header className=\"App-header\">\n        <img src={logo} className=\"App-logo\" alt=\"logo\" />\n        <p>\n          Edit <code>src/App.tsx</code> and save to reload.\n        </p>\n        <a\n          className=\"App-link\"\n          href=\"https://reactjs.org\"\n          target=\"_blank\"\n          rel=\"noopener noreferrer\"\n        >\n          Learn React\n        </a>\n      </header>\n    </div>\n  );\n}\n\nexport default App;\n"
  },
  {
    "path": "playground/src-old/index.css",
    "content": "body {\n  margin: 0;\n  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n    sans-serif;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n    monospace;\n}\n"
  },
  {
    "path": "playground/src-old/index.tsx",
    "content": "import React from 'react';\nimport ReactDOM from 'react-dom/client';\nimport './index.css';\nimport App from './App';\nimport reportWebVitals from './reportWebVitals';\n\nconst root = ReactDOM.createRoot(\n  document.getElementById('root') as HTMLElement\n);\nroot.render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>\n);\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals();\n"
  },
  {
    "path": "playground/src-old/react-app-env.d.ts",
    "content": "/// <reference types=\"react-scripts\" />\n"
  },
  {
    "path": "playground/src-old/reportWebVitals.ts",
    "content": "import { ReportHandler } from 'web-vitals';\n\nconst reportWebVitals = (onPerfEntry?: ReportHandler) => {\n  if (onPerfEntry && onPerfEntry instanceof Function) {\n    import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n      getCLS(onPerfEntry);\n      getFID(onPerfEntry);\n      getFCP(onPerfEntry);\n      getLCP(onPerfEntry);\n      getTTFB(onPerfEntry);\n    });\n  }\n};\n\nexport default reportWebVitals;\n"
  },
  {
    "path": "playground/src-old/setupTests.ts",
    "content": "// jest-dom adds custom jest matchers for asserting on DOM nodes.\n// allows you to do things like:\n// expect(element).toHaveTextContent(/react/i)\n// learn more: https://github.com/testing-library/jest-dom\nimport '@testing-library/jest-dom';\n"
  },
  {
    "path": "playground/styleguide/docs/intro.md",
    "content": "### Styleguide\n\n[⇦ back to guide](https://github.com/piotrwitek/react-redux-typescript-guide#table-of-contents)\n"
  },
  {
    "path": "playground/styleguide/package.json",
    "content": "{\n  \"name\": \"styleguide\",\n  \"description\": \"Styleguide for https://github.com/piotrwitek/react-redux-typescript-guide\",\n  \"version\": \"1.0.0\",\n  \"private\": true,\n  \"author\": \"Piotr Witek <piotrek.witek@gmail.com> (http://piotrwitek.github.io/)\",\n  \"repository\": \"https://github.com/piotrwitek/react-redux-typescript-guide.git\",\n  \"license\": \"MIT\",\n  \"main\": \"src/index.tsx\",\n  \"scripts\": {\n    \"styleguide\": \"styleguidist server\",\n    \"styleguide:build\": \"styleguidist build\"\n  },\n  \"dependencies\": {\n    \"react-docgen-typescript\": \"1.12.3\",\n    \"react-styleguidist\": \"8.0.6\",\n    \"typescript\": \"3.1.6\",\n    \"webpack-blocks\": \"1.0.0\"\n  }\n}\n"
  },
  {
    "path": "playground/styleguide/styleguide.config.js",
    "content": "const path = require('path');\nconst fs = require('fs');\nconst { createConfig } = require('webpack-blocks');\nconst typescript = require('@webpack-blocks/typescript');\nconst webpackConfig = createConfig([typescript()]);\nwebpackConfig.resolve.alias = { '@src': path.join(__dirname, 'src') };\n\nmodule.exports = {\n  showUsage: false,\n  styleguideDir: '../docs/',\n  title: 'React & Redux in TypeScript - Component Typing Patterns',\n  ignore: ['**/*.usage.tsx'],\n  sections: [\n    {\n      name: 'Introduction',\n      content: './docs/intro.md',\n    },\n    {\n      name: 'Function Components',\n      components: () => [\n        './src/components/fc-counter.tsx',\n        './src/components/fc-spread-attributes.tsx',\n      ],\n    },\n    {\n      name: 'Class Components',\n      components: () => [\n        './src/components/class-counter.tsx',\n        './src/components/class-counter-with-default-props.tsx',\n      ],\n    },\n    {\n      name: 'Generic Components',\n      components: () => ['./src/components/generic-list.tsx'],\n    },\n    {\n      name: 'Render Props',\n      components: () => [\n        './src/components/name-provider.tsx',\n        './src/components/mouse-provider.tsx',\n      ],\n    },\n  ],\n  theme: {\n    sidebarWidth: 300,\n  },\n  propsParser: require('react-docgen-typescript').parse,\n  webpackConfig: webpackConfig,\n  updateExample: function(props, exampleFilePath) {\n    if (typeof props.settings.filePath === 'string') {\n      const {\n        settings: { filePath },\n      } = props;\n      delete props.settings.filePath;\n\n      props.content = fs.readFileSync(\n        path.resolve(exampleFilePath, '..', filePath),\n        { encoding: 'utf-8' }\n      );\n      props.settings.static = true;\n    }\n\n    return props;\n  },\n};\n"
  },
  {
    "path": "playground/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES6\",\n    \"lib\": [\n      \"dom\",\n      \"dom.iterable\",\n      \"esnext\"\n    ],\n    \"allowJs\": true,\n    \"skipLibCheck\": true,\n    \"esModuleInterop\": true,\n    \"allowSyntheticDefaultImports\": true,\n    \"strict\": true,\n    \"forceConsistentCasingInFileNames\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"module\": \"esnext\",\n    \"moduleResolution\": \"node\",\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\"\n  },\n  \"include\": [\n    \"src\",\n    \"typings\"\n  ]\n}\n"
  },
  {
    "path": "playground/tsconfig.test.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"module\": \"commonjs\"\n  }\n}"
  },
  {
    "path": "playground/typings/augmentations.d.ts",
    "content": "// typings/augmentations.ts\n\n// import { Operator } from 'rxjs/Operator';\n// import { Observable } from 'rxjs/Observable';\n// declare module 'rxjs/Subject' {\n//   // tslint:disable-next-line:interface-name\n//   interface Subject<T> {\n//     lift<R>(operator: Operator<T, R>): Observable<R>;\n//   }\n// }\n"
  },
  {
    "path": "playground/typings/globals.d.ts",
    "content": "// typings/globals.d.ts\n\ndeclare interface Window {\n  __REDUX_DEVTOOLS_EXTENSION__: any;\n  __REDUX_DEVTOOLS_EXTENSION_COMPOSE__: any;\n}\n\ndeclare interface NodeModule {\n  hot?: { accept: (path: string, callback: () => void) => void };\n}\n\ndeclare interface System {\n  import<T = any>(module: string): Promise<T>;\n}\ndeclare var System: System;\n\n// declare const process: any;\n// declare const require: any;\n"
  },
  {
    "path": "playground/typings/modules.d.ts",
    "content": "// typings/modules.d.ts\ndeclare module 'MyTypes';\ndeclare module 'react-test-renderer';\ndeclare module '@storybook/addon-storyshots'\n"
  },
  {
    "path": "playground/typings/redux/index.d.ts",
    "content": "\n/**\n * An *action* is a plain object that represents an intention to change the\n * state. Actions are the only way to get data into the store. Any data,\n * whether from UI events, network callbacks, or other sources such as\n * WebSockets needs to eventually be dispatched as actions.\n *\n * Actions must have a `type` field that indicates the type of action being\n * performed. Types can be defined as constants and imported from another\n * module. It's better to use strings for `type` than Symbols because strings\n * are serializable.\n *\n * Other than `type`, the structure of an action object is really up to you.\n * If you're interested, check out Flux Standard Action for recommendations on\n * how actions should be constructed.\n *\n * @template T the type of the action's `type` tag.\n */\nexport interface Action<T = any> {\n  type: T;\n}\n\n/* reducers */\n\n/**\n * A *reducer* (also called a *reducing function*) is a function that accepts\n * an accumulation and a value and returns a new accumulation. They are used\n * to reduce a collection of values down to a single value\n *\n * Reducers are not unique to Redux—they are a fundamental concept in\n * functional programming.  Even most non-functional languages, like\n * JavaScript, have a built-in API for reducing. In JavaScript, it's\n * `Array.prototype.reduce()`.\n *\n * In Redux, the accumulated value is the state object, and the values being\n * accumulated are actions. Reducers calculate a new state given the previous\n * state and an action. They must be *pure functions*—functions that return\n * the exact same output for given inputs. They should also be free of\n * side-effects. This is what enables exciting features like hot reloading and\n * time travel.\n *\n * Reducers are the most important concept in Redux.\n *\n * *Do not put API calls into reducers.*\n *\n * @template S The type of state consumed and produced by this reducer.\n * @template A The type of actions the reducer can potentially respond to.\n */\nexport type Reducer<S = any, A extends Action = Action> = (state: S | undefined, action: A) => S;\n\n/**\n * Object whose values correspond to different reducer functions.\n *\n * @template A The type of actions the reducers can potentially respond to.\n */\nexport type ReducersMapObject<S = any, A extends Action = Action> = {\n  [K in keyof S]: Reducer<S[K], A>;\n}\n\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @template S Combined state object type.\n *\n * @param reducers An object whose values correspond to different reducer\n *   functions that need to be combined into one. One handy way to obtain it\n *   is to use ES6 `import * as reducers` syntax. The reducers may never\n *   return undefined for any action. Instead, they should return their\n *   initial state if the state passed to them was undefined, and the current\n *   state for any unrecognized action.\n *\n * @returns A reducer function that invokes every reducer inside the passed\n *   object, and builds a state object with the same shape.\n */\nexport function combineReducers<S, A extends Action = Action>(reducers: ReducersMapObject<S, A>): Reducer<S, A>;\n\n\n/* store */\n\n/**\n * A *dispatching function* (or simply *dispatch function*) is a function that\n * accepts an action or an async action; it then may or may not dispatch one\n * or more actions to the store.\n *\n * We must distinguish between dispatching functions in general and the base\n * `dispatch` function provided by the store instance without any middleware.\n *\n * The base dispatch function *always* synchronously sends an action to the\n * store's reducer, along with the previous state returned by the store, to\n * calculate a new state. It expects actions to be plain objects ready to be\n * consumed by the reducer.\n *\n * Middleware wraps the base dispatch function. It allows the dispatch\n * function to handle async actions in addition to actions. Middleware may\n * transform, delay, ignore, or otherwise interpret actions or async actions\n * before passing them to the next middleware.\n *\n * @template D the type of things (actions or otherwise) which may be dispatched.\n */\nexport interface Dispatch<D = Action> {\n  <A extends D>(action: A): A;\n}\n\n/**\n * Function to remove listener added by `Store.subscribe()`.\n */\nexport interface Unsubscribe {\n  (): void;\n}\n\n/**\n * A store is an object that holds the application's state tree.\n * There should only be a single store in a Redux app, as the composition\n * happens on the reducer level.\n *\n * @template S The type of state held by this store.\n * @template A the type of actions which may be dispatched by this store.\n * @template N The type of non-actions which may be dispatched by this store.\n */\nexport interface Store<S = any, A extends Action = Action, N = never> {\n  /**\n   * Dispatches an action. It is the only way to trigger a state change.\n   *\n   * The `reducer` function, used to create the store, will be called with the\n   * current state tree and the given `action`. Its return value will be\n   * considered the **next** state of the tree, and the change listeners will\n   * be notified.\n   *\n   * The base implementation only supports plain object actions. If you want\n   * to dispatch a Promise, an Observable, a thunk, or something else, you\n   * need to wrap your store creating function into the corresponding\n   * middleware. For example, see the documentation for the `redux-thunk`\n   * package. Even the middleware will eventually dispatch plain object\n   * actions using this method.\n   *\n   * @param action A plain object representing “what changed”. It is a good\n   *   idea to keep actions serializable so you can record and replay user\n   *   sessions, or use the time travelling `redux-devtools`. An action must\n   *   have a `type` property which may not be `undefined`. It is a good idea\n   *   to use string constants for action types.\n   *\n   * @returns For convenience, the same action object you dispatched.\n   *\n   * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n   * return something else (for example, a Promise you can await).\n   */\n  dispatch: Dispatch<A | N>;\n\n  /**\n   * Reads the state tree managed by the store.\n   *\n   * @returns The current state tree of your application.\n   */\n  getState(): S;\n\n  /**\n   * Adds a change listener. It will be called any time an action is\n   * dispatched, and some part of the state tree may potentially have changed.\n   * You may then call `getState()` to read the current state tree inside the\n   * callback.\n   *\n   * You may call `dispatch()` from a change listener, with the following\n   * caveats:\n   *\n   * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n   * If you subscribe or unsubscribe while the listeners are being invoked,\n   * this will not have any effect on the `dispatch()` that is currently in\n   * progress. However, the next `dispatch()` call, whether nested or not,\n   * will use a more recent snapshot of the subscription list.\n   *\n   * 2. The listener should not expect to see all states changes, as the state\n   * might have been updated multiple times during a nested `dispatch()` before\n   * the listener is called. It is, however, guaranteed that all subscribers\n   * registered before the `dispatch()` started will be called with the latest\n   * state by the time it exits.\n   *\n   * @param listener A callback to be invoked on every dispatch.\n   * @returns A function to remove this change listener.\n   */\n  subscribe(listener: () => void): Unsubscribe;\n\n  /**\n   * Replaces the reducer currently used by the store to calculate the state.\n   *\n   * You might need this if your app implements code splitting and you want to\n   * load some of the reducers dynamically. You might also need this if you\n   * implement a hot reloading mechanism for Redux.\n   *\n   * @param nextReducer The reducer for the store to use instead.\n   */\n  replaceReducer(nextReducer: Reducer<S, A>): void;\n}\n\nexport type DeepPartial<T> = {[K in keyof T]?: DeepPartial<T[K]> };\n\n/**\n * A store creator is a function that creates a Redux store. Like with\n * dispatching function, we must distinguish the base store creator,\n * `createStore(reducer, preloadedState)` exported from the Redux package, from\n * store creators that are returned from the store enhancers.\n *\n * @template S The type of state to be held by the store.\n * @template A The type of actions which may be dispatched.\n * @template D The type of all things which may be dispatched.\n */\nexport interface StoreCreator {\n  <S, A extends Action, N>(reducer: Reducer<S, A>, enhancer?: StoreEnhancer<N>): Store<S, A, N>;\n  <S, A extends Action, N>(reducer: Reducer<S, A>, preloadedState: DeepPartial<S>, enhancer?: StoreEnhancer<N>): Store<S, A, N>;\n}\n\n/**\n * A store enhancer is a higher-order function that composes a store creator\n * to return a new, enhanced store creator. This is similar to middleware in\n * that it allows you to alter the store interface in a composable way.\n *\n * Store enhancers are much the same concept as higher-order components in\n * React, which are also occasionally called “component enhancers”.\n *\n * Because a store is not an instance, but rather a plain-object collection of\n * functions, copies can be easily created and modified without mutating the\n * original store. There is an example in `compose` documentation\n * demonstrating that.\n *\n * Most likely you'll never write a store enhancer, but you may use the one\n * provided by the developer tools. It is what makes time travel possible\n * without the app being aware it is happening. Amusingly, the Redux\n * middleware implementation is itself a store enhancer.\n *\n */\nexport type StoreEnhancer<N = never> = (next: StoreEnhancerStoreCreator<N>) => StoreEnhancerStoreCreator<N>;\nexport type GenericStoreEnhancer<N = never> = StoreEnhancer<N>;\nexport type StoreEnhancerStoreCreator<N = never> = <S = any, A extends Action = Action>(reducer: Reducer<S, A>, preloadedState?: DeepPartial<S>) => Store<S, A, N>;\n\n/**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several\n * reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @template S State object type.\n *\n * @param reducer A function that returns the next state tree, given the\n *   current state tree and the action to handle.\n *\n * @param [preloadedState] The initial state. You may optionally specify it to\n *   hydrate the state from the server in universal apps, or to restore a\n *   previously serialized user session. If you use `combineReducers` to\n *   produce the root reducer function, this must be an object with the same\n *   shape as `combineReducers` keys.\n *\n * @param [enhancer] The store enhancer. You may optionally specify it to\n *   enhance the store with third-party capabilities such as middleware, time\n *   travel, persistence, etc. The only store enhancer that ships with Redux\n *   is `applyMiddleware()`.\n *\n * @returns A Redux store that lets you read the state, dispatch actions and\n *   subscribe to changes.\n */\nexport const createStore: StoreCreator;\n\n\n/* middleware */\n\nexport interface MiddlewareAPI<S = any, D = Action> {\n  dispatch: Dispatch<D>;\n  getState(): S;\n}\n\n/**\n * A middleware is a higher-order function that composes a dispatch function\n * to return a new dispatch function. It often turns async actions into\n * actions.\n *\n * Middleware is composable using function composition. It is useful for\n * logging actions, performing side effects like routing, or turning an\n * asynchronous API call into a series of synchronous actions.\n */\nexport interface Middleware {\n  <S = any, D = Action>(api: MiddlewareAPI<S, D>): (next: Dispatch<D>) => Dispatch<D>;\n}\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as\n * expressing asynchronous actions in a concise manner, or logging every\n * action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState`\n * functions as named arguments.\n *\n * @param middlewares The middleware chain to be applied.\n * @returns A store enhancer applying the middleware.\n */\nexport function applyMiddleware(...middlewares: Middleware[]): GenericStoreEnhancer;\n\n\n/* action creators */\n\n/**\n * An *action creator* is, quite simply, a function that creates an action. Do\n * not confuse the two terms—again, an action is a payload of information, and\n * an action creator is a factory that creates an action.\n *\n * Calling an action creator only produces an action, but does not dispatch\n * it. You need to call the store's `dispatch` function to actually cause the\n * mutation. Sometimes we say *bound action creators* to mean functions that\n * call an action creator and immediately dispatch its result to a specific\n * store instance.\n *\n * If an action creator needs to read the current state, perform an API call,\n * or cause a side effect, like a routing transition, it should return an\n * async action instead of an action.\n *\n * @template A Returned action type.\n */\nexport interface ActionCreator<A> {\n  (...args: any[]): A;\n}\n\n/**\n * Object whose values are action creator functions.\n */\nexport interface ActionCreatorsMapObject<A = any> {\n  [key: string]: ActionCreator<A>;\n}\n\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass a single function as the first argument,\n * and get a function in return.\n *\n * @param actionCreator An object whose values are action creator functions.\n *   One handy way to obtain it is to use ES6 `import * as` syntax. You may\n *   also pass a single function.\n *\n * @param dispatch The `dispatch` function available on your Redux store.\n *\n * @returns The object mimicking the original object, but with every action\n *   creator wrapped into the `dispatch` call. If you passed a function as\n *   `actionCreator`, the return value will also be a single function.\n */\nexport function bindActionCreators<A, C extends ActionCreator<A>>(actionCreator: C, dispatch: Dispatch<A>): C;\n\nexport function bindActionCreators<\n  A extends ActionCreator<any>,\n  B extends ActionCreator<any>\n  >(actionCreator: A, dispatch: Dispatch<any>): B;\n\nexport function bindActionCreators<A, M extends ActionCreatorsMapObject<A>>(actionCreators: M, dispatch: Dispatch<A>): M;\n\nexport function bindActionCreators<\n  M extends ActionCreatorsMapObject<any>,\n  N extends ActionCreatorsMapObject<any>\n  >(actionCreators: M, dispatch: Dispatch<any>): N;\n\n\n/* compose */\n\ntype Func0<R> = () => R;\ntype Func1<T1, R> = (a1: T1) => R;\ntype Func2<T1, T2, R> = (a1: T1, a2: T2) => R;\ntype Func3<T1, T2, T3, R> = (a1: T1, a2: T2, a3: T3, ...args: any[]) => R;\n\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for the\n * resulting composite function.\n *\n * @param funcs The functions to compose.\n * @returns R function obtained by composing the argument functions from right\n *   to left. For example, `compose(f, g, h)` is identical to doing\n *   `(...args) => f(g(h(...args)))`.\n */\nexport function compose(): <R>(a: R) => R;\n\nexport function compose<F extends Function>(f: F): F;\n\n/* two functions */\nexport function compose<A, R>(\n  f1: (b: A) => R, f2: Func0<A>\n): Func0<R>;\nexport function compose<A, T1, R>(\n  f1: (b: A) => R, f2: Func1<T1, A>\n): Func1<T1, R>;\nexport function compose<A, T1, T2, R>(\n  f1: (b: A) => R, f2: Func2<T1, T2, A>\n): Func2<T1, T2, R>;\nexport function compose<A, T1, T2, T3, R>(\n  f1: (b: A) => R, f2: Func3<T1, T2, T3, A>\n): Func3<T1, T2, T3, R>;\n\n/* three functions */\nexport function compose<A, B, R>(\n  f1: (b: B) => R, f2: (a: A) => B, f3: Func0<A>\n): Func0<R>;\nexport function compose<A, B, T1, R>(\n  f1: (b: B) => R, f2: (a: A) => B, f3: Func1<T1, A>\n): Func1<T1, R>;\nexport function compose<A, B, T1, T2, R>(\n  f1: (b: B) => R, f2: (a: A) => B, f3: Func2<T1, T2, A>\n): Func2<T1, T2, R>;\nexport function compose<A, B, T1, T2, T3, R>(\n  f1: (b: B) => R, f2: (a: A) => B, f3: Func3<T1, T2, T3, A>\n): Func3<T1, T2, T3, R>;\n\n/* four functions */\nexport function compose<A, B, C, R>(\n  f1: (b: C) => R, f2: (a: B) => C, f3: (a: A) => B, f4: Func0<A>\n): Func0<R>;\nexport function compose<A, B, C, T1, R>(\n  f1: (b: C) => R, f2: (a: B) => C, f3: (a: A) => B, f4: Func1<T1, A>\n): Func1<T1, R>;\nexport function compose<A, B, C, T1, T2, R>(\n  f1: (b: C) => R, f2: (a: B) => C, f3: (a: A) => B, f4: Func2<T1, T2, A>\n): Func2<T1, T2, R>;\nexport function compose<A, B, C, T1, T2, T3, R>(\n  f1: (b: C) => R, f2: (a: B) => C, f3: (a: A) => B, f4: Func3<T1, T2, T3, A>\n): Func3<T1, T2, T3, R>;\n\n/* rest */\nexport function compose<R>(\n  f1: (b: any) => R, ...funcs: Function[]\n): (...args: any[]) => R;\n\nexport function compose<R>(...funcs: Function[]): (...args: any[]) => R;\n"
  },
  {
    "path": "playground/typings/redux-thunk/index.d.ts",
    "content": "import {\n    Action,\n    ActionCreatorsMapObject,\n    AnyAction,\n    Dispatch,\n    Middleware,\n} from 'redux';\n\nexport interface ThunkDispatch<S, E, A extends Action> {\n    <R>(thunkAction: ThunkAction<R, S, E, A>): R;\n    <T extends A>(action: T): T;\n}\n\nexport type ThunkAction<R, S, E, A extends Action> = (\n    dispatch: ThunkDispatch<S, E, A>,\n    getState: () => S,\n    extraArgument: E\n) => R;\n\n/**\n * Takes a ThunkAction and returns a function signature which matches how it would appear when processed using\n * bindActionCreators\n *\n * @template T ThunkAction to be wrapped\n */\nexport type ThunkActionDispatch<\nT extends (...args: any[]) => ThunkAction<any, any, any, any>\n> = (...args: Parameters<T>) => ReturnType<ReturnType<T>>;\n\nexport type ThunkMiddleware<\nS = {},\nA extends Action = AnyAction,\nE = undefined\n> = Middleware<ThunkDispatch<S, E, A>, S, ThunkDispatch<S, E, A>>;\n\ndeclare const thunk: ThunkMiddleware & {\nwithExtraArgument<E>(extraArgument: E): ThunkMiddleware<{}, AnyAction, E>;\n};\n\nexport default thunk;\n\n/**\n * Redux behaviour changed by middleware, so overloads here\n */\ndeclare module 'redux' {\n    /**\n     * Overload for bindActionCreators redux function, returns expects responses\n     * from thunk actions\n     */\n    function bindActionCreators<M extends ActionCreatorsMapObject<any>>(\n        actionCreators: M,\n        dispatch: Dispatch\n    ): {\n        [N in keyof M]: ReturnType<M[N]> extends ThunkAction<any, any, any, any>\n            ? (...args: Parameters<M[N]>) => ReturnType<ReturnType<M[N]>>\n            : M[N]\n    };\n}\n"
  }
]