From 491ccbd3108940082308420cdf9da506b987e6ec Mon Sep 17 00:00:00 2001 From: Adamos Kyriakou Date: Wed, 3 Oct 2018 11:04:49 +1000 Subject: [PATCH 1/3] Added a new example using Falcon under the `/examples/falcon_sqlalchemy` directory. --- examples/falcon_sqlalchemy/README.md | 313 ++++ examples/falcon_sqlalchemy/demo.db | Bin 0 -> 24576 bytes examples/falcon_sqlalchemy/demo/__init__.py | 11 + examples/falcon_sqlalchemy/demo/api.py | 41 + examples/falcon_sqlalchemy/demo/data.py | 130 ++ examples/falcon_sqlalchemy/demo/demo.py | 31 + examples/falcon_sqlalchemy/demo/orm.py | 130 ++ examples/falcon_sqlalchemy/demo/orm_base.py | 239 ++++ examples/falcon_sqlalchemy/demo/resources.py | 352 +++++ examples/falcon_sqlalchemy/demo/schema.py | 107 ++ .../demo/schema_mutations.py | 43 + .../falcon_sqlalchemy/demo/schema_types.py | 68 + examples/falcon_sqlalchemy/demo/utils.py | 168 +++ .../falcon_sqlalchemy/graphiql/graphiql.css | 1263 +++++++++++++++++ .../falcon_sqlalchemy/graphiql/graphiql.html | 121 ++ .../graphiql/graphiql.min.js | 16 + .../graphiql/vendor/fetch.min.js | 1 + .../graphiql/vendor/react-15.0.1.min.js | 16 + .../graphiql/vendor/react-dom-15.0.1.min.js | 12 + examples/falcon_sqlalchemy/gunicorn_config.py | 68 + examples/falcon_sqlalchemy/requirements.txt | 8 + examples/falcon_sqlalchemy/tests/__init__.py | 1 + examples/falcon_sqlalchemy/tests/demo_test.py | 152 ++ 23 files changed, 3291 insertions(+) create mode 100644 examples/falcon_sqlalchemy/README.md create mode 100644 examples/falcon_sqlalchemy/demo.db create mode 100644 examples/falcon_sqlalchemy/demo/__init__.py create mode 100644 examples/falcon_sqlalchemy/demo/api.py create mode 100644 examples/falcon_sqlalchemy/demo/data.py create mode 100644 examples/falcon_sqlalchemy/demo/demo.py create mode 100644 examples/falcon_sqlalchemy/demo/orm.py create mode 100644 examples/falcon_sqlalchemy/demo/orm_base.py create mode 100644 examples/falcon_sqlalchemy/demo/resources.py create mode 100644 examples/falcon_sqlalchemy/demo/schema.py create mode 100644 examples/falcon_sqlalchemy/demo/schema_mutations.py create mode 100644 examples/falcon_sqlalchemy/demo/schema_types.py create mode 100644 examples/falcon_sqlalchemy/demo/utils.py create mode 100644 examples/falcon_sqlalchemy/graphiql/graphiql.css create mode 100644 examples/falcon_sqlalchemy/graphiql/graphiql.html create mode 100644 examples/falcon_sqlalchemy/graphiql/graphiql.min.js create mode 100644 examples/falcon_sqlalchemy/graphiql/vendor/fetch.min.js create mode 100644 examples/falcon_sqlalchemy/graphiql/vendor/react-15.0.1.min.js create mode 100644 examples/falcon_sqlalchemy/graphiql/vendor/react-dom-15.0.1.min.js create mode 100644 examples/falcon_sqlalchemy/gunicorn_config.py create mode 100644 examples/falcon_sqlalchemy/requirements.txt create mode 100644 examples/falcon_sqlalchemy/tests/__init__.py create mode 100644 examples/falcon_sqlalchemy/tests/demo_test.py diff --git a/examples/falcon_sqlalchemy/README.md b/examples/falcon_sqlalchemy/README.md new file mode 100644 index 00000000..aa3aeb7f --- /dev/null +++ b/examples/falcon_sqlalchemy/README.md @@ -0,0 +1,313 @@ +# demo-graphql-sqlalchemy-falcon + +## Overview + +This is a simple project demonstrating the implementation of a GraphQL server in Python using: + +- [SQLAlchemy](https://github.com/zzzeek/sqlalchemy). +- [Falcon](https://github.com/falconry/falcon). +- [Graphene](https://github.com/graphql-python/graphene). +- [Graphene-SQLAlchemy](https://github.com/graphql-python/graphene-sqlalchemy). +- [Gunicorn](https://github.com/benoitc/gunicorn). + +The objective is to demonstrate how these different libraries can be integrated. + +## Features + +The primary feature offered by this demo are: + +- [SQLAlchemy](https://github.com/zzzeek/sqlalchemy) ORM against a local SQLite database. The ORM is super simple but showcases a many-to-many relationship between `authors` and `books` via an `author_books` association table. +- [Falcon](https://github.com/falconry/falcon) resources to serve both [GraphQL](https://github.com/facebook/graphql) and [GraphiQL](https://github.com/graphql/graphiql). + +> The [Falcon](https://github.com/falconry/falcon) resources are slightly modified versions of the ones under [https://github.com/alecrasmussen/falcon-graphql-server](https://github.com/alecrasmussen/falcon-graphql-server) so all credits to [Alec Rasmussen](https://github.com/alecrasmussen). + +- Basic [GraphQL](https://github.com/facebook/graphql) schema automatically derived from the [SQLAlchemy](https://github.com/zzzeek/sqlalchemy) ORM via [Graphene](https://github.com/graphql-python/graphene) and [Graphene-SQLAlchemy](https://github.com/graphql-python/graphene-sqlalchemy). +- API setup via [Falcon](https://github.com/falconry/falcon) with the whole thing served via [Gunicorn](https://github.com/benoitc/gunicorn). + +## Usage + +All instructions and commands below are meant to be run from the root dir of this repo. + +### Prerequisites + +You are strongly encouraged to use a virtualenv here but I can be assed writing down the instructions for that. + +Install all requirements through: + +``` +pip install -r requirements.txt +``` + +### Sample Database + +The sample SQLite database has been committed in this repo but can easily be rebuilt through: + +``` +python -m demo.orm +``` + +at which point it will create a `demo.db` in the root of this repo. + +> The sample data are defined under `data.py` while they're ingested with the code under the `main` sentinel in `orm.py`. Feel free to tinker. + +### Running Server + +The [Gunicorn](https://github.com/benoitc/gunicorn) is configured via the `gunicorn_config.py` module and binds by default to `localhost:5432/`. You can change all gunicorn configuration options under the aforementioned module. + +The server can be run through: + +``` +gunicorn -c gunicorn_config.py "demo.demo:main()" +``` + +The server exposes two endpoints: + +- `/graphql`: The standard GraphQL endpoint which can receive the queries directly (accessible by default under [http://localhost:5432/graphql](http://localhost:5432/graphql)). +- `/graphiql`: The [GraphiQL](https://github.com/graphql/graphiql) interface (accessible by default under [http://localhost:5432/graphiql](http://localhost:5432/graphiql)). + +### Queries + +Here's a couple example queries you can either run directly in [GraphiQL](https://github.com/graphql/graphiql) or by performing POST requests against the [GraphQL](https://github.com/facebook/graphql) server. + +#### Get an author by ID + +Query: + +``` +query getAuthor{ + author(authorId: 1) { + nameFirst, + nameLast + } +} +``` + +Response: + +``` +{ + "data": { + "author": { + "nameFirst": "Robert", + "nameLast": "Jordan" + } + } +} +``` + +#### Get an author by first name + +``` +query getAuthor{ + author(nameFirst: "Robert") { + nameFirst, + nameLast + } +} +``` + +Response: + +``` +{ + "data": { + "author": { + "nameFirst": "Robert", + "nameLast": "Jordan" + } + } +} +``` + +### Get an author and their books + +Query: + +``` +query getAuthor{ + author(nameFirst: "Brandon") { + nameFirst, + nameLast, + books { + title, + year + } + } +} +``` + +Response: + +``` +{ + "data": { + "author": { + "nameFirst": "Brandon", + "nameLast": "Sanderson", + "books": [ + { + "title": "The Gathering Storm", + "year": 2009 + }, + { + "title": "Towers of Midnight", + "year": 2010 + }, + { + "title": "A Memory of Light", + "year": 2013 + } + ] + } + } +} +``` + +#### Get books by year + +Query: + +``` +query getBooks{ + books(year: 1990) { + title, + year + } +} +``` + +Response: + +``` +{ + "data": { + "books": [ + { + "title": "The Eye of the World", + "year": 1990 + }, + { + "title": "The Great Hunt", + "year": 1990 + } + ] + } +} +``` + +#### Get books and their authors by their title + +Query: + +``` +query getBooks{ + books(title: "A Memory of Light") { + title, + year, + authors { + nameFirst, + nameLast + } + } +} +``` + +Response: + +``` +{ + "data": { + "books": [ + { + "title": "A Memory of Light", + "year": 2013, + "authors": [ + { + "nameFirst": "Robert", + "nameLast": "Jordan" + }, + { + "nameFirst": "Brandon", + "nameLast": "Sanderson" + } + ] + } + ] + } +} +``` + +#### Get number of books by cover-artist + +Query: + +``` +query getCountBooksByCoverArtist{ + stats { + countBooksByCoverArtist { + coverArtist, + countBooks + } + } +} +``` + +Response: + +``` +{ + "data": { + "stats": { + "countBooksByCoverArtist": [ + { + "coverArtist": null, + "countBooks": 1 + }, + { + "coverArtist": "Darrell K. Sweet", + "countBooks": 12 + }, + { + "coverArtist": "Michael Whelan", + "countBooks": 1 + } + ] + } + } +} +``` + +#### Add new author + +Query: + +``` +mutation createAuthor{ + createAuthor(author: { + nameFirst: "First Name", + nameLast: "Last Name" + }) { + author { + authorId + nameFirst + nameLast + } + } +} +``` + +Response: + +``` +{ + "data": { + "createAuthor": { + "author": { + "authorId": "3", + "nameFirst": "First Name", + "nameLast": "Last Name" + } + } + } +} +``` \ No newline at end of file diff --git a/examples/falcon_sqlalchemy/demo.db b/examples/falcon_sqlalchemy/demo.db new file mode 100644 index 0000000000000000000000000000000000000000..292831087779deed7961b9e03903d5ea35bc8fbc GIT binary patch literal 24576 zcmeI3O^6&t6vwN3x~Au|-!7;_$iX_e$xf2-gCIma=w!CDyJmJa_KYSuExnoEoi?-G z(%sp~9upD0c@#kqJct3m4tg;cQH&-84Ms5$^%4c~3sF!M1?%e?FR=HlNOeiNJY44GC-1VBy zargLweJpDE!NQ{N9}RmiZga3US+UG=!xXc%Df5uHY8NqI6NBBvWcST&7ClWb+%2P~ zH;sz17lvch>AE!BwKtC2?3O~YZ{9Lzr)xOa0DWPZ`%KHMRm^&Kl3_oTT%5m&(oJT4hYUsN zr8zkM`lKd%O_}0}X;m*23d+fqcq!ucSQ10I4gR5V>JA*n4E+a%I-D7+MmnlFMI|Gcgstuyw0)(jM4U;rcEK)uGvR zE5+m{TVyC_&t7pBmfT=Cv5hWm`x+jb?XJx?Ry+?po2zh%!S_<=Ap%5z2oM1xKm>>Y z5g-CYfCvx)B0vQGR|IZQHMaHUy@BmDeXlOn2}0i+Q#7_^i{&pmL3E!VG;I&h|3>~T z1{dK4I0=Vf7bJ~OjaQ7PjE9W9#!dNeWFtL9fCvx)B0vO)01+SpM1Tko0V42UAh6Bg z>^8Mn7IV&uAFK&~NmSkCR-}J6=N@UJ7hBgffp>DqF{v>mma!1b0zJ(3@Z>z7A;w`Doosh0M8?vjI}P6dv= z66zm~`js-A-KCZ)fggr}Z#Ux<8XdPCr*Lu9{l+wBMU@?Ny~qi+hhj$lK|j(j>`3)9 zJ0LTQ1KP{Waz^@lqeD#U2&PmPGG@m^*Lp`DdPDvEsOK$7&bF(is%%BKO3U^`{oJV6 z4&INw&kdY-0y3>t$J5V_`c7(bY$RB3*-gJAEH{)C^>;UTCi zB0vO)01+SpM1Tko0U|&IhyW3|4g`2YQH*ia{1|Eu;u<5a$;UN0)NB?tlR-_VQBx^Y zT}MqOQ8`D| List[TypeCountBooksCoverArtist]: + # Retrieve the session out of the context as the `get_query` method + # automatically selects the model. + session = info.context.get("session") # type: sqlalchemy.orm.Session + + # Define the `COUNT(books.book_id)` function. + func_count_books = sqlalchemy_func.count(Book.book_id) + + # Query out the count of books by cover-artist + query = session.query(Book.cover_artist, func_count_books) + query = query.group_by(Book.cover_artist) + results = query.all() + + # Wrap the results of the aggregation in `TypeCountBooksCoverArtist` + # objects. + objs = [ + TypeCountBooksCoverArtist( + cover_artist=result[0], + count_books=result[1] + ) for result in results + ] + + return objs diff --git a/examples/falcon_sqlalchemy/demo/utils.py b/examples/falcon_sqlalchemy/demo/utils.py new file mode 100644 index 00000000..ebe4029a --- /dev/null +++ b/examples/falcon_sqlalchemy/demo/utils.py @@ -0,0 +1,168 @@ +# coding=utf-8 + +from typing import List, Dict, Union, Type + +import graphql +from graphql.language.ast import FragmentSpread +from graphql.language.ast import Field +from graphene.utils.str_converters import to_snake_case +import sqlalchemy.orm + +from demo.orm_base import OrmBaseMixin + + +def extract_requested_fields( + info: graphql.execution.base.ResolveInfo, + fields: List[Union[Field, FragmentSpread]], + do_convert_to_snake_case: bool = True, +) -> Dict: + """Extracts the fields requested in a GraphQL query by processing the AST + and returns a nested dictionary representing the requested fields. + + Note: + This function should support arbitrarily nested field structures + including fragments. + + Example: + Consider the following query passed to a resolver and running this + function with the `ResolveInfo` object passed to the resolver. + + >>> query = "query getAuthor{author(authorId: 1){nameFirst, nameLast}}" + >>> extract_requested_fields(info, info.field_asts, True) + {'author': {'name_first': None, 'name_last': None}} + + Args: + info (graphql.execution.base.ResolveInfo): The GraphQL query info passed + to the resolver function. + fields (List[Union[Field, FragmentSpread]]): The list of `Field` or + `FragmentSpread` objects parsed out of the GraphQL query and stored + in the AST. + do_convert_to_snake_case (bool): Whether to convert the fields as they + appear in the GraphQL query (typically in camel-case) back to + snake-case (which is how they typically appear in ORM classes). + + Returns: + Dict: The nested dictionary containing all the requested fields. + """ + + result = {} + for field in fields: + + # Set the `key` as the field name. + key = field.name.value + + # Convert the key from camel-case to snake-case (if required). + if do_convert_to_snake_case: + key = to_snake_case(name=key) + + # Initialize `val` to `None`. Fields without nested-fields under them + # will have a dictionary value of `None`. + val = None + + # If the field is of type `Field` then extract the nested fields under + # the `selection_set` (if defined). These nested fields will be + # extracted recursively and placed in a dictionary under the field + # name in the `result` dictionary. + if isinstance(field, Field): + if ( + hasattr(field, "selection_set") and + field.selection_set is not None + ): + # Extract field names out of the field selections. + val = extract_requested_fields( + info=info, + fields=field.selection_set.selections, + ) + result[key] = val + # If the field is of type `FragmentSpread` then retrieve the fragment + # from `info.fragments` and recursively extract the nested fields but + # as we don't want the name of the fragment appearing in the result + # dictionary (since it does not match anything in the ORM classes) the + # result will simply be result of the extraction. + elif isinstance(field, FragmentSpread): + # Retrieve referened fragment. + fragment = info.fragments[field.name.value] + # Extract field names out of the fragment selections. + val = extract_requested_fields( + info=info, + fields=fragment.selection_set.selections, + ) + result = val + + return result + + +def apply_requested_fields( + info: graphql.execution.base.ResolveInfo, + query: sqlalchemy.orm.Query, + orm_class: Type[OrmBaseMixin] +) -> sqlalchemy.orm.Query: + """Updates the SQLAlchemy Query object by limiting the loaded fields of the + table and its relationship to the ones explicitly requested in the GraphQL + query. + + Note: + This function is fairly simplistic in that it assumes that (1) the + SQLAlchemy query only selects a single ORM class/table and that (2) + relationship fields are only one level deep, i.e., that requestd fields + are either table fields or fields of the table relationship, e.g., it + does not support fields of relationship relationships. + + Args: + info (graphql.execution.base.ResolveInfo): The GraphQL query info passed + to the resolver function. + query (sqlalchemy.orm.Query): The SQLAlchemy Query object to be updated. + orm_class (Type[OrmBaseMixin]): The ORM class of the selected table. + + Returns: + sqlalchemy.orm.Query: The updated SQLAlchemy Query object. + """ + + # Extract the fields requested in the GraphQL query. + fields = extract_requested_fields( + info=info, + fields=info.field_asts, + do_convert_to_snake_case=True, + ) + + # We assume that the top level of the `fields` dictionary only contains a + # single key referring to the GraphQL resource being resolved. + tl_key = list(fields.keys())[0] + # We assume that any keys that have a value of `None` (as opposed to + # dictionaries) are fields of the primary table. + table_fields = [ + key for key, val in fields[tl_key].items() + if val is None + ] + + # We assume that any keys that have a value being a dictionary are + # relationship attributes on the primary table with the keys in the + # dictionary being fields on that relationship. Thus we create a list of + # `[relatioship_name, relationship_fields]` lists to be used in the + # `joinedload` definitions. + relationship_fieldsets = [ + [key, val.keys()] + for key, val in fields[tl_key].items() + if isinstance(val, dict) + ] + + # Assemble a list of `joinedload` definitions on the defined relationship + # attribute name and the requested fields on that relationship. + options_joinedloads = [] + for relationship_fieldset in relationship_fieldsets: + relationship = relationship_fieldset[0] + rel_fields = relationship_fieldset[1] + options_joinedloads.append( + sqlalchemy.orm.joinedload( + getattr(orm_class, relationship) + ).load_only(*rel_fields) + ) + + # Update the SQLAlchemy query by limiting the loaded fields on the primary + # table as well as by including the `joinedload` definitions. + query = query.options( + sqlalchemy.orm.load_only(*table_fields), + *options_joinedloads + ) + + return query diff --git a/examples/falcon_sqlalchemy/graphiql/graphiql.css b/examples/falcon_sqlalchemy/graphiql/graphiql.css new file mode 100644 index 00000000..d1fc1428 --- /dev/null +++ b/examples/falcon_sqlalchemy/graphiql/graphiql.css @@ -0,0 +1,1263 @@ +.graphiql-container { + color: #141823; + display: flex; + display: -webkit-flex; + flex-direction: row; + -webkit-flex-direction: row; + font-family: + system, + -apple-system, + 'San Francisco', + '.SFNSDisplay-Regular', + 'Segoe UI', + Segoe, + 'Segoe WP', + 'Helvetica Neue', + helvetica, + 'Lucida Grande', + arial, + sans-serif; + font-size: 14px; + height: 100%; + margin: 0; + overflow: hidden; + width: 100%; +} + +.graphiql-container .editorWrap { + display: -webkit-flex; + display: flex; + -webkit-flex-direction: column; + flex-direction: column; + -webkit-flex: 1; + flex: 1; +} + +.graphiql-container .title { + font-size: 18px; +} + +.graphiql-container .title em { + font-family: georgia; + font-size: 19px; +} + +.graphiql-container .topBarWrap { + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + flex-direction: row; +} + +.graphiql-container .topBar { + -webkit-align-items: center; + align-items: center; + background: -webkit-linear-gradient(#f7f7f7, #e2e2e2); + background: linear-gradient(#f7f7f7, #e2e2e2); + border-bottom: 1px solid #d0d0d0; + cursor: default; + display: -webkit-flex; + display: flex; + height: 34px; + padding: 7px 14px 6px; + -webkit-flex: 1; + flex: 1; + -webkit-flex-direction: row; + flex-direction: row; + -webkit-user-select: none; + user-select: none; +} + +.graphiql-container .toolbar { + overflow-x: auto; +} + +.graphiql-container .docExplorerShow { + background: -webkit-linear-gradient(#f7f7f7, #e2e2e2); + background: linear-gradient(#f7f7f7, #e2e2e2); + border-bottom: 1px solid #d0d0d0; + border-left: 1px solid rgba(0, 0, 0, 0.2); + border-right: none; + border-top: none; + color: #3B5998; + cursor: pointer; + font-size: 14px; + outline: 0; + margin: 0; + padding: 2px 20px 0 18px; +} + +.graphiql-container .docExplorerShow:before { + border-left: 2px solid #3B5998; + border-top: 2px solid #3B5998; + content: ''; + display: inline-block; + height: 9px; + margin: 0 3px -1px 0; + position: relative; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + width: 9px; +} + +.graphiql-container .editorBar { + display: -webkit-flex; + display: flex; + -webkit-flex: 1; + flex: 1; + -webkit-flex-direction: row; + flex-direction: row; +} + +.graphiql-container .queryWrap { + display: -webkit-flex; + display: flex; + -webkit-flex: 1; + flex: 1; + -webkit-flex-direction: column; + flex-direction: column; +} + +.graphiql-container .resultWrap { + border-left: solid 1px #e0e0e0; + display: -webkit-flex; + display: flex; + position: relative; + -webkit-flex: 1; + flex: 1; + -webkit-flex-direction: column; + flex-direction: column; +} + +.graphiql-container .docExplorerWrap { + background: white; + box-shadow: 0 0 8px rgba(0, 0, 0, 0.15); + position: relative; + z-index: 3; +} + +.graphiql-container .docExplorerResizer { + cursor: col-resize; + height: 100%; + left: -5px; + position: absolute; + top: 0; + width: 10px; + z-index: 10; +} + +.graphiql-container .docExplorerHide { + cursor: pointer; + font-size: 18px; + margin: -7px -8px -6px 0; + padding: 18px 16px 15px 12px; +} + +.graphiql-container .query-editor { + -webkit-flex: 1; + flex: 1; + position: relative; +} + +.graphiql-container .variable-editor { + display: -webkit-flex; + display: flex; + height: 29px; + -webkit-flex-direction: column; + flex-direction: column; + position: relative; +} + +.graphiql-container .variable-editor-title { + background: #eeeeee; + border-bottom: 1px solid #d6d6d6; + border-top: 1px solid #e0e0e0; + color: #777; + font-variant: small-caps; + font-weight: bold; + letter-spacing: 1px; + line-height: 14px; + padding: 6px 0 8px 43px; + text-transform: lowercase; + -webkit-user-select: none; + user-select: none; +} + +.graphiql-container .codemirrorWrap { + -webkit-flex: 1; + flex: 1; + position: relative; +} + +.graphiql-container .result-window { + -webkit-flex: 1; + flex: 1; + position: relative; +} + +.graphiql-container .footer { + background: #f6f7f8; + border-left: 1px solid #e0e0e0; + border-top: 1px solid #e0e0e0; + margin-left: 12px; + position: relative; +} + +.graphiql-container .footer:before { + background: #eeeeee; + bottom: 0; + content: " "; + left: -13px; + position: absolute; + top: -1px; + width: 12px; +} + +.graphiql-container .result-window .CodeMirror { + background: #f6f7f8; +} + +.graphiql-container .result-window .CodeMirror-gutters { + background-color: #eeeeee; + border-color: #e0e0e0; + cursor: col-resize; +} + +.graphiql-container .result-window .CodeMirror-foldgutter, +.graphiql-container .result-window .CodeMirror-foldgutter-open:after, +.graphiql-container .result-window .CodeMirror-foldgutter-folded:after { + padding-left: 3px; +} + +.graphiql-container .toolbar-button { + background: #fdfdfd; + background: -webkit-linear-gradient(#fbfbfb, #f8f8f8); + background: linear-gradient(#fbfbfb, #f8f8f8); + border-width: 0.5px; + border-style: solid; + border-color: #d3d3d3 #d0d0d0 #bababa; + border-radius: 4px; + box-shadow: 0 1px 1px -1px rgba(0, 0, 0, 0.13), inset 0 1px #fff; + color: #444; + cursor: pointer; + display: inline-block; + margin: 0 5px 0; + padding: 2px 8px 4px; + text-decoration: none; +} + +.graphiql-container .toolbar-button:active { + background: -webkit-linear-gradient(#ececec, #d8d8d8); + background: linear-gradient(#ececec, #d8d8d8); + border-color: #cacaca #c9c9c9 #b0b0b0; + box-shadow: + 0 1px 0 #fff, + inset 0 1px rgba(255, 255, 255, 0.2), + inset 0 1px 1px rgba(0, 0, 0, 0.08); +} + +.graphiql-container .toolbar-button.error { + background: -webkit-linear-gradient(#fdf3f3, #e6d6d7); + background: linear-gradient(#fdf3f3, #e6d6d7); + color: #b00; +} + +.graphiql-container .execute-button-wrap { + position: relative; + margin: 0 14px 0 28px; + height: 34px; +} + +.graphiql-container .execute-button { + background: -webkit-linear-gradient(#fdfdfd, #d2d3d6); + background: linear-gradient(#fdfdfd, #d2d3d6); + border: 1px solid rgba(0,0,0,0.25); + border-radius: 17px; + box-shadow: 0 1px 0 #fff; + cursor: pointer; + fill: #444; + height: 34px; + margin: 0; + padding: 0; + width: 34px; +} + +.graphiql-container .execute-button svg { + pointer-events: none; +} + +.graphiql-container .execute-button:active { + background: -webkit-linear-gradient(#e6e6e6, #c0c0c0); + background: linear-gradient(#e6e6e6, #c0c0c0); + box-shadow: + 0 1px 0 #fff, + inset 0 0 2px rgba(0, 0, 0, 0.3), + inset 0 0 6px rgba(0, 0, 0, 0.2); +} + +.graphiql-container .execute-button:focus { + outline: 0; +} + +.graphiql-container .execute-options { + background: #fff; + box-shadow: + 0 0 0 1px rgba(0,0,0,0.1), + 0 2px 4px rgba(0,0,0,0.25); + left: -1px; + margin: 0; + padding: 8px 0; + position: absolute; + top: 37px; + z-index: 100; +} + +.graphiql-container .execute-options li { + padding: 2px 30px 4px 10px; + list-style: none; + min-width: 100px; + cursor: pointer; +} + +.graphiql-container .execute-options li.selected { + background: #e10098; + color: white; +} + +.graphiql-container .CodeMirror-scroll { + -webkit-overflow-scrolling: touch; +} + +.graphiql-container .CodeMirror { + color: #141823; + font-family: + 'Consolas', + 'Inconsolata', + 'Droid Sans Mono', + 'Monaco', + monospace; + font-size: 13px; + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} + +.graphiql-container .CodeMirror-lines { + padding: 20px 0; +} + +.CodeMirror-hint-information .content { + -webkit-box-orient: vertical; + box-orient: vertical; + color: #141823; + display: -webkit-box; + font-family: system, -apple-system, 'San Francisco', '.SFNSDisplay-Regular', 'Segoe UI', Segoe, 'Segoe WP', 'Helvetica Neue', helvetica, 'Lucida Grande', arial, sans-serif; + font-size: 13px; + -webkit-line-clamp: 3; + line-clamp: 3; + line-height: 16px; + max-height: 48px; + overflow: hidden; + text-overflow: -o-ellipsis-lastline; +} + +.CodeMirror-hint-information .content p:first-child { + margin-top: 0; +} + +.CodeMirror-hint-information .content p:last-child { + margin-bottom: 0; +} + +.CodeMirror-hint-information .infoType { + color: #30a; + cursor: pointer; + display: inline; + margin-right: 0.5em; +} + +.autoInsertedLeaf.cm-property { + -webkit-animation-duration: 6s; + -moz-animation-duration: 6s; + animation-duration: 6s; + -webkit-animation-name: insertionFade; + -moz-animation-name: insertionFade; + animation-name: insertionFade; + border-bottom: 2px solid rgba(255, 255, 255, 0); + border-radius: 2px; + margin: -2px -4px -1px; + padding: 2px 4px 1px; +} + +@-moz-keyframes insertionFade { + from, to { + background: rgba(255, 255, 255, 0); + border-color: rgba(255, 255, 255, 0); + } + + 15%, 85% { + background: #fbffc9; + border-color: #f0f3c0; + } +} + +@-webkit-keyframes insertionFade { + from, to { + background: rgba(255, 255, 255, 0); + border-color: rgba(255, 255, 255, 0); + } + + 15%, 85% { + background: #fbffc9; + border-color: #f0f3c0; + } +} + +@keyframes insertionFade { + from, to { + background: rgba(255, 255, 255, 0); + border-color: rgba(255, 255, 255, 0); + } + + 15%, 85% { + background: #fbffc9; + border-color: #f0f3c0; + } +} + +div.CodeMirror-lint-tooltip { + background-color: white; + border: 0; + border-radius: 2px; + color: #141823; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); + font-family: + system, + -apple-system, + 'San Francisco', + '.SFNSDisplay-Regular', + 'Segoe UI', + Segoe, + 'Segoe WP', + 'Helvetica Neue', + helvetica, + 'Lucida Grande', + arial, + sans-serif; + font-size: 13px; + line-height: 16px; + opacity: 0; + padding: 6px 10px; + -webkit-transition: opacity 0.15s; + -moz-transition: opacity 0.15s; + -ms-transition: opacity 0.15s; + -o-transition: opacity 0.15s; + transition: opacity 0.15s; +} + +div.CodeMirror-lint-message-error, div.CodeMirror-lint-message-warning { + padding-left: 23px; +} + +/* COLORS */ + +.graphiql-container .CodeMirror-foldmarker { + border-radius: 4px; + background: #08f; + background: -webkit-linear-gradient(#43A8FF, #0F83E8); + background: linear-gradient(#43A8FF, #0F83E8); + box-shadow: + 0 1px 1px rgba(0, 0, 0, 0.2), + inset 0 0 0 1px rgba(0, 0, 0, 0.1); + color: white; + font-family: arial; + font-size: 12px; + line-height: 0; + margin: 0 3px; + padding: 0px 4px 1px; + text-shadow: 0 -1px rgba(0, 0, 0, 0.1); +} + +.graphiql-container div.CodeMirror span.CodeMirror-matchingbracket { + color: #555; + text-decoration: underline; +} + +.graphiql-container div.CodeMirror span.CodeMirror-nonmatchingbracket { + color: #f00; +} + +/* Comment */ +.cm-comment { + color: #999; +} + +/* Punctuation */ +.cm-punctuation { + color: #555; +} + +/* Keyword */ +.cm-keyword { + color: #B11A04; +} + +/* OperationName, FragmentName */ +.cm-def { + color: #D2054E; +} + +/* FieldName */ +.cm-property { + color: #1F61A0; +} + +/* FieldAlias */ +.cm-qualifier { + color: #1C92A9; +} + +/* ArgumentName and ObjectFieldName */ +.cm-attribute { + color: #8B2BB9; +} + +/* Number */ +.cm-number { + color: #2882F9; +} + +/* String */ +.cm-string { + color: #D64292; +} + +/* Boolean */ +.cm-builtin { + color: #D47509; +} + +/* EnumValue */ +.cm-string-2 { + color: #0B7FC7; +} + +/* Variable */ +.cm-variable { + color: #397D13; +} + +/* Directive */ +.cm-meta { + color: #B33086; +} + +/* Type */ +.cm-atom { + color: #CA9800; +} +/* BASICS */ + +.CodeMirror { + /* Set height, width, borders, and global font properties here */ + font-family: monospace; + height: 300px; + color: black; +} + +/* PADDING */ + +.CodeMirror-lines { + padding: 4px 0; /* Vertical padding around content */ +} +.CodeMirror pre { + padding: 0 4px; /* Horizontal padding of content */ +} + +.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + background-color: white; /* The little square between H and V scrollbars */ +} + +/* GUTTER */ + +.CodeMirror-gutters { + border-right: 1px solid #ddd; + background-color: #f7f7f7; + white-space: nowrap; +} +.CodeMirror-linenumbers {} +.CodeMirror-linenumber { + padding: 0 3px 0 5px; + min-width: 20px; + text-align: right; + color: #999; + white-space: nowrap; +} + +.CodeMirror-guttermarker { color: black; } +.CodeMirror-guttermarker-subtle { color: #999; } + +/* CURSOR */ + +.CodeMirror div.CodeMirror-cursor { + border-left: 1px solid black; +} +/* Shown when moving in bi-directional text */ +.CodeMirror div.CodeMirror-secondarycursor { + border-left: 1px solid silver; +} +.CodeMirror.cm-fat-cursor div.CodeMirror-cursor { + width: auto; + border: 0; + background: #7e7; +} +.CodeMirror.cm-fat-cursor div.CodeMirror-cursors { + z-index: 1; +} + +.cm-animate-fat-cursor { + width: auto; + border: 0; + -webkit-animation: blink 1.06s steps(1) infinite; + -moz-animation: blink 1.06s steps(1) infinite; + animation: blink 1.06s steps(1) infinite; +} +@-moz-keyframes blink { + 0% { background: #7e7; } + 50% { background: none; } + 100% { background: #7e7; } +} +@-webkit-keyframes blink { + 0% { background: #7e7; } + 50% { background: none; } + 100% { background: #7e7; } +} +@keyframes blink { + 0% { background: #7e7; } + 50% { background: none; } + 100% { background: #7e7; } +} + +/* Can style cursor different in overwrite (non-insert) mode */ +div.CodeMirror-overwrite div.CodeMirror-cursor {} + +.cm-tab { display: inline-block; text-decoration: inherit; } + +.CodeMirror-ruler { + border-left: 1px solid #ccc; + position: absolute; +} + +/* DEFAULT THEME */ + +.cm-s-default .cm-keyword {color: #708;} +.cm-s-default .cm-atom {color: #219;} +.cm-s-default .cm-number {color: #164;} +.cm-s-default .cm-def {color: #00f;} +.cm-s-default .cm-variable, +.cm-s-default .cm-punctuation, +.cm-s-default .cm-property, +.cm-s-default .cm-operator {} +.cm-s-default .cm-variable-2 {color: #05a;} +.cm-s-default .cm-variable-3 {color: #085;} +.cm-s-default .cm-comment {color: #a50;} +.cm-s-default .cm-string {color: #a11;} +.cm-s-default .cm-string-2 {color: #f50;} +.cm-s-default .cm-meta {color: #555;} +.cm-s-default .cm-qualifier {color: #555;} +.cm-s-default .cm-builtin {color: #30a;} +.cm-s-default .cm-bracket {color: #997;} +.cm-s-default .cm-tag {color: #170;} +.cm-s-default .cm-attribute {color: #00c;} +.cm-s-default .cm-header {color: blue;} +.cm-s-default .cm-quote {color: #090;} +.cm-s-default .cm-hr {color: #999;} +.cm-s-default .cm-link {color: #00c;} + +.cm-negative {color: #d44;} +.cm-positive {color: #292;} +.cm-header, .cm-strong {font-weight: bold;} +.cm-em {font-style: italic;} +.cm-link {text-decoration: underline;} +.cm-strikethrough {text-decoration: line-through;} + +.cm-s-default .cm-error {color: #f00;} +.cm-invalidchar {color: #f00;} + +.CodeMirror-composing { border-bottom: 2px solid; } + +/* Default styles for common addons */ + +div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;} +div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} +.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); } +.CodeMirror-activeline-background {background: #e8f2ff;} + +/* STOP */ + +/* The rest of this file contains styles related to the mechanics of + the editor. You probably shouldn't touch them. */ + +.CodeMirror { + position: relative; + overflow: hidden; + background: white; +} + +.CodeMirror-scroll { + overflow: scroll !important; /* Things will break if this is overridden */ + /* 30px is the magic margin used to hide the element's real scrollbars */ + /* See overflow: hidden in .CodeMirror */ + margin-bottom: -30px; margin-right: -30px; + padding-bottom: 30px; + height: 100%; + outline: none; /* Prevent dragging from highlighting the element */ + position: relative; +} +.CodeMirror-sizer { + position: relative; + border-right: 30px solid transparent; +} + +/* The fake, visible scrollbars. Used to force redraw during scrolling + before actual scrolling happens, thus preventing shaking and + flickering artifacts. */ +.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + position: absolute; + z-index: 6; + display: none; +} +.CodeMirror-vscrollbar { + right: 0; top: 0; + overflow-x: hidden; + overflow-y: scroll; +} +.CodeMirror-hscrollbar { + bottom: 0; left: 0; + overflow-y: hidden; + overflow-x: scroll; +} +.CodeMirror-scrollbar-filler { + right: 0; bottom: 0; +} +.CodeMirror-gutter-filler { + left: 0; bottom: 0; +} + +.CodeMirror-gutters { + position: absolute; left: 0; top: 0; + min-height: 100%; + z-index: 3; +} +.CodeMirror-gutter { + white-space: normal; + height: 100%; + display: inline-block; + vertical-align: top; + margin-bottom: -30px; + /* Hack to make IE7 behave */ + *zoom:1; + *display:inline; +} +.CodeMirror-gutter-wrapper { + position: absolute; + z-index: 4; + background: none !important; + border: none !important; +} +.CodeMirror-gutter-background { + position: absolute; + top: 0; bottom: 0; + z-index: 4; +} +.CodeMirror-gutter-elt { + position: absolute; + cursor: default; + z-index: 4; +} +.CodeMirror-gutter-wrapper { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; +} + +.CodeMirror-lines { + cursor: text; + min-height: 1px; /* prevents collapsing before first draw */ +} +.CodeMirror pre { + /* Reset some styles that the rest of the page might have set */ + -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; + border-width: 0; + background: transparent; + font-family: inherit; + font-size: inherit; + margin: 0; + white-space: pre; + word-wrap: normal; + line-height: inherit; + color: inherit; + z-index: 2; + position: relative; + overflow: visible; + -webkit-tap-highlight-color: transparent; + -webkit-font-variant-ligatures: none; + font-variant-ligatures: none; +} +.CodeMirror-wrap pre { + word-wrap: break-word; + white-space: pre-wrap; + word-break: normal; +} + +.CodeMirror-linebackground { + position: absolute; + left: 0; right: 0; top: 0; bottom: 0; + z-index: 0; +} + +.CodeMirror-linewidget { + position: relative; + z-index: 2; + overflow: auto; +} + +.CodeMirror-widget {} + +.CodeMirror-code { + outline: none; +} + +/* Force content-box sizing for the elements where we expect it */ +.CodeMirror-scroll, +.CodeMirror-sizer, +.CodeMirror-gutter, +.CodeMirror-gutters, +.CodeMirror-linenumber { + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +.CodeMirror-measure { + position: absolute; + width: 100%; + height: 0; + overflow: hidden; + visibility: hidden; +} + +.CodeMirror-cursor { position: absolute; } +.CodeMirror-measure pre { position: static; } + +div.CodeMirror-cursors { + visibility: hidden; + position: relative; + z-index: 3; +} +div.CodeMirror-dragcursors { + visibility: visible; +} + +.CodeMirror-focused div.CodeMirror-cursors { + visibility: visible; +} + +.CodeMirror-selected { background: #d9d9d9; } +.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } +.CodeMirror-crosshair { cursor: crosshair; } +.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; } +.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; } + +.cm-searching { + background: #ffa; + background: rgba(255, 255, 0, .4); +} + +/* IE7 hack to prevent it from returning funny offsetTops on the spans */ +.CodeMirror span { *vertical-align: text-bottom; } + +/* Used to force a border model for a node */ +.cm-force-border { padding-right: .1px; } + +@media print { + /* Hide the cursor when printing */ + .CodeMirror div.CodeMirror-cursors { + visibility: hidden; + } +} + +/* See issue #2901 */ +.cm-tab-wrap-hack:after { content: ''; } + +/* Help users use markselection to safely style text background */ +span.CodeMirror-selectedtext { background: none; } +.graphiql-container .doc-explorer { + background: white; +} + +.graphiql-container .doc-explorer-title-bar { + cursor: default; + display: -webkit-flex; + display: flex; + height: 34px; + line-height: 14px; + padding: 8px 8px 5px; + position: relative; + -webkit-user-select: none; + user-select: none; +} + +.graphiql-container .doc-explorer-title { + padding: 10px 0 10px 10px; + font-weight: bold; + text-align: center; + text-overflow: ellipsis; + white-space: nowrap; + overflow-x: hidden; + -webkit-flex: 1; + flex: 1; +} + +.graphiql-container .doc-explorer-back { + color: #3B5998; + cursor: pointer; + margin: -7px 0 -6px -8px; + overflow-x: hidden; + padding: 17px 12px 16px 16px; + text-overflow: ellipsis; + white-space: nowrap; +} + +.graphiql-container .doc-explorer-back:before { + border-left: 2px solid #3B5998; + border-top: 2px solid #3B5998; + content: ''; + display: inline-block; + height: 9px; + margin: 0 3px -1px 0; + position: relative; + width: 9px; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); +} + +.graphiql-container .doc-explorer-rhs { + position: relative; +} + +.graphiql-container .doc-explorer-contents { + background-color: #ffffff; + border-top: 1px solid #d6d6d6; + bottom: 0; + left: 0; + min-width: 300px; + overflow-y: auto; + padding: 20px 15px; + position: absolute; + right: 0; + top: 47px; +} + +.graphiql-container .doc-type-description p:first-child , +.graphiql-container .doc-type-description blockquote:first-child { + margin-top: 0; +} + +.graphiql-container .doc-explorer-contents a { + cursor: pointer; + text-decoration: none; +} + +.graphiql-container .doc-explorer-contents a:hover { + text-decoration: underline; +} + +.graphiql-container .doc-value-description { + padding: 4px 0 8px 12px; +} + +.graphiql-container .doc-category { + margin: 20px 0; +} + +.graphiql-container .doc-category-title { + border-bottom: 1px solid #e0e0e0; + color: #777; + cursor: default; + font-size: 14px; + font-variant: small-caps; + font-weight: bold; + letter-spacing: 1px; + margin: 0 -15px 10px 0; + padding: 10px 0; + -webkit-user-select: none; + user-select: none; +} + +.graphiql-container .doc-category-item { + margin: 12px 0; + color: #555; +} + +.graphiql-container .keyword { + color: #B11A04; +} + +.graphiql-container .type-name { + color: #CA9800; +} + +.graphiql-container .field-name { + color: #1F61A0; +} + +.graphiql-container .value-name { + color: #0B7FC7; +} + +.graphiql-container .arg-name { + color: #8B2BB9; +} + +.graphiql-container .arg:after { + content: ', '; +} + +.graphiql-container .arg:last-child:after { + content: ''; +} + +.graphiql-container .doc-alert-text { + color: #F00F00; + font-family: 'Consolas', 'Inconsolata', 'Droid Sans Mono', 'Monaco', monospace; + font-size: 13px; +} + +.graphiql-container .search-box-outer { + border: 1px solid #d3d6db; + box-sizing: border-box; + display: inline-block; + font-size: 12px; + height: 24px; + margin-bottom: 12px; + padding: 3px 8px 5px; + vertical-align: middle; + width: 100%; +} + +.graphiql-container .search-box-input { + border: 0; + font-size: 12px; + margin: 0; + outline: 0; + padding: 0; + width: 100%; +} +.CodeMirror-foldmarker { + color: blue; + text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px; + font-family: arial; + line-height: .3; + cursor: pointer; +} +.CodeMirror-foldgutter { + width: .7em; +} +.CodeMirror-foldgutter-open, +.CodeMirror-foldgutter-folded { + cursor: pointer; +} +.CodeMirror-foldgutter-open:after { + content: "\25BE"; +} +.CodeMirror-foldgutter-folded:after { + content: "\25B8"; +} +/* The lint marker gutter */ +.CodeMirror-lint-markers { + width: 16px; +} + +.CodeMirror-lint-tooltip { + background-color: infobackground; + border: 1px solid black; + border-radius: 4px 4px 4px 4px; + color: infotext; + font-family: monospace; + font-size: 10pt; + overflow: hidden; + padding: 2px 5px; + position: fixed; + white-space: pre; + white-space: pre-wrap; + z-index: 100; + max-width: 600px; + opacity: 0; + transition: opacity .4s; + -moz-transition: opacity .4s; + -webkit-transition: opacity .4s; + -o-transition: opacity .4s; + -ms-transition: opacity .4s; +} + +.CodeMirror-lint-mark-error, .CodeMirror-lint-mark-warning { + background-position: left bottom; + background-repeat: repeat-x; +} + +.CodeMirror-lint-mark-error { + background-image: + url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==") + ; +} + +.CodeMirror-lint-mark-warning { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII="); +} + +.CodeMirror-lint-marker-error, .CodeMirror-lint-marker-warning { + background-position: center center; + background-repeat: no-repeat; + cursor: pointer; + display: inline-block; + height: 16px; + width: 16px; + vertical-align: middle; + position: relative; +} + +.CodeMirror-lint-message-error, .CodeMirror-lint-message-warning { + padding-left: 18px; + background-position: top left; + background-repeat: no-repeat; +} + +.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII="); +} + +.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII="); +} + +.CodeMirror-lint-marker-multiple { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC"); + background-repeat: no-repeat; + background-position: right bottom; + width: 100%; height: 100%; +} +.graphiql-container .spinner-container { + position: absolute; + top: 50%; + height: 36px; + width: 36px; + left: 50%; + transform: translate(-50%, -50%); + z-index: 10; +} + +.graphiql-container .spinner { + vertical-align: middle; + display: inline-block; + height: 24px; + width: 24px; + position: absolute; + -webkit-animation: rotation .6s infinite linear; + -moz-animation: rotation .6s infinite linear; + -o-animation: rotation .6s infinite linear; + animation: rotation .6s infinite linear; + border-left: 6px solid rgba(150, 150, 150, .15); + border-right: 6px solid rgba(150, 150, 150, .15); + border-bottom: 6px solid rgba(150, 150, 150, .15); + border-top: 6px solid rgba(150, 150, 150, .8); + border-radius: 100%; +} + +@-webkit-keyframes rotation { + from { -webkit-transform: rotate(0deg); } + to { -webkit-transform: rotate(359deg); } +} + +@-moz-keyframes rotation { + from { -moz-transform: rotate(0deg); } + to { -moz-transform: rotate(359deg); } +} + +@-o-keyframes rotation { + from { -o-transform: rotate(0deg); } + to { -o-transform: rotate(359deg); } +} + +@keyframes rotation { + from { transform: rotate(0deg); } + to { transform: rotate(359deg); } +} +.CodeMirror-hints { + background: white; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); + font-family: 'Consolas', 'Inconsolata', 'Droid Sans Mono', 'Monaco', monospace; + font-size: 13px; + list-style: none; + margin: 0; + margin-left: -6px; + max-height: 14.5em; + overflow-y: auto; + overflow: hidden; + padding: 0; + position: absolute; + z-index: 10; +} + +.CodeMirror-hints-wrapper { + background: white; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); + margin-left: -6px; + position: absolute; + z-index: 10; +} + +.CodeMirror-hints-wrapper .CodeMirror-hints { + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + position: relative; + margin-left: 0; + z-index: 0; +} + +.CodeMirror-hint { + border-top: solid 1px #f7f7f7; + color: #141823; + cursor: pointer; + margin: 0; + max-width: 300px; + overflow: hidden; + padding: 2px 6px; + white-space: pre; +} + +li.CodeMirror-hint-active { + background-color: #08f; + border-top-color: white; + color: white; +} + +.CodeMirror-hint-information { + border-top: solid 1px #c0c0c0; + max-width: 300px; + padding: 4px 6px; + position: relative; + z-index: 1; +} + +.CodeMirror-hint-information:first-child { + border-bottom: solid 1px #c0c0c0; + border-top: none; + margin-bottom: -1px; +} diff --git a/examples/falcon_sqlalchemy/graphiql/graphiql.html b/examples/falcon_sqlalchemy/graphiql/graphiql.html new file mode 100644 index 00000000..09178173 --- /dev/null +++ b/examples/falcon_sqlalchemy/graphiql/graphiql.html @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + +
Loading...
+ + + \ No newline at end of file diff --git a/examples/falcon_sqlalchemy/graphiql/graphiql.min.js b/examples/falcon_sqlalchemy/graphiql/graphiql.min.js new file mode 100644 index 00000000..dc67b3d9 --- /dev/null +++ b/examples/falcon_sqlalchemy/graphiql/graphiql.min.js @@ -0,0 +1,16 @@ +!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{var g;g="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,g.GraphiQL=f()}}(function(){var define;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o0&&(a=t[t.length-1]);var r=void 0,n=void 0;a?"Search Results"===a.name?(r=a.name,n=_react2.default.createElement(SearchDoc,{searchValue:a.searchValue,schema:e,onClickType:this.handleClickTypeOrField,onClickField:this.handleClickTypeOrField})):(r=a.name,n=(0,_graphql.isType)(a)?_react2.default.createElement(TypeDoc,{key:a.name,schema:e,type:a,onClickType:this.handleClickTypeOrField,onClickField:this.handleClickTypeOrField}):_react2.default.createElement(FieldDoc,{key:a.name,field:a,onClickType:this.handleClickTypeOrField})):e&&(r="Documentation Explorer",n=_react2.default.createElement(SchemaDoc,{schema:e,onClickType:this.handleClickTypeOrField}));var c=void 0;1===t.length?c="Schema":t.length>1&&(c=t[t.length-2].name);var l=_react2.default.createElement("div",{className:"spinner-container"},_react2.default.createElement("div",{className:"spinner"})),o=n&&(n.type===SearchDoc||n.type===SchemaDoc);return _react2.default.createElement("div",{className:"doc-explorer"},_react2.default.createElement("div",{className:"doc-explorer-title-bar"},c&&_react2.default.createElement("div",{className:"doc-explorer-back",onClick:this.handleNavBackClick},c),_react2.default.createElement("div",{className:"doc-explorer-title"},r),_react2.default.createElement("div",{className:"doc-explorer-rhs"},this.props.children)),_react2.default.createElement("div",{className:"doc-explorer-contents"},_react2.default.createElement(SearchBox,{isShown:o,onSearch:this.handleSearch}),this.props.schema?n:l))}},{key:"showDoc",value:function(e){var t=this.state.navStack,a=t.length>0&&t[t.length-1]===e;a||(t=t.concat([e])),this.setState({navStack:t})}},{key:"showSearch",value:function(e){var t=this.state.navStack,a=t.length>0&&t[t.length-1];a?a.searchValue!==e.searchValue&&(t=t.slice(0,-1).concat([e])):t=t.concat([e]),this.setState({navStack:t})}}]),t}(_react2.default.Component);DocExplorer.propTypes={schema:_react.PropTypes.instanceOf(_graphql.GraphQLSchema)};var SearchBox=function(e){function t(e){_classCallCheck(this,t);var a=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.handleChange=function(e){a.setState({value:e.target.value}),a._debouncedOnSearch()},a.state={value:""},a._debouncedOnSearch=(0,_debounce2.default)(200,function(){a.props.onSearch(a.state.value)}),a}return _inherits(t,e),_createClass(t,[{key:"shouldComponentUpdate",value:function(e,t){return e.isShown!==this.props.isShown||t.value!==this.state.value}},{key:"render",value:function(){return _react2.default.createElement("div",null,this.props.isShown&&_react2.default.createElement("label",{className:"search-box-outer"},_react2.default.createElement("input",{className:"search-box-input",onChange:this.handleChange,type:"text",value:this.state.value,placeholder:"Search the schema ..."})))}}]),t}(_react2.default.Component);SearchBox.propTypes={isShown:_react.PropTypes.bool,onSearch:_react.PropTypes.func};var SearchDoc=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"shouldComponentUpdate",value:function(e){return this.props.schema!==e.schema||this.props.searchValue!==e.searchValue}},{key:"render",value:function(){var e=this,t=this.props.searchValue,a=this.props.schema,r=this.props.onClickType,n=this.props.onClickField,c=a.getTypeMap(),l=[],o=[],s=Object.keys(c),i=!0,p=!1,u=void 0;try{for(var d,m=function(){var a=d.value;if(l.length+o.length>=100)return"break";var s=c[a],i=[];e._isMatch(a,t)&&i.push("Type Name"),i.length&&l.push(_react2.default.createElement("div",{className:"doc-category-item"},_react2.default.createElement(TypeLink,{type:s,onClick:r}))),s.getFields&&!function(){var a=s.getFields();Object.keys(a).forEach(function(c){var l=a[c];if(e._isMatch(c,t))o.push(_react2.default.createElement("div",{className:"doc-category-item"},_react2.default.createElement("a",{className:"field-name",onClick:function(e){return n(l,s,e)}},l.name)," on ",_react2.default.createElement(TypeLink,{type:s,onClick:r})));else if(l.args&&l.args.length){var i=l.args.filter(function(a){return e._isMatch(a.name,t)});i.length>0&&o.push(_react2.default.createElement("div",{className:"doc-category-item"},_react2.default.createElement("a",{className:"field-name",onClick:function(e){return n(l,s,e)}},l.name),"(",_react2.default.createElement("span",null,i.map(function(e){return _react2.default.createElement("span",{className:"arg",key:e.name},_react2.default.createElement("span",{className:"arg-name"},e.name),": ",_react2.default.createElement(TypeLink,{type:e.type,onClick:r}))})),")"," on ",_react2.default.createElement(TypeLink,{type:s,onClick:r})))}})}()},h=s[Symbol.iterator]();!(i=(d=h.next()).done);i=!0){var f=m();if("break"===f)break}}catch(e){p=!0,u=e}finally{try{!i&&h.return&&h.return()}finally{if(p)throw u}}return 0===l.length&&0===o.length?_react2.default.createElement("span",{className:"doc-alert-text"},"No results found."):_react2.default.createElement("div",null,_react2.default.createElement("div",{className:"doc-category"},(l.length>0||o.length>0)&&_react2.default.createElement("div",{className:"doc-category-title"},"search results"),l,o))}},{key:"_isMatch",value:function(e,t){try{var a=t.replace(/[^_0-9A-Za-z]/g,function(e){return"\\"+e});return e.search(new RegExp(a,"i"))!==-1}catch(a){return e.toLowerCase().indexOf(t.toLowerCase())!==-1}}}]),t}(_react2.default.Component);SearchDoc.propTypes={schema:_react.PropTypes.object,searchValue:_react.PropTypes.string,onClickType:_react.PropTypes.func,onClickField:_react.PropTypes.func};var SchemaDoc=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"shouldComponentUpdate",value:function(e){return this.props.schema!==e.schema}},{key:"render",value:function(){var e=this.props.schema,t=e.getQueryType(),a=e.getMutationType&&e.getMutationType(),r=e.getSubscriptionType&&e.getSubscriptionType();return _react2.default.createElement("div",null,_react2.default.createElement(MarkdownContent,{className:"doc-type-description",markdown:"A GraphQL schema provides a root type for each kind of operation."}),_react2.default.createElement("div",{className:"doc-category"},_react2.default.createElement("div",{className:"doc-category-title"},"root types"),_react2.default.createElement("div",{className:"doc-category-item"},_react2.default.createElement("span",{className:"keyword"},"query"),": ",_react2.default.createElement(TypeLink,{type:t,onClick:this.props.onClickType})),a&&_react2.default.createElement("div",{className:"doc-category-item"},_react2.default.createElement("span",{className:"keyword"},"mutation"),": ",_react2.default.createElement(TypeLink,{type:a,onClick:this.props.onClickType})),r&&_react2.default.createElement("div",{className:"doc-category-item"},_react2.default.createElement("span",{className:"keyword"},"subscription"),": ",_react2.default.createElement(TypeLink,{type:r,onClick:this.props.onClickType}))))}}]),t}(_react2.default.Component);SchemaDoc.propTypes={schema:_react.PropTypes.object,onClickType:_react.PropTypes.func};var TypeDoc=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"shouldComponentUpdate",value:function(e){return this.props.type!==e.type}},{key:"render",value:function(){var e=this.props.schema,t=this.props.type,a=this.props.onClickType,r=this.props.onClickField,n=void 0,c=void 0;t instanceof _graphql.GraphQLUnionType?(n="possible types",c=e.getPossibleTypes(t)):t instanceof _graphql.GraphQLInterfaceType?(n="implementations",c=e.getPossibleTypes(t)):t instanceof _graphql.GraphQLObjectType&&(n="implements",c=t.getInterfaces());var l=void 0;c&&c.length>0&&(l=_react2.default.createElement("div",{className:"doc-category"},_react2.default.createElement("div",{className:"doc-category-title"},n),c.map(function(e){return _react2.default.createElement("div",{key:e.name,className:"doc-category-item"},_react2.default.createElement(TypeLink,{type:e,onClick:a}))})));var o=void 0;t.getFields&&!function(){var e=t.getFields(),n=Object.keys(e).map(function(t){return e[t]});o=_react2.default.createElement("div",{className:"doc-category"},_react2.default.createElement("div",{className:"doc-category-title"},"fields"),n.map(function(e){var n=void 0;return e.args&&e.args.length>0&&(n=e.args.map(function(e){return _react2.default.createElement("span",{className:"arg",key:e.name},_react2.default.createElement("span",{className:"arg-name"},e.name),": ",_react2.default.createElement(TypeLink,{type:e.type,onClick:a}))})),_react2.default.createElement("div",{key:e.name,className:"doc-category-item"},_react2.default.createElement("a",{className:"field-name",onClick:function(a){return r(e,t,a)}},e.name),n&&["(",_react2.default.createElement("span",{key:"args"},n),")"],": ",_react2.default.createElement(TypeLink,{type:e.type,onClick:a}),e.isDeprecated&&_react2.default.createElement("span",{className:"doc-alert-text"}," (DEPRECATED)"))}))}();var s=void 0;return t instanceof _graphql.GraphQLEnumType&&(s=_react2.default.createElement("div",{className:"doc-category"},_react2.default.createElement("div",{className:"doc-category-title"},"values"),t.getValues().map(function(e){return _react2.default.createElement("div",{key:e.name,className:"doc-category-item"},_react2.default.createElement("div",{className:"enum-value"},e.name,e.isDeprecated&&_react2.default.createElement("span",{className:"doc-alert-text"}," (DEPRECATED)")),_react2.default.createElement(MarkdownContent,{className:"doc-value-description",markdown:e.description}),e.deprecationReason&&_react2.default.createElement(MarkdownContent,{className:"doc-alert-text",markdown:e.deprecationReason}))}))),_react2.default.createElement("div",null,_react2.default.createElement(MarkdownContent,{className:"doc-type-description",markdown:t.description||"No Description"}),t instanceof _graphql.GraphQLObjectType&&l,o,s,!(t instanceof _graphql.GraphQLObjectType)&&l)}}]),t}(_react2.default.Component);TypeDoc.propTypes={schema:_react.PropTypes.instanceOf(_graphql.GraphQLSchema),type:_react.PropTypes.object,onClickType:_react.PropTypes.func,onClickField:_react.PropTypes.func};var FieldDoc=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"shouldComponentUpdate",value:function(e){return this.props.field!==e.field}},{key:"render",value:function(){var e=this,t=this.props.field,a=void 0;return t.args&&t.args.length>0&&(a=_react2.default.createElement("div",{className:"doc-category"},_react2.default.createElement("div",{className:"doc-category-title"},"arguments"),t.args.map(function(t){return _react2.default.createElement("div",{key:t.name,className:"doc-category-item"},_react2.default.createElement("div",null,_react2.default.createElement("span",{className:"arg-name"},t.name),": ",_react2.default.createElement(TypeLink,{type:t.type,onClick:e.props.onClickType})),_react2.default.createElement(MarkdownContent,{className:"doc-value-description",markdown:t.description}))}))),_react2.default.createElement("div",null,_react2.default.createElement(MarkdownContent,{className:"doc-type-description",markdown:t.description||"No Description"}),t.deprecationReason&&_react2.default.createElement(MarkdownContent,{className:"doc-alert-text",markdown:t.deprecationReason}),_react2.default.createElement("div",{className:"doc-category"},_react2.default.createElement("div",{className:"doc-category-title"},"type"),_react2.default.createElement(TypeLink,{type:t.type,onClick:this.props.onClickType})),a)}}]),t}(_react2.default.Component);FieldDoc.propTypes={field:_react.PropTypes.object,onClickType:_react.PropTypes.func};var TypeLink=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"shouldComponentUpdate",value:function(e){return this.props.type!==e.type}},{key:"render",value:function(){return renderType(this.props.type,this.props.onClick)}}]),t}(_react2.default.Component);TypeLink.propTypes={type:_react.PropTypes.object,onClick:_react.PropTypes.func};var MarkdownContent=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"shouldComponentUpdate",value:function(e){return this.props.markdown!==e.markdown}},{key:"render",value:function(){var e=this.props.markdown;if(!e)return _react2.default.createElement("div",null);var t=(0,_marked2.default)(e,{sanitize:!0});return _react2.default.createElement("div",{className:this.props.className,dangerouslySetInnerHTML:{__html:t}})}}]),t}(_react2.default.Component);MarkdownContent.propTypes={markdown:_react.PropTypes.string,className:_react.PropTypes.string}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utility/debounce":10,graphql:55,marked:122}],2:[function(require,module,exports){(function(global){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default: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)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ExecuteButton=void 0;var _createClass=function(){function e(e,t){for(var n=0;n1,r=null;o&&n&&!function(){var n=e.state.highlight;r=_react2.default.createElement("ul",{className:"execute-options"},t.map(function(t){return _react2.default.createElement("li",{key:t.name?t.name.value:"*",className:t===n&&"selected",onMouseOver:function(){return e.setState({highlight:t})},onMouseOut:function(){return e.setState({highlight:null})},onMouseUp:function(){return e._onOptionSelected(t)}},t.name?t.name.value:"")}))}();var a=void 0;!this.props.isRunning&&o||(a=this._onClick);var u=void 0;return this.props.isRunning||!o||n||(u=this._onOptionsOpen),_react2.default.createElement("div",{className:"execute-button-wrap"},_react2.default.createElement("button",{className:"execute-button",onMouseDown:u,onClick:a,title:"Execute Query (Ctrl-Enter)"},_react2.default.createElement("svg",{width:"34",height:"34"},this.props.isRunning?_react2.default.createElement("path",{d:"M 10 10 L 23 10 L 23 23 L 10 23 z"}):_react2.default.createElement("path",{d:"M 11 9 L 24 16 L 11 23 z"}))),r)}}]),t}(_react2.default.Component);ExecuteButton.propTypes={onRun:_react.PropTypes.func,onStop:_react.PropTypes.func,isRunning:_react.PropTypes.bool,operations:_react.PropTypes.array}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(require,module,exports){(function(global){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default: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)}function isPromise(e){return"object"===("undefined"==typeof e?"undefined":_typeof(e))&&"function"==typeof e.then}function isObservable(e){return"object"===("undefined"==typeof e?"undefined":_typeof(e))&&"function"==typeof e.subscribe}Object.defineProperty(exports,"__esModule",{value:!0}),exports.GraphiQL=void 0;var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},_extends=Object.assign||function(e){for(var t=1;t0&&!function(){var t=e.queryEditorComponent.getCodeMirror();t.operation(function(){var e=t.getCursor(),o=t.indexFromPos(e);t.setValue(n);var i=0,a=r.map(function(e){var r=e.index,n=e.string;return t.markText(t.posFromIndex(r+i),t.posFromIndex(r+(i+=n.length)),{className:"autoInsertedLeaf",clearOnEnter:!0,title:"Automatically added leaf fields"})});setTimeout(function(){return a.forEach(function(e){return e.clear()})},7e3);var s=o;r.forEach(function(e){var t=e.index,r=e.string;t=o){e=a.name&&a.name.value;break}}}this.handleRunQuery(e)}},{key:"_didClickDragBar",value:function(e){if(0!==e.button||e.ctrlKey)return!1;var t=e.target;if(0!==t.className.indexOf("CodeMirror-gutter"))return!1;for(var r=_reactDom2.default.findDOMNode(this.resultComponent);t;){if(t===r)return!0;t=t.parentNode}return!1}}]),t}(_react2.default.Component);GraphiQL.propTypes={fetcher:_react.PropTypes.func.isRequired,schema:_react.PropTypes.instanceOf(_graphql.GraphQLSchema),query:_react.PropTypes.string,variables:_react.PropTypes.string,operationName:_react.PropTypes.string,response:_react.PropTypes.string,storage:_react.PropTypes.shape({getItem:_react.PropTypes.func,setItem:_react.PropTypes.func}),defaultQuery:_react.PropTypes.string,onEditQuery:_react.PropTypes.func,onEditVariables:_react.PropTypes.func,onEditOperationName:_react.PropTypes.func, +onToggleDocs:_react.PropTypes.func,getDefaultFieldNames:_react.PropTypes.func};var _initialiseProps=function(){var e=this;this.handleRunQuery=function(t){e._editorQueryID++;var r=e._editorQueryID,n=e.autoCompleteLeafs()||e.state.query,o=e.state.variables,i=e.state.operationName;if(t&&t!==i){i=t;var a=e.props.onEditOperationName;a&&a(i)}var s=e._fetchQuery(n,o,i,function(t){r===e._editorQueryID&&e.setState({isWaitingForResponse:!1,response:JSON.stringify(t,null,2)})});e.setState({isWaitingForResponse:!0,response:null,subscription:s,operationName:i})},this.handleStopQuery=function(){var t=e.state.subscription;e.setState({isWaitingForResponse:!1,subscription:null}),t&&t.unsubscribe()},this.handlePrettifyQuery=function(){var t=(0,_graphql.print)((0,_graphql.parse)(e.state.query)),r=e.queryEditorComponent.getCodeMirror();r.setValue(t)},this.handleEditQuery=function(t){if(e.state.schema&&e._updateQueryFacts(t),e.setState({query:t}),e.props.onEditQuery)return e.props.onEditQuery(t)},this._updateQueryFacts=(0,_debounce2.default)(150,function(t){var r=(0,_getQueryFacts2.default)(e.state.schema,t);if(r){var n=(0,_getSelectedOperationName2.default)(e.state.operations,e.state.operationName,r.operations),o=e.props.onEditOperationName;o&&n!==e.state.operationName&&o(n),e.setState(_extends({operationName:n},r))}}),this.handleEditVariables=function(t){e.setState({variables:t}),e.props.onEditVariables&&e.props.onEditVariables(t)},this.handleHintInformationRender=function(t){t.addEventListener("click",e._onClickHintInformation);var r=void 0;t.addEventListener("DOMNodeRemoved",r=function(){t.removeEventListener("DOMNodeRemoved",r),t.removeEventListener("click",e._onClickHintInformation)})},this.handleEditorRunQuery=function(){e._runQueryAtCursor()},this._onClickHintInformation=function(t){if("typeName"===t.target.className){var r=t.target.innerHTML,n=e.state.schema;n&&!function(){var t=n.getType(r);t&&e.setState({docExplorerOpen:!0},function(){e.docExplorerComponent.showDoc(t)})}()}},this.handleToggleDocs=function(){"function"==typeof e.props.onToggleDocs&&e.props.onToggleDocs(!e.state.docExplorerOpen),e.setState({docExplorerOpen:!e.state.docExplorerOpen})},this.handleResizeStart=function(t){if(e._didClickDragBar(t)){t.preventDefault();var r=t.clientX-(0,_elementPosition.getLeft)(t.target),n=function(t){if(0===t.buttons)return o();var n=_reactDom2.default.findDOMNode(e.editorBarComponent),i=t.clientX-(0,_elementPosition.getLeft)(n)-r,a=n.clientWidth-i;e.setState({editorFlex:i/a})},o=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",o),n=null,o=null});document.addEventListener("mousemove",n),document.addEventListener("mouseup",o)}},this.handleDocsResizeStart=function(t){t.preventDefault();var r=e.state.docExplorerWidth,n=t.clientX-(0,_elementPosition.getLeft)(t.target),o=function(t){if(0===t.buttons)return i();var r=_reactDom2.default.findDOMNode(e),o=t.clientX-(0,_elementPosition.getLeft)(r)-n,a=r.clientWidth-o;a<100?e.setState({docExplorerOpen:!1}):e.setState({docExplorerOpen:!0,docExplorerWidth:Math.min(a,650)})},i=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){e.state.docExplorerOpen||e.setState({docExplorerWidth:r}),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",i),o=null,i=null});document.addEventListener("mousemove",o),document.addEventListener("mouseup",i)},this.handleVariableResizeStart=function(t){t.preventDefault();var r=!1,n=e.state.variableEditorOpen,o=e.state.variableEditorHeight,i=t.clientY-(0,_elementPosition.getTop)(t.target),a=function(t){if(0===t.buttons)return s();r=!0;var n=_reactDom2.default.findDOMNode(e.editorBarComponent),a=t.clientY-(0,_elementPosition.getTop)(n)-i,u=n.clientHeight-a;u<60?e.setState({variableEditorOpen:!1,variableEditorHeight:o}):e.setState({variableEditorOpen:!0,variableEditorHeight:u})},s=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){r||e.setState({variableEditorOpen:!n}),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",s),a=null,s=null});document.addEventListener("mousemove",a),document.addEventListener("mouseup",s)}};GraphiQL.Logo=function(e){return _react2.default.createElement("div",{className:"title"},e.children||_react2.default.createElement("span",null,"Graph",_react2.default.createElement("em",null,"i"),"QL"))},GraphiQL.Toolbar=function(e){return _react2.default.createElement("div",{className:"toolbar"},e.children)},GraphiQL.ToolbarButton=_ToolbarButton.ToolbarButton,GraphiQL.Footer=function(e){return _react2.default.createElement("div",{className:"footer"},e.children)};var defaultQuery="# Welcome to GraphiQL\n#\n# GraphiQL is an in-browser IDE for writing, validating, and\n# testing GraphQL queries.\n#\n# Type queries into this side of the screen, and you will\n# see intelligent typeaheads aware of the current GraphQL type schema and\n# live syntax and validation errors highlighted within the text.\n#\n# To bring up the auto-complete at any point, just press Ctrl-Space.\n#\n# Press the run button above, or Cmd-Enter to execute the query, and the result\n# will appear in the pane to the right.\n\n"}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utility/CodeMirrorSizer":9,"../utility/debounce":10,"../utility/elementPosition":11,"../utility/fillLeafs":12,"../utility/find":13,"../utility/getQueryFacts":14,"../utility/getSelectedOperationName":15,"../utility/introspectionQueries":16,"./DocExplorer":1,"./ExecuteButton":2,"./QueryEditor":4,"./ResultViewer":5,"./ToolbarButton":6,"./VariableEditor":7,graphql:55}],4:[function(require,module,exports){(function(global){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default: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)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.QueryEditor=void 0;var _createClass=function(){function e(e,t){for(var o=0;o=65&&r<=90||!t.shiftKey&&r>=48&&r<=57||t.shiftKey&&189===r||t.shiftKey&&50===r||t.shiftKey&&57===r)&&o.editor.execCommand("autocomplete")},o._onEdit=function(){o.ignoreChangeEvent||(o.cachedValue=o.editor.getValue(),o.props.onEdit&&o.props.onEdit(o.cachedValue))},o._onHasCompletion=function(e,t){(0,_onHasCompletion2.default)(e,t,o.props.onHintInformationRender)},o.cachedValue=e.value||"",o}return _inherits(t,e),_createClass(t,[{key:"componentDidMount",value:function(){var e=this,t=require("codemirror");require("codemirror/addon/hint/show-hint"),require("codemirror/addon/comment/comment"),require("codemirror/addon/edit/matchbrackets"),require("codemirror/addon/edit/closebrackets"),require("codemirror/addon/fold/foldgutter"),require("codemirror/addon/fold/brace-fold"),require("codemirror/addon/lint/lint"),require("codemirror/keymap/sublime"),require("codemirror-graphql/hint"),require("codemirror-graphql/lint"),require("codemirror-graphql/mode"),this.editor=t(_reactDom2.default.findDOMNode(this),{value:this.props.value||"",lineNumbers:!0,tabSize:2,mode:"graphql",theme:"graphiql",keyMap:"sublime",autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,foldGutter:{minFoldSize:4},lint:{schema:this.props.schema},hintOptions:{schema:this.props.schema,closeOnUnfocus:!1,completeSingle:!1},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{"Cmd-Space":function(){return e.editor.showHint({completeSingle:!0})},"Ctrl-Space":function(){return e.editor.showHint({completeSingle:!0})},"Alt-Space":function(){return e.editor.showHint({completeSingle:!0})},"Shift-Space":function(){return e.editor.showHint({completeSingle:!0})},"Cmd-Enter":function(){e.props.onRunQuery&&e.props.onRunQuery()},"Ctrl-Enter":function(){e.props.onRunQuery&&e.props.onRunQuery()},"Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"}}),this.editor.on("change",this._onEdit),this.editor.on("keyup",this._onKeyUp),this.editor.on("hasCompletion",this._onHasCompletion)}},{key:"componentDidUpdate",value:function(e){var t=require("codemirror");this.ignoreChangeEvent=!0,this.props.schema!==e.schema&&(this.editor.options.lint.schema=this.props.schema,this.editor.options.hintOptions.schema=this.props.schema,t.signal(this.editor,"change",this.editor)),this.props.value!==e.value&&this.props.value!==this.cachedValue&&(this.cachedValue=this.props.value,this.editor.setValue(this.props.value)),this.ignoreChangeEvent=!1}},{key:"componentWillUnmount",value:function(){this.editor.off("change",this._onEdit),this.editor.off("keyup",this._onKeyUp),this.editor.off("hasCompletion",this._onHasCompletion),this.editor=null}},{key:"render",value:function(){return _react2.default.createElement("div",{className:"query-editor"})}},{key:"getCodeMirror",value:function(){return this.editor}}]),t}(_react2.default.Component);QueryEditor.propTypes={schema:_react.PropTypes.instanceOf(_graphql.GraphQLSchema),value:_react.PropTypes.string,onEdit:_react.PropTypes.func,onHintInformationRender:_react.PropTypes.func,onRunQuery:_react.PropTypes.func}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utility/onHasCompletion":17,codemirror:45,"codemirror-graphql/hint":18,"codemirror-graphql/lint":19,"codemirror-graphql/mode":20,"codemirror/addon/comment/comment":35,"codemirror/addon/edit/closebrackets":36,"codemirror/addon/edit/matchbrackets":37,"codemirror/addon/fold/brace-fold":38,"codemirror/addon/fold/foldgutter":40,"codemirror/addon/hint/show-hint":41,"codemirror/addon/lint/lint":42,"codemirror/keymap/sublime":44,graphql:55}],5:[function(require,module,exports){(function(global){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default: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)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ResultViewer=void 0;var _createClass=function(){function e(e,t){for(var r=0;r=65&&r<=90||!t.shiftKey&&r>=48&&r<=57||t.shiftKey&&189===r||t.shiftKey&&222===r)&&o.editor.execCommand("autocomplete")},o._onEdit=function(){o.ignoreChangeEvent||(o.cachedValue=o.editor.getValue(),o.props.onEdit&&o.props.onEdit(o.cachedValue))},o._onHasCompletion=function(e,t){(0,_onHasCompletion2.default)(e,t,o.props.onHintInformationRender)},o.cachedValue=e.value||"",o}return _inherits(t,e),_createClass(t,[{key:"componentDidMount",value:function(){var e=this,t=require("codemirror");require("codemirror/addon/hint/show-hint"),require("codemirror/addon/edit/matchbrackets"),require("codemirror/addon/edit/closebrackets"),require("codemirror/addon/fold/brace-fold"),require("codemirror/addon/fold/foldgutter"),require("codemirror/addon/lint/lint"),require("codemirror/keymap/sublime"),require("codemirror-graphql/variables/hint"),require("codemirror-graphql/variables/lint"),require("codemirror-graphql/variables/mode"),this.editor=t(_reactDom2.default.findDOMNode(this),{value:this.props.value||"",lineNumbers:!0,tabSize:2,mode:"graphql-variables",theme:"graphiql",keyMap:"sublime",autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,foldGutter:{minFoldSize:4},lint:{variableToType:this.props.variableToType},hintOptions:{variableToType:this.props.variableToType},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{"Cmd-Space":function(){return e.editor.showHint({completeSingle:!1})},"Ctrl-Space":function(){return e.editor.showHint({completeSingle:!1})},"Alt-Space":function(){return e.editor.showHint({completeSingle:!1})},"Shift-Space":function(){return e.editor.showHint({completeSingle:!1})},"Cmd-Enter":function(){e.props.onRunQuery&&e.props.onRunQuery()},"Ctrl-Enter":function(){e.props.onRunQuery&&e.props.onRunQuery()},"Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"}}),this.editor.on("change",this._onEdit),this.editor.on("keyup",this._onKeyUp),this.editor.on("hasCompletion",this._onHasCompletion)}},{key:"componentDidUpdate",value:function(e){var t=require("codemirror");this.ignoreChangeEvent=!0,this.props.variableToType!==e.variableToType&&(this.editor.options.lint.variableToType=this.props.variableToType,this.editor.options.hintOptions.variableToType=this.props.variableToType,t.signal(this.editor,"change",this.editor)),this.props.value!==e.value&&this.props.value!==this.cachedValue&&(this.cachedValue=this.props.value,this.editor.setValue(this.props.value)),this.ignoreChangeEvent=!1}},{key:"componentWillUnmount",value:function(){this.editor.off("change",this._onEdit),this.editor.off("keyup",this._onKeyUp),this.editor.off("hasCompletion",this._onHasCompletion),this.editor=null}},{key:"render",value:function(){return _react2.default.createElement("div",{className:"codemirrorWrap"})}},{key:"getCodeMirror",value:function(){return this.editor}}]),t}(_react2.default.Component);VariableEditor.propTypes={variableToType:_react.PropTypes.object,value:_react.PropTypes.string,onEdit:_react.PropTypes.func,onHintInformationRender:_react.PropTypes.func,onRunQuery:_react.PropTypes.func}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utility/onHasCompletion":17,codemirror:45,"codemirror-graphql/variables/hint":32,"codemirror-graphql/variables/lint":33,"codemirror-graphql/variables/mode":34,"codemirror/addon/edit/closebrackets":36,"codemirror/addon/edit/matchbrackets":37,"codemirror/addon/fold/brace-fold":38,"codemirror/addon/fold/foldgutter":40,"codemirror/addon/hint/show-hint":41,"codemirror/addon/lint/lint":42,"codemirror/keymap/sublime":44}],8:[function(require,module,exports){"use strict";module.exports=require("./components/GraphiQL").GraphiQL},{"./components/GraphiQL":3}],9:[function(require,module,exports){(function(global){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;r'+renderType(r.type)+"":"";a.innerHTML='
'+("

"===i.slice(0,3)?"

"+d+i.slice(3):d+i)+"

",t&&t(a)})}function renderType(e){return e instanceof _graphql.GraphQLNonNull?renderType(e.ofType)+"!":e instanceof _graphql.GraphQLList?"["+renderType(e.ofType)+"]":''+e.name+""}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=onHasCompletion;var _graphql=require("graphql"),_marked=require("marked"),_marked2=_interopRequireDefault(_marked)},{codemirror:45,graphql:55,marked:122}],18:[function(require,module,exports){"use strict";function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var _codemirror=require("codemirror"),_codemirror2=_interopRequireDefault(_codemirror),_utilsGetHintsAtPosition=require("./utils/getHintsAtPosition"),_utilsGetHintsAtPosition2=_interopRequireDefault(_utilsGetHintsAtPosition);_codemirror2.default.registerHelper("hint","graphql",function(t,e){var r=e.schema;if(r){var i=t.getCursor(),o=t.getTokenAt(i),u=_utilsGetHintsAtPosition2.default(r,t.getValue(),i,o);return u&&u.list&&u.list.length>0&&(u.from=_codemirror2.default.Pos(u.from.line,u.from.column),u.to=_codemirror2.default.Pos(u.to.line,u.to.column),_codemirror2.default.signal(t,"hasCompletion",t,u,o)),u}})},{"./utils/getHintsAtPosition":26,codemirror:45}],19:[function(require,module,exports){"use strict";function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function errorAnnotations(r,e){return e.nodes.map(function(o){var t="Variable"!==o.kind&&o.name?o.name:o.variable?o.variable:o;return{message:e.message,severity:"error",type:"validation",from:r.posFromIndex(t.loc.start),to:r.posFromIndex(t.loc.end)}})}function mapCat(r,e){return Array.prototype.concat.apply([],r.map(e))}var _codemirror=require("codemirror"),_codemirror2=_interopRequireDefault(_codemirror),_graphql=require("graphql");_codemirror2.default.registerHelper("lint","graphql",function(r,e,o){var t=e.schema;try{var a=_graphql.parse(r)}catch(r){var n=r.locations[0],i=_codemirror2.default.Pos(n.line-1,n.column),l=o.getTokenAt(i);return[{message:r.message,severity:"error",type:"syntax",from:_codemirror2.default.Pos(n.line-1,l.start),to:_codemirror2.default.Pos(n.line-1,l.end)}]}var s=t?_graphql.validate(t,a):[];return mapCat(s,function(r){return errorAnnotations(o,r)})})},{codemirror:45,graphql:55}],20:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function indent(e,t){ +var r=e.levels,i=r&&0!==r.length?r[r.length-1]-(this.electricInput.test(t)?1:0):e.indentLevel;return i*this.config.indentUnit}var _codemirror=require("codemirror"),_codemirror2=_interopRequireDefault(_codemirror),_utilsOnlineParser=require("./utils/onlineParser"),_utilsOnlineParser2=_interopRequireDefault(_utilsOnlineParser),_utilsRules=require("./utils/Rules");_codemirror2.default.defineMode("graphql",function(e){var t=_utilsOnlineParser2.default({eatWhitespace:function(e){return e.eatWhile(_utilsRules.isIgnored)},LexRules:_utilsRules.LexRules,ParseRules:_utilsRules.ParseRules,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:indent,electricInput:/^\s*[})\]]/,fold:"brace",lineComment:"#",closeBrackets:{pairs:'()[]{}""',explode:"()[]{}"}}})},{"./utils/Rules":24,"./utils/onlineParser":30,codemirror:45}],21:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function indent(e,l){var u=e.levels,r=u&&0!==u.length?u[u.length-1]-(this.electricInput.test(l)?1:0):e.indentLevel;return r*this.config.indentUnit}var _codemirror=require("codemirror"),_codemirror2=_interopRequireDefault(_codemirror),_utilsOnlineParser=require("../utils/onlineParser"),_utilsOnlineParser2=_interopRequireDefault(_utilsOnlineParser),_utilsRuleHelpers=require("../utils/RuleHelpers");_codemirror2.default.defineMode("graphql-results",function(e){var l=_utilsOnlineParser2.default({eatWhitespace:function(e){return e.eatSpace()},LexRules:LexRules,ParseRules:ParseRules,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:l.startState,token:l.token,indent:indent,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});var LexRules={Punctuation:/^\[|\]|\{|\}|\:|\,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},ParseRules={Document:[_utilsRuleHelpers.p("{"),_utilsRuleHelpers.list("Entry",_utilsRuleHelpers.p(",")),_utilsRuleHelpers.p("}")],Entry:[_utilsRuleHelpers.t("String","def"),_utilsRuleHelpers.p(":"),"Value"],Value:function(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[_utilsRuleHelpers.t("Number","number")],StringValue:[_utilsRuleHelpers.t("String","string")],BooleanValue:[_utilsRuleHelpers.t("Keyword","builtin")],NullValue:[_utilsRuleHelpers.t("Keyword","keyword")],ListValue:[_utilsRuleHelpers.p("["),_utilsRuleHelpers.list("Value",_utilsRuleHelpers.p(",")),_utilsRuleHelpers.p("]")],ObjectValue:[_utilsRuleHelpers.p("{"),_utilsRuleHelpers.list("ObjectField",_utilsRuleHelpers.p(",")),_utilsRuleHelpers.p("}")],ObjectField:[_utilsRuleHelpers.t("String","property"),_utilsRuleHelpers.p(":"),"Value"]}},{"../utils/RuleHelpers":23,"../utils/onlineParser":30,codemirror:45}],22:[function(require,module,exports){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}exports.__esModule=!0;var CharacterStream=function(){function t(e){_classCallCheck(this,t),this._start=0,this._pos=0,this._sourceText=e}return t.prototype.getStartOfToken=function(){return this._start},t.prototype.getCurrentPosition=function(){return this._pos},t.prototype._testNextCharacter=function(t){var e=this._sourceText.charAt(this._pos),s=!1;return s="string"==typeof t?e===t:t.test?t.test(e):t(e)},t.prototype.eol=function(){return this._sourceText.length===this._pos},t.prototype.sol=function(){return 0===this._pos},t.prototype.peek=function(){return Boolean(this._sourceText.charAt(this._pos))?this._sourceText.charAt(this._pos):null},t.prototype.next=function(){var t=this._sourceText.charAt(this._pos);return this._pos++,t},t.prototype.eat=function(t){var e=this._testNextCharacter(t);if(e)return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},t.prototype.eatWhile=function(t){var e=this._testNextCharacter(t),s=!1;for(e&&(s=e,this._start=this._pos);e;)this._pos++,e=this._testNextCharacter(t),s=!0;return s},t.prototype.eatSpace=function(){return this.eatWhile(/[\s\u00a0]/)},t.prototype.skipToEnd=function(){this._pos=this._sourceText.length},t.prototype.skipTo=function(t){this._pos=t},t.prototype.match=function t(e,s,o){void 0===s&&(s=!0);var r=null,t=null;switch(typeof e){case"string":var i=new RegExp(e,o?"i":"");t=i.test(this._sourceText.substr(this._pos,e.length)),r=e;break;case"object":case"function":t=this._sourceText.slice(this._pos).match(e),r=t&&t[0]}return!(!t||"string"!=typeof e&&0!==t.index)&&(s&&(this._start=this._pos,this._pos+=r.length),t)},t.prototype.backUp=function(t){this._pos-=t},t.prototype.column=function(){return this._pos},t.prototype.indentation=function(){var t=this._sourceText.match(/\s*/),e=0;if(t&&0===t.index)for(var s=t[0],o=0;s.length>o;)9===s.charCodeAt(o)?e+=2:e++,o++;return e},t.prototype.current=function(){return this._sourceText.slice(this._start,this._pos)},t}();exports.default=CharacterStream,module.exports=exports.default},{}],23:[function(require,module,exports){"use strict";function opt(t){return{ofRule:t}}function list(t,n){return{ofRule:t,isList:!0,separator:n}}function butNot(t,n){var u=t.match;return t.match=function(t){return u(t)&&n.every(function(n){return!n.match(t)})},t}function t(t,n){return{style:n,match:function(n){return n.kind===t}}}function p(t,n){return{style:n||"punctuation",match:function(n){return"Punctuation"===n.kind&&n.value===t}}}exports.__esModule=!0,exports.opt=opt,exports.list=list,exports.butNot=butNot,exports.t=t,exports.p=p},{}],24:[function(require,module,exports){"use strict";function word(e){return{style:"keyword",match:function(l){return"Name"===l.kind&&l.value===e}}}function name(e){return{style:e,match:function(e){return"Name"===e.kind},update:function(e,l){e.name=l.value}}}function type(e){return{style:e,match:function(e){return"Name"===e.kind},update:function(e,l){e.prevState.type=l.value}}}exports.__esModule=!0;var _utilsRuleHelpers=require("../utils/RuleHelpers"),isIgnored=function(e){return" "===e||"\t"===e||","===e||"\n"===e||"\r"===e||"\ufeff"===e};exports.isIgnored=isIgnored;var LexRules={Name:/^[_A-Za-z][_0-9A-Za-z]*/,Punctuation:/^(?:!|\$|\(|\)|\.\.\.|:|=|@|\[|\]|\{|\||\})/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/};exports.LexRules=LexRules;var ParseRules={Document:[_utilsRuleHelpers.list("Definition")],Definition:function(e){switch(e.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return"FragmentDefinition";case"schema":return"SchemaDef";case"scalar":return"ScalarDef";case"type":return"ObjectTypeDef";case"interface":return"InterfaceDef";case"union":return"UnionDef";case"enum":return"EnumDef";case"input":return"InputDef";case"extend":return"ExtendDef";case"directive":return"DirectiveDef"}},ShortQuery:["SelectionSet"],Query:[word("query"),_utilsRuleHelpers.opt(name("def")),_utilsRuleHelpers.opt("VariableDefinitions"),_utilsRuleHelpers.list("Directive"),"SelectionSet"],Mutation:[word("mutation"),_utilsRuleHelpers.opt(name("def")),_utilsRuleHelpers.opt("VariableDefinitions"),_utilsRuleHelpers.list("Directive"),"SelectionSet"],Subscription:[word("subscription"),_utilsRuleHelpers.opt(name("def")),_utilsRuleHelpers.opt("VariableDefinitions"),_utilsRuleHelpers.list("Directive"),"SelectionSet"],VariableDefinitions:[_utilsRuleHelpers.p("("),_utilsRuleHelpers.list("VariableDefinition"),_utilsRuleHelpers.p(")")],VariableDefinition:["Variable",_utilsRuleHelpers.p(":"),"Type",_utilsRuleHelpers.opt("DefaultValue")],Variable:[_utilsRuleHelpers.p("$","variable"),name("variable")],DefaultValue:[_utilsRuleHelpers.p("="),"Value"],SelectionSet:[_utilsRuleHelpers.p("{"),_utilsRuleHelpers.list("Selection"),_utilsRuleHelpers.p("}")],Selection:function(e,l){return"..."===e.value?l.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":l.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field"},AliasedField:[name("property"),_utilsRuleHelpers.p(":"),name("qualifier"),_utilsRuleHelpers.opt("Arguments"),_utilsRuleHelpers.list("Directive"),_utilsRuleHelpers.opt("SelectionSet")],Field:[name("property"),_utilsRuleHelpers.opt("Arguments"),_utilsRuleHelpers.list("Directive"),_utilsRuleHelpers.opt("SelectionSet")],Arguments:[_utilsRuleHelpers.p("("),_utilsRuleHelpers.list("Argument"),_utilsRuleHelpers.p(")")],Argument:[name("attribute"),_utilsRuleHelpers.p(":"),"Value"],FragmentSpread:[_utilsRuleHelpers.p("..."),name("def"),_utilsRuleHelpers.list("Directive")],InlineFragment:[_utilsRuleHelpers.p("..."),_utilsRuleHelpers.opt("TypeCondition"),_utilsRuleHelpers.list("Directive"),"SelectionSet"],FragmentDefinition:[word("fragment"),_utilsRuleHelpers.opt(_utilsRuleHelpers.butNot(name("def"),[word("on")])),"TypeCondition",_utilsRuleHelpers.list("Directive"),"SelectionSet"],TypeCondition:[word("on"),type("atom")],Value:function(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable"}return null;case"Name":switch(e.value){case"true":case"false":return"BooleanValue"}return"EnumValue"}},NumberValue:[_utilsRuleHelpers.t("Number","number")],StringValue:[_utilsRuleHelpers.t("String","string")],BooleanValue:[_utilsRuleHelpers.t("Name","builtin")],EnumValue:[name("string-2")],ListValue:[_utilsRuleHelpers.p("["),_utilsRuleHelpers.list("Value"),_utilsRuleHelpers.p("]")],ObjectValue:[_utilsRuleHelpers.p("{"),_utilsRuleHelpers.list("ObjectField"),_utilsRuleHelpers.p("}")],ObjectField:[name("attribute"),_utilsRuleHelpers.p(":"),"Value"],Type:function(e){return"["===e.value?"ListType":"NamedType"},ListType:[_utilsRuleHelpers.p("["),"Type",_utilsRuleHelpers.p("]"),_utilsRuleHelpers.opt(_utilsRuleHelpers.p("!"))],NamedType:[name("atom"),_utilsRuleHelpers.opt(_utilsRuleHelpers.p("!"))],Directive:[_utilsRuleHelpers.p("@","meta"),name("meta"),_utilsRuleHelpers.opt("Arguments")],SchemaDef:[word("schema"),_utilsRuleHelpers.list("Directive"),_utilsRuleHelpers.p("{"),_utilsRuleHelpers.list("OperationTypeDef"),_utilsRuleHelpers.p("}")],OperationTypeDef:[name("keyword"),_utilsRuleHelpers.p(":"),name("atom")],ScalarDef:[word("scalar"),name("atom"),_utilsRuleHelpers.list("Directive")],ObjectTypeDef:[word("type"),name("atom"),_utilsRuleHelpers.opt("Implements"),_utilsRuleHelpers.list("Directive"),_utilsRuleHelpers.p("{"),_utilsRuleHelpers.list("FieldDef"),_utilsRuleHelpers.p("}")],Implements:[word("implements"),_utilsRuleHelpers.list(name("atom"))],FieldDef:[name("property"),_utilsRuleHelpers.opt("ArgumentsDef"),_utilsRuleHelpers.p(":"),"Type",_utilsRuleHelpers.list("Directive")],ArgumentsDef:[_utilsRuleHelpers.p("("),_utilsRuleHelpers.list("InputValueDef"),_utilsRuleHelpers.p(")")],InputValueDef:[name("attribute"),_utilsRuleHelpers.p(":"),"Type",_utilsRuleHelpers.opt("DefaultValue"),_utilsRuleHelpers.list("Directive")],InterfaceDef:[word("interface"),name("atom"),_utilsRuleHelpers.list("Directive"),_utilsRuleHelpers.p("{"),_utilsRuleHelpers.list("FieldDef"),_utilsRuleHelpers.p("}")],UnionDef:[word("union"),name("atom"),_utilsRuleHelpers.list("Directive"),_utilsRuleHelpers.p("="),name("atom"),_utilsRuleHelpers.list("UnionMember")],UnionMember:[_utilsRuleHelpers.p("|"),name("atom")],EnumDef:[word("enum"),name("atom"),_utilsRuleHelpers.list("Directive"),_utilsRuleHelpers.p("{"),_utilsRuleHelpers.list("EnumValueDef"),_utilsRuleHelpers.p("}")],EnumValueDef:[name("string-2"),_utilsRuleHelpers.list("Directive")],InputDef:[word("input"),name("atom"),_utilsRuleHelpers.list("Directive"),_utilsRuleHelpers.p("{"),_utilsRuleHelpers.list("InputValueDef"),_utilsRuleHelpers.p("}")],ExtendDef:[word("extend"),"ObjectTypeDef"],DirectiveDef:[word("directive"),_utilsRuleHelpers.p("@","meta"),name("meta"),_utilsRuleHelpers.opt("ArgumentsDef"),word("on"),name("string-2"),_utilsRuleHelpers.list("DirectiveLocation")],DirectiveLocation:[_utilsRuleHelpers.p("|"),name("string-2")]};exports.ParseRules=ParseRules},{"../utils/RuleHelpers":23}],25:[function(require,module,exports){"use strict";function forEachState(t,e){for(var r=[],o=t;o&&o.kind;)r.push(o),o=o.prevState;for(var a=r.length-1;a>=0;a--)e(r[a])}exports.__esModule=!0,exports.default=forEachState,module.exports=exports.default},{}],26:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function getHintsAtPosition(e,t,n,i){var a=getTypeInfo(e,i.state),r=i.state,p=r.kind,u=r.step;if("comment"!==i.type){if("Document"===p)return _hintList2.default(n,i,[{text:"query"},{text:"mutation"},{text:"subscription"},{text:"fragment"},{text:"{"}]);if(("SelectionSet"===p||"Field"===p||"AliasedField"===p)&&a.parentType){var l;if(a.parentType.getFields){var s=a.parentType.getFields();l=_objectValues2.default(s)}else l=[];return _graphql.isAbstractType(a.parentType)&&l.push(_graphqlTypeIntrospection.TypeNameMetaFieldDef),a.parentType===e.getQueryType()&&l.push(_graphqlTypeIntrospection.SchemaMetaFieldDef,_graphqlTypeIntrospection.TypeMetaFieldDef),_hintList2.default(n,i,l.map(function(e){return{text:e.name,type:e.type,description:e.description}}))}if("Arguments"===p||"Argument"===p&&0===u){var o=a.argDefs;if(o)return _hintList2.default(n,i,o.map(function(e){return{text:e.name,type:e.type,description:e.description}}))}if(("ObjectValue"===p||"ObjectField"===p&&0===u)&&a.objectFieldDefs){var f=_objectValues2.default(a.objectFieldDefs);return _hintList2.default(n,i,f.map(function(e){return{text:e.name,type:e.type,description:e.description}}))}if("EnumValue"===p||"ListValue"===p&&1===u||"ObjectField"===p&&2===u||"Argument"===p&&2===u){var c=_graphql.getNamedType(a.inputType);if(c instanceof _graphql.GraphQLEnumType){var d=c.getValues(),y=_objectValues2.default(d);return _hintList2.default(n,i,y.map(function(e){return{text:e.name,type:c,description:e.description}}))}if(c===_graphql.GraphQLBoolean)return _hintList2.default(n,i,[{text:"true",type:_graphql.GraphQLBoolean,description:"Not false."},{text:"false",type:_graphql.GraphQLBoolean,description:"Not true."}])}if("TypeCondition"===p&&1===u||"NamedType"===p&&"TypeCondition"===r.prevState.kind){var g;if(a.parentType)_graphql.isAbstractType(a.parentType)?!function(){var t=e.getPossibleTypes(a.parentType),n=Object.create(null);t.forEach(function(e){e.getInterfaces().forEach(function(e){n[e.name]=e})}),g=t.concat(_objectValues2.default(n))}():g=[a.parentType];else{var m=e.getTypeMap();g=_objectValues2.default(m).filter(_graphql.isCompositeType)}return _hintList2.default(n,i,g.map(function(e){return{text:e.name,description:e.description}}))}if("FragmentSpread"===p&&1===u){var T=function(){var r=e.getTypeMap(),p=getDefinitionState(i.state),u=getFragmentDefinitions(t),l=u.filter(function(t){return r[t.typeCondition.name.value]&&!(p&&"FragmentDefinition"===p.kind&&p.name===t.name.value)&&_graphql.doTypesOverlap(e,a.parentType,r[t.typeCondition.name.value])});return{v:_hintList2.default(n,i,l.map(function(e){return{text:e.name.value,type:r[e.typeCondition.name.value],description:"fragment "+e.name.value+" on "+e.typeCondition.name.value}}))}}();if("object"==typeof T)return T.v}if("VariableDefinition"===p&&2===u||"ListType"===p&&1===u||"NamedType"===p&&("VariableDefinition"===r.prevState.kind||"ListType"===r.prevState.kind)){var _=e.getTypeMap(),h=_objectValues2.default(_).filter(_graphql.isInputType);return _hintList2.default(n,i,h.map(function(e){return{text:e.name,description:e.description}}))}if("Directive"===p){var D=e.getDirectives().filter(function(e){return canUseDirective(r.prevState.kind,e)});return _hintList2.default(n,i,D.map(function(e){return{text:e.name,description:e.description}}))}}}function canUseDirective(e,t){var n=t.locations;switch(e){case"Query":return n.indexOf("QUERY")!==-1;case"Mutation":return n.indexOf("MUTATION")!==-1;case"Subscription":return n.indexOf("SUBSCRIPTION")!==-1;case"Field":return n.indexOf("FIELD")!==-1;case"FragmentDefinition":return n.indexOf("FRAGMENT_DEFINITION")!==-1;case"FragmentSpread":return n.indexOf("FRAGMENT_SPREAD")!==-1;case"InlineFragment":return n.indexOf("INLINE_FRAGMENT")!==-1}return!1}function getTypeInfo(e,t){var n={type:null,parentType:null,inputType:null,directiveDef:null,fieldDef:null,argDef:null,argDefs:null,objectFieldDefs:null};return _forEachState2.default(t,function(t){switch(t.kind){case"Query":case"ShortQuery":n.type=e.getQueryType();break;case"Mutation":n.type=e.getMutationType();break;case"Subscription":n.type=e.getSubscriptionType();break;case"InlineFragment":case"FragmentDefinition":t.type&&(n.type=e.getType(t.type));break;case"Field":n.fieldDef=n.type&&t.name?getFieldDef(e,n.parentType,t.name):null,n.type=n.fieldDef&&n.fieldDef.type;break;case"SelectionSet":n.parentType=_graphql.getNamedType(n.type);break;case"Directive":n.directiveDef=t.name&&e.getDirective(t.name);break;case"Arguments":n.argDefs="Field"===t.prevState.kind?n.fieldDef&&n.fieldDef.args:"Directive"===t.prevState.kind?n.directiveDef&&n.directiveDef.args:null;break;case"Argument":if(n.argDef=null,n.argDefs)for(var i=0;i0?n:t}function normalizeText(t){return t.toLowerCase().replace(/\W/g,"")}function getProximity(t,e){var n=lexicalDistance(e,t);return t.length>e.length&&(n-=t.length-e.length-1,n+=0===t.indexOf(e)?0:.5),n}function lexicalDistance(t,e){var n=void 0,r=void 0,i=[],o=t.length,l=e.length;for(n=0;n<=o;n++)i[n]=[n];for(r=1;r<=l;r++)i[0][r]=r;for(n=1;n<=o;n++)for(r=1;r<=l;r++){var u=t[n-1]===e[r-1]?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+u),n>1&&r>1&&t[n-1]===e[r-2]&&t[n-2]===e[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+u))}return i[o][l]}exports.__esModule=!0,exports.default=hintList,module.exports=exports.default},{}],28:[function(require,module,exports){"use strict";function jsonParse(e){string=e,strLen=e.length,start=end=lastEnd=-1,ch(),lex();var r=parseObj();return expect("EOF"),r}function parseObj(){var e=start,r=[];if(expect("{"),!skip("}")){do r.push(parseMember());while(skip(","));expect("}")}return{kind:"Object",start:e,end:lastEnd,members:r}}function parseMember(){var e=start,r="String"===kind?curToken():null;expect("String"),expect(":");var t=parseVal();return{kind:"Member",start:e,end:lastEnd,key:r,value:t}}function parseArr(){var e=start,r=[];if(expect("["),!skip("]")){do r.push(parseVal());while(skip(","));expect("]")}return{kind:"Array",start:e,end:lastEnd,values:r}}function parseVal(){switch(kind){case"[":return parseArr();case"{":return parseObj();case"String":case"Number":case"Boolean":case"Null":var e=curToken();return lex(),e}return expect("Value")}function curToken(){return{kind:kind,start:start,end:end,value:JSON.parse(string.slice(start,end))}}function expect(e){if(kind===e)return void lex();var r=void 0;if("EOF"===kind)r="[end of file]";else if(end-start>1)r="`"+string.slice(start,end)+"`";else{var t=string.slice(start).match(/^.+?\b/);r="`"+(t?t[0]:string[start])+"`"}throw syntaxError("Expected "+e+" but found "+r+".")}function syntaxError(e){return{message:e,start:start,end:end}}function skip(e){if(kind===e)return lex(),!0}function ch(){end31;)if(92===code)switch(ch(),code){case 34:case 47:case 92:case 98:case 102:case 110:case 114:case 116:ch();break;case 117:ch(),readHex(),readHex(),readHex(),readHex();break;default:throw syntaxError("Bad character escape sequence.")}else{if(end===strLen)throw syntaxError("Unterminated string.");ch()}if(34===code)return void ch();throw syntaxError("Unterminated string.")}function readHex(){if(code>=48&&code<=57||code>=65&&code<=70||code>=97&&code<=102)return ch();throw syntaxError("Expected hexadecimal digit.")}function readNumber(){45===code&&ch(),48===code?ch():readDigits(),46===code&&(ch(),readDigits()),69!==code&&101!==code||(ch(),43!==code&&45!==code||ch(),readDigits())}function readDigits(){if(code<48||code>57)throw syntaxError("Expected decimal digit.");do ch();while(code>=48&&code<=57)}exports.__esModule=!0,exports.default=jsonParse;var string=void 0,strLen=void 0,start=void 0,end=void 0,lastEnd=void 0,code=void 0,kind=void 0;module.exports=exports.default},{}],29:[function(require,module,exports){"use strict";function objectValues(e){for(var t=Object.keys(e),r=t.length,o=new Array(r),s=0;s0&&o[o.length-1]0&&(a.from=_codemirror2.default.Pos(a.from.line,a.from.column),a.to=_codemirror2.default.Pos(a.to.line,a.to.column),_codemirror2.default.signal(e,"hasCompletion",e,a,i)),a})},{"../utils/forEachState":25,"../utils/hintList":27,codemirror:45,graphql:55}],33:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validateVariables(e,r,a){var n=[];return a.members.forEach(function(a){var t=a.key.value,i=r[t];i?validateValue(i,a.value).forEach(function(r){var a=r[0],t=r[1];n.push(lintError(e,a,t))}):n.push(lintError(e,a.key,'Variable "$'+t+'" does not appear in any GraphQL query.'))}),n}function validateValue(e,r){for(var a=!0;a;){var n=e,t=r;if(i=u=void 0,a=!1,!(n instanceof _graphql.GraphQLNonNull)){if("Null"===t.kind)return[];if(n instanceof _graphql.GraphQLList){var i=function(){var e=n.ofType;return"Array"===t.kind?{v:mapCat(t.values,function(r){return validateValue(e,r)})}:{v:validateValue(e,t)}}();if("object"==typeof i)return i.v}if(n instanceof _graphql.GraphQLInputObjectType){var u=function(){if("Object"!==t.kind)return{v:[[t,'Type "'+n+'" must be an Object.']]};var e=Object.create(null),r=mapCat(t.members,function(r){var a=r.key.value;e[a]=!0;var t=n.getFields()[a];if(!t)return[[r.key,'Type "'+n+'" does not have a field "'+a+'".']];var i=t?t.type:void 0;return validateValue(i,r.value)});return Object.keys(n.getFields()).forEach(function(a){if(!e[a]){var i=n.getFields()[a].type;i instanceof _graphql.GraphQLNonNull&&r.push([t,'Object of type "'+n+'" is missing required field "'+a+'".'])}}),{v:r}}();if("object"==typeof u)return u.v}return"Boolean"===n.name&&"Boolean"!==t.kind||"String"===n.name&&"String"!==t.kind||"ID"===n.name&&"Number"!==t.kind&&"String"!==t.kind||"Float"===n.name&&"Number"!==t.kind||"Int"===n.name&&("Number"!==t.kind||(0|t.value)!==t.value)?[[t,'Expected value of type "'+n+'".']]:(n instanceof _graphql.GraphQLEnumType||n instanceof _graphql.GraphQLScalarType)&&("String"!==t.kind&&"Number"!==t.kind&&"Boolean"!==t.kind&&"Null"!==t.kind||isNullish(n.parseValue(t.value)))?[[t,'Expected value of type "'+n+'".']]:[]; +}if("Null"===t.kind)return[[t,'Type "'+n+'" is non-nullable and cannot be null.']];e=n.ofType,r=t,a=!0}}function lintError(e,r,a){return{message:a,severity:"error",type:"validation",from:e.posFromIndex(r.start),to:e.posFromIndex(r.end)}}function isNullish(e){return null===e||void 0===e||e!==e}function mapCat(e,r){return Array.prototype.concat.apply([],e.map(r))}var _codemirror=require("codemirror"),_codemirror2=_interopRequireDefault(_codemirror),_graphql=require("graphql"),_utilsJsonParse=require("../utils/jsonParse"),_utilsJsonParse2=_interopRequireDefault(_utilsJsonParse);_codemirror2.default.registerHelper("lint","graphql-variables",function(e,r,a){if(!e)return[];var n=void 0;try{n=_utilsJsonParse2.default(e)}catch(e){if(e.stack)throw e;return[lintError(a,e,e.message)]}var t=r.variableToType;return t?validateVariables(a,t,n):[]})},{"../utils/jsonParse":28,codemirror:45,graphql:55}],34:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function indent(e,l){var u=e.levels,t=u&&0!==u.length?u[u.length-1]-(this.electricInput.test(l)?1:0):e.indentLevel;return t*this.config.indentUnit}function namedKey(e){return{style:e,match:function(e){return"String"===e.kind},update:function(e,l){e.name=l.value.slice(1,-1)}}}var _codemirror=require("codemirror"),_codemirror2=_interopRequireDefault(_codemirror),_utilsOnlineParser=require("../utils/onlineParser"),_utilsOnlineParser2=_interopRequireDefault(_utilsOnlineParser),_utilsRuleHelpers=require("../utils/RuleHelpers");_codemirror2.default.defineMode("graphql-variables",function(e){var l=_utilsOnlineParser2.default({eatWhitespace:function(e){return e.eatSpace()},LexRules:LexRules,ParseRules:ParseRules,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:l.startState,token:l.token,indent:indent,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});var LexRules={Punctuation:/^\[|\]|\{|\}|\:|\,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},ParseRules={Document:[_utilsRuleHelpers.p("{"),_utilsRuleHelpers.list("Variable",_utilsRuleHelpers.p(",")),_utilsRuleHelpers.p("}")],Variable:[namedKey("variable"),_utilsRuleHelpers.p(":"),"Value"],Value:function(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[_utilsRuleHelpers.t("Number","number")],StringValue:[_utilsRuleHelpers.t("String","string")],BooleanValue:[_utilsRuleHelpers.t("Keyword","builtin")],NullValue:[_utilsRuleHelpers.t("Keyword","keyword")],ListValue:[_utilsRuleHelpers.p("["),_utilsRuleHelpers.list("Value",_utilsRuleHelpers.p(",")),_utilsRuleHelpers.p("]")],ObjectValue:[_utilsRuleHelpers.p("{"),_utilsRuleHelpers.list("ObjectField",_utilsRuleHelpers.p(",")),_utilsRuleHelpers.p("}")],ObjectField:[namedKey("attribute"),_utilsRuleHelpers.p(":"),"Value"]}},{"../utils/RuleHelpers":23,"../utils/onlineParser":30,codemirror:45}],35:[function(require,module,exports){!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function n(e){var n=e.search(l);return n==-1?0:n}function t(e,n,t){return/\bstring\b/.test(e.getTokenTypeAt(o(n.line,0)))&&!/^[\'\"`]/.test(t)}var i={},l=/[^\s\u00a0]/,o=e.Pos;e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",function(e){e||(e=i);for(var n=this,t=1/0,l=this.listSelections(),r=null,a=l.length-1;a>=0;a--){var m=l[a].from(),c=l[a].to();m.line>=t||(c.line>=t&&(c=o(t,0)),t=m.line,null==r?n.uncomment(m,c,e)?r="un":(n.lineComment(m,c,e),r="line"):"un"==r?n.uncomment(m,c,e):n.lineComment(m,c,e))}}),e.defineExtension("lineComment",function(e,r,a){a||(a=i);var m=this,c=m.getModeAt(e),f=m.getLine(e.line);if(null!=f&&!t(m,e,f)){var g=a.lineComment||c.lineComment;if(!g)return void((a.blockCommentStart||c.blockCommentStart)&&(a.fullLines=!0,m.blockComment(e,r,a)));var s=Math.min(0!=r.ch||r.line==e.line?r.line+1:r.line,m.lastLine()+1),d=null==a.padding?" ":a.padding,u=a.commentBlankLines||e.line==r.line;m.operation(function(){if(a.indent){for(var t=null,i=e.line;ic.length)&&(t=c)}for(var i=e.line;if||r.operation(function(){if(0!=t.fullLines){var i=l.test(r.getLine(f));r.replaceRange(g+c,o(f)),r.replaceRange(m+g,o(e.line,0));var s=t.blockCommentLead||a.blockCommentLead;if(null!=s)for(var d=e.line+1;d<=f;++d)(d!=f||i)&&r.replaceRange(s+g,o(d,0))}else r.replaceRange(c,n),r.replaceRange(m,e)})}),e.defineExtension("uncomment",function(e,n,t){t||(t=i);var r,a=this,m=a.getModeAt(e),c=Math.min(0!=n.ch||n.line==e.line?n.line:n.line-1,a.lastLine()),f=Math.min(e.line,c),g=t.lineComment||m.lineComment,s=[],d=null==t.padding?" ":t.padding;e:if(g){for(var u=f;u<=c;++u){var h=a.getLine(u),v=h.indexOf(g);if(v>-1&&!/comment/.test(a.getTokenTypeAt(o(u,v+1)))&&(v=-1),v==-1&&l.test(h))break e;if(v>-1&&l.test(h.slice(0,v)))break e;s.push(h)}if(a.operation(function(){for(var e=f;e<=c;++e){var n=s[e-f],t=n.indexOf(g),i=t+g.length;t<0||(n.slice(i,i+d.length)==d&&(i+=d.length),r=!0,a.replaceRange("",o(e,t),o(e,i)))}}),r)return!0}var p=t.blockCommentStart||m.blockCommentStart,C=t.blockCommentEnd||m.blockCommentEnd;if(!p||!C)return!1;var b=t.blockCommentLead||m.blockCommentLead,k=a.getLine(f),L=c==f?k:a.getLine(c),x=k.indexOf(p),R=L.lastIndexOf(C);if(R==-1&&f!=c&&(L=a.getLine(--c),R=L.lastIndexOf(C)),x==-1||R==-1||!/comment/.test(a.getTokenTypeAt(o(f,x+1)))||!/comment/.test(a.getTokenTypeAt(o(c,R+1))))return!1;var O=k.lastIndexOf(p,e.ch),E=O==-1?-1:k.slice(0,e.ch).indexOf(C,O+p.length);if(O!=-1&&E!=-1&&E+C.length!=e.ch)return!1;E=L.indexOf(C,n.ch);var M=L.slice(n.ch).lastIndexOf(p,E-n.ch);return O=E==-1||M==-1?-1:n.ch+M,(E==-1||O==-1||O==n.ch)&&(a.operation(function(){a.replaceRange("",o(c,R-(d&&L.slice(R-d.length,R)==d?d.length:0)),o(c,R+C.length));var e=x+p.length;if(d&&k.slice(e,e+d.length)==d&&(e+=d.length),a.replaceRange("",o(f,x),o(f,e)),b)for(var n=f+1;n<=c;++n){var t=a.getLine(n),i=t.indexOf(b);if(i!=-1&&!l.test(t.slice(0,i))){var r=i+b.length;d&&t.slice(r,r+d.length)==d&&(r+=d.length),a.replaceRange("",o(n,i),o(n,r))}}}),!0)})})},{"../../lib/codemirror":45}],36:[function(require,module,exports){!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:u[t]}function n(e){return function(t){return s(t,e)}}function r(e){var t=e.state.closeBrackets;if(!t)return null;var n=e.getModeAt(e.getCursor());return n.closeBrackets||t}function i(n){var i=r(n);if(!i||n.getOption("disableInput"))return e.Pass;for(var a=t(i,"pairs"),o=n.listSelections(),s=0;s=0;s--){var f=o[s].head;n.replaceRange("",h(f.line,f.ch-1),h(f.line,f.ch+1),"+delete")}}function a(n){var i=r(n),a=i&&t(i,"explode");if(!a||n.getOption("disableInput"))return e.Pass;for(var o=n.listSelections(),s=0;s0;return{anchor:new h(t.anchor.line,t.anchor.ch+(n?-1:1)),head:new h(t.head.line,t.head.ch+(n?1:-1))}}function s(n,i){var a=r(n);if(!a||n.getOption("disableInput"))return e.Pass;var s=t(a,"pairs"),c=s.indexOf(i);if(c==-1)return e.Pass;for(var u,d=t(a,"triples"),g=s.charAt(c+1)==i,p=n.listSelections(),v=c%2==0,m=0;m1&&d.indexOf(i)>=0&&n.getRange(h(C.line,C.ch-2),C)==i+i&&(C.ch<=2||n.getRange(h(C.line,C.ch-3),h(C.line,C.ch-2))!=i))b="addFour";else if(g){if(e.isWordChar(P)||!f(n,C,i))return e.Pass;b="both"}else{if(!v||n.getLine(C.line).length!=C.ch&&!l(P,s)&&!/\s/.test(P))return e.Pass;b="both"}else b=d.indexOf(i)>=0&&n.getRange(C,h(C.line,C.ch+3))==i+i+i?"skipThree":"skip";if(u){if(u!=b)return e.Pass}else u=b}var S=c%2?s.charAt(c-1):i,k=c%2?i:s.charAt(c+1);n.operation(function(){if("skip"==u)n.execCommand("goCharRight");else if("skipThree"==u)for(var e=0;e<3;e++)n.execCommand("goCharRight");else if("surround"==u){for(var t=n.getSelections(),e=0;e-1&&n%2==1}function c(e,t){var n=e.getRange(h(t.line,t.ch-1),h(t.line,t.ch+1));return 2==n.length?n:null}function f(t,n,r){var i=t.getLine(n.line),a=t.getTokenAt(n);if(/\bstring2?\b/.test(a.type))return!1;var o=new e.StringStream(i.slice(0,n.ch)+r+i.slice(n.ch),4);for(o.pos=o.start=a.start;;){var s=t.getMode().token(o,a.state);if(o.pos>=n.ch+1)return/\bstring2?\b/.test(s);o.start=o.pos}}var u={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},h=e.Pos;e.defineOption("autoCloseBrackets",!1,function(t,n,r){r&&r!=e.Init&&(t.removeKeyMap(g),t.state.closeBrackets=null),n&&(t.state.closeBrackets=n,t.addKeyMap(g))});for(var d=u.pairs+"`",g={Backspace:i,Enter:a},p=0;p=0&&c[o.text.charAt(l)]||c[o.text.charAt(++l)];if(!f)return null;var u=">"==f.charAt(1)?1:-1;if(i&&u>0!=(l==t.ch))return null;var h=e.getTokenTypeAt(a(t.line,l+1)),s=n(e,a(t.line,l+(u>0?1:0)),u,h||null,r);return null==s?null:{from:a(t.line,l),to:s&&s.pos,match:s&&s.ch==f.charAt(0),forward:u>0}}function n(e,t,n,i,r){for(var o=r&&r.maxScanLineLength||1e4,l=r&&r.maxScanLines||1e3,f=[],u=r&&r.bracketRegex?r.bracketRegex:/[(){}[\]]/,h=n>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),s=t.line;s!=h;s+=n){var m=e.getLine(s);if(m){var d=n>0?0:m.length-1,g=n>0?m.length:-1;if(!(m.length>o))for(s==t.line&&(d=t.ch-(n<0?1:0));d!=g;d+=n){var p=m.charAt(d);if(u.test(p)&&(void 0===i||e.getTokenTypeAt(a(s,d+1))==i)){var v=c[p];if(">"==v.charAt(1)==n>0)f.push(p);else{if(!f.length)return{pos:a(s,d),ch:p};f.pop()}}}}}return s-n!=(n>0?e.lastLine():e.firstLine())&&null}function i(e,n,i){for(var r=e.state.matchBrackets.maxHighlightLineLength||1e3,c=[],l=e.listSelections(),f=0;f",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},l=null;e.defineOption("matchBrackets",!1,function(t,n,i){i&&i!=e.Init&&(t.off("cursorActivity",r),l&&(l(),l=null)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",r))}),e.defineExtension("matchBrackets",function(){i(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,i){return t(this,e,n,i)}),e.defineExtension("scanForBracket",function(e,t,i,r){return n(this,e,t,i,r)})})},{"../../lib/codemirror":45}],38:[function(require,module,exports){!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.registerHelper("fold","brace",function(r,n){function t(t){for(var f=n.ch,s=0;;){var u=f<=0?-1:l.lastIndexOf(t,f-1);if(u!=-1){if(1==s&&ur.lastLine())return null;var t=r.getTokenAt(e.Pos(n,1));if(/\S/.test(t.string)||(t=r.getTokenAt(e.Pos(n,t.end+1))),"keyword"!=t.type||"import"!=t.string)return null;for(var i=n,o=Math.min(r.lastLine(),n+10);i<=o;++i){var l=r.getLine(i),f=l.indexOf(";");if(f!=-1)return{startCh:t.end,end:e.Pos(i,f)}}}var i,o=n.line,l=t(o);if(!l||t(o-1)||(i=t(o-2))&&i.end.line==o-1)return null;for(var f=l.end;;){var s=t(f.line+1);if(null==s)break;f=s.end}return{from:r.clipPos(e.Pos(o,l.startCh+1)),to:f}}),e.registerHelper("fold","include",function(r,n){function t(n){if(nr.lastLine())return null;var t=r.getTokenAt(e.Pos(n,1));return/\S/.test(t.string)||(t=r.getTokenAt(e.Pos(n,t.end+1))),"meta"==t.type&&"#include"==t.string.slice(0,8)?t.start+8:void 0}var i=n.line,o=t(i);if(null==o||null!=t(i-1))return null;for(var l=i;;){var f=t(l+1);if(null==f)break;++l}return{from:e.Pos(i,o+1),to:r.clipPos(e.Pos(l))}})})},{"../../lib/codemirror":45}],39:[function(require,module,exports){!function(n){"object"==typeof exports&&"object"==typeof module?n(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)}(function(n){"use strict";function o(o,i,t,l){function f(n){var e=d(o,i);if(!e||e.to.line-e.from.lineo.firstLine();)i=n.Pos(i.line-1,0),a=f(!1);if(a&&!a.cleared&&"unfold"!==l){var c=e(o,t);n.on(c,"mousedown",function(o){s.clear(),n.e_preventDefault(o)});var s=o.markText(a.from,a.to,{replacedWith:c,clearOnEnter:r(o,t,"clearOnEnter"),__isFold:!0});s.on("clear",function(e,r){n.signal(o,"unfold",o,e,r)}),n.signal(o,"fold",o,a.from,a.to)}}function e(n,o){var e=r(n,o,"widget");if("string"==typeof e){var i=document.createTextNode(e);e=document.createElement("span"),e.appendChild(i),e.className="CodeMirror-foldmarker"}return e}function r(n,o,e){if(o&&void 0!==o[e])return o[e];var r=n.options.foldOptions;return r&&void 0!==r[e]?r[e]:i[e]}n.newFoldFunction=function(n,e){return function(r,i){o(r,i,{rangeFinder:n,widget:e})}},n.defineExtension("foldCode",function(n,e,r){o(this,n,e,r)}),n.defineExtension("isFolded",function(n){for(var o=this.findMarksAt(n),e=0;e=d&&(e=n(i.indicatorOpen))}o.setGutterMarker(t,i.gutter,e),++f})}function f(o){var t=o.getViewport(),e=o.state.foldGutter;e&&(o.operation(function(){i(o,t.from,t.to)}),e.from=t.from,e.to=t.to)}function d(o,t,e){var n=o.state.foldGutter;if(n){var i=n.options;if(e==i.gutter){var f=r(o,t);f?f.clear():o.foldCode(c(t,0),i.rangeFinder)}}}function a(o){var t=o.state.foldGutter;if(t){var e=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){f(o)},e.foldOnChangeTimeSpan||600)}}function u(o){var t=o.state.foldGutter;if(t){var e=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var e=o.getViewport();t.from==t.to||e.from-t.to>20||t.from-e.to>20?f(o):o.operation(function(){e.fromt.to&&(i(o,t.to,e.to),t.to=e.to)})},e.updateViewportTimeSpan||400)}}function l(o,t){var e=o.state.foldGutter;if(e){var r=t.line;r>=e.from&&r0&&i.to.ch-i.from.ch!=e.to.ch-e.from.ch}function n(t,i,e){var n=t.options.hintOptions,o={};for(var s in m)o[s]=m[s];if(n)for(var s in n)void 0!==n[s]&&(o[s]=n[s]);if(e)for(var s in e)void 0!==e[s]&&(o[s]=e[s]);return o.hint.resolve&&(o.hint=o.hint.resolve(t,i)),o}function o(t){return"string"==typeof t?t:t.text}function s(t,i){function e(t,e){var o;o="string"!=typeof e?function(t){return e(t,i)}:n.hasOwnProperty(e)?n[e]:e,s[t]=o}var n={Up:function(){i.moveFocus(-1)},Down:function(){i.moveFocus(1)},PageUp:function(){i.moveFocus(-i.menuSize()+1,!0)},PageDown:function(){i.moveFocus(i.menuSize()-1,!0)},Home:function(){i.setFocus(0)},End:function(){i.setFocus(i.length-1)},Enter:i.pick,Tab:i.pick,Esc:i.close},o=t.options.customKeys,s=o?{}:n;if(o)for(var c in o)o.hasOwnProperty(c)&&e(c,o[c]);var r=t.options.extraKeys;if(r)for(var c in r)r.hasOwnProperty(c)&&e(c,r[c]);return s}function c(t,i){for(;i&&i!=t;){if("LI"===i.nodeName.toUpperCase()&&i.parentNode==t)return i;i=i.parentNode}}function r(i,e){this.completion=i,this.data=e,this.picked=!1;var n=this,r=i.cm,h=this.hints=document.createElement("ul");h.className="CodeMirror-hints",this.selectedHint=e.selectedHint||0;for(var l=e.list,a=0;ah.clientHeight+1,A=r.getScrollInfo();if(b>0){var S=C.bottom-C.top,T=g.top-(g.bottom-C.top);if(T-S>0)h.style.top=(y=g.top-S)+"px",w=!1;else if(S>k){h.style.height=k-5+"px",h.style.top=(y=g.bottom-C.top)+"px";var M=r.getCursor();e.from.ch!=M.ch&&(g=r.cursorCoords(M),h.style.left=(v=g.left)+"px",C=h.getBoundingClientRect())}}var F=C.right-H;if(F>0&&(C.right-C.left>H&&(h.style.width=H-5+"px",F-=C.right-C.left-H),h.style.left=(v=g.left-F)+"px"),x)for(var N=h.firstChild;N;N=N.nextSibling)N.style.paddingRight=r.display.nativeBarWidth+"px";if(r.addKeyMap(this.keyMap=s(i,{moveFocus:function(t,i){n.changeActive(n.selectedHint+t,i)},setFocus:function(t){n.changeActive(t)},menuSize:function(){return n.screenAmount()},length:l.length,close:function(){i.close()},pick:function(){n.pick()},data:e})),i.options.closeOnUnfocus){var E;r.on("blur",this.onBlur=function(){E=setTimeout(function(){i.close()},100)}),r.on("focus",this.onFocus=function(){clearTimeout(E)})}return r.on("scroll",this.onScroll=function(){var t=r.getScrollInfo(),e=r.getWrapperElement().getBoundingClientRect(),n=y+A.top-t.top,o=n-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return w||(o+=h.offsetHeight),o<=e.top||o>=e.bottom?i.close():(h.style.top=n+"px",void(h.style.left=v+A.left-t.left+"px"))}),t.on(h,"dblclick",function(t){var i=c(h,t.target||t.srcElement);i&&null!=i.hintId&&(n.changeActive(i.hintId),n.pick())}),t.on(h,"click",function(t){var e=c(h,t.target||t.srcElement);e&&null!=e.hintId&&(n.changeActive(e.hintId),i.options.completeOnSingleClick&&n.pick())}),t.on(h,"mousedown",function(){setTimeout(function(){r.focus()},20)}),t.signal(e,"select",l[0],h.firstChild),!0}function h(t,i){if(!t.somethingSelected())return i;for(var e=[],n=0;n0?i(t):n(o+1)})}var s=h(t,o);n(0)};return s.async=!0,s.supportsSelection=!0,s}return(n=i.getHelper(i.getCursor(),"hintWords"))?function(i){return t.hint.fromList(i,{words:n})}:t.hint.anyword?function(i,e){return t.hint.anyword(i,e)}:function(){}}var u="CodeMirror-hint",f="CodeMirror-hint-active";t.showHint=function(t,i,e){if(!i)return t.showHint(e);e&&e.async&&(i.async=!0);var n={hint:i};if(e)for(var o in e)n[o]=e[o];return t.showHint(n)},t.defineExtension("showHint",function(e){e=n(this,this.getCursor("start"),e);var o=this.listSelections();if(!(o.length>1)){if(this.somethingSelected()){if(!e.hint.supportsSelection)return;for(var s=0;s=this.data.list.length?i=e?this.data.list.length-1:0:i<0&&(i=e?0:this.data.list.length-1),this.selectedHint!=i){var n=this.hints.childNodes[this.selectedHint];n.className=n.className.replace(" "+f,""),n=this.hints.childNodes[this.selectedHint=i],n.className+=" "+f,n.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+3),t.signal(this.data,"select",this.data.list[this.selectedHint],n)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},t.registerHelper("hint","auto",{resolve:a}),t.registerHelper("hint","fromList",function(i,e){var n=i.getCursor(),o=i.getTokenAt(n),s=t.Pos(n.line,o.end);if(o.string&&/\w/.test(o.string[o.string.length-1]))var c=o.string,r=t.Pos(n.line,o.start);else var c="",r=s;for(var h=[],l=0;l,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};t.defineOption("hintOptions",null)})},{"../../lib/codemirror":45}],42:[function(require,module,exports){!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";function e(e,n){function o(e){return r.parentNode?(r.style.top=Math.max(0,e.clientY-r.offsetHeight-5)+"px",void(r.style.left=e.clientX+5+"px")):t.off(document,"mousemove",o)}var r=document.createElement("div");return r.className="CodeMirror-lint-tooltip",r.appendChild(n.cloneNode(!0)),document.body.appendChild(r),t.on(document,"mousemove",o),o(e),null!=r.style.opacity&&(r.style.opacity=1),r}function n(t){t.parentNode&&t.parentNode.removeChild(t)}function o(t){t.parentNode&&(null==t.style.opacity&&n(t),t.style.opacity=0,setTimeout(function(){n(t)},600))}function r(n,r,i){function a(){t.off(i,"mouseout",a),l&&(o(l),l=null)}var l=e(n,r),u=setInterval(function(){if(l)for(var t=i;;t=t.parentNode){if(t&&11==t.nodeType&&(t=t.host),t==document.body)return;if(!t){a();break}}if(!l)return clearInterval(u)},400);t.on(i,"mouseout",a)}function i(t,e,n){this.marked=[],this.options=e,this.timeout=null,this.hasGutter=n,this.onMouseOver=function(e){g(t,e)},this.waitingFor=0}function a(t,e){return e instanceof Function?{getAnnotations:e}:(e&&e!==!0||(e={}),e)}function l(t){var e=t.state.lint;e.hasGutter&&t.clearGutter(y);for(var n=0;n1,n.options.tooltips)); +}}o.onUpdateLinting&&o.onUpdateLinting(e,r,t)}function h(t){var e=t.state.lint;e&&(clearTimeout(e.timeout),e.timeout=setTimeout(function(){d(t)},e.options.delay||500))}function v(t,e){for(var n=e.target||e.srcElement,o=document.createDocumentFragment(),i=0;i-1)return c=n(f,h,c),{from:i(o.line,c),to:i(o.line,c+s.length)}}else{var f=e.getLine(o.line).slice(o.ch),h=l(f),c=h.indexOf(t);if(c>-1)return c=n(f,h,c)+o.ch,{from:i(o.line,c),to:i(o.line,c+s.length)}}}:this.matches=function(){};else{var h=s.split("\n");this.matches=function(t,n){var r=f.length-1;if(t){if(n.line-(f.length-1)=1;--c,--s)if(f[c]!=l(e.getLine(s)))return;var u=e.getLine(s),a=u.length-h[0].length;if(l(u.slice(a))!=f[0])return;return{from:i(s,a),to:o}}if(!(n.line+(f.length-1)>e.lastLine())){var u=e.getLine(n.line),a=u.length-h[0].length;if(l(u.slice(a))==f[0]){for(var g=i(n.line,a),s=n.line+1,c=1;cn))return i;--i}}}var i=e.Pos;t.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){function t(e){var t=i(e,0);return n.pos={from:t,to:t},n.atOccurrence=!1,!1}for(var n=this,r=this.doc.clipPos(e?this.pos.from:this.pos.to);;){if(this.pos=this.matches(e,r))return this.atOccurrence=!0,this.pos.match||!0;if(e){if(!r.line)return t(0);r=i(r.line-1,this.doc.getLine(r.line-1).length)}else{var o=this.doc.lineCount();if(r.line==o-1)return t(o);r=i(r.line+1,0)}}},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var r=e.splitLines(t);this.doc.replaceRange(r,this.pos.from,this.pos.to,n),this.pos.to=i(this.pos.from.line+r.length-1,r[r.length-1].length+(1==r.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",function(e,n,i){return new t(this.doc,e,n,i)}),e.defineDocExtension("getSearchCursor",function(e,n,i){return new t(this,e,n,i)}),e.defineExtension("selectMatches",function(t,n){for(var i=[],r=this.getSearchCursor(t,this.getCursor("from"),n);r.findNext()&&!(e.cmpPos(r.to(),this.getCursor("to"))>0);)i.push({anchor:r.from(),head:r.to()});i.length&&this.setSelections(i,0)})})},{"../../lib/codemirror":45}],44:[function(require,module,exports){!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror"),require("../addon/search/searchcursor"),require("../addon/edit/matchbrackets")):"function"==typeof define&&define.amd?define(["../lib/codemirror","../addon/search/searchcursor","../addon/edit/matchbrackets"],e):e(CodeMirror)}(function(e){"use strict";function t(t,n,r){if(r<0&&0==n.ch)return t.clipPos(h(n.line-1));var o=t.getLine(n.line);if(r>0&&n.ch>=o.length)return t.clipPos(h(n.line+1,0));for(var i,a="start",l=n.ch,s=r<0?0:o.length,c=0;l!=s;l+=r,c++){var f=o.charAt(r<0?l-1:l),u="_"!=f&&e.isWordChar(f)?"w":"o";if("w"==u&&f.toUpperCase()==f&&(u="W"),"start"==a)"o"!=u&&(a="in",i=u);else if("in"==a&&i!=u){if("w"==i&&"W"==u&&r<0&&l--,"W"==i&&"w"==u&&r>0){i="w";continue}break}}return h(n.line,l)}function n(e,n){e.extendSelectionsBy(function(r){return e.display.shift||e.doc.extend||r.empty()?t(e.doc,r.head,n):n<0?r.from():r.to()})}function r(t,n){return t.isReadOnly()?e.Pass:(t.operation(function(){for(var e=t.listSelections().length,r=[],o=-1,i=0;i=0;l--){var s=r[i[l]];if(!(c&&e.cmpPos(s.head,c)>0)){var f=o(t,s.head);c=f.from,t.replaceRange(n(f.word),f.from,f.to)}}})}function s(t){var n=t.getCursor("from"),r=t.getCursor("to");if(0==e.cmpPos(n,r)){var i=o(t,n);if(!i.word)return;n=i.from,r=i.to}return{from:n,to:r,query:t.getRange(n,r),word:i}}function c(e,t){var n=s(e);if(n){var r=n.query,o=e.getSearchCursor(r,t?n.to:n.from);(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):(o=e.getSearchCursor(r,t?h(e.firstLine(),0):e.clipPos(h(e.lastLine()))),(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):n.word&&e.setSelection(n.from,n.to))}}var f=e.keyMap.sublime={fallthrough:"default"},u=e.commands,h=e.Pos,d=e.keyMap.default==e.keyMap.macDefault,p=d?"Cmd-":"Ctrl-",m=d?"Ctrl-":"Alt-";u[f[m+"Left"]="goSubwordLeft"]=function(e){n(e,-1)},u[f[m+"Right"]="goSubwordRight"]=function(e){n(e,1)},d&&(f["Cmd-Left"]="goLineStartSmart");var g=d?"Ctrl-Alt-":"Ctrl-";u[f[g+"Up"]="scrollLineUp"]=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top+t.clientHeight,"local");e.getCursor().line>=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},u[f[g+"Down"]="scrollLineDown"]=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},u[f["Shift-"+p+"L"]="splitSelectionByLine"]=function(e){for(var t=e.listSelections(),n=[],r=0;ro.line&&a==i.line&&0==i.ch||n.push({anchor:a==o.line?o:h(a,0),head:a==i.line?i:h(a)});e.setSelections(n,0)},f["Shift-Tab"]="indentLess",u[f.Esc="singleSelectionTop"]=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},u[f[p+"L"]="selectLine"]=function(e){for(var t=e.listSelections(),n=[],r=0;ro?r.push(s,c):r.length&&(r[r.length-1]=c),o=c}t.operation(function(){for(var e=0;et.lastLine()?t.replaceRange("\n"+a,h(t.lastLine()),null,"+swapLine"):t.replaceRange(a+"\n",h(o,0),null,"+swapLine")}t.setSelections(i),t.scrollIntoView()})},u[f[S+"Down"]="swapLineDown"]=function(t){if(t.isReadOnly())return e.Pass;for(var n=t.listSelections(),r=[],o=t.lastLine()+1,i=n.length-1;i>=0;i--){var a=n[i],l=a.to().line+1,s=a.from().line;0!=a.to().ch||a.empty()||l--,l=0;e-=2){var n=r[e],o=r[e+1],i=t.getLine(n);n==t.lastLine()?t.replaceRange("",h(n-1),h(n),"+swapLine"):t.replaceRange("",h(n,0),h(n+1,0),"+swapLine"),t.replaceRange(i+"\n",h(o,0),null,"+swapLine")}t.scrollIntoView()})},u[f[p+"/"]="toggleCommentIndented"]=function(e){e.toggleComment({indent:!0})},u[f[p+"J"]="joinLines"]=function(e){for(var t=e.listSelections(),n=[],r=0;r=0;o--){var i=n[o].head,a=t.getRange({line:i.line,ch:0},i),l=e.countColumn(a,null,t.getOption("tabSize")),s=t.findPosH(i,-1,"char",!1);if(a&&!/\S/.test(a)&&l%r==0){var c=new h(i.line,e.findColumn(a,l-r,r));c.ch!=i.ch&&(s=c)}t.replaceRange("",s,i,"+delete")}})},u[f[k+p+"K"]="delLineRight"]=function(e){e.operation(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange("",t[n].anchor,h(t[n].to().line),"+delete");e.scrollIntoView()})},u[f[k+p+"U"]="upcaseAtCursor"]=function(e){l(e,function(e){return e.toUpperCase()})},u[f[k+p+"L"]="downcaseAtCursor"]=function(e){l(e,function(e){return e.toLowerCase()})},u[f[k+p+"Space"]="setSublimeMark"]=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},u[f[k+p+"A"]="selectToSublimeMark"]=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},u[f[k+p+"W"]="deleteToSublimeMark"]=function(t){var n=t.state.sublimeMark&&t.state.sublimeMark.find();if(n){var r=t.getCursor(),o=n;if(e.cmpPos(r,o)>0){var i=o;o=r,r=i}t.state.sublimeKilled=t.getRange(r,o),t.replaceRange("",r,o)}},u[f[k+p+"X"]="swapWithSublimeMark"]=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},u[f[k+p+"Y"]="sublimeYank"]=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},f[k+p+"G"]="clearBookmarks",u[f[k+p+"C"]="showInCenter"]=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)};var L=d?"Ctrl-Shift-":"Ctrl-Alt-";u[f[L+"Up"]="selectLinesUpward"]=function(e){e.operation(function(){for(var t=e.listSelections(),n=0;ne.firstLine()&&e.addSelection(h(r.head.line-1,r.head.ch))}})},u[f[L+"Down"]="selectLinesDownward"]=function(e){e.operation(function(){for(var t=e.listSelections(),n=0;nt.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function d(e){var t=Pi(e.gutters,"CodeMirror-linenumbers");t==-1&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function p(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Ke(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?r:0,docHeight:n,scrollHeight:n+Xe(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}function g(e,t,r){this.cm=r;var n=this.vert=Ki("div",[Ki("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=Ki("div",[Ki("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(n),e(i),Dl(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Dl(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,xo&&Co<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function v(){}function m(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Jl(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Dl(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,r){"horizontal"==r?or(t,e):ir(t,e)},t),t.display.scrollbars.addClass&&es(t.display.wrapper,t.display.scrollbars.addClass)}function y(e,t){t||(t=p(e));var r=e.display.barWidth,n=e.display.barHeight;b(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&O(e),b(e,p(e)),r=e.display.barWidth,n=e.display.barHeight}function b(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}function w(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Ve(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=ni(t,n),l=ni(t,i);if(r&&r.ensure){var s=r.ensure.from.line,a=r.ensure.to.line;s=l&&(o=ni(t,ii(Qn(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function x(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=L(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;l=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Ut(e))return!1;C(e)&&(Ft(e),t.dims=H(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFroml&&r.viewTo-l<20&&(l=Math.min(i,r.viewTo)),Ro&&(o=xn(e.doc,o),l=Cn(e.doc,l));var s=o!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Gt(e,o,l),r.viewOffset=ii(Qn(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var a=Ut(e);if(!s&&0==a&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var u=Yi();return a>4&&(r.lineDiv.style.display="none"),P(e,r.updateLineNumbers,t.dims),a>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,u&&Yi()!=u&&u.offsetHeight&&u.focus(),ji(r.cursorDiv),ji(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,Re(e,400)),r.updateLineNumbers=null,!0}function N(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Ye(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Ke(e.display)-_e(e),r.top)}),t.visible=w(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&M(e,t);n=!1){O(e);var i=p(e);Pe(e),y(e,i),A(e,i)}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 W(e,t){var r=new T(e,t);if(M(e,r)){O(e),N(e,r);var n=p(e);Pe(e),y(e,n),A(e,n),r.finish()}}function A(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+Xe(e)+"px"}function O(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n.001||a<-.001)&&(ti(o.line,i),D(o.line),o.rest))for(var u=0;u-1&&(f=!1),E(e,h,u,r)),f&&(ji(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(S(e.options,u)))),s=h.node.nextSibling}else{var d=V(e,h,u,r);l.insertBefore(d,s)}u+=h.size}for(;s;)s=n(s)}function E(e,t,r,n){for(var i=0;i1)if(Uo&&Uo.text.join("\n")==t){if(n.ranges.length%Uo.text.length==0){a=[];for(var u=0;u=0;u--){var c=n.ranges[u],h=c.from(),f=c.to();c.empty()&&(r&&r>0?h=Bo(h.line,h.ch-r):e.state.overwrite&&!l?f=Bo(f.line,Math.min(Qn(o,f.line).text.length,f.ch+Hi(s).length)):Uo&&Uo.lineWise&&Uo.text.join("\n")==t&&(h=f=Bo(h.line,0)));var d=e.curOp.updateInput,p={from:h,to:f,text:a?a[u%a.length]:s,origin:i||(l?"paste":e.state.cutIncoming?"cut":"+input")};kr(e.doc,p),Ti(e,"inputRead",e,p)}t&&!l&&J(e,t),Fr(e),e.curOp.updateInput=d,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Q(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||At(t,function(){Z(t,r,0,null,"paste")}),!0}function J(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var s=0;s-1){l=Br(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Qn(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=Br(e,i.head.line,"smart"));l&&Ti(e,"electricInput",e,i.head.line)}}}function ee(e){for(var t=[],r=[],n=0;n=0){var l=q(o.from(),i.from()),s=_(o.to(),i.to()),a=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new he(a?s:l,a?l:s))}}return new ce(e,t)}function de(e,t){return new ce([new he(e,t||e)],0)}function pe(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ge(e,t){if(t.liner?Bo(r,Qn(e,r).text.length):ve(t,Qn(e,t.line).text.length)}function ve(e,t){var r=e.ch;return null==r||r>t?Bo(e.line,t):r<0?Bo(e.line,0):e}function me(e,t){return t>=e.first&&t=t.ch:s.to>t.ch))){if(i&&(El(a,"beforeCursorEnter"),a.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!a.atomic)continue;if(r){var u,c=a.find(n<0?1:-1);if((n<0?a.inclusiveRight:a.inclusiveLeft)&&(c=He(e,c,-n,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(u=Go(c,r))&&(n<0?u<0:u>0))return Oe(e,c,t,n,i)}var h=a.find(n<0?-1:1);return(n<0?a.inclusiveLeft:a.inclusiveRight)&&(h=He(e,h,n,h.line==t.line?o:null)),h?Oe(e,h,t,n,i):null}}return t}function De(e,t,r,n,i){var o=n||1,l=Oe(e,t,r,o,i)||!i&&Oe(e,t,r,o,!0)||Oe(e,t,r,-o,i)||!i&&Oe(e,t,r,-o,!0);return l?l:(e.cantEdit=!0,Bo(e.first,0))}function He(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?ge(e,Bo(t.line-1)):null:r>0&&t.ch==(n||Qn(e,t.line)).text.length?t.line=e.display.viewTo||s.to().line3&&(n(d,g.top,null,g.bottom),d=u,g.bottoma.bottom||h.bottom==a.bottom&&h.right>a.right)&&(a=h),d0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Re(e,t){e.doc.mode.startState&&e.doc.frontier=e.display.viewTo)){var r=+new Date+e.options.workTime,n=cl(t.mode,Ue(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var l=o.styles,s=o.text.length>e.options.maxHighlightLength,a=En(e,o,s?cl(t.mode,n):n,!0);o.styles=a.styles;var u=o.styleClasses,c=a.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var h=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),f=0;!h&&fr)return Re(e,e.options.workDelay),!0}),i.length&&At(e,function(){for(var t=0;tl;--s){if(s<=o.first)return o.first;var a=Qn(o,s-1);if(a.stateAfter&&(!r||s<=o.frontier))return s;var u=Ul(a.text,null,e.options.tabSize);(null==i||n>u)&&(i=s-1,n=u)}return i}function Ue(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return!0;var o=Ge(e,t,r),l=o>n.first&&Qn(n,o-1).stateAfter;return l=l?cl(n.mode,l):hl(n.mode),n.iter(o,t,function(r){zn(e,r.text,l);var s=o==t-1||o%5==0||o>=i.viewFrom&&o2&&o.push((a.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function $e(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;nr)return{map:e.measure.maps[n],cache:e.measure.caches[n],before:!0}}function Ze(e,t){t=bn(t);var r=ri(t),n=e.display.externalMeasured=new Pt(e.doc,t,r);n.lineN=r;var i=n.built=Rn(e,n);return n.text=i.pre,Xi(e.display.lineMeasure,i.pre),n}function Qe(e,t,r,n){return tt(e,et(e,t),r,n)}function Je(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&tt)&&(o=u-a,i=o-1,t>=u&&(l="right")),null!=i){if(n=e[s+2],a==u&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;s&&e[s-2]==e[s-3]&&e[s-1].insertLeft;)n=e[(s-=3)+2],l="left";if("right"==r&&i==u-a)for(;s=0&&(r=e[n]).left==r.right;n--);return r}function it(e,t,r,n){var i,o=rt(t.map,r,n),l=o.node,s=o.start,a=o.end,u=o.collapse;if(3==l.nodeType){for(var c=0;c<4;c++){for(;s&&Vi(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+a0&&(u=n="right");var h;i=e.options.lineWrapping&&(h=l.getClientRects()).length>1?h["right"==n?h.length-1:0]:l.getBoundingClientRect()}if(xo&&Co<9&&!s&&(!i||!i.left&&!i.right)){var f=l.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+wt(e.display),top:f.top,bottom:f.bottom}:Xo}for(var d=i.top-t.rect.top,p=i.bottom-t.rect.top,g=(d+p)/2,v=t.view.measure.heights,c=0;cr.from?l(e-1):l(e,n)}n=n||Qn(e.doc,t.line),i||(i=et(e,n));var a=oi(n),u=t.ch;if(!a)return l(u);var c=ho(a,u),h=s(u,c);return null!=as&&(h.other=s(u,as)),h}function gt(e,t){var r=0,t=ge(e.doc,t);e.options.lineWrapping||(r=wt(e.display)*t.ch);var n=Qn(e.doc,t.line),i=ii(n)+Ve(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function vt(e,t,r,n){var i=Bo(e,t);return i.xRel=n,r&&(i.outside=!0),i}function mt(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return vt(n.first,0,!0,-1);var i=ni(n,r),o=n.first+n.size-1;if(i>o)return vt(n.first+n.size-1,Qn(n,o).text.length,!0,1);t<0&&(t=0);for(var l=Qn(n,i);;){var s=yt(e,l,i,t,r),a=mn(l),u=a&&a.find(0,!0);if(!a||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=ri(l=u.to.line)}}function yt(e,t,r,n,i){function o(n){var i=pt(e,Bo(r,n),"line",t,u);return s=!0,l>i.bottom?i.left-a:lv)return vt(r,d,m,1);for(;;){if(c?d==f||d==po(t,f,1):d-f<=1){var y=n0&&y1){var x=tt(e,u,y,"right");l<=x.bottom&&l>=x.top&&Math.abs(n-x.right)1?1:0);return C}var S=Math.ceil(h/2),L=f+S;if(c){L=f;for(var T=0;Tn?(d=L,v=k,(m=s)&&(v+=1e3),h=S):(f=L,p=k,g=s,h-=S)}}function bt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Vo){Vo=Ki("pre");for(var t=0;t<49;++t)Vo.appendChild(document.createTextNode("x")),Vo.appendChild(Ki("br"));Vo.appendChild(document.createTextNode("x"))}Xi(e.measure,Vo);var r=Vo.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),ji(e.measure),r||1}function wt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=Ki("span","xxxxxxxxxx"),r=Ki("pre",[t]);Xi(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function xt(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:++_o},Yo?Yo.ops.push(e.curOp):e.curOp.ownsGroup=Yo={ops:[e.curOp],delayedCallbacks:[]}}function Ct(e){var t=e.delayedCallbacks,r=0;do{for(;r=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new T(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function kt(e){e.updatedDisplay=e.mustUpdate&&M(e.cm,e.update)}function Mt(e){var t=e.cm,r=t.display;e.updatedDisplay&&O(t),e.barMeasure=p(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Qe(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Xe(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Ye(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection(e.focus))}function Nt(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeftt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ro&&xn(e.doc,t)i.viewFrom?Ft(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Ft(e);else if(t<=i.viewFrom){var o=Bt(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Ft(e)}else if(r>=i.viewTo){var o=Bt(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Ft(e)}else{var l=Bt(e,t,t,-1),s=Bt(e,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(Et(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):Ft(e)}var a=i.externalMeasured;a&&(r=i.lineN&&t=n.viewTo)){var o=n.view[Rt(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);Pi(l,r)==-1&&l.push(r)}}}function Ft(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Rt(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var r=e.display.view,n=0;n0){if(o==l.length-1)return null;i=a+l[o].size-t,o++}else i=a-t;t+=i,r+=i}for(;xn(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function Gt(e,t,r){var n=e.display,i=n.view;0==i.length||t>=n.viewTo||r<=n.viewFrom?(n.view=Et(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Et(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,Rt(e,r)))),n.viewTo=r}function Ut(e){for(var t=e.display.view,r=0,n=0;n400}var i=e.display;Dl(i.scroller,"mousedown",Ot(e,_t)),xo&&Co<11?Dl(i.scroller,"dblclick",Ot(e,function(t){if(!Mi(e,t)){var r=Yt(e,t);if(r&&!Jt(e,t)&&!Xt(e.display,t)){Wl(t);var n=e.findWordAt(r);we(e.doc,n.anchor,n.head)}}})):Dl(i.scroller,"dblclick",function(t){Mi(e,t)||Wl(t)}),zo||Dl(i.scroller,"contextmenu",function(t){br(e,t)});var o,l={end:0};Dl(i.scroller,"touchstart",function(t){if(!Mi(e,t)&&!r(t)){clearTimeout(o);var n=+new Date;i.activeTouch={start:n,moved:!1,prev:n-l.end<=300?l:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),Dl(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Dl(i.scroller,"touchend",function(r){var o=i.activeTouch;if(o&&!Xt(i,r)&&null!=o.left&&!o.moved&&new Date-o.start<300){var l,s=e.coordsChar(i.activeTouch,"page");l=!o.prev||n(o,o.prev)?new he(s,s):!o.prev.prev||n(o,o.prev.prev)?e.findWordAt(s):new he(Bo(s.line,0),ge(e.doc,Bo(s.line+1,0))),e.setSelection(l.anchor,l.head),e.focus(),Wl(r)}t()}),Dl(i.scroller,"touchcancel",t),Dl(i.scroller,"scroll",function(){i.scroller.clientHeight&&(ir(e,i.scroller.scrollTop),or(e,i.scroller.scrollLeft,!0),El(e,"scroll",e))}),Dl(i.scroller,"mousewheel",function(t){lr(e,t)}),Dl(i.scroller,"DOMMouseScroll",function(t){lr(e,t)}),Dl(i.wrapper,"scroll",function(){i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Mi(e,t)||Ol(t)},over:function(t){Mi(e,t)||(rr(e,t),Ol(t))},start:function(t){tr(e,t)},drop:Ot(e,er),leave:function(t){Mi(e,t)||nr(e)}};var s=i.input.getField();Dl(s,"keyup",function(t){pr.call(e,t)}),Dl(s,"keydown",Ot(e,fr)),Dl(s,"keypress",Ot(e,gr)),Dl(s,"focus",Bi(mr,e)),Dl(s,"blur",Bi(yr,e))}function Kt(t,r,n){var i=n&&n!=e.Init;if(!r!=!i){var o=t.display.dragFunctions,l=r?Dl:Pl;l(t.display.scroller,"dragstart",o.start),l(t.display.scroller,"dragenter",o.enter),l(t.display.scroller,"dragover",o.over),l(t.display.scroller,"dragleave",o.leave),l(t.display.scroller,"drop",o.drop)}}function jt(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())}function Xt(e,t){for(var r=Ci(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function Yt(e,t,r,n){var i=e.display;if(!r&&"true"==Ci(t).getAttribute("cm-not-content"))return null; +var o,l,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,l=t.clientY-s.top}catch(e){return null}var a,u=mt(e,o,l);if(n&&1==u.xRel&&(a=Qn(e.doc,u.line).text).length==u.ch){var c=Ul(a,a.length,e.options.tabSize)-a.length;u=Bo(u.line,Math.max(0,Math.round((o-je(e.display).left)/wt(e.display))-c))}return u}function _t(e){var t=this,r=t.display;if(!(Mi(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.shift=e.shiftKey,Xt(r,e))return void(So||(r.scroller.draggable=!1,setTimeout(function(){r.scroller.draggable=!0},100)));if(!Jt(t,e)){var n=Yt(t,e);switch(window.focus(),Si(e)){case 1:t.state.selectingText?t.state.selectingText(e):n?qt(t,e,n):Ci(e)==r.scroller&&Wl(e);break;case 2:So&&(t.state.lastMiddleDown=+new Date),n&&we(t.doc,n),setTimeout(function(){r.input.focus()},20),Wl(e);break;case 3:zo?br(t,e):vr(t)}}}}function qt(e,t,r){xo?setTimeout(Bi($,e),0):e.curOp.focus=Yi();var n,i=+new Date;jo&&jo.time>i-400&&0==Go(jo.pos,r)?n="triple":Ko&&Ko.time>i-400&&0==Go(Ko.pos,r)?(n="double",jo={time:i,pos:r}):(n="single",Ko={time:i,pos:r});var o,l=e.doc.sel,s=Do?t.metaKey:t.ctrlKey;e.options.dragDrop&&rs&&!e.isReadOnly()&&"single"==n&&(o=l.contains(r))>-1&&(Go((o=l.ranges[o]).from(),r)<0||r.xRel>0)&&(Go(o.to(),r)>0||r.xRel<0)?$t(e,t,r,s):Zt(e,t,r,n,s)}function $t(e,t,r,n){var i=e.display,o=+new Date,l=Ot(e,function(s){So&&(i.scroller.draggable=!1),e.state.draggingText=!1,Pl(document,"mouseup",l),Pl(i.scroller,"drop",l),Math.abs(t.clientX-s.clientX)+Math.abs(t.clientY-s.clientY)<10&&(Wl(s),!n&&+new Date-200y&&i.push(new he(Bo(p,y),Bo(p,Vl(m,d,o))))}i.length||i.push(new he(r,r)),ke(u,fe(f.ranges.slice(0,h).concat(i),h),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b=c,w=b.anchor,x=t;if("single"!=n){if("double"==n)var C=e.findWordAt(t);else var C=new he(Bo(t.line,0),ge(u,Bo(t.line+1,0)));Go(C.anchor,w)>0?(x=C.head,w=q(b.from(),C.anchor)):(x=C.anchor,w=_(b.to(),C.head))}var i=f.ranges.slice(0);i[h]=new he(ge(u,w),x),ke(u,fe(i,h),Bl)}}function l(t){var r=++y,i=Yt(e,t,!0,"rect"==n);if(i)if(0!=Go(i,v)){e.curOp.focus=Yi(),o(i);var s=w(a,u);(i.line>=s.to||i.linem.bottom?20:0;c&&setTimeout(Ot(e,function(){y==r&&(a.scroller.scrollTop+=c,l(t))}),50)}}function s(t){e.state.selectingText=!1,y=1/0,Wl(t),a.input.focus(),Pl(document,"mousemove",b),Pl(document,"mouseup",x),u.history.lastSelOrigin=null}var a=e.display,u=e.doc;Wl(t);var c,h,f=u.sel,d=f.ranges;if(i&&!t.shiftKey?(h=u.sel.contains(r),c=h>-1?d[h]:new he(r,r)):(c=u.sel.primary(),h=u.sel.primIndex),Ho?t.shiftKey&&t.metaKey:t.altKey)n="rect",i||(c=new he(r,r)),r=Yt(e,t,!0,!0),h=-1;else if("double"==n){var p=e.findWordAt(r);c=e.display.shift||u.extend?be(u,c,p.anchor,p.head):p}else if("triple"==n){var g=new he(Bo(r.line,0),ge(u,Bo(r.line+1,0)));c=e.display.shift||u.extend?be(u,c,g.anchor,g.head):g}else c=be(u,c,r);i?h==-1?(h=d.length,ke(u,fe(d.concat([c]),h),{scroll:!1,origin:"*mouse"})):d.length>1&&d[h].empty()&&"single"==n&&!t.shiftKey?(ke(u,fe(d.slice(0,h).concat(d.slice(h+1)),0),{scroll:!1,origin:"*mouse"}),f=u.sel):Ce(u,h,c,Bl):(h=0,ke(u,new ce([c],0),Bl),f=u.sel);var v=r,m=a.wrapper.getBoundingClientRect(),y=0,b=Ot(e,function(e){Si(e)?l(e):s(e)}),x=Ot(e,s);e.state.selectingText=x,Dl(document,"mousemove",b),Dl(document,"mouseup",x)}function Qt(e,t,r,n){try{var i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Wl(t);var l=e.display,s=l.lineDiv.getBoundingClientRect();if(o>s.bottom||!Wi(e,r))return xi(t);o-=s.top-l.viewOffset;for(var a=0;a=i){var c=ni(e.doc,o),h=e.options.gutters[a];return El(e,r,e,c,h,t),xi(t)}}}function Jt(e,t){return Qt(e,t,"gutterClick",!0)}function er(e){var t=this;if(nr(t),!Mi(t,e)&&!Xt(t.display,e)){Wl(e),xo&&(qo=+new Date);var r=Yt(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),l=0,s=function(e,n){if(!t.options.allowDropFileTypes||Pi(t.options.allowDropFileTypes,e.type)!=-1){var s=new FileReader;s.onload=Ot(t,function(){var e=s.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[n]=e,++l==i){r=ge(t.doc,r);var a={from:r,to:r,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};kr(t.doc,a),Te(t.doc,de(r,tl(a)))}}),s.readAsText(e)}},a=0;a-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&!t.state.draggingText.copy)var u=t.listSelections();if(Me(t.doc,de(r,r)),u)for(var a=0;al.clientWidth,a=l.scrollHeight>l.clientHeight;if(n&&s||i&&a){if(i&&Do&&So)e:for(var u=t.target,c=o.view;u!=l;u=u.parentNode)for(var h=0;h=0;--i)Mr(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text});else Mr(e,t)}}function Mr(e,t){if(1!=t.text.length||""!=t.text[0]||0!=Go(t.from,t.to)){var r=Cr(e,t);ci(e,t,r,e.cm?e.cm.curOp.id:NaN),Ar(e,t,r,ln(e,t));var n=[];$n(e,function(e,r){r||Pi(n,e.history)!=-1||(wi(e.history,t),n.push(e.history)),Ar(e,t,null,ln(e,t))})}}function Nr(e,t,r){if(!e.cm||!e.cm.state.suppressEdits||r){for(var n,i=e.history,o=e.sel,l="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,a=0;a=0;--a){var h=n.changes[a];if(h.origin=t,c&&!Tr(e,h,!1))return void(l.length=0);u.push(si(e,h));var f=a?Cr(e,h):Hi(l);Ar(e,h,f,an(e,h)),!a&&e.cm&&e.cm.scrollIntoView({from:h.from,to:tl(h)});var d=[];$n(e,function(e,t){t||Pi(d,e.history)!=-1||(wi(e.history,h),d.push(e.history)),Ar(e,h,null,an(e,h))})}}}}function Wr(e,t){if(0!=t&&(e.first+=t,e.sel=new ce(Ei(e.sel.ranges,function(e){return new he(Bo(e.anchor.line+t,e.anchor.ch),Bo(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){It(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;ne.lastLine())){if(t.from.lineo&&(t={from:t.from,to:Bo(o,Qn(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Jn(e,t.from,t.to),r||(r=Cr(e,t)),e.cm?Or(e.cm,t,n):Yn(e,t,n),Me(e,r,Rl)}}function Or(e,t,r){var n=e.doc,i=e.display,l=t.from,s=t.to,a=!1,u=l.line;e.options.lineWrapping||(u=ri(bn(Qn(n,l.line))),n.iter(u,s.line+1,function(e){if(e==i.maxLine)return a=!0,!0})),n.sel.contains(t.from,t.to)>-1&&Ni(e),Yn(n,t,r,o(e)),e.options.lineWrapping||(n.iter(u,l.line+t.text.length,function(e){var t=h(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),n.frontier=Math.min(n.frontier,l.line),Re(e,400);var c=t.text.length-(s.line-l.line)-1;t.full?It(e):l.line!=s.line||1!=t.text.length||Xn(e.doc,t)?It(e,l.line,s.line+1,c):zt(e,l.line,"text");var f=Wi(e,"changes"),d=Wi(e,"change");if(d||f){var p={from:l,to:s,text:t.text,removed:t.removed,origin:t.origin};d&&Ti(e,"change",e,p),f&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}function Dr(e,t,r,n,i){if(n||(n=r),Go(n,r)<0){var o=n;n=r,r=o}"string"==typeof t&&(t=e.splitLines(t)),kr(e,{from:r,to:n,text:t,origin:i})}function Hr(e,t){if(!Mi(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!Wo){var o=Ki("div","​",null,"position: absolute; top: "+(t.top-r.viewOffset-Ve(e.display))+"px; height: "+(t.bottom-t.top+Xe(e)+r.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function Pr(e,t,r,n){null==n&&(n=0);for(var i=0;i<5;i++){var o=!1,l=pt(e,t),s=r&&r!=t?pt(e,r):l,a=Ir(e,Math.min(l.left,s.left),Math.min(l.top,s.top)-n,Math.max(l.left,s.left),Math.max(l.bottom,s.bottom)+n),u=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=a.scrollTop&&(ir(e,a.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=a.scrollLeft&&(or(e,a.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(o=!0)),!o)break}return l}function Er(e,t,r,n,i){var o=Ir(e,t,r,n,i);null!=o.scrollTop&&ir(e,o.scrollTop),null!=o.scrollLeft&&or(e,o.scrollLeft)}function Ir(e,t,r,n,i){var o=e.display,l=bt(e.display);r<0&&(r=0);var s=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,a=_e(e),u={};i-r>a&&(i=r+a);var c=e.doc.height+Ke(o),h=rc-l;if(rs+a){var d=Math.min(r,(f?c:i)-a);d!=s&&(u.scrollTop=d)}var p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,g=Ye(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),v=n-t>g;return v&&(n=t+g),t<10?u.scrollLeft=0:tg+p-3&&(u.scrollLeft=n+(v?0:10)-g),u}function zr(e,t,r){null==t&&null==r||Rr(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=r&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+r)}function Fr(e){Rr(e);var t=e.getCursor(),r=t,n=t;e.options.lineWrapping||(r=t.ch?Bo(t.line,t.ch-1):t,n=Bo(t.line,t.ch+1)),e.curOp.scrollToPos={from:r,to:n,margin:e.options.cursorScrollMargin,isCursor:!0}}function Rr(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=gt(e,t.from),n=gt(e,t.to),i=Ir(e,Math.min(r.left,n.left),Math.min(r.top,n.top)-t.margin,Math.max(r.right,n.right),Math.max(r.bottom,n.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function Br(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=Ue(e,t):r="prev");var l=e.options.tabSize,s=Qn(o,t),a=Ul(s.text,null,l);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&(u=o.mode.indent(i,s.text.slice(c.length),s.text),u==Fl||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?Ul(Qn(o,t-1).text,null,l):0:"add"==r?u=a+e.options.indentUnit:"subtract"==r?u=a-e.options.indentUnit:"number"==typeof r&&(u=a+r),u=Math.max(0,u);var h="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/l);d;--d)f+=l,h+="\t";if(f=0;t--)Dr(e.doc,"",n[t].from,n[t].to,"+delete");Fr(e)})}function Vr(e,t,r,n,i){function o(){var t=s+r;return!(t=e.first+e.size)&&(s=t,c=Qn(e,t))}function l(e){var t=(i?po:go)(c,a,r,!0);if(null==t){if(e||!o())return!1;a=i?(r<0?lo:oo)(c):r<0?c.text.length:0}else a=t;return!0}var s=t.line,a=t.ch,u=r,c=Qn(e,s);if("char"==n)l();else if("column"==n)l(!0);else if("word"==n||"group"==n)for(var h=null,f="group"==n,d=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(r<0)||l(!p);p=!1){var g=c.text.charAt(a)||"\n",v=Gi(g,d)?"w":f&&"\n"==g?"n":!f||/\s/.test(g)?null:"p";if(!f||p||v||(v="s"),h&&h!=v){r<0&&(r=1,l());break}if(v&&(h=v),r>0&&!l(!p))break}var m=De(e,Bo(s,a),t,u,!0);return Go(t,m)||(m.hitSide=!0),m}function Kr(e,t,r,n){var i,o=e.doc,l=t.left;if("page"==n){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+r*(s-(r<0?1.5:.5)*bt(e.display))}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;;){var a=mt(e,l,i);if(!a.outside)break;if(r<0?i<=0:i>=o.height){a.hitSide=!0;break}i+=5*r}return a}function jr(t,r,n,i){e.defaults[t]=r,n&&(nl[t]=i?function(e,t,r){r!=il&&n(e,t,r)}:n)}function Xr(e){for(var t,r,n,i,o=e.split(/-(?!$)/),e=o[o.length-1],l=0;l0||0==l&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Ki("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(yn(e,t.line,t,r,o)||t.line!=r.line&&yn(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ro=!0}o.addToHistory&&ci(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,a=t.line,u=e.cm;if(e.iter(a,r.line+1,function(e){u&&o.collapsed&&!u.options.lineWrapping&&bn(e)==u.display.maxLine&&(s=!0),o.collapsed&&a!=t.line&&ti(e,0),rn(e,new Jr(o,a==t.line?t.ch:null,a==r.line?r.ch:null)),++a}),o.collapsed&&e.iter(t.line,r.line+1,function(t){Sn(e,t)&&ti(t,0)}),o.clearOnEnter&&Dl(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(Fo=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++yl,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)It(u,t.line,r.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=r.line;c++)zt(u,c,"text");o.atomic&&We(u.doc),Ti(u,"markerAdded",u,o)}return o}function qr(e,t,r,n,i){n=Ri(n),n.shared=!1;var o=[_r(e,t,r,n,i)],l=o[0],s=n.widgetNode;return $n(e,function(e){s&&(n.widgetNode=s.cloneNode(!0)),o.push(_r(e,ge(e,t),ge(e,r),n,i));for(var a=0;a=t:o.to>t);(n||(n=[])).push(new Jr(l,o.from,a?null:o.to))}}return n}function on(e,t,r){if(e)for(var n,i=0;i=t:o.to>t);if(s||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var a=null==o.from||(l.inclusiveLeft?o.from<=t:o.from0&&s)for(var h=0;h0)){var c=[a,1],h=Go(u.from,s.from),f=Go(u.to,s.to);(h<0||!l.inclusiveLeft&&!h)&&c.push({from:u.from,to:s.from}),(f>0||!l.inclusiveRight&&!f)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.length-1}}return i}function cn(e){var t=e.markedSpans;if(t){for(var r=0;r=0&&h<=0||c<=0&&h>=0)&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?Go(u.to,r)>=0:Go(u.to,r)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?Go(u.from,n)<=0:Go(u.from,n)<0)))return!0}}}function bn(e){for(var t;t=vn(e);)e=t.find(-1,!0).line;return e}function wn(e){for(var t,r;t=mn(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function xn(e,t){var r=Qn(e,t),n=bn(r);return r==n?t:ri(n)}function Cn(e,t){if(t>e.lastLine())return t;var r,n=Qn(e,t);if(!Sn(e,n))return t;for(;r=mn(n);)n=r.find(1,!0).line;return ri(n)+1}function Sn(e,t){var r=Ro&&t.markedSpans;if(r)for(var n,i=0;ir.start)return l}throw new Error("Mode "+t.name+" failed to advance stream.")}function Hn(e,t,r,n){function i(e){return{start:h.start,end:h.pos,string:h.current(),type:o||null,state:e?cl(l.mode,c):c}}var o,l=e.doc,s=l.mode;t=ge(l,t);var a,u=Qn(l,t.line),c=Ue(e,t.line,r),h=new ml(u.text,e.options.tabSize);for(n&&(a=[]);(n||h.pose.options.maxHighlightLength?(s=!1,l&&zn(e,t,n,h.pos),h.pos=t.length,a=null):a=An(Dn(r,h,n,f),o),f){var d=f[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||c!=a){for(;ue&&i.splice(a,1,e,i[a+1],n),a+=2,u=Math.min(e,n)}if(t)if(s.opaque)i.splice(r,a-r,e,"cm-overlay "+t),a=r+2;else for(;re.options.maxHighlightLength?cl(e.doc.mode,n):n);t.stateAfter=n,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.frontier&&e.doc.frontier++}return t.styles}function zn(e,t,r,n){var i=e.doc.mode,o=new ml(t,e.options.tabSize);for(o.start=o.pos=n||0,""==t&&On(i,r);!o.eol();)Dn(i,o,r),o.start=o.pos}function Fn(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Ll:Sl;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Rn(e,t){var r=Ki("span",null,null,So?"padding-right: .1px":null),n={pre:Ki("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(xo||So)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o,l=i?t.rest[i-1]:t.line;n.pos=0,n.addToken=Gn,eo(e.display.measure)&&(o=oi(l))&&(n.addToken=Vn(n.addToken,o)),n.map=[];var s=t!=e.display.externalMeasured&&ri(l);jn(l,n,In(e,l,s)),l.styleClasses&&(l.styleClasses.bgClass&&(n.bgClass=qi(l.styleClasses.bgClass,n.bgClass||"")),l.styleClasses.textClass&&(n.textClass=qi(l.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Ji(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(So){var a=n.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return El(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=qi(n.pre.className,n.textClass||"")),n}function Bn(e){var t=Ki("span","•","cm-invalidchar"); +return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Gn(e,t,r,n,i,o,l){if(t){var s=e.splitSpaces?Un(t,e.trailingSpace):t,a=e.cm.state.specialChars,u=!1;if(a.test(t))for(var c=document.createDocumentFragment(),h=0;;){a.lastIndex=h;var f=a.exec(t),d=f?f.index-h:t.length-h;if(d){var p=document.createTextNode(s.slice(h,h+d));xo&&Co<9?c.appendChild(Ki("span",[p])):c.appendChild(p),e.map.push(e.pos,e.pos+d,p),e.col+=d,e.pos+=d}if(!f)break;if(h+=d+1,"\t"==f[0]){var g=e.cm.options.tabSize,v=g-e.col%g,p=c.appendChild(Ki("span",Di(v),"cm-tab"));p.setAttribute("role","presentation"),p.setAttribute("cm-text","\t"),e.col+=v}else if("\r"==f[0]||"\n"==f[0]){var p=c.appendChild(Ki("span","\r"==f[0]?"␍":"␤","cm-invalidchar"));p.setAttribute("cm-text",f[0]),e.col+=1}else{var p=e.cm.options.specialCharPlaceholder(f[0]);p.setAttribute("cm-text",f[0]),xo&&Co<9?c.appendChild(Ki("span",[p])):c.appendChild(p),e.col+=1}e.map.push(e.pos,e.pos+1,p),e.pos++}else{e.col+=t.length;var c=document.createTextNode(s);e.map.push(e.pos,e.pos+t.length,c),xo&&Co<9&&(u=!0),e.pos+=t.length}if(e.trailingSpace=32==s.charCodeAt(t.length-1),r||n||i||u||l){var m=r||"";n&&(m+=n),i&&(m+=i);var y=Ki("span",[c],m,l);return o&&(y.title=o),e.content.appendChild(y)}e.content.appendChild(c)}}function Un(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;iu&&f.from<=u)break}if(f.to>=c)return e(r,n,i,o,l,s,a);e(r,n.slice(0,f.to-u),i,o,null,s,a),o=null,n=n.slice(f.to-u),u=f.to}}}function Kn(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function jn(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,s,a,u,c,h,f,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){a=u=c=h=s="",f=null,m=1/0;for(var y,b=[],w=0;wp||C.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(a+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(y||(y=[])).push(C.endStyle,x.to),C.title&&!h&&(h=C.title),C.collapsed&&(!f||pn(f.marker,C)<0)&&(f=x)):x.from>p&&m>x.from&&(m=x.from)}if(y)for(var w=0;w=d)break;for(var S=Math.min(d,m);;){if(v){var L=p+v.length;if(!f){var T=L>S?v.slice(0,S-p):v;t.addToken(t,T,l?l+a:a,c,p+T.length==m?u:"",h,s)}if(L>=S){v=v.slice(S-p),p=S;break}p=L,c=""}v=i.slice(o,o=r[g++]),l=Fn(r[g++],t.cm.options)}}else for(var g=1;g1&&e.remove(s.line+1,p-1),e.insert(s.line+1,g)}Ti(e,"change",e,t)}function _n(e){this.lines=e,this.parent=null;for(var t=0,r=0;t=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Hi(e.done)):void 0}function ci(e,t,r,n){var i=e.history;i.undone.length=0;var o,l=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>l-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=ui(i,i.lastOp==n))){var s=Hi(o.changes);0==Go(t.from,t.to)&&0==Go(t.from,s.to)?s.to=tl(t):o.changes.push(si(e,t))}else{var a=Hi(i.done);for(a&&a.ranges||di(e.sel,i.done),o={changes:[si(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(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,s||El(e,"historyAdded")}function hi(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function fi(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||hi(e,o,Hi(i.done),t))?i.done[i.done.length-1]=t:di(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&n.clearRedo!==!1&&ai(i.undone)}function di(e,t){var r=Hi(t);r&&r.ranges&&r.equals(e)||t.push(e)}function pi(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function gi(e){if(!e)return null;for(var t,r=0;r-1&&(Hi(s)[h]=c[h],delete c[h])}}}return i}function yi(e,t,r,n){r0?n.slice():Hl:n||Hl}function Ti(e,t){function r(e){return function(){e.apply(null,o)}}var n=Li(e,t,!1);if(n.length){var i,o=Array.prototype.slice.call(arguments,2);Yo?i=Yo.delayedCallbacks:Il?i=Il:(i=Il=[],setTimeout(ki,0));for(var l=0;l0}function Ai(e){e.prototype.on=function(e,t){Dl(this,e,t)},e.prototype.off=function(e,t){Pl(this,e,t)}}function Oi(){this.id=null}function Di(e){for(;Kl.length<=e;)Kl.push(Hi(Kl)+" ");return Kl[e]}function Hi(e){return e[e.length-1]}function Pi(e,t){for(var r=0;r-1&&_l(e))||t.test(e):_l(e)}function Ui(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function Vi(e){return e.charCodeAt(0)>=768&&ql.test(e)}function Ki(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o0;--t)e.removeChild(e.firstChild);return e}function Xi(e,t){return ji(e).appendChild(t)}function Yi(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function _i(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function qi(e,t){for(var r=e.split(" "),n=0;n2&&!(xo&&Co<8))}var r=Zl?Ki("span","​"):Ki("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function eo(e){if(null!=Ql)return Ql;var t=Xi(e,document.createTextNode("AخA")),r=Xl(t,0,1).getBoundingClientRect(),n=Xl(t,1,2).getBoundingClientRect();return ji(e),!(!r||r.left==r.right)&&(Ql=n.right-r.right<3)}function to(e){if(null!=ls)return ls;var t=Xi(e,Ki("span","x")),r=t.getBoundingClientRect(),n=Xl(t,0,1).getBoundingClientRect();return ls=Math.abs(r.left-n.left)>1}function ro(e,t,r,n){if(!e)return n(t,r,"ltr");for(var i=!1,o=0;ot||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr"),i=!0)}i||n(t,r,"ltr")}function no(e){return e.level%2?e.to:e.from}function io(e){return e.level%2?e.from:e.to}function oo(e){var t=oi(e);return t?no(t[0]):0}function lo(e){var t=oi(e);return t?io(Hi(t)):e.text.length}function so(e,t){var r=Qn(e.doc,t),n=bn(r);n!=r&&(t=ri(n));var i=oi(n),o=i?i[0].level%2?lo(n):oo(n):0;return Bo(t,o)}function ao(e,t){for(var r,n=Qn(e.doc,t);r=mn(n);)n=r.find(1,!0).line,t=null;var i=oi(n),o=i?i[0].level%2?oo(n):lo(n):n.text.length;return Bo(null==t?ri(n):t,o)}function uo(e,t){var r=so(e,t.line),n=Qn(e.doc,r.line),i=oi(n);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),l=t.line==r.line&&t.ch<=o&&t.ch;return Bo(r.line,l?0:o)}return r}function co(e,t,r){var n=e[0].level;return t==n||r!=n&&tt)return n;if(i.from==t||i.to==t){if(null!=r)return co(e,i.level,e[r].level)?(i.from!=i.to&&(as=r),n):(i.from!=i.to&&(as=n),r);r=n}}return r}function fo(e,t,r,n){if(!n)return t+r;do t+=r;while(t>0&&Vi(e.text.charAt(t)));return t}function po(e,t,r,n){var i=oi(e);if(!i)return go(e,t,r,n);for(var o=ho(i,t),l=i[o],s=fo(e,t,l.level%2?-r:r,n);;){if(s>l.from&&s0==l.level%2?l.to:l.from);if(l=i[o+=r],!l)return null;s=r>0==l.level%2?fo(e,l.to,-1,n):fo(e,l.from,1,n)}}function go(e,t,r,n){var i=t+r;if(n)for(;i>0&&Vi(e.text.charAt(i));)i+=r;return i<0||i>e.text.length?null:i}var vo=navigator.userAgent,mo=navigator.platform,yo=/gecko\/\d/i.test(vo),bo=/MSIE \d/.test(vo),wo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(vo),xo=bo||wo,Co=xo&&(bo?document.documentMode||6:wo[1]),So=/WebKit\//.test(vo),Lo=So&&/Qt\/\d+\.\d+/.test(vo),To=/Chrome\//.test(vo),ko=/Opera\//.test(vo),Mo=/Apple Computer/.test(navigator.vendor),No=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(vo),Wo=/PhantomJS/.test(vo),Ao=/AppleWebKit/.test(vo)&&/Mobile\/\w+/.test(vo),Oo=Ao||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(vo),Do=Ao||/Mac/.test(mo),Ho=/\bCrOS\b/.test(vo),Po=/win/i.test(mo),Eo=ko&&vo.match(/Version\/(\d*\.\d*)/);Eo&&(Eo=Number(Eo[1])),Eo&&Eo>=15&&(ko=!1,So=!0);var Io=Do&&(Lo||ko&&(null==Eo||Eo<12.11)),zo=yo||xo&&Co>=9,Fo=!1,Ro=!1;g.prototype=Ri({update:function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n: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=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var e=Do&&!No?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Oi,this.disableVert=new Oi},enableZeroWidthBar:function(e,t){function r(){var n=e.getBoundingClientRect(),i=document.elementFromPoint(n.left+1,n.bottom-1);i!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},g.prototype),v.prototype=Ri({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},v.prototype),e.scrollbarModel={native:g,null:v},T.prototype.signal=function(e,t){Wi(e,t)&&this.events.push(arguments)},T.prototype.finish=function(){for(var e=0;e=9&&r.hasSelection&&(r.hasSelection=null),r.poll()}),Dl(o,"paste",function(e){Mi(n,e)||Q(e,n)||(n.state.pasteIncoming=!0,r.fastPoll())}),Dl(o,"cut",t),Dl(o,"copy",t),Dl(e.scroller,"paste",function(t){Xt(e,t)||Mi(n,t)||(n.state.pasteIncoming=!0,r.focus())}),Dl(e.lineSpace,"selectstart",function(t){Xt(e,t)||Wl(t)}),Dl(o,"compositionstart",function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Dl(o,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,r=e.doc,n=Ee(e);if(e.options.moveInputWithCursor){var i=pt(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},showSelection:function(e){var t=this.cm,r=t.display;Xi(r.cursorDiv,e.cursors),Xi(r.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,r,n=this.cm,i=n.doc;if(n.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=os&&(o.to().line-o.from().line>100||(r=n.getSelection()).length>1e3);var l=t?"-":r||n.getSelection();this.textarea.value=l,n.state.focused&&jl(this.textarea),xo&&Co>=9&&(this.hasSelection=l)}else e||(this.prevInput=this.textarea.value="",xo&&Co>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Oo||Yi()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var n=r.poll();n||t?(r.pollingFast=!1,r.slowPoll()):(t=!0,r.polling.set(60,e))}var t=!1,r=this;r.pollingFast=!0,r.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||is(t)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var n=t.value;if(n==r&&!e.somethingSelected())return!1;if(xo&&Co>=9&&this.hasSelection===n||Do&&/[\uf700-\uf7ff]/.test(n))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=n.charCodeAt(0);if(8203!=i||r||(r="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var o=0,l=Math.min(r.length,n.length);o1e3||n.indexOf("\n")>-1?t.value=s.prevInput="":s.prevInput=n,s.composing&&(s.composing.range.clear(),s.composing.range=e.markText(s.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){xo&&Co>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=l.selectionStart){var e=i.somethingSelected(),t="​"+(e?l.value:"");l.value="⇚",l.value=t,n.prevInput=e?"":"​",l.selectionStart=1,l.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function r(){if(n.contextMenuPending=!1,n.wrapper.style.cssText=h,l.style.cssText=c,xo&&Co<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=a),null!=l.selectionStart){(!xo||xo&&Co<9)&&t();var e=0,r=function(){o.selForContextMenu==i.doc.sel&&0==l.selectionStart&&l.selectionEnd>0&&"​"==n.prevInput?Ot(i,fl.selectAll)(i):e++<10?o.detectingSelectAll=setTimeout(r,500):o.input.reset()};o.detectingSelectAll=setTimeout(r,200)}}var n=this,i=n.cm,o=i.display,l=n.textarea,s=Yt(i,e),a=o.scroller.scrollTop;if(s&&!ko){var u=i.options.resetSelectionOnContextMenu;u&&i.doc.sel.contains(s)==-1&&Ot(i,ke)(i.doc,de(s),Rl);var c=l.style.cssText,h=n.wrapper.style.cssText;n.wrapper.style.cssText="position: absolute";var f=n.wrapper.getBoundingClientRect();if(l.style.cssText="position: absolute; width: 30px; height: 30px; top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px; z-index: 1000; background: "+(xo?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",So)var d=window.scrollY;if(o.input.focus(),So&&window.scrollTo(null,d),o.input.reset(),i.somethingSelected()||(l.value=n.prevInput=" "),n.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),xo&&Co>=9&&t(),zo){Ol(e);var p=function(){Pl(window,"mouseup",p),setTimeout(r,20)};Dl(window,"mouseup",p)}else setTimeout(r,50)}},readOnlyChanged:function(e){e||this.reset()},setUneditable:zi,needsContentAttribute:!1},re.prototype),ie.prototype=Ri({init:function(e){function t(e){if(!Mi(n,e)){if(n.somethingSelected())Uo={lineWise:!1,text:n.getSelections()},"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=ee(n);Uo={lineWise:!0,text:t.text},"cut"==e.type&&n.operation(function(){n.setSelections(t.ranges,0,Rl),n.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var o=Uo.text.join("\n");if(e.clipboardData.setData("Text",o),e.clipboardData.getData("Text")==o)return void e.preventDefault()}var l=ne(),s=l.firstChild;n.display.lineSpace.insertBefore(l,n.display.lineSpace.firstChild),s.value=Uo.text.join("\n");var a=document.activeElement;jl(s),setTimeout(function(){n.display.lineSpace.removeChild(l),a.focus(),a==i&&r.showPrimarySelection()},50)}}var r=this,n=r.cm,i=r.div=e.lineDiv;te(i,n.options.spellcheck),Dl(i,"paste",function(e){Mi(n,e)||Q(e,n)||Co<=11&&setTimeout(Ot(n,function(){r.pollContent()||It(n)}),20)}),Dl(i,"compositionstart",function(e){var t=e.data;if(r.composing={sel:n.doc.sel,data:t,startData:t},t){var i=n.doc.sel.primary(),o=n.getLine(i.head.line),l=o.indexOf(t,Math.max(0,i.head.ch-t.length));l>-1&&l<=i.head.ch&&(r.composing.sel=de(Bo(i.head.line,l),Bo(i.head.line,l+t.length)))}}),Dl(i,"compositionupdate",function(e){r.composing.data=e.data}),Dl(i,"compositionend",function(e){var t=r.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||r.applyComposition(t),r.composing==t&&(r.composing=null)},50))}),Dl(i,"touchstart",function(){r.forceCompositionEnd()}),Dl(i,"input",function(){r.composing||!n.isReadOnly()&&r.pollContent()||At(r.cm,function(){It(n)})}),Dl(i,"copy",t),Dl(i,"cut",t)},prepareSelection:function(){var e=Ee(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),r=se(this.cm,e.anchorNode,e.anchorOffset),n=se(this.cm,e.focusNode,e.focusOffset);if(!r||r.bad||!n||n.bad||0!=Go(q(r,n),t.from())||0!=Go(_(r,n),t.to())){var i=oe(this.cm,t.from()),o=oe(this.cm,t.to());if(i||o){var l=this.cm.display.view,s=e.rangeCount&&e.getRangeAt(0);if(i){if(!o){var a=l[l.length-1].measure,u=a.maps?a.maps[a.maps.length-1]:a.map;o={node:u[u.length-1],offset:u[u.length-2]-u[u.length-3]}}}else i={node:l[0].measure.map[2],offset:0};try{var c=Xl(i.node,i.offset,o.offset,o.node)}catch(e){}c&&(!yo&&this.cm.state.focused?(e.collapse(i.node,i.offset),c.collapsed||e.addRange(c)):(e.removeAllRanges(),e.addRange(c)),s&&null==e.anchorNode?e.addRange(s):yo&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){Xi(this.cm.display.cursorDiv,e.cursors),Xi(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return $l(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():At(this.cm,function(){t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var r=se(t,e.anchorNode,e.anchorOffset),n=se(t,e.focusNode,e.focusOffset);r&&n&&At(t,function(){ke(t.doc,de(r,n),Rl),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(n.linet.viewTo-1)return!1;var o;if(n.line==t.viewFrom||0==(o=Rt(e,n.line)))var l=ri(t.view[0].line),s=t.view[0].node;else var l=ri(t.view[o].line),s=t.view[o-1].node.nextSibling;var a=Rt(e,i.line);if(a==t.view.length-1)var u=t.viewTo-1,c=t.lineDiv.lastChild;else var u=ri(t.view[a+1].line)-1,c=t.view[a+1].node.previousSibling;for(var h=e.doc.splitLines(ue(e,s,c,l,u)),f=Jn(e.doc,Bo(l,0),Bo(u,Qn(e.doc,u).text.length));h.length>1&&f.length>1;)if(Hi(h)==Hi(f))h.pop(),f.pop(),u--;else{if(h[0]!=f[0])break;h.shift(),f.shift(),l++}for(var d=0,p=0,g=h[0],v=f[0],m=Math.min(g.length,v.length);d1||h[0]||Go(x,C)?(Dr(e.doc,h,x,C,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){this.cm.isReadOnly()?Ot(this.cm,It)(this.cm):e.data&&e.data!=e.startData&&Ot(this.cm,Z)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault(),this.cm.isReadOnly()||Ot(this.cm,Z)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:zi,resetPosition:zi,needsContentAttribute:!0},ie.prototype),e.inputStyles={textarea:re,contenteditable:ie},ce.prototype={primary:function(){return this.ranges[this.primIndex]},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=0&&Go(e,n.to())<=0)return r}return-1}},he.prototype={from:function(){return q(this.anchor,this.head)},to:function(){return _(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var Vo,Ko,jo,Xo={left:0,right:0,top:0,bottom:0},Yo=null,_o=0,qo=0,$o=0,Zo=null;xo?Zo=-.53:yo?Zo=15:To?Zo=-.7:Mo&&(Zo=-1/3);var Qo=function(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}};e.wheelEventPixels=function(e){var t=Qo(e);return t.x*=Zo,t.y*=Zo,t};var Jo=new Oi,el=null,tl=e.changeEnd=function(e){return e.text?Bo(e.from.line+e.text.length-1,Hi(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var r=this.options,n=r[e];r[e]==t&&"mode"!=e||(r[e]=t,nl.hasOwnProperty(e)&&Ot(this,nl[e])(this,t,n))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Yr(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;rr&&(Br(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&Fr(this));else{var o=i.from(),l=i.to(),s=Math.max(r,o.line);r=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var a=s;a0&&Ce(this.doc,n,new he(o,u[n].to()),Rl)}}}),getTokenAt:function(e,t){return Hn(this,e,t)},getLineTokens:function(e,t){return Hn(this,Bo(e),t,!0)},getTokenTypeAt:function(e){e=ge(this.doc,e);var t,r=In(this,Qn(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]i&&(e=i,n=!0),r=Qn(this.doc,e)}else r=e;return ht(this,r,{top:0,left:0},t||"page").top+(n?this.doc.height-ii(r):0)},defaultTextHeight:function(){return bt(this.display)},defaultCharWidth:function(){return wt(this.display)},setGutterMarker:Dt(function(e,t,r){return Gr(this.doc,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&Ui(n)&&(e.gutterMarkers=null),!0})}),clearGutter:Dt(function(e){var t=this,r=t.doc,n=r.first;r.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&(r.gutterMarkers[e]=null,zt(t,n,"gutter"),Ui(r.gutterMarkers)&&(r.gutterMarkers=null)),++n})}),lineInfo:function(e){if("number"==typeof e){if(!me(this.doc,e))return null;var t=e;if(e=Qn(this.doc,e),!e)return null}else{var t=ri(e);if(null==t)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}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display;e=pt(this,ge(this.doc,e));var l=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)l=e.top;else if("above"==n||"near"==n){var a=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>a)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=a&&(l=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=l+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),r&&Er(this,s,l,s+t.offsetWidth,l+t.offsetHeight)},triggerOnKeyDown:Dt(fr),triggerOnKeyPress:Dt(gr),triggerOnKeyUp:pr,execCommand:function(e){if(fl.hasOwnProperty(e))return fl[e].call(null,this)},triggerElectric:Dt(function(e){J(this,e)}),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=0,l=ge(this.doc,e);o0&&s(r.charAt(n-1));)--n;for(;i.5)&&l(this),El(this,"refresh",this)}),swapDoc:Dt(function(e){var t=this.doc;return t.cm=null,Zn(this,e),at(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Ti(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}},Ai(e);var rl=e.defaults={},nl=e.optionHandlers={},il=e.Init={toString:function(){return"CodeMirror.Init"}};jr("value","",function(e,t){e.setValue(t)},!0),jr("mode",null,function(e,t){e.doc.modeOption=t,r(e)},!0),jr("indentUnit",2,r,!0),jr("indentWithTabs",!1),jr("smartIndent",!0),jr("tabSize",4,function(e){n(e),at(e),It(e)},!0),jr("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(o==-1)break;i=o+t.length,r.push(Bo(n,o))}n++});for(var i=r.length-1;i>=0;i--)Dr(e.doc,t,r[i],Bo(r[i].line,r[i].ch+t.length))}}),jr("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,r,n){t.state.specialChars=new RegExp(r.source+(r.test("\t")?"":"|\t"),"g"),n!=e.Init&&t.refresh()}),jr("specialCharPlaceholder",Bn,function(e){e.refresh()},!0),jr("electricChars",!0),jr("inputStyle",Oo?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),jr("spellcheck",!1,function(e,t){e.getInputField().spellcheck=t},!0),jr("rtlMoveVisually",!Po),jr("wholeLineUpdateBefore",!0),jr("theme","default",function(e){s(e),a(e)},!0),jr("keyMap","default",function(t,r,n){var i=Yr(r),o=n!=e.Init&&Yr(n);o&&o.detach&&o.detach(t,i),i.attach&&i.attach(t,o||null)}),jr("extraKeys",null),jr("lineWrapping",!1,i,!0),jr("gutters",[],function(e){d(e.options),a(e)},!0),jr("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?L(e.display)+"px":"0",e.refresh()},!0),jr("coverGutterNextToScrollbar",!1,function(e){y(e)},!0),jr("scrollbarStyle","native",function(e){m(e),y(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),jr("lineNumbers",!1,function(e){d(e.options),a(e)},!0),jr("firstLineNumber",1,a,!0),jr("lineNumberFormatter",function(e){return e},a,!0),jr("showCursorWhenSelecting",!1,Pe,!0),jr("resetSelectionOnContextMenu",!0),jr("lineWiseCopyCut",!0),jr("readOnly",!1,function(e,t){"nocursor"==t?(yr(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),jr("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),jr("dragDrop",!0,Kt),jr("allowDropFileTypes",null),jr("cursorBlinkRate",530),jr("cursorScrollMargin",0),jr("cursorHeight",1,Pe,!0),jr("singleCursorHeightPerLine",!0,Pe,!0),jr("workTime",100),jr("workDelay",100),jr("flattenSpans",!0,n,!0),jr("addModeClass",!1,n,!0),jr("pollInterval",100),jr("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),jr("historyEventDelay",1250),jr("viewportMargin",10,function(e){e.refresh()},!0),jr("maxHighlightLength",1e4,n,!0),jr("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),jr("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),jr("autofocus",null);var ol=e.modes={},ll=e.mimeModes={};e.defineMode=function(t,r){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),ol[t]=r},e.defineMIME=function(e,t){ll[e]=t},e.resolveMode=function(t){if("string"==typeof t&&ll.hasOwnProperty(t))t=ll[t];else if(t&&"string"==typeof t.name&&ll.hasOwnProperty(t.name)){var r=ll[t.name];"string"==typeof r&&(r={name:r}),t=Fi(r,t),t.name=r.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return e.resolveMode("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,r){var r=e.resolveMode(r),n=ol[r.name];if(!n)return e.getMode(t,"text/plain");var i=n(t,r);if(sl.hasOwnProperty(r.name)){var o=sl[r.name];for(var l in o)o.hasOwnProperty(l)&&(i.hasOwnProperty(l)&&(i["_"+l]=i[l]),i[l]=o[l])}if(i.name=r.name,r.helperType&&(i.helperType=r.helperType),r.modeProps)for(var l in r.modeProps)i[l]=r.modeProps[l];return i},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var sl=e.modeExtensions={};e.extendMode=function(e,t){var r=sl.hasOwnProperty(e)?sl[e]:sl[e]={};Ri(t,r)},e.defineExtension=function(t,r){e.prototype[t]=r},e.defineDocExtension=function(e,t){kl.prototype[e]=t},e.defineOption=jr;var al=[];e.defineInitHook=function(e){al.push(e)};var ul=e.helpers={};e.registerHelper=function(t,r,n){ul.hasOwnProperty(t)||(ul[t]=e[t]={_global:[]}),ul[t][r]=n},e.registerGlobalHelper=function(t,r,n,i){e.registerHelper(t,r,i),ul[t]._global.push({pred:n,val:i})};var cl=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r},hl=e.startState=function(e,t,r){return!e.startState||e.startState(t,r)};e.innerMode=function(e,t){for(;e.innerMode;){var r=e.innerMode(t);if(!r||r.mode==e)break;t=r.state,e=r.mode}return r||{mode:e,state:t}};var fl=e.commands={selectAll:function(e){e.setSelection(Bo(e.firstLine(),0),Bo(e.lastLine()),Rl)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Rl)},killLine:function(e){Ur(e,function(t){if(t.empty()){var r=Qn(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line0)i=new Bo(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),Bo(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=Qn(e.doc,i.line-1).text;l&&e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),Bo(i.line-1,l.length-1),Bo(i.line,1),"+transpose")}r.push(new he(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){At(e,function(){for(var t=e.listSelections().length,r=0;r=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos0?null:(n&&t!==!1&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(i(o)==i(e))return t!==!1&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var yl=0,bl=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++yl};Ai(bl),bl.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&xt(e),Wi(this,"clear")){var r=this.find();r&&Ti(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=a,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&It(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&We(e.doc)),e&&Ti(e,"markerCleared",e,this),t&&St(e),this.parent&&this.parent.clear()}},bl.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var r,n,i=0;i1||!(this.children[0]instanceof _n))){var s=[];this.collapse(s),this.children=[new _n(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,s=l;s10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n=0;o--)kr(this,n[o]);s?Te(this,s):this.cm&&Fr(this.cm)}),undo:Ht(function(){Nr(this,"undo")}),redo:Ht(function(){Nr(this,"redo")}),undoSelection:Ht(function(){Nr(this,"undo",!0)}),redoSelection:Ht(function(){Nr(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=ge(this,e),t=ge(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var s=0;s=a.to||null==a.from&&i!=e.line||null!=a.from&&i==t.line&&a.from>=t.ch||r&&!r(a.marker)||n.push(a.marker.parent||a.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;ne?(t=e,!0):(e-=o,void++r)}),ge(this,Bo(r,t))},indexFromPos:function(e){e=ge(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.to=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}},Vl=e.findColumn=function(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);o==-1&&(o=e.length);var l=o-n;if(o==e.length||i+l>=t)return n+Math.min(l,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}},Kl=[""],jl=function(e){e.select()};Ao?jl=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:xo&&(jl=function(e){try{e.select()}catch(e){}});var Xl,Yl=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,_l=e.isWordChar=function(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Yl.test(e))},ql=/[\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]/;Xl=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var $l=e.contains=function(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)};xo&&Co<11&&(Yi=function(){try{return document.activeElement}catch(e){return document.body}});var Zl,Ql,Jl=e.rmClass=function(e,t){var r=e.className,n=_i(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}},es=e.addClass=function(e,t){var r=e.className;_i(t).test(r)||(e.className+=(r?" ":"")+t)},ts=!1,rs=function(){if(xo&&Co<9)return!1;var e=Ki("div");return"draggable"in e||"dragDrop"in e}(),ns=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);i==-1&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");l!=-1?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},is=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},os=function(){var e=Ki("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),ls=null,ss=e.keyNames={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"};!function(){for(var e=0;e<10;e++)ss[e+48]=ss[e+96]=String(e);for(var e=65;e<=90;e++)ss[e]=String.fromCharCode(e);for(var e=1;e<=12;e++)ss[e+111]=ss[e+63235]="F"+e}();var as,us=function(){function e(e){return e<=247?r.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1773?n.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,r){this.level=e,this.from=t,this.to=r}var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,l=/[LRr]/,s=/[Lb1n]/,a=/[1n]/,u="L";return function(r){if(!i.test(r))return!1;for(var n,c=r.length,h=[],f=0;f0){var c=e[0];l=c&&c.loc&&c.loc.source}var u=o;!u&&e&&(u=e.map(function(r){return r.loc&&r.loc.start}).filter(Boolean)),u&&0===u.length&&(u=void 0);var n=void 0;l&&u&&(n=u.map(function(r){return(0,_language.getLocation)(l,r)})),Object.defineProperties(this,{message:{value:r,enumerable:!0,writable:!0},locations:{value:n||void 0,enumerable:!0},path:{value:t||void 0,enumerable:!0},nodes:{value:e||void 0},source:{value:l||void 0},positions:{value:u||void 0},originalError:{value:i}})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.GraphQLError=GraphQLError;var _language=require("../language");GraphQLError.prototype=Object.create(Error.prototype,{constructor:{value:GraphQLError},name:{value:"GraphQLError"}})},{"../language":63}],47:[function(require,module,exports){"use strict";function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function formatError(r){return(0,_invariant2.default)(r,"Received null or undefined error."),{message:r.message,locations:r.locations}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatError=formatError;var _invariant=require("../jsutils/invariant"),_invariant2=_interopRequireDefault(_invariant)},{"../jsutils/invariant":57}],48:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _GraphQLError=require("./GraphQLError");Object.defineProperty(exports,"GraphQLError",{enumerable:!0,get:function(){return _GraphQLError.GraphQLError}});var _syntaxError=require("./syntaxError");Object.defineProperty(exports,"syntaxError",{enumerable:!0,get:function(){return _syntaxError.syntaxError}});var _locatedError=require("./locatedError");Object.defineProperty(exports,"locatedError",{enumerable:!0,get:function(){return _locatedError.locatedError}});var _formatError=require("./formatError");Object.defineProperty(exports,"formatError",{enumerable:!0,get:function(){return _formatError.formatError}})},{"./GraphQLError":46,"./formatError":47,"./locatedError":49,"./syntaxError":50}],49:[function(require,module,exports){"use strict";function locatedError(r,e,o){if(r&&r.locations)return r;var t=r?r.message||String(r):"An unknown error occurred.";return new _GraphQLError.GraphQLError(t,e,void 0,void 0,o,r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.locatedError=locatedError;var _GraphQLError=require("./GraphQLError")},{"./GraphQLError":46}],50:[function(require,module,exports){"use strict";function syntaxError(r,n,o){var t=(0,_location.getLocation)(r,n),e=new _GraphQLError.GraphQLError("Syntax Error "+r.name+" ("+t.line+":"+t.column+") "+o+"\n\n"+highlightSourceAtLocation(r,t),void 0,r,[n]);return e}function highlightSourceAtLocation(r,n){var o=n.line,t=(o-1).toString(),e=o.toString(),a=(o+1).toString(),i=a.length,l=r.body.split(/\r\n|[\n\r]/g);return(o>=2?lpad(i,t)+": "+l[o-2]+"\n":"")+lpad(i,e)+": "+l[o-1]+"\n"+Array(2+i+n.column).join(" ")+"^\n"+(o0?{errors:s}:(0,_execute.execute)(e,o,a,t,u,i))}).catch(function(e){return{errors:[e]}})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.graphql=graphql;var _source=require("./language/source"),_parser=require("./language/parser"),_validate=require("./validation/validate"),_execute=require("./execution/execute")},{"./execution/execute":51,"./language/parser":67,"./language/source":69,"./validation/validate":120}],55:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _graphql=require("./graphql");Object.defineProperty(exports,"graphql",{enumerable:!0,get:function(){return _graphql.graphql}});var _type=require("./type");Object.defineProperty(exports,"GraphQLSchema",{enumerable:!0,get:function(){return _type.GraphQLSchema}}),Object.defineProperty(exports,"GraphQLScalarType",{enumerable:!0,get:function(){return _type.GraphQLScalarType}}),Object.defineProperty(exports,"GraphQLObjectType",{enumerable:!0,get:function(){return _type.GraphQLObjectType}}),Object.defineProperty(exports,"GraphQLInterfaceType",{enumerable:!0,get:function(){return _type.GraphQLInterfaceType}}),Object.defineProperty(exports,"GraphQLUnionType",{enumerable:!0,get:function(){return _type.GraphQLUnionType}}),Object.defineProperty(exports,"GraphQLEnumType",{enumerable:!0,get:function(){return _type.GraphQLEnumType}}),Object.defineProperty(exports,"GraphQLInputObjectType",{enumerable:!0,get:function(){return _type.GraphQLInputObjectType}}),Object.defineProperty(exports,"GraphQLList",{enumerable:!0,get:function(){return _type.GraphQLList; +}}),Object.defineProperty(exports,"GraphQLNonNull",{enumerable:!0,get:function(){return _type.GraphQLNonNull}}),Object.defineProperty(exports,"GraphQLDirective",{enumerable:!0,get:function(){return _type.GraphQLDirective}}),Object.defineProperty(exports,"TypeKind",{enumerable:!0,get:function(){return _type.TypeKind}}),Object.defineProperty(exports,"DirectiveLocation",{enumerable:!0,get:function(){return _type.DirectiveLocation}}),Object.defineProperty(exports,"GraphQLInt",{enumerable:!0,get:function(){return _type.GraphQLInt}}),Object.defineProperty(exports,"GraphQLFloat",{enumerable:!0,get:function(){return _type.GraphQLFloat}}),Object.defineProperty(exports,"GraphQLString",{enumerable:!0,get:function(){return _type.GraphQLString}}),Object.defineProperty(exports,"GraphQLBoolean",{enumerable:!0,get:function(){return _type.GraphQLBoolean}}),Object.defineProperty(exports,"GraphQLID",{enumerable:!0,get:function(){return _type.GraphQLID}}),Object.defineProperty(exports,"specifiedDirectives",{enumerable:!0,get:function(){return _type.specifiedDirectives}}),Object.defineProperty(exports,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return _type.GraphQLIncludeDirective}}),Object.defineProperty(exports,"GraphQLSkipDirective",{enumerable:!0,get:function(){return _type.GraphQLSkipDirective}}),Object.defineProperty(exports,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return _type.GraphQLDeprecatedDirective}}),Object.defineProperty(exports,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return _type.DEFAULT_DEPRECATION_REASON}}),Object.defineProperty(exports,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return _type.SchemaMetaFieldDef}}),Object.defineProperty(exports,"TypeMetaFieldDef",{enumerable:!0,get:function(){return _type.TypeMetaFieldDef}}),Object.defineProperty(exports,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return _type.TypeNameMetaFieldDef}}),Object.defineProperty(exports,"__Schema",{enumerable:!0,get:function(){return _type.__Schema}}),Object.defineProperty(exports,"__Directive",{enumerable:!0,get:function(){return _type.__Directive}}),Object.defineProperty(exports,"__DirectiveLocation",{enumerable:!0,get:function(){return _type.__DirectiveLocation}}),Object.defineProperty(exports,"__Type",{enumerable:!0,get:function(){return _type.__Type}}),Object.defineProperty(exports,"__Field",{enumerable:!0,get:function(){return _type.__Field}}),Object.defineProperty(exports,"__InputValue",{enumerable:!0,get:function(){return _type.__InputValue}}),Object.defineProperty(exports,"__EnumValue",{enumerable:!0,get:function(){return _type.__EnumValue}}),Object.defineProperty(exports,"__TypeKind",{enumerable:!0,get:function(){return _type.__TypeKind}}),Object.defineProperty(exports,"isType",{enumerable:!0,get:function(){return _type.isType}}),Object.defineProperty(exports,"isInputType",{enumerable:!0,get:function(){return _type.isInputType}}),Object.defineProperty(exports,"isOutputType",{enumerable:!0,get:function(){return _type.isOutputType}}),Object.defineProperty(exports,"isLeafType",{enumerable:!0,get:function(){return _type.isLeafType}}),Object.defineProperty(exports,"isCompositeType",{enumerable:!0,get:function(){return _type.isCompositeType}}),Object.defineProperty(exports,"isAbstractType",{enumerable:!0,get:function(){return _type.isAbstractType}}),Object.defineProperty(exports,"getNullableType",{enumerable:!0,get:function(){return _type.getNullableType}}),Object.defineProperty(exports,"getNamedType",{enumerable:!0,get:function(){return _type.getNamedType}});var _language=require("./language");Object.defineProperty(exports,"Source",{enumerable:!0,get:function(){return _language.Source}}),Object.defineProperty(exports,"getLocation",{enumerable:!0,get:function(){return _language.getLocation}}),Object.defineProperty(exports,"parse",{enumerable:!0,get:function(){return _language.parse}}),Object.defineProperty(exports,"parseValue",{enumerable:!0,get:function(){return _language.parseValue}}),Object.defineProperty(exports,"print",{enumerable:!0,get:function(){return _language.print}}),Object.defineProperty(exports,"visit",{enumerable:!0,get:function(){return _language.visit}}),Object.defineProperty(exports,"visitInParallel",{enumerable:!0,get:function(){return _language.visitInParallel}}),Object.defineProperty(exports,"visitWithTypeInfo",{enumerable:!0,get:function(){return _language.visitWithTypeInfo}}),Object.defineProperty(exports,"Kind",{enumerable:!0,get:function(){return _language.Kind}}),Object.defineProperty(exports,"TokenKind",{enumerable:!0,get:function(){return _language.TokenKind}}),Object.defineProperty(exports,"BREAK",{enumerable:!0,get:function(){return _language.BREAK}});var _execution=require("./execution");Object.defineProperty(exports,"execute",{enumerable:!0,get:function(){return _execution.execute}});var _validation=require("./validation");Object.defineProperty(exports,"validate",{enumerable:!0,get:function(){return _validation.validate}}),Object.defineProperty(exports,"specifiedRules",{enumerable:!0,get:function(){return _validation.specifiedRules}});var _error=require("./error");Object.defineProperty(exports,"GraphQLError",{enumerable:!0,get:function(){return _error.GraphQLError}}),Object.defineProperty(exports,"formatError",{enumerable:!0,get:function(){return _error.formatError}});var _utilities=require("./utilities");Object.defineProperty(exports,"introspectionQuery",{enumerable:!0,get:function(){return _utilities.introspectionQuery}}),Object.defineProperty(exports,"getOperationAST",{enumerable:!0,get:function(){return _utilities.getOperationAST}}),Object.defineProperty(exports,"buildClientSchema",{enumerable:!0,get:function(){return _utilities.buildClientSchema}}),Object.defineProperty(exports,"buildASTSchema",{enumerable:!0,get:function(){return _utilities.buildASTSchema}}),Object.defineProperty(exports,"buildSchema",{enumerable:!0,get:function(){return _utilities.buildSchema}}),Object.defineProperty(exports,"extendSchema",{enumerable:!0,get:function(){return _utilities.extendSchema}}),Object.defineProperty(exports,"printSchema",{enumerable:!0,get:function(){return _utilities.printSchema}}),Object.defineProperty(exports,"typeFromAST",{enumerable:!0,get:function(){return _utilities.typeFromAST}}),Object.defineProperty(exports,"valueFromAST",{enumerable:!0,get:function(){return _utilities.valueFromAST}}),Object.defineProperty(exports,"astFromValue",{enumerable:!0,get:function(){return _utilities.astFromValue}}),Object.defineProperty(exports,"TypeInfo",{enumerable:!0,get:function(){return _utilities.TypeInfo}}),Object.defineProperty(exports,"isValidJSValue",{enumerable:!0,get:function(){return _utilities.isValidJSValue}}),Object.defineProperty(exports,"isValidLiteralValue",{enumerable:!0,get:function(){return _utilities.isValidLiteralValue}}),Object.defineProperty(exports,"concatAST",{enumerable:!0,get:function(){return _utilities.concatAST}}),Object.defineProperty(exports,"separateOperations",{enumerable:!0,get:function(){return _utilities.separateOperations}}),Object.defineProperty(exports,"isEqualType",{enumerable:!0,get:function(){return _utilities.isEqualType}}),Object.defineProperty(exports,"isTypeSubTypeOf",{enumerable:!0,get:function(){return _utilities.isTypeSubTypeOf}}),Object.defineProperty(exports,"doTypesOverlap",{enumerable:!0,get:function(){return _utilities.doTypesOverlap}}),Object.defineProperty(exports,"assertValidName",{enumerable:!0,get:function(){return _utilities.assertValidName}})},{"./error":48,"./execution":52,"./graphql":54,"./language":63,"./type":73,"./utilities":85,"./validation":94}],56:[function(require,module,exports){"use strict";function find(e,t){for(var r=0;r2?", ":" ")+(u===t.length-1?"or ":"")+r})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=quotedOrList;var MAX_LENGTH=5},{}],62:[function(require,module,exports){"use strict";function suggestionList(t,e){for(var n=Object.create(null),r=e.length,i=t.length/2,o=0;o1&&r>1&&t[n-1]===e[r-2]&&t[n-2]===e[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+s))}return i[o][a]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=suggestionList},{}],63:[function(require,module,exports){"use strict";function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r}Object.defineProperty(exports,"__esModule",{value:!0}),exports.BREAK=exports.visitWithTypeInfo=exports.visitInParallel=exports.visit=exports.Source=exports.print=exports.parseValue=exports.parse=exports.TokenKind=exports.createLexer=exports.Kind=exports.getLocation=void 0;var _location=require("./location");Object.defineProperty(exports,"getLocation",{enumerable:!0,get:function(){return _location.getLocation}});var _lexer=require("./lexer");Object.defineProperty(exports,"createLexer",{enumerable:!0,get:function(){return _lexer.createLexer}}),Object.defineProperty(exports,"TokenKind",{enumerable:!0,get:function(){return _lexer.TokenKind}});var _parser=require("./parser");Object.defineProperty(exports,"parse",{enumerable:!0,get:function(){return _parser.parse}}),Object.defineProperty(exports,"parseValue",{enumerable:!0,get:function(){return _parser.parseValue}});var _printer=require("./printer");Object.defineProperty(exports,"print",{enumerable:!0,get:function(){return _printer.print}});var _source=require("./source");Object.defineProperty(exports,"Source",{enumerable:!0,get:function(){return _source.Source}});var _visitor=require("./visitor");Object.defineProperty(exports,"visit",{enumerable:!0,get:function(){return _visitor.visit}}),Object.defineProperty(exports,"visitInParallel",{enumerable:!0,get:function(){return _visitor.visitInParallel}}),Object.defineProperty(exports,"visitWithTypeInfo",{enumerable:!0,get:function(){return _visitor.visitWithTypeInfo}}),Object.defineProperty(exports,"BREAK",{enumerable:!0,get:function(){return _visitor.BREAK}});var _kinds=require("./kinds"),Kind=_interopRequireWildcard(_kinds);exports.Kind=Kind},{"./kinds":64,"./lexer":65,"./location":66,"./parser":67,"./printer":68,"./source":69,"./visitor":70}],64:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.NAME="Name",exports.DOCUMENT="Document",exports.OPERATION_DEFINITION="OperationDefinition",exports.VARIABLE_DEFINITION="VariableDefinition",exports.VARIABLE="Variable",exports.SELECTION_SET="SelectionSet",exports.FIELD="Field",exports.ARGUMENT="Argument",exports.FRAGMENT_SPREAD="FragmentSpread",exports.INLINE_FRAGMENT="InlineFragment",exports.FRAGMENT_DEFINITION="FragmentDefinition",exports.INT="IntValue",exports.FLOAT="FloatValue",exports.STRING="StringValue",exports.BOOLEAN="BooleanValue",exports.ENUM="EnumValue",exports.LIST="ListValue",exports.OBJECT="ObjectValue",exports.OBJECT_FIELD="ObjectField",exports.DIRECTIVE="Directive",exports.NAMED_TYPE="NamedType",exports.LIST_TYPE="ListType",exports.NON_NULL_TYPE="NonNullType",exports.SCHEMA_DEFINITION="SchemaDefinition",exports.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",exports.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",exports.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",exports.FIELD_DEFINITION="FieldDefinition",exports.INPUT_VALUE_DEFINITION="InputValueDefinition",exports.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",exports.UNION_TYPE_DEFINITION="UnionTypeDefinition",exports.ENUM_TYPE_DEFINITION="EnumTypeDefinition",exports.ENUM_VALUE_DEFINITION="EnumValueDefinition",exports.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",exports.TYPE_EXTENSION_DEFINITION="TypeExtensionDefinition",exports.DIRECTIVE_DEFINITION="DirectiveDefinition"},{}],65:[function(require,module,exports){"use strict";function createLexer(e,r){var a=new Tok(SOF,0,0,0,0,null),c={source:e,options:r,lastToken:a,token:a,line:1,lineStart:0,advance:advanceLexer};return c}function advanceLexer(){var e=this.lastToken=this.token;if(e.kind!==EOF){do e=e.next=readToken(this,e);while(e.kind===COMMENT);this.token=e}return e}function getTokenDesc(e){var r=e.value;return r?e.kind+' "'+r+'"':e.kind}function Tok(e,r,a,c,t,n,o){this.kind=e,this.start=r,this.end=a,this.line=c,this.column=t,this.value=o,this.prev=n,this.next=null}function printCharCode(e){return isNaN(e)?EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'+("00"+e.toString(16).toUpperCase()).slice(-4)+'"'}function readToken(e,r){var a=e.source,c=a.body,t=c.length,n=positionAfterWhitespace(c,r.end,e),o=e.line,s=1+n-e.lineStart;if(n>=t)return new Tok(EOF,t,t,o,s,r);var i=charCodeAt.call(c,n);if(i<32&&9!==i&&10!==i&&13!==i)throw(0,_error.syntaxError)(a,n,"Invalid character "+printCharCode(i)+".");switch(i){case 33:return new Tok(BANG,n,n+1,o,s,r);case 35:return readComment(a,n,o,s,r);case 36:return new Tok(DOLLAR,n,n+1,o,s,r);case 40:return new Tok(PAREN_L,n,n+1,o,s,r);case 41:return new Tok(PAREN_R,n,n+1,o,s,r);case 46:if(46===charCodeAt.call(c,n+1)&&46===charCodeAt.call(c,n+2))return new Tok(SPREAD,n,n+3,o,s,r);break;case 58:return new Tok(COLON,n,n+1,o,s,r);case 61:return new Tok(EQUALS,n,n+1,o,s,r);case 64:return new Tok(AT,n,n+1,o,s,r);case 91:return new Tok(BRACKET_L,n,n+1,o,s,r);case 93:return new Tok(BRACKET_R,n,n+1,o,s,r);case 123:return new Tok(BRACE_L,n,n+1,o,s,r);case 124:return new Tok(PIPE,n,n+1,o,s,r);case 125:return new Tok(BRACE_R,n,n+1,o,s,r);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return readName(a,n,o,s,r);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return readNumber(a,n,i,o,s,r);case 34:return readString(a,n,o,s,r)}throw(0,_error.syntaxError)(a,n,"Unexpected character "+printCharCode(i)+".")}function positionAfterWhitespace(e,r,a){for(var c=e.length,t=r;t31||9===o));return new Tok(COMMENT,r,s,a,c,t,slice.call(n,r+1,s))}function readNumber(e,r,a,c,t,n){var o=e.body,s=a,i=r,l=!1;if(45===s&&(s=charCodeAt.call(o,++i)),48===s){if(s=charCodeAt.call(o,++i),s>=48&&s<=57)throw(0,_error.syntaxError)(e,i,"Invalid number, unexpected digit after 0: "+printCharCode(s)+".")}else i=readDigits(e,i,s),s=charCodeAt.call(o,i);return 46===s&&(l=!0,s=charCodeAt.call(o,++i),i=readDigits(e,i,s),s=charCodeAt.call(o,i)),69!==s&&101!==s||(l=!0,s=charCodeAt.call(o,++i),43!==s&&45!==s||(s=charCodeAt.call(o,++i)),i=readDigits(e,i,s)),new Tok(l?FLOAT:INT,r,i,c,t,n,slice.call(o,r,i))}function readDigits(e,r,a){var c=e.body,t=r,n=a;if(n>=48&&n<=57){do n=charCodeAt.call(c,++t);while(n>=48&&n<=57);return t}throw(0,_error.syntaxError)(e,t,"Invalid number, expected digit but got: "+printCharCode(n)+".")}function readString(e,r,a,c,t){for(var n=e.body,o=r+1,s=o,i=0,l="";o=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function readName(e,r,a,c,t){for(var n=e.body,o=n.length,s=r+1,i=0;s!==o&&null!==(i=charCodeAt.call(n,s))&&(95===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122);)++s;return new Tok(NAME,r,s,a,c,t,slice.call(n,r,s))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.TokenKind=void 0,exports.createLexer=createLexer,exports.getTokenDesc=getTokenDesc;var _error=require("../error"),SOF="",EOF="",BANG="!",DOLLAR="$",PAREN_L="(",PAREN_R=")",SPREAD="...",COLON=":",EQUALS="=",AT="@",BRACKET_L="[",BRACKET_R="]",BRACE_L="{",PIPE="|",BRACE_R="}",NAME="Name",INT="Int",FLOAT="Float",STRING="String",COMMENT="Comment",charCodeAt=(exports.TokenKind={SOF:SOF,EOF:EOF,BANG:BANG,DOLLAR:DOLLAR,PAREN_L:PAREN_L,PAREN_R:PAREN_R,SPREAD:SPREAD,COLON:COLON,EQUALS:EQUALS,AT:AT,BRACKET_L:BRACKET_L,BRACKET_R:BRACKET_R,BRACE_L:BRACE_L,PIPE:PIPE,BRACE_R:BRACE_R,NAME:NAME,INT:INT,FLOAT:FLOAT,STRING:STRING,COMMENT:COMMENT},String.prototype.charCodeAt),slice=String.prototype.slice;Tok.prototype.toJSON=Tok.prototype.inspect=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},{"../error":48}],66:[function(require,module,exports){"use strict";function getLocation(e,o){for(var t=/\r\n|[\n\r]/g,n=1,r=o+1,i=void 0;(i=t.exec(e.body))&&i.index0,e.name+" fields must be an object with field names as keys or a function which returns such an object.");var i={};return a.forEach(function(t){(0,_assertValidName.assertValidName)(t);var a=n[t],r=_extends({},a,{name:t});(0,_invariant2.default)(!r.hasOwnProperty("isDeprecated"),e.name+"."+t+' should provide "deprecationReason" instead of "isDeprecated".'),(0,_invariant2.default)(isOutputType(r.type),e.name+"."+t+" field type must be Output Type but "+("got: "+String(r.type)+"."));var s=a.args;s?((0,_invariant2.default)(isPlainObj(s),e.name+"."+t+" args must be an object with argument names as keys."),r.args=Object.keys(s).map(function(n){(0,_assertValidName.assertValidName)(n);var a=s[n];return(0,_invariant2.default)(isInputType(a.type),e.name+"."+t+"("+n+":) argument type must be "+("Input Type but got: "+String(a.type)+".")),{name:n,description:void 0===a.description?null:a.description,type:a.type,defaultValue:void 0===a.defaultValue?null:a.defaultValue}})):r.args=[],i[t]=r}),i}function isPlainObj(e){return e&&"object"==typeof e&&!Array.isArray(e)}function defineTypes(e,t){var n=resolveThunk(t);return(0,_invariant2.default)(Array.isArray(n)&&n.length>0,"Must provide Array of types or a function which returns "+("such an array for Union "+e.name+".")),n.forEach(function(t){(0,_invariant2.default)(t instanceof GraphQLObjectType,e.name+" may only contain Object types, it cannot contain: "+(String(t)+".")),"function"!=typeof e.resolveType&&(0,_invariant2.default)("function"==typeof t.isTypeOf,'Union type "'+e.name+'" does not provide a "resolveType" '+('function and possible type "'+t.name+'" does not provide an ')+'"isTypeOf" function. There is no way to resolve this possible type during execution.')}),n}function defineEnumValues(e,t){(0,_invariant2.default)(isPlainObj(t),e.name+" values must be an object with value names as keys.");var n=Object.keys(t);return(0,_invariant2.default)(n.length>0,e.name+" values must be an object with value names as keys."),n.map(function(n){(0,_assertValidName.assertValidName)(n);var a=t[n];return(0,_invariant2.default)(isPlainObj(a),e.name+"."+n+' must refer to an object with a "value" key '+("representing an internal value but got: "+String(a)+".")),(0,_invariant2.default)(!a.hasOwnProperty("isDeprecated"),e.name+"."+n+' should provide "deprecationReason" instead of "isDeprecated".'),{name:n,description:a.description,deprecationReason:a.deprecationReason,value:(0,_isNullish2.default)(a.value)?n:a.value}})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.GraphQLNonNull=exports.GraphQLList=exports.GraphQLInputObjectType=exports.GraphQLEnumType=exports.GraphQLUnionType=exports.GraphQLInterfaceType=exports.GraphQLObjectType=exports.GraphQLScalarType=void 0;var _extends=Object.assign||function(e){for(var t=1;t0,this.name+" fields must be an object with field names as keys or a function which returns such an object.");var a={};return n.forEach(function(n){(0,_assertValidName.assertValidName)(n);var i=_extends({},t[n],{name:n});(0,_invariant2.default)(isInputType(i.type),e.name+"."+n+" field type must be Input Type but "+("got: "+String(i.type)+".")),a[n]=i}),a},e.prototype.toString=function(){return this.name},e}(),GraphQLList=exports.GraphQLList=function(){function e(t){_classCallCheck(this,e),(0,_invariant2.default)(isType(t),"Can only create List of a GraphQLType but got: "+String(t)+"."),this.ofType=t}return e.prototype.toString=function(){return"["+String(this.ofType)+"]"},e}(),GraphQLNonNull=exports.GraphQLNonNull=function(){function e(t){_classCallCheck(this,e),(0,_invariant2.default)(isType(t)&&!(t instanceof e),"Can only create NonNull of a Nullable GraphQLType but got: "+(String(t)+".")),this.ofType=t}return e.prototype.toString=function(){return this.ofType.toString()+"!"},e}()},{"../jsutils/invariant":57,"../jsutils/isNullish":58,"../language/kinds":64,"../utilities/assertValidName":78}],72:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.specifiedDirectives=exports.GraphQLDeprecatedDirective=exports.DEFAULT_DEPRECATION_REASON=exports.GraphQLSkipDirective=exports.GraphQLIncludeDirective=exports.GraphQLDirective=exports.DirectiveLocation=void 0;var _definition=require("./definition"),_scalars=require("./scalars"),_invariant=require("../jsutils/invariant"),_invariant2=_interopRequireDefault(_invariant),_assertValidName=require("../utilities/assertValidName"),DirectiveLocation=exports.DirectiveLocation={QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"},GraphQLDirective=exports.GraphQLDirective=function e(i){_classCallCheck(this,e),(0,_invariant2.default)(i.name,"Directive must be named."),(0,_assertValidName.assertValidName)(i.name),(0,_invariant2.default)(Array.isArray(i.locations),"Must provide locations for directive."),this.name=i.name,this.description=i.description,this.locations=i.locations;var t=i.args;t?((0,_invariant2.default)(!Array.isArray(t),"@"+i.name+" args must be an object with argument names as keys."),this.args=Object.keys(t).map(function(e){(0,_assertValidName.assertValidName)(e);var r=t[e];return(0,_invariant2.default)((0,_definition.isInputType)(r.type),"@"+i.name+"("+e+":) argument type must be "+("Input Type but got: "+String(r.type)+".")),{name:e,description:void 0===r.description?null:r.description,type:r.type,defaultValue:void 0===r.defaultValue?null:r.defaultValue}})):this.args=[]},GraphQLIncludeDirective=exports.GraphQLIncludeDirective=new GraphQLDirective({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[DirectiveLocation.FIELD,DirectiveLocation.FRAGMENT_SPREAD,DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),description:"Included when true."}}}),GraphQLSkipDirective=exports.GraphQLSkipDirective=new GraphQLDirective({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[DirectiveLocation.FIELD,DirectiveLocation.FRAGMENT_SPREAD,DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),description:"Skipped when true."}}}),DEFAULT_DEPRECATION_REASON=exports.DEFAULT_DEPRECATION_REASON="No longer supported",GraphQLDeprecatedDirective=exports.GraphQLDeprecatedDirective=new GraphQLDirective({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[DirectiveLocation.FIELD_DEFINITION,DirectiveLocation.ENUM_VALUE],args:{reason:{type:_scalars.GraphQLString,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https://daringfireball.net/projects/markdown/).",defaultValue:DEFAULT_DEPRECATION_REASON}}});exports.specifiedDirectives=[GraphQLIncludeDirective,GraphQLSkipDirective,GraphQLDeprecatedDirective]},{"../jsutils/invariant":57,"../utilities/assertValidName":78,"./definition":71,"./scalars":75}],73:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _schema=require("./schema");Object.defineProperty(exports,"GraphQLSchema",{enumerable:!0,get:function(){return _schema.GraphQLSchema}});var _definition=require("./definition");Object.defineProperty(exports,"isType",{enumerable:!0,get:function(){return _definition.isType}}),Object.defineProperty(exports,"isInputType",{enumerable:!0,get:function(){return _definition.isInputType}}),Object.defineProperty(exports,"isOutputType",{enumerable:!0,get:function(){return _definition.isOutputType}}),Object.defineProperty(exports,"isLeafType",{enumerable:!0,get:function(){return _definition.isLeafType}}),Object.defineProperty(exports,"isCompositeType",{enumerable:!0,get:function(){return _definition.isCompositeType}}),Object.defineProperty(exports,"isAbstractType",{enumerable:!0,get:function(){return _definition.isAbstractType}}),Object.defineProperty(exports,"getNullableType",{enumerable:!0,get:function(){return _definition.getNullableType}}),Object.defineProperty(exports,"getNamedType",{enumerable:!0,get:function(){return _definition.getNamedType}}),Object.defineProperty(exports,"GraphQLScalarType",{enumerable:!0,get:function(){return _definition.GraphQLScalarType}}),Object.defineProperty(exports,"GraphQLObjectType",{enumerable:!0,get:function(){return _definition.GraphQLObjectType}}),Object.defineProperty(exports,"GraphQLInterfaceType",{enumerable:!0,get:function(){return _definition.GraphQLInterfaceType}}),Object.defineProperty(exports,"GraphQLUnionType",{enumerable:!0,get:function(){return _definition.GraphQLUnionType}}),Object.defineProperty(exports,"GraphQLEnumType",{enumerable:!0,get:function(){return _definition.GraphQLEnumType}}),Object.defineProperty(exports,"GraphQLInputObjectType",{enumerable:!0,get:function(){return _definition.GraphQLInputObjectType}}),Object.defineProperty(exports,"GraphQLList",{enumerable:!0,get:function(){return _definition.GraphQLList}}),Object.defineProperty(exports,"GraphQLNonNull",{enumerable:!0,get:function(){return _definition.GraphQLNonNull}});var _directives=require("./directives");Object.defineProperty(exports,"DirectiveLocation",{enumerable:!0,get:function(){return _directives.DirectiveLocation}}),Object.defineProperty(exports,"GraphQLDirective",{enumerable:!0,get:function(){return _directives.GraphQLDirective}}),Object.defineProperty(exports,"specifiedDirectives",{enumerable:!0,get:function(){return _directives.specifiedDirectives}}),Object.defineProperty(exports,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return _directives.GraphQLIncludeDirective}}),Object.defineProperty(exports,"GraphQLSkipDirective",{enumerable:!0,get:function(){return _directives.GraphQLSkipDirective}}),Object.defineProperty(exports,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return _directives.GraphQLDeprecatedDirective}}),Object.defineProperty(exports,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return _directives.DEFAULT_DEPRECATION_REASON}});var _scalars=require("./scalars");Object.defineProperty(exports,"GraphQLInt",{enumerable:!0,get:function(){return _scalars.GraphQLInt}}),Object.defineProperty(exports,"GraphQLFloat",{enumerable:!0,get:function(){return _scalars.GraphQLFloat}}),Object.defineProperty(exports,"GraphQLString",{enumerable:!0,get:function(){return _scalars.GraphQLString}}),Object.defineProperty(exports,"GraphQLBoolean",{enumerable:!0,get:function(){return _scalars.GraphQLBoolean}}),Object.defineProperty(exports,"GraphQLID",{enumerable:!0,get:function(){return _scalars.GraphQLID}});var _introspection=require("./introspection");Object.defineProperty(exports,"TypeKind",{enumerable:!0,get:function(){return _introspection.TypeKind}}),Object.defineProperty(exports,"__Schema",{enumerable:!0,get:function(){return _introspection.__Schema}}),Object.defineProperty(exports,"__Directive",{enumerable:!0,get:function(){return _introspection.__Directive}}),Object.defineProperty(exports,"__DirectiveLocation",{enumerable:!0,get:function(){return _introspection.__DirectiveLocation}}),Object.defineProperty(exports,"__Type",{enumerable:!0,get:function(){return _introspection.__Type}}),Object.defineProperty(exports,"__Field",{enumerable:!0,get:function(){return _introspection.__Field}}),Object.defineProperty(exports,"__InputValue",{enumerable:!0,get:function(){return _introspection.__InputValue}}),Object.defineProperty(exports,"__EnumValue",{enumerable:!0,get:function(){return _introspection.__EnumValue}}),Object.defineProperty(exports,"__TypeKind",{enumerable:!0,get:function(){return _introspection.__TypeKind}}),Object.defineProperty(exports,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return _introspection.SchemaMetaFieldDef}}),Object.defineProperty(exports,"TypeMetaFieldDef",{enumerable:!0,get:function(){return _introspection.TypeMetaFieldDef}}),Object.defineProperty(exports,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return _introspection.TypeNameMetaFieldDef}})},{"./definition":71,"./directives":72,"./introspection":74,"./scalars":75,"./schema":76}],74:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.TypeNameMetaFieldDef=exports.TypeMetaFieldDef=exports.SchemaMetaFieldDef=exports.__TypeKind=exports.TypeKind=exports.__EnumValue=exports.__InputValue=exports.__Field=exports.__Type=exports.__DirectiveLocation=exports.__Directive=exports.__Schema=void 0;var _isNullish=require("../jsutils/isNullish"),_isNullish2=_interopRequireDefault(_isNullish),_astFromValue=require("../utilities/astFromValue"),_printer=require("../language/printer"),_definition=require("./definition"),_scalars=require("./scalars"),_directives=require("./directives"),__Schema=exports.__Schema=new _definition.GraphQLObjectType({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:function(){return{types:{description:"A list of all types supported by this server.",type:new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type))),resolve:function(e){var i=e.getTypeMap();return Object.keys(i).map(function(e){return i[e]})}},queryType:{description:"The type that query operations will be rooted at.",type:new _definition.GraphQLNonNull(__Type),resolve:function(e){return e.getQueryType()}},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:__Type,resolve:function(e){return e.getMutationType()}},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:__Type,resolve:function(e){return e.getSubscriptionType()}},directives:{description:"A list of all directives supported by this server.",type:new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__Directive))),resolve:function(e){return e.getDirectives()}}}}}),__Directive=exports.__Directive=new _definition.GraphQLObjectType({name:"__Directive",description:"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",fields:function(){return{name:{type:new _definition.GraphQLNonNull(_scalars.GraphQLString)},description:{type:_scalars.GraphQLString},locations:{type:new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__DirectiveLocation)))},args:{type:new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__InputValue))),resolve:function(e){return e.args||[]}},onOperation:{deprecationReason:"Use `locations`.",type:new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),resolve:function(e){return e.locations.indexOf(_directives.DirectiveLocation.QUERY)!==-1||e.locations.indexOf(_directives.DirectiveLocation.MUTATION)!==-1||e.locations.indexOf(_directives.DirectiveLocation.SUBSCRIPTION)!==-1}},onFragment:{deprecationReason:"Use `locations`.",type:new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),resolve:function(e){return e.locations.indexOf(_directives.DirectiveLocation.FRAGMENT_SPREAD)!==-1||e.locations.indexOf(_directives.DirectiveLocation.INLINE_FRAGMENT)!==-1||e.locations.indexOf(_directives.DirectiveLocation.FRAGMENT_DEFINITION)!==-1}},onField:{deprecationReason:"Use `locations`.",type:new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),resolve:function(e){return e.locations.indexOf(_directives.DirectiveLocation.FIELD)!==-1}}}}}),__DirectiveLocation=exports.__DirectiveLocation=new _definition.GraphQLEnumType({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", +values:{QUERY:{value:_directives.DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:_directives.DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:_directives.DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:_directives.DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:_directives.DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:_directives.DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:_directives.DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},SCHEMA:{value:_directives.DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:_directives.DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:_directives.DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:_directives.DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:_directives.DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:_directives.DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:_directives.DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:_directives.DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:_directives.DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:_directives.DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:_directives.DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),__Type=exports.__Type=new _definition.GraphQLObjectType({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:function(){return{kind:{type:new _definition.GraphQLNonNull(__TypeKind),resolve:function(e){if(e instanceof _definition.GraphQLScalarType)return TypeKind.SCALAR;if(e instanceof _definition.GraphQLObjectType)return TypeKind.OBJECT;if(e instanceof _definition.GraphQLInterfaceType)return TypeKind.INTERFACE;if(e instanceof _definition.GraphQLUnionType)return TypeKind.UNION;if(e instanceof _definition.GraphQLEnumType)return TypeKind.ENUM;if(e instanceof _definition.GraphQLInputObjectType)return TypeKind.INPUT_OBJECT;if(e instanceof _definition.GraphQLList)return TypeKind.LIST;if(e instanceof _definition.GraphQLNonNull)return TypeKind.NON_NULL;throw new Error("Unknown kind of type: "+e)}},name:{type:_scalars.GraphQLString},description:{type:_scalars.GraphQLString},fields:{type:new _definition.GraphQLList(new _definition.GraphQLNonNull(__Field)),args:{includeDeprecated:{type:_scalars.GraphQLBoolean,defaultValue:!1}},resolve:function(e,i){var n=i.includeDeprecated;if(e instanceof _definition.GraphQLObjectType||e instanceof _definition.GraphQLInterfaceType){var t=function(){var i=e.getFields(),t=Object.keys(i).map(function(e){return i[e]});return n||(t=t.filter(function(e){return!e.deprecationReason})),{v:t}}();if("object"==typeof t)return t.v}return null}},interfaces:{type:new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type)),resolve:function(e){if(e instanceof _definition.GraphQLObjectType)return e.getInterfaces()}},possibleTypes:{type:new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type)),resolve:function(e,i,n,t){var a=t.schema;if(e instanceof _definition.GraphQLInterfaceType||e instanceof _definition.GraphQLUnionType)return a.getPossibleTypes(e)}},enumValues:{type:new _definition.GraphQLList(new _definition.GraphQLNonNull(__EnumValue)),args:{includeDeprecated:{type:_scalars.GraphQLBoolean,defaultValue:!1}},resolve:function(e,i){var n=i.includeDeprecated;if(e instanceof _definition.GraphQLEnumType){var t=e.getValues();return n||(t=t.filter(function(e){return!e.deprecationReason})),t}}},inputFields:{type:new _definition.GraphQLList(new _definition.GraphQLNonNull(__InputValue)),resolve:function(e){if(e instanceof _definition.GraphQLInputObjectType){var i=function(){var i=e.getFields();return{v:Object.keys(i).map(function(e){return i[e]})}}();if("object"==typeof i)return i.v}}},ofType:{type:__Type}}}}),__Field=exports.__Field=new _definition.GraphQLObjectType({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:function(){return{name:{type:new _definition.GraphQLNonNull(_scalars.GraphQLString)},description:{type:_scalars.GraphQLString},args:{type:new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__InputValue))),resolve:function(e){return e.args||[]}},type:{type:new _definition.GraphQLNonNull(__Type)},isDeprecated:{type:new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),resolve:function(e){return!(0,_isNullish2.default)(e.deprecationReason)}},deprecationReason:{type:_scalars.GraphQLString}}}}),__InputValue=exports.__InputValue=new _definition.GraphQLObjectType({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:function(){return{name:{type:new _definition.GraphQLNonNull(_scalars.GraphQLString)},description:{type:_scalars.GraphQLString},type:{type:new _definition.GraphQLNonNull(__Type)},defaultValue:{type:_scalars.GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve:function(e){return(0,_isNullish2.default)(e.defaultValue)?null:(0,_printer.print)((0,_astFromValue.astFromValue)(e.defaultValue,e.type))}}}}}),__EnumValue=exports.__EnumValue=new _definition.GraphQLObjectType({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:function(){return{name:{type:new _definition.GraphQLNonNull(_scalars.GraphQLString)},description:{type:_scalars.GraphQLString},isDeprecated:{type:new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),resolve:function(e){return!(0,_isNullish2.default)(e.deprecationReason)}},deprecationReason:{type:_scalars.GraphQLString}}}}),TypeKind=exports.TypeKind={SCALAR:"SCALAR",OBJECT:"OBJECT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",INPUT_OBJECT:"INPUT_OBJECT",LIST:"LIST",NON_NULL:"NON_NULL"},__TypeKind=exports.__TypeKind=new _definition.GraphQLEnumType({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:TypeKind.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:TypeKind.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:TypeKind.INTERFACE,description:"Indicates this type is an interface. `fields` and `possibleTypes` are valid fields."},UNION:{value:TypeKind.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:TypeKind.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:TypeKind.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:TypeKind.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:TypeKind.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}});exports.SchemaMetaFieldDef={name:"__schema",type:new _definition.GraphQLNonNull(__Schema),description:"Access the current type schema of this server.",args:[],resolve:function(e,i,n,t){var a=t.schema;return a}},exports.TypeMetaFieldDef={name:"__type",type:__Type,description:"Request the type information of a single type.",args:[{name:"name",type:new _definition.GraphQLNonNull(_scalars.GraphQLString)}],resolve:function(e,i,n,t){var a=i.name,r=t.schema;return r.getType(a)}},exports.TypeNameMetaFieldDef={name:"__typename",type:new _definition.GraphQLNonNull(_scalars.GraphQLString),description:"The name of the current Object type at runtime.",args:[],resolve:function(e,i,n,t){var a=t.parentType;return a.name}}},{"../jsutils/isNullish":58,"../language/printer":68,"../utilities/astFromValue":79,"./definition":71,"./directives":72,"./scalars":75}],75:[function(require,module,exports){"use strict";function coerceInt(e){var r=Number(e);if(r===r&&r<=MAX_INT&&r>=MIN_INT)return(r<0?Math.ceil:Math.floor)(r);throw new TypeError("Int cannot represent non 32-bit signed integer value: "+e)}function coerceFloat(e){var r=Number(e);if(r===r)return r;throw new TypeError("Float cannot represent non numeric value: "+e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.GraphQLID=exports.GraphQLBoolean=exports.GraphQLString=exports.GraphQLFloat=exports.GraphQLInt=void 0;var _definition=require("./definition"),_language=require("../language"),MAX_INT=2147483647,MIN_INT=-2147483648;exports.GraphQLInt=new _definition.GraphQLScalarType({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. ",serialize:coerceInt,parseValue:coerceInt,parseLiteral:function(e){if(e.kind===_language.Kind.INT){var r=parseInt(e.value,10);if(r<=MAX_INT&&r>=MIN_INT)return r}return null}}),exports.GraphQLFloat=new _definition.GraphQLScalarType({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point). ",serialize:coerceFloat,parseValue:coerceFloat,parseLiteral:function(e){return e.kind===_language.Kind.FLOAT||e.kind===_language.Kind.INT?parseFloat(e.value):null}}),exports.GraphQLString=new _definition.GraphQLScalarType({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize:String,parseValue:String,parseLiteral:function(e){return e.kind===_language.Kind.STRING?e.value:null}}),exports.GraphQLBoolean=new _definition.GraphQLScalarType({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:Boolean,parseValue:Boolean,parseLiteral:function(e){return e.kind===_language.Kind.BOOLEAN?e.value:null}}),exports.GraphQLID=new _definition.GraphQLScalarType({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize:String,parseValue:String,parseLiteral:function(e){return e.kind===_language.Kind.STRING||e.kind===_language.Kind.INT?e.value:null}})},{"../language":63,"./definition":71}],76:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function typeMapReducer(e,t){if(!t)return e;if(t instanceof _definition.GraphQLList||t instanceof _definition.GraphQLNonNull)return typeMapReducer(e,t.ofType);if(e[t.name])return(0,_invariant2.default)(e[t.name]===t,"Schema must contain unique named types but contains multiple "+('types named "'+t.name+'".')),e;e[t.name]=t;var i=e;return t instanceof _definition.GraphQLUnionType&&(i=t.getTypes().reduce(typeMapReducer,i)),t instanceof _definition.GraphQLObjectType&&(i=t.getInterfaces().reduce(typeMapReducer,i)),(t instanceof _definition.GraphQLObjectType||t instanceof _definition.GraphQLInterfaceType||t instanceof _definition.GraphQLInputObjectType)&&!function(){var e=t.getFields();Object.keys(e).forEach(function(t){var n=e[t];if(n.args){var r=n.args.map(function(e){return e.type});i=r.reduce(typeMapReducer,i)}i=typeMapReducer(i,n.type)})}(),i}function assertObjectImplementsInterface(e,t,i){var n=t.getFields(),r=i.getFields();Object.keys(r).forEach(function(a){var p=n[a],o=r[a];(0,_invariant2.default)(p,'"'+i.name+'" expects field "'+a+'" but "'+t.name+'" does not provide it.'),(0,_invariant2.default)((0,_typeComparators.isTypeSubTypeOf)(e,p.type,o.type),i.name+"."+a+' expects type "'+String(o.type)+'" but '+(t.name+"."+a+' provides type "'+String(p.type)+'".')),o.args.forEach(function(e){var n=e.name,r=(0,_find2.default)(p.args,function(e){return e.name===n});(0,_invariant2.default)(r,i.name+"."+a+' expects argument "'+n+'" but '+(t.name+"."+a+" does not provide it.")),(0,_invariant2.default)((0,_typeComparators.isEqualType)(e.type,r.type),i.name+"."+a+"("+n+":) expects type "+('"'+String(e.type)+'" but ')+(t.name+"."+a+"("+n+":) provides type ")+('"'+String(r.type)+'".'))}),p.args.forEach(function(e){var n=e.name,r=(0,_find2.default)(o.args,function(e){return e.name===n});r||(0,_invariant2.default)(!(e.type instanceof _definition.GraphQLNonNull),t.name+"."+a+"("+n+":) is of required type "+('"'+String(e.type)+'" but is not also provided by the ')+("interface "+i.name+"."+a+"."))})})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.GraphQLSchema=void 0;var _definition=require("./definition"),_directives=require("./directives"),_introspection=require("./introspection"),_find=require("../jsutils/find"),_find2=_interopRequireDefault(_find),_invariant=require("../jsutils/invariant"),_invariant2=_interopRequireDefault(_invariant),_typeComparators=require("../utilities/typeComparators");exports.GraphQLSchema=function(){function e(t){var i=this;_classCallCheck(this,e),(0,_invariant2.default)("object"==typeof t,"Must provide configuration object."),(0,_invariant2.default)(t.query instanceof _definition.GraphQLObjectType,"Schema query must be Object Type but got: "+String(t.query)+"."),this._queryType=t.query,(0,_invariant2.default)(!t.mutation||t.mutation instanceof _definition.GraphQLObjectType,"Schema mutation must be Object Type if provided but got: "+String(t.mutation)+"."),this._mutationType=t.mutation,(0,_invariant2.default)(!t.subscription||t.subscription instanceof _definition.GraphQLObjectType,"Schema subscription must be Object Type if provided but got: "+String(t.subscription)+"."),this._subscriptionType=t.subscription,(0,_invariant2.default)(!t.types||Array.isArray(t.types),"Schema types must be Array if provided but got: "+String(t.types)+"."),(0,_invariant2.default)(!t.directives||Array.isArray(t.directives)&&t.directives.every(function(e){return e instanceof _directives.GraphQLDirective}),"Schema directives must be Array if provided but got: "+String(t.directives)+"."),this._directives=t.directives||_directives.specifiedDirectives;var n=[this.getQueryType(),this.getMutationType(),this.getSubscriptionType(),_introspection.__Schema],r=t.types;r&&(n=n.concat(r)),this._typeMap=n.reduce(typeMapReducer,Object.create(null)),this._implementations=Object.create(null),Object.keys(this._typeMap).forEach(function(e){var t=i._typeMap[e];t instanceof _definition.GraphQLObjectType&&t.getInterfaces().forEach(function(e){var n=i._implementations[e.name];n?n.push(t):i._implementations[e.name]=[t]})}),Object.keys(this._typeMap).forEach(function(e){var t=i._typeMap[e];t instanceof _definition.GraphQLObjectType&&t.getInterfaces().forEach(function(e){return assertObjectImplementsInterface(i,t,e)})})}return e.prototype.getQueryType=function(){return this._queryType},e.prototype.getMutationType=function(){return this._mutationType},e.prototype.getSubscriptionType=function(){return this._subscriptionType},e.prototype.getTypeMap=function(){return this._typeMap},e.prototype.getType=function(e){return this.getTypeMap()[e]},e.prototype.getPossibleTypes=function(e){return e instanceof _definition.GraphQLUnionType?e.getTypes():((0,_invariant2.default)(e instanceof _definition.GraphQLInterfaceType),this._implementations[e.name])},e.prototype.isPossibleType=function(e,t){var i=this._possibleTypeMap;if(i||(this._possibleTypeMap=i=Object.create(null)),!i[e.name]){var n=this.getPossibleTypes(e);(0,_invariant2.default)(Array.isArray(n),"Could not find possible implementing types for "+e.name+" in schema. Check that schema.types is defined and is an array of all possible types in the schema."),i[e.name]=n.reduce(function(e,t){return e[t.name]=!0,e},Object.create(null))}return Boolean(i[e.name][t.name])},e.prototype.getDirectives=function(){return this._directives},e.prototype.getDirective=function(e){return(0,_find2.default)(this.getDirectives(),function(t){return t.name===e})},e}()},{"../jsutils/find":56,"../jsutils/invariant":57,"../utilities/typeComparators":91,"./definition":71,"./directives":72,"./introspection":74}],77:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function getFieldDef(e,t,i){var n=i.name.value;return n===_introspection.SchemaMetaFieldDef.name&&e.getQueryType()===t?_introspection.SchemaMetaFieldDef:n===_introspection.TypeMetaFieldDef.name&&e.getQueryType()===t?_introspection.TypeMetaFieldDef:n===_introspection.TypeNameMetaFieldDef.name&&(t instanceof _definition.GraphQLObjectType||t instanceof _definition.GraphQLInterfaceType||t instanceof _definition.GraphQLUnionType)?_introspection.TypeNameMetaFieldDef:t instanceof _definition.GraphQLObjectType||t instanceof _definition.GraphQLInterfaceType?t.getFields()[n]:void 0}Object.defineProperty(exports,"__esModule",{value:!0}),exports.TypeInfo=void 0;var _kinds=require("../language/kinds"),Kind=_interopRequireWildcard(_kinds),_definition=require("../type/definition"),_introspection=require("../type/introspection"),_typeFromAST=require("./typeFromAST"),_find=require("../jsutils/find"),_find2=_interopRequireDefault(_find);exports.TypeInfo=function(){function e(t,i){_classCallCheck(this,e),this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._directive=null,this._argument=null,this._getFieldDef=i||getFieldDef}return e.prototype.getType=function(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]},e.prototype.getParentType=function(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]},e.prototype.getInputType=function(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]},e.prototype.getFieldDef=function(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]},e.prototype.getDirective=function(){return this._directive},e.prototype.getArgument=function(){return this._argument},e.prototype.enter=function(e){var t=this._schema;switch(e.kind){case Kind.SELECTION_SET:var i=(0,_definition.getNamedType)(this.getType()),n=void 0;(0,_definition.isCompositeType)(i)&&(n=i),this._parentTypeStack.push(n);break;case Kind.FIELD:var a=this.getParentType(),p=void 0;a&&(p=this._getFieldDef(t,a,e)),this._fieldDefStack.push(p),this._typeStack.push(p&&p.type);break;case Kind.DIRECTIVE:this._directive=t.getDirective(e.name.value);break;case Kind.OPERATION_DEFINITION:var r=void 0;"query"===e.operation?r=t.getQueryType():"mutation"===e.operation?r=t.getMutationType():"subscription"===e.operation&&(r=t.getSubscriptionType()),this._typeStack.push(r);break;case Kind.INLINE_FRAGMENT:case Kind.FRAGMENT_DEFINITION:var s=e.typeCondition,o=s?(0,_typeFromAST.typeFromAST)(t,s):this.getType();this._typeStack.push(o);break;case Kind.VARIABLE_DEFINITION:var c=(0,_typeFromAST.typeFromAST)(t,e.type);this._inputTypeStack.push(c);break;case Kind.ARGUMENT:var u=void 0,_=void 0,d=this.getDirective()||this.getFieldDef();d&&(u=(0,_find2.default)(d.args,function(t){return t.name===e.name.value}),u&&(_=u.type)),this._argument=u,this._inputTypeStack.push(_);break;case Kind.LIST:var f=(0,_definition.getNullableType)(this.getInputType());this._inputTypeStack.push(f instanceof _definition.GraphQLList?f.ofType:void 0);break;case Kind.OBJECT_FIELD:var h=(0,_definition.getNamedType)(this.getInputType()),y=void 0;if(h instanceof _definition.GraphQLInputObjectType){var T=h.getFields()[e.name.value];y=T?T.type:void 0}this._inputTypeStack.push(y)}},e.prototype.leave=function(e){switch(e.kind){case Kind.SELECTION_SET:this._parentTypeStack.pop();break;case Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case Kind.DIRECTIVE:this._directive=null;break;case Kind.OPERATION_DEFINITION:case Kind.INLINE_FRAGMENT:case Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case Kind.ARGUMENT:this._argument=null,this._inputTypeStack.pop();break;case Kind.LIST:case Kind.OBJECT_FIELD:this._inputTypeStack.pop()}},e}()},{"../jsutils/find":56,"../language/kinds":64,"../type/definition":71,"../type/introspection":74,"./typeFromAST":92}],78:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function assertValidName(e){(0,_invariant2.default)(NAME_RX.test(e),'Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "'+e+'" does not.')}Object.defineProperty(exports,"__esModule",{value:!0}),exports.assertValidName=assertValidName;var _invariant=require("../jsutils/invariant"),_invariant2=_interopRequireDefault(_invariant),NAME_RX=/^[_a-zA-Z][_a-zA-Z0-9]*$/},{"../jsutils/invariant":57}],79:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function astFromValue(e,i){var n=e;if(i instanceof _definition.GraphQLNonNull)return astFromValue(n,i.ofType);if((0,_isNullish2.default)(n))return null;if(i instanceof _definition.GraphQLList){var r=function(){var e=i.ofType;if((0,_iterall.isCollection)(n)){var r=function(){var i=[];return(0,_iterall.forEach)(n,function(n){var r=astFromValue(n,e);r&&i.push(r)}),{v:{v:{kind:_kinds.LIST,values:i}}}}();if("object"==typeof r)return r.v}return{v:astFromValue(n,e)}}();if("object"==typeof r)return r.v}if(i instanceof _definition.GraphQLInputObjectType){var t=function(){if(null===n||"object"!=typeof n)return{v:null};var e=i.getFields(),r=[];return Object.keys(e).forEach(function(i){var t=e[i].type,a=astFromValue(n[i],t);a&&r.push({kind:_kinds.OBJECT_FIELD,name:{kind:_kinds.NAME,value:i},value:a})}),{v:{kind:_kinds.OBJECT,fields:r}}}();if("object"==typeof t)return t.v}(0,_invariant2.default)(i instanceof _definition.GraphQLScalarType||i instanceof _definition.GraphQLEnumType,"Must provide Input Type, cannot use: "+String(i));var a=i.serialize(n);if((0,_isNullish2.default)(a))return null;if("boolean"==typeof a)return{kind:_kinds.BOOLEAN,value:a};if("number"==typeof a){var u=String(a);return/^[0-9]+$/.test(u)?{kind:_kinds.INT,value:u}:{kind:_kinds.FLOAT,value:u}}if("string"==typeof a)return i instanceof _definition.GraphQLEnumType?{kind:_kinds.ENUM,value:a}:i===_scalars.GraphQLID&&/^[0-9]+$/.test(a)?{kind:_kinds.INT,value:a}:{kind:_kinds.STRING,value:JSON.stringify(a).slice(1,-1)};throw new TypeError("Cannot convert value to AST: "+String(a))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.astFromValue=astFromValue;var _iterall=require("iterall"),_invariant=require("../jsutils/invariant"),_invariant2=_interopRequireDefault(_invariant),_isNullish=require("../jsutils/isNullish"),_isNullish2=_interopRequireDefault(_isNullish),_kinds=require("../language/kinds"),_definition=require("../type/definition"),_scalars=require("../type/scalars")},{"../jsutils/invariant":57,"../jsutils/isNullish":58,"../language/kinds":64,"../type/definition":71,"../type/scalars":75,iterall:121}],80:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function buildWrappedType(e,n){if(n.kind===_kinds.LIST_TYPE)return new _definition.GraphQLList(buildWrappedType(e,n.type));if(n.kind===_kinds.NON_NULL_TYPE){var i=buildWrappedType(e,n.type);return(0,_invariant2.default)(!(i instanceof _definition.GraphQLNonNull),"No nesting nonnull."),new _definition.GraphQLNonNull(i)}return e}function getNamedTypeAST(e){for(var n=e;n.kind===_kinds.LIST_TYPE||n.kind===_kinds.NON_NULL_TYPE;)n=n.type;return n}function buildASTSchema(e){function n(e){return new _directives.GraphQLDirective({name:e.name.value,description:getDescription(e),locations:e.locations.map(function(e){return e.value}),args:e.arguments&&f(e.arguments)})}function i(e){var n=c(e.name.value);return(0,_invariant2.default)(n instanceof _definition.GraphQLObjectType,"AST must provide object type."),n}function r(e){var n=getNamedTypeAST(e).name.value,i=c(n);return buildWrappedType(i,e)}function t(e){var n=r(e);return(0,_invariant2.default)((0,_definition.isInputType)(n),"Expected Input type."),n}function a(e){var n=r(e);return(0,_invariant2.default)((0,_definition.isOutputType)(n),"Expected Output type."),n}function o(e){var n=r(e);return(0,_invariant2.default)(n instanceof _definition.GraphQLObjectType,"Expected Object type."),n}function u(e){var n=r(e);return(0,_invariant2.default)(n instanceof _definition.GraphQLInterfaceType,"Expected Object type."),n}function c(e){if(L[e])return L[e];if(!I[e])throw new Error('Type "'+e+'" not found in document.');var n=s(I[e]);if(!n)throw new Error('Nothing constructed for "'+e+'".');return L[e]=n,n}function s(e){if(!e)throw new Error("def must be defined");switch(e.kind){case _kinds.OBJECT_TYPE_DEFINITION:return p(e);case _kinds.INTERFACE_TYPE_DEFINITION:return l(e);case _kinds.ENUM_TYPE_DEFINITION:return v(e);case _kinds.UNION_TYPE_DEFINITION:return m(e);case _kinds.SCALAR_TYPE_DEFINITION:return T(e);case _kinds.INPUT_OBJECT_TYPE_DEFINITION:return y(e);default:throw new Error('Type kind "'+e.kind+'" not supported.')}}function p(e){var n=e.name.value;return new _definition.GraphQLObjectType({name:n,description:getDescription(e),fields:function(){return d(e)},interfaces:function(){return _(e)}})}function d(e){return(0,_keyValMap2.default)(e.fields,function(e){return e.name.value},function(e){return{type:a(e.type),description:getDescription(e),args:f(e.arguments),deprecationReason:getDeprecationReason(e.directives)}})}function _(e){return e.interfaces&&e.interfaces.map(function(e){return u(e)})}function f(e){return(0,_keyValMap2.default)(e,function(e){return e.name.value},function(e){var n=t(e.type);return{type:n,description:getDescription(e),defaultValue:(0,_valueFromAST.valueFromAST)(e.defaultValue,n)}})}function l(e){var n=e.name.value;return new _definition.GraphQLInterfaceType({name:n,description:getDescription(e),fields:function(){return d(e)},resolveType:cannotExecuteSchema})}function v(e){var n=new _definition.GraphQLEnumType({name:e.name.value,description:getDescription(e),values:(0,_keyValMap2.default)(e.values,function(e){return e.name.value},function(e){return{description:getDescription(e),deprecationReason:getDeprecationReason(e.directives)}})});return n}function m(e){return new _definition.GraphQLUnionType({name:e.name.value,description:getDescription(e),types:e.types.map(function(e){return o(e)}),resolveType:cannotExecuteSchema})}function T(e){return new _definition.GraphQLScalarType({name:e.name.value,description:getDescription(e),serialize:function(){return null},parseValue:function(){return!1},parseLiteral:function(){return!1}})}function y(e){return new _definition.GraphQLInputObjectType({name:e.name.value,description:getDescription(e),fields:function(){return f(e.fields)}})}if(!e||e.kind!==_kinds.DOCUMENT)throw new Error("Must provide a document ast.");for(var h=void 0,E=[],I=Object.create(null),N=[],D=0;D0&&e.reportError(new _error.GraphQLError(badValueMessage(r.name.value,a.type,(0,_printer.print)(r.value),t),[r.value]))}return!1}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.badValueMessage=badValueMessage,exports.ArgumentsOfCorrectType=ArgumentsOfCorrectType;var _error=require("../../error"),_printer=require("../../language/printer"),_isValidLiteralValue=require("../../utilities/isValidLiteralValue")},{"../../error":48,"../../language/printer":68,"../../utilities/isValidLiteralValue":88}],96:[function(require,module,exports){"use strict";function defaultForNonNullArgMessage(e,r,a){return'Variable "$'+e+'" of type "'+String(r)+'" is required and will not use the default value. '+('Perhaps you meant to use type "'+String(a)+'".')}function badValueForDefaultArgMessage(e,r,a,t){var i=t?"\n"+t.join("\n"):"";return'Variable "$'+e+'" of type "'+String(r)+'" has invalid '+("default value "+a+"."+i)}function DefaultValuesOfCorrectType(e){return{VariableDefinition:function(r){var a=r.variable.name.value,t=r.defaultValue,i=e.getInputType();if(i instanceof _definition.GraphQLNonNull&&t&&e.reportError(new _error.GraphQLError(defaultForNonNullArgMessage(a,i,i.ofType),[t])),i&&t){var l=(0,_isValidLiteralValue.isValidLiteralValue)(i,t);l&&l.length>0&&e.reportError(new _error.GraphQLError(badValueForDefaultArgMessage(a,i,(0,_printer.print)(t),l),[t]))}return!1},SelectionSet:function(){return!1},FragmentDefinition:function(){return!1}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.defaultForNonNullArgMessage=defaultForNonNullArgMessage,exports.badValueForDefaultArgMessage=badValueForDefaultArgMessage,exports.DefaultValuesOfCorrectType=DefaultValuesOfCorrectType;var _error=require("../../error"),_printer=require("../../language/printer"),_definition=require("../../type/definition"),_isValidLiteralValue=require("../../utilities/isValidLiteralValue")},{"../../error":48,"../../language/printer":68,"../../type/definition":71,"../../utilities/isValidLiteralValue":88}],97:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function undefinedFieldMessage(e,t,n,i){var r='Cannot query field "'+e+'" on type "'+t+'".';if(0!==n.length){var s=(0,_quotedOrList2.default)(n);r+=" Did you mean to use an inline fragment on "+s+"?"}else 0!==i.length&&(r+=" Did you mean "+(0,_quotedOrList2.default)(i)+"?");return r}function FieldsOnCorrectType(e){return{Field:function(t){var n=e.getParentType();if(n){var i=e.getFieldDef();if(!i){var r=e.getSchema(),s=t.name.value,u=getSuggestedTypeNames(r,n,s),o=0!==u.length?[]:getSuggestedFieldNames(r,n,s);e.reportError(new _error.GraphQLError(undefinedFieldMessage(s,n.name,u,o),[t]))}}}}}function getSuggestedTypeNames(e,t,n){if(t instanceof _definition.GraphQLInterfaceType||t instanceof _definition.GraphQLUnionType){var i=function(){var i=[],r=Object.create(null);e.getPossibleTypes(t).forEach(function(e){e.getFields()[n]&&(i.push(e.name),e.getInterfaces().forEach(function(e){e.getFields()[n]&&(r[e.name]=(r[e.name]||0)+1)}))});var s=Object.keys(r).sort(function(e,t){return r[t]-r[e]});return{v:s.concat(i)}}();if("object"==typeof i)return i.v}return[]}function getSuggestedFieldNames(e,t,n){if(t instanceof _definition.GraphQLObjectType||t instanceof _definition.GraphQLInterfaceType){var i=Object.keys(t.getFields());return(0,_suggestionList2.default)(n,i)}return[]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.undefinedFieldMessage=undefinedFieldMessage,exports.FieldsOnCorrectType=FieldsOnCorrectType;var _error=require("../../error"),_suggestionList=require("../../jsutils/suggestionList"),_suggestionList2=_interopRequireDefault(_suggestionList),_quotedOrList=require("../../jsutils/quotedOrList"),_quotedOrList2=_interopRequireDefault(_quotedOrList),_definition=require("../../type/definition")},{"../../error":48,"../../jsutils/quotedOrList":61,"../../jsutils/suggestionList":62,"../../type/definition":71}],98:[function(require,module,exports){"use strict";function inlineFragmentOnNonCompositeErrorMessage(e){return'Fragment cannot condition on non composite type "'+String(e)+'".'}function fragmentOnNonCompositeErrorMessage(e,n){return'Fragment "'+e+'" cannot condition on non composite '+('type "'+String(n)+'".')}function FragmentsOnCompositeTypes(e){return{InlineFragment:function(n){var r=e.getType();n.typeCondition&&r&&!(0,_definition.isCompositeType)(r)&&e.reportError(new _error.GraphQLError(inlineFragmentOnNonCompositeErrorMessage((0,_printer.print)(n.typeCondition)),[n.typeCondition]))},FragmentDefinition:function(n){var r=e.getType();r&&!(0,_definition.isCompositeType)(r)&&e.reportError(new _error.GraphQLError(fragmentOnNonCompositeErrorMessage(n.name.value,(0,_printer.print)(n.typeCondition)),[n.typeCondition]))}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.inlineFragmentOnNonCompositeErrorMessage=inlineFragmentOnNonCompositeErrorMessage,exports.fragmentOnNonCompositeErrorMessage=fragmentOnNonCompositeErrorMessage,exports.FragmentsOnCompositeTypes=FragmentsOnCompositeTypes;var _error=require("../../error"),_printer=require("../../language/printer"),_definition=require("../../type/definition")},{"../../error":48,"../../language/printer":68,"../../type/definition":71}],99:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function unknownArgMessage(e,n,r,t){var i='Unknown argument "'+e+'" on field "'+n+'" of '+('type "'+String(r)+'".');return t.length&&(i+=" Did you mean "+(0,_quotedOrList2.default)(t)+"?"),i}function unknownDirectiveArgMessage(e,n,r){var t='Unknown argument "'+e+'" on directive "@'+n+'".';return r.length&&(t+=" Did you mean "+(0,_quotedOrList2.default)(r)+"?"),t}function KnownArgumentNames(e){return{Argument:function(n,r,t,i,u){var a=u[u.length-1];if(a.kind===_kinds.FIELD){var s=e.getFieldDef();if(s){var o=(0,_find2.default)(s.args,function(e){return e.name===n.name.value});if(!o){var g=e.getParentType();(0,_invariant2.default)(g),e.reportError(new _error.GraphQLError(unknownArgMessage(n.name.value,s.name,g.name,(0,_suggestionList2.default)(n.name.value,s.args.map(function(e){return e.name}))),[n]))}}}else if(a.kind===_kinds.DIRECTIVE){var f=e.getDirective();if(f){var d=(0,_find2.default)(f.args,function(e){return e.name===n.name.value});d||e.reportError(new _error.GraphQLError(unknownDirectiveArgMessage(n.name.value,f.name,(0,_suggestionList2.default)(n.name.value,f.args.map(function(e){return e.name}))),[n]))}}}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.unknownArgMessage=unknownArgMessage,exports.unknownDirectiveArgMessage=unknownDirectiveArgMessage,exports.KnownArgumentNames=KnownArgumentNames;var _error=require("../../error"),_find=require("../../jsutils/find"),_find2=_interopRequireDefault(_find),_invariant=require("../../jsutils/invariant"),_invariant2=_interopRequireDefault(_invariant),_suggestionList=require("../../jsutils/suggestionList"),_suggestionList2=_interopRequireDefault(_suggestionList),_quotedOrList=require("../../jsutils/quotedOrList"),_quotedOrList2=_interopRequireDefault(_quotedOrList),_kinds=require("../../language/kinds")},{"../../error":48,"../../jsutils/find":56,"../../jsutils/invariant":57,"../../jsutils/quotedOrList":61,"../../jsutils/suggestionList":62,"../../language/kinds":64}],100:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function unknownDirectiveMessage(e){return'Unknown directive "'+e+'".'}function misplacedDirectiveMessage(e,i){return'Directive "'+e+'" may not be used on '+i+"."}function KnownDirectives(e){return{Directive:function(i,r,t,n,c){var s=(0,_find2.default)(e.getSchema().getDirectives(),function(e){return e.name===i.name.value});if(!s)return void e.reportError(new _error.GraphQLError(unknownDirectiveMessage(i.name.value),[i]));var o=getDirectiveLocationForASTPath(c);o?s.locations.indexOf(o)===-1&&e.reportError(new _error.GraphQLError(misplacedDirectiveMessage(i.name.value,o),[i])):e.reportError(new _error.GraphQLError(misplacedDirectiveMessage(i.name.value,i.type),[i]))}}}function getDirectiveLocationForASTPath(e){var i=e[e.length-1];switch(i.kind){case _kinds.OPERATION_DEFINITION:switch(i.operation){case"query":return _directives.DirectiveLocation.QUERY;case"mutation":return _directives.DirectiveLocation.MUTATION;case"subscription":return _directives.DirectiveLocation.SUBSCRIPTION}break;case _kinds.FIELD:return _directives.DirectiveLocation.FIELD;case _kinds.FRAGMENT_SPREAD:return _directives.DirectiveLocation.FRAGMENT_SPREAD;case _kinds.INLINE_FRAGMENT:return _directives.DirectiveLocation.INLINE_FRAGMENT;case _kinds.FRAGMENT_DEFINITION:return _directives.DirectiveLocation.FRAGMENT_DEFINITION;case _kinds.SCHEMA_DEFINITION:return _directives.DirectiveLocation.SCHEMA;case _kinds.SCALAR_TYPE_DEFINITION:return _directives.DirectiveLocation.SCALAR;case _kinds.OBJECT_TYPE_DEFINITION:return _directives.DirectiveLocation.OBJECT;case _kinds.FIELD_DEFINITION:return _directives.DirectiveLocation.FIELD_DEFINITION;case _kinds.INTERFACE_TYPE_DEFINITION:return _directives.DirectiveLocation.INTERFACE;case _kinds.UNION_TYPE_DEFINITION:return _directives.DirectiveLocation.UNION;case _kinds.ENUM_TYPE_DEFINITION:return _directives.DirectiveLocation.ENUM;case _kinds.ENUM_VALUE_DEFINITION:return _directives.DirectiveLocation.ENUM_VALUE;case _kinds.INPUT_OBJECT_TYPE_DEFINITION:return _directives.DirectiveLocation.INPUT_OBJECT;case _kinds.INPUT_VALUE_DEFINITION:var r=e[e.length-3];return r.kind===_kinds.INPUT_OBJECT_TYPE_DEFINITION?_directives.DirectiveLocation.INPUT_FIELD_DEFINITION:_directives.DirectiveLocation.ARGUMENT_DEFINITION}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.unknownDirectiveMessage=unknownDirectiveMessage,exports.misplacedDirectiveMessage=misplacedDirectiveMessage,exports.KnownDirectives=KnownDirectives;var _error=require("../../error"),_find=require("../../jsutils/find"),_find2=_interopRequireDefault(_find),_kinds=require("../../language/kinds"),_directives=require("../../type/directives")},{"../../error":48,"../../jsutils/find":56,"../../language/kinds":64,"../../type/directives":72}],101:[function(require,module,exports){"use strict";function unknownFragmentMessage(e){return'Unknown fragment "'+e+'".'}function KnownFragmentNames(e){return{FragmentSpread:function(n){var r=n.name.value,a=e.getFragment(r);a||e.reportError(new _error.GraphQLError(unknownFragmentMessage(r),[n.name]))}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.unknownFragmentMessage=unknownFragmentMessage,exports.KnownFragmentNames=KnownFragmentNames;var _error=require("../../error")},{"../../error":48}],102:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function unknownTypeMessage(e,n){var t='Unknown type "'+String(e)+'".';return n.length&&(t+=" Did you mean "+(0,_quotedOrList2.default)(n)+"?"),t}function KnownTypeNames(e){return{ObjectTypeDefinition:function(){return!1},InterfaceTypeDefinition:function(){return!1},UnionTypeDefinition:function(){return!1},InputObjectTypeDefinition:function(){return!1},NamedType:function(n){var t=e.getSchema(),r=n.name.value,i=t.getType(r);i||e.reportError(new _error.GraphQLError(unknownTypeMessage(r,(0,_suggestionList2.default)(r,Object.keys(t.getTypeMap()))),[n]))}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.unknownTypeMessage=unknownTypeMessage,exports.KnownTypeNames=KnownTypeNames;var _error=require("../../error"),_suggestionList=require("../../jsutils/suggestionList"),_suggestionList2=_interopRequireDefault(_suggestionList),_quotedOrList=require("../../jsutils/quotedOrList"),_quotedOrList2=_interopRequireDefault(_quotedOrList)},{"../../error":48,"../../jsutils/quotedOrList":61,"../../jsutils/suggestionList":62}],103:[function(require,module,exports){"use strict";function anonOperationNotAloneMessage(){return"This anonymous operation must be the only defined operation."}function LoneAnonymousOperation(n){var e=0;return{Document:function(n){e=n.definitions.filter(function(n){return n.kind===_kinds.OPERATION_DEFINITION}).length},OperationDefinition:function(o){!o.name&&e>1&&n.reportError(new _error.GraphQLError(anonOperationNotAloneMessage(),[o]))}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.anonOperationNotAloneMessage=anonOperationNotAloneMessage,exports.LoneAnonymousOperation=LoneAnonymousOperation;var _error=require("../../error"),_kinds=require("../../language/kinds")},{"../../error":48,"../../language/kinds":64}],104:[function(require,module,exports){"use strict";function cycleErrorMessage(e,r){var n=r.length?" via "+r.join(", "):"";return'Cannot spread fragment "'+e+'" within itself'+n+"."}function NoFragmentCycles(e){function r(o){var i=o.name.value;n[i]=!0;var c=e.getFragmentSpreads(o.selectionSet);if(0!==c.length){a[i]=t.length;for(var l=0;l1)for(var l=0;l0)return[[n,e.map(function(e){var n=e[0];return n})],e.reduce(function(e,n){var t=n[1];return e.concat(t)},[t]),e.reduce(function(e,n){var t=n[2];return e.concat(t)},[i])]}function _pairSetAdd(e,n,t,i){var r=e[n];r||(r=Object.create(null),e[n]=r),r[t]=i}Object.defineProperty(exports,"__esModule",{value:!0}),exports.fieldsConflictMessage=fieldsConflictMessage,exports.OverlappingFieldsCanBeMerged=OverlappingFieldsCanBeMerged;var _error=require("../../error"),_find=require("../../jsutils/find"),_find2=_interopRequireDefault(_find),_kinds=require("../../language/kinds"),_printer=require("../../language/printer"),_definition=require("../../type/definition"),_typeFromAST=require("../../utilities/typeFromAST"),PairSet=function(){function e(){_classCallCheck(this,e),this._data=Object.create(null)}return e.prototype.has=function(e,n,t){var i=this._data[e],r=i&&i[n];return void 0!==r&&(t!==!1||r===!1)},e.prototype.add=function(e,n,t){_pairSetAdd(this._data,e,n,t),_pairSetAdd(this._data,n,e,t)},e}()},{"../../error":48,"../../jsutils/find":56,"../../language/kinds":64,"../../language/printer":68,"../../type/definition":71,"../../utilities/typeFromAST":92}],109:[function(require,module,exports){"use strict";function typeIncompatibleSpreadMessage(e,r,t){return'Fragment "'+e+'" cannot be spread here as objects of '+('type "'+String(r)+'" can never be of type "'+String(t)+'".')}function typeIncompatibleAnonSpreadMessage(e,r){return"Fragment cannot be spread here as objects of "+('type "'+String(e)+'" can never be of type "'+String(r)+'".')}function PossibleFragmentSpreads(e){return{InlineFragment:function(r){var t=e.getType(),a=e.getParentType();t&&a&&!(0,_typeComparators.doTypesOverlap)(e.getSchema(),t,a)&&e.reportError(new _error.GraphQLError(typeIncompatibleAnonSpreadMessage(a,t),[r]))},FragmentSpread:function(r){var t=r.name.value,a=getFragmentType(e,t),p=e.getParentType();a&&p&&!(0,_typeComparators.doTypesOverlap)(e.getSchema(),a,p)&&e.reportError(new _error.GraphQLError(typeIncompatibleSpreadMessage(t,p,a),[r]))}}}function getFragmentType(e,r){var t=e.getFragment(r);return t&&(0,_typeFromAST.typeFromAST)(e.getSchema(),t.typeCondition)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.typeIncompatibleSpreadMessage=typeIncompatibleSpreadMessage,exports.typeIncompatibleAnonSpreadMessage=typeIncompatibleAnonSpreadMessage,exports.PossibleFragmentSpreads=PossibleFragmentSpreads;var _error=require("../../error"),_typeComparators=require("../../utilities/typeComparators"),_typeFromAST=require("../../utilities/typeFromAST")},{"../../error":48,"../../utilities/typeComparators":91,"../../utilities/typeFromAST":92}],110:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function missingFieldArgMessage(e,r,i){return'Field "'+e+'" argument "'+r+'" of type '+('"'+String(i)+'" is required but not provided.')}function missingDirectiveArgMessage(e,r,i){return'Directive "@'+e+'" argument "'+r+'" of type '+('"'+String(i)+'" is required but not provided.')}function ProvidedNonNullArguments(e){return{Field:{leave:function(r){var i=e.getFieldDef();if(!i)return!1;var n=r.arguments||[],t=(0,_keyMap2.default)(n,function(e){return e.name.value});i.args.forEach(function(i){var n=t[i.name];!n&&i.type instanceof _definition.GraphQLNonNull&&e.reportError(new _error.GraphQLError(missingFieldArgMessage(r.name.value,i.name,i.type),[r]))})}},Directive:{leave:function(r){var i=e.getDirective();if(!i)return!1;var n=r.arguments||[],t=(0,_keyMap2.default)(n,function(e){return e.name.value});i.args.forEach(function(i){var n=t[i.name];!n&&i.type instanceof _definition.GraphQLNonNull&&e.reportError(new _error.GraphQLError(missingDirectiveArgMessage(r.name.value,i.name,i.type),[r]))})}}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.missingFieldArgMessage=missingFieldArgMessage,exports.missingDirectiveArgMessage=missingDirectiveArgMessage,exports.ProvidedNonNullArguments=ProvidedNonNullArguments;var _error=require("../../error"),_keyMap=require("../../jsutils/keyMap"),_keyMap2=_interopRequireDefault(_keyMap),_definition=require("../../type/definition")},{"../../error":48,"../../jsutils/keyMap":59,"../../type/definition":71}],111:[function(require,module,exports){"use strict";function noSubselectionAllowedMessage(e,r){return'Field "'+e+'" must not have a selection since '+('type "'+String(r)+'" has no subfields.')}function requiredSubselectionMessage(e,r){return'Field "'+e+'" of type "'+String(r)+'" must have a '+('selection of subfields. Did you mean "'+e+' { ... }"?')}function ScalarLeafs(e){return{Field:function(r){var o=e.getType();o&&((0,_definition.isLeafType)(o)?r.selectionSet&&e.reportError(new _error.GraphQLError(noSubselectionAllowedMessage(r.name.value,o),[r.selectionSet])):r.selectionSet||e.reportError(new _error.GraphQLError(requiredSubselectionMessage(r.name.value,o),[r])))}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.noSubselectionAllowedMessage=noSubselectionAllowedMessage,exports.requiredSubselectionMessage=requiredSubselectionMessage,exports.ScalarLeafs=ScalarLeafs;var _error=require("../../error"),_definition=require("../../type/definition")},{"../../error":48,"../../type/definition":71 +}],112:[function(require,module,exports){"use strict";function duplicateArgMessage(e){return'There can be only one argument named "'+e+'".'}function UniqueArgumentNames(e){var r=Object.create(null);return{Field:function(){r=Object.create(null)},Directive:function(){r=Object.create(null)},Argument:function(n){var t=n.name.value;return r[t]?e.reportError(new _error.GraphQLError(duplicateArgMessage(t),[r[t],n.name])):r[t]=n.name,!1}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.duplicateArgMessage=duplicateArgMessage,exports.UniqueArgumentNames=UniqueArgumentNames;var _error=require("../../error")},{"../../error":48}],113:[function(require,module,exports){"use strict";function duplicateFragmentNameMessage(e){return'There can only be one fragment named "'+e+'".'}function UniqueFragmentNames(e){var r=Object.create(null);return{OperationDefinition:function(){return!1},FragmentDefinition:function(n){var a=n.name.value;return r[a]?e.reportError(new _error.GraphQLError(duplicateFragmentNameMessage(a),[r[a],n.name])):r[a]=n.name,!1}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.duplicateFragmentNameMessage=duplicateFragmentNameMessage,exports.UniqueFragmentNames=UniqueFragmentNames;var _error=require("../../error")},{"../../error":48}],114:[function(require,module,exports){"use strict";function duplicateInputFieldMessage(e){return'There can be only one input field named "'+e+'".'}function UniqueInputFieldNames(e){var r=[],n=Object.create(null);return{ObjectValue:{enter:function(){r.push(n),n=Object.create(null)},leave:function(){n=r.pop()}},ObjectField:function(r){var t=r.name.value;return n[t]?e.reportError(new _error.GraphQLError(duplicateInputFieldMessage(t),[n[t],r.name])):n[t]=r.name,!1}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.duplicateInputFieldMessage=duplicateInputFieldMessage,exports.UniqueInputFieldNames=UniqueInputFieldNames;var _error=require("../../error")},{"../../error":48}],115:[function(require,module,exports){"use strict";function duplicateOperationNameMessage(e){return'There can only be one operation named "'+e+'".'}function UniqueOperationNames(e){var r=Object.create(null);return{OperationDefinition:function(a){var n=a.name;return n&&(r[n.value]?e.reportError(new _error.GraphQLError(duplicateOperationNameMessage(n.value),[r[n.value],n])):r[n.value]=n),!1},FragmentDefinition:function(){return!1}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.duplicateOperationNameMessage=duplicateOperationNameMessage,exports.UniqueOperationNames=UniqueOperationNames;var _error=require("../../error")},{"../../error":48}],116:[function(require,module,exports){"use strict";function duplicateVariableMessage(e){return'There can be only one variable named "'+e+'".'}function UniqueVariableNames(e){var a=Object.create(null);return{OperationDefinition:function(){a=Object.create(null)},VariableDefinition:function(r){var i=r.variable.name.value;a[i]?e.reportError(new _error.GraphQLError(duplicateVariableMessage(i),[a[i],r.variable.name])):a[i]=r.variable.name}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.duplicateVariableMessage=duplicateVariableMessage,exports.UniqueVariableNames=UniqueVariableNames;var _error=require("../../error")},{"../../error":48}],117:[function(require,module,exports){"use strict";function nonInputTypeOnVarMessage(e,r){return'Variable "$'+e+'" cannot be non-input type "'+r+'".'}function VariablesAreInputTypes(e){return{VariableDefinition:function(r){var n=(0,_typeFromAST.typeFromAST)(e.getSchema(),r.type);if(n&&!(0,_definition.isInputType)(n)){var t=r.variable.name.value;e.reportError(new _error.GraphQLError(nonInputTypeOnVarMessage(t,(0,_printer.print)(r.type)),[r.type]))}}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.nonInputTypeOnVarMessage=nonInputTypeOnVarMessage,exports.VariablesAreInputTypes=VariablesAreInputTypes;var _error=require("../../error"),_printer=require("../../language/printer"),_definition=require("../../type/definition"),_typeFromAST=require("../../utilities/typeFromAST")},{"../../error":48,"../../language/printer":68,"../../type/definition":71,"../../utilities/typeFromAST":92}],118:[function(require,module,exports){"use strict";function badVarPosMessage(e,r,i){return'Variable "$'+e+'" of type "'+String(r)+'" used in '+('position expecting type "'+String(i)+'".')}function VariablesInAllowedPosition(e){var r=Object.create(null);return{OperationDefinition:{enter:function(){r=Object.create(null)},leave:function(i){var t=e.getRecursiveVariableUsages(i);t.forEach(function(i){var t=i.node,o=i.type,a=t.name.value,n=r[a];if(n&&o){var s=e.getSchema(),l=(0,_typeFromAST.typeFromAST)(s,n.type);l&&!(0,_typeComparators.isTypeSubTypeOf)(s,effectiveType(l,n),o)&&e.reportError(new _error.GraphQLError(badVarPosMessage(a,l,o),[n,t]))}})}},VariableDefinition:function(e){r[e.variable.name.value]=e}}}function effectiveType(e,r){return!r.defaultValue||e instanceof _definition.GraphQLNonNull?e:new _definition.GraphQLNonNull(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.badVarPosMessage=badVarPosMessage,exports.VariablesInAllowedPosition=VariablesInAllowedPosition;var _error=require("../../error"),_definition=require("../../type/definition"),_typeComparators=require("../../utilities/typeComparators"),_typeFromAST=require("../../utilities/typeFromAST")},{"../../error":48,"../../type/definition":71,"../../utilities/typeComparators":91,"../../utilities/typeFromAST":92}],119:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.specifiedRules=void 0;var _UniqueOperationNames=require("./rules/UniqueOperationNames"),_LoneAnonymousOperation=require("./rules/LoneAnonymousOperation"),_KnownTypeNames=require("./rules/KnownTypeNames"),_FragmentsOnCompositeTypes=require("./rules/FragmentsOnCompositeTypes"),_VariablesAreInputTypes=require("./rules/VariablesAreInputTypes"),_ScalarLeafs=require("./rules/ScalarLeafs"),_FieldsOnCorrectType=require("./rules/FieldsOnCorrectType"),_UniqueFragmentNames=require("./rules/UniqueFragmentNames"),_KnownFragmentNames=require("./rules/KnownFragmentNames"),_NoUnusedFragments=require("./rules/NoUnusedFragments"),_PossibleFragmentSpreads=require("./rules/PossibleFragmentSpreads"),_NoFragmentCycles=require("./rules/NoFragmentCycles"),_UniqueVariableNames=require("./rules/UniqueVariableNames"),_NoUndefinedVariables=require("./rules/NoUndefinedVariables"),_NoUnusedVariables=require("./rules/NoUnusedVariables"),_KnownDirectives=require("./rules/KnownDirectives"),_KnownArgumentNames=require("./rules/KnownArgumentNames"),_UniqueArgumentNames=require("./rules/UniqueArgumentNames"),_ArgumentsOfCorrectType=require("./rules/ArgumentsOfCorrectType"),_ProvidedNonNullArguments=require("./rules/ProvidedNonNullArguments"),_DefaultValuesOfCorrectType=require("./rules/DefaultValuesOfCorrectType"),_VariablesInAllowedPosition=require("./rules/VariablesInAllowedPosition"),_OverlappingFieldsCanBeMerged=require("./rules/OverlappingFieldsCanBeMerged"),_UniqueInputFieldNames=require("./rules/UniqueInputFieldNames");exports.specifiedRules=[_UniqueOperationNames.UniqueOperationNames,_LoneAnonymousOperation.LoneAnonymousOperation,_KnownTypeNames.KnownTypeNames,_FragmentsOnCompositeTypes.FragmentsOnCompositeTypes,_VariablesAreInputTypes.VariablesAreInputTypes,_ScalarLeafs.ScalarLeafs,_FieldsOnCorrectType.FieldsOnCorrectType,_UniqueFragmentNames.UniqueFragmentNames,_KnownFragmentNames.KnownFragmentNames,_NoUnusedFragments.NoUnusedFragments,_PossibleFragmentSpreads.PossibleFragmentSpreads,_NoFragmentCycles.NoFragmentCycles,_UniqueVariableNames.UniqueVariableNames,_NoUndefinedVariables.NoUndefinedVariables,_NoUnusedVariables.NoUnusedVariables,_KnownDirectives.KnownDirectives,_KnownArgumentNames.KnownArgumentNames,_UniqueArgumentNames.UniqueArgumentNames,_ArgumentsOfCorrectType.ArgumentsOfCorrectType,_ProvidedNonNullArguments.ProvidedNonNullArguments,_DefaultValuesOfCorrectType.DefaultValuesOfCorrectType,_VariablesInAllowedPosition.VariablesInAllowedPosition,_OverlappingFieldsCanBeMerged.OverlappingFieldsCanBeMerged,_UniqueInputFieldNames.UniqueInputFieldNames]},{"./rules/ArgumentsOfCorrectType":95,"./rules/DefaultValuesOfCorrectType":96,"./rules/FieldsOnCorrectType":97,"./rules/FragmentsOnCompositeTypes":98,"./rules/KnownArgumentNames":99,"./rules/KnownDirectives":100,"./rules/KnownFragmentNames":101,"./rules/KnownTypeNames":102,"./rules/LoneAnonymousOperation":103,"./rules/NoFragmentCycles":104,"./rules/NoUndefinedVariables":105,"./rules/NoUnusedFragments":106,"./rules/NoUnusedVariables":107,"./rules/OverlappingFieldsCanBeMerged":108,"./rules/PossibleFragmentSpreads":109,"./rules/ProvidedNonNullArguments":110,"./rules/ScalarLeafs":111,"./rules/UniqueArgumentNames":112,"./rules/UniqueFragmentNames":113,"./rules/UniqueInputFieldNames":114,"./rules/UniqueOperationNames":115,"./rules/UniqueVariableNames":116,"./rules/VariablesAreInputTypes":117,"./rules/VariablesInAllowedPosition":118}],120:[function(require,module,exports){"use strict";function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function validate(e,t,r){(0,_invariant2.default)(e,"Must provide schema"),(0,_invariant2.default)(t,"Must provide document"),(0,_invariant2.default)(e instanceof _schema.GraphQLSchema,"Schema must be an instance of GraphQLSchema. Also ensure that there are not multiple versions of GraphQL installed in your node_modules directory.");var i=new _TypeInfo.TypeInfo(e);return visitUsingRules(e,i,t,r||_specifiedRules.specifiedRules)}function visitUsingRules(e,t,r,i){var n=new ValidationContext(e,r,t),s=i.map(function(e){return e(n)});return(0,_visitor.visit)(r,(0,_visitor.visitWithTypeInfo)(t,(0,_visitor.visitInParallel)(s))),n.getErrors()}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ValidationContext=void 0,exports.validate=validate,exports.visitUsingRules=visitUsingRules;var _invariant=require("../jsutils/invariant"),_invariant2=_interopRequireDefault(_invariant),_visitor=(require("../error"),require("../language/visitor")),_kinds=require("../language/kinds"),Kind=_interopRequireWildcard(_kinds),_schema=require("../type/schema"),_TypeInfo=require("../utilities/TypeInfo"),_specifiedRules=require("./specifiedRules"),ValidationContext=exports.ValidationContext=function(){function e(t,r,i){_classCallCheck(this,e),this._schema=t,this._ast=r,this._typeInfo=i,this._errors=[],this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}return e.prototype.reportError=function(e){this._errors.push(e)},e.prototype.getErrors=function(){return this._errors},e.prototype.getSchema=function(){return this._schema},e.prototype.getDocument=function(){return this._ast},e.prototype.getFragment=function(e){var t=this._fragments;return t||(this._fragments=t=this.getDocument().definitions.reduce(function(e,t){return t.kind===Kind.FRAGMENT_DEFINITION&&(e[t.name.value]=t),e},{})),t[e]},e.prototype.getFragmentSpreads=function(e){var t=this._fragmentSpreads.get(e);if(!t){t=[];for(var r=[e];0!==r.length;)for(var i=r.pop(),n=0;n=0&&r%1===0}function isCollection(t){return Object(t)===t&&(isArrayLike(t)||isIterable(t))}function getIterator(t){var r=getIteratorMethod(t);if(r)return r.call(t)}function getIteratorMethod(t){if(null!=t){var r=SYMBOL_ITERATOR&&t[SYMBOL_ITERATOR]||t["@@iterator"];if("function"==typeof r)return r}}function forEach(t,r,e){if(null!=t){if("function"==typeof t.forEach)return t.forEach(r,e);var o=0,i=getIterator(t);if(i){for(var a;!(a=i.next()).done;)if(r.call(e,a.value,o++,t),o>9999999)throw new TypeError("Near-infinite iteration.")}else if(isArrayLike(t))for(;o=this._o.length?(this._o=void 0,{value:void 0,done:!0}):{value:this._o[this._i++],done:!1}}},{}],122:[function(require,module,exports){(function(global){(function(){function e(e){this.tokens=[],this.tokens.links={},this.options=e||a.defaults,this.rules=p.normal,this.options.gfm&&(this.options.tables?this.rules=p.tables:this.rules=p.gfm)}function t(e,t){if(this.options=t||a.defaults,this.links=e,this.rules=u.normal,this.renderer=this.options.renderer||new n,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=u.breaks:this.rules=u.gfm:this.options.pedantic&&(this.rules=u.pedantic)}function n(e){this.options=e||{}}function r(e){this.tokens=[],this.token=null,this.options=e||a.defaults,this.options.renderer=this.options.renderer||new n,this.renderer=this.options.renderer,this.renderer.options=this.options}function s(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function i(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function l(e,t){return e=e.source,t=t||"",function n(r,s){return r?(s=s.source||s,s=s.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(r,s),n):new RegExp(e,t)}}function o(){}function h(e){for(var t,n,r=1;rAn error occured:

"+s(e.message+"",!0)+"
";throw e}}var p={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:o,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:o,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:o,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};p.bullet=/(?:[*+-]|\d+\.)/,p.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,p.item=l(p.item,"gm")(/bull/g,p.bullet)(),p.list=l(p.list)(/bull/g,p.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+p.def.source+")")(),p.blockquote=l(p.blockquote)("def",p.def)(),p._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",p.html=l(p.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,p._tag)(),p.paragraph=l(p.paragraph)("hr",p.hr)("heading",p.heading)("lheading",p.lheading)("blockquote",p.blockquote)("tag","<"+p._tag)("def",p.def)(),p.normal=h({},p),p.gfm=h({},p.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),p.gfm.paragraph=l(p.paragraph)("(?!","(?!"+p.gfm.fences.source.replace("\\1","\\2")+"|"+p.list.source.replace("\\1","\\3")+"|")(),p.tables=h({},p.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=p,e.lex=function(t,n){var r=new e(n);return r.lex(t)},e.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},e.prototype.token=function(e,t,n){for(var r,s,i,l,o,h,a,u,c,e=e.replace(/^ +$/gm,"");e;)if((i=this.rules.newline.exec(e))&&(e=e.substring(i[0].length),i[0].length>1&&this.tokens.push({type:"space"})),i=this.rules.code.exec(e))e=e.substring(i[0].length),i=i[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?i:i.replace(/\n+$/,"")});else if(i=this.rules.fences.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"code",lang:i[2],text:i[3]||""});else if(i=this.rules.heading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:i[1].length,text:i[2]});else if(t&&(i=this.rules.nptable.exec(e))){for(e=e.substring(i[0].length),h={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/\n$/,"").split("\n")},u=0;u ?/gm,""),this.token(i,t,!0),this.tokens.push({type:"blockquote_end"});else if(i=this.rules.list.exec(e)){for(e=e.substring(i[0].length),l=i[2],this.tokens.push({type:"list_start",ordered:l.length>1}),i=i[0].match(this.rules.item),r=!1,c=i.length,u=0;u1&&o.length>1||(e=i.slice(u+1).join("\n")+e,u=c-1)),s=r||/\n\n(?!\s*$)/.test(h),u!==c-1&&(r="\n"===h.charAt(h.length-1),s||(s=r)),this.tokens.push({type:s?"loose_item_start":"list_item_start"}),this.token(h,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(i=this.rules.html.exec(e))e=e.substring(i[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===i[1]||"script"===i[1]||"style"===i[1]),text:i[0]});else if(!n&&t&&(i=this.rules.def.exec(e)))e=e.substring(i[0].length),this.tokens.links[i[1].toLowerCase()]={href:i[2],title:i[3]};else if(t&&(i=this.rules.table.exec(e))){for(e=e.substring(i[0].length),h={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/(?: *\| *)?\n$/,"").split("\n")},u=0;u])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:o,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:o,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,u.link=l(u.link)("inside",u._inside)("href",u._href)(),u.reflink=l(u.reflink)("inside",u._inside)(),u.normal=h({},u),u.pedantic=h({},u.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),u.gfm=h({},u.normal,{escape:l(u.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:l(u.text)("]|","~]|")("|","|https?://|")()}),u.breaks=h({},u.gfm,{br:l(u.br)("{2,}","*")(),text:l(u.gfm.text)("{2,}","*")()}),t.rules=u,t.output=function(e,n,r){var s=new t(n,r);return s.output(e)},t.prototype.output=function(e){for(var t,n,r,i,l="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),l+=i[1];else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=":"===i[1].charAt(6)?this.mangle(i[1].substring(7)):this.mangle(i[1]),r=this.mangle("mailto:")+n):(n=s(i[1]),r=n),l+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.tag.exec(e))!this.inLink&&/^/i.test(i[0])&&(this.inLink=!1),e=e.substring(i[0].length),l+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):s(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),this.inLink=!0,l+=this.outputLink(i,{href:i[2],title:i[3]}),this.inLink=!1;else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),t=this.links[t.toLowerCase()],!t||!t.href){l+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,l+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),l+=this.renderer.strong(this.output(i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),l+=this.renderer.em(this.output(i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),l+=this.renderer.codespan(s(i[2],!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),l+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),l+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),l+=this.renderer.text(s(this.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(i[0].length),n=s(i[1]),r=n,l+=this.renderer.link(r,null,n);return l},t.prototype.outputLink=function(e,t){var n=s(t.href),r=t.title?s(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,s(e[1]))},t.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},t.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,s=0;s.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},n.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'
'+(n?e:s(e,!0))+"\n
\n":"
"+(n?e:s(e,!0))+"\n
"},n.prototype.blockquote=function(e){return"
\n"+e+"
\n"},n.prototype.html=function(e){return e},n.prototype.heading=function(e,t,n){return"'+e+"\n"},n.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},n.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"\n"},n.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},n.prototype.paragraph=function(e){return"

    "+e+"

    \n"},n.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
    \n"},n.prototype.tablerow=function(e){return"\n"+e+"\n"},n.prototype.tablecell=function(e,t){var n=t.header?"th":"td",r=t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">";return r+e+"\n"},n.prototype.strong=function(e){return""+e+""},n.prototype.em=function(e){return""+e+""},n.prototype.codespan=function(e){return""+e+""},n.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},n.prototype.del=function(e){return""+e+""},n.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(i(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:"))return""}var s='
    "},n.prototype.image=function(e,t,n){var r=''+n+'":">"},n.prototype.text=function(e){return e},r.parse=function(e,t,n){var s=new r(t,n);return s.parse(e)},r.prototype.parse=function(e){this.inline=new t(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var n="";this.next();)n+=this.tok();return n},r.prototype.next=function(){return this.token=this.tokens.pop()},r.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},r.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},r.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,s,i="",l="";for(n="",e=0;e-1?e:t}function f(t,e){if(e=e||{},this.url=t,this.credentials=e.credentials||"omit",this.headers=new r(e.headers),this.method=u(e.method||"GET"),this.mode=e.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&e.body)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(e.body)}function h(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),o=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(o),decodeURIComponent(n))}}),e}function d(t){var e=new r,o=t.getAllResponseHeaders().trim().split("\n");return o.forEach(function(t){var r=t.trim().split(":"),o=r.shift().trim(),n=r.join(":").trim();e.append(o,n)}),e}function l(t,e){e||(e={}),this._initBody(t),this.type="default",this.url=null,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText,this.headers=e.headers instanceof r?e.headers:new r(e.headers),this.url=e.url||""}if(!self.fetch){r.prototype.append=function(r,o){r=t(r),o=e(o);var n=this.map[r];n||(n=[],this.map[r]=n),n.push(o)},r.prototype["delete"]=function(e){delete this.map[t(e)]},r.prototype.get=function(e){var r=this.map[t(e)];return r?r[0]:null},r.prototype.getAll=function(e){return this.map[t(e)]||[]},r.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},r.prototype.set=function(r,o){this.map[t(r)]=[e(o)]},r.prototype.forEach=function(t,e){Object.getOwnPropertyNames(this.map).forEach(function(r){this.map[r].forEach(function(o){t.call(e,o,r,this)},this)},this)};var p={blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in self},c=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];a.call(f.prototype),a.call(l.prototype),self.Headers=r,self.Request=f,self.Response=l,self.fetch=function(t,e){var r;return r=f.prototype.isPrototypeOf(t)&&!e?t:new f(t,e),new Promise(function(t,e){function o(){return"responseURL"in n?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):void 0}var n=new XMLHttpRequest;n.onload=function(){var r=1223===n.status?204:n.status;if(100>r||r>599)return void e(new TypeError("Network request failed"));var s={status:r,statusText:n.statusText,headers:d(n),url:o()},i="response"in n?n.response:n.responseText;t(new l(i,s))},n.onerror=function(){e(new TypeError("Network request failed"))},n.open(r.method,r.url,!0),"include"===r.credentials&&(n.withCredentials=!0),"responseType"in n&&p.blob&&(n.responseType="blob"),r.headers.forEach(function(t,e){n.setRequestHeader(e,t)}),n.send("undefined"==typeof r._bodyInit?null:r._bodyInit)})},self.fetch.polyfill=!0}}(); \ No newline at end of file diff --git a/examples/falcon_sqlalchemy/graphiql/vendor/react-15.0.1.min.js b/examples/falcon_sqlalchemy/graphiql/vendor/react-15.0.1.min.js new file mode 100644 index 00000000..672954ed --- /dev/null +++ b/examples/falcon_sqlalchemy/graphiql/vendor/react-15.0.1.min.js @@ -0,0 +1,16 @@ +/** + * React v15.1.0 + * + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.React=e()}}(function(){return function e(t,n,r){function o(a,u){if(!n[a]){if(!t[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(i)return i(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a8&&11>=x),P=32,w=String.fromCharCode(P),S=f.topLevelTypes,M={beforeInput:{phasedRegistrationNames:{bubbled:C({onBeforeInput:null}),captured:C({onBeforeInputCapture:null})},dependencies:[S.topCompositionEnd,S.topKeyPress,S.topTextInput,S.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:C({onCompositionEnd:null}),captured:C({onCompositionEndCapture:null})},dependencies:[S.topBlur,S.topCompositionEnd,S.topKeyDown,S.topKeyPress,S.topKeyUp,S.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:C({onCompositionStart:null}),captured:C({onCompositionStartCapture:null})},dependencies:[S.topBlur,S.topCompositionStart,S.topKeyDown,S.topKeyPress,S.topKeyUp,S.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:C({onCompositionUpdate:null}),captured:C({onCompositionUpdateCapture:null})},dependencies:[S.topBlur,S.topCompositionUpdate,S.topKeyDown,S.topKeyPress,S.topKeyUp,S.topMouseDown]}},k=!1,R=null,D={eventTypes:M,extractEvents:function(e,t,n,r){return[l(e,t,n,r),d(e,t,n,r)]}};t.exports=D},{101:101,140:140,158:158,16:16,20:20,21:21,97:97}],3:[function(e,t,n){"use strict";function r(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var o={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!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},i=["Webkit","ms","Moz","O"];Object.keys(o).forEach(function(e){i.forEach(function(t){o[r(t,e)]=o[e]})});var a={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},u={isUnitlessNumber:o,shorthandPropertyExpansions:a};t.exports=u},{}],4:[function(e,t,n){"use strict";var r=e(3),o=e(140),i=(e(70),e(142),e(114)),a=e(153),u=e(160),s=(e(164),u(function(e){return a(e)})),l=!1,c="cssFloat";if(o.canUseDOM){var p=document.createElement("div").style;try{p.font=""}catch(d){l=!0}void 0===document.documentElement.style.cssFloat&&(c="styleFloat")}var f={createMarkupForStyles:function(e,t){var n="";for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];null!=o&&(n+=s(r)+":",n+=i(r,o,t)+";")}return n||null},setValueForStyles:function(e,t,n){var o=e.style;for(var a in t)if(t.hasOwnProperty(a)){var u=i(a,t[a],n);if("float"!==a&&"cssFloat"!==a||(a=c),u)o[a]=u;else{var s=l&&r.shorthandPropertyExpansions[a];if(s)for(var p in s)o[p]="";else o[a]=""}}}};t.exports=f},{114:114,140:140,142:142,153:153,160:160,164:164,3:3,70:70}],5:[function(e,t,n){"use strict";function r(){this._callbacks=null,this._contexts=null}var o=e(165),i=e(25),a=e(154);o(r.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){e.length!==t.length?a(!1):void 0,this._callbacks=null,this._contexts=null;for(var n=0;n8));var L=!1;_.canUseDOM&&(L=P("input")&&(!("documentMode"in document)||document.documentMode>11));var U={get:function(){return O.get.call(this)},set:function(e){I=""+e,O.set.call(this,e)}},F={eventTypes:k,extractEvents:function(e,t,n,o){var i,a,u=t?E.getNodeFromInstance(t):window;if(r(u)?A?i=s:a=l:w(u)?L?i=f:(i=v,a=h):m(u)&&(i=g),i){var c=i(e,t);if(c){var p=N.getPooled(k.change,c,n,o);return p.type="change",b.accumulateTwoPhaseDispatches(p),p}}a&&a(e,u,t)}};t.exports=F},{122:122,129:129,130:130,140:140,158:158,16:16,17:17,20:20,40:40,90:90,99:99}],7:[function(e,t,n){"use strict";function r(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}function o(e,t,n){c.insertTreeBefore(e,t,n)}function i(e,t,n){Array.isArray(t)?u(e,t[0],t[1],n):m(e,t,n)}function a(e,t){if(Array.isArray(t)){var n=t[1];t=t[0],s(e,t,n),e.removeChild(n)}e.removeChild(t)}function u(e,t,n,r){for(var o=t;;){var i=o.nextSibling;if(m(e,o,r),o===n)break;o=i}}function s(e,t,n){for(;;){var r=t.nextSibling;if(r===n)break;e.removeChild(r)}}function l(e,t,n){var r=e.parentNode,o=e.nextSibling;o===t?n&&m(r,document.createTextNode(n),o):n?(v(o,n),s(r,o,t)):s(r,e,t)}var c=e(8),p=e(12),d=e(74),f=(e(40),e(70),e(113)),h=e(134),v=e(135),m=f(function(e,t,n){e.insertBefore(t,n)}),g=p.dangerouslyReplaceNodeWithMarkup,y={dangerouslyReplaceNodeWithMarkup:g,replaceDelimitedText:l,processUpdates:function(e,t){for(var n=0;nt||e.hasOverloadedBooleanValue&&t===!1}var i=e(10),a=(e(40),e(48),e(70),e(132)),u=(e(164),new RegExp("^["+i.ATTRIBUTE_NAME_START_CHAR+"]["+i.ATTRIBUTE_NAME_CHAR+"]*$")),s={},l={},c={createMarkupForID:function(e){return i.ID_ATTRIBUTE_NAME+"="+a(e)},setAttributeForID:function(e,t){e.setAttribute(i.ID_ATTRIBUTE_NAME,t)},createMarkupForRoot:function(){return i.ROOT_ATTRIBUTE_NAME+'=""'},setAttributeForRoot:function(e){e.setAttribute(i.ROOT_ATTRIBUTE_NAME,"")},createMarkupForProperty:function(e,t){var n=i.properties.hasOwnProperty(e)?i.properties[e]:null;if(n){if(o(n,t))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&t===!0?r+'=""':r+"="+a(t)}return i.isCustomAttribute(e)?null==t?"":e+"="+a(t):null},createMarkupForCustomAttribute:function(e,t){return r(e)&&null!=t?e+"="+a(t):""},setValueForProperty:function(e,t,n){var r=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(r){var a=r.mutationMethod;if(a)a(e,n);else{if(o(r,n))return void this.deleteValueForProperty(e,t);if(r.mustUseProperty){var u=r.propertyName;r.hasSideEffects&&""+e[u]==""+n||(e[u]=n)}else{var s=r.attributeName,l=r.attributeNamespace;l?e.setAttributeNS(l,s,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&n===!0?e.setAttribute(s,""):e.setAttribute(s,""+n)}}}else if(i.isCustomAttribute(t))return void c.setValueForAttribute(e,t,n)},setValueForAttribute:function(e,t,n){r(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))},deleteValueForProperty:function(e,t){var n=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(n){var r=n.mutationMethod;if(r)r(e,void 0);else if(n.mustUseProperty){var o=n.propertyName;n.hasBooleanValue?e[o]=!1:n.hasSideEffects&&""+e[o]==""||(e[o]="")}else e.removeAttribute(n.attributeName)}else i.isCustomAttribute(t)&&e.removeAttribute(t)}};t.exports=c},{10:10,132:132,164:164,40:40,48:48,70:70}],12:[function(e,t,n){"use strict";function r(e){return e.substring(1,e.indexOf(" "))}var o=e(8),i=e(140),a=e(145),u=e(146),s=e(150),l=e(154),c=/^(<[^ \/>]+)/,p="data-danger-index",d={dangerouslyRenderMarkup:function(e){i.canUseDOM?void 0:l(!1);for(var t,n={},o=0;o-1?void 0:a(!1),!l.plugins[n]){t.extractEvents?void 0:a(!1),l.plugins[n]=t;var r=t.eventTypes;for(var i in r)o(r[i],t,i)?void 0:a(!1)}}}function o(e,t,n){l.eventNameDispatchConfigs.hasOwnProperty(n)?a(!1):void 0,l.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var u=r[o];i(u,t,n)}return!0}return e.registrationName?(i(e.registrationName,t,n),!0):!1}function i(e,t,n){l.registrationNameModules[e]?a(!1):void 0,l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=e(154),u=null,s={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){u?a(!1):void 0,u=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];s.hasOwnProperty(n)&&s[n]===o||(s[n]?a(!1):void 0,s[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=l.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){u=null;for(var e in s)s.hasOwnProperty(e)&&delete s[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=l.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=l},{154:154}],19:[function(e,t,n){"use strict";function r(e){return e===y.topMouseUp||e===y.topTouchEnd||e===y.topTouchCancel}function o(e){return e===y.topMouseMove||e===y.topTouchMove}function i(e){return e===y.topMouseDown||e===y.topTouchStart}function a(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=C.getNodeFromInstance(r),t?v.invokeGuardedCallbackWithCatch(o,n,e):v.invokeGuardedCallback(o,n,e),e.currentTarget=null}function u(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;oe&&n[e]===o[e];e++);var a=r-e;for(t=1;a>=t&&n[r-t]===o[i-t];t++);var u=t>1?1-t:void 0;return this._fallbackText=o.slice(e,u),this._fallbackText}}),i.addPoolingTo(r),t.exports=r},{126:126,165:165,25:25}],22:[function(e,t,n){"use strict";var r=e(10),o=r.injection.MUST_USE_PROPERTY,i=r.injection.HAS_BOOLEAN_VALUE,a=r.injection.HAS_SIDE_EFFECTS,u=r.injection.HAS_NUMERIC_VALUE,s=r.injection.HAS_POSITIVE_NUMERIC_VALUE,l=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,c={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:i,allowTransparency:0,alt:0,async:i,autoComplete:0,autoPlay:i,capture:i,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:o|i,cite:0,classID:0,className:0,cols:s,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:i,coords:0,crossOrigin:0,data:0,dateTime:0,"default":i,defer:i,dir:0,disabled:i,download:l,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:i,formTarget:0,frameBorder:0,headers:0,height:0,hidden:i,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:i,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:o|i,muted:o|i,name:0,nonce:0,noValidate:i,open:i,optimum:0,pattern:0,placeholder:0,poster:0,preload:0,profile:0,radioGroup:0,readOnly:i,rel:0,required:i,reversed:i,role:0,rows:s,rowSpan:u,sandbox:0,scope:0,scoped:i,scrolling:0,seamless:i,selected:o|i,shape:0,size:s,sizes:0,span:s,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:u,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:o|a,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,"typeof":0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:i,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{}};t.exports=c},{10:10}],23:[function(e,t,n){"use strict";function r(e){var t=/[=:]/g,n={"=":"=0",":":"=2"},r=(""+e).replace(t,function(e){return n[e]});return"$"+r}function o(e){var t=/(=0|=2)/g,n={"=0":"=","=2":":"},r="."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1);return(""+r).replace(t,function(e){return n[e]})}var i={escape:r,unescape:o};t.exports=i},{}],24:[function(e,t,n){"use strict";function r(e){null!=e.checkedLink&&null!=e.valueLink?l(!1):void 0}function o(e){r(e),null!=e.value||null!=e.onChange?l(!1):void 0}function i(e){r(e),null!=e.checked||null!=e.onChange?l(!1):void 0}function a(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var u=e(81),s=e(80),l=e(154),c=(e(164),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),p={value:function(e,t,n){return!e[t]||c[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:u.func},d={},f={checkPropTypes:function(e,t,n){for(var r in p){if(p.hasOwnProperty(r))var o=p[r](t,r,e,s.prop);o instanceof Error&&!(o.message in d)&&(d[o.message]=!0,a(n))}},getValue:function(e){return e.valueLink?(o(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(i(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(o(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(i(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};t.exports=f},{154:154,164:164,80:80,81:81}],25:[function(e,t,n){"use strict";var r=e(154),o=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},i=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},a=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},u=function(e,t,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,e,t,n,r),i}return new o(e,t,n,r)},s=function(e,t,n,r,o){var i=this;if(i.instancePool.length){var a=i.instancePool.pop();return i.call(a,e,t,n,r,o),a}return new i(e,t,n,r,o)},l=function(e){var t=this;e instanceof t?void 0:r(!1),e.destructor(),t.instancePool.length=0||null!=t.is}function p(e){var t=e.type;l(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._nativeNode=null,this._nativeParent=null,this._rootNodeID=null,this._domID=null,this._nativeContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var d=e(165),f=e(1),h=e(4),v=e(8),m=e(9),g=e(10),y=e(11),C=e(16),b=e(17),_=e(18),E=e(27),x=e(32),N=e(37),T=e(39),P=e(40),w=e(47),S=e(49),M=e(50),k=e(54),R=(e(70),e(73)),D=e(87),I=(e(146),e(115)),O=e(154),A=(e(129),e(158)),L=(e(163),e(138),e(164),T),U=b.deleteListener,F=P.getNodeFromInstance,V=E.listenTo,B=_.registrationNameModules,j={string:!0,number:!0},W=A({style:null}),K=A({__html:null}),H={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},q=11,Y={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"},z={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},G={listing:!0,pre:!0,textarea:!0},X=d({menuitem:!0},z),Q=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,$={},Z={}.hasOwnProperty,J=1;p.displayName="ReactDOMComponent",p.Mixin={mountComponent:function(e,t,n,o){this._rootNodeID=J++,this._domID=n._idCounter++,this._nativeParent=t,this._nativeContainerInfo=n;var i=this._currentElement.props;switch(this._tag){case"iframe":case"object":case"img":case"form":case"video":case"audio":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(u,this);break;case"button":i=N.getNativeProps(this,i,t);break;case"input":w.mountWrapper(this,i,t),i=w.getNativeProps(this,i),e.getReactMountReady().enqueue(u,this);break;case"option":S.mountWrapper(this,i,t),i=S.getNativeProps(this,i);break;case"select":M.mountWrapper(this,i,t),i=M.getNativeProps(this,i),e.getReactMountReady().enqueue(u,this);break;case"textarea":k.mountWrapper(this,i,t),i=k.getNativeProps(this,i),e.getReactMountReady().enqueue(u,this)}r(this,i);var s,l;null!=t?(s=t._namespaceURI,l=t._tag):n._tag&&(s=n._namespaceURI,l=n._tag),(null==s||s===m.svg&&"foreignobject"===l)&&(s=m.html),s===m.html&&("svg"===this._tag?s=m.svg:"math"===this._tag&&(s=m.mathml)),this._namespaceURI=s;var c;if(e.useCreateElement){var p,d=n._ownerDocument;if(s===m.html)if("script"===this._tag){var h=d.createElement("div"),g=this._currentElement.type;h.innerHTML="<"+g+">",p=h.removeChild(h.firstChild)}else p=d.createElement(this._currentElement.type,i.is||null);else p=d.createElementNS(s,this._currentElement.type);P.precacheNode(this,p),this._flags|=L.hasCachedChildNodes,this._nativeParent||y.setAttributeForRoot(p),this._updateDOMProperties(null,i,e);var C=v(p);this._createInitialChildren(e,i,o,C),c=C}else{var b=this._createOpenTagMarkupAndPutListeners(e,i),_=this._createContentMarkup(e,i,o);c=!_&&z[this._tag]?b+"/>":b+">"+_+""}switch(this._tag){case"button":case"input":case"select":case"textarea":i.autoFocus&&e.getReactMountReady().enqueue(f.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(a,this)}return c},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(null!=i)if(B.hasOwnProperty(r))i&&o(this,r,i,e);else{r===W&&(i&&(i=this._previousStyleCopy=d({},t.style)),i=h.createMarkupForStyles(i,this));var a=null;null!=this._tag&&c(this._tag,t)?H.hasOwnProperty(r)||(a=y.createMarkupForCustomAttribute(r,i)):a=y.createMarkupForProperty(r,i),a&&(n+=" "+a)}}return e.renderToStaticMarkup?n:(this._nativeParent||(n+=" "+y.createMarkupForRoot()),n+=" "+y.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var i=j[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)r=I(i);else if(null!=a){var u=this.mountChildren(a,e,n);r=u.join("")}}return G[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&v.queueHTML(r,o.__html);else{var i=j[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)v.queueText(r,i);else if(null!=a)for(var u=this.mountChildren(a,e,n),s=0;s"},receiveComponent:function(){},getNativeNode:function(){return i.getNodeFromInstance(this)},unmountComponent:function(){i.uncacheNode(this)}}),t.exports=a},{165:165,40:40,8:8}],44:[function(e,t,n){"use strict";function r(e){return o.createFactory(e)}var o=e(60),i=(e(61),e(159)),a=i({a:"a",abbr:"abbr",address:"address",area:"area",article:"article",aside:"aside",audio:"audio", +b:"b",base:"base",bdi:"bdi",bdo:"bdo",big:"big",blockquote:"blockquote",body:"body",br:"br",button:"button",canvas:"canvas",caption:"caption",cite:"cite",code:"code",col:"col",colgroup:"colgroup",data:"data",datalist:"datalist",dd:"dd",del:"del",details:"details",dfn:"dfn",dialog:"dialog",div:"div",dl:"dl",dt:"dt",em:"em",embed:"embed",fieldset:"fieldset",figcaption:"figcaption",figure:"figure",footer:"footer",form:"form",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",head:"head",header:"header",hgroup:"hgroup",hr:"hr",html:"html",i:"i",iframe:"iframe",img:"img",input:"input",ins:"ins",kbd:"kbd",keygen:"keygen",label:"label",legend:"legend",li:"li",link:"link",main:"main",map:"map",mark:"mark",menu:"menu",menuitem:"menuitem",meta:"meta",meter:"meter",nav:"nav",noscript:"noscript",object:"object",ol:"ol",optgroup:"optgroup",option:"option",output:"output",p:"p",param:"param",picture:"picture",pre:"pre",progress:"progress",q:"q",rp:"rp",rt:"rt",ruby:"ruby",s:"s",samp:"samp",script:"script",section:"section",select:"select",small:"small",source:"source",span:"span",strong:"strong",style:"style",sub:"sub",summary:"summary",sup:"sup",table:"table",tbody:"tbody",td:"td",textarea:"textarea",tfoot:"tfoot",th:"th",thead:"thead",time:"time",title:"title",tr:"tr",track:"track",u:"u",ul:"ul","var":"var",video:"video",wbr:"wbr",circle:"circle",clipPath:"clipPath",defs:"defs",ellipse:"ellipse",g:"g",image:"image",line:"line",linearGradient:"linearGradient",mask:"mask",path:"path",pattern:"pattern",polygon:"polygon",polyline:"polyline",radialGradient:"radialGradient",rect:"rect",stop:"stop",svg:"svg",text:"text",tspan:"tspan"},r);t.exports=a},{159:159,60:60,61:61}],45:[function(e,t,n){"use strict";var r={useCreateElement:!0};t.exports=r},{}],46:[function(e,t,n){"use strict";var r=e(7),o=e(40),i={dangerouslyProcessChildrenUpdates:function(e,t){var n=o.getNodeFromInstance(e);r.processUpdates(n,t)}};t.exports=i},{40:40,7:7}],47:[function(e,t,n){"use strict";function r(){this._rootNodeID&&d.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=s.executeOnChange(t,e);c.asap(r,this);var o=t.name;if("radio"===t.type&&null!=o){for(var i=l.getNodeFromInstance(this),a=i;a.parentNode;)a=a.parentNode;for(var u=a.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),d=0;dt.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function u(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,o=Math.min(t.start,r),i=void 0===t.end?o:Math.min(t.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var u=l(e,o),s=l(e,i);if(u&&s){var p=document.createRange();p.setStart(u.node,u.offset),n.removeAllRanges(),o>i?(n.addRange(p),n.extend(s.node,s.offset)):(p.setEnd(s.node,s.offset),n.addRange(p))}}}var s=e(140),l=e(125),c=e(126),p=s.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:p?o:i,setOffsets:p?a:u};t.exports=d},{125:125,126:126,140:140}],52:[function(e,t,n){"use strict";var r=e(59),o=e(86),i=e(91);r.inject();var a={renderToString:o.renderToString,renderToStaticMarkup:o.renderToStaticMarkup,version:i};t.exports=a},{59:59,86:86,91:91}],53:[function(e,t,n){"use strict";var r=e(165),o=e(7),i=e(8),a=e(40),u=(e(70),e(115)),s=e(154),l=(e(138),function(e){this._currentElement=e,this._stringText=""+e,this._nativeNode=null,this._nativeParent=null,this._domID=null,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});r(l.prototype,{mountComponent:function(e,t,n,r){var o=n._idCounter++,s=" react-text: "+o+" ",l=" /react-text ";if(this._domID=o,this._nativeParent=t,e.useCreateElement){var c=n._ownerDocument,p=c.createComment(s),d=c.createComment(l),f=i(c.createDocumentFragment());return i.queueChild(f,i(p)),this._stringText&&i.queueChild(f,i(c.createTextNode(this._stringText))),i.queueChild(f,i(d)),a.precacheNode(this,p),this._closingComment=d,f}var h=u(this._stringText);return e.renderToStaticMarkup?h:""+h+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getNativeNode();o.replaceDelimitedText(r[0],r[1],n)}}},getNativeNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=a.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n?s(!1):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return e=[this._nativeNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,a.uncacheNode(this)}}),t.exports=l},{115:115,138:138,154:154,165:165,40:40,7:7,70:70,8:8}],54:[function(e,t,n){"use strict";function r(){this._rootNodeID&&d.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=s.executeOnChange(t,e);return c.asap(r,this),n}var i=e(165),a=e(14),u=e(11),s=e(24),l=e(40),c=e(90),p=e(154),d=(e(164),{getNativeProps:function(e,t){null!=t.dangerouslySetInnerHTML?p(!1):void 0;var n=i({},a.getNativeProps(e,t),{defaultValue:void 0,value:void 0,children:e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return n},mountWrapper:function(e,t){var n=t.defaultValue,r=t.children;null!=r&&(null!=n?p(!1):void 0,Array.isArray(r)&&(r.length<=1?void 0:p(!1),r=r[0]),n=""+r),null==n&&(n="");var i=s.getValue(t);e._wrapperState={initialValue:""+(null!=i?i:n),listeners:null,onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=s.getValue(t);null!=n&&u.setValueForProperty(l.getNodeFromInstance(e),"value",""+n)}});t.exports=d},{11:11,14:14,154:154,164:164,165:165,24:24,40:40,90:90}],55:[function(e,t,n){"use strict";function r(e,t){"_nativeNode"in e?void 0:s(!1),"_nativeNode"in t?void 0:s(!1);for(var n=0,r=e;r;r=r._nativeParent)n++;for(var o=0,i=t;i;i=i._nativeParent)o++;for(;n-o>0;)e=e._nativeParent,n--;for(;o-n>0;)t=t._nativeParent,o--;for(var a=n;a--;){if(e===t)return e;e=e._nativeParent,t=t._nativeParent}return null}function o(e,t){"_nativeNode"in e?void 0:s(!1),"_nativeNode"in t?void 0:s(!1);for(;t;){if(t===e)return!0;t=t._nativeParent}return!1}function i(e){return"_nativeNode"in e?void 0:s(!1),e._nativeParent}function a(e,t,n){for(var r=[];e;)r.push(e),e=e._nativeParent;var o;for(o=r.length;o-- >0;)t(r[o],!1,n);for(o=0;o0;)n(s[l],!1,i)}var s=e(154);t.exports={isAncestor:o,getLowestCommonAncestor:r,getParentInstance:i,traverseTwoPhase:a,traverseEnterLeave:u}},{154:154}],56:[function(e,t,n){"use strict";var r,o=(e(10),e(18),e(164),{onCreateMarkupForProperty:function(e,t){r(e)},onSetValueForProperty:function(e,t,n){r(t)},onDeleteValueForProperty:function(e,t){r(t)}});t.exports=o},{10:10,164:164,18:18}],57:[function(e,t,n){"use strict";function r(e,t,n,r,o,i){}function o(e){}var i=(e(140),e(162),e(164),[]),a={addDevtool:function(e){i.push(e)},removeDevtool:function(e){for(var t=0;t1){for(var f=Array(d),h=0;d>h;h++)f[h]=arguments[h+2];i.children=f}if(e&&e.defaultProps){var v=e.defaultProps;for(r in v)void 0===i[r]&&(i[r]=v[r])}return u(e,s,l,c,p,o.current,i)},u.createFactory=function(e){var t=u.createElement.bind(null,e);return t.type=e,t},u.cloneAndReplaceKey=function(e,t){var n=u(e.type,t,e.ref,e._self,e._source,e._owner,e.props);return n},u.cloneElement=function(e,t,n){var i,s=r({},e.props),l=e.key,c=e.ref,p=e._self,d=e._source,f=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,f=o.current),void 0!==t.key&&(l=""+t.key);var h;e.type&&e.type.defaultProps&&(h=e.type.defaultProps);for(i in t)t.hasOwnProperty(i)&&!a.hasOwnProperty(i)&&(void 0===t[i]&&void 0!==h?s[i]=h[i]:s[i]=t[i])}var v=arguments.length-2;if(1===v)s.children=n;else if(v>1){for(var m=Array(v),g=0;v>g;g++)m[g]=arguments[g+2];s.children=m}return u(e.type,l,c,p,d,f,s)},u.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.exports=u},{112:112,164:164,165:165,35:35}],61:[function(e,t,n){"use strict";function r(){if(p.current){var e=p.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function o(e,t){e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,i("uniqueKey",e,t))}function i(e,t,n){var o=r();if(!o){var i="string"==typeof n?n:n.displayName||n.name;i&&(o=" Check the top-level render call using <"+i+">.")}var a=h[e]||(h[e]={});if(a[o])return null;a[o]=!0;var u={parentOrOwner:o,url:" See https://fb.me/react-warning-keys for more information.",childOwner:null};return t&&t._owner&&t._owner!==p.current&&(u.childOwner=" It was passed a child from "+t._owner.getName()+"."),u}function a(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n/,i=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return i.test(e)?e:e.replace(o," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=r(e);return o===n}};t.exports=a},{111:111}],72:[function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;n>r;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function o(e){return e?e.nodeType===D?e.documentElement:e.firstChild:null}function i(e){return e.getAttribute&&e.getAttribute(M)||""}function a(e,t,n,r,o){var i;if(C.logTopLevelRenders){var a=e._currentElement.props,u=a.type;i="React mount: "+("string"==typeof u?u:u.displayName||u.name),console.time(i)}var s=_.mountComponent(e,n,null,m(e,t),o);i&&console.timeEnd(i),e._renderedComponent._topLevelWrapper=e,U._mountImageIntoNode(s,t,e,r,n)}function u(e,t,n,r){var o=x.ReactReconcileTransaction.getPooled(!n&&g.useCreateElement);o.perform(a,null,e,t,o,n,r),x.ReactReconcileTransaction.release(o)}function s(e,t,n){for(_.unmountComponent(e,n),t.nodeType===D&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function l(e){var t=o(e);if(t){var n=v.getInstanceFromNode(t);return!(!n||!n._nativeParent)}}function c(e){var t=o(e),n=t&&v.getInstanceFromNode(t);return n&&!n._nativeParent?n:null}function p(e){var t=c(e);return t?t._nativeContainerInfo._topLevelWrapper:null}var d=e(8),f=e(10),h=e(27),v=(e(35),e(40)),m=e(41),g=e(45),y=e(60),C=e(66),b=(e(70),e(71)),_=e(83),E=e(89),x=e(90),N=e(147),T=e(128),P=e(154),w=e(134),S=e(136),M=(e(164),f.ID_ATTRIBUTE_NAME),k=f.ROOT_ATTRIBUTE_NAME,R=1,D=9,I=11,O={},A=1,L=function(){this.rootID=A++};L.prototype.isReactComponent={},L.prototype.render=function(){return this.props};var U={TopLevelWrapper:L,_instancesByReactRootID:O,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return U.scrollMonitor(n,function(){E.enqueueElementInternal(e,t),r&&E.enqueueCallbackInternal(e,r)}),e},_renderNewRootComponent:function(e,t,n,r){!t||t.nodeType!==R&&t.nodeType!==D&&t.nodeType!==I?P(!1):void 0,h.ensureScrollValueMonitoring();var o=T(e);x.batchedUpdates(u,o,t,n,r);var i=o._instance.rootID;return O[i]=o,o},renderSubtreeIntoContainer:function(e,t,n,r){return null==e||null==e._reactInternalInstance?P(!1):void 0,U._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){E.validateCallback(r,"ReactDOM.render"),y.isValidElement(t)?void 0:P(!1);var a=y(L,null,null,null,null,null,t),u=p(n);if(u){var s=u._currentElement,c=s.props;if(S(c,t)){var d=u._renderedComponent.getPublicInstance(),f=r&&function(){r.call(d)};return U._updateRootComponent(u,a,n,f),d}U.unmountComponentAtNode(n)}var h=o(n),v=h&&!!i(h),m=l(n),g=v&&!u&&!m,C=U._renderNewRootComponent(a,n,g,null!=e?e._reactInternalInstance._processChildContext(e._reactInternalInstance._context):N)._renderedComponent.getPublicInstance();return r&&r.call(C),C},render:function(e,t,n){return U._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){!e||e.nodeType!==R&&e.nodeType!==D&&e.nodeType!==I?P(!1):void 0;var t=p(e);return t?(delete O[t._instance.rootID],x.batchedUpdates(s,t,e,!1),!0):(l(e),1===e.nodeType&&e.hasAttribute(k),!1)},_mountImageIntoNode:function(e,t,n,i,a){if(!t||t.nodeType!==R&&t.nodeType!==D&&t.nodeType!==I?P(!1):void 0,i){var u=o(t);if(b.canReuseMarkup(e,u))return void v.precacheNode(n,u);var s=u.getAttribute(b.CHECKSUM_ATTR_NAME);u.removeAttribute(b.CHECKSUM_ATTR_NAME);var l=u.outerHTML;u.setAttribute(b.CHECKSUM_ATTR_NAME,s);var c=e,p=r(c,l);" (client) "+c.substring(p-20,p+20)+"\n (server) "+l.substring(p-20,p+20),t.nodeType===D?P(!1):void 0}if(t.nodeType===D?P(!1):void 0,a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);d.insertTreeBefore(t,e,null)}else w(t,e),v.precacheNode(n,t.firstChild)}};t.exports=U},{10:10,128:128,134:134,136:136,147:147,154:154,164:164,27:27,35:35,40:40,41:41,45:45,60:60,66:66,70:70,71:71,8:8,83:83,89:89,90:90}],73:[function(e,t,n){"use strict";function r(e,t,n){return{type:p.INSERT_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:n,afterNode:t}}function o(e,t,n){return{type:p.MOVE_EXISTING,content:null,fromIndex:e._mountIndex,fromNode:d.getNativeNode(e),toIndex:n,afterNode:t}}function i(e,t){return{type:p.REMOVE_NODE,content:null,fromIndex:e._mountIndex,fromNode:t,toIndex:null,afterNode:null}}function a(e){return{type:p.SET_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function u(e){return{type:p.TEXT_CONTENT,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function s(e,t){return t&&(e=e||[],e.push(t)),e}function l(e,t){c.processChildrenUpdates(e,t)}var c=e(33),p=(e(70),e(74)),d=(e(35),e(83)),f=e(28),h=(e(146),e(117)),v=e(154),m={Mixin:{_reconcilerInstantiateChildren:function(e,t,n){return f.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,r,o){var i;return i=h(t),f.updateChildren(e,i,n,r,o),i},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var o=[],i=0;for(var a in r)if(r.hasOwnProperty(a)){var u=r[a],s=d.mountComponent(u,t,this,this._nativeContainerInfo,n);u._mountIndex=i++,o.push(s)}return o},updateTextContent:function(e){var t=this._renderedChildren;f.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&v(!1);var r=[u(e)];l(this,r)},updateMarkup:function(e){var t=this._renderedChildren;f.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&v(!1);var r=[a(e)];l(this,r)},updateChildren:function(e,t,n){this._updateChildren(e,t,n)},_updateChildren:function(e,t,n){var r=this._renderedChildren,o={},i=this._reconcilerUpdateChildren(r,e,o,t,n);if(i||r){var a,u=null,c=0,p=0,f=null;for(a in i)if(i.hasOwnProperty(a)){var h=r&&r[a],v=i[a];h===v?(u=s(u,this.moveChild(h,f,p,c)),c=Math.max(h._mountIndex,c),h._mountIndex=p):(h&&(c=Math.max(h._mountIndex,c)),u=s(u,this._mountChildAtIndex(v,f,p,t,n))),p++,f=d.getNativeNode(v)}for(a in o)o.hasOwnProperty(a)&&(u=s(u,this._unmountChild(r[a],o[a])));u&&l(this,u),this._renderedChildren=i}},unmountChildren:function(e){var t=this._renderedChildren;f.unmountChildren(t,e),this._renderedChildren=null},moveChild:function(e,t,n,r){return e._mountIndex>",N={array:i("array"),bool:i("boolean"),func:i("function"),number:i("number"),object:i("object"),string:i("string"),any:a(),arrayOf:u,element:s(),instanceOf:l,node:f(),objectOf:p,oneOf:c,oneOfType:d,shape:h};t.exports=N},{123:123,146:146,60:60,79:79}],82:[function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=i.getPooled(null),this.useCreateElement=e}var o=e(165),i=e(5),a=e(25),u=e(27),s=e(68),l=e(108),c={initialize:s.getSelectionInformation,close:s.restoreSelection},p={initialize:function(){var e=u.isEnabled();return u.setEnabled(!1),e},close:function(e){u.setEnabled(e)}},d={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},f=[c,p,d],h={getTransactionWrappers:function(){return f},getReactMountReady:function(){return this.reactMountReady},checkpoint:function(){return this.reactMountReady.checkpoint()},rollback:function(e){this.reactMountReady.rollback(e)},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null}};o(r.prototype,l.Mixin,h),a.addPoolingTo(r),t.exports=r},{108:108,165:165,25:25,27:27,5:5,68:68}],83:[function(e,t,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=e(84),i=(e(70),e(154)),a={mountComponent:function(e,t,n,o,i){var a=e.mountComponent(t,n,o,i);return e._currentElement&&null!=e._currentElement.ref&&t.getReactMountReady().enqueue(r,e),a},getNativeNode:function(e){return e.getNativeNode()},unmountComponent:function(e,t){o.detachRefs(e,e._currentElement),e.unmountComponent(t)},receiveComponent:function(e,t,n,i){var a=e._currentElement;if(t!==a||i!==e._context){var u=o.shouldUpdateRefs(a,t);u&&o.detachRefs(e,a),e.receiveComponent(t,n,i),u&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t,n){return e._updateBatchNumber!==n?void(null!=e._updateBatchNumber&&e._updateBatchNumber!==n+1?i(!1):void 0):void e.performUpdateIfNecessary(t)}};t.exports=a},{154:154,70:70,84:84}],84:[function(e,t,n){"use strict";function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):i.addComponentAsRefTo(t,e,n)}function o(e,t,n){"function"==typeof e?e(null):i.removeComponentAsRefFrom(t,e,n)}var i=e(78),a={};a.attachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&r(n,e,t._owner)}},a.shouldUpdateRefs=function(e,t){var n=null===e||e===!1,r=null===t||t===!1;return n||r||t._owner!==e._owner||t.ref!==e.ref},a.detachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&o(n,e,t._owner)}},t.exports=a},{78:78}],85:[function(e,t,n){"use strict";var r={isBatchingUpdates:!1,batchedUpdates:function(e){}};t.exports=r},{}],86:[function(e,t,n){"use strict";function r(e,t){var n;try{return f.injection.injectBatchingStrategy(p),n=d.getPooled(t),n.perform(function(){var r=v(e),o=c.mountComponent(r,n,null,a(),h);return t||(o=l.addChecksumToMarkup(o)),o},null)}finally{d.release(n),f.injection.injectBatchingStrategy(u)}}function o(e){return s.isValidElement(e)?void 0:m(!1),r(e,!1)}function i(e){return s.isValidElement(e)?void 0:m(!1),r(e,!0)}var a=e(41),u=e(58),s=e(60),l=(e(70),e(71)),c=e(83),p=e(85),d=e(87),f=e(90),h=e(147),v=e(128),m=e(154);t.exports={renderToString:o,renderToStaticMarkup:i}},{128:128,147:147,154:154,41:41,58:58,60:60,70:70,71:71,83:83,85:85,87:87,90:90}],87:[function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.useCreateElement=!1}var o=e(165),i=e(25),a=e(108),u=[],s={enqueue:function(){}},l={getTransactionWrappers:function(){return u},getReactMountReady:function(){return s},destructor:function(){},checkpoint:function(){},rollback:function(){}};o(r.prototype,a.Mixin,l),i.addPoolingTo(r),t.exports=r},{108:108,165:165,25:25}],88:[function(e,t,n){"use strict";var r=e(165),o=e(36),i=e(52),a=e(26),u=r({__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:o,__SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:i},a);t.exports=u},{165:165,26:26,36:36,52:52}],89:[function(e,t,n){"use strict";function r(e){a.enqueueUpdate(e)}function o(e,t){var n=i.get(e);return n?n:null}var i=(e(35),e(69)),a=e(90),u=e(154),s=(e(164),{isMounted:function(e){var t=i.get(e);return t?!!t._renderedComponent:!1},enqueueCallback:function(e,t,n){s.validateCallback(t,n);var i=o(e);return i?(i._pendingCallbacks?i._pendingCallbacks.push(t):i._pendingCallbacks=[t],void r(i)):null},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=o(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=o(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=o(e,"setState");if(n){var i=n._pendingStateQueue||(n._pendingStateQueue=[]);i.push(t),r(n)}},enqueueElementInternal:function(e,t){e._pendingElement=t,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e?u(!1):void 0}});t.exports=s},{154:154,164:164,35:35,69:69,90:90}],90:[function(e,t,n){"use strict";function r(){w.ReactReconcileTransaction&&_?void 0:m(!1)}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=p.getPooled(),this.reconcileTransaction=w.ReactReconcileTransaction.getPooled(!0)}function i(e,t,n,o,i,a){r(),_.batchedUpdates(e,t,n,o,i,a)}function a(e,t){return e._mountOrder-t._mountOrder}function u(e){var t=e.dirtyComponentsLength;t!==g.length?m(!1):void 0,g.sort(a),y++;for(var n=0;t>n;n++){var r=g[n],o=r._pendingCallbacks;r._pendingCallbacks=null;var i;if(f.logTopLevelRenders){var u=r;r._currentElement.props===r._renderedComponent._currentElement&&(u=r._renderedComponent),i="React update: "+u.getName(),console.time(i)}if(h.performUpdateIfNecessary(r,e.reconcileTransaction,y),i&&console.timeEnd(i),o)for(var s=0;sr;){for(var u=Math.min(r+4096,a);u>r;r+=4)n+=(t+=e.charCodeAt(r))+(t+=e.charCodeAt(r+1))+(t+=e.charCodeAt(r+2))+(t+=e.charCodeAt(r+3));t%=o,n%=o}for(;i>r;r++)n+=t+=e.charCodeAt(r);return t%=o,n%=o,t|n<<16}var o=65521;t.exports=r},{}],112:[function(e,t,n){"use strict";var r=!1;t.exports=r},{}],113:[function(e,t,n){"use strict";var r=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e};t.exports=r},{}],114:[function(e,t,n){"use strict";function r(e,t,n){var r=null==t||"boolean"==typeof t||""===t;if(r)return"";var o=isNaN(t);return o||0===t||i.hasOwnProperty(e)&&i[e]?""+t:("string"==typeof t&&(t=t.trim()),t+"px")}var o=e(3),i=(e(164),o.isUnitlessNumber);t.exports=r},{164:164,3:3}],115:[function(e,t,n){"use strict";function r(e){return i[e]}function o(e){return(""+e).replace(a,r)}var i={"&":"&",">":">","<":"<",'"':""","'":"'"},a=/[&><"']/g;t.exports=o},{}],116:[function(e,t,n){"use strict";function r(e){if(null==e)return null;if(1===e.nodeType)return e;var t=i.get(e);return t?(t=a(t),t?o.getNodeFromInstance(t):null):void u(("function"==typeof e.render,!1))}var o=(e(35),e(40)),i=e(69),a=e(124),u=e(154);e(164);t.exports=r},{124:124,154:154,164:164,35:35,40:40,69:69}],117:[function(e,t,n){"use strict";function r(e,t,n){var r=e,o=void 0===r[n];o&&null!=t&&(r[n]=t)}function o(e){if(null==e)return e;var t={};return i(e,r,t),t}var i=(e(23),e(137));e(164);t.exports=o},{137:137,164:164,23:23}],118:[function(e,t,n){"use strict";var r=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};t.exports=r},{}],119:[function(e,t,n){"use strict";function r(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}t.exports=r},{}],120:[function(e,t,n){"use strict";function r(e){if(e.key){var t=i[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=o(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?a[e.keyCode]||"Unidentified":""}var o=e(119),i={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={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"};t.exports=r},{119:119}],121:[function(e,t,n){"use strict";function r(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=i[e];return r?!!n[r]:!1}function o(e){return r}var i={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=o},{}],122:[function(e,t,n){"use strict";function r(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}t.exports=r},{}],123:[function(e,t,n){"use strict";function r(e){var t=e&&(o&&e[o]||e[i]);return"function"==typeof t?t:void 0}var o="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";t.exports=r},{}],124:[function(e,t,n){"use strict";function r(e){for(var t;(t=e._renderedNodeType)===o.COMPOSITE;)e=e._renderedComponent;return t===o.NATIVE?e._renderedComponent:t===o.EMPTY?null:void 0}var o=e(76);t.exports=r},{76:76}],125:[function(e,t,n){"use strict";function r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function o(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function i(e,t){for(var n=r(e),i=0,a=0;n;){if(3===n.nodeType){if(a=i+n.textContent.length,t>=i&&a>=t)return{node:n,offset:t-i};i=a}n=r(o(n))}}t.exports=i},{}],126:[function(e,t,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=e(140),i=null;t.exports=r},{140:140}],127:[function(e,t,n){"use strict";function r(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}function o(e){if(u[e])return u[e];if(!a[e])return e;var t=a[e];for(var n in t)if(t.hasOwnProperty(n)&&n in s)return u[e]=t[n];return""}var i=e(140),a={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},u={},s={};i.canUseDOM&&(s=document.createElement("div").style,"AnimationEvent"in window||(delete a.animationend.animation,delete a.animationiteration.animation,delete a.animationstart.animation),"TransitionEvent"in window||delete a.transitionend.transition),t.exports=o},{140:140}],128:[function(e,t,n){"use strict";function r(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function o(e){var t,n=null===e||e===!1;if(n)t=u.create(o);else if("object"==typeof e){var i=e;!i||"function"!=typeof i.type&&"string"!=typeof i.type?l(!1):void 0,t="string"==typeof i.type?s.createInternalComponent(i):r(i.type)?new i.type(i):new c(i)}else"string"==typeof e||"number"==typeof e?t=s.createInstanceForText(e):l(!1);return t._mountIndex=0,t._mountImage=null,t}var i=e(165),a=e(34),u=e(62),s=e(75),l=(e(70),e(154)),c=(e(164),function(e){this.construct(e)});i(c.prototype,a.Mixin,{_instantiateReactComponent:o});t.exports=o},{154:154,164:164,165:165,34:34,62:62,70:70,75:75}],129:[function(e,t,n){"use strict";function r(e,t){if(!i.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,i=e(140);i.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=r},{140:140}],130:[function(e,t,n){"use strict";function r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&o[e.type]||"textarea"===t)}var o={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};t.exports=r},{}],131:[function(e,t,n){"use strict";function r(e){return o.isValidElement(e)?void 0:i(!1),e}var o=e(60),i=e(154);t.exports=r},{154:154,60:60}],132:[function(e,t,n){"use strict";function r(e){return'"'+o(e)+'"'}var o=e(115);t.exports=r},{115:115}],133:[function(e,t,n){"use strict";var r=e(72);t.exports=r.renderSubtreeIntoContainer},{72:72}],134:[function(e,t,n){"use strict";var r=e(140),o=/^[ \r\n\t\f]/,i=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,a=e(113),u=a(function(e,t){e.innerHTML=t});if(r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(u=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),o.test(t)||"<"===t[0]&&i.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),s=null}t.exports=u},{113:113,140:140}],135:[function(e,t,n){"use strict";var r=e(140),o=e(115),i=e(134),a=function(e,t){e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){i(e,o(t))})),t.exports=a},{115:115,134:134,140:140}],136:[function(e,t,n){"use strict";function r(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var o=typeof e,i=typeof t;return"string"===o||"number"===o?"string"===i||"number"===i:"object"===i&&e.type===t.type&&e.key===t.key}t.exports=r},{}],137:[function(e,t,n){"use strict";function r(e,t){return e&&"object"==typeof e&&null!=e.key?l.escape(e.key):t.toString(36)}function o(e,t,n,i){var d=typeof e;if("undefined"!==d&&"boolean"!==d||(e=null),null===e||"string"===d||"number"===d||a.isValidElement(e))return n(i,e,""===t?c+r(e,0):t),1;var f,h,v=0,m=""===t?c:t+p;if(Array.isArray(e))for(var g=0;go;o++)r[o]=e[o];return r}function o(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function i(e){return o(e)?Array.isArray(e)?e.slice():r(e):[e]}var a=e(154);t.exports=i},{154:154}],145:[function(e,t,n){"use strict";function r(e){var t=e.match(c);return t&&t[1].toLowerCase()}function o(e,t){var n=l;l?void 0:s(!1);var o=r(e),i=o&&u(o);if(i){n.innerHTML=i[1]+e+i[2];for(var c=i[0];c--;)n=n.lastChild}else n.innerHTML=e;var p=n.getElementsByTagName("script");p.length&&(t?void 0:s(!1),a(p).forEach(t));for(var d=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return d}var i=e(140),a=e(144),u=e(150),s=e(154),l=i.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;t.exports=o},{140:140,144:144,150:150,154:154}],146:[function(e,t,n){"use strict";function r(e){return function(){return e}}function o(){}o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},t.exports=o},{}],147:[function(e,t,n){"use strict";var r={};t.exports=r},{}],148:[function(e,t,n){"use strict";function r(e){try{e.focus()}catch(t){}}t.exports=r},{}],149:[function(e,t,n){"use strict";function r(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}t.exports=r},{}],150:[function(e,t,n){"use strict";function r(e){return a?void 0:i(!1),d.hasOwnProperty(e)||(e="*"),u.hasOwnProperty(e)||("*"===e?a.innerHTML="":a.innerHTML="<"+e+">",u[e]=!a.firstChild),u[e]?d[e]:null}var o=e(140),i=e(154),a=o.canUseDOM?document.createElement("div"):null,u={},s=[1,'"],l=[1,"","
    "],c=[3,"","
    "],p=[1,'',""],d={"*":[1,"?
    ","
    "],area:[1,"",""],col:[2,"","
    "],legend:[1,"
    ","
    "],param:[1,"",""],tr:[2,"","
    "],optgroup:s,option:s,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c},f=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];f.forEach(function(e){d[e]=p,u[e]=!0}),t.exports=r},{140:140,154:154}],151:[function(e,t,n){"use strict";function r(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}t.exports=r},{}],152:[function(e,t,n){"use strict";function r(e){return e.replace(o,"-$1").toLowerCase()}var o=/([A-Z])/g;t.exports=r},{}],153:[function(e,t,n){"use strict";function r(e){return o(e).replace(i,"-ms-")}var o=e(152),i=/^ms-/;t.exports=r},{152:152}],154:[function(e,t,n){"use strict";function r(e,t,n,r,o,i,a,u){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,i,a,u],c=0;s=new Error(t.replace(/%s/g,function(){return l[c++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}t.exports=r},{}],155:[function(e,t,n){"use strict";function r(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}t.exports=r},{}],156:[function(e,t,n){"use strict";function r(e){return o(e)&&3==e.nodeType}var o=e(155);t.exports=r},{155:155}],157:[function(e,t,n){"use strict";var r=e(154),o=function(e){var t,n={};e instanceof Object&&!Array.isArray(e)?void 0:r(!1);for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};t.exports=o},{154:154}],158:[function(e,t,n){"use strict";var r=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};t.exports=r},{}],159:[function(e,t,n){"use strict";function r(e,t,n){if(!e)return null;var r={};for(var i in e)o.call(e,i)&&(r[i]=t.call(n,e[i],i,e));return r}var o=Object.prototype.hasOwnProperty;t.exports=r},{}],160:[function(e,t,n){"use strict";function r(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}t.exports=r},{}],161:[function(e,t,n){"use strict";var r,o=e(140);o.canUseDOM&&(r=window.performance||window.msPerformance||window.webkitPerformance),t.exports=r||{}},{140:140}],162:[function(e,t,n){"use strict";var r,o=e(161);r=o.now?function(){return o.now()}:function(){return Date.now()},t.exports=r},{161:161}],163:[function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function o(e,t){if(r(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var a=0;an;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(i){return!1}}var i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.exports=o()?Object.assign:function(e,t){for(var n,o,u=r(e),s=1;s Date: Wed, 3 Oct 2018 11:05:03 +1000 Subject: [PATCH 2/3] Updated the README files to include the new example. --- README.md | 1 + README.rst | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 82d39296..8d5ce61a 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,7 @@ To learn more check out the following [examples](examples/): - [Flask SQLAlchemy example](examples/flask_sqlalchemy) - [Nameko SQLAlchemy example](examples/nameko_sqlalchemy) +- [Falcon SQLAlchemy example](examples/falcon_sqlalchemy) ## Contributing diff --git a/README.rst b/README.rst index d82b8071..339d3db1 100644 --- a/README.rst +++ b/README.rst @@ -75,8 +75,12 @@ Then you can simply query the schema: To learn more check out the following `examples `__: -- **Full example**: `Flask SQLAlchemy +- **Full example (Flask)**: `Flask SQLAlchemy example `__ +- **Full example (Nameko)**: `Nameko SQLAlchemy + example `__ +- **Full example (Falcon)**: `Falcon SQLAlchemy + example `__ Contributing ------------ From f850b81ee254554cedb7c11812e973978624761e Mon Sep 17 00:00:00 2001 From: Adamos Kyriakou Date: Wed, 3 Oct 2018 11:16:55 +1000 Subject: [PATCH 3/3] Removed unit-tests as they run into CI issues under the `examples` directory. --- examples/falcon_sqlalchemy/tests/__init__.py | 1 - examples/falcon_sqlalchemy/tests/demo_test.py | 152 ------------------ 2 files changed, 153 deletions(-) delete mode 100644 examples/falcon_sqlalchemy/tests/__init__.py delete mode 100644 examples/falcon_sqlalchemy/tests/demo_test.py diff --git a/examples/falcon_sqlalchemy/tests/__init__.py b/examples/falcon_sqlalchemy/tests/__init__.py deleted file mode 100644 index 9bad5790..00000000 --- a/examples/falcon_sqlalchemy/tests/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# coding=utf-8 diff --git a/examples/falcon_sqlalchemy/tests/demo_test.py b/examples/falcon_sqlalchemy/tests/demo_test.py deleted file mode 100644 index 8c57724a..00000000 --- a/examples/falcon_sqlalchemy/tests/demo_test.py +++ /dev/null @@ -1,152 +0,0 @@ -# coding=utf-8 - -import unittest - -from graphene.test import Client -import sqlalchemy.orm - -from demo.schema import schema - - -class DemoTest(unittest.TestCase): - - def setUp(self): - # Create engine to local SQLite database. - engine = sqlalchemy.create_engine("sqlite:///demo.db", echo=True) - - # Prepare a DB session. - session_maker = sqlalchemy.orm.sessionmaker(bind=engine) - self.session = session_maker() - - # Prepare a Graphene client. - self.client = Client(schema) - - def tearDown(self): - self.session.close() - - def test_query_get_author_by_id(self): - """Tests the retrieval of a single author by ID.""" - - query = """ - query getAuthor{ - author(authorId: 1) { - nameFirst, - nameLast - } - } - """ - - result_refr = { - "data": { - "author": { - "nameFirst": "Robert", - "nameLast": "Jordan", - } - } - } - - result_eval = self.client.execute( - query, context_value={"session": self.session} - ) - - self.assertDictEqual(result_refr, result_eval) - - def test_get_author_by_name_include_books(self): - """Tests the retrieval of a single author and their books by first name - .""" - - query = """ - query getAuthor{ - author(nameFirst: "Brandon") { - nameFirst, - nameLast, - books { - title, - year - } - } - } - """ - - result_refr = { - "data": { - "author": { - "nameFirst": "Brandon", - "nameLast": "Sanderson", - "books": [ - { - "title": "The Gathering Storm", - "year": 2009, - }, - { - "title": "Towers of Midnight", - "year": 2010, - }, - { - "title": "A Memory of Light", - "year": 2013, - }, - ], - } - } - } - - result_eval = self.client.execute( - query, context_value={"session": self.session} - ) - - self.assertDictEqual(result_refr, result_eval) - - def test_get_author_by_name_include_books_fragment(self): - """Tests the retrieval of a single author and their books by first name - while using query fragments.""" - - query = """ - query getAuthor{ - author(nameFirst: "Brandon") { - ...authorFields - books { - ...bookFields - } - } - } - - fragment authorFields on TypeAuthor { - nameFirst, - nameLast - } - - fragment bookFields on TypeBook { - title, - year - } - """ - - result_refr = { - "data": { - "author": { - "nameFirst": "Brandon", - "nameLast": "Sanderson", - "books": [ - { - "title": "The Gathering Storm", - "year": 2009, - }, - { - "title": "Towers of Midnight", - "year": 2010, - }, - { - "title": "A Memory of Light", - "year": 2013, - }, - ], - } - } - } - - result_eval = self.client.execute( - query, context_value={"session": self.session} - ) - - self.assertDictEqual(result_refr, result_eval)