diff --git a/graphene_django/forms/forms.py b/graphene_django/forms/forms.py
index 4b81859..1ceab7f 100644
--- a/graphene_django/forms/forms.py
+++ b/graphene_django/forms/forms.py
@@ -1,5 +1,6 @@
import binascii
+from django import forms
from django.core.exceptions import ValidationError
from django.forms import CharField, Field, MultipleChoiceField
from django.utils.translation import gettext_lazy as _
@@ -38,3 +39,16 @@ class GlobalIDMultipleChoiceField(MultipleChoiceField):
# Clean will raise a validation error if there is a problem
GlobalIDFormField().clean(value)
return True
+
+
+class HeaderForm(forms.Form):
+ # make a ChoiceField for 'JWT' and other methods -- use a widget?
+ headers = forms.CharField(help_text="Enter auth method to be stored in the
as HTTP_AUTHORIZATION", initial="JWT ")
+
+ def clean_auth(self):
+ data = self.cleaned_data['headers']
+
+ #raise ValidationError()
+
+ # Remember to always return the cleaned data.
+ return data
diff --git a/graphene_django/static/graphiql/css/graphiql.css b/graphene_django/static/graphiql/css/graphiql.css
new file mode 100755
index 0000000..919b4e9
--- /dev/null
+++ b/graphene_django/static/graphiql/css/graphiql.css
@@ -0,0 +1,1609 @@
+.graphiql-container,
+.graphiql-container button,
+.graphiql-container input {
+ color: #141823;
+ 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;
+}
+
+.graphiql-container {
+ display: flex;
+ flex-direction: row;
+ height: 100%;
+ margin: 0;
+ overflow: hidden;
+ width: 100%;
+}
+
+.graphiql-container .editorWrap {
+ display: flex;
+ flex-direction: column;
+ flex: 1;
+ overflow-x: hidden;
+}
+
+.graphiql-container .title {
+ font-size: 18px;
+}
+
+.graphiql-container .title em {
+ font-family: georgia;
+ font-size: 19px;
+}
+
+.graphiql-container .topBarWrap {
+ display: flex;
+ flex-direction: row;
+}
+
+.graphiql-container .topBar {
+ align-items: center;
+ background: linear-gradient(#f7f7f7, #e2e2e2);
+ border-bottom: 1px solid #d0d0d0;
+ cursor: default;
+ display: flex;
+ flex-direction: row;
+ flex: 1;
+ height: 34px;
+ overflow-y: visible;
+ padding: 7px 14px 6px;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.graphiql-container .toolbar {
+ overflow-x: visible;
+ display: flex;
+}
+
+.graphiql-container .docExplorerShow,
+.graphiql-container .historyShow {
+ background: linear-gradient(#f7f7f7, #e2e2e2);
+ border-radius: 0;
+ border-bottom: 1px solid #d0d0d0;
+ border-right: none;
+ border-top: none;
+ color: #3B5998;
+ cursor: pointer;
+ font-size: 14px;
+ margin: 0;
+ outline: 0;
+ padding: 2px 20px 0 18px;
+}
+
+.graphiql-container .docExplorerShow {
+ border-left: 1px solid rgba(0, 0, 0, 0.2);
+}
+
+.graphiql-container .historyShow {
+ border-right: 1px solid rgba(0, 0, 0, 0.2);
+ border-left: 0;
+}
+
+.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;
+ -ms-transform: rotate(-45deg);
+ transform: rotate(-45deg);
+ width: 9px;
+}
+
+.graphiql-container .editorBar {
+ display: flex;
+ flex-direction: row;
+ flex: 1;
+}
+
+.graphiql-container .queryWrap {
+ display: flex;
+ flex-direction: column;
+ flex: 1;
+}
+
+.graphiql-container .resultWrap {
+ border-left: solid 1px #e0e0e0;
+ display: flex;
+ flex-direction: column;
+ flex: 1;
+ position: relative;
+}
+
+.graphiql-container .docExplorerWrap,
+.graphiql-container .historyPaneWrap {
+ background: white;
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
+ position: relative;
+ z-index: 3;
+}
+
+.graphiql-container .historyPaneWrap {
+ min-width: 230px;
+ z-index: 5;
+}
+
+.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 div .query-editor {
+ flex: 1;
+ position: relative;
+}
+
+.graphiql-container .variable-editor {
+ display: flex;
+ flex-direction: column;
+ height: 30px;
+ 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;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.graphiql-container .codemirrorWrap {
+ flex: 1;
+ height: 100%;
+ position: relative;
+}
+
+.graphiql-container .result-window {
+ flex: 1;
+ height: 100%;
+ 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;
+}
+
+/* No `.graphiql-container` here so themes can overwrite */
+.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: linear-gradient(#f9f9f9, #ececec);
+ border-radius: 3px;
+ box-shadow:
+ inset 0 0 0 1px rgba(0,0,0,0.20),
+ 0 1px 0 rgba(255,255,255, 0.7),
+ inset 0 1px #fff;
+ color: #555;
+ cursor: pointer;
+ display: inline-block;
+ margin: 0 5px;
+ padding: 3px 11px 5px;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ max-width: 150px;
+}
+
+.graphiql-container .toolbar-button:active {
+ background: linear-gradient(#ececec, #d5d5d5);
+ box-shadow:
+ 0 1px 0 rgba(255, 255, 255, 0.7),
+ inset 0 0 0 1px rgba(0,0,0,0.10),
+ inset 0 1px 1px 1px rgba(0, 0, 0, 0.12),
+ inset 0 0 5px rgba(0, 0, 0, 0.1);
+}
+
+.graphiql-container .toolbar-button.error {
+ background: linear-gradient(#fdf3f3, #e6d6d7);
+ color: #b00;
+}
+
+.graphiql-container .toolbar-button-group {
+ margin: 0 5px;
+ white-space: nowrap;
+}
+
+.graphiql-container .toolbar-button-group > * {
+ margin: 0;
+}
+
+.graphiql-container .toolbar-button-group > *:not(:last-child) {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+
+.graphiql-container .toolbar-button-group > *:not(:first-child) {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+ margin-left: -1px;
+}
+
+.graphiql-container .execute-button-wrap {
+ height: 34px;
+ margin: 0 14px 0 28px;
+ position: relative;
+}
+
+.graphiql-container .execute-button {
+ background: linear-gradient(#fdfdfd, #d2d3d6);
+ border-radius: 17px;
+ border: 1px solid rgba(0,0,0,0.25);
+ 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: linear-gradient(#e6e6e6, #c3c3c3);
+ box-shadow:
+ 0 1px 0 #fff,
+ inset 0 0 2px rgba(0, 0, 0, 0.2),
+ inset 0 0 6px rgba(0, 0, 0, 0.1);
+}
+
+.graphiql-container .execute-button:focus {
+ outline: 0;
+}
+
+.graphiql-container .toolbar-menu,
+.graphiql-container .toolbar-select {
+ position: relative;
+}
+
+.graphiql-container .execute-options,
+.graphiql-container .toolbar-menu-items,
+.graphiql-container .toolbar-select-options {
+ background: #fff;
+ box-shadow:
+ 0 0 0 1px rgba(0,0,0,0.1),
+ 0 2px 4px rgba(0,0,0,0.25);
+ margin: 0;
+ padding: 6px 0;
+ position: absolute;
+ z-index: 100;
+}
+
+.graphiql-container .execute-options {
+ min-width: 100px;
+ top: 37px;
+ left: -1px;
+}
+
+.graphiql-container .toolbar-menu-items {
+ left: 1px;
+ margin-top: -1px;
+ min-width: 110%;
+ top: 100%;
+ visibility: hidden;
+}
+
+.graphiql-container .toolbar-menu-items.open {
+ visibility: visible;
+}
+
+.graphiql-container .toolbar-select-options {
+ left: 0;
+ min-width: 100%;
+ top: -5px;
+ visibility: hidden;
+}
+
+.graphiql-container .toolbar-select-options.open {
+ visibility: visible;
+}
+
+.graphiql-container .execute-options > li,
+.graphiql-container .toolbar-menu-items > li,
+.graphiql-container .toolbar-select-options > li {
+ cursor: pointer;
+ display: block;
+ margin: none;
+ max-width: 300px;
+ overflow: hidden;
+ padding: 2px 20px 4px 11px;
+ white-space: nowrap;
+}
+
+.graphiql-container .execute-options > li.selected,
+.graphiql-container .toolbar-menu-items > li.hover,
+.graphiql-container .toolbar-menu-items > li:active,
+.graphiql-container .toolbar-menu-items > li:hover,
+.graphiql-container .toolbar-select-options > li.hover,
+.graphiql-container .toolbar-select-options > li:active,
+.graphiql-container .toolbar-select-options > li:hover,
+.graphiql-container .history-contents > p:hover,
+.graphiql-container .history-contents > p:active {
+ background: #e10098;
+ color: #fff;
+}
+
+.graphiql-container .toolbar-select-options > li > svg {
+ display: inline;
+ fill: #666;
+ margin: 0 -6px 0 6px;
+ pointer-events: none;
+ vertical-align: middle;
+}
+
+.graphiql-container .toolbar-select-options > li.hover > svg,
+.graphiql-container .toolbar-select-options > li:active > svg,
+.graphiql-container .toolbar-select-options > li:hover > svg {
+ fill: #fff;
+}
+
+.graphiql-container .CodeMirror-scroll {
+ 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 {
+ box-orient: vertical;
+ color: #141823;
+ display: flex;
+ 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-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: #CA9800;
+ cursor: pointer;
+ display: inline;
+ margin-right: 0.5em;
+}
+
+.autoInsertedLeaf.cm-property {
+ animation-duration: 6s;
+ animation-name: insertionFade;
+ border-bottom: 2px solid rgba(255, 255, 255, 0);
+ border-radius: 2px;
+ margin: -2px -4px -1px;
+ padding: 2px 4px 1px;
+}
+
+@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-radius: 2px;
+ border: 0;
+ color: #141823;
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
+ font-size: 13px;
+ line-height: 16px;
+ max-width: 430px;
+ opacity: 0;
+ padding: 8px 10px;
+ transition: opacity 0.15s;
+ white-space: pre-wrap;
+}
+
+div.CodeMirror-lint-tooltip > * {
+ padding-left: 23px;
+}
+
+div.CodeMirror-lint-tooltip > * + * {
+ margin-top: 12px;
+}
+
+/* COLORS */
+
+.graphiql-container .CodeMirror-foldmarker {
+ border-radius: 4px;
+ background: #08f;
+ 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 */
+ color: black;
+ font-family: monospace;
+ height: 300px;
+}
+
+/* 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 {
+ color: #999;
+ min-width: 20px;
+ padding: 0 3px 0 5px;
+ text-align: right;
+ white-space: nowrap;
+}
+
+.CodeMirror-guttermarker { color: black; }
+.CodeMirror-guttermarker-subtle { color: #999; }
+
+/* CURSOR */
+
+.CodeMirror .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 {
+ background: #7e7;
+ border: 0;
+ width: auto;
+}
+.CodeMirror.cm-fat-cursor div.CodeMirror-cursors {
+ z-index: 1;
+}
+
+.cm-animate-fat-cursor {
+ animation: blink 1.06s steps(1) infinite;
+ border: 0;
+ width: auto;
+}
+@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 {
+ background: white;
+ overflow: hidden;
+ position: relative;
+}
+
+.CodeMirror-scroll {
+ height: 100%;
+ /* 30px is the magic margin used to hide the element's real scrollbars */
+ /* See overflow: hidden in .CodeMirror */
+ margin-bottom: -30px; margin-right: -30px;
+ outline: none; /* Prevent dragging from highlighting the element */
+ overflow: scroll !important; /* Things will break if this is overridden */
+ padding-bottom: 30px;
+ position: relative;
+}
+.CodeMirror-sizer {
+ border-right: 30px solid transparent;
+ position: relative;
+}
+
+/* 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 {
+ display: none;
+ position: absolute;
+ z-index: 6;
+}
+.CodeMirror-vscrollbar {
+ overflow-x: hidden;
+ overflow-y: scroll;
+ right: 0; top: 0;
+}
+.CodeMirror-hscrollbar {
+ bottom: 0; left: 0;
+ overflow-x: scroll;
+ overflow-y: hidden;
+}
+.CodeMirror-scrollbar-filler {
+ right: 0; bottom: 0;
+}
+.CodeMirror-gutter-filler {
+ left: 0; bottom: 0;
+}
+
+.CodeMirror-gutters {
+ min-height: 100%;
+ position: absolute; left: 0; top: 0;
+ z-index: 3;
+}
+.CodeMirror-gutter {
+ display: inline-block;
+ height: 100%;
+ margin-bottom: -30px;
+ vertical-align: top;
+ white-space: normal;
+ /* Hack to make IE7 behave */
+ *zoom:1;
+ *display:inline;
+}
+.CodeMirror-gutter-wrapper {
+ background: none !important;
+ border: none !important;
+ position: absolute;
+ z-index: 4;
+}
+.CodeMirror-gutter-background {
+ position: absolute;
+ top: 0; bottom: 0;
+ z-index: 4;
+}
+.CodeMirror-gutter-elt {
+ cursor: default;
+ position: absolute;
+ z-index: 4;
+}
+.CodeMirror-gutter-wrapper {
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.CodeMirror-lines {
+ cursor: text;
+ min-height: 1px; /* prevents collapsing before first draw */
+}
+.CodeMirror pre {
+ -webkit-tap-highlight-color: transparent;
+ /* Reset some styles that the rest of the page might have set */
+ background: transparent;
+ border-radius: 0;
+ border-width: 0;
+ color: inherit;
+ font-family: inherit;
+ font-size: inherit;
+ font-variant-ligatures: none;
+ line-height: inherit;
+ margin: 0;
+ overflow: visible;
+ position: relative;
+ white-space: pre;
+ word-wrap: normal;
+ z-index: 2;
+}
+.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 {
+ overflow: auto;
+ position: relative;
+ z-index: 2;
+}
+
+.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 {
+ box-sizing: content-box;
+}
+
+.CodeMirror-measure {
+ height: 0;
+ overflow: hidden;
+ position: absolute;
+ visibility: hidden;
+ width: 100%;
+}
+
+.CodeMirror-cursor { position: absolute; }
+.CodeMirror-measure pre { position: static; }
+
+div.CodeMirror-cursors {
+ position: relative;
+ visibility: hidden;
+ 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; }
+
+.CodeMirror-dialog {
+ background: inherit;
+ color: inherit;
+ left: 0; right: 0;
+ overflow: hidden;
+ padding: .1em .8em;
+ position: absolute;
+ z-index: 15;
+}
+
+.CodeMirror-dialog-top {
+ border-bottom: 1px solid #eee;
+ top: 0;
+}
+
+.CodeMirror-dialog-bottom {
+ border-top: 1px solid #eee;
+ bottom: 0;
+}
+
+.CodeMirror-dialog input {
+ background: transparent;
+ border: 1px solid #d3d6db;
+ color: inherit;
+ font-family: monospace;
+ outline: none;
+ width: 20em;
+}
+
+.CodeMirror-dialog button {
+ font-size: 70%;
+}
+.graphiql-container .doc-explorer {
+ background: white;
+}
+
+.graphiql-container .doc-explorer-title-bar,
+.graphiql-container .history-title-bar {
+ cursor: default;
+ display: flex;
+ height: 34px;
+ line-height: 14px;
+ padding: 8px 8px 5px;
+ position: relative;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.graphiql-container .doc-explorer-title,
+.graphiql-container .history-title {
+ flex: 1;
+ font-weight: bold;
+ overflow-x: hidden;
+ padding: 10px 0 10px 10px;
+ text-align: center;
+ text-overflow: ellipsis;
+ -webkit-user-select: text;
+ -moz-user-select: text;
+ -ms-user-select: text;
+ user-select: text;
+ white-space: nowrap;
+}
+
+.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;
+}
+
+.doc-explorer-narrow .doc-explorer-back {
+ width: 0;
+}
+
+.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;
+ -ms-transform: rotate(-45deg);
+ transform: rotate(-45deg);
+ width: 9px;
+}
+
+.graphiql-container .doc-explorer-rhs {
+ position: relative;
+}
+
+.graphiql-container .doc-explorer-contents,
+.graphiql-container .history-contents {
+ background-color: #ffffff;
+ border-top: 1px solid #d6d6d6;
+ bottom: 0;
+ left: 0;
+ overflow-y: auto;
+ padding: 20px 15px;
+ position: absolute;
+ right: 0;
+ top: 47px;
+}
+
+.graphiql-container .doc-explorer-contents {
+ min-width: 300px;
+}
+
+.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 > :first-child {
+ margin-top: 4px;
+}
+
+.graphiql-container .doc-value-description > :last-child {
+ margin-bottom: 4px;
+}
+
+.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;
+ -moz-user-select: none;
+ -ms-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 .field-short-description {
+ color: #999;
+ margin-left: 5px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.graphiql-container .enum-value {
+ color: #0B7FC7;
+}
+
+.graphiql-container .arg-name {
+ color: #8B2BB9;
+}
+
+.graphiql-container .arg {
+ display: block;
+ margin-left: 1em;
+}
+
+.graphiql-container .arg:first-child:last-child,
+.graphiql-container .arg:first-child:nth-last-child(2),
+.graphiql-container .arg:first-child:nth-last-child(2) ~ .arg {
+ display: inherit;
+ margin: inherit;
+}
+
+.graphiql-container .arg:first-child:nth-last-child(2):after {
+ content: ', ';
+}
+
+.graphiql-container .arg-default-value {
+ color: #43A047;
+}
+
+.graphiql-container .doc-deprecation {
+ background: #fffae8;
+ box-shadow: inset 0 0 1px #bfb063;
+ color: #867F70;
+ line-height: 16px;
+ margin: 8px -8px;
+ max-height: 80px;
+ overflow: hidden;
+ padding: 8px;
+ border-radius: 3px;
+}
+
+.graphiql-container .doc-deprecation:before {
+ content: 'Deprecated:';
+ color: #c79b2e;
+ cursor: default;
+ display: block;
+ font-size: 9px;
+ font-weight: bold;
+ letter-spacing: 1px;
+ line-height: 1;
+ padding-bottom: 5px;
+ text-transform: uppercase;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.graphiql-container .doc-deprecation > :first-child {
+ margin-top: 0;
+}
+
+.graphiql-container .doc-deprecation > :last-child {
+ margin-bottom: 0;
+}
+
+.graphiql-container .show-btn {
+ -webkit-appearance: initial;
+ display: block;
+ border-radius: 3px;
+ border: solid 1px #ccc;
+ text-align: center;
+ padding: 8px 12px 10px;
+ width: 100%;
+ box-sizing: border-box;
+ background: #fbfcfc;
+ color: #555;
+ cursor: pointer;
+}
+
+.graphiql-container .search-box {
+ border-bottom: 1px solid #d3d6db;
+ display: block;
+ font-size: 14px;
+ margin: -15px -15px 12px 0;
+ position: relative;
+}
+
+.graphiql-container .search-box:before {
+ content: '\26b2';
+ cursor: pointer;
+ display: block;
+ font-size: 24px;
+ position: absolute;
+ top: -2px;
+ -ms-transform: rotate(-45deg);
+ transform: rotate(-45deg);
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.graphiql-container .search-box .search-box-clear {
+ background-color: #d0d0d0;
+ border-radius: 12px;
+ color: #fff;
+ cursor: pointer;
+ font-size: 11px;
+ padding: 1px 5px 2px;
+ position: absolute;
+ right: 3px;
+ top: 8px;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.graphiql-container .search-box .search-box-clear:hover {
+ background-color: #b9b9b9;
+}
+
+.graphiql-container .search-box > input {
+ border: none;
+ box-sizing: border-box;
+ font-size: 14px;
+ outline: none;
+ padding: 6px 24px 8px 20px;
+ width: 100%;
+}
+
+.graphiql-container .error-container {
+ font-weight: bold;
+ left: 0;
+ letter-spacing: 1px;
+ opacity: 0.5;
+ position: absolute;
+ right: 0;
+ text-align: center;
+ text-transform: uppercase;
+ top: 50%;
+ -ms-transform: translate(0, -50%);
+ transform: translate(0, -50%);
+}
+.CodeMirror-foldmarker {
+ color: blue;
+ cursor: pointer;
+ font-family: arial;
+ line-height: .3;
+ text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px;
+}
+.CodeMirror-foldgutter {
+ width: .7em;
+}
+.CodeMirror-foldgutter-open,
+.CodeMirror-foldgutter-folded {
+ cursor: pointer;
+}
+.CodeMirror-foldgutter-open:after {
+ content: "\25BE";
+}
+.CodeMirror-foldgutter-folded:after {
+ content: "\25B8";
+}
+.graphiql-container .history-contents,
+.graphiql-container .history-contents input {
+ font-family: 'Consolas', 'Inconsolata', 'Droid Sans Mono', 'Monaco', monospace;
+ padding: 0;
+}
+
+.graphiql-container .history-contents p {
+ align-items: center;
+ display: flex;
+ font-size: 12px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ margin: 0;
+ padding: 8px;
+ border-bottom: 1px solid #e0e0e0;
+}
+
+.graphiql-container .history-contents p.editable {
+ padding-bottom: 6px;
+ padding-top: 7px;
+}
+
+.graphiql-container .history-contents input {
+ flex-grow: 1;
+ font-size: 12px;
+}
+
+.graphiql-container .history-contents p:hover {
+ cursor: pointer;
+}
+
+.graphiql-container .history-contents p span.history-label {
+ flex-grow: 1;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}.CodeMirror-info {
+ background: white;
+ border-radius: 2px;
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
+ box-sizing: border-box;
+ color: #555;
+ 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;
+ margin: 8px -8px;
+ max-width: 400px;
+ opacity: 0;
+ overflow: hidden;
+ padding: 8px 8px;
+ position: fixed;
+ transition: opacity 0.15s;
+ z-index: 50;
+}
+
+.CodeMirror-info :first-child {
+ margin-top: 0;
+}
+
+.CodeMirror-info :last-child {
+ margin-bottom: 0;
+}
+
+.CodeMirror-info p {
+ margin: 1em 0;
+}
+
+.CodeMirror-info .info-description {
+ color: #777;
+ line-height: 16px;
+ margin-top: 1em;
+ max-height: 80px;
+ overflow: hidden;
+}
+
+.CodeMirror-info .info-deprecation {
+ background: #fffae8;
+ box-shadow: inset 0 1px 1px -1px #bfb063;
+ color: #867F70;
+ line-height: 16px;
+ margin: -8px;
+ margin-top: 8px;
+ max-height: 80px;
+ overflow: hidden;
+ padding: 8px;
+}
+
+.CodeMirror-info .info-deprecation-label {
+ color: #c79b2e;
+ cursor: default;
+ display: block;
+ font-size: 9px;
+ font-weight: bold;
+ letter-spacing: 1px;
+ line-height: 1;
+ padding-bottom: 5px;
+ text-transform: uppercase;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.CodeMirror-info .info-deprecation-label + * {
+ margin-top: 0;
+}
+
+.CodeMirror-info a {
+ text-decoration: none;
+}
+
+.CodeMirror-info a:hover {
+ text-decoration: underline;
+}
+
+.CodeMirror-info .type-name {
+ color: #CA9800;
+}
+
+.CodeMirror-info .field-name {
+ color: #1F61A0;
+}
+
+.CodeMirror-info .enum-value {
+ color: #0B7FC7;
+}
+
+.CodeMirror-info .arg-name {
+ color: #8B2BB9;
+}
+
+.CodeMirror-info .directive-name {
+ color: #B33086;
+}
+.CodeMirror-jump-token {
+ text-decoration: underline;
+ cursor: pointer;
+}
+/* The lint marker gutter */
+.CodeMirror-lint-markers {
+ width: 16px;
+}
+
+.CodeMirror-lint-tooltip {
+ background-color: infobackground;
+ border-radius: 4px 4px 4px 4px;
+ border: 1px solid black;
+ color: infotext;
+ font-family: monospace;
+ font-size: 10pt;
+ max-width: 600px;
+ opacity: 0;
+ overflow: hidden;
+ padding: 2px 5px;
+ position: fixed;
+ transition: opacity .4s;
+ white-space: pre-wrap;
+ z-index: 100;
+}
+
+.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;
+ position: relative;
+ vertical-align: middle;
+ width: 16px;
+}
+
+.CodeMirror-lint-message-error, .CodeMirror-lint-message-warning {
+ background-position: top left;
+ background-repeat: no-repeat;
+ padding-left: 18px;
+}
+
+.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-position: right bottom;
+ background-repeat: no-repeat;
+ width: 100%; height: 100%;
+}
+.graphiql-container .spinner-container {
+ height: 36px;
+ left: 50%;
+ position: absolute;
+ top: 50%;
+ -ms-transform: translate(-50%, -50%);
+ transform: translate(-50%, -50%);
+ width: 36px;
+ z-index: 10;
+}
+
+.graphiql-container .spinner {
+ animation: rotation .6s infinite linear;
+ border-bottom: 6px solid rgba(150, 150, 150, .15);
+ border-left: 6px solid rgba(150, 150, 150, .15);
+ border-radius: 100%;
+ border-right: 6px solid rgba(150, 150, 150, .15);
+ border-top: 6px solid rgba(150, 150, 150, .8);
+ display: inline-block;
+ height: 24px;
+ position: absolute;
+ vertical-align: middle;
+ width: 24px;
+}
+
+@keyframes rotation {
+ from { transform: rotate(0deg); }
+ to { transform: rotate(359deg); }
+}
+.CodeMirror-hints {
+ background: white;
+ 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-left: -6px;
+ margin: 0;
+ max-height: 14.5em;
+ overflow-y: auto;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ z-index: 10;
+}
+
+.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;
+}
+
+.CodeMirror-hint-deprecation {
+ background: #fffae8;
+ box-shadow: inset 0 1px 1px -1px #bfb063;
+ color: #867F70;
+ 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;
+ margin-top: 4px;
+ max-height: 80px;
+ overflow: hidden;
+ padding: 6px;
+}
+
+.CodeMirror-hint-deprecation .deprecation-label {
+ color: #c79b2e;
+ cursor: default;
+ display: block;
+ font-size: 9px;
+ font-weight: bold;
+ letter-spacing: 1px;
+ line-height: 1;
+ padding-bottom: 5px;
+ text-transform: uppercase;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.CodeMirror-hint-deprecation .deprecation-label + * {
+ margin-top: 0;
+}
+
+.CodeMirror-hint-deprecation :last-child {
+ margin-bottom: 0;
+}
diff --git a/graphene_django/static/graphiql/js/fetch.min.js b/graphene_django/static/graphiql/js/fetch.min.js
new file mode 100755
index 0000000..c8f4d92
--- /dev/null
+++ b/graphene_django/static/graphiql/js/fetch.min.js
@@ -0,0 +1,8 @@
+/**
+ * Minified by jsDelivr using UglifyJS v3.4.0.
+ * Original file: /npm/whatwg-fetch@2.0.3/fetch.js
+ *
+ * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
+ */
+!function(t){"use strict";if(!t.fetch){var e="URLSearchParams"in t,r="Symbol"in t&&"iterator"in Symbol,s="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),o="FormData"in t,n="ArrayBuffer"in t;if(n)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=function(t){return t&&DataView.prototype.isPrototypeOf(t)},h=ArrayBuffer.isView||function(t){return t&&-1=minLine||(to.line>=minLine&&(to=Pos(minLine,0)),minLine=from.line,null==mode?mode=this.uncomment(from,to,options)?"un":(this.lineComment(from,to,options),"line"):"un"==mode?this.uncomment(from,to,options):this.lineComment(from,to,options))}}),CodeMirror.defineExtension("lineComment",function(from,to,options){options||(options=noOptions);var self=this,mode=getMode(self,from),firstLine=self.getLine(from.line);if(null!=firstLine&&!function(cm,pos,line){return/\bstring\b/.test(cm.getTokenTypeAt(Pos(pos.line,0)))&&!/^[\'\"\`]/.test(line)}(self,from,firstLine)){var commentString=options.lineComment||mode.lineComment;if(commentString){var end=Math.min(0!=to.ch||to.line==from.line?to.line+1:to.line,self.lastLine()+1),pad=null==options.padding?" ":options.padding,blankLines=options.commentBlankLines||from.line==to.line;self.operation(function(){if(options.indent){for(var baseString=null,i=from.line;iwhitespace.length)&&(baseString=whitespace)}for(i=from.line;iend||self.operation(function(){if(0!=options.fullLines){var lastLineHasText=nonWS.test(self.getLine(end));self.replaceRange(pad+endString,Pos(end)),self.replaceRange(startString+pad,Pos(from.line,0));var lead=options.blockCommentLead||mode.blockCommentLead;if(null!=lead)for(var i=from.line+1;i<=end;++i)i==end&&!lastLineHasText||self.replaceRange(lead+pad,Pos(i,0))}else self.replaceRange(endString,to),self.replaceRange(startString,from)})}}else(options.lineComment||mode.lineComment)&&0!=options.fullLines&&self.lineComment(from,to,options)}),CodeMirror.defineExtension("uncomment",function(from,to,options){options||(options=noOptions);var didSomething,self=this,mode=getMode(self,from),end=Math.min(0!=to.ch||to.line==from.line?to.line:to.line-1,self.lastLine()),start=Math.min(from.line,end),lineString=options.lineComment||mode.lineComment,lines=[],pad=null==options.padding?" ":options.padding;lineComment:if(lineString){for(var i=start;i<=end;++i){var line=self.getLine(i),found=line.indexOf(lineString);if(-1",triples:"",explode:"[]{}"},Pos=CodeMirror.Pos;function getOption(conf,name){return"pairs"==name&&"string"==typeof conf?conf:"object"==typeof conf&&null!=conf[name]?conf[name]:defaults[name]}CodeMirror.defineOption("autoCloseBrackets",!1,function(cm,val,old){old&&old!=CodeMirror.Init&&(cm.removeKeyMap(keyMap),cm.state.closeBrackets=null),val&&(ensureBound(getOption(val,"pairs")),cm.state.closeBrackets=val,cm.addKeyMap(keyMap))});var keyMap={Backspace:function(cm){var conf=getConfig(cm);if(!conf||cm.getOption("disableInput"))return CodeMirror.Pass;for(var pairs=getOption(conf,"pairs"),ranges=cm.listSelections(),i=0;i",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function bracketRegex(config){return config&&config.bracketRegex||/[(){}[\]]/}function findMatchingBracket(cm,where,config){var line=cm.getLineHandle(where.line),pos=where.ch-1,afterCursor=config&&config.afterCursor;null==afterCursor&&(afterCursor=/(^| )cm-fat-cursor($| )/.test(cm.getWrapperElement().className));var re=bracketRegex(config),match=!afterCursor&&0<=pos&&re.test(line.text.charAt(pos))&&matching[line.text.charAt(pos)]||re.test(line.text.charAt(pos+1))&&matching[line.text.charAt(++pos)];if(!match)return null;var dir=">"==match.charAt(1)?1:-1;if(config&&config.strict&&0maxScanLen))for(lineNo==where.line&&(pos=where.ch-(dir<0?1:0));pos!=end;pos+=dir){var ch=line.charAt(pos);if(re.test(ch)&&(void 0===style||cm.getTokenTypeAt(Pos(lineNo,pos+1))==style)){var match=matching[ch];if(match&&">"==match.charAt(1)==0cm.lastLine())return null;var start=cm.getTokenAt(CodeMirror.Pos(line,1));if(/\S/.test(start.string)||(start=cm.getTokenAt(CodeMirror.Pos(line,start.end+1))),"keyword"!=start.type||"import"!=start.string)return null;for(var i=line,e=Math.min(cm.lastLine(),line+10);i<=e;++i){var semi=cm.getLine(i).indexOf(";");if(-1!=semi)return{startCh:start.end,end:CodeMirror.Pos(i,semi)}}}var prev,startLine=start.line,has=hasImport(startLine);if(!has||hasImport(startLine-1)||(prev=hasImport(startLine-2))&&prev.end.line==startLine-1)return null;for(var end=has.end;;){var next=hasImport(end.line+1);if(null==next)break;end=next.end}return{from:cm.clipPos(CodeMirror.Pos(startLine,has.startCh+1)),to:end}}),CodeMirror.registerHelper("fold","include",function(cm,start){function hasInclude(line){if(linecm.lastLine())return null;var start=cm.getTokenAt(CodeMirror.Pos(line,1));return/\S/.test(start.string)||(start=cm.getTokenAt(CodeMirror.Pos(line,start.end+1))),"meta"==start.type&&"#include"==start.string.slice(0,8)?start.start+8:void 0}var startLine=start.line,has=hasInclude(startLine);if(null==has||null!=hasInclude(startLine-1))return null;for(var end=startLine;;){if(null==hasInclude(end+1))break;++end}return{from:CodeMirror.Pos(startLine,has+1),to:cm.clipPos(CodeMirror.Pos(end))}})})("object"==typeof exports&&"object"==typeof module?require("../../lib/codemirror"):CodeMirror)},{"../../lib/codemirror":15}],7:[function(require,module,exports){(function(CodeMirror){"use strict";function doFold(cm,pos,options,force){if(options&&options.call){var finder=options;options=null}else finder=getOption(cm,options,"rangeFinder");"number"==typeof pos&&(pos=CodeMirror.Pos(pos,0));var minSize=getOption(cm,options,"minFoldSize");function getRange(allowFolded){var range=finder(cm,pos);if(!range||range.to.line-range.from.linecm.firstLine();)pos=CodeMirror.Pos(pos.line-1,0),range=getRange(!1);if(range&&!range.cleared&&"unfold"!==force){var myWidget=function(cm,options){var widget=getOption(cm,options,"widget");if("string"==typeof widget){var text=document.createTextNode(widget);(widget=document.createElement("span")).appendChild(text),widget.className="CodeMirror-foldmarker"}else widget&&(widget=widget.cloneNode(!0));return widget}(cm,options);CodeMirror.on(myWidget,"mousedown",function(e){myRange.clear(),CodeMirror.e_preventDefault(e)});var myRange=cm.markText(range.from,range.to,{replacedWith:myWidget,clearOnEnter:getOption(cm,options,"clearOnEnter"),__isFold:!0});myRange.on("clear",function(from,to){CodeMirror.signal(cm,"unfold",cm,from,to)}),CodeMirror.signal(cm,"fold",cm,range.from,range.to)}}CodeMirror.newFoldFunction=function(rangeFinder,widget){return function(cm,pos){doFold(cm,pos,{rangeFinder:rangeFinder,widget:widget})}},CodeMirror.defineExtension("foldCode",function(pos,options,force){doFold(this,pos,options,force)}),CodeMirror.defineExtension("isFolded",function(pos){for(var marks=this.findMarksAt(pos),i=0;i=minSize&&(mark=marker(opts.indicatorOpen))}cm.setGutterMarker(line,opts.gutter,mark),++cur})}function updateInViewport(cm){var vp=cm.getViewport(),state=cm.state.foldGutter;state&&(cm.operation(function(){updateFoldInfo(cm,vp.from,vp.to)}),state.from=vp.from,state.to=vp.to)}function onGutterClick(cm,line,gutter){var state=cm.state.foldGutter;if(state){var opts=state.options;if(gutter==opts.gutter){var folded=isFolded(cm,line);folded?folded.clear():cm.foldCode(Pos(line,0),opts.rangeFinder)}}}function onChange(cm){var state=cm.state.foldGutter;if(state){var opts=state.options;state.from=state.to=0,clearTimeout(state.changeUpdate),state.changeUpdate=setTimeout(function(){updateInViewport(cm)},opts.foldOnChangeTimeSpan||600)}}function onViewportChange(cm){var state=cm.state.foldGutter;if(state){var opts=state.options;clearTimeout(state.changeUpdate),state.changeUpdate=setTimeout(function(){var vp=cm.getViewport();state.from==state.to||20state.to&&(updateFoldInfo(cm,state.to,vp.to),state.to=vp.to)})},opts.updateViewportTimeSpan||400)}}function onFold(cm,from){var state=cm.state.foldGutter;if(state){var line=from.line;line>=state.from&&linehints.clientHeight+1,startScroll=cm.getScrollInfo();if(0winW&&(hints.style.width=winW-5+"px",overlapX-=box.right-box.left-winW),hints.style.left=(left=pos.left-overlapX-offsetLeft)+"px"),scrolls)for(var node=hints.firstChild;node;node=node.nextSibling)node.style.paddingRight=cm.display.nativeBarWidth+"px";cm.addKeyMap(this.keyMap=function(completion,handle){var baseMap={Up:function(){handle.moveFocus(-1)},Down:function(){handle.moveFocus(1)},PageUp:function(){handle.moveFocus(1-handle.menuSize(),!0)},PageDown:function(){handle.moveFocus(handle.menuSize()-1,!0)},Home:function(){handle.setFocus(0)},End:function(){handle.setFocus(handle.length-1)},Enter:handle.pick,Tab:handle.pick,Esc:handle.close};/Mac/.test(navigator.platform)&&(baseMap["Ctrl-P"]=function(){handle.moveFocus(-1)},baseMap["Ctrl-N"]=function(){handle.moveFocus(1)});var custom=completion.options.customKeys,ourMap=custom?{}:baseMap;function addBinding(key,val){var bound;bound="string"!=typeof val?function(cm){return val(cm,handle)}:baseMap.hasOwnProperty(val)?baseMap[val]:val,ourMap[key]=bound}if(custom)for(var key in custom)custom.hasOwnProperty(key)&&addBinding(key,custom[key]);var extra=completion.options.extraKeys;if(extra)for(var key in extra)extra.hasOwnProperty(key)&&addBinding(key,extra[key]);return ourMap}(completion,{moveFocus:function(n,avoidWrap){widget.changeActive(widget.selectedHint+n,avoidWrap)},setFocus:function(n){widget.changeActive(n)},menuSize:function(){return widget.screenAmount()},length:completions.length,close:function(){completion.close()},pick:function(){widget.pick()},data:data})),completion.options.closeOnUnfocus&&(cm.on("blur",this.onBlur=function(){closingOnBlur=setTimeout(function(){completion.close()},100)}),cm.on("focus",this.onFocus=function(){clearTimeout(closingOnBlur)}));return cm.on("scroll",this.onScroll=function(){var curScroll=cm.getScrollInfo(),editor=cm.getWrapperElement().getBoundingClientRect(),newTop=top+startScroll.top-curScroll.top,point=newTop-(parentWindow.pageYOffset||(ownerDocument.documentElement||ownerDocument.body).scrollTop);if(below||(point+=hints.offsetHeight),point<=editor.top||point>=editor.bottom)return completion.close();hints.style.top=newTop+"px",hints.style.left=left+startScroll.left-curScroll.left+"px"}),CodeMirror.on(hints,"dblclick",function(e){var t=getHintElement(hints,e.target||e.srcElement);t&&null!=t.hintId&&(widget.changeActive(t.hintId),widget.pick())}),CodeMirror.on(hints,"click",function(e){var t=getHintElement(hints,e.target||e.srcElement);t&&null!=t.hintId&&(widget.changeActive(t.hintId),completion.options.completeOnSingleClick&&widget.pick())}),CodeMirror.on(hints,"mousedown",function(){setTimeout(function(){cm.focus()},20)}),CodeMirror.signal(data,"select",completions[this.selectedHint],hints.childNodes[this.selectedHint]),!0}function fetchHints(hint,cm,options,callback){if(hint.async)hint(cm,callback,options);else{var result=hint(cm,options);result&&result.then?result.then(callback):callback(result)}}Completion.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&CodeMirror.signal(this.data,"close"),this.widget&&this.widget.close(),CodeMirror.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(data,i){var completion=data.list[i];completion.hint?completion.hint(this.cm,data,completion):this.cm.replaceRange(getText(completion),completion.from||data.from,completion.to||data.to,"complete"),CodeMirror.signal(data,"pick",completion),this.close()},cursorActivity:function(){this.debounce&&(cancelAnimationFrame(this.debounce),this.debounce=0);var pos=this.cm.getCursor(),line=this.cm.getLine(pos.line);if(pos.line!=this.startPos.line||line.length-pos.ch!=this.startLen-this.startPos.ch||pos.ch=this.data.list.length?i=avoidWrap?this.data.list.length-1:0:i<0&&(i=avoidWrap?0:this.data.list.length-1),this.selectedHint!=i){var node=this.hints.childNodes[this.selectedHint];node&&(node.className=node.className.replace(" CodeMirror-hint-active","")),(node=this.hints.childNodes[this.selectedHint=i]).className+=" CodeMirror-hint-active",node.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=node.offsetTop+node.offsetHeight-this.hints.clientHeight+3),CodeMirror.signal(this.data,"select",this.data.list[this.selectedHint],node)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},CodeMirror.registerHelper("hint","auto",{resolve:function(cm,pos){var words,helpers=cm.getHelpers(pos,"hint");if(helpers.length){var resolved=function(cm,callback,options){var app=function(cm,helpers){if(!cm.somethingSelected())return helpers;for(var result=[],i=0;i,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};CodeMirror.defineOption("hintOptions",null)})("object"==typeof exports&&"object"==typeof module?require("../../lib/codemirror"):CodeMirror)},{"../../lib/codemirror":15}],10:[function(require,module,exports){(function(CodeMirror){"use strict";var GUTTER_ID="CodeMirror-lint-markers";function rm(elt){elt.parentNode&&elt.parentNode.removeChild(elt)}function showTooltipFor(e,content,node){var tooltip=function(e,content){var tt=document.createElement("div");function position(e){if(!tt.parentNode)return CodeMirror.off(document,"mousemove",position);tt.style.top=Math.max(0,e.clientY-tt.offsetHeight-5)+"px",tt.style.left=e.clientX+5+"px"}return tt.className="CodeMirror-lint-tooltip",tt.appendChild(content.cloneNode(!0)),document.body.appendChild(tt),CodeMirror.on(document,"mousemove",position),position(e),null!=tt.style.opacity&&(tt.style.opacity=1),tt}(e,content);function hide(){CodeMirror.off(node,"mouseout",hide),tooltip&&(function(tt){tt.parentNode&&(null==tt.style.opacity&&rm(tt),tt.style.opacity=0,setTimeout(function(){rm(tt)},600))}(tooltip),tooltip=null)}var poll=setInterval(function(){if(tooltip)for(var n=node;;n=n.parentNode){if(n&&11==n.nodeType&&(n=n.host),n==document.body)return;if(!n){hide();break}}if(!tooltip)return clearInterval(poll)},400);CodeMirror.on(node,"mouseout",hide)}function LintState(cm,options,hasGutter){this.marked=[],this.options=options,this.timeout=null,this.hasGutter=hasGutter,this.onMouseOver=function(e){!function(cm,e){var target=e.target||e.srcElement;if(!/\bCodeMirror-lint-mark-/.test(target.className))return;for(var box=target.getBoundingClientRect(),x=(box.left+box.right)/2,y=(box.top+box.bottom)/2,spans=cm.findMarksAt(cm.coordsChar({left:x,top:y},"client")),annotations=[],i=0;i '+cm.phrase("(Use line:column or scroll% syntax)")+" "}(cm),cm.phrase("Jump to line:"),cur.line+1+":"+cur.ch,function(posStr){var match;if(posStr)if(match=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(posStr))cm.setCursor(interpretLine(cm,match[1]),Number(match[2]));else if(match=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(posStr)){var line=Math.round(cm.lineCount()*Number(match[1])/100);/^[-+]/.test(match[1])&&(line=cur.line+line+1),cm.setCursor(line-1,cur.ch)}else(match=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(posStr))&&cm.setCursor(interpretLine(cm,match[1]),cur.ch)})},CodeMirror.keyMap.default["Alt-G"]="jumpToLine"},"object"==typeof exports&&"object"==typeof module?mod(require("../../lib/codemirror"),require("../dialog/dialog")):mod(CodeMirror)},{"../../lib/codemirror":15,"../dialog/dialog":3}],12:[function(require,module,exports){var mod;mod=function(CodeMirror){"use strict";function SearchState(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function getSearchState(cm){return cm.state.search||(cm.state.search=new SearchState)}function queryCaseInsensitive(query){return"string"==typeof query&&query==query.toLowerCase()}function getSearchCursor(cm,query,pos){return cm.getSearchCursor(query,pos,{caseFold:queryCaseInsensitive(query),multiline:!0})}function dialog(cm,text,shortText,deflt,f){cm.openDialog?cm.openDialog(text,f,{value:deflt,selectValueOnOpen:!0}):f(prompt(shortText,deflt))}function parseString(string){return string.replace(/\\(.)/g,function(_,ch){return"n"==ch?"\n":"r"==ch?"\r":ch})}function parseQuery(query){var isRE=query.match(/^\/(.*)\/([a-z]*)$/);if(isRE)try{query=new RegExp(isRE[1],-1==isRE[2].indexOf("i")?"":"i")}catch(e){}else query=parseString(query);return("string"==typeof query?""==query:query.test(""))&&(query=/x^/),query}function startSearch(cm,state,query){state.queryText=query,state.query=parseQuery(query),cm.removeOverlay(state.overlay,queryCaseInsensitive(state.query)),state.overlay=function(query,caseInsensitive){return"string"==typeof query?query=new RegExp(query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),caseInsensitive?"gi":"g"):query.global||(query=new RegExp(query.source,query.ignoreCase?"gi":"g")),{token:function(stream){query.lastIndex=stream.pos;var match=query.exec(stream.string);if(match&&match.index==stream.pos)return stream.pos+=match[0].length||1,"searching";match?stream.pos=match.index:stream.skipToEnd()}}}(state.query,queryCaseInsensitive(state.query)),cm.addOverlay(state.overlay),cm.showMatchesOnScrollbar&&(state.annotate&&(state.annotate.clear(),state.annotate=null),state.annotate=cm.showMatchesOnScrollbar(state.query,queryCaseInsensitive(state.query)))}function doSearch(cm,rev,persistent,immediate){var state=getSearchState(cm);if(state.query)return findNext(cm,rev);var q=cm.getSelection()||state.lastQuery;if(q instanceof RegExp&&"x^"==q.source&&(q=null),persistent&&cm.openDialog){var hiding=null,searchNext=function(query,event){CodeMirror.e_stop(event),query&&(query!=state.queryText&&(startSearch(cm,state,query),state.posFrom=state.posTo=cm.getCursor()),hiding&&(hiding.style.opacity=1),findNext(cm,event.shiftKey,function(_,to){var dialog;to.line<3&&document.querySelector&&(dialog=cm.display.wrapper.querySelector(".CodeMirror-dialog"))&&dialog.getBoundingClientRect().bottom-4>cm.cursorCoords(to,"window").top&&((hiding=dialog).style.opacity=.4)}))};!function(cm,text,deflt,onEnter,onKeyDown){cm.openDialog(text,onEnter,{value:deflt,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){clearSearch(cm)},onKeyDown:onKeyDown})}(cm,getQueryDialog(cm),q,searchNext,function(event,query){var keyName=CodeMirror.keyName(event),extra=cm.getOption("extraKeys"),cmd=extra&&extra[keyName]||CodeMirror.keyMap[cm.getOption("keyMap")][keyName];"findNext"==cmd||"findPrev"==cmd||"findPersistentNext"==cmd||"findPersistentPrev"==cmd?(CodeMirror.e_stop(event),startSearch(cm,getSearchState(cm),query),cm.execCommand(cmd)):"find"!=cmd&&"findPersistent"!=cmd||(CodeMirror.e_stop(event),searchNext(query,event))}),immediate&&q&&(startSearch(cm,state,q),findNext(cm,rev))}else dialog(cm,getQueryDialog(cm),"Search for:",q,function(query){query&&!state.query&&cm.operation(function(){startSearch(cm,state,query),state.posFrom=state.posTo=cm.getCursor(),findNext(cm,rev)})})}function findNext(cm,rev,callback){cm.operation(function(){var state=getSearchState(cm),cursor=getSearchCursor(cm,state.query,rev?state.posFrom:state.posTo);(cursor.find(rev)||(cursor=getSearchCursor(cm,state.query,rev?CodeMirror.Pos(cm.lastLine()):CodeMirror.Pos(cm.firstLine(),0))).find(rev))&&(cm.setSelection(cursor.from(),cursor.to()),cm.scrollIntoView({from:cursor.from(),to:cursor.to()},20),state.posFrom=cursor.from(),state.posTo=cursor.to(),callback&&callback(cursor.from(),cursor.to()))})}function clearSearch(cm){cm.operation(function(){var state=getSearchState(cm);state.lastQuery=state.query,state.query&&(state.query=state.queryText=null,cm.removeOverlay(state.overlay),state.annotate&&(state.annotate.clear(),state.annotate=null))})}function getQueryDialog(cm){return''+cm.phrase("Search:")+' '+cm.phrase("(Use /re/ syntax for regexp search)")+" "}function replaceAll(cm,query,text){cm.operation(function(){for(var cursor=getSearchCursor(cm,query);cursor.findNext();)if("string"!=typeof query){var match=cm.getRange(cursor.from(),cursor.to()).match(query);cursor.replace(text.replace(/\$(\d)/g,function(_,i){return match[i]}))}else cursor.replace(text)})}function replace(cm,all){if(!cm.getOption("readOnly")){var query=cm.getSelection()||getSearchState(cm).lastQuery,dialogText=''+(all?cm.phrase("Replace all:"):cm.phrase("Replace:"))+" ";dialog(cm,dialogText+function(cm){return' '+cm.phrase("(Use /re/ syntax for regexp search)")+" "}(cm),dialogText,query,function(query){query&&(query=parseQuery(query),dialog(cm,function(cm){return''+cm.phrase("With:")+' '}(cm),cm.phrase("Replace with:"),"",function(text){if(text=parseString(text),all)replaceAll(cm,query,text);else{clearSearch(cm);var cursor=getSearchCursor(cm,query,cm.getCursor("from")),advance=function(){var match,start=cursor.from();!(match=cursor.findNext())&&(cursor=getSearchCursor(cm,query),!(match=cursor.findNext())||start&&cursor.from().line==start.line&&cursor.from().ch==start.ch)||(cm.setSelection(cursor.from(),cursor.to()),cm.scrollIntoView({from:cursor.from(),to:cursor.to()}),function(cm,text,shortText,fs){cm.openConfirm?cm.openConfirm(text,fs):confirm(shortText)&&fs[0]()}(cm,function(cm){return''+cm.phrase("Replace?")+" "+cm.phrase("Yes")+" "+cm.phrase("No")+" "+cm.phrase("All")+" "+cm.phrase("Stop")+" "}(cm),cm.phrase("Replace?"),[function(){doReplace(match)},advance,function(){replaceAll(cm,query,text)}]))},doReplace=function(match){cursor.replace("string"==typeof query?text:text.replace(/\$(\d)/g,function(_,i){return match[i]})),advance()};advance()}}))})}}CodeMirror.commands.find=function(cm){clearSearch(cm),doSearch(cm)},CodeMirror.commands.findPersistent=function(cm){clearSearch(cm),doSearch(cm,!1,!0)},CodeMirror.commands.findPersistentNext=function(cm){doSearch(cm,!1,!0,!0)},CodeMirror.commands.findPersistentPrev=function(cm){doSearch(cm,!0,!0,!0)},CodeMirror.commands.findNext=doSearch,CodeMirror.commands.findPrev=function(cm){doSearch(cm,!0)},CodeMirror.commands.clearSearch=clearSearch,CodeMirror.commands.replace=replace,CodeMirror.commands.replaceAll=function(cm){replace(cm,!0)}},"object"==typeof exports&&"object"==typeof module?mod(require("../../lib/codemirror"),require("./searchcursor"),require("../dialog/dialog")):mod(CodeMirror)},{"../../lib/codemirror":15,"../dialog/dialog":3,"./searchcursor":13}],13:[function(require,module,exports){(function(CodeMirror){"use strict";var doFold,noFold,Pos=CodeMirror.Pos;function ensureFlags(regexp,flags){for(var current=function(regexp){var flags=regexp.flags;return null!=flags?flags:(regexp.ignoreCase?"i":"")+(regexp.global?"g":"")+(regexp.multiline?"m":"")}(regexp),target=current,i=0;i>1,len=foldFunc(orig.slice(0,mid)).length;if(len==pos)return mid;pos=line.length)return doc.clipPos(Pos(start.line+1,0));for(var type,state="start",pos=start.ch,e=dir<0?0:line.length,i=0;pos!=e;pos+=dir,i++){var next=line.charAt(dir<0?pos-1:pos),cat="_"!=next&&CodeMirror.isWordChar(next)?"w":"o";if("w"==cat&&next.toUpperCase()==next&&(cat="W"),"start"==state)"o"!=cat&&(state="in",type=cat);else if("in"==state&&type!=cat){if("w"==type&&"W"==cat&&dir<0&&pos--,"W"==type&&"w"==cat&&0=visibleBottomLine&&cm.execCommand("goLineUp")}cm.scrollTo(null,info.top-cm.defaultTextHeight())},cmds.scrollLineDown=function(cm){var info=cm.getScrollInfo();if(!cm.somethingSelected()){var visibleTopLine=cm.lineAtHeight(info.top,"local")+1;cm.getCursor().line<=visibleTopLine&&cm.execCommand("goLineDown")}cm.scrollTo(null,info.top+cm.defaultTextHeight())},cmds.splitSelectionByLine=function(cm){for(var ranges=cm.listSelections(),lineRanges=[],i=0;ifrom.line&&line==to.line&&0==to.ch||lineRanges.push({anchor:line==from.line?from:Pos(line,0),head:line==to.line?to:Pos(line)});cm.setSelections(lineRanges,0)},cmds.singleSelectionTop=function(cm){var range=cm.listSelections()[0];cm.setSelection(range.anchor,range.head,{scroll:!1})},cmds.selectLine=function(cm){for(var ranges=cm.listSelections(),extended=[],i=0;icm.lastLine()?cm.replaceRange("\n"+line,Pos(cm.lastLine()),null,"+swapLine"):cm.replaceRange(line+"\n",Pos(to,0),null,"+swapLine")}cm.setSelections(newSels),cm.scrollIntoView()})},cmds.swapLineDown=function(cm){if(cm.isReadOnly())return CodeMirror.Pass;for(var ranges=cm.listSelections(),linesToMove=[],at=cm.lastLine()+1,i=ranges.length-1;0<=i;i--){var range=ranges[i],from=range.to().line+1,to=range.from().line;0!=range.to().ch||range.empty()||from--,fromch)return i;cur.to==ch&&(cur.from!=cur.to&&"before"==sticky?found=i:bidiOther=i),cur.from==ch&&(cur.from!=cur.to&&"before"!=sticky?found=i:bidiOther=i)}return null!=found?found:bidiOther}var lowTypes,arabicTypes,bidiRE,isNeutral,isStrong,countsAsLeft,countsAsNum,bidiOrdering=(lowTypes="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",arabicTypes="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",bidiRE=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,isNeutral=/[stwN]/,isStrong=/[LRr]/,countsAsLeft=/[Lb1n]/,countsAsNum=/[1n]/,function(str,direction){var outerType="ltr"==direction?"L":"R";if(0==str.length||"ltr"==direction&&!bidiRE.test(str))return!1;for(var code,len=str.length,types=[],i=0;i=doc.size)throw new Error("There is no line "+(n+doc.first)+" in the document.");for(var chunk=doc;!chunk.lines;)for(var i=0;;++i){var child=chunk.children[i],sz=child.chunkSize();if(n=doc.first&&llast?Pos(last,getLine(doc,last).text.length):function(pos,linelen){var ch=pos.ch;return null==ch||linelen=this.string.length},StringStream.prototype.sol=function(){return this.pos==this.lineStart},StringStream.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},StringStream.prototype.next=function(){if(this.posstart},StringStream.prototype.eatSpace=function(){for(var start=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>start},StringStream.prototype.skipToEnd=function(){this.pos=this.string.length},StringStream.prototype.skipTo=function(ch){var found=this.string.indexOf(ch,this.pos);if(-1cm.options.maxHighlightLength&©State(cm.doc.mode,context.state),result=highlightLine(cm,line,context);resetState&&(context.state=resetState),line.stateAfter=context.save(!resetState),line.styles=result.styles,result.classes?line.styleClasses=result.classes:line.styleClasses&&(line.styleClasses=null),updateFrontier===cm.doc.highlightFrontier&&(cm.doc.modeFrontier=Math.max(cm.doc.modeFrontier,++cm.doc.highlightFrontier))}return line.styles}function getContextBefore(cm,n,precise){var doc=cm.doc,display=cm.display;if(!doc.mode.startState)return new Context(doc,!0,n);var start=function(cm,n,precise){for(var minindent,minline,doc=cm.doc,lim=precise?-1:n-(cm.doc.mode.innerMode?1e3:100),search=n;limdoc.first&&getLine(doc,start-1).stateAfter,context=saved?Context.fromSaved(doc,saved,start):new Context(doc,startState(doc.mode),start);return doc.iter(start,n,function(line){processLine(cm,line.text,context);var pos=context.line;line.stateAfter=pos==n-1||pos%5==0||pos>=display.viewFrom&&posstream.start)return style}throw new Error("Mode "+mode.name+" failed to advance stream.")}Context.prototype.lookAhead=function(n){var line=this.doc.getLine(this.line+n);return null!=line&&n>this.maxLookAhead&&(this.maxLookAhead=n),line},Context.prototype.baseToken=function(n){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=n;)this.baseTokenPos+=2;var type=this.baseTokens[this.baseTokenPos+1];return{type:type&&type.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-n}},Context.prototype.nextLine=function(){this.line++,0cm.options.maxHighlightLength?(flattenSpans=!1,forceToEnd&&processLine(cm,text,context,stream.pos),stream.pos=text.length,null):extractLineClasses(readToken(mode,stream,context.state,inner),lineClasses),inner){var mName=inner[0].name;mName&&(style="m-"+(style?mName+" "+style:mName))}if(!flattenSpans||curStyle!=style){for(;curStart=startCh:span.to>startCh);(nw||(nw=[])).push(new MarkedSpan(marker,span.from,endsAfter?null:span.to))}}return nw}(oldFirst,startCh,isInsert),last=function(old,endCh,isInsert){var nw;if(old)for(var i=0;i=endCh:span.to>endCh)||span.from==endCh&&"bookmark"==marker.type&&(!isInsert||span.marker.insertLeft)){var startsBefore=null==span.from||(marker.inclusiveLeft?span.from<=endCh:span.fromch)&&(!found||compareCollapsedMarkers(found,sp.marker)<0)&&(found=sp.marker)}return found}function conflictingCollapsedRange(doc,lineNo$$1,from,to,marker){var line=getLine(doc,lineNo$$1),sps=sawCollapsedSpans&&line.markedSpans;if(sps)for(var i=0;idoc.lastLine())return lineN;var merged,line=getLine(doc,lineN);if(!lineIsHidden(doc,line))return lineN;for(;merged=collapsedSpanAtEnd(line);)line=merged.find(1,!0).line;return lineNo(line)+1}function lineIsHidden(doc,line){var sps=sawCollapsedSpans&&line.markedSpans;if(sps)for(var sp=void 0,i=0;id.maxLineLength&&(d.maxLineLength=len,d.maxLine=line)})}var Line=function(text,markedSpans,estimateHeight){this.text=text,attachMarkedSpans(this,markedSpans),this.height=estimateHeight?estimateHeight(this):1};function cleanUpLine(line){line.parent=null,detachMarkedSpans(line)}Line.prototype.lineNo=function(){return lineNo(this)},eventMixin(Line);var styleToClassCache={},styleToClassCacheWithMode={};function interpretTokenStyle(style,options){if(!style||/^\s*$/.test(style))return null;var cache=options.addModeClass?styleToClassCacheWithMode:styleToClassCache;return cache[style]||(cache[style]=style.replace(/\S+/g,"cm-$&"))}function buildLineContent(cm,lineView){var content=eltP("span",null,null,webkit?"padding-right: .1px":null),builder={pre:eltP("pre",[content],"CodeMirror-line"),content:content,col:0,pos:0,cm:cm,trailingSpace:!1,splitSpaces:cm.getOption("lineWrapping")};lineView.measure={};for(var i=0;i<=(lineView.rest?lineView.rest.length:0);i++){var line=i?lineView.rest[i-1]:lineView.line,order=void 0;builder.pos=0,builder.addToken=buildToken,hasBadBidiRects(cm.display.measure)&&(order=getOrder(line,cm.doc.direction))&&(builder.addToken=buildTokenBadBidi(builder.addToken,order)),builder.map=[],insertLineContent(line,builder,getLineStyles(cm,line,lineView!=cm.display.externalMeasured&&lineNo(line))),line.styleClasses&&(line.styleClasses.bgClass&&(builder.bgClass=joinClasses(line.styleClasses.bgClass,builder.bgClass||"")),line.styleClasses.textClass&&(builder.textClass=joinClasses(line.styleClasses.textClass,builder.textClass||""))),0==builder.map.length&&builder.map.push(0,0,builder.content.appendChild(zeroWidthElement(cm.display.measure))),0==i?(lineView.measure.map=builder.map,lineView.measure.cache={}):((lineView.measure.maps||(lineView.measure.maps=[])).push(builder.map),(lineView.measure.caches||(lineView.measure.caches=[])).push({}))}if(webkit){var last=builder.content.lastChild;(/\bcm-tab\b/.test(last.className)||last.querySelector&&last.querySelector(".cm-tab"))&&(builder.content.className="cm-tab-wrap-hack")}return signal(cm,"renderLine",cm,lineView.line,builder.pre),builder.pre.className&&(builder.textClass=joinClasses(builder.pre.className,builder.textClass||"")),builder}function defaultSpecialCharPlaceholder(ch){var token=elt("span","•","cm-invalidchar");return token.title="\\u"+ch.charCodeAt(0).toString(16),token.setAttribute("aria-label",token.title),token}function buildToken(builder,text,style,startStyle,endStyle,css,attributes){if(text){var content,displayText=builder.splitSpaces?function(text,trailingBefore){if(1start&&part.from<=start);i++);if(part.to>=end)return inner(builder,text,style,startStyle,endStyle,css,attributes);inner(builder,text.slice(0,part.to-start),style,startStyle,null,css,attributes),startStyle=null,text=text.slice(part.to-start),start=part.to}}}function buildCollapsedSpan(builder,size,marker,ignoreWidget){var widget=!ignoreWidget&&marker.widgetNode;widget&&builder.map.push(builder.pos,builder.pos+size,widget),!ignoreWidget&&builder.cm.display.input.needsContentAttribute&&(widget||(widget=builder.content.appendChild(document.createElement("span"))),widget.setAttribute("cm-marker",marker.id)),widget&&(builder.cm.display.input.setUneditable(widget),builder.content.appendChild(widget)),builder.pos+=size,builder.trailingSpace=!1}function insertLineContent(line,builder,styles){var spans=line.markedSpans,allText=line.text,at=0;if(spans)for(var style,css,spanStyle,spanEndStyle,spanStartStyle,collapsed,attributes,len=allText.length,pos=0,i=1,text="",nextChange=0;;){if(nextChange==pos){spanStyle=spanEndStyle=spanStartStyle=css="",collapsed=attributes=null,nextChange=1/0;for(var foundBookmarks=[],endStyles=void 0,j=0;jpos||m.collapsed&&sp.to==pos&&sp.from==pos)){if(null!=sp.to&&sp.to!=pos&&nextChange>sp.to&&(nextChange=sp.to,spanEndStyle=""),m.className&&(spanStyle+=" "+m.className),m.css&&(css=(css?css+";":"")+m.css),m.startStyle&&sp.from==pos&&(spanStartStyle+=" "+m.startStyle),m.endStyle&&sp.to==nextChange&&(endStyles||(endStyles=[])).push(m.endStyle,sp.to),m.title&&((attributes||(attributes={})).title=m.title),m.attributes)for(var attr in m.attributes)(attributes||(attributes={}))[attr]=m.attributes[attr];m.collapsed&&(!collapsed||compareCollapsedMarkers(collapsed.marker,m)<0)&&(collapsed=sp)}else sp.from>pos&&nextChange>sp.from&&(nextChange=sp.from)}if(endStyles)for(var j$1=0;j$1lineN)return{map:lineView.measure.maps[i$1],cache:lineView.measure.caches[i$1],before:!0}}function measureChar(cm,line,ch,bias){return measureCharPrepared(cm,prepareMeasureForLine(cm,line),ch,bias)}function findViewForLine(cm,lineN){if(lineN>=cm.display.viewFrom&&lineN=ext.lineN&&lineNch)&&(start=(end=mEnd-mStart)-1,mEnd<=ch&&(collapse="right")),null!=start){if(node=map$$1[i+2],mStart==mEnd&&bias==(node.insertLeft?"left":"right")&&(collapse=bias),"left"==bias&&0==start)for(;i&&map$$1[i-2]==map$$1[i-3]&&map$$1[i-1].insertLeft;)node=map$$1[2+(i-=3)],collapse="left";if("right"==bias&&start==mEnd-mStart)for(;i=lineObj.text.length?(ch=lineObj.text.length,sticky="before"):ch<=0&&(ch=0,sticky="after"),!order)return get("before"==sticky?ch-1:ch,"before"==sticky);function getBidi(ch,partPos,invert){return get(invert?ch-1:ch,1==order[partPos].level!=invert)}var partPos=getBidiPartAt(order,ch,sticky),other=bidiOther,val=getBidi(ch,partPos,"before"==sticky);return null!=other&&(val.other=getBidi(ch,other,"before"!=sticky)),val}function estimateCoords(cm,pos){var left=0;pos=clipPos(cm.doc,pos),cm.options.lineWrapping||(left=charWidth(cm.display)*pos.ch);var lineObj=getLine(cm.doc,pos.line),top=heightAtLine(lineObj)+paddingTop(cm.display);return{left:left,right:left,top:top,bottom:top+lineObj.height}}function PosWithInfo(line,ch,sticky,outside,xRel){var pos=Pos(line,ch,sticky);return pos.xRel=xRel,outside&&(pos.outside=!0),pos}function coordsChar(cm,x,y){var doc=cm.doc;if((y+=cm.display.viewOffset)<0)return PosWithInfo(doc.first,0,null,!0,-1);var lineN=lineAtHeight(doc,y),last=doc.first+doc.size-1;if(lasty},begin,end)}}function wrappedLineExtentChar(cm,lineObj,preparedMeasure,target){return preparedMeasure||(preparedMeasure=prepareMeasureForLine(cm,lineObj)),wrappedLineExtent(cm,lineObj,preparedMeasure,intoCoordSystem(cm,lineObj,measureCharPrepared(cm,preparedMeasure,target),"line").top)}function boxIsAfter(box,x,y,left){return!(box.bottom<=y)&&(box.top>y||(left?box.left:box.right)>x)}function coordsCharInner(cm,lineObj,lineNo$$1,x,y){y-=heightAtLine(lineObj);var preparedMeasure=prepareMeasureForLine(cm,lineObj),widgetHeight$$1=widgetTopHeight(lineObj),begin=0,end=lineObj.text.length,ltr=!0,order=getOrder(lineObj,cm.doc.direction);if(order){var part=(cm.options.lineWrapping?function(cm,lineObj,_lineNo,preparedMeasure,order,x,y){var ref=wrappedLineExtent(cm,lineObj,preparedMeasure,y),begin=ref.begin,end=ref.end;/\s/.test(lineObj.text.charAt(end-1))&&end--;for(var part=null,closestDist=null,i=0;i=end||p.to<=begin)){var ltr=1!=p.level,endX=measureCharPrepared(cm,preparedMeasure,ltr?Math.min(end,p.to)-1:Math.max(begin,p.from)).right,dist=endXend&&(part={from:part.from,to:end,level:part.level});return part}:function(cm,lineObj,lineNo$$1,preparedMeasure,order,x,y){var index=findFirst(function(i){var part=order[i],ltr=1!=part.level;return boxIsAfter(cursorCoords(cm,Pos(lineNo$$1,ltr?part.to:part.from,ltr?"before":"after"),"line",lineObj,preparedMeasure),x,y,!0)},0,order.length-1),part=order[index];if(0y&&(part=order[index-1])}return part})(cm,lineObj,lineNo$$1,preparedMeasure,order,x,y);begin=(ltr=1!=part.level)?part.from:part.to-1,end=ltr?part.to:part.from-1}var baseX,sticky,chAround=null,boxAround=null,ch=findFirst(function(ch){var box=measureCharPrepared(cm,preparedMeasure,ch);return box.top+=widgetHeight$$1,box.bottom+=widgetHeight$$1,!!boxIsAfter(box,x,y,!1)&&(box.top<=y&&box.left<=x&&(chAround=ch,boxAround=box),!0)},begin,end),outside=!1;if(boxAround){var atLeft=x-boxAround.left=coords.bottom}return PosWithInfo(lineNo$$1,ch=skipExtendingChars(lineObj.text,ch,1),sticky,outside,x-baseX)}function textHeight(display){if(null!=display.cachedTextHeight)return display.cachedTextHeight;if(null==measureText){measureText=elt("pre");for(var i=0;i<49;++i)measureText.appendChild(document.createTextNode("x")),measureText.appendChild(elt("br"));measureText.appendChild(document.createTextNode("x"))}removeChildrenAndAdd(display.measure,measureText);var height=measureText.offsetHeight/50;return 3=cm.display.viewTo)return null;if((n-=cm.display.viewFrom)<0)return null;for(var view=cm.display.view,i=0;ifrom)&&(display.updateLineNumbers=from),cm.curOp.viewChanged=!0,from>=display.viewTo)sawCollapsedSpans&&visualLineNo(cm.doc,from)display.viewFrom?resetView(cm):(display.viewFrom+=lendiff,display.viewTo+=lendiff);else if(from<=display.viewFrom&&to>=display.viewTo)resetView(cm);else if(from<=display.viewFrom){var cut=viewCuttingPoint(cm,to,to+lendiff,1);cut?(display.view=display.view.slice(cut.index),display.viewFrom=cut.lineN,display.viewTo+=lendiff):resetView(cm)}else if(to>=display.viewTo){var cut$1=viewCuttingPoint(cm,from,from,-1);cut$1?(display.view=display.view.slice(0,cut$1.index),display.viewTo=cut$1.lineN):resetView(cm)}else{var cutTop=viewCuttingPoint(cm,from,from,-1),cutBot=viewCuttingPoint(cm,to,to+lendiff,1);cutTop&&cutBot?(display.view=display.view.slice(0,cutTop.index).concat(buildViewArray(cm,cutTop.lineN,cutBot.lineN)).concat(display.view.slice(cutBot.index)),display.viewTo+=lendiff):resetView(cm)}var ext=display.externalMeasured;ext&&(to=ext.lineN&&line=display.viewTo)){var lineView=display.view[findViewIndex(cm,line)];if(null!=lineView.node){var arr=lineView.changes||(lineView.changes=[]);-1==indexOf(arr,type)&&arr.push(type)}}}function resetView(cm){cm.display.viewFrom=cm.display.viewTo=cm.doc.first,cm.display.view=[],cm.display.viewOffset=0}function viewCuttingPoint(cm,oldN,newN,dir){var diff,index=findViewIndex(cm,oldN),view=cm.display.view;if(!sawCollapsedSpans||newN==cm.doc.first+cm.doc.size)return{index:index,lineN:newN};for(var n=cm.display.viewFrom,i=0;i=cm.display.viewTo||range$$1.to().linefrom||from==to&&part.to==from)&&(f(Math.max(part.from,from),Math.min(part.to,to),1==part.level?"rtl":"ltr",i),found=!0)}found||f(from,to,"ltr")}(order,fromArg||0,null==toArg?lineLen:toArg,function(from,to,dir,i){var ltr="ltr"==dir,fromPos=coords(from,ltr?"left":"right"),toPos=coords(to-1,ltr?"right":"left"),openStart=null==fromArg&&0==from,openEnd=null==toArg&&to==lineLen,first=0==i,last=!order||i==order.length-1;if(toPos.top-fromPos.top<=3){var openRight=(docLTR?openEnd:openStart)&&last,left=(docLTR?openStart:openEnd)&&first?leftSide:(ltr?fromPos:toPos).left,right=openRight?rightSide:(ltr?toPos:fromPos).right;add(left,fromPos.top,right-left,fromPos.bottom)}else{var topLeft,topRight,botLeft,botRight;botRight=ltr?(topLeft=docLTR&&openStart&&first?leftSide:fromPos.left,topRight=docLTR?rightSide:wrapX(from,dir,"before"),botLeft=docLTR?leftSide:wrapX(to,dir,"after"),docLTR&&openEnd&&last?rightSide:toPos.right):(topLeft=docLTR?wrapX(from,dir,"before"):leftSide,topRight=!docLTR&&openStart&&first?rightSide:fromPos.right,botLeft=!docLTR&&openEnd&&last?leftSide:toPos.left,docLTR?wrapX(to,dir,"after"):rightSide),add(topLeft,fromPos.top,topRight-topLeft,fromPos.bottom),fromPos.bottomcm.display.sizerWidth){var chWidth=Math.ceil(width/charWidth(cm.display));chWidth>cm.display.maxLineLength&&(cm.display.maxLineLength=chWidth,cm.display.maxLine=cur.line,cm.display.maxLineChanged=!0)}}}}function updateWidgetHeight(line){if(line.widgets)for(var i=0;i=to&&(from=lineAtHeight(doc,heightAtLine(getLine(doc,ensureTo))-display.wrapper.clientHeight),to=ensureTo)}return{from:from,to:Math.max(to,from+1)}}function calculateScrollPos(cm,rect){var display=cm.display,snapMargin=textHeight(cm.display);rect.top<0&&(rect.top=0);var screentop=cm.curOp&&null!=cm.curOp.scrollTop?cm.curOp.scrollTop:display.scroller.scrollTop,screen=displayHeight(cm),result={};rect.bottom-rect.top>screen&&(rect.bottom=rect.top+screen);var docBottom=cm.doc.height+paddingVert(display),atTop=rect.topdocBottom-snapMargin;if(rect.topscreentop+screen){var newTop=Math.min(rect.top,(atBottom?docBottom:rect.bottom)-screen);newTop!=screentop&&(result.scrollTop=newTop)}var screenleft=cm.curOp&&null!=cm.curOp.scrollLeft?cm.curOp.scrollLeft:display.scroller.scrollLeft,screenw=displayWidth(cm)-(cm.options.fixedGutter?display.gutters.offsetWidth:0),tooWide=rect.right-rect.left>screenw;return tooWide&&(rect.right=rect.left+screenw),rect.left<10?result.scrollLeft=0:rect.leftscreenw+screenleft-3&&(result.scrollLeft=rect.right+(tooWide?0:10)-screenw),result}function addToScrollTop(cm,top){null!=top&&(resolveScrollToPos(cm),cm.curOp.scrollTop=(null==cm.curOp.scrollTop?cm.doc.scrollTop:cm.curOp.scrollTop)+top)}function ensureCursorVisible(cm){resolveScrollToPos(cm);var cur=cm.getCursor();cm.curOp.scrollToPos={from:cur,to:cur,margin:cm.options.cursorScrollMargin}}function scrollToCoords(cm,x,y){null==x&&null==y||resolveScrollToPos(cm),null!=x&&(cm.curOp.scrollLeft=x),null!=y&&(cm.curOp.scrollTop=y)}function resolveScrollToPos(cm){var range$$1=cm.curOp.scrollToPos;range$$1&&(cm.curOp.scrollToPos=null,scrollToCoordsRange(cm,estimateCoords(cm,range$$1.from),estimateCoords(cm,range$$1.to),range$$1.margin))}function scrollToCoordsRange(cm,from,to,margin){var sPos=calculateScrollPos(cm,{left:Math.min(from.left,to.left),top:Math.min(from.top,to.top)-margin,right:Math.max(from.right,to.right),bottom:Math.max(from.bottom,to.bottom)+margin});scrollToCoords(cm,sPos.scrollLeft,sPos.scrollTop)}function updateScrollTop(cm,val){Math.abs(cm.doc.scrollTop-val)<2||(gecko||updateDisplaySimple(cm,{top:val}),setScrollTop(cm,val,!0),gecko&&updateDisplaySimple(cm),startWorker(cm,100))}function setScrollTop(cm,val,forceScroll){val=Math.min(cm.display.scroller.scrollHeight-cm.display.scroller.clientHeight,val),cm.display.scroller.scrollTop==val&&!forceScroll||(cm.doc.scrollTop=val,cm.display.scrollbars.setScrollTop(val),cm.display.scroller.scrollTop!=val&&(cm.display.scroller.scrollTop=val))}function setScrollLeft(cm,val,isScroller,forceScroll){val=Math.min(val,cm.display.scroller.scrollWidth-cm.display.scroller.clientWidth),(isScroller?val==cm.doc.scrollLeft:Math.abs(cm.doc.scrollLeft-val)<2)&&!forceScroll||(cm.doc.scrollLeft=val,alignHorizontally(cm),cm.display.scroller.scrollLeft!=val&&(cm.display.scroller.scrollLeft=val),cm.display.scrollbars.setScrollLeft(val))}function measureForScrollbars(cm){var d=cm.display,gutterW=d.gutters.offsetWidth,docH=Math.round(cm.doc.height+paddingVert(cm.display));return{clientHeight:d.scroller.clientHeight,viewHeight:d.wrapper.clientHeight,scrollWidth:d.scroller.scrollWidth,clientWidth:d.scroller.clientWidth,viewWidth:d.wrapper.clientWidth,barLeft:cm.options.fixedGutter?gutterW:0,docHeight:docH,scrollHeight:docH+scrollGap(cm)+d.barHeight,nativeBarWidth:d.nativeBarWidth,gutterWidth:gutterW}}function NativeScrollbars(place,scroll,cm){this.cm=cm;var vert=this.vert=elt("div",[elt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),horiz=this.horiz=elt("div",[elt("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");vert.tabIndex=horiz.tabIndex=-1,place(vert),place(horiz),on(vert,"scroll",function(){vert.clientHeight&&scroll(vert.scrollTop,"vertical")}),on(horiz,"scroll",function(){horiz.clientWidth&&scroll(horiz.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ie&&ie_version<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}NativeScrollbars.prototype.update=function(measure){var needsH=measure.scrollWidth>measure.clientWidth+1,needsV=measure.scrollHeight>measure.clientHeight+1,sWidth=measure.nativeBarWidth;if(needsV){this.vert.style.display="block",this.vert.style.bottom=needsH?sWidth+"px":"0";var totalHeight=measure.viewHeight-(needsH?sWidth:0);this.vert.firstChild.style.height=Math.max(0,measure.scrollHeight-measure.clientHeight+totalHeight)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(needsH){this.horiz.style.display="block",this.horiz.style.right=needsV?sWidth+"px":"0",this.horiz.style.left=measure.barLeft+"px";var totalWidth=measure.viewWidth-measure.barLeft-(needsV?sWidth:0);this.horiz.firstChild.style.width=Math.max(0,measure.scrollWidth-measure.clientWidth+totalWidth)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&0=display.viewTo)||display.maxLineChanged&&cm.options.lineWrapping,op.update=op.mustUpdate&&new DisplayUpdate(cm,op.mustUpdate&&{top:op.scrollTop,ensure:op.scrollToPos},op.forceUpdate)}function endOperation_R2(op){var cm=op.cm,display=cm.display;op.updatedDisplay&&updateHeightsInViewport(cm),op.barMeasure=measureForScrollbars(cm),display.maxLineChanged&&!cm.options.lineWrapping&&(op.adjustWidthTo=measureChar(cm,display.maxLine,display.maxLine.text.length).left+3,cm.display.sizerWidth=op.adjustWidthTo,op.barMeasure.scrollWidth=Math.max(display.scroller.clientWidth,display.sizer.offsetLeft+op.adjustWidthTo+scrollGap(cm)+cm.display.barWidth),op.maxScrollLeft=Math.max(0,display.sizer.offsetLeft+op.adjustWidthTo-displayWidth(cm))),(op.updatedDisplay||op.selectionChanged)&&(op.preparedSelection=display.input.prepareSelection())}function endOperation_W2(op){var cm=op.cm;null!=op.adjustWidthTo&&(cm.display.sizer.style.minWidth=op.adjustWidthTo+"px",op.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(doScroll=!1),null!=doScroll&&!phantom){var scrollNode=elt("div","",null,"position: absolute;\n top: "+(rect.top-display.viewOffset-paddingTop(cm.display))+"px;\n height: "+(rect.bottom-rect.top+scrollGap(cm)+display.barHeight)+"px;\n left: "+rect.left+"px; width: "+Math.max(2,rect.right-rect.left)+"px;");cm.display.lineSpace.appendChild(scrollNode),scrollNode.scrollIntoView(doScroll),cm.display.lineSpace.removeChild(scrollNode)}}}(cm,function(cm,pos,end,margin){var rect;null==margin&&(margin=0),cm.options.lineWrapping||pos!=end||(end="before"==(pos=pos.ch?Pos(pos.line,"before"==pos.sticky?pos.ch-1:pos.ch,"after"):pos).sticky?Pos(pos.line,pos.ch+1,"before"):pos);for(var limit=0;limit<5;limit++){var changed=!1,coords=cursorCoords(cm,pos),endCoords=end&&end!=pos?cursorCoords(cm,end):coords,scrollPos=calculateScrollPos(cm,rect={left:Math.min(coords.left,endCoords.left),top:Math.min(coords.top,endCoords.top)-margin,right:Math.max(coords.left,endCoords.left),bottom:Math.max(coords.bottom,endCoords.bottom)+margin}),startTop=cm.doc.scrollTop,startLeft=cm.doc.scrollLeft;if(null!=scrollPos.scrollTop&&(updateScrollTop(cm,scrollPos.scrollTop),1=cm.display.viewTo)){var end=+new Date+cm.options.workTime,context=getContextBefore(cm,doc.highlightFrontier),changedLines=[];doc.iter(context.line,Math.min(doc.first+doc.size,cm.display.viewTo+500),function(line){if(context.line>=cm.display.viewFrom){var oldStyles=line.styles,resetState=line.text.length>cm.options.maxHighlightLength?copyState(doc.mode,context.state):null,highlighted=highlightLine(cm,line,context,!0);resetState&&(context.state=resetState),line.styles=highlighted.styles;var oldCls=line.styleClasses,newCls=highlighted.classes;newCls?line.styleClasses=newCls:oldCls&&(line.styleClasses=null);for(var ischange=!oldStyles||oldStyles.length!=line.styles.length||oldCls!=newCls&&(!oldCls||!newCls||oldCls.bgClass!=newCls.bgClass||oldCls.textClass!=newCls.textClass),i=0;!ischange&&iend)return startWorker(cm,cm.options.workDelay),!0}),doc.highlightFrontier=context.line,doc.modeFrontier=Math.max(doc.modeFrontier,context.line),changedLines.length&&runInOp(cm,function(){for(var i=0;i=display.viewFrom&&update.visible.to<=display.viewTo&&(null==display.updateLineNumbers||display.updateLineNumbers>=display.viewTo)&&display.renderedView==display.view&&0==countDirtyView(cm))return!1;maybeUpdateLineNumberWidth(cm)&&(resetView(cm),update.dims=getDimensions(cm));var end=doc.first+doc.size,from=Math.max(update.visible.from-cm.options.viewportMargin,doc.first),to=Math.min(end,update.visible.to+cm.options.viewportMargin);display.viewFromto&&display.viewTo-to<20&&(to=Math.min(end,display.viewTo)),sawCollapsedSpans&&(from=visualLineNo(cm.doc,from),to=visualLineEndNo(cm.doc,to));var different=from!=display.viewFrom||to!=display.viewTo||display.lastWrapHeight!=update.wrapperHeight||display.lastWrapWidth!=update.wrapperWidth;!function(cm,from,to){var display=cm.display;0==display.view.length||from>=display.viewTo||to<=display.viewFrom?(display.view=buildViewArray(cm,from,to),display.viewFrom=from):(display.viewFrom>from?display.view=buildViewArray(cm,from,display.viewFrom).concat(display.view):display.viewFromto&&(display.view=display.view.slice(0,findViewIndex(cm,to)))),display.viewTo=to}(cm,from,to),display.viewOffset=heightAtLine(getLine(cm.doc,display.viewFrom)),cm.display.mover.style.top=display.viewOffset+"px";var toUpdate=countDirtyView(cm);if(!different&&0==toUpdate&&!update.force&&display.renderedView==display.view&&(null==display.updateLineNumbers||display.updateLineNumbers>=display.viewTo))return!1;var selSnapshot=function(cm){if(cm.hasFocus())return null;var active=activeElt();if(!active||!contains(cm.display.lineDiv,active))return null;var result={activeElt:active};if(window.getSelection){var sel=window.getSelection();sel.anchorNode&&sel.extend&&contains(cm.display.lineDiv,sel.anchorNode)&&(result.anchorNode=sel.anchorNode,result.anchorOffset=sel.anchorOffset,result.focusNode=sel.focusNode,result.focusOffset=sel.focusOffset)}return result}(cm);return 4=cm.display.viewFrom&&update.visible.to<=cm.display.viewTo)))&&updateDisplayIfNeeded(cm,update);first=!1){updateHeightsInViewport(cm);var barMeasure=measureForScrollbars(cm);updateSelection(cm),updateScrollbars(cm,barMeasure),setDocumentHeight(cm,barMeasure),update.force=!1}update.signal(cm,"update",cm),cm.display.viewFrom==cm.display.reportedViewFrom&&cm.display.viewTo==cm.display.reportedViewTo||(update.signal(cm,"viewportChange",cm,cm.display.viewFrom,cm.display.viewTo),cm.display.reportedViewFrom=cm.display.viewFrom,cm.display.reportedViewTo=cm.display.viewTo)}function updateDisplaySimple(cm,viewport){var update=new DisplayUpdate(cm,viewport);if(updateDisplayIfNeeded(cm,update)){updateHeightsInViewport(cm),postUpdateDisplay(cm,update);var barMeasure=measureForScrollbars(cm);updateSelection(cm),updateScrollbars(cm,barMeasure),setDocumentHeight(cm,barMeasure),update.finish()}}function updateGutterSpace(display){var width=display.gutters.offsetWidth;display.sizer.style.marginLeft=width+"px"}function setDocumentHeight(cm,measure){cm.display.sizer.style.minHeight=measure.docHeight+"px",cm.display.heightForcer.style.top=measure.docHeight+"px",cm.display.gutters.style.height=measure.docHeight+cm.display.barHeight+scrollGap(cm)+"px"}function alignHorizontally(cm){var display=cm.display,view=display.view;if(display.alignWidgets||display.gutters.firstChild&&cm.options.fixedGutter){for(var comp=compensateForHScroll(display)-display.scroller.scrollLeft+cm.doc.scrollLeft,gutterW=display.gutters.offsetWidth,left=comp+"px",i=0;iscroll.clientWidth,canScrollY=scroll.scrollHeight>scroll.clientHeight;if(dx&&canScrollX||dy&&canScrollY){if(dy&&mac&&webkit)outer:for(var cur=e.target,view=display.view;cur!=scroll;cur=cur.parentNode)for(var i=0;itime-(doc.cm?doc.cm.options.historyEventDelay:500)||"*"==change.origin.charAt(0)))&&(cur=function(hist,force){return force?(clearSelectionEvents(hist.done),lst(hist.done)):hist.done.length&&!lst(hist.done).ranges?lst(hist.done):1hist.undoDepth;)hist.done.shift(),hist.done[0].ranges||hist.done.shift()}hist.done.push(selAfter),hist.generation=++hist.maxGeneration,hist.lastModTime=hist.lastSelTime=time,hist.lastOp=hist.lastSelOp=opId,hist.lastOrigin=hist.lastSelOrigin=change.origin,last||signal(doc,"historyAdded")}function addSelectionToHistory(doc,sel,opId,options){var hist=doc.history,origin=options&&options.origin;opId==hist.lastSelOp||origin&&hist.lastSelOrigin==origin&&(hist.lastModTime==hist.lastSelTime&&hist.lastOrigin==origin||function(doc,origin,prev,sel){var ch=origin.charAt(0);return"*"==ch||"+"==ch&&prev.ranges.length==sel.ranges.length&&prev.somethingSelected()==sel.somethingSelected()&&new Date-doc.history.lastSelTime<=(doc.cm?doc.cm.options.historyEventDelay:500)}(doc,origin,lst(hist.done),sel))?hist.done[hist.done.length-1]=sel:pushSelectionToHistory(sel,hist.done),hist.lastSelTime=+new Date,hist.lastSelOrigin=origin,hist.lastSelOp=opId,options&&!1!==options.clearRedo&&clearSelectionEvents(hist.undone)}function pushSelectionToHistory(sel,dest){var top=lst(dest);top&&top.ranges&&top.equals(sel)||dest.push(sel)}function attachLocalSpans(doc,change,from,to){var existing=change["spans_"+doc.id],n=0;doc.iter(Math.max(doc.first,from),Math.min(doc.first+doc.size,to),function(line){line.markedSpans&&((existing||(existing=change["spans_"+doc.id]={}))[n]=line.markedSpans),++n})}function removeClearedSpans(spans){if(!spans)return null;for(var out,i=0;i=pos.ch:sp.to>pos.ch))){if(mayClear&&(signal(m,"beforeCursorEnter"),m.explicitlyCleared)){if(line.markedSpans){--i;continue}break}if(!m.atomic)continue;if(oldPos){var near=m.find(dir<0?1:-1),diff=void 0;if((dir<0?m.inclusiveRight:m.inclusiveLeft)&&(near=movePos(doc,near,-dir,near&&near.line==pos.line?line:null)),near&&near.line==pos.line&&(diff=cmp(near,oldPos))&&(dir<0?diff<0:0doc.first?clipPos(doc,Pos(pos.line-1)):null:0doc.lastLine())){if(change.from.linelast&&(change={from:change.from,to:Pos(last,getLine(doc,last).text.length),text:[change.text[0]],origin:change.origin}),change.removed=getBetween(doc,change.from,change.to),selAfter||(selAfter=computeSelAfterChange(doc,change)),doc.cm?function(cm,change,spans){var doc=cm.doc,display=cm.display,from=change.from,to=change.to,recomputeMaxLength=!1,checkWidthStart=from.line;cm.options.lineWrapping||(checkWidthStart=lineNo(visualLine(getLine(doc,from.line))),doc.iter(checkWidthStart,to.line+1,function(line){if(line==display.maxLine)return recomputeMaxLength=!0}));-1display.maxLineLength&&(display.maxLine=line,display.maxLineLength=len,display.maxLineChanged=!0,recomputeMaxLength=!1)}),recomputeMaxLength&&(cm.curOp.updateMaxLine=!0));(function(doc,n){if(doc.modeFrontier=Math.min(doc.modeFrontier,n),!(doc.highlightFrontiercm.display.maxLineLength&&(cm.display.maxLine=visual,cm.display.maxLineLength=len,cm.display.maxLineChanged=!0)}null!=min&&cm&&this.collapsed&®Change(cm,min,max+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,cm&&reCheckSelection(cm.doc)),cm&&signalLater(cm,"markerCleared",cm,this,min,max),withOp&&endOperation(cm),this.parent&&this.parent.clear()}},TextMarker.prototype.find=function(side,lineObj){var from,to;null==side&&"bookmark"==this.type&&(side=1);for(var i=0;i=pos.ch)&&markers.push(span.marker.parent||span.marker)}return markers},findMarks:function(from,to,filter){from=clipPos(this,from),to=clipPos(this,to);var found=[],lineNo$$1=from.line;return this.iter(from.line,to.line+1,function(line){var spans=line.markedSpans;if(spans)for(var i=0;i=span.to||null==span.from&&lineNo$$1!=from.line||null!=span.from&&lineNo$$1==to.line&&span.from>=to.ch||filter&&!filter(span.marker)||found.push(span.marker.parent||span.marker)}++lineNo$$1}),found},getAllMarks:function(){var markers=[];return this.iter(function(line){var sps=line.markedSpans;if(sps)for(var i=0;ifrom&&(from=options.from),null!=options.to&&options.toline.text.length?null:target}function moveLogically(line,start,dir){var ch=moveCharLogically(line,start.ch,dir);return null==ch?null:new Pos(start.line,ch,dir<0?"after":"before")}function endOfLine(visually,cm,lineObj,lineNo,dir){if(visually){var order=getOrder(lineObj,cm.doc.direction);if(order){var ch,part=dir<0?lst(order):order[0],sticky=dir<0==(1==part.level)?"after":"before";if(0cm.doc.first){var prev=getLine(cm.doc,cur.line-1).text;prev&&(cur=new Pos(cur.line,1),cm.replaceRange(line.charAt(0)+cm.doc.lineSeparator()+prev.charAt(prev.length-1),Pos(cur.line-1,prev.length-1),cur,"+transpose"))}newSel.push(new Range(cur,cur))}cm.setSelections(newSel)})},newlineAndIndent:function(cm){return runInOp(cm,function(){for(var sels=cm.listSelections(),i=sels.length-1;0<=i;i--)cm.replaceRange(cm.doc.lineSeparator(),sels[i].anchor,sels[i].head,"+input");sels=cm.listSelections();for(var i$1=0;i$1leftPos&&ranges.push(new Range(Pos(line,leftPos),Pos(line,findColumn(text,right,tabSize))))}ranges.length||ranges.push(new Range(start,start)),setSelection(doc,normalizeSelection(cm,startSel.ranges.slice(0,ourIndex).concat(ranges),ourIndex),{origin:"*mouse",scroll:!1}),cm.scrollIntoView(pos)}else{var head,oldRange=ourRange,range$$1=rangeForUnit(cm,pos,behavior.unit),anchor=oldRange.anchor;anchor=0=visible.to||cur.lineeditorSize.bottom?20:0;outside&&setTimeout(operation(cm,function(){counter==curCount&&(display.scroller.scrollTop+=outside,extend(e))}),50)}}(e):done(e)}),up=operation(cm,done);cm.state.selectingText=up,on(display.wrapper.ownerDocument,"mousemove",move),on(display.wrapper.ownerDocument,"mouseup",up)}(cm,event,pos,behavior)}(cm,pos,repeat,e):e_target(e)==display.scroller&&e_preventDefault(e):2==button?(pos&&extendSelection(cm.doc,pos),setTimeout(function(){return display.input.focus()},20)):3==button&&(captureRightClick?cm.display.input.onContextMenu(e):delayBlurEvent(cm)))}}function rangeForUnit(cm,pos,unit){if("char"==unit)return new Range(pos,pos);if("word"==unit)return cm.findWordAt(pos);if("line"==unit)return new Range(Pos(pos.line,0),clipPos(cm.doc,Pos(pos.line+1,0)));var result=unit(cm,pos);return new Range(result.from,result.to)}function gutterEvent(cm,e,type,prevent){var mX,mY;if(e.touches)mX=e.touches[0].clientX,mY=e.touches[0].clientY;else try{mX=e.clientX,mY=e.clientY}catch(e){return!1}if(mX>=Math.floor(cm.display.gutters.getBoundingClientRect().right))return!1;prevent&&e_preventDefault(e);var display=cm.display,lineBox=display.lineDiv.getBoundingClientRect();if(mY>lineBox.bottom||!hasHandler(cm,type))return e_defaultPrevented(e);mY-=lineBox.top-display.viewOffset;for(var i=0;i=mX)return signal(cm,type,cm,lineAtHeight(cm.doc,mY),cm.display.gutterSpecs[i].className,e),e_defaultPrevented(e)}}function clickInGutter(cm,e){return gutterEvent(cm,e,"gutterClick",!0)}function onContextMenu(cm,e){eventInWidget(cm.display,e)||function(cm,e){return!!hasHandler(cm,"gutterContextMenu")&&gutterEvent(cm,e,"gutterContextMenu",!1)}(cm,e)||signalDOMEvent(cm,e,"contextmenu")||captureRightClick||cm.display.input.onContextMenu(e)}function themeChanged(cm){cm.display.wrapper.className=cm.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+cm.options.theme.replace(/(^|\s)\s*/g," cm-s-"),clearCaches(cm)}PastClick.prototype.compare=function(time,pos,button){return this.time+400>time&&0==cmp(pos,this.pos)&&button==this.button};var Init={toString:function(){return"CodeMirror.Init"}},defaults={},optionHandlers={};function dragDropChanged(cm,value,old){if(!value!=!(old&&old!=Init)){var funcs=cm.display.dragFunctions,toggle=value?on:off;toggle(cm.display.scroller,"dragstart",funcs.start),toggle(cm.display.scroller,"dragenter",funcs.enter),toggle(cm.display.scroller,"dragover",funcs.over),toggle(cm.display.scroller,"dragleave",funcs.leave),toggle(cm.display.scroller,"drop",funcs.drop)}}function wrappingChanged(cm){cm.options.lineWrapping?(addClass(cm.display.wrapper,"CodeMirror-wrap"),cm.display.sizer.style.minWidth="",cm.display.sizerWidth=null):(rmClass(cm.display.wrapper,"CodeMirror-wrap"),findMaxLine(cm)),estimateLineHeights(cm),regChange(cm),clearCaches(cm),setTimeout(function(){return updateScrollbars(cm)},100)}function CodeMirror(place,options){var this$1=this;if(!(this instanceof CodeMirror))return new CodeMirror(place,options);this.options=options=options?copyObj(options):{},copyObj(defaults,options,!1);var doc=options.value;"string"==typeof doc?doc=new Doc(doc,options.mode,null,options.lineSeparator,options.direction):options.mode&&(doc.modeOption=options.mode),this.doc=doc;var input=new CodeMirror.inputStyles[options.inputStyle](this),display=this.display=new Display(place,doc,input,options);for(var opt in themeChanged(display.wrapper.CodeMirror=this),options.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),initScrollbars(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Delayed,keySeq:null,specialChars:null},options.autofocus&&!mobile&&display.input.focus(),ie&&ie_version<11&&setTimeout(function(){return this$1.display.input.reset(!0)},20),function(cm){var d=cm.display;on(d.scroller,"mousedown",operation(cm,onMouseDown)),on(d.scroller,"dblclick",ie&&ie_version<11?operation(cm,function(e){if(!signalDOMEvent(cm,e)){var pos=posFromMouse(cm,e);if(pos&&!clickInGutter(cm,e)&&!eventInWidget(cm.display,e)){e_preventDefault(e);var word=cm.findWordAt(pos);extendSelection(cm.doc,word.anchor,word.head)}}}):function(e){return signalDOMEvent(cm,e)||e_preventDefault(e)});on(d.scroller,"contextmenu",function(e){return onContextMenu(cm,e)});var touchFinished,prevTouch={end:0};function finishTouch(){d.activeTouch&&(touchFinished=setTimeout(function(){return d.activeTouch=null},1e3),(prevTouch=d.activeTouch).end=+new Date)}function farAway(touch,other){if(null==other.left)return!0;var dx=other.left-touch.left,dy=other.top-touch.top;return 400doc.first?countColumn(getLine(doc,n-1).text,null,tabSize):0:"add"==how?indentation=curSpace+cm.options.indentUnit:"subtract"==how?indentation=curSpace-cm.options.indentUnit:"number"==typeof how&&(indentation=curSpace+how),indentation=Math.max(0,indentation);var indentString="",pos=0;if(cm.options.indentWithTabs)for(var i=Math.floor(indentation/tabSize);i;--i)pos+=tabSize,indentString+="\t";if(posrecent,textLines=splitLinesAuto(inserted),multiPaste=null;if(paste&&1recent?"cut":"+input")};makeChange(cm.doc,changeEvent),signalLater(cm,"inputRead",cm,changeEvent)}inserted&&!paste&&triggerElectric(cm,inserted),ensureCursorVisible(cm),cm.curOp.updateInput<2&&(cm.curOp.updateInput=updateInput),cm.curOp.typing=!0,cm.state.pasteIncoming=cm.state.cutIncoming=-1}function handlePaste(e,cm){var pasted=e.clipboardData&&e.clipboardData.getData("Text");if(pasted)return e.preventDefault(),cm.isReadOnly()||cm.options.disableInput||runInOp(cm,function(){return applyTextInput(cm,pasted,0,null,"paste")}),!0}function triggerElectric(cm,inserted){if(cm.options.electricChars&&cm.options.smartIndent)for(var sel=cm.doc.sel,i=sel.ranges.length-1;0<=i;i--){var range$$1=sel.ranges[i];if(!(100=line.text.length?(start.ch=line.text.length,start.sticky="before"):start.ch<=0&&(start.ch=0,start.sticky="after");var partPos=getBidiPartAt(bidi,start.ch,start.sticky),part=bidi[partPos];if("ltr"==cm.doc.direction&&part.level%2==0&&(0start.ch:part.from=part.from&&ch>=wrappedLineExtent.begin)){var sticky=moveInStorageOrder?"before":"after";return new Pos(start.line,ch,sticky)}}function searchInVisualLine(partPos,dir,wrappedLineExtent){for(var getRes=function(ch,moveInStorageOrder){return moveInStorageOrder?new Pos(start.line,mv(ch,1),"before"):new Pos(start.line,ch,"after")};0<=partPos&&partPos=doc.first+doc.size)&&(pos=new Pos(l,pos.ch,pos.sticky),lineObj=getLine(doc,l))}())return!1;pos=endOfLine(visually,doc.cm,lineObj,pos.line,dir)}else pos=next;return!0}if("char"==unit)moveOnce();else if("column"==unit)moveOnce(!0);else if("word"==unit||"group"==unit)for(var sawType=null,group="group"==unit,helper=doc.cm&&doc.cm.getHelper(pos,"wordChars"),first=!0;!(dir<0)||moveOnce(!first);first=!1){var cur=lineObj.text.charAt(pos.ch)||"\n",type=isWordChar(cur,helper)?"w":group&&"\n"==cur?"n":!group||/\s/.test(cur)?null:"p";if(!group||first||type||(type="s"),sawType&&sawType!=type){dir<0&&(dir=1,moveOnce(),pos.sticky="after");break}if(type&&(sawType=type),0=doc.height){target.hitSide=!0;break}y+=5*dir}return target}function ContentEditableInput(cm){this.cm=cm,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Delayed,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null}function posToDOM(cm,pos){var view=findViewForLine(cm,pos.line);if(!view||view.hidden)return null;var line=getLine(cm.doc,pos.line),info=mapFromLineView(view,line,pos.line),order=getOrder(line,cm.doc.direction),side="left";order&&(side=getBidiPartAt(order,pos.ch)%2?"right":"left");var result=nodeAndOffsetInLineMap(info.map,pos.ch,side);return result.offset="right"==result.collapse?result.end:result.start,result}function badPos(pos,bad){return bad&&(pos.bad=!0),pos}function domToPos(cm,node,offset){var lineNode;if(node==cm.display.lineDiv){if(!(lineNode=cm.display.lineDiv.childNodes[offset]))return badPos(cm.clipPos(Pos(cm.display.viewTo-1)),!0);node=null,offset=0}else for(lineNode=node;;lineNode=lineNode.parentNode){if(!lineNode||lineNode==cm.display.lineDiv)return null;if(lineNode.parentNode&&lineNode.parentNode==cm.display.lineDiv)break}for(var i=0;i=cm.display.viewTo||to.line=cm.display.viewFrom&&posToDOM(cm,from)||{node:view[0].measure.map[2],offset:0},end=to.linecm.firstLine()&&(from=Pos(from.line-1,getLine(cm.doc,from.line-1).length)),to.ch==getLine(cm.doc,to.line).text.length&&to.linedisplay.viewTo-1)return!1;fromNode=from.line==display.viewFrom||0==(fromIndex=findViewIndex(cm,from.line))?(fromLine=lineNo(display.view[0].line),display.view[0].node):(fromLine=lineNo(display.view[fromIndex].line),display.view[fromIndex-1].node.nextSibling);var toLine,toNode,toIndex=findViewIndex(cm,to.line);if(toNode=toIndex==display.view.length-1?(toLine=display.viewTo-1,display.lineDiv.lastChild):(toLine=lineNo(display.view[toIndex+1].line)-1,display.view[toIndex+1].node.previousSibling),!fromNode)return!1;for(var newText=cm.doc.splitLines(function(cm,from,to,fromLine,toLine){var text="",closing=!1,lineSep=cm.doc.lineSeparator(),extraLinebreak=!1;function close(){closing&&(text+=lineSep,extraLinebreak&&(text+=lineSep),closing=extraLinebreak=!1)}function addText(str){str&&(close(),text+=str)}function walk(node){if(1==node.nodeType){var cmText=node.getAttribute("cm-text");if(cmText)return void addText(cmText);var range$$1,markerID=node.getAttribute("cm-marker");if(markerID){var found=cm.findMarks(Pos(fromLine,0),Pos(toLine+1,0),function(id){return function(marker){return marker.id==id}}(+markerID));return void(found.length&&(range$$1=found[0].find(0))&&addText(getBetween(cm.doc,range$$1.from,range$$1.to).join(lineSep)))}if("false"==node.getAttribute("contenteditable"))return;var isBlock=/^(pre|div|p|li|table|br)$/i.test(node.nodeName);if(!/^br$/i.test(node.nodeName)&&0==node.textContent.length)return;isBlock&&close();for(var i=0;ifrom.ch&&newBot.charCodeAt(newBot.length-cutEnd-1)==oldBot.charCodeAt(oldBot.length-cutEnd-1);)cutFront--,cutEnd++;newText[newText.length-1]=newBot.slice(0,newBot.length-cutEnd).replace(/^\u200b+/,""),newText[0]=newText[0].slice(cutFront).replace(/\u200b+$/,"");var chFrom=Pos(fromLine,cutFront),chTo=Pos(toLine,oldText.length?lst(oldText).length-cutEnd:0);return 1end&&(indentLine(this,range$$1.head.line,how,!0),end=range$$1.head.line,i==this.doc.sel.primIndex&&ensureCursorVisible(this));else{var from=range$$1.from(),to=range$$1.to(),start=Math.max(end,from.line);end=Math.min(this.lastLine(),to.line-(to.ch?0:1))+1;for(var j=start;j>1;if((mid?styles[2*mid-1]:0)>=ch)after=mid;else{if(!(styles[2*mid+1]vspace)&&pos.top>node.offsetHeight?top=pos.top-node.offsetHeight:pos.bottom+node.offsetHeight<=vspace&&(top=pos.bottom),left+node.offsetWidth>hspace&&(left=hspace-node.offsetWidth)}node.style.top=top+"px",node.style.left=node.style.right="","right"==horiz?(left=display.sizer.clientWidth-node.offsetWidth,node.style.right="0px"):("left"==horiz?left=0:"middle"==horiz&&(left=(display.sizer.clientWidth-node.offsetWidth)/2),node.style.left=left+"px"),scroll&&function(cm,rect){var scrollPos=calculateScrollPos(cm,rect);null!=scrollPos.scrollTop&&updateScrollTop(cm,scrollPos.scrollTop),null!=scrollPos.scrollLeft&&setScrollLeft(cm,scrollPos.scrollLeft)}(this,{left:left,top:top,right:left+node.offsetWidth,bottom:top+node.offsetHeight})},triggerOnKeyDown:methodOp(onKeyDown),triggerOnKeyPress:methodOp(onKeyPress),triggerOnKeyUp:onKeyUp,triggerOnMouseDown:methodOp(onMouseDown),execCommand:function(cmd){if(commands.hasOwnProperty(cmd))return commands[cmd].call(null,this)},triggerElectric:methodOp(function(text){triggerElectric(this,text)}),findPosH:function(from,amount,unit,visually){var dir=1;amount<0&&(dir=-1,amount=-amount);for(var cur=clipPos(this.doc,from),i=0;i",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}},{}],18:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GraphQLError=GraphQLError;var _printError=require("./printError"),_location=require("../language/location");function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}function GraphQLError(message,nodes,source,positions,path,originalError,extensions){var _nodes=Array.isArray(nodes)?0!==nodes.length?nodes:void 0:nodes?[nodes]:void 0,_source=source;if(!_source&&_nodes){var node=_nodes[0];_source=node&&node.loc&&node.loc.source}var _locations,_positions=positions;!_positions&&_nodes&&(_positions=_nodes.reduce(function(list,node){return node.loc&&list.push(node.loc.start),list},[])),_positions&&0===_positions.length&&(_positions=void 0),positions&&source?_locations=positions.map(function(pos){return(0,_location.getLocation)(source,pos)}):_nodes&&(_locations=_nodes.reduce(function(list,node){return node.loc&&list.push((0,_location.getLocation)(node.loc.source,node.loc.start)),list},[]));var _extensions=extensions;if(null==_extensions&&null!=originalError){var originalExtensions=originalError.extensions;null!=originalExtensions&&"object"===_typeof(originalExtensions)&&(_extensions=originalExtensions)}Object.defineProperties(this,{message:{value:message,enumerable:!0,writable:!0},locations:{value:_locations||void 0,enumerable:Boolean(_locations)},path:{value:path||void 0,enumerable:Boolean(path)},nodes:{value:_nodes||void 0},source:{value:_source||void 0},positions:{value:_positions||void 0},originalError:{value:originalError},extensions:{value:_extensions||void 0,enumerable:Boolean(_extensions)}}),originalError&&originalError.stack?Object.defineProperty(this,"stack",{value:originalError.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,GraphQLError):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}GraphQLError.prototype=Object.create(Error.prototype,{constructor:{value:GraphQLError},name:{value:"GraphQLError"},toString:{value:function(){return(0,_printError.printError)(this)}}})},{"../language/location":52,"./printError":22}],19:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatError=function(error){error||(0,_invariant.default)(0,"Received null or undefined error.");var message=error.message||"An unknown error occurred.",locations=error.locations,path=error.path,extensions=error.extensions;return extensions?{message:message,locations:locations,path:path,extensions:extensions}:{message:message,locations:locations,path:path}};var obj,_invariant=(obj=require("../jsutils/invariant"))&&obj.__esModule?obj:{default:obj}},{"../jsutils/invariant":33}],20:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"GraphQLError",{enumerable:!0,get:function(){return _GraphQLError.GraphQLError}}),Object.defineProperty(exports,"syntaxError",{enumerable:!0,get:function(){return _syntaxError.syntaxError}}),Object.defineProperty(exports,"locatedError",{enumerable:!0,get:function(){return _locatedError.locatedError}}),Object.defineProperty(exports,"printError",{enumerable:!0,get:function(){return _printError.printError}}),Object.defineProperty(exports,"formatError",{enumerable:!0,get:function(){return _formatError.formatError}});var _GraphQLError=require("./GraphQLError"),_syntaxError=require("./syntaxError"),_locatedError=require("./locatedError"),_printError=require("./printError"),_formatError=require("./formatError")},{"./GraphQLError":18,"./formatError":19,"./locatedError":21,"./printError":22,"./syntaxError":23}],21:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.locatedError=function(originalError,nodes,path){if(originalError&&Array.isArray(originalError.path))return originalError;return new _GraphQLError.GraphQLError(originalError&&originalError.message,originalError&&originalError.nodes||nodes,originalError&&originalError.source,originalError&&originalError.positions,path,originalError)};var _GraphQLError=require("./GraphQLError")},{"./GraphQLError":18}],22:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.printError=function(error){var printedLocations=[];if(error.nodes){var _iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _step,_iterator=error.nodes[Symbol.iterator]();!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0){var node=_step.value;node.loc&&printedLocations.push(highlightSourceAtLocation(node.loc.source,(0,_location.getLocation)(node.loc.source,node.loc.start)))}}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{_iteratorNormalCompletion||null==_iterator.return||_iterator.return()}finally{if(_didIteratorError)throw _iteratorError}}}else if(error.source&&error.locations){var source=error.source,_iteratorNormalCompletion2=!0,_didIteratorError2=!1,_iteratorError2=void 0;try{for(var _step2,_iterator2=error.locations[Symbol.iterator]();!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=!0){var location=_step2.value;printedLocations.push(highlightSourceAtLocation(source,location))}}catch(err){_didIteratorError2=!0,_iteratorError2=err}finally{try{_iteratorNormalCompletion2||null==_iterator2.return||_iterator2.return()}finally{if(_didIteratorError2)throw _iteratorError2}}}return 0===printedLocations.length?error.message:[error.message].concat(printedLocations).join("\n\n")+"\n"};var _location=require("../language/location");function highlightSourceAtLocation(source,location){var firstLineColumnOffset=source.locationOffset.column-1,body=whitespace(firstLineColumnOffset)+source.body,lineIndex=location.line-1,lineOffset=source.locationOffset.line-1,lineNum=location.line+lineOffset,columnOffset=1===location.line?firstLineColumnOffset:0,columnNum=location.column+columnOffset,lines=body.split(/\r\n|[\n\r]/g);return"".concat(source.name," (").concat(lineNum,":").concat(columnNum,")\n")+function(lines){var existingLines=lines.filter(function(_ref){_ref[0];var line=_ref[1];return void 0!==line}),padLen=0,_iteratorNormalCompletion3=!0,_didIteratorError3=!1,_iteratorError3=void 0;try{for(var _step3,_iterator3=existingLines[Symbol.iterator]();!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=!0){var _ref4=_step3.value,prefix=_ref4[0];padLen=Math.max(padLen,prefix.length)}}catch(err){_didIteratorError3=!0,_iteratorError3=err}finally{try{_iteratorNormalCompletion3||null==_iterator3.return||_iterator3.return()}finally{if(_didIteratorError3)throw _iteratorError3}}return existingLines.map(function(_ref3){var prefix=_ref3[0],line=_ref3[1];return function(len,str){return whitespace(len-str.length)+str}(padLen,prefix)+line}).join("\n")}([["".concat(lineNum-1,": "),lines[lineIndex-1]],["".concat(lineNum,": "),lines[lineIndex]],["",whitespace(columnNum-1)+"^"],["".concat(lineNum+1,": "),lines[1+lineIndex]]])}function whitespace(len){return Array(len+1).join(" ")}},{"../language/location":52}],23:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.syntaxError=function(source,position,description){return new _GraphQLError.GraphQLError("Syntax Error: ".concat(description),void 0,source,[position])};var _GraphQLError=require("./GraphQLError")},{"./GraphQLError":18}],24:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.execute=function(argsOrSchema,document,rootValue,contextValue,variableValues,operationName,fieldResolver,typeResolver){return 1===arguments.length?executeImpl(argsOrSchema.schema,argsOrSchema.document,argsOrSchema.rootValue,argsOrSchema.contextValue,argsOrSchema.variableValues,argsOrSchema.operationName,argsOrSchema.fieldResolver,argsOrSchema.typeResolver):executeImpl(argsOrSchema,document,rootValue,contextValue,variableValues,operationName,fieldResolver,typeResolver)},exports.responsePathAsArray=responsePathAsArray,exports.addPath=addPath,exports.assertValidExecutionArguments=assertValidExecutionArguments,exports.buildExecutionContext=buildExecutionContext,exports.collectFields=collectFields,exports.buildResolveInfo=buildResolveInfo,exports.resolveFieldValueOrError=resolveFieldValueOrError,exports.getFieldDef=getFieldDef,exports.defaultFieldResolver=exports.defaultTypeResolver=void 0;var _iterall=require("iterall"),_GraphQLError=require("../error/GraphQLError"),_locatedError=require("../error/locatedError"),_inspect=_interopRequireDefault(require("../jsutils/inspect")),_invariant=_interopRequireDefault(require("../jsutils/invariant")),_isInvalid=_interopRequireDefault(require("../jsutils/isInvalid")),_isNullish=_interopRequireDefault(require("../jsutils/isNullish")),_isPromise=_interopRequireDefault(require("../jsutils/isPromise")),_memoize=_interopRequireDefault(require("../jsutils/memoize3")),_promiseForObject=_interopRequireDefault(require("../jsutils/promiseForObject")),_promiseReduce=_interopRequireDefault(require("../jsutils/promiseReduce")),_getOperationRootType=require("../utilities/getOperationRootType"),_typeFromAST=require("../utilities/typeFromAST"),_kinds=require("../language/kinds"),_values=require("./values"),_definition=require("../type/definition"),_introspection=require("../type/introspection"),_directives=require("../type/directives"),_validate=require("../type/validate");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}function executeImpl(schema,document,rootValue,contextValue,variableValues,operationName,fieldResolver,typeResolver){assertValidExecutionArguments(schema,document,variableValues);var exeContext=buildExecutionContext(schema,document,rootValue,contextValue,variableValues,operationName,fieldResolver,typeResolver);if(Array.isArray(exeContext))return{errors:exeContext};var data=function(exeContext,operation,rootValue){var type=(0,_getOperationRootType.getOperationRootType)(exeContext.schema,operation),fields=collectFields(exeContext,type,operation.selectionSet,Object.create(null),Object.create(null)),path=void 0;try{var result="mutation"===operation.operation?function(exeContext,parentType,sourceValue,path,fields){return(0,_promiseReduce.default)(Object.keys(fields),function(results,responseName){var fieldNodes=fields[responseName],fieldPath=addPath(path,responseName),result=resolveField(exeContext,parentType,sourceValue,fieldNodes,fieldPath);return void 0===result?results:(0,_isPromise.default)(result)?result.then(function(resolvedResult){return results[responseName]=resolvedResult,results}):(results[responseName]=result,results)},Object.create(null))}(exeContext,type,rootValue,path,fields):executeFields(exeContext,type,rootValue,path,fields);return(0,_isPromise.default)(result)?result.then(void 0,function(error){return exeContext.errors.push(error),Promise.resolve(null)}):result}catch(error){return exeContext.errors.push(error),null}}(exeContext,exeContext.operation,rootValue);return function buildResponse(exeContext,data){if((0,_isPromise.default)(data))return data.then(function(resolved){return buildResponse(exeContext,resolved)});return 0===exeContext.errors.length?{data:data}:{errors:exeContext.errors,data:data}}(exeContext,data)}function responsePathAsArray(path){for(var flattened=[],curr=path;curr;)flattened.push(curr.key),curr=curr.prev;return flattened.reverse()}function addPath(prev,key){return{prev:prev,key:key}}function assertValidExecutionArguments(schema,document,rawVariableValues){document||(0,_invariant.default)(0,"Must provide document"),(0,_validate.assertValidSchema)(schema),rawVariableValues&&"object"!==_typeof(rawVariableValues)&&(0,_invariant.default)(0,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function buildExecutionContext(schema,document,rootValue,contextValue,rawVariableValues,operationName,fieldResolver,typeResolver){for(var operation,variableValues,errors=[],hasMultipleAssumedOperations=!1,fragments=Object.create(null),i=0;iMAX_RECURSIVE_DEPTH)return"[Array]";for(var len=Math.min(MAX_ARRAY_LENGTH,array.length),remaining=array.length-len,items=[],i=0;iMAX_RECURSIVE_DEPTH)return"["+function(object){var tag=Object.prototype.toString.call(object).replace(/^\[object /,"").replace(/]$/,"");if("Object"===tag&&"function"==typeof object.constructor){var name=object.constructor.name;if("string"==typeof name)return name}return tag}(object)+"]";return"{ "+keys.map(function(key){var value=formatValue(object[key],seenValues);return key+": "+value}).join(", ")+" }"}(value,seenValues)}return String(value)}(value,seenValues);default:return String(value)}}},{"./nodejsCustomInspectSymbol":41}],32:[function(require,module,exports){(function(process){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _default="production"===process.env.NODE_ENV?function(value,constructor){return value instanceof constructor}:function(value,constructor){if(value instanceof constructor)return!0;if(value){var valueClass=value.constructor,className=constructor.name;if(className&&valueClass&&valueClass.name===className)throw new Error("Cannot use ".concat(className,' "').concat(value,'" from another module or realm.\n\nEnsure that there is only one instance of "graphql" in the node_modules\ndirectory. If different versions of "graphql" are the dependencies of other\nrelied on modules, use "resolutions" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate "graphql" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.'))}return!1};exports.default=_default}).call(this,require("_process"))},{_process:197}],33:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(condition,message){if(!Boolean(condition))throw new Error(message)}},{}],34:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(value){return void 0===value||value!=value}},{}],35:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(value){return null==value||value!=value}},{}],36:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(value){return Boolean(value&&"function"==typeof value.then)}},{}],37:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(list,keyFn){return list.reduce(function(map,item){return map[keyFn(item)]=item,map},Object.create(null))}},{}],38:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(list,keyFn,valFn){return list.reduce(function(map,item){return map[keyFn(item)]=valFn(item),map},Object.create(null))}},{}],39:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(map,fn){var result=Object.create(null),_iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _step,_iterator=(0,_objectEntries.default)(map)[Symbol.iterator]();!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0){var _ref2=_step.value,_key=_ref2[0],_value=_ref2[1];result[_key]=fn(_value,_key)}}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{_iteratorNormalCompletion||null==_iterator.return||_iterator.return()}finally{if(_didIteratorError)throw _iteratorError}}return result};var obj,_objectEntries=(obj=require("../polyfills/objectEntries"))&&obj.__esModule?obj:{default:obj}},{"../polyfills/objectEntries":62}],40:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(fn){var cache0;return function(a1,a2,a3){cache0||(cache0=new WeakMap);var cache2,cache1=cache0.get(a1);if(cache1){if(cache2=cache1.get(a2)){var cachedValue=cache2.get(a3);if(void 0!==cachedValue)return cachedValue}}else cache1=new WeakMap,cache0.set(a1,cache1);cache2||(cache2=new WeakMap,cache1.set(a2,cache2));var newValue=fn(a1,a2,a3);return cache2.set(a3,newValue),newValue}}},{}],41:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _default="function"==typeof Symbol?Symbol.for("nodejs.util.inspect.custom"):void 0;exports.default=_default},{}],42:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(items){if(0===items.length&&(0,_invariant.default)(0),1===items.length)return items[0];if(2===items.length)return items[0]+" or "+items[1];var selected=items.slice(0,MAX_LENGTH),lastItem=selected.pop();return selected.join(", ")+", or "+lastItem};var obj,_invariant=(obj=require("./invariant"))&&obj.__esModule?obj:{default:obj};var MAX_LENGTH=5},{"./invariant":33}],43:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(object){var keys=Object.keys(object),valuesAndPromises=keys.map(function(name){return object[name]});return Promise.all(valuesAndPromises).then(function(values){return values.reduce(function(resolvedObject,value,i){return resolvedObject[keys[i]]=value,resolvedObject},Object.create(null))})}},{}],44:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(values,callback,initialValue){return values.reduce(function(previous,value){return(0,_isPromise.default)(previous)?previous.then(function(resolved){return callback(resolved,value)}):callback(previous,value)},initialValue)};var obj,_isPromise=(obj=require("./isPromise"))&&obj.__esModule?obj:{default:obj}},{"./isPromise":36}],45:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(items){return(0,_orList.default)(items.map(function(item){return'"'.concat(item,'"')}))};var obj,_orList=(obj=require("./orList"))&&obj.__esModule?obj:{default:obj}},{"./orList":42}],46:[function(require,module,exports){"use strict";function lexicalDistance(aStr,bStr){if(aStr===bStr)return 0;var i,j,d=[],a=aStr.toLowerCase(),b=bStr.toLowerCase(),aLength=a.length,bLength=b.length;if(a===b)return 1;for(i=0;i<=aLength;i++)d[i]=[i];for(j=1;j<=bLength;j++)d[0][j]=j;for(i=1;i<=aLength;i++)for(j=1;j<=bLength;j++){var cost=a[i-1]===b[j-1]?0:1;d[i][j]=Math.min(d[i-1][j]+1,d[i][j-1]+1,d[i-1][j-1]+cost),1",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",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",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function Tok(kind,start,end,line,column,prev,value){this.kind=kind,this.start=start,this.end=end,this.line=line,this.column=column,this.value=value,this.prev=prev,this.next=null}function printCharCode(code){return isNaN(code)?TokenKind.EOF:code<127?JSON.stringify(String.fromCharCode(code)):'"\\u'.concat(("00"+code.toString(16).toUpperCase()).slice(-4),'"')}function readToken(lexer,prev){var source=lexer.source,body=source.body,bodyLength=body.length,pos=function(body,startPosition,lexer){var bodyLength=body.length,position=startPosition;for(;position=this._o.length?{value:this._o=void 0,done:!0}:{value:this._o[this._i++],done:!1}};var SYMBOL_ASYNC_ITERATOR=SYMBOL&&SYMBOL.asyncIterator,$$asyncIterator=exports.$$asyncIterator=SYMBOL_ASYNC_ITERATOR||"@@asyncIterator";function getAsyncIterator(asyncIterable){var method=getAsyncIteratorMethod(asyncIterable);if(method)return method.call(asyncIterable)}function getAsyncIteratorMethod(asyncIterable){if(null!=asyncIterable){var method=SYMBOL_ASYNC_ITERATOR&&asyncIterable[SYMBOL_ASYNC_ITERATOR]||asyncIterable["@@asyncIterator"];if("function"==typeof method)return method}}function createAsyncIterator(source){if(null!=source){var asyncIterator=getAsyncIterator(source);if(asyncIterator)return asyncIterator;var iterator=createIterator(source);if(iterator)return new AsyncFromSyncIterator(iterator)}}function AsyncFromSyncIterator(iterator){this._i=iterator}AsyncFromSyncIterator.prototype[$$asyncIterator]=function(){return this},AsyncFromSyncIterator.prototype.next=function(){var step=this._i.next();return Promise.resolve(step.value).then(function(value){return{value:value,done:step.done}})}},{}],137:[function(require,module,exports){"use strict";function assign(obj){return Array.prototype.slice.call(arguments,1).forEach(function(source){source&&Object.keys(source).forEach(function(key){obj[key]=source[key]})}),obj}function _class(obj){return Object.prototype.toString.call(obj)}function isFunction(obj){return"[object Function]"===_class(obj)}function escapeRE(str){return str.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var defaultOptions={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var defaultSchemas={"http:":{validate:function(text,pos,self){var tail=text.slice(pos);return self.re.http||(self.re.http=new RegExp("^\\/\\/"+self.re.src_auth+self.re.src_host_port_strict+self.re.src_path,"i")),self.re.http.test(tail)?tail.match(self.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(text,pos,self){var tail=text.slice(pos);return self.re.no_http||(self.re.no_http=new RegExp("^"+self.re.src_auth+"(?:localhost|(?:(?:"+self.re.src_domain+")\\.)+"+self.re.src_domain_root+")"+self.re.src_port+self.re.src_host_terminator+self.re.src_path,"i")),self.re.no_http.test(tail)?3<=pos&&":"===text[pos-3]?0:3<=pos&&"/"===text[pos-3]?0:tail.match(self.re.no_http)[0].length:0}},"mailto:":{validate:function(text,pos,self){var tail=text.slice(pos);return self.re.mailto||(self.re.mailto=new RegExp("^"+self.re.src_email_name+"@"+self.re.src_host_strict,"i")),self.re.mailto.test(tail)?tail.match(self.re.mailto)[0].length:0}}},tlds_2ch_src_re="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",tlds_default="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function compile(self){var re=self.re=require("./lib/re")(self.__opts__),tlds=self.__tlds__.slice();function untpl(tpl){return tpl.replace("%TLDS%",re.src_tlds)}self.onCompile(),self.__tlds_replaced__||tlds.push(tlds_2ch_src_re),tlds.push(re.src_xn),re.src_tlds=tlds.join("|"),re.email_fuzzy=RegExp(untpl(re.tpl_email_fuzzy),"i"),re.link_fuzzy=RegExp(untpl(re.tpl_link_fuzzy),"i"),re.link_no_ip_fuzzy=RegExp(untpl(re.tpl_link_no_ip_fuzzy),"i"),re.host_fuzzy_test=RegExp(untpl(re.tpl_host_fuzzy_test),"i");var aliases=[];function schemaError(name,val){throw new Error('(LinkifyIt) Invalid schema "'+name+'": '+val)}self.__compiled__={},Object.keys(self.__schemas__).forEach(function(name){var val=self.__schemas__[name];if(null!==val){var compiled={validate:null,link:null};if(self.__compiled__[name]=compiled,function(obj){return"[object Object]"===_class(obj)}(val))return!function(obj){return"[object RegExp]"===_class(obj)}(val.validate)?isFunction(val.validate)?compiled.validate=val.validate:schemaError(name,val):compiled.validate=function(re){return function(text,pos){var tail=text.slice(pos);return re.test(tail)?tail.match(re)[0].length:0}}(val.validate),void(isFunction(val.normalize)?compiled.normalize=val.normalize:val.normalize?schemaError(name,val):compiled.normalize=function(match,self){self.normalize(match)});!function(obj){return"[object String]"===_class(obj)}(val)?schemaError(name,val):aliases.push(name)}}),aliases.forEach(function(alias){self.__compiled__[self.__schemas__[alias]]&&(self.__compiled__[alias].validate=self.__compiled__[self.__schemas__[alias]].validate,self.__compiled__[alias].normalize=self.__compiled__[self.__schemas__[alias]].normalize)}),self.__compiled__[""]={validate:null,normalize:function(match,self){self.normalize(match)}};var slist=Object.keys(self.__compiled__).filter(function(name){return 0<|]|"+re.src_ZPCc+"))("+slist+")","i"),self.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+re.src_ZPCc+"))("+slist+")","ig"),self.re.pretest=RegExp("("+self.re.schema_test.source+")|("+self.re.host_fuzzy_test.source+")|@","i"),function(self){self.__index__=-1,self.__text_cache__=""}(self)}function Match(self,shift){var start=self.__index__,end=self.__last_index__,text=self.__text_cache__.slice(start,end);this.schema=self.__schema__.toLowerCase(),this.index=start+shift,this.lastIndex=end+shift,this.raw=text,this.text=text,this.url=text}function createMatch(self,shift){var match=new Match(self,shift);return self.__compiled__[match.schema].normalize(match,self),match}function LinkifyIt(schemas,options){if(!(this instanceof LinkifyIt))return new LinkifyIt(schemas,options);options||!function(obj){return Object.keys(obj||{}).reduce(function(acc,k){return acc||defaultOptions.hasOwnProperty(k)},!1)}(schemas)||(options=schemas,schemas={}),this.__opts__=assign({},defaultOptions,options),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=assign({},defaultSchemas,schemas),this.__compiled__={},this.__tlds__=tlds_default,this.__tlds_replaced__=!1,this.re={},compile(this)}LinkifyIt.prototype.add=function(schema,definition){return this.__schemas__[schema]=definition,compile(this),this},LinkifyIt.prototype.set=function(options){return this.__opts__=assign(this.__opts__,options),this},LinkifyIt.prototype.test=function(text){if(this.__text_cache__=text,this.__index__=-1,!text.length)return!1;var m,ml,me,len,shift,next,re,tld_pos;if(this.re.schema_test.test(text))for((re=this.re.schema_search).lastIndex=0;null!==(m=re.exec(text));)if(len=this.testSchemaAt(text,m[2],re.lastIndex)){this.__schema__=m[2],this.__index__=m.index+m[1].length,this.__last_index__=m.index+m[0].length+len;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&0<=(tld_pos=text.search(this.re.host_fuzzy_test))&&(this.__index__<0||tld_posthis.__last_index__)&&(this.__schema__="mailto:",this.__index__=shift,this.__last_index__=next)),0<=this.__index__},LinkifyIt.prototype.pretest=function(text){return this.re.pretest.test(text)},LinkifyIt.prototype.testSchemaAt=function(text,schema,pos){return this.__compiled__[schema.toLowerCase()]?this.__compiled__[schema.toLowerCase()].validate(text,pos,this):0},LinkifyIt.prototype.match=function(text){var shift=0,result=[];0<=this.__index__&&this.__text_cache__===text&&(result.push(createMatch(this,shift)),shift=this.__last_index__);for(var tail=shift?text.slice(shift):text;this.test(tail);)result.push(createMatch(this,shift)),tail=tail.slice(this.__last_index__),shift+=this.__last_index__;return result.length?result:null},LinkifyIt.prototype.tlds=function(list,keepOld){return list=Array.isArray(list)?list:[list],keepOld?this.__tlds__=this.__tlds__.concat(list).sort().filter(function(el,idx,arr){return el!==arr[idx-1]}).reverse():(this.__tlds__=list.slice(),this.__tlds_replaced__=!0),compile(this),this},LinkifyIt.prototype.normalize=function(match){match.schema||(match.url="http://"+match.url),"mailto:"!==match.schema||/^mailto:/i.test(match.url)||(match.url="mailto:"+match.url)},LinkifyIt.prototype.onCompile=function(){},module.exports=LinkifyIt},{"./lib/re":138}],138:[function(require,module,exports){"use strict";module.exports=function(opts){var re={};re.src_Any=require("uc.micro/properties/Any/regex").source,re.src_Cc=require("uc.micro/categories/Cc/regex").source,re.src_Z=require("uc.micro/categories/Z/regex").source,re.src_P=require("uc.micro/categories/P/regex").source,re.src_ZPCc=[re.src_Z,re.src_P,re.src_Cc].join("|"),re.src_ZCc=[re.src_Z,re.src_Cc].join("|");return re.src_pseudo_letter="(?:(?![><|]|"+re.src_ZPCc+")"+re.src_Any+")",re.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",re.src_auth="(?:(?:(?!"+re.src_ZCc+"|[@/\\[\\]()]).)+@)?",re.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",re.src_host_terminator="(?=$|[><|]|"+re.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+re.src_ZPCc+"))",re.src_path="(?:[/?#](?:(?!"+re.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+re.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+re.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+re.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+re.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+re.src_ZCc+"|[']).)+\\'|\\'(?="+re.src_pseudo_letter+"|[-]).|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!"+re.src_ZCc+"|[.]).|"+(opts&&opts["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+re.src_ZCc+").|\\!(?!"+re.src_ZCc+"|[!]).|\\?(?!"+re.src_ZCc+"|[?]).)+|\\/)?",re.src_email_name='[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',re.src_xn="xn--[a-z0-9\\-]{1,59}",re.src_domain_root="(?:"+re.src_xn+"|"+re.src_pseudo_letter+"{1,63})",re.src_domain="(?:"+re.src_xn+"|(?:"+re.src_pseudo_letter+")|(?:"+re.src_pseudo_letter+"(?:-(?!-)|"+re.src_pseudo_letter+"){0,61}"+re.src_pseudo_letter+"))",re.src_host="(?:(?:(?:(?:"+re.src_domain+")\\.)*"+re.src_domain+"))",re.tpl_host_fuzzy="(?:"+re.src_ip4+"|(?:(?:(?:"+re.src_domain+")\\.)+(?:%TLDS%)))",re.tpl_host_no_ip_fuzzy="(?:(?:(?:"+re.src_domain+")\\.)+(?:%TLDS%))",re.src_host_strict=re.src_host+re.src_host_terminator,re.tpl_host_fuzzy_strict=re.tpl_host_fuzzy+re.src_host_terminator,re.src_host_port_strict=re.src_host+re.src_port+re.src_host_terminator,re.tpl_host_port_fuzzy_strict=re.tpl_host_fuzzy+re.src_port+re.src_host_terminator,re.tpl_host_port_no_ip_fuzzy_strict=re.tpl_host_no_ip_fuzzy+re.src_port+re.src_host_terminator,re.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+re.src_ZPCc+"|>|$))",re.tpl_email_fuzzy="(^|[><|]|\\(|"+re.src_ZCc+")("+re.src_email_name+"@"+re.tpl_host_fuzzy_strict+")",re.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+re.src_ZPCc+"))((?![$+<=>^`||])"+re.tpl_host_port_fuzzy_strict+re.src_path+")",re.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+re.src_ZPCc+"))((?![$+<=>^`||])"+re.tpl_host_port_no_ip_fuzzy_strict+re.src_path+")",re}},{"uc.micro/categories/Cc/regex":209,"uc.micro/categories/P/regex":211,"uc.micro/categories/Z/regex":212,"uc.micro/properties/Any/regex":214}],139:[function(require,module,exports){"use strict";module.exports=require("./lib/")},{"./lib/":148}],140:[function(require,module,exports){"use strict";module.exports=require("entities/maps/entities.json")},{"entities/maps/entities.json":17}],141:[function(require,module,exports){"use strict";module.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},{}],142:[function(require,module,exports){"use strict";var open_tag="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",close_tag="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",HTML_TAG_RE=new RegExp("^(?:"+open_tag+"|"+close_tag+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|]*>|)"),HTML_OPEN_CLOSE_TAG_RE=new RegExp("^(?:"+open_tag+"|"+close_tag+")");module.exports.HTML_TAG_RE=HTML_TAG_RE,module.exports.HTML_OPEN_CLOSE_TAG_RE=HTML_OPEN_CLOSE_TAG_RE},{}],143:[function(require,module,exports){"use strict";var _hasOwnProperty=Object.prototype.hasOwnProperty;function has(object,key){return _hasOwnProperty.call(object,key)}function isValidEntityCode(c){return!(55296<=c&&c<=57343)&&(!(64976<=c&&c<=65007)&&(65535!=(65535&c)&&65534!=(65535&c)&&(!(0<=c&&c<=8)&&(11!==c&&(!(14<=c&&c<=31)&&(!(127<=c&&c<=159)&&!(1114111>10),surrogate2=56320+(1023&c);return String.fromCharCode(surrogate1,surrogate2)}return String.fromCharCode(c)}var UNESCAPE_MD_RE=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,UNESCAPE_ALL_RE=new RegExp(UNESCAPE_MD_RE.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),DIGITAL_ENTITY_TEST_RE=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,entities=require("./entities");var HTML_ESCAPE_TEST_RE=/[&<>"]/,HTML_ESCAPE_REPLACE_RE=/[&<>"]/g,HTML_REPLACEMENTS={"&":"&","<":"<",">":">",'"':"""};function replaceUnsafeChar(ch){return HTML_REPLACEMENTS[ch]}var REGEXP_ESCAPE_RE=/[.?*+^$[\]\\(){}|-]/g;var UNICODE_PUNCT_RE=require("uc.micro/categories/P/regex");exports.lib={},exports.lib.mdurl=require("mdurl"),exports.lib.ucmicro=require("uc.micro"),exports.assign=function(obj){return Array.prototype.slice.call(arguments,1).forEach(function(source){if(source){if("object"!=typeof source)throw new TypeError(source+"must be object");Object.keys(source).forEach(function(key){obj[key]=source[key]})}}),obj},exports.isString=function(obj){return"[object String]"===function(obj){return Object.prototype.toString.call(obj)}(obj)},exports.has=has,exports.unescapeMd=function(str){return str.indexOf("\\")<0?str:str.replace(UNESCAPE_MD_RE,"$1")},exports.unescapeAll=function(str){return str.indexOf("\\")<0&&str.indexOf("&")<0?str:str.replace(UNESCAPE_ALL_RE,function(match,escaped,entity){return escaped||function(match,name){var code=0;return has(entities,name)?entities[name]:35===name.charCodeAt(0)&&DIGITAL_ENTITY_TEST_RE.test(name)&&isValidEntityCode(code="x"===name[1].toLowerCase()?parseInt(name.slice(2),16):parseInt(name.slice(1),10))?fromCodePoint(code):match}(match,entity)})},exports.isValidEntityCode=isValidEntityCode,exports.fromCodePoint=fromCodePoint,exports.escapeHtml=function(str){return HTML_ESCAPE_TEST_RE.test(str)?str.replace(HTML_ESCAPE_REPLACE_RE,replaceUnsafeChar):str},exports.arrayReplaceAt=function(src,pos,newElements){return[].concat(src.slice(0,pos),newElements,src.slice(pos+1))},exports.isSpace=function(code){switch(code){case 9:case 32:return!0}return!1},exports.isWhiteSpace=function(code){if(8192<=code&&code<=8202)return!0;switch(code){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},exports.isMdAsciiPunct=function(ch){switch(ch){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},exports.isPunctChar=function(ch){return UNICODE_PUNCT_RE.test(ch)},exports.escapeRE=function(str){return str.replace(REGEXP_ESCAPE_RE,"\\$&")},exports.normalizeReference=function(str){return str.trim().replace(/\s+/g," ").toUpperCase()}},{"./entities":140,mdurl:194,"uc.micro":213,"uc.micro/categories/P/regex":211}],144:[function(require,module,exports){"use strict";exports.parseLinkLabel=require("./parse_link_label"),exports.parseLinkDestination=require("./parse_link_destination"),exports.parseLinkTitle=require("./parse_link_title")},{"./parse_link_destination":145,"./parse_link_label":146,"./parse_link_title":147}],145:[function(require,module,exports){"use strict";var isSpace=require("../common/utils").isSpace,unescapeAll=require("../common/utils").unescapeAll;module.exports=function(str,pos,max){var code,level,start=pos,result={ok:!1,pos:0,lines:0,str:""};if(60===str.charCodeAt(pos)){for(pos++;pos=maxNesting){state.line=endLine;break}for(i=0;i=end)break}else state.pending+=state.src[state.pos++]}state.pending&&state.pushPending()},ParserInline.prototype.parse=function(str,md,env,outTokens){var i,rules,len,state=new this.State(str,md,env,outTokens);for(this.tokenize(state),len=(rules=this.ruler2.getRules("")).length,i=0;i"+escapeHtml(tokens[idx].content)+""},default_rules.code_block=function(tokens,idx,options,env,slf){var token=tokens[idx];return""+escapeHtml(tokens[idx].content)+"
\n"},default_rules.fence=function(tokens,idx,options,env,slf){var highlighted,i,tmpAttrs,tmpToken,token=tokens[idx],info=token.info?unescapeAll(token.info).trim():"",langName="";return info&&(langName=info.split(/\s+/g)[0]),0===(highlighted=options.highlight&&options.highlight(token.content,langName)||escapeHtml(token.content)).indexOf(""+highlighted+"
\n"):""+highlighted+"
\n"},default_rules.image=function(tokens,idx,options,env,slf){var token=tokens[idx];return token.attrs[token.attrIndex("alt")][1]=slf.renderInlineAsText(token.children,options,env),slf.renderToken(tokens,idx,options)},default_rules.hardbreak=function(tokens,idx,options){return options.xhtmlOut?" \n":" \n"},default_rules.softbreak=function(tokens,idx,options){return options.breaks?options.xhtmlOut?" \n":" \n":"\n"},default_rules.text=function(tokens,idx){return escapeHtml(tokens[idx].content)},default_rules.html_block=function(tokens,idx){return tokens[idx].content},default_rules.html_inline=function(tokens,idx){return tokens[idx].content},Renderer.prototype.renderAttrs=function(token){var i,l,result;if(!token.attrs)return"";for(result="",i=0,l=token.attrs.length;i\n":">")},Renderer.prototype.renderInline=function(tokens,options,env){for(var type,result="",rules=this.rules,i=0,len=tokens.length;i",token.map=lines=[startLine,0],state.md.block.tokenize(state,startLine,nextLine),(token=state.push("blockquote_close","blockquote",-1)).markup=">",state.lineMax=oldLineMax,state.parentType=oldParentType,lines[1]=state.line,i=0;i|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^?("+block_names.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(HTML_OPEN_CLOSE_TAG_RE.source+"\\s*$"),/^$/,!1]];module.exports=function(state,startLine,endLine,silent){var i,nextLine,token,lineText,pos=state.bMarks[startLine]+state.tShift[startLine],max=state.eMarks[startLine];if(4<=state.sCount[startLine]-state.blkIndent)return!1;if(!state.md.options.html)return!1;if(60!==state.src.charCodeAt(pos))return!1;for(lineText=state.src.slice(pos,max),i=0;i=state.blkIndent&&(pos=state.bMarks[nextLine]+state.tShift[nextLine])<(max=state.eMarks[nextLine])&&(45===(marker=state.src.charCodeAt(pos))||61===marker)&&(pos=state.skipChars(pos,marker),max<=(pos=state.skipSpaces(pos)))){level=61===marker?1:2;break}if(!(state.sCount[nextLine]<0)){for(terminate=!1,i=0,l=terminatorRules.length;i=state.blkIndent&&(isTerminatingParagraph=!0),0<=(posAfterMarker=skipOrderedListMarker(state,startLine))){if(isOrdered=!0,start=state.bMarks[startLine]+state.tShift[startLine],markerValue=Number(state.src.substr(start,posAfterMarker-start-1)),isTerminatingParagraph&&1!==markerValue)return!1}else{if(!(0<=(posAfterMarker=skipBulletListMarker(state,startLine))))return!1;isOrdered=!1}if(isTerminatingParagraph&&state.skipSpaces(posAfterMarker)>=state.eMarks[startLine])return!1;if(markerCharCode=state.src.charCodeAt(posAfterMarker-1),silent)return!0;for(listTokIdx=state.tokens.length,isOrdered?(token=state.push("ordered_list_open","ol",1),1!==markerValue&&(token.attrs=[["start",markerValue]])):token=state.push("bullet_list_open","ul",1),token.map=listLines=[startLine,0],token.markup=String.fromCharCode(markerCharCode),nextLine=startLine,prevEmptyEnd=!1,terminatorRules=state.md.block.ruler.getRules("list"),oldParentType=state.parentType,state.parentType="list";nextLine=this.eMarks[line]},StateBlock.prototype.skipEmptyLines=function(from){for(var max=this.lineMax;from=state.eMarks[nextLine])return!1;if(124!==(ch=state.src.charCodeAt(pos++))&&45!==ch&&58!==ch)return!1;for(;posaligns.length)return!1;if(silent)return!0;for((token=state.push("table_open","table",1)).map=tableLines=[startLine,0],(token=state.push("thead_open","thead",1)).map=[startLine,startLine+1],(token=state.push("tr_open","tr",1)).map=[startLine,startLine+1],i=0;i/i.test(str)}module.exports=function(state){var i,j,l,tokens,token,currentToken,nodes,ln,text,pos,lastPos,level,htmlLinkLevel,url,fullUrl,urlText,links,str,blockTokens=state.tokens;if(state.md.options.linkify)for(j=0,l=blockTokens.length;j\s]/i.test(str)&&0/,AUTOLINK_RE=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;module.exports=function(state,silent){var tail,linkMatch,emailMatch,url,fullUrl,token,pos=state.pos;return 60===state.src.charCodeAt(pos)&&(!((tail=state.src.slice(pos)).indexOf(">")<0)&&(AUTOLINK_RE.test(tail)?(url=(linkMatch=tail.match(AUTOLINK_RE))[0].slice(1,-1),fullUrl=state.md.normalizeLink(url),!!state.md.validateLink(fullUrl)&&(silent||((token=state.push("link_open","a",1)).attrs=[["href",fullUrl]],token.markup="autolink",token.info="auto",(token=state.push("text","",0)).content=state.md.normalizeLinkText(url),(token=state.push("link_close","a",-1)).markup="autolink",token.info="auto"),state.pos+=linkMatch[0].length,!0)):!!EMAIL_RE.test(tail)&&(url=(emailMatch=tail.match(EMAIL_RE))[0].slice(1,-1),fullUrl=state.md.normalizeLink("mailto:"+url),!!state.md.validateLink(fullUrl)&&(silent||((token=state.push("link_open","a",1)).attrs=[["href",fullUrl]],token.markup="autolink",token.info="auto",(token=state.push("text","",0)).content=state.md.normalizeLinkText(url),(token=state.push("link_close","a",-1)).markup="autolink",token.info="auto"),state.pos+=emailMatch[0].length,!0))))}},{}],177:[function(require,module,exports){"use strict";module.exports=function(state,silent){var start,max,marker,matchStart,matchEnd,token,pos=state.pos;if(96!==state.src.charCodeAt(pos))return!1;for(start=pos,pos++,max=state.posMax;pos?@[]^_`{|}~-".split("").forEach(function(ch){ESCAPED[ch.charCodeAt(0)]=1}),module.exports=function(state,silent){var ch,pos=state.pos,max=state.posMax;if(92!==state.src.charCodeAt(pos))return!1;if(++pos>10),56320+(1023&chr))),i+=9):result+="�";return result})}decode.defaultChars=";/?:@&=+$,#",decode.componentChars="",module.exports=decode},{}],192:[function(require,module,exports){"use strict";var encodeCache={};function encode(string,exclude,keepEscaped){var i,l,code,nextCode,cache,result="";for("string"!=typeof exclude&&(keepEscaped=exclude,exclude=encode.defaultChars),void 0===keepEscaped&&(keepEscaped=!0),cache=function(exclude){var i,ch,cache=encodeCache[exclude];if(cache)return cache;for(cache=encodeCache[exclude]=[],i=0;i<128;i++)ch=String.fromCharCode(i),/^[0-9a-z]$/i.test(ch)?cache.push(ch):cache.push("%"+("0"+i.toString(16).toUpperCase()).slice(-2));for(i=0;i",'"',"`"," ","\r","\n","\t"]),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};Url.prototype.parse=function(url,slashesDenoteHost){var i,l,lowerProto,hec,slashes,rest=url;if(rest=rest.trim(),!slashesDenoteHost&&1===url.split("#").length){var simplePath=simplePathPattern.exec(rest);if(simplePath)return this.pathname=simplePath[1],simplePath[2]&&(this.search=simplePath[2]),this}var proto=protocolPattern.exec(rest);if(proto&&(lowerProto=(proto=proto[0]).toLowerCase(),this.protocol=proto,rest=rest.substr(proto.length)),(slashesDenoteHost||proto||rest.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(slashes="//"===rest.substr(0,2))||proto&&hostlessProtocol[proto]||(rest=rest.substr(2),this.slashes=!0)),!hostlessProtocol[proto]&&(slashes||proto&&!slashedProtocol[proto])){var auth,atSign,hostEnd=-1;for(i=0;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode;function error(type){throw new RangeError(errors[type])}function map(array,fn){for(var length=array.length,result=[];length--;)result[length]=fn(array[length]);return result}function mapDomain(string,fn){var parts=string.split("@"),result="";return 1>>10&1023|55296),value=56320|1023&value),output+=stringFromCharCode(value)}).join("")}function digitToBasic(digit,flag){return digit+22+75*(digit<26)-((0!=flag)<<5)}function adapt(delta,numPoints,firstTime){var k=0;for(delta=firstTime?floor(delta/damp):delta>>1,delta+=floor(delta/numPoints);baseMinusTMin*tMax>>1floor((maxInt-i)/w))&&error("overflow"),i+=digit*w,!(digit<(t=k<=bias?tMin:bias+tMax<=k?tMax:k-bias));k+=base)w>floor(maxInt/(baseMinusT=base-t))&&error("overflow"),w*=baseMinusT;bias=adapt(i-oldi,out=output.length+1,0==oldi),floor(i/out)>maxInt-n&&error("overflow"),n+=floor(i/out),i%=out,output.splice(i++,0,n)}return ucs2encode(output)}function encode(input){var n,delta,handledCPCount,basicLength,bias,j,m,q,k,t,currentValue,inputLength,handledCPCountPlusOne,baseMinusT,qMinusT,output=[];for(inputLength=(input=ucs2decode(input)).length,n=initialN,bias=initialBias,j=delta=0;jfloor((maxInt-delta)/(handledCPCountPlusOne=handledCPCount+1))&&error("overflow"),delta+=(m-n)*handledCPCountPlusOne,n=m,j=0;jmaxInt&&error("overflow"),currentValue==n){for(q=delta,k=base;!(q<(t=k<=bias?tMin:bias+tMax<=k?tMax:k-bias));k+=base)qMinusT=q-t,baseMinusT=base-t,output.push(stringFromCharCode(digitToBasic(t+qMinusT%baseMinusT,0))),q=floor(qMinusT/baseMinusT);output.push(stringFromCharCode(digitToBasic(q,0))),bias=adapt(delta,handledCPCountPlusOne,handledCPCount==basicLength),delta=0,++handledCPCount}++delta,++n}return output.join("")}if(punycode={version:"1.4.1",ucs2:{decode:ucs2decode,encode:ucs2encode},decode:decode,encode:encode,toASCII:function(input){return mapDomain(input,function(string){return regexNonASCII.test(string)?"xn--"+encode(string):string})},toUnicode:function(input){return mapDomain(input,function(string){return regexPunycode.test(string)?decode(string.slice(4).toLowerCase()):string})}},freeExports&&freeModule)if(module.exports==freeExports)freeModule.exports=punycode;else for(key in punycode)punycode.hasOwnProperty(key)&&(freeExports[key]=punycode[key]);else root.punycode=punycode}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],204:[function(require,module,exports){(function(process){"use strict";"production"!==process.env.NODE_ENV&&function(){Object.defineProperty(exports,"__esModule",{value:!0});var hasSymbol="function"==typeof Symbol&&Symbol.for,REACT_ELEMENT_TYPE=hasSymbol?Symbol.for("react.element"):60103,REACT_PORTAL_TYPE=hasSymbol?Symbol.for("react.portal"):60106,REACT_FRAGMENT_TYPE=hasSymbol?Symbol.for("react.fragment"):60107,REACT_STRICT_MODE_TYPE=hasSymbol?Symbol.for("react.strict_mode"):60108,REACT_PROFILER_TYPE=hasSymbol?Symbol.for("react.profiler"):60114,REACT_PROVIDER_TYPE=hasSymbol?Symbol.for("react.provider"):60109,REACT_CONTEXT_TYPE=hasSymbol?Symbol.for("react.context"):60110,REACT_ASYNC_MODE_TYPE=hasSymbol?Symbol.for("react.async_mode"):60111,REACT_CONCURRENT_MODE_TYPE=hasSymbol?Symbol.for("react.concurrent_mode"):60111,REACT_FORWARD_REF_TYPE=hasSymbol?Symbol.for("react.forward_ref"):60112,REACT_SUSPENSE_TYPE=hasSymbol?Symbol.for("react.suspense"):60113,REACT_MEMO_TYPE=hasSymbol?Symbol.for("react.memo"):60115,REACT_LAZY_TYPE=hasSymbol?Symbol.for("react.lazy"):60116;var lowPriorityWarning$1=function(condition,format){if(void 0===format)throw new Error("`lowPriorityWarning(condition, format, ...args)` requires a warning message argument");if(!condition){for(var _len2=arguments.length,args=Array(2<_len2?_len2-2:0),_key2=2;_key2<_len2;_key2++)args[_key2-2]=arguments[_key2];(function(format){for(var _len=arguments.length,args=Array(1<_len?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];var argIndex=0,message="Warning: "+format.replace(/%s/g,function(){return args[argIndex++]});"undefined"!=typeof console&&console.warn(message);try{throw new Error(message)}catch(x){}}).apply(void 0,[format].concat(args))}};function typeOf(object){if("object"==typeof object&&null!==object){var $$typeof=object.$$typeof;switch($$typeof){case REACT_ELEMENT_TYPE:var type=object.type;switch(type){case REACT_ASYNC_MODE_TYPE:case REACT_CONCURRENT_MODE_TYPE:case REACT_FRAGMENT_TYPE:case REACT_PROFILER_TYPE:case REACT_STRICT_MODE_TYPE:case REACT_SUSPENSE_TYPE:return type;default:var $$typeofType=type&&type.$$typeof;switch($$typeofType){case REACT_CONTEXT_TYPE:case REACT_FORWARD_REF_TYPE:case REACT_PROVIDER_TYPE:return $$typeofType;default:return $$typeof}}case REACT_LAZY_TYPE:case REACT_MEMO_TYPE:case REACT_PORTAL_TYPE:return $$typeof}}}var AsyncMode=REACT_ASYNC_MODE_TYPE,ConcurrentMode=REACT_CONCURRENT_MODE_TYPE,ContextConsumer=REACT_CONTEXT_TYPE,ContextProvider=REACT_PROVIDER_TYPE,Element=REACT_ELEMENT_TYPE,ForwardRef=REACT_FORWARD_REF_TYPE,Fragment=REACT_FRAGMENT_TYPE,Lazy=REACT_LAZY_TYPE,Memo=REACT_MEMO_TYPE,Portal=REACT_PORTAL_TYPE,Profiler=REACT_PROFILER_TYPE,StrictMode=REACT_STRICT_MODE_TYPE,Suspense=REACT_SUSPENSE_TYPE,hasWarnedAboutDeprecatedIsAsyncMode=!1;function isConcurrentMode(object){return typeOf(object)===REACT_CONCURRENT_MODE_TYPE}exports.typeOf=typeOf,exports.AsyncMode=AsyncMode,exports.ConcurrentMode=ConcurrentMode,exports.ContextConsumer=ContextConsumer,exports.ContextProvider=ContextProvider,exports.Element=Element,exports.ForwardRef=ForwardRef,exports.Fragment=Fragment,exports.Lazy=Lazy,exports.Memo=Memo,exports.Portal=Portal,exports.Profiler=Profiler,exports.StrictMode=StrictMode,exports.Suspense=Suspense,exports.isValidElementType=function(type){return"string"==typeof type||"function"==typeof type||type===REACT_FRAGMENT_TYPE||type===REACT_CONCURRENT_MODE_TYPE||type===REACT_PROFILER_TYPE||type===REACT_STRICT_MODE_TYPE||type===REACT_SUSPENSE_TYPE||"object"==typeof type&&null!==type&&(type.$$typeof===REACT_LAZY_TYPE||type.$$typeof===REACT_MEMO_TYPE||type.$$typeof===REACT_PROVIDER_TYPE||type.$$typeof===REACT_CONTEXT_TYPE||type.$$typeof===REACT_FORWARD_REF_TYPE)},exports.isAsyncMode=function(object){return hasWarnedAboutDeprecatedIsAsyncMode||lowPriorityWarning$1(!(hasWarnedAboutDeprecatedIsAsyncMode=!0),"The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API."),isConcurrentMode(object)||typeOf(object)===REACT_ASYNC_MODE_TYPE},exports.isConcurrentMode=isConcurrentMode,exports.isContextConsumer=function(object){return typeOf(object)===REACT_CONTEXT_TYPE},exports.isContextProvider=function(object){return typeOf(object)===REACT_PROVIDER_TYPE},exports.isElement=function(object){return"object"==typeof object&&null!==object&&object.$$typeof===REACT_ELEMENT_TYPE},exports.isForwardRef=function(object){return typeOf(object)===REACT_FORWARD_REF_TYPE},exports.isFragment=function(object){return typeOf(object)===REACT_FRAGMENT_TYPE},exports.isLazy=function(object){return typeOf(object)===REACT_LAZY_TYPE},exports.isMemo=function(object){return typeOf(object)===REACT_MEMO_TYPE},exports.isPortal=function(object){return typeOf(object)===REACT_PORTAL_TYPE},exports.isProfiler=function(object){return typeOf(object)===REACT_PROFILER_TYPE},exports.isStrictMode=function(object){return typeOf(object)===REACT_STRICT_MODE_TYPE},exports.isSuspense=function(object){return typeOf(object)===REACT_SUSPENSE_TYPE}}()}).call(this,require("_process"))},{_process:197}],205:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var b="function"==typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.memo"):60115,r=b?Symbol.for("react.lazy"):60116;function t(a){if("object"==typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof){case k:case n:case h:return a;default:return u}}case r:case q:case d:return u}}}function v(a){return t(a)===m}exports.typeOf=t,exports.AsyncMode=l,exports.ConcurrentMode=m,exports.ContextConsumer=k,exports.ContextProvider=h,exports.Element=c,exports.ForwardRef=n,exports.Fragment=e,exports.Lazy=r,exports.Memo=q,exports.Portal=d,exports.Profiler=g,exports.StrictMode=f,exports.Suspense=p,exports.isValidElementType=function(a){return"string"==typeof a||"function"==typeof a||a===e||a===m||a===g||a===f||a===p||"object"==typeof a&&null!==a&&(a.$$typeof===r||a.$$typeof===q||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n)},exports.isAsyncMode=function(a){return v(a)||t(a)===l},exports.isConcurrentMode=v,exports.isContextConsumer=function(a){return t(a)===k},exports.isContextProvider=function(a){return t(a)===h},exports.isElement=function(a){return"object"==typeof a&&null!==a&&a.$$typeof===c},exports.isForwardRef=function(a){return t(a)===n},exports.isFragment=function(a){return t(a)===e},exports.isLazy=function(a){return t(a)===r},exports.isMemo=function(a){return t(a)===q},exports.isPortal=function(a){return t(a)===d},exports.isProfiler=function(a){return t(a)===g},exports.isStrictMode=function(a){return t(a)===f},exports.isSuspense=function(a){return t(a)===p}},{}],206:[function(require,module,exports){(function(process){"use strict";"production"===process.env.NODE_ENV?module.exports=require("./cjs/react-is.production.min.js"):module.exports=require("./cjs/react-is.development.js")}).call(this,require("_process"))},{"./cjs/react-is.development.js":204,"./cjs/react-is.production.min.js":205,_process:197}],207:[function(require,module,exports){var runtime=function(exports){"use strict";var undefined,Op=Object.prototype,hasOwn=Op.hasOwnProperty,$Symbol="function"==typeof Symbol?Symbol:{},iteratorSymbol=$Symbol.iterator||"@@iterator",asyncIteratorSymbol=$Symbol.asyncIterator||"@@asyncIterator",toStringTagSymbol=$Symbol.toStringTag||"@@toStringTag";function wrap(innerFn,outerFn,self,tryLocsList){var protoGenerator=outerFn&&outerFn.prototype instanceof Generator?outerFn:Generator,generator=Object.create(protoGenerator.prototype),context=new Context(tryLocsList||[]);return generator._invoke=function(innerFn,self,context){var state=GenStateSuspendedStart;return function(method,arg){if(state===GenStateExecuting)throw new Error("Generator is already running");if(state===GenStateCompleted){if("throw"===method)throw arg;return doneResult()}for(context.method=method,context.arg=arg;;){var delegate=context.delegate;if(delegate){var delegateResult=maybeInvokeDelegate(delegate,context);if(delegateResult){if(delegateResult===ContinueSentinel)continue;return delegateResult}}if("next"===context.method)context.sent=context._sent=context.arg;else if("throw"===context.method){if(state===GenStateSuspendedStart)throw state=GenStateCompleted,context.arg;context.dispatchException(context.arg)}else"return"===context.method&&context.abrupt("return",context.arg);state=GenStateExecuting;var record=tryCatch(innerFn,self,context);if("normal"===record.type){if(state=context.done?GenStateCompleted:GenStateSuspendedYield,record.arg===ContinueSentinel)continue;return{value:record.arg,done:context.done}}"throw"===record.type&&(state=GenStateCompleted,context.method="throw",context.arg=record.arg)}}}(innerFn,self,context),generator}function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)}}catch(err){return{type:"throw",arg:err}}}exports.wrap=wrap;var GenStateSuspendedStart="suspendedStart",GenStateSuspendedYield="suspendedYield",GenStateExecuting="executing",GenStateCompleted="completed",ContinueSentinel={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var IteratorPrototype={};IteratorPrototype[iteratorSymbol]=function(){return this};var getProto=Object.getPrototypeOf,NativeIteratorPrototype=getProto&&getProto(getProto(values([])));NativeIteratorPrototype&&NativeIteratorPrototype!==Op&&hasOwn.call(NativeIteratorPrototype,iteratorSymbol)&&(IteratorPrototype=NativeIteratorPrototype);var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(IteratorPrototype);function defineIteratorMethods(prototype){["next","throw","return"].forEach(function(method){prototype[method]=function(arg){return this._invoke(method,arg)}})}function AsyncIterator(generator){var previousPromise;this._invoke=function(method,arg){function callInvokeWithMethodAndArg(){return new Promise(function(resolve,reject){!function invoke(method,arg,resolve,reject){var record=tryCatch(generator[method],generator,arg);if("throw"!==record.type){var result=record.arg,value=result.value;return value&&"object"==typeof value&&hasOwn.call(value,"__await")?Promise.resolve(value.__await).then(function(value){invoke("next",value,resolve,reject)},function(err){invoke("throw",err,resolve,reject)}):Promise.resolve(value).then(function(unwrapped){result.value=unwrapped,resolve(result)},function(error){return invoke("throw",error,resolve,reject)})}reject(record.arg)}(method,arg,resolve,reject)})}return previousPromise=previousPromise?previousPromise.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(delegate,context){var method=delegate.iterator[context.method];if(method===undefined){if(context.delegate=null,"throw"===context.method){if(delegate.iterator.return&&(context.method="return",context.arg=undefined,maybeInvokeDelegate(delegate,context),"throw"===context.method))return ContinueSentinel;context.method="throw",context.arg=new TypeError("The iterator does not provide a 'throw' method")}return ContinueSentinel}var record=tryCatch(method,delegate.iterator,context.arg);if("throw"===record.type)return context.method="throw",context.arg=record.arg,context.delegate=null,ContinueSentinel;var info=record.arg;return info?info.done?(context[delegate.resultName]=info.value,context.next=delegate.nextLoc,"return"!==context.method&&(context.method="next",context.arg=undefined),context.delegate=null,ContinueSentinel):info:(context.method="throw",context.arg=new TypeError("iterator result is not an object"),context.delegate=null,ContinueSentinel)}function pushTryEntry(locs){var entry={tryLoc:locs[0]};1 in locs&&(entry.catchLoc=locs[1]),2 in locs&&(entry.finallyLoc=locs[2],entry.afterLoc=locs[3]),this.tryEntries.push(entry)}function resetTryEntry(entry){var record=entry.completion||{};record.type="normal",delete record.arg,entry.completion=record}function Context(tryLocsList){this.tryEntries=[{tryLoc:"root"}],tryLocsList.forEach(pushTryEntry,this),this.reset(!0)}function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod)return iteratorMethod.call(iterable);if("function"==typeof iterable.next)return iterable;if(!isNaN(iterable.length)){var i=-1,next=function next(){for(;++itext.length&&(proximity-=suggestion.length-text.length-1,proximity+=0===suggestion.indexOf(text)?0:.5),proximity}(normalizeText(entry.text),text),entry:entry}}),function(pair){return pair.proximity<=2}),function(pair){return!pair.entry.isDeprecated}).sort(function(a,b){return(a.entry.isDeprecated?1:0)-(b.entry.isDeprecated?1:0)||a.proximity-b.proximity||a.entry.text.length-b.entry.text.length}).map(function(pair){return pair.entry}):filterNonEmpty(list,function(entry){return!entry.isDeprecated})}(list,normalizeText(token.string));if(!hints)return;var tokenStart=null!==token.type&&/"|\w/.test(token.string[0])?token.start:token.end;return{list:hints,from:{line:cursor.line,column:tokenStart},to:{line:cursor.line,column:token.end}}}},{}],228:[function(require,module,exports){"use strict";var obj,_codemirror=(obj=require("codemirror"))&&obj.__esModule?obj:{default:obj};_codemirror.default.defineOption("info",!1,function(cm,options,old){if(old&&old!==_codemirror.default.Init){var oldOnMouseOver=cm.state.info.onMouseOver;_codemirror.default.off(cm.getWrapperElement(),"mouseover",oldOnMouseOver),clearTimeout(cm.state.info.hoverTimeout),delete cm.state.info}if(options){var state=cm.state.info=function(options){return{options:options instanceof Function?{render:options}:!0===options?{}:options}}(options);state.onMouseOver=function(cm,e){var state=cm.state.info,target=e.target||e.srcElement;if("SPAN"!==target.nodeName||void 0!==state.hoverTimeout)return;var box=target.getBoundingClientRect(),hoverTime=function(cm){var options=cm.state.info.options;return options&&options.hoverTime||500}(cm);state.hoverTimeout=setTimeout(onHover,hoverTime);var onMouseMove=function(){clearTimeout(state.hoverTimeout),state.hoverTimeout=setTimeout(onHover,hoverTime)},onMouseOut=function onMouseOut(){_codemirror.default.off(document,"mousemove",onMouseMove),_codemirror.default.off(cm.getWrapperElement(),"mouseout",onMouseOut),clearTimeout(state.hoverTimeout),state.hoverTimeout=void 0},onHover=function(){_codemirror.default.off(document,"mousemove",onMouseMove),_codemirror.default.off(cm.getWrapperElement(),"mouseout",onMouseOut),state.hoverTimeout=void 0,function(cm,box){var pos=cm.coordsChar({left:(box.left+box.right)/2,top:(box.top+box.bottom)/2}),options=cm.state.info.options,render=options.render||cm.getHelper(pos,"info");if(render){var token=cm.getTokenAt(pos,!0);if(token){var info=render(token,options,cm,pos);info&&function(cm,box,info){var popup=document.createElement("div");popup.className="CodeMirror-info",popup.appendChild(info),document.body.appendChild(popup);var popupBox=popup.getBoundingClientRect(),popupStyle=popup.currentStyle||window.getComputedStyle(popup),popupWidth=popupBox.right-popupBox.left+parseFloat(popupStyle.marginLeft)+parseFloat(popupStyle.marginRight),popupHeight=popupBox.bottom-popupBox.top+parseFloat(popupStyle.marginTop)+parseFloat(popupStyle.marginBottom),topPos=box.bottom;popupHeight>window.innerHeight-box.bottom-15&&box.top>window.innerHeight-box.bottom&&(topPos=box.top-popupHeight);topPos<0&&(topPos=box.bottom);var popupTimeout,leftPos=Math.max(0,window.innerWidth-popupWidth-15);leftPos>box.left&&(leftPos=box.left);popup.style.opacity=1,popup.style.top=topPos+"px",popup.style.left=leftPos+"px";var onMouseOverPopup=function(){clearTimeout(popupTimeout)},onMouseOut=function(){clearTimeout(popupTimeout),popupTimeout=setTimeout(hidePopup,200)},hidePopup=function(){_codemirror.default.off(popup,"mouseover",onMouseOverPopup),_codemirror.default.off(popup,"mouseout",onMouseOut),_codemirror.default.off(cm.getWrapperElement(),"mouseout",onMouseOut),popup.style.opacity?(popup.style.opacity=0,setTimeout(function(){popup.parentNode&&popup.parentNode.removeChild(popup)},600)):popup.parentNode&&popup.parentNode.removeChild(popup)};_codemirror.default.on(popup,"mouseover",onMouseOverPopup),_codemirror.default.on(popup,"mouseout",onMouseOut),_codemirror.default.on(cm.getWrapperElement(),"mouseout",onMouseOut)}(cm,box,info)}}}(cm,box)};_codemirror.default.on(document,"mousemove",onMouseMove),_codemirror.default.on(cm.getWrapperElement(),"mouseout",onMouseOut)}.bind(null,cm),_codemirror.default.on(cm.getWrapperElement(),"mouseover",state.onMouseOver)}})},{codemirror:15}],229:[function(require,module,exports){"use strict";var string,strLen,start,end,lastEnd,code,kind;function parseObj(){var nodeStart=start,members=[];if(expect("{"),!skip("}")){for(;members.push(parseMember()),skip(","););expect("}")}return{kind:"Object",start:nodeStart,end:lastEnd,members:members}}function parseMember(){var nodeStart=start,key="String"===kind?curToken():null;expect("String"),expect(":");var value=parseVal();return{kind:"Member",start:nodeStart,end:lastEnd,key:key,value:value}}function parseVal(){switch(kind){case"[":return function(){var nodeStart=start,values=[];if(expect("["),!skip("]")){for(;values.push(parseVal()),skip(","););expect("]")}return{kind:"Array",start:nodeStart,end:lastEnd,values:values}}();case"{":return parseObj();case"String":case"Number":case"Boolean":case"Null":var token=curToken();return lex(),token}return expect("Value")}function curToken(){return{kind:kind,start:start,end:end,value:JSON.parse(string.slice(start,end))}}function expect(str){if(kind!==str){var found;if("EOF"===kind)found="[end of file]";else if(1")}))}!this.props.isRunning&&i||(e=this._onClick),this.props.isRunning||!i||r||(t=this._onOptionsOpen);var a=this.props.isRunning?_react.default.createElement("path",{d:"M 10 10 L 23 10 L 23 23 L 10 23 z"}):_react.default.createElement("path",{d:"M 11 9 L 24 16 L 11 23 z"});return _react.default.createElement("div",{className:"execute-button-wrap"},_react.default.createElement("button",{type:"button",className:"execute-button",onMouseDown:t,onClick:e,title:"Execute Query (Ctrl-Enter)"},_react.default.createElement("svg",{width:"34",height:"34"},a)),u)}}]),t);function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),_defineProperty(_assertThisInitialized(n=function(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}(this,_getPrototypeOf(t).call(this,e))),"_onClick",function(){n.props.isRunning?n.props.onStop():n.props.onRun()}),_defineProperty(_assertThisInitialized(n),"_onOptionSelected",function(e){n.setState({optionsOpen:!1}),n.props.onRun(e.name&&e.name.value)}),_defineProperty(_assertThisInitialized(n),"_onOptionsOpen",function(e){var t=!0,o=e.target;n.setState({highlight:null,optionsOpen:!0});var r=function(e){t&&e.target===o?t=!1:(document.removeEventListener("mouseup",r),r=null,o.parentNode.compareDocumentPosition(e.target)&Node.DOCUMENT_POSITION_CONTAINED_BY||n.setState({optionsOpen:!1}))};document.addEventListener("mouseup",r)}),n.state={optionsOpen:!1,highlight:null},n}_defineProperty(exports.ExecuteButton=ExecuteButton,"propTypes",{onRun:_propTypes.default.func,onStop:_propTypes.default.func,isRunning:_propTypes.default.bool,operations:_propTypes.default.array})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"prop-types":201}],245:[function(require,module,exports){(function(global){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GraphiQL=void 0;var _react=_interopRequireDefault("undefined"!=typeof window?window.React:void 0!==global?global.React:null),_propTypes=_interopRequireDefault(require("prop-types")),_reactDom=_interopRequireDefault("undefined"!=typeof window?window.ReactDOM:void 0!==global?global.ReactDOM:null),_graphql=require("graphql"),_copyToClipboard=_interopRequireDefault(require("copy-to-clipboard")),_ExecuteButton=require("./ExecuteButton"),_ImagePreview=require("./ImagePreview"),_ToolbarButton=require("./ToolbarButton"),_ToolbarGroup=require("./ToolbarGroup"),_ToolbarMenu=require("./ToolbarMenu"),_ToolbarSelect=require("./ToolbarSelect"),_QueryEditor=require("./QueryEditor"),_VariableEditor=require("./VariableEditor"),_ResultViewer=require("./ResultViewer"),_DocExplorer=require("./DocExplorer"),_QueryHistory=require("./QueryHistory"),_CodeMirrorSizer=_interopRequireDefault(require("../utility/CodeMirrorSizer")),_StorageAPI=_interopRequireDefault(require("../utility/StorageAPI")),_getQueryFacts=_interopRequireDefault(require("../utility/getQueryFacts")),_getSelectedOperationName=_interopRequireDefault(require("../utility/getSelectedOperationName")),_debounce=_interopRequireDefault(require("../utility/debounce")),_find=_interopRequireDefault(require("../utility/find")),_fillLeafs2=require("../utility/fillLeafs"),_elementPosition=require("../utility/elementPosition"),_mergeAst=require("../utility/mergeAst"),_introspectionQueries=require("../utility/introspectionQueries");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _objectSpread(e){for(var t=1;t=i){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=_reactDom.default.findDOMNode(this.resultComponent);t;){if(t===r)return!0;t=t.parentNode}return!1}}]),t);function t(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),_defineProperty(_assertThisInitialized(r=function(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}(this,_getPrototypeOf(t).call(this,e))),"handleClickReference",function(e){r.setState({docExplorerOpen:!0},function(){r.docExplorerComponent.showDocForReference(e)})}),_defineProperty(_assertThisInitialized(r),"handleRunQuery",function(e){r._editorQueryID++;var o=r._editorQueryID,i=r.autoCompleteLeafs()||r.state.query,n=r.state.variables,a=r.state.operationName;e&&e!==a&&(a=e,r.handleEditOperationName(a));try{r.setState({isWaitingForResponse:!0,response:null,operationName:a});var s=r._fetchQuery(i,n,a,function(e){o===r._editorQueryID&&r.setState({isWaitingForResponse:!1,response:t.formatResult(e)})});r.setState({subscription:s})}catch(e){r.setState({isWaitingForResponse:!1,response:e.message})}}),_defineProperty(_assertThisInitialized(r),"handleStopQuery",function(){var e=r.state.subscription;r.setState({isWaitingForResponse:!1,subscription:null}),e&&e.unsubscribe()}),_defineProperty(_assertThisInitialized(r),"handlePrettifyQuery",function(){var e=r.getQueryEditor();e.setValue((0,_graphql.print)((0,_graphql.parse)(e.getValue())))}),_defineProperty(_assertThisInitialized(r),"handleMergeQuery",function(){var e=r.getQueryEditor(),t=e.getValue();if(t){var o=(0,_graphql.parse)(t);e.setValue((0,_graphql.print)((0,_mergeAst.mergeAst)(o)))}}),_defineProperty(_assertThisInitialized(r),"handleEditQuery",(0,_debounce.default)(100,function(e){var t=r._updateQueryFacts(e,r.state.operationName,r.state.operations,r.state.schema);if(r.setState(_objectSpread({query:e},t)),r.props.onEditQuery)return r.props.onEditQuery(e)})),_defineProperty(_assertThisInitialized(r),"handleCopyQuery",function(){var e=r.getQueryEditor().getValue();if(e)return(0,_copyToClipboard.default)(e),r.props.onCopyQuery?r.props.onCopyQuery(e):void 0}),_defineProperty(_assertThisInitialized(r),"_updateQueryFacts",function(e,t,o,i){var n=(0,_getQueryFacts.default)(i,e);if(n){var a=(0,_getSelectedOperationName.default)(o,t,n.operations),s=r.props.onEditOperationName;return s&&t!==a&&s(a),_objectSpread({operationName:a},n)}}),_defineProperty(_assertThisInitialized(r),"handleEditVariables",function(e){r.setState({variables:e}),r.props.onEditVariables&&r.props.onEditVariables(e)}),_defineProperty(_assertThisInitialized(r),"handleEditOperationName",function(e){var t=r.props.onEditOperationName;t&&t(e)}),_defineProperty(_assertThisInitialized(r),"handleHintInformationRender",function(e){var t;e.addEventListener("click",r._onClickHintInformation),e.addEventListener("DOMNodeRemoved",t=function(){e.removeEventListener("DOMNodeRemoved",t),e.removeEventListener("click",r._onClickHintInformation)})}),_defineProperty(_assertThisInitialized(r),"handleEditorRunQuery",function(){r._runQueryAtCursor()}),_defineProperty(_assertThisInitialized(r),"_onClickHintInformation",function(e){if("typeName"===e.target.className){var t=e.target.innerHTML,o=r.state.schema;if(o){var i=o.getType(t);i&&r.setState({docExplorerOpen:!0},function(){r.docExplorerComponent.showDoc(i)})}}}),_defineProperty(_assertThisInitialized(r),"handleToggleDocs",function(){"function"==typeof r.props.onToggleDocs&&r.props.onToggleDocs(!r.state.docExplorerOpen),r.setState({docExplorerOpen:!r.state.docExplorerOpen})}),_defineProperty(_assertThisInitialized(r),"handleToggleHistory",function(){"function"==typeof r.props.onToggleHistory&&r.props.onToggleHistory(!r.state.historyPaneOpen),r.setState({historyPaneOpen:!r.state.historyPaneOpen})}),_defineProperty(_assertThisInitialized(r),"handleSelectHistoryQuery",function(e,t,o){r.handleEditQuery(e),r.handleEditVariables(t),r.handleEditOperationName(o)}),_defineProperty(_assertThisInitialized(r),"handleResizeStart",function(e){if(r._didClickDragBar(e)){e.preventDefault();var t=e.clientX-(0,_elementPosition.getLeft)(e.target),o=function(e){if(0===e.buttons)return i();var o=_reactDom.default.findDOMNode(r.editorBarComponent),n=e.clientX-(0,_elementPosition.getLeft)(o)-t,a=o.clientWidth-n;r.setState({editorFlex:n/a})},i=function(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",i),i=o=null};document.addEventListener("mousemove",o),document.addEventListener("mouseup",i)}}),_defineProperty(_assertThisInitialized(r),"handleResetResize",function(){r.setState({editorFlex:1})}),_defineProperty(_assertThisInitialized(r),"handleDocsResizeStart",function(e){e.preventDefault();var t=r.state.docExplorerWidth,o=e.clientX-(0,_elementPosition.getLeft)(e.target),i=function(e){if(0===e.buttons)return n();var t=_reactDom.default.findDOMNode(_assertThisInitialized(r)),i=e.clientX-(0,_elementPosition.getLeft)(t)-o,a=t.clientWidth-i;a<100?r.setState({docExplorerOpen:!1}):r.setState({docExplorerOpen:!0,docExplorerWidth:Math.min(a,650)})},n=function(){r.state.docExplorerOpen||r.setState({docExplorerWidth:t}),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",n),n=i=null};document.addEventListener("mousemove",i),document.addEventListener("mouseup",n)}),_defineProperty(_assertThisInitialized(r),"handleDocsResetResize",function(){r.setState({docExplorerWidth:350})}),_defineProperty(_assertThisInitialized(r),"handleVariableResizeStart",function(e){e.preventDefault();var t=!1,o=r.state.variableEditorOpen,i=r.state.variableEditorHeight,n=e.clientY-(0,_elementPosition.getTop)(e.target),a=function(e){if(0===e.buttons)return s();t=!0;var o=_reactDom.default.findDOMNode(r.editorBarComponent),a=e.clientY-(0,_elementPosition.getTop)(o)-n,l=o.clientHeight-a;l<60?r.setState({variableEditorOpen:!1,variableEditorHeight:i}):r.setState({variableEditorOpen:!0,variableEditorHeight:l})},s=function(){t||r.setState({variableEditorOpen:!o}),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",s),s=a=null};document.addEventListener("mousemove",a),document.addEventListener("mouseup",s)}),"function"!=typeof e.fetcher)throw new TypeError("GraphiQL requires a fetcher function.");r._storage=new _StorageAPI.default(e.storage);var o=void 0!==e.query?e.query:null!==r._storage.get("query")?r._storage.get("query"):void 0!==e.defaultQuery?e.defaultQuery:defaultQuery,i=(0,_getQueryFacts.default)(e.schema,o),n=void 0!==e.variables?e.variables:r._storage.get("variables"),a=void 0!==e.operationName?e.operationName:(0,_getSelectedOperationName.default)(null,r._storage.get("operationName"),i&&i.operations),s=e.docExplorerOpen||!1;r._storage.get("docExplorerOpen")&&(s="true"===r._storage.get("docExplorerOpen"));var l=void 0!==e.defaultVariableEditorOpen?e.defaultVariableEditorOpen:Boolean(n);return r.state=_objectSpread({schema:e.schema,query:o,variables:n,operationName:a,docExplorerOpen:s,response:e.response,editorFlex:Number(r._storage.get("editorFlex"))||1,variableEditorOpen:l,variableEditorHeight:Number(r._storage.get("variableEditorHeight"))||200,historyPaneOpen:"true"===r._storage.get("historyPaneOpen")||!1,docExplorerWidth:Number(r._storage.get("docExplorerWidth"))||350,isWaitingForResponse:!1,subscription:null},i),r._editorQueryID=0,"object"===("undefined"==typeof window?"undefined":_typeof(window))&&window.addEventListener("beforeunload",function(){return r.componentWillUnmount()}),r}_defineProperty(exports.GraphiQL=GraphiQL,"propTypes",{fetcher:_propTypes.default.func.isRequired,schema:_propTypes.default.instanceOf(_graphql.GraphQLSchema),query:_propTypes.default.string,variables:_propTypes.default.string,operationName:_propTypes.default.string,response:_propTypes.default.string,storage:_propTypes.default.shape({getItem:_propTypes.default.func,setItem:_propTypes.default.func,removeItem:_propTypes.default.func}),defaultQuery:_propTypes.default.string,defaultVariableEditorOpen:_propTypes.default.bool,onCopyQuery:_propTypes.default.func,onEditQuery:_propTypes.default.func,onEditVariables:_propTypes.default.func,onEditOperationName:_propTypes.default.func,onToggleDocs:_propTypes.default.func,getDefaultFieldNames:_propTypes.default.func,editorTheme:_propTypes.default.string,onToggleHistory:_propTypes.default.func,ResultsTooltip:_propTypes.default.any,readOnly:_propTypes.default.bool,docExplorerOpen:_propTypes.default.bool}),GraphiQL.Logo=function(e){return _react.default.createElement("div",{className:"title"},e.children||_react.default.createElement("span",null,"Graph",_react.default.createElement("em",null,"i"),"QL"))},GraphiQL.Toolbar=function(e){return _react.default.createElement("div",{className:"toolbar"},e.children)},GraphiQL.QueryEditor=_QueryEditor.QueryEditor,GraphiQL.VariableEditor=_VariableEditor.VariableEditor,GraphiQL.ResultViewer=_ResultViewer.ResultViewer,GraphiQL.Button=_ToolbarButton.ToolbarButton,GraphiQL.ToolbarButton=_ToolbarButton.ToolbarButton,GraphiQL.Group=_ToolbarGroup.ToolbarGroup,GraphiQL.Menu=_ToolbarMenu.ToolbarMenu,GraphiQL.MenuItem=_ToolbarMenu.ToolbarMenuItem,GraphiQL.Select=_ToolbarSelect.ToolbarSelect,GraphiQL.SelectOption=_ToolbarSelect.ToolbarSelectOption,GraphiQL.Footer=function(e){return _react.default.createElement("div",{className:"footer"},e.children)},GraphiQL.formatResult=function(e){return JSON.stringify(e,null,2)};function formatSingleError(e){return _objectSpread({},e,{message:e.message,stack:e.stack})}GraphiQL.formatError=function(e){var t=Array.isArray(e)?e.map(formatSingleError):formatSingleError(e);return JSON.stringify(t,null,2)};var defaultQuery='# Welcome to GraphiQL\n#\n# GraphiQL is an in-browser tool for writing, validating, and\n# testing GraphQL queries.\n#\n# Type queries into this side of the screen, and you will see intelligent\n# typeaheads aware of the current GraphQL type schema and live syntax and\n# validation errors highlighted within the text.\n#\n# GraphQL queries typically start with a "{" character. Lines that starts\n# with a # are ignored.\n#\n# An example GraphQL query might look like:\n#\n# {\n# field(arg: "value") {\n# subField\n# }\n# }\n#\n# Keyboard shortcuts:\n#\n# Prettify Query: Shift-Ctrl-P (or press the prettify button above)\n#\n# Merge Query: Shift-Ctrl-M (or press the merge button above)\n#\n# Run Query: Ctrl-Enter (or press the play button above)\n#\n# Auto Complete: Ctrl-Space (or just start typing)\n#\n\n';function isPromise(e){return"object"===_typeof(e)&&"function"==typeof e.then}function observableToPromise(e){return isObservable(e)?new Promise(function(t,r){var o=e.subscribe(function(e){t(e),o.unsubscribe()},r,function(){r(new Error("no value resolved"))})}):e}function isObservable(e){return"object"===_typeof(e)&&"function"==typeof e.subscribe}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utility/CodeMirrorSizer":257,"../utility/StorageAPI":259,"../utility/debounce":261,"../utility/elementPosition":262,"../utility/fillLeafs":263,"../utility/find":264,"../utility/getQueryFacts":265,"../utility/getSelectedOperationName":266,"../utility/introspectionQueries":267,"../utility/mergeAst":268,"./DocExplorer":234,"./ExecuteButton":244,"./ImagePreview":247,"./QueryEditor":248,"./QueryHistory":249,"./ResultViewer":250,"./ToolbarButton":251,"./ToolbarGroup":252,"./ToolbarMenu":253,"./ToolbarSelect":254,"./VariableEditor":255,"copy-to-clipboard":16,graphql:28,"prop-types":201}],246:[function(require,module,exports){(function(global){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault("undefined"!=typeof window?window.React:void 0!==global?global.React:null),_propTypes=_interopRequireDefault(require("prop-types"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _defineProperties(e,t){for(var r=0;r'+function renderType(e){return e instanceof _graphql.GraphQLNonNull?"".concat(renderType(e.ofType),"!"):e instanceof _graphql.GraphQLList?"[".concat(renderType(e.ofType),"]"):''.concat(e.name," ")}(e.type)+"":"";if(t.innerHTML=''+("
"===d.slice(0,3)?"
"+p+d.slice(3):p+d)+"
",e.isDeprecated){var l=e.deprecationReason?md.render(e.deprecationReason):"";a.innerHTML='Deprecated '+l,a.style.display="block"}else a.style.display="none";r&&r(t)})};var e,_graphql=require("graphql");var md=new(((e=require("markdown-it"))&&e.__esModule?e:{default:e}).default)},{codemirror:15,graphql:28,"markdown-it":139}],271:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GraphQLLanguageService=void 0;var _graphql=require("graphql"),_getAutocompleteSuggestions3=require("./getAutocompleteSuggestions"),_getHoverInformation3=require("./getHoverInformation"),_getDiagnostics2=require("./getDiagnostics"),_getDefinition2=require("./getDefinition"),_graphqlLanguageServiceUtils=require("graphql-language-service-utils");function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)})}}function _defineProperties(target,props){for(var i=0;itext.length&&(proximity-=suggestion.length-text.length-1,proximity+=0===suggestion.indexOf(text)?0:.5),proximity}(normalizeText(entry.label),text),entry:entry}}),function(pair){return pair.proximity<=2}),function(pair){return!pair.entry.isDeprecated}).sort(function(a,b){return(a.entry.isDeprecated?1:0)-(b.entry.isDeprecated?1:0)||a.proximity-b.proximity||a.entry.label.length-b.entry.label.length}).map(function(pair){return pair.entry}):filterNonEmpty(list,function(entry){return!entry.isDeprecated})}(list,normalizeText(token.string))};var _graphql=require("graphql"),_introspection=require("graphql/type/introspection");function forEachState(stack,fn){for(var reverseStateStack=[],state=stack;state&&state.kind;)reverseStateStack.push(state),state=state.prevState;for(var i=reverseStateStack.length-1;0<=i;i--)fn(reverseStateStack[i])}function filterNonEmpty(array,predicate){var filtered=array.filter(predicate);return 0===filtered.length?array:filtered}function normalizeText(text){return text.toLowerCase().replace(/\W/g,"")}},{graphql:28,"graphql/type/introspection":70}],273:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAutocompleteSuggestions=function(schema,queryText,cursor,contextToken){var token=contextToken||getTokenAtPosition(queryText,cursor),state="Invalid"===token.state.kind?token.state.prevState:token.state;if(!state)return[];var kind=state.kind,step=state.step,typeInfo=getTypeInfo(schema,token.state);if("Document"===kind)return(0,_autocompleteUtils.hintList)(token,[{label:"query"},{label:"mutation"},{label:"subscription"},{label:"fragment"},{label:"{"}]);if("SelectionSet"===kind||"Field"===kind||"AliasedField"===kind)return function(token,typeInfo,schema){if(typeInfo.parentType){var parentType=typeInfo.parentType,fields=parentType.getFields instanceof Function?(0,_autocompleteUtils.objectValues)(parentType.getFields()):[];return(0,_graphql.isCompositeType)(parentType)&&fields.push(_graphql.TypeNameMetaFieldDef),parentType===schema.getQueryType()&&fields.push(_graphql.SchemaMetaFieldDef,_graphql.TypeMetaFieldDef),(0,_autocompleteUtils.hintList)(token,fields.map(function(field,index){return{sortText:String(index)+field.name,label:field.name,detail:String(field.type),documentation:field.description,isDeprecated:field.isDeprecated,deprecationReason:field.deprecationReason}}))}return[]}(token,typeInfo,schema);if("Arguments"===kind||"Argument"===kind&&0===step){var argDefs=typeInfo.argDefs;if(argDefs)return(0,_autocompleteUtils.hintList)(token,argDefs.map(function(argDef){return{label:argDef.name,detail:String(argDef.type),documentation:argDef.description}}))}if(("ObjectValue"===kind||"ObjectField"===kind&&0===step)&&typeInfo.objectFieldDefs){var objectFields=(0,_autocompleteUtils.objectValues)(typeInfo.objectFieldDefs);return(0,_autocompleteUtils.hintList)(token,objectFields.map(function(field){return{label:field.name,detail:String(field.type),documentation:field.description}}))}if("EnumValue"===kind||"ListValue"===kind&&1===step||"ObjectField"===kind&&2===step||"Argument"===kind&&2===step)return function(token,typeInfo){var namedInputType=(0,_graphql.getNamedType)(typeInfo.inputType);{if(namedInputType instanceof _graphql.GraphQLEnumType){var values=namedInputType.getValues();return(0,_autocompleteUtils.hintList)(token,values.map(function(value){return{label:value.name,detail:String(namedInputType),documentation:value.description,isDeprecated:value.isDeprecated,deprecationReason:value.deprecationReason}}))}if(namedInputType===_graphql.GraphQLBoolean)return(0,_autocompleteUtils.hintList)(token,[{label:"true",detail:String(_graphql.GraphQLBoolean),documentation:"Not false."},{label:"false",detail:String(_graphql.GraphQLBoolean),documentation:"Not true."}])}return[]}(token,typeInfo);if("TypeCondition"===kind&&1===step||"NamedType"===kind&&null!=state.prevState&&"TypeCondition"===state.prevState.kind)return function(token,typeInfo,schema){var possibleTypes;if(typeInfo.parentType)if((0,_graphql.isAbstractType)(typeInfo.parentType)){var abstractType=(0,_graphql.assertAbstractType)(typeInfo.parentType),possibleObjTypes=schema.getPossibleTypes(abstractType),possibleIfaceMap=Object.create(null);possibleObjTypes.forEach(function(type){type.getInterfaces().forEach(function(iface){possibleIfaceMap[iface.name]=iface})}),possibleTypes=possibleObjTypes.concat((0,_autocompleteUtils.objectValues)(possibleIfaceMap))}else possibleTypes=[typeInfo.parentType];else{var typeMap=schema.getTypeMap();possibleTypes=(0,_autocompleteUtils.objectValues)(typeMap).filter(_graphql.isCompositeType)}return(0,_autocompleteUtils.hintList)(token,possibleTypes.map(function(type){var namedType=(0,_graphql.getNamedType)(type);return{label:String(type),documentation:namedType&&namedType.description||""}}))}(token,typeInfo,schema);if("FragmentSpread"===kind&&1===step)return function(token,typeInfo,schema,queryText){var typeMap=schema.getTypeMap(),defState=(0,_autocompleteUtils.getDefinitionState)(token.state),relevantFrags=function(queryText){var fragmentDefs=[];return runOnlineParser(queryText,function(_,state){"FragmentDefinition"===state.kind&&state.name&&state.type&&fragmentDefs.push({kind:"FragmentDefinition",name:{kind:"Name",value:state.name},selectionSet:{kind:"SelectionSet",selections:[]},typeCondition:{kind:"NamedType",name:{kind:"Name",value:state.type}}})}),fragmentDefs}(queryText).filter(function(frag){return typeMap[frag.typeCondition.name.value]&&!(defState&&"FragmentDefinition"===defState.kind&&defState.name===frag.name.value)&&(0,_graphql.isCompositeType)(typeInfo.parentType)&&(0,_graphql.isCompositeType)(typeMap[frag.typeCondition.name.value])&&(0,_graphql.doTypesOverlap)(schema,typeInfo.parentType,typeMap[frag.typeCondition.name.value])});return(0,_autocompleteUtils.hintList)(token,relevantFrags.map(function(frag){return{label:frag.name.value,detail:String(typeMap[frag.typeCondition.name.value]),documentation:"fragment ".concat(frag.name.value," on ").concat(frag.typeCondition.name.value)}}))}(token,typeInfo,schema,queryText);if("VariableDefinition"===kind&&2===step||"ListType"===kind&&1===step||"NamedType"===kind&&state.prevState&&("VariableDefinition"===state.prevState.kind||"ListType"===state.prevState.kind))return function(token,schema){var inputTypeMap=schema.getTypeMap(),inputTypes=(0,_autocompleteUtils.objectValues)(inputTypeMap).filter(_graphql.isInputType);return(0,_autocompleteUtils.hintList)(token,inputTypes.map(function(type){return{label:type.name,documentation:type.description}}))}(token,schema);return"Directive"!==kind?[]:function(token,state,schema){if(state.prevState&&state.prevState.kind){var directives=schema.getDirectives().filter(function(directive){return function(state,directive){if(!state||!state.kind)return!1;var kind=state.kind,locations=directive.locations;switch(kind){case"Query":return-1!==locations.indexOf("QUERY");case"Mutation":return-1!==locations.indexOf("MUTATION");case"Subscription":return-1!==locations.indexOf("SUBSCRIPTION");case"Field":case"AliasedField":return-1!==locations.indexOf("FIELD");case"FragmentDefinition":return-1!==locations.indexOf("FRAGMENT_DEFINITION");case"FragmentSpread":return-1!==locations.indexOf("FRAGMENT_SPREAD");case"InlineFragment":return-1!==locations.indexOf("INLINE_FRAGMENT");case"SchemaDef":return-1!==locations.indexOf("SCHEMA");case"ScalarDef":return-1!==locations.indexOf("SCALAR");case"ObjectTypeDef":return-1!==locations.indexOf("OBJECT");case"FieldDef":return-1!==locations.indexOf("FIELD_DEFINITION");case"InterfaceDef":return-1!==locations.indexOf("INTERFACE");case"UnionDef":return-1!==locations.indexOf("UNION");case"EnumDef":return-1!==locations.indexOf("ENUM");case"EnumValue":return-1!==locations.indexOf("ENUM_VALUE");case"InputDef":return-1!==locations.indexOf("INPUT_OBJECT");case"InputValueDef":var prevStateKind=state.prevState&&state.prevState.kind;switch(prevStateKind){case"ArgumentsDef":return-1!==locations.indexOf("ARGUMENT_DEFINITION");case"InputDef":return-1!==locations.indexOf("INPUT_FIELD_DEFINITION")}}return!1}(state.prevState,directive)});return(0,_autocompleteUtils.hintList)(token,directives.map(function(directive){return{label:directive.name,documentation:directive.description||""}}))}return[]}(token,state,schema)},exports.getTokenAtPosition=getTokenAtPosition,exports.getTypeInfo=getTypeInfo;var _graphql=require("graphql"),_graphqlLanguageServiceParser=require("graphql-language-service-parser"),_autocompleteUtils=require("./autocompleteUtils");function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function getTokenAtPosition(queryText,cursor){var styleAtCursor=null,stateAtCursor=null,stringAtCursor=null,token=runOnlineParser(queryText,function(stream,state,style,index){if(index===cursor.line&&stream.getCurrentPosition()>=cursor.character)return styleAtCursor=style,stateAtCursor=function(target){for(var i=1;i=location.line,"Query text must have more lines than where the error happened");for(var stream=null,i=0;ipos;)9===whitespaces.charCodeAt(pos)?indent+=2:indent++,pos++;return indent}),_defineProperty(this,"current",function(){return _this._sourceText.slice(_this._start,_this._pos)}),this._start=0,this._pos=0,this._sourceText=sourceText}return function(Constructor,protoProps,staticProps){protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps)}(CharacterStream,[{key:"_testNextCharacter",value:function(pattern){var character=this._sourceText.charAt(this._pos);return"string"==typeof pattern?character===pattern:pattern instanceof RegExp?pattern.test(character):pattern(character)}}]),CharacterStream}();exports.default=CharacterStream},{}],280:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.opt=function(ofRule){return{ofRule:ofRule}},exports.list=function(ofRule,separator){return{ofRule:ofRule,isList:!0,separator:separator}},exports.butNot=function(rule,exclusions){var ruleMatch=rule.match;return rule.match=function(token){var check=!1;return ruleMatch&&(check=ruleMatch(token)),check&&exclusions.every(function(exclusion){return exclusion.match&&!exclusion.match(token)})},rule},exports.t=function(kind,style){return{style:style,match:function(token){return token.kind===kind}}},exports.p=function(value,style){return{style:style||"punctuation",match:function(token){return"Punctuation"===token.kind&&token.value===value}}}},{}],281:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ParseRules=exports.LexRules=exports.isIgnored=void 0;var _RuleHelpers=require("./RuleHelpers");exports.isIgnored=function(ch){return" "===ch||"\t"===ch||","===ch||"\n"===ch||"\r"===ch||"\ufeff"===ch};exports.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}))*"?)/,Comment:/^#.*/};var style,ParseRules={Document:[(0,_RuleHelpers.list)("Definition")],Definition:function(token){switch(token.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"),(0,_RuleHelpers.opt)(name("def")),(0,_RuleHelpers.opt)("VariableDefinitions"),(0,_RuleHelpers.list)("Directive"),"SelectionSet"],Mutation:[word("mutation"),(0,_RuleHelpers.opt)(name("def")),(0,_RuleHelpers.opt)("VariableDefinitions"),(0,_RuleHelpers.list)("Directive"),"SelectionSet"],Subscription:[word("subscription"),(0,_RuleHelpers.opt)(name("def")),(0,_RuleHelpers.opt)("VariableDefinitions"),(0,_RuleHelpers.list)("Directive"),"SelectionSet"],VariableDefinitions:[(0,_RuleHelpers.p)("("),(0,_RuleHelpers.list)("VariableDefinition"),(0,_RuleHelpers.p)(")")],VariableDefinition:["Variable",(0,_RuleHelpers.p)(":"),"Type",(0,_RuleHelpers.opt)("DefaultValue")],Variable:[(0,_RuleHelpers.p)("$","variable"),name("variable")],DefaultValue:[(0,_RuleHelpers.p)("="),"Value"],SelectionSet:[(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("Selection"),(0,_RuleHelpers.p)("}")],Selection:function(token,stream){return"..."===token.value?stream.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":stream.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field"},AliasedField:[name("property"),(0,_RuleHelpers.p)(":"),name("qualifier"),(0,_RuleHelpers.opt)("Arguments"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.opt)("SelectionSet")],Field:[name("property"),(0,_RuleHelpers.opt)("Arguments"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.opt)("SelectionSet")],Arguments:[(0,_RuleHelpers.p)("("),(0,_RuleHelpers.list)("Argument"),(0,_RuleHelpers.p)(")")],Argument:[name("attribute"),(0,_RuleHelpers.p)(":"),"Value"],FragmentSpread:[(0,_RuleHelpers.p)("..."),name("def"),(0,_RuleHelpers.list)("Directive")],InlineFragment:[(0,_RuleHelpers.p)("..."),(0,_RuleHelpers.opt)("TypeCondition"),(0,_RuleHelpers.list)("Directive"),"SelectionSet"],FragmentDefinition:[word("fragment"),(0,_RuleHelpers.opt)((0,_RuleHelpers.butNot)(name("def"),[word("on")])),"TypeCondition",(0,_RuleHelpers.list)("Directive"),"SelectionSet"],TypeCondition:[word("on"),"NamedType"],Value:function(token){switch(token.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(token.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable"}return null;case"Name":switch(token.value){case"true":case"false":return"BooleanValue"}return"null"===token.value?"NullValue":"EnumValue"}},NumberValue:[(0,_RuleHelpers.t)("Number","number")],StringValue:[(0,_RuleHelpers.t)("String","string")],BooleanValue:[(0,_RuleHelpers.t)("Name","builtin")],NullValue:[(0,_RuleHelpers.t)("Name","keyword")],EnumValue:[name("string-2")],ListValue:[(0,_RuleHelpers.p)("["),(0,_RuleHelpers.list)("Value"),(0,_RuleHelpers.p)("]")],ObjectValue:[(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("ObjectField"),(0,_RuleHelpers.p)("}")],ObjectField:[name("attribute"),(0,_RuleHelpers.p)(":"),"Value"],Type:function(token){return"["===token.value?"ListType":"NonNullType"},ListType:[(0,_RuleHelpers.p)("["),"Type",(0,_RuleHelpers.p)("]"),(0,_RuleHelpers.opt)((0,_RuleHelpers.p)("!"))],NonNullType:["NamedType",(0,_RuleHelpers.opt)((0,_RuleHelpers.p)("!"))],NamedType:[(style="atom",{style:style,match:function(token){return"Name"===token.kind},update:function(state,token){state.prevState&&state.prevState.prevState&&(state.name=token.value,state.prevState.prevState.type=token.value)}})],Directive:[(0,_RuleHelpers.p)("@","meta"),name("meta"),(0,_RuleHelpers.opt)("Arguments")],SchemaDef:[word("schema"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("OperationTypeDef"),(0,_RuleHelpers.p)("}")],OperationTypeDef:[name("keyword"),(0,_RuleHelpers.p)(":"),name("atom")],ScalarDef:[word("scalar"),name("atom"),(0,_RuleHelpers.list)("Directive")],ObjectTypeDef:[word("type"),name("atom"),(0,_RuleHelpers.opt)("Implements"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("FieldDef"),(0,_RuleHelpers.p)("}")],Implements:[word("implements"),(0,_RuleHelpers.list)("NamedType")],FieldDef:[name("property"),(0,_RuleHelpers.opt)("ArgumentsDef"),(0,_RuleHelpers.p)(":"),"Type",(0,_RuleHelpers.list)("Directive")],ArgumentsDef:[(0,_RuleHelpers.p)("("),(0,_RuleHelpers.list)("InputValueDef"),(0,_RuleHelpers.p)(")")],InputValueDef:[name("attribute"),(0,_RuleHelpers.p)(":"),"Type",(0,_RuleHelpers.opt)("DefaultValue"),(0,_RuleHelpers.list)("Directive")],InterfaceDef:[word("interface"),name("atom"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("FieldDef"),(0,_RuleHelpers.p)("}")],UnionDef:[word("union"),name("atom"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.p)("="),(0,_RuleHelpers.list)("UnionMember",(0,_RuleHelpers.p)("|"))],UnionMember:["NamedType"],EnumDef:[word("enum"),name("atom"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("EnumValueDef"),(0,_RuleHelpers.p)("}")],EnumValueDef:[name("string-2"),(0,_RuleHelpers.list)("Directive")],InputDef:[word("input"),name("atom"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("InputValueDef"),(0,_RuleHelpers.p)("}")],ExtendDef:[word("extend"),"ObjectTypeDef"],DirectiveDef:[word("directive"),(0,_RuleHelpers.p)("@","meta"),name("meta"),(0,_RuleHelpers.opt)("ArgumentsDef"),word("on"),(0,_RuleHelpers.list)("DirectiveLocation",(0,_RuleHelpers.p)("|"))],DirectiveLocation:[name("string-2")]};function word(value){return{style:"keyword",match:function(token){return"Name"===token.kind&&token.value===value}}}function name(style){return{style:style,match:function(token){return"Name"===token.kind},update:function(state,token){state.name=token.value}}}exports.ParseRules=ParseRules},{"./RuleHelpers":280}],282:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"CharacterStream",{enumerable:!0,get:function(){return _CharacterStream.default}}),Object.defineProperty(exports,"LexRules",{enumerable:!0,get:function(){return _Rules.LexRules}}),Object.defineProperty(exports,"ParseRules",{enumerable:!0,get:function(){return _Rules.ParseRules}}),Object.defineProperty(exports,"isIgnored",{enumerable:!0,get:function(){return _Rules.isIgnored}}),Object.defineProperty(exports,"butNot",{enumerable:!0,get:function(){return _RuleHelpers.butNot}}),Object.defineProperty(exports,"list",{enumerable:!0,get:function(){return _RuleHelpers.list}}),Object.defineProperty(exports,"opt",{enumerable:!0,get:function(){return _RuleHelpers.opt}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return _RuleHelpers.p}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return _RuleHelpers.t}}),Object.defineProperty(exports,"onlineParser",{enumerable:!0,get:function(){return _onlineParser.default}});var _CharacterStream=_interopRequireDefault(require("./CharacterStream")),_Rules=require("./Rules"),_RuleHelpers=require("./RuleHelpers"),_onlineParser=_interopRequireDefault(require("./onlineParser"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}},{"./CharacterStream":279,"./RuleHelpers":280,"./Rules":281,"./onlineParser":283}],283:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(){var options=0=position.character:_this.start.line<=position.line&&_this.end.line>=position.line}),this.start=start,this.end=end}return _createClass(Range,[{key:"setStart",value:function(line,character){this.start=new Position(line,character)}},{key:"setEnd",value:function(line,character){this.end=new Position(line,character)}}]),Range}();exports.Range=Range;var Position=function(){function Position(line,character){var _this2=this;_classCallCheck(this,Position),_defineProperty(this,"line",void 0),_defineProperty(this,"character",void 0),_defineProperty(this,"lessThanOrEqualTo",function(position){return _this2.linethis.eventPool.length&&this.eventPool.push(a)}function Ne(a){a.eventPool=[];a.getPooled=yh;a.release=zh}function Oe(a,b){switch(a){case "keyup":return-1!==Ah.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "blur":return!0;default:return!1}}function Pe(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}function Bh(a,b){switch(a){case "compositionend":return Pe(b);
+case "keypress":if(32!==b.which)return null;Qe=!0;return Re;case "textInput":return a=b.data,a===Re&&Qe?null:a;default:return null}}function Ch(a,b){if(Sa)return"compositionend"===a||!hd&&Oe(a,b)?(a=Me(),hc=gd=qa=null,Sa=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1b}return!1}function K(a,b,c,d,e){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b}function rd(a,b,c,d){var e=A.hasOwnProperty(b)?
+A[b]:null;var f=null!==e?0===e.type:d?!1:!(2rc.length&&rc.push(a)}}}function zf(a){Object.prototype.hasOwnProperty.call(a,sc)||(a[sc]=Vh++,Af[a[sc]]=
+{});return Af[a[sc]]}function xd(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}function Bf(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Cf(a,b){var c=Bf(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Bf(c)}}function Df(a,b){return a&&b?a===
+b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Df(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function Ef(){for(var a=window,b=xd();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=xd(a.document)}return b}function yd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||
+"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}function Wh(){var a=Ef();if(yd(a)){if("selectionStart"in a)var b={start:a.selectionStart,end:a.selectionEnd};else a:{b=(b=a.ownerDocument)&&b.defaultView||window;var c=b.getSelection&&b.getSelection();if(c&&0!==c.rangeCount){b=c.anchorNode;var d=c.anchorOffset,e=c.focusNode;c=c.focusOffset;try{b.nodeType,e.nodeType}catch(cj){b=null;break a}var f=0,g=-1,h=-1,l=0,k=0,m=a,n=null;b:for(;;){for(var p;;){m!==b||0!==d&&3!==
+m.nodeType||(g=f+d);m!==e||0!==c&&3!==m.nodeType||(h=f+c);3===m.nodeType&&(f+=m.nodeValue.length);if(null===(p=m.firstChild))break;n=m;m=p}for(;;){if(m===a)break b;n===b&&++l===d&&(g=f);n===e&&++k===c&&(h=f);if(null!==(p=m.nextSibling))break;m=n;n=m.parentNode}m=p}b=-1===g||-1===h?null:{start:g,end:h}}else b=null}b=b||{start:0,end:0}}else b=null;return{focusedElem:a,selectionRange:b}}function Xh(a){var b=Ef(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Df(c.ownerDocument.documentElement,
+c)){if(null!==d&&yd(c))if(b=d.start,a=d.end,void 0===a&&(a=b),"selectionStart"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Cf(c,f);var g=Cf(c,d);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&
+(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});"function"===typeof c.focus&&c.focus();for(c=0;c=b.length?void 0:n("93"),b=b[0]),c=b),null==c&&(c=""));a._wrapperState={initialValue:ua(c)}}function Jf(a,b){var c=ua(b.value),d=ua(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function Kf(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";
+case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Dd(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?Kf(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}function Lf(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||yb.hasOwnProperty(a)&&yb[a]?(""+b).trim():b+"px"}function Mf(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),
+e=Lf(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}function Ed(a,b){b&&(Zh[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?n("137",a,""):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?n("60"):void 0,"object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML?void 0:n("61")),null!=b.style&&"object"!==typeof b.style?n("62",""):void 0)}function Fd(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;
+default:return!0}}function ha(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=zf(a);b=$c[b];for(var d=0;dYa||(a.current=
+Id[Ya],Id[Ya]=null,Ya--)}function L(a,b,c){Ya++;Id[Ya]=a.current;a.current=b}function Za(a,b){var c=a.type.contextTypes;if(!c)return va;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function E(a){a=a.childContextTypes;return null!==a&&void 0!==a}function uc(a){D(M,a);
+D(F,a)}function Jd(a){D(M,a);D(F,a)}function Qf(a,b,c){F.current!==va?n("168"):void 0;L(F,b,a);L(M,c,a)}function Rf(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)e in a?void 0:n("108",sa(b)||"Unknown",e);return B({},c,d)}function vc(a){var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||va;Fa=F.current;L(F,b,a);L(M,M.current,a);return!0}function Sf(a,b,c){var d=a.stateNode;d?void 0:n("169");c?(b=
+Rf(a,b,Fa),d.__reactInternalMemoizedMergedChildContext=b,D(M,a),D(F,a),L(F,b,a)):D(M,a);L(M,c,a)}function Tf(a){return function(b){try{return a(b)}catch(c){}}}function ai(a){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);Kd=Tf(function(a){return b.onCommitFiberRoot(c,a)});Ld=Tf(function(a){return b.onCommitFiberUnmount(c,a)})}catch(d){}return!0}function bi(a,b,c,d){this.tag=a;this.key=
+c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.contextDependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childExpirationTime=this.expirationTime=0;this.alternate=null}function Md(a){a=a.prototype;return!(!a||!a.isReactComponent)}function ci(a){if("function"===typeof a)return Md(a)?1:0;if(void 0!==a&&
+null!==a){a=a.$$typeof;if(a===od)return 11;if(a===pd)return 14}return 2}function Ga(a,b,c){c=a.alternate;null===c?(c=S(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.effectTag=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null);c.childExpirationTime=a.childExpirationTime;c.expirationTime=a.expirationTime;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;
+c.contextDependencies=a.contextDependencies;c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}function wc(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)Md(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case ta:return wa(c.children,e,f,b);case ld:return Uf(c,e|3,f,b);case md:return Uf(c,e|2,f,b);case lc:return a=S(12,c,b,e|4),a.elementType=lc,a.type=lc,a.expirationTime=f,a;case nd:return a=S(13,c,b,e),b=nd,a.elementType=b,a.type=b,a.expirationTime=f,a;default:if("object"===typeof a&&
+null!==a)switch(a.$$typeof){case ff:g=10;break a;case ef:g=9;break a;case od:g=11;break a;case pd:g=14;break a;case gf:g=16;d=null;break a}n("130",null==a?a:typeof a,"")}b=S(g,c,b,e);b.elementType=a;b.type=d;b.expirationTime=f;return b}function wa(a,b,c,d){a=S(7,a,d,b);a.expirationTime=c;return a}function Uf(a,b,c,d){a=S(8,a,d,b);b=0===(b&1)?md:ld;a.elementType=b;a.type=b;a.expirationTime=c;return a}function Nd(a,b,c){a=S(6,a,null,b);a.expirationTime=c;return a}function Od(a,b,c){b=S(4,null!==a.children?
+a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}function Bb(a,b){a.didError=!1;var c=a.earliestPendingTime;0===c?a.earliestPendingTime=a.latestPendingTime=b:cb&&(a.latestPendingTime=b);xc(b,a)}function di(a,b){a.didError=!1;if(0===b)a.earliestPendingTime=0,a.latestPendingTime=0,a.earliestSuspendedTime=0,a.latestSuspendedTime=0,a.latestPingedTime=0;else{b<
+a.latestPingedTime&&(a.latestPingedTime=0);var c=a.latestPendingTime;0!==c&&(c>b?a.earliestPendingTime=a.latestPendingTime=0:a.earliestPendingTime>b&&(a.earliestPendingTime=a.latestPendingTime));c=a.earliestSuspendedTime;0===c?Bb(a,b):bc&&Bb(a,b)}xc(0,a)}function Vf(a,b){a.didError=!1;a.latestPingedTime>=b&&(a.latestPingedTime=0);var c=a.earliestPendingTime,d=a.latestPendingTime;c===b?a.earliestPendingTime=
+d===b?a.latestPendingTime=0:d:d===b&&(a.latestPendingTime=c);c=a.earliestSuspendedTime;d=a.latestSuspendedTime;0===c?a.earliestSuspendedTime=a.latestSuspendedTime=b:cb&&(a.latestSuspendedTime=b);xc(b,a)}function Wf(a,b){var c=a.earliestPendingTime;a=a.earliestSuspendedTime;c>b&&(b=c);a>b&&(b=a);return b}function xc(a,b){var c=b.earliestSuspendedTime,d=b.latestSuspendedTime,e=b.earliestPendingTime,f=b.latestPingedTime;e=0!==e?e:f;0===e&&(0===a||da&&(a=c);b.nextExpirationTimeToWorkOn=e;b.expirationTime=a}function P(a,b){if(a&&a.defaultProps){b=B({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c])}return b}function ei(a){var b=a._result;switch(a._status){case 1:return b;case 2:throw b;case 0:throw b;default:a._status=0;b=a._ctor;b=b();b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)});switch(a._status){case 1:return a._result;case 2:throw a._result;
+}a._result=b;throw b;}}function yc(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:B({},b,c);a.memoizedState=c;d=a.updateQueue;null!==d&&0===a.expirationTime&&(d.baseState=c)}function Xf(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!vb(c,d)||!vb(e,f):!0}function Yf(a,b,c,d){var e=!1;d=va;var f=b.contextType;"object"===typeof f&&null!==f?f=T(f):(d=E(b)?Fa:F.current,e=b.contextTypes,
+f=(e=null!==e&&void 0!==e)?Za(a,d):va);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=zc;a.stateNode=b;b._reactInternalFiber=a;e&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=d,a.__reactInternalMemoizedMaskedChildContext=f);return b}function Zf(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==
+a&&zc.enqueueReplaceState(b,b.state,null)}function Pd(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=$f;var f=b.contextType;"object"===typeof f&&null!==f?e.context=T(f):(f=E(b)?Fa:F.current,e.context=Za(a,f));f=a.updateQueue;null!==f&&(Cb(a,f,c,e,d),e.state=a.memoizedState);f=b.getDerivedStateFromProps;"function"===typeof f&&(yc(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==typeof e.UNSAFE_componentWillMount&&
+"function"!==typeof e.componentWillMount||(b=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&zc.enqueueReplaceState(e,e.state,null),f=a.updateQueue,null!==f&&(Cb(a,f,c,e,d),e.state=a.memoizedState));"function"===typeof e.componentDidMount&&(a.effectTag|=4)}function Db(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;var d=void 0;c&&(1!==
+c.tag?n("309"):void 0,d=c.stateNode);d?void 0:n("147",a);var e=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===$f&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}"string"!==typeof a?n("284"):void 0;c._owner?void 0:n("290",a)}return a}function Ac(a,b){"textarea"!==a.type&&n("31","[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+"}":b,"")}function ag(a){function b(b,
+c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b,c){a=Ga(a,b,c);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,dq?(v=n,n=null):v=n.sibling;var Q=p(e,n,h[q],k);if(null===Q){null===n&&(n=v);break}a&&
+n&&null===Q.alternate&&b(e,n);g=f(Q,g,q);null===m?l=Q:m.sibling=Q;m=Q;n=v}if(q===h.length)return c(e,n),l;if(null===n){for(;qv?(Q=q,q=null):Q=q.sibling;var u=p(e,q,t.value,k);if(null===u){q||(q=Q);break}a&&q&&null===u.alternate&&b(e,q);g=f(u,g,v);null===m?l=u:m.sibling=u;m=u;q=Q}if(t.done)return c(e,q),l;if(null===q){for(;!t.done;v++,t=h.next())t=Ff(e,t.value,k),null!==t&&(g=f(t,g,v),null===m?l=t:m.sibling=t,m=t);return l}for(q=d(e,q);!t.done;v++,t=h.next())t=r(q,e,v,t.value,k),null!==t&&(a&&null!==t.alternate&&q.delete(null===t.key?
+v:t.key),g=f(t,g,v),null===m?l=t:m.sibling=t,m=t);a&&q.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===ta&&null===f.key;k&&(f=f.props.children);var l="object"===typeof f&&null!==f;if(l)switch(f.$$typeof){case Bc:a:{l=f.key;for(k=d;null!==k;){if(k.key===l)if(7===k.tag?f.type===ta:k.elementType===f.type){c(a,k.sibling);d=e(k,f.type===ta?f.props.children:f.props,h);d.ref=Db(a,k,f);d.return=a;a=d;break a}else{c(a,k);break}else b(a,k);
+k=k.sibling}f.type===ta?(d=wa(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=wc(f.type,f.key,f.props,null,a.mode,h),h.ref=Db(a,d,f),h.return=a,a=h)}return g(a);case Va:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[],h);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=Od(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===typeof f||"number"===
+typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f,h),d.return=a,a=d):(c(a,d),d=Nd(f,a.mode,h),d.return=a,a=d),g(a);if(Cc(f))return u(a,d,f,h);if(sb(f))return x(a,d,f,h);l&&Ac(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 0:h=a.type,n("152",h.displayName||h.name||"Component")}return c(a,d)}}function Ha(a){a===Eb?n("174"):void 0;return a}function Qd(a,b){L(Fb,b,a);L(Gb,a,a);L(U,Eb,a);var c=b.nodeType;switch(c){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Dd(null,
+"");break;default:c=8===c?b.parentNode:b,b=c.namespaceURI||null,c=c.tagName,b=Dd(b,c)}D(U,a);L(U,b,a)}function $a(a){D(U,a);D(Gb,a);D(Fb,a)}function bg(a){Ha(Fb.current);var b=Ha(U.current);var c=Dd(b,a.type);b!==c&&(L(Gb,a,a),L(U,c,a))}function Rd(a){Gb.current===a&&(D(U,a),D(Gb,a))}function V(){n("321")}function Sd(a,b){if(null===b)return!1;for(var c=0;cKb&&(Kb=m)):f=l.eagerReducer===a?l.eagerState:a(f,l.action);g=l;l=l.next}while(null!==l&&l!==
+d);k||(h=g,e=f);Ea(f,b.memoizedState)||(ja=!0);b.memoizedState=f;b.baseUpdate=h;b.baseState=e;c.lastRenderedState=f}return[b.memoizedState,c.dispatch]}function Wd(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};null===X?(X={lastEffect:null},X.lastEffect=a.next=a):(b=X.lastEffect,null===b?X.lastEffect=a.next=a:(c=b.next,b.next=a,a.next=c,X.lastEffect=a));return a}function Xd(a,b,c,d){var e=cb();Lb|=a;e.memoizedState=Wd(b,c,void 0,void 0===d?null:d)}function Yd(a,b,c,d){var e=Mb();d=void 0===
+d?null:d;var f=void 0;if(null!==y){var g=y.memoizedState;f=g.destroy;if(null!==d&&Sd(d,g.deps)){Wd(db,c,f,d);return}}Lb|=a;e.memoizedState=Wd(b,c,f,d)}function fg(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function gg(a,b){}function hg(a,b,c){25>Jb?void 0:n("301");var d=a.alternate;if(a===xa||null!==d&&d===xa)if(Ib=!0,a={expirationTime:Hb,action:c,eagerReducer:null,eagerState:null,next:null},null===
+ia&&(ia=new Map),c=ia.get(b),void 0===c)ia.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}else{eb();var e=ka();e=fb(e,a);var f={expirationTime:e,action:c,eagerReducer:null,eagerState:null,next:null},g=b.last;if(null===g)f.next=f;else{var h=g.next;null!==h&&(f.next=h);g.next=f}b.last=f;if(0===a.expirationTime&&(null===d||0===d.expirationTime)&&(d=b.lastRenderedReducer,null!==d))try{var l=b.lastRenderedState,k=d(l,c);f.eagerReducer=d;f.eagerState=k;if(Ea(k,l))return}catch(m){}finally{}ya(a,
+e)}}function ig(a,b){var c=S(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function jg(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}function kg(a){if(Ia){var b=
+gb;if(b){var c=b;if(!jg(a,b)){b=Hd(c);if(!b||!jg(a,b)){a.effectTag|=2;Ia=!1;la=a;return}ig(la,c)}la=a;gb=Pf(b)}else a.effectTag|=2,Ia=!1,la=a}}function lg(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&18!==a.tag;)a=a.return;la=a}function Zd(a){if(a!==la)return!1;if(!Ia)return lg(a),Ia=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!Gd(b,a.memoizedProps))for(b=gb;b;)ig(a,b),b=Hd(b);lg(a);gb=la?Hd(a.stateNode):null;return!0}function $d(){gb=la=null;Ia=!1}function N(a,b,c,d){b.child=null===
+a?ae(b,null,c,d):hb(b,a.child,c,d)}function mg(a,b,c,d,e){c=c.render;var f=b.ref;ib(b,e);d=Td(a,b,c,d,f,e);if(null!==a&&!ja)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),ma(a,b,e);b.effectTag|=1;N(a,b,d,e);return b.child}function ng(a,b,c,d,e,f){if(null===a){var g=c.type;if("function"===typeof g&&!Md(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,og(a,b,g,d,e,f);a=wc(c.type,null,d,null,b.mode,f);a.ref=
+b.ref;a.return=b;return b.child=a}g=a.child;if(e=c)return sg(a,b,c);b=ma(a,b,c);return null!==b?b.sibling:null}}return ma(a,b,c)}}else ja=!1;b.expirationTime=0;switch(b.tag){case 2:d=b.elementType;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;var e=Za(b,F.current);ib(b,c);e=Td(null,b,d,a,e,c);b.effectTag|=1;if("object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=
+1;Vd();if(E(d)){var f=!0;vc(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;var g=d.getDerivedStateFromProps;"function"===typeof g&&yc(b,d,g,a);e.updater=zc;b.stateNode=e;e._reactInternalFiber=b;Pd(b,d,a,c);b=ce(null,b,d,!0,f,c)}else b.tag=0,N(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);f=b.pendingProps;a=ei(e);b.type=a;e=b.tag=ci(a);f=P(a,f);g=void 0;switch(e){case 0:g=be(null,b,a,f,c);break;case 1:g=
+qg(null,b,a,f,c);break;case 11:g=mg(null,b,a,f,c);break;case 14:g=ng(null,b,a,P(a.type,f),d,c);break;default:n("306",a,"")}return g;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:P(d,e),be(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:P(d,e),qg(a,b,d,e,c);case 3:rg(b);d=b.updateQueue;null===d?n("282"):void 0;e=b.memoizedState;e=null!==e?e.element:null;Cb(b,d,b.pendingProps,null,c);d=b.memoizedState.element;if(d===e)$d(),b=ma(a,b,c);else{e=b.stateNode;if(e=
+(null===a||null===a.child)&&e.hydrate)gb=Pf(b.stateNode.containerInfo),la=b,e=Ia=!0;e?(b.effectTag|=2,b.child=ae(b,null,d,c)):(N(a,b,d,c),$d());b=b.child}return b;case 5:return bg(b),null===a&&kg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Gd(d,e)?g=null:null!==f&&Gd(d,f)&&(b.effectTag|=16),pg(a,b),1!==c&&b.mode&1&&e.hidden?(b.expirationTime=b.childExpirationTime=1,b=null):(N(a,b,g,c),b=b.child),b;case 6:return null===a&&kg(b),null;case 13:return sg(a,b,c);case 4:return Qd(b,
+b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=hb(b,null,d,c):N(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:P(d,e),mg(a,b,d,e,c);case 7:return N(a,b,b.pendingProps,c),b.child;case 8:return N(a,b,b.pendingProps.children,c),b.child;case 12:return N(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;tg(b,f);if(null!==g){var h=g.value;f=Ea(h,f)?0:("function"===typeof d._calculateChangedBits?
+d._calculateChangedBits(h,f):1073741823)|0;if(0===f){if(g.children===e.children&&!M.current){b=ma(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var l=h.contextDependencies;if(null!==l){g=h.child;for(var k=l.first;null!==k;){if(k.context===d&&0!==(k.observedBits&f)){1===h.tag&&(k=Aa(c),k.tag=Ec,na(h,k));h.expirationTime=b&&(ja=!0);a.contextDependencies=null}function T(a,b){if(Ob!==a&&!1!==b&&0!==b){if("number"!==typeof b||1073741823===b)Ob=a,b=1073741823;b={context:a,observedBits:b,next:null};null===Ja?(null===Nb?n("308"):void 0,Ja=b,Nb.contextDependencies={first:b,expirationTime:0}):Ja=Ja.next=b}return a._currentValue}function Fc(a){return{baseState:a,
+firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function fe(a){return{baseState:a.baseState,firstUpdate:a.firstUpdate,lastUpdate:a.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Aa(a){return{expirationTime:a,tag:ug,payload:null,callback:null,next:null,nextEffect:null}}function Gc(a,
+b){null===a.lastUpdate?a.firstUpdate=a.lastUpdate=b:(a.lastUpdate.next=b,a.lastUpdate=b)}function na(a,b){var c=a.alternate;if(null===c){var d=a.updateQueue;var e=null;null===d&&(d=a.updateQueue=Fc(a.memoizedState))}else d=a.updateQueue,e=c.updateQueue,null===d?null===e?(d=a.updateQueue=Fc(a.memoizedState),e=c.updateQueue=Fc(c.memoizedState)):d=a.updateQueue=fe(e):null===e&&(e=c.updateQueue=fe(d));null===e||d===e?Gc(d,b):null===d.lastUpdate||null===e.lastUpdate?(Gc(d,b),Gc(e,b)):(Gc(d,b),e.lastUpdate=
+b)}function vg(a,b){var c=a.updateQueue;c=null===c?a.updateQueue=Fc(a.memoizedState):wg(a,c);null===c.lastCapturedUpdate?c.firstCapturedUpdate=c.lastCapturedUpdate=b:(c.lastCapturedUpdate.next=b,c.lastCapturedUpdate=b)}function wg(a,b){var c=a.alternate;null!==c&&b===c.updateQueue&&(b=a.updateQueue=fe(b));return b}function xg(a,b,c,d,e,f){switch(c.tag){case yg:return a=c.payload,"function"===typeof a?a.call(f,d,e):a;case ge:a.effectTag=a.effectTag&-2049|64;case ug:a=c.payload;e="function"===typeof a?
+a.call(f,d,e):a;if(null===e||void 0===e)break;return B({},d,e);case Ec:za=!0}return d}function Cb(a,b,c,d,e){za=!1;b=wg(a,b);for(var f=b.baseState,g=null,h=0,l=b.firstUpdate,k=f;null!==l;){var m=l.expirationTime;md?e:d);Kg.current=null;d=void 0;1c?b:c;0===b&&(Ba=null);wi(a,b)}function Mg(a){for(;;){var b=a.alternate,c=a.return,d=a.sibling;if(0===(a.effectTag&1024)){x=a;a:{var e=b;b=a;var f=H;var g=b.pendingProps;switch(b.tag){case 2:break;case 16:break;case 15:case 0:break;case 1:E(b.type)&&uc(b);break;case 3:$a(b);Jd(b);g=b.stateNode;g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null);if(null===e||null===e.child)Zd(b),b.effectTag&=
+-3;pe(b);break;case 5:Rd(b);var h=Ha(Fb.current);f=b.type;if(null!==e&&null!=b.stateNode)Ng(e,b,f,g,h),e.ref!==b.ref&&(b.effectTag|=128);else if(g){var l=Ha(U.current);if(Zd(b)){g=b;e=g.stateNode;var k=g.type,m=g.memoizedProps,p=h;e[ea]=g;e[ec]=m;f=void 0;h=k;switch(h){case "iframe":case "object":r("load",e);break;case "video":case "audio":for(k=0;k\x3c/script>",k=e.removeChild(e.firstChild)):
+"string"===typeof e.is?k=k.createElement(p,{is:e.is}):(k=k.createElement(p),"select"===p&&(p=k,e.multiple?p.multiple=!0:e.size&&(p.size=e.size))):k=k.createElementNS(l,p);e=k;e[ea]=m;e[ec]=g;Og(e,b,!1,!1);m=e;k=f;p=g;var t=h,y=Fd(k,p);switch(k){case "iframe":case "object":r("load",m);h=p;break;case "video":case "audio":for(h=0;hg&&(g=e),h>g&&(g=h),f=f.sibling;b.childExpirationTime=g}if(null!==x)return x;null!==c&&0===(c.effectTag&1024)&&(null===c.firstEffect&&(c.firstEffect=a.firstEffect),null!==a.lastEffect&&(null!==c.lastEffect&&(c.lastEffect.nextEffect=a.firstEffect),c.lastEffect=a.lastEffect),
+1=u)t=0;else if(-1===t||u component higher in the tree to provide a loading indicator or placeholder to display."+
+qd(k))}je=!0;m=Hc(m,k);h=l;do{switch(h.tag){case 3:h.effectTag|=2048;h.expirationTime=g;g=he(h,m,g);vg(h,g);break a;case 1:if(t=m,r=h.type,k=h.stateNode,0===(h.effectTag&64)&&("function"===typeof r.getDerivedStateFromError||null!==k&&"function"===typeof k.componentDidCatch&&(null===Ba||!Ba.has(k)))){h.effectTag|=2048;h.expirationTime=g;g=Ig(h,t,g);vg(h,g);break a}}h=h.return}while(null!==h)}x=Mg(f);continue}}}break}while(1);Ca=!1;qe.current=c;Ob=Ja=Nb=null;Vd();if(e)Y=null,a.finishedWork=null;else if(null!==
+x)a.finishedWork=null;else{c=a.current.alternate;null===c?n("281"):void 0;Y=null;if(je){e=a.latestPendingTime;f=a.latestSuspendedTime;g=a.latestPingedTime;if(0!==e&&eb?0:b)):(a.pendingCommitExpirationTime=
+d,a.finishedWork=c)}}function Ka(a,b){for(var c=a.return;null!==c;){switch(c.tag){case 1:var d=c.stateNode;if("function"===typeof c.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===Ba||!Ba.has(d))){a=Hc(b,a);a=Ig(c,a,1073741823);na(c,a);ya(c,1073741823);return}break;case 3:a=Hc(b,a);a=he(c,a,1073741823);na(c,a);ya(c,1073741823);return}c=c.return}3===a.tag&&(c=Hc(b,a),c=he(a,c,1073741823),na(a,c),ya(a,1073741823))}function fb(a,b){var c=zi(),d=void 0;if(0===(b.mode&1))d=
+1073741823;else if(Ca&&!Lc)d=H;else{switch(c){case se:d=1073741823;break;case te:d=1073741822-10*(((1073741822-a+15)/10|0)+1);break;case Lg:d=1073741822-25*(((1073741822-a+500)/25|0)+1);break;case Ai:case Bi:d=1;break;default:n("313")}null!==Y&&d===H&&--d}c===te&&(0===oa||d=d){a.didError=!1;b=a.latestPingedTime;if(0===b||
+b>c)a.latestPingedTime=c;xc(c,a);c=a.expirationTime;0!==c&&Kc(a,c)}}function li(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=ka();b=fb(b,a);a=Sg(a,b);null!==a&&(Bb(a,b),b=a.expirationTime,0!==b&&Kc(a,b))}function Sg(a,b){a.expirationTimeH&&Jg(),Bb(a,b),Ca&&!Lc&&Y===a||Kc(a,a.expirationTime),Tb>Ci&&(Tb=0,n("185")))}function Tg(a,b,c,d,e){return Mc(se,function(){return a(b,c,d,e)})}function Ub(){aa=1073741822-((ue()-ve)/10|0)}function Ug(a,b){if(0!==Oc){if(ba.expirationTime&&(a.expirationTime=
+b);w||(z?Rc&&(ca=a,C=1073741823,Sc(a,1073741823,!1)):1073741823===b?Z(1073741823,!1):Ug(a,b))}function Qc(){var a=0,b=null;if(null!==I)for(var c=I,d=ba;null!==d;){var e=d.expirationTime;if(0===e){null===c||null===I?n("244"):void 0;if(d===d.nextScheduledRoot){ba=I=d.nextScheduledRoot=null;break}else if(d===ba)ba=e=d.nextScheduledRoot,I.nextScheduledRoot=e,d.nextScheduledRoot=null;else if(d===I){I=c;I.nextScheduledRoot=ba;d.nextScheduledRoot=null;break}else c.nextScheduledRoot=d.nextScheduledRoot,d.nextScheduledRoot=
+null;d=c.nextScheduledRoot}else{e>a&&(a=e,b=d);if(d===I)break;if(1073741823===a)break;c=d;d=d.nextScheduledRoot}}ca=b;C=a}function Nc(){return Tc?!0:Gi()?Tc=!0:!1}function Di(){try{if(!Nc()&&null!==ba){Ub();var a=ba;do{var b=a.expirationTime;0!==b&&aa<=b&&(a.nextExpirationTimeToWorkOn=aa);a=a.nextScheduledRoot}while(a!==ba)}Z(0,!0)}finally{Tc=!1}}function Z(a,b){Qc();if(b)for(Ub(),jb=aa;null!==ca&&0!==C&&a<=C&&!(Tc&&aa>C);)Sc(ca,C,aa>C),Qc(),Ub(),jb=aa;else for(;null!==ca&&0!==C&&a<=C;)Sc(ca,C,!1),
+Qc();b&&(Oc=0,Pc=null);0!==C&&Ug(ca,C);Tb=0;we=null;if(null!==kb)for(a=kb,kb=null,b=0;b=c&&(null===kb?kb=[d]:kb.push(d),d._defer)){a.finishedWork=b;a.expirationTime=0;return}a.finishedWork=null;a===we?Tb++:(we=a,Tb=0);Mc(se,function(){ui(a,b)})}function ie(a){null===ca?n("246"):void 0;ca.expirationTime=0;lb||(lb=!0,Uc=a)}function Zg(a,b){var c=z;z=!0;try{return a(b)}finally{(z=
+c)||w||Z(1073741823,!1)}}function $g(a,b){if(z&&!Rc){Rc=!0;try{return a(b)}finally{Rc=!1}}return a(b)}function ah(a,b,c){z||w||0===oa||(Z(oa,!1),oa=0);var d=z;z=!0;try{return Mc(te,function(){return a(b,c)})}finally{(z=d)||w||Z(1073741823,!1)}}function bh(a,b,c,d,e){var f=b.current;a:if(c){c=c._reactInternalFiber;b:{2===wb(c)&&1===c.tag?void 0:n("170");var g=c;do{switch(g.tag){case 3:g=g.stateNode.context;break b;case 1:if(E(g.type)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break b}}g=
+g.return}while(null!==g);n("171");g=void 0}if(1===c.tag){var h=c.type;if(E(h)){c=Rf(c,h,g);break a}}c=g}else c=va;null===b.context?b.context=c:b.pendingContext=c;b=e;e=Aa(d);e.payload={element:a};b=void 0===b?null:b;null!==b&&(e.callback=b);eb();na(f,e);ya(f,d);return d}function xe(a,b,c,d){var e=b.current,f=ka();e=fb(f,e);return bh(a,b,c,e,d)}function ye(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function Hi(a,b,c){var d=
+3=ze&&(b=ze-1);this._expirationTime=ze=b;this._root=a;this._callbacks=this._next=null;this._hasChildren=this._didComplete=!1;this._children=null;this._defer=!0}function mb(){this._callbacks=null;this._didCommit=!1;this._onCommit=this._onCommit.bind(this)}function nb(a,b,c){b=S(3,null,null,
+b?3:0);a={current:b,containerInfo:a,pendingChildren:null,pingCache:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,didError:!1,pendingCommitExpirationTime:0,finishedWork:null,timeoutHandle:-1,context:null,pendingContext:null,hydrate:c,nextExpirationTimeToWorkOn:0,expirationTime:0,firstBatch:null,nextScheduledRoot:null};this._internalRoot=b.stateNode=a}function ob(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||
+" react-mount-point-unstable "!==a.nodeValue))}function Ii(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute("data-reactroot")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new nb(a,!1,b)}function Wc(a,b,c,d,e){var f=c._reactRootContainer;if(f){if("function"===typeof e){var g=e;e=function(){var a=ye(f._internalRoot);g.call(a)}}null!=a?f.legacy_renderSubtreeIntoContainer(a,b,e):f.render(b,e)}else{f=c._reactRootContainer=Ii(c,d);if("function"===
+typeof e){var h=e;e=function(){var a=ye(f._internalRoot);h.call(a)}}$g(function(){null!=a?f.legacy_renderSubtreeIntoContainer(a,b,e):f.render(b,e)})}return ye(f._internalRoot)}function ch(a,b){var c=2=Wb),Re=String.fromCharCode(32),pa={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",
+captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",
+captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Qe=!1,Sa=!1,Mi={eventTypes:pa,extractEvents:function(a,b,c,d){var e=void 0;var f=void 0;if(hd)b:{switch(a){case "compositionstart":e=pa.compositionStart;break b;case "compositionend":e=pa.compositionEnd;break b;case "compositionupdate":e=pa.compositionUpdate;break b}e=void 0}else Sa?Oe(a,c)&&(e=pa.compositionEnd):"keydown"===a&&229===c.keyCode&&(e=pa.compositionStart);e?(Se&&
+"ko"!==c.locale&&(Sa||e!==pa.compositionStart?e===pa.compositionEnd&&Sa&&(f=Me()):(qa=d,gd="value"in qa?qa.value:qa.textContent,Sa=!0)),e=Ji.getPooled(e,b,c,d),f?e.data=f:(f=Pe(c),null!==f&&(e.data=f)),Qa(e),f=e):f=null;(a=Li?Bh(a,c):Ch(a,c))?(b=Ki.getPooled(pa.beforeInput,b,c,d),b.data=a,Qa(b)):b=null;return null===f?b:null===b?f:[f,b]}},id=null,Ta=null,Ua=null,Ye=function(a,b){return a(b)},yf=function(a,b,c){return a(b,c)},Ze=function(){},jd=!1,Dh={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},Ma=da.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Ma.hasOwnProperty("ReactCurrentDispatcher")||(Ma.ReactCurrentDispatcher={current:null});var Fh=/^(.*)[\\\/]/,O="function"===typeof Symbol&&Symbol.for,Bc=O?Symbol.for("react.element"):60103,Va=O?Symbol.for("react.portal"):60106,ta=O?Symbol.for("react.fragment"):60107,md=O?Symbol.for("react.strict_mode"):60108,lc=O?Symbol.for("react.profiler"):60114,
+ff=O?Symbol.for("react.provider"):60109,ef=O?Symbol.for("react.context"):60110,ld=O?Symbol.for("react.concurrent_mode"):60111,od=O?Symbol.for("react.forward_ref"):60112,nd=O?Symbol.for("react.suspense"):60113,pd=O?Symbol.for("react.memo"):60115,gf=O?Symbol.for("react.lazy"):60116,df="function"===typeof Symbol&&Symbol.iterator,Hh=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,
+hf=Object.prototype.hasOwnProperty,kf={},jf={},A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){A[a]=new K(a,0,!1,a,null)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];A[b]=new K(b,1,!1,a[1],null)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){A[a]=new K(a,2,!1,
+a.toLowerCase(),null)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){A[a]=new K(a,2,!1,a,null)});"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){A[a]=new K(a,3,!1,a.toLowerCase(),null)});["checked","multiple","muted","selected"].forEach(function(a){A[a]=new K(a,3,!0,a,null)});["capture",
+"download"].forEach(function(a){A[a]=new K(a,4,!1,a,null)});["cols","rows","size","span"].forEach(function(a){A[a]=new K(a,6,!1,a,null)});["rowSpan","start"].forEach(function(a){A[a]=new K(a,5,!1,a.toLowerCase(),null)});var Be=/[\-:]([a-z])/g,Ce=function(a){return a[1].toUpperCase()};"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=
+a.replace(Be,Ce);A[b]=new K(b,1,!1,a,null)});"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(Be,Ce);A[b]=new K(b,1,!1,a,"http://www.w3.org/1999/xlink")});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(Be,Ce);A[b]=new K(b,1,!1,a,"http://www.w3.org/XML/1998/namespace")});["tabIndex","crossOrigin"].forEach(function(a){A[a]=new K(a,1,!1,a.toLowerCase(),null)});var pf={change:{phasedRegistrationNames:{bubbled:"onChange",
+captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}},tb=null,ub=null,De=!1;ra&&(De=af("input")&&(!document.documentMode||9=document.documentMode,Hf={select:{phasedRegistrationNames:{bubbled:"onSelect",
+captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Wa=null,Ad=null,xb=null,zd=!1,aj={eventTypes:Hf,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument,f;if(!(f=!e)){a:{e=zf(e);f=$c.onSelect;for(var g=0;g"+b+"";for(b=Xc.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}}),
+Ab=function(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b},yb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,
+lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},bj=["Webkit","ms","Moz","O"];Object.keys(yb).forEach(function(a){bj.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);yb[b]=yb[a]})});var Zh=B({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,
+source:!0,track:!0,wbr:!0}),R=da.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler,Vg=R.unstable_cancelCallback,ue=R.unstable_now,Wg=R.unstable_scheduleCallback,Gi=R.unstable_shouldYield,Mc=R.unstable_runWithPriority,zi=R.unstable_getCurrentPriorityLevel,se=R.unstable_ImmediatePriority,te=R.unstable_UserBlockingPriority,Lg=R.unstable_NormalPriority,Ai=R.unstable_LowPriority,Bi=R.unstable_IdlePriority,ne=null,oe=null,Ei="function"===typeof setTimeout?setTimeout:void 0,Yg="function"===typeof clearTimeout?
+clearTimeout:void 0,vi=Wg,ti=Vg;new Set;var Id=[],Ya=-1,va={},F={current:va},M={current:!1},Fa=va,Kd=null,Ld=null,S=function(a,b,c,d){return new bi(a,b,c,d)},$f=(new da.Component).refs,zc={isMounted:function(a){return(a=a._reactInternalFiber)?2===wb(a):!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=ka();d=fb(d,a);var e=Aa(d);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);eb();na(a,e);ya(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=ka();d=fb(d,a);var e=
+Aa(d);e.tag=yg;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);eb();na(a,e);ya(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=ka();c=fb(c,a);var d=Aa(c);d.tag=Ec;void 0!==b&&null!==b&&(d.callback=b);eb();na(a,d);ya(a,c)}},Cc=Array.isArray,hb=ag(!0),ae=ag(!1),Eb={},U={current:Eb},Gb={current:Eb},Fb={current:Eb},db=0,pi=2,Rb=4,ji=8,ri=16,Sb=32,me=64,le=128,Dc=Ma.ReactCurrentDispatcher,Hb=0,xa=null,y=null,W=null,bb=null,G=null,ab=null,Kb=0,X=null,Lb=0,Ib=!1,ia=null,Jb=0,Ud={readContext:T,
+useCallback:V,useContext:V,useEffect:V,useImperativeHandle:V,useLayoutEffect:V,useMemo:V,useReducer:V,useRef:V,useState:V,useDebugValue:V},fi={readContext:T,useCallback:function(a,b){cb().memoizedState=[a,void 0===b?null:b];return a},useContext:T,useEffect:function(a,b){return Xd(516,le|me,a,b)},useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Xd(4,Rb|Sb,fg.bind(null,b,a),c)},useLayoutEffect:function(a,b){return Xd(4,Rb|Sb,a,b)},useMemo:function(a,b){var c=cb();
+b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=cb();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={last:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=hg.bind(null,xa,a);return[d.memoizedState,a]},useRef:function(a){var b=cb();a={current:a};return b.memoizedState=a},useState:function(a){var b=cb();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={last:null,dispatch:null,lastRenderedReducer:dg,
+lastRenderedState:a};a=a.dispatch=hg.bind(null,xa,a);return[b.memoizedState,a]},useDebugValue:gg},cg={readContext:T,useCallback:function(a,b){var c=Mb();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Sd(b,d[1]))return d[0];c.memoizedState=[a,b];return a},useContext:T,useEffect:function(a,b){return Yd(516,le|me,a,b)},useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Yd(4,Rb|Sb,fg.bind(null,b,a),c)},useLayoutEffect:function(a,b){return Yd(4,Rb|Sb,
+a,b)},useMemo:function(a,b){var c=Mb();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Sd(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a},useReducer:eg,useRef:function(a){return Mb().memoizedState},useState:function(a){return eg(dg,a)},useDebugValue:gg},la=null,gb=null,Ia=!1,gi=Ma.ReactCurrentOwner,ja=!1,de={current:null},Nb=null,Ja=null,Ob=null,ug=0,yg=1,Ec=2,ge=3,za=!1,Og=void 0,pe=void 0,Ng=void 0,Pg=void 0;Og=function(a,b,c,d){for(c=b.child;null!==c;){if(5===c.tag||
+6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};pe=function(a){};Ng=function(a,b,c,d,e){var f=a.memoizedProps;if(f!==d){var g=b.stateNode;Ha(U.current);a=null;switch(c){case "input":f=sd(g,f);d=sd(g,d);a=[];break;case "option":f=Bd(g,f);d=Bd(g,d);a=[];break;case "select":f=B({},f,{value:void 0});d=B({},d,{value:void 0});
+a=[];break;case "textarea":f=Cd(g,f);d=Cd(g,d);a=[];break;default:"function"!==typeof f.onClick&&"function"===typeof d.onClick&&(g.onclick=tc)}Ed(c,d);g=c=void 0;var h=null;for(c in f)if(!d.hasOwnProperty(c)&&f.hasOwnProperty(c)&&null!=f[c])if("style"===c){var l=f[c];for(g in l)l.hasOwnProperty(g)&&(h||(h={}),h[g]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(Oa.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,
+null));for(c in d){var k=d[c];l=null!=f?f[c]:void 0;if(d.hasOwnProperty(c)&&k!==l&&(null!=k||null!=l))if("style"===c)if(l){for(g in l)!l.hasOwnProperty(g)||k&&k.hasOwnProperty(g)||(h||(h={}),h[g]="");for(g in k)k.hasOwnProperty(g)&&l[g]!==k[g]&&(h||(h={}),h[g]=k[g])}else h||(a||(a=[]),a.push(c,h)),h=k;else"dangerouslySetInnerHTML"===c?(k=k?k.__html:void 0,l=l?l.__html:void 0,null!=k&&l!==k&&(a=a||[]).push(c,""+k)):"children"===c?l===k||"string"!==typeof k&&"number"!==typeof k||(a=a||[]).push(c,""+
+k):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(Oa.hasOwnProperty(c)?(null!=k&&ha(e,c),a||l===k||(a=[])):(a=a||[]).push(c,k))}h&&(a=a||[]).push("style",h);e=a;(b.updateQueue=e)&&Pb(b)}};Pg=function(a,b,c,d){c!==d&&Pb(b)};var ki="function"===typeof WeakSet?WeakSet:Set,xi="function"===typeof WeakMap?WeakMap:Map,qe=Ma.ReactCurrentDispatcher,Kg=Ma.ReactCurrentOwner,ze=1073741822,Ca=!1,x=null,Y=null,H=0,La=-1,je=!1,p=null,Lc=!1,ke=null,Jc=null,Ic=null,Ba=null,ba=null,I=null,Oc=
+0,Pc=void 0,w=!1,ca=null,C=0,oa=0,lb=!1,Uc=null,z=!1,Rc=!1,kb=null,ve=ue(),aa=1073741822-(ve/10|0),jb=aa,Ci=50,Tb=0,we=null,Tc=!1;id=function(a,b,c){switch(b){case "input":td(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b=b;)c=d,d=d._next;a._next=d;null!==
+c&&(c._next=a)}return a};(function(a,b,c){Ye=a;yf=b;Ze=c})(Zg,ah,function(){w||0===oa||(Z(oa,!1),oa=0)});var oh={createPortal:ch,findDOMNode:function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternalFiber;void 0===b&&("function"===typeof a.render?n("188"):n("268",Object.keys(a)));a=tf(b);a=null===a?null:a.stateNode;return a},hydrate:function(a,b,c){ob(b)?void 0:n("200");return Wc(null,a,b,!0,c)},render:function(a,b,c){ob(b)?void 0:n("200");return Wc(null,a,b,!1,c)},unstable_renderSubtreeIntoContainer:function(a,
+b,c,d){ob(c)?void 0:n("200");null==a||void 0===a._reactInternalFiber?n("38"):void 0;return Wc(a,b,c,!1,d)},unmountComponentAtNode:function(a){ob(a)?void 0:n("40");return a._reactRootContainer?($g(function(){Wc(null,null,a,!1,function(){a._reactRootContainer=null})}),!0):!1},unstable_createPortal:function(){return ch.apply(void 0,arguments)},unstable_batchedUpdates:Zg,unstable_interactiveUpdates:ah,flushSync:function(a,b){w?n("187"):void 0;var c=z;z=!0;try{return Tg(a,b)}finally{z=c,Z(1073741823,!1)}},
+unstable_createRoot:function(a,b){ob(a)?void 0:n("299","unstable_createRoot");return new nb(a,!0,null!=b&&!0===b.hydrate)},unstable_flushControlled:function(a){var b=z;z=!0;try{Tg(a)}finally{(z=b)||w||Z(1073741823,!1)}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[Je,Da,dd,Ae.injectEventPluginsByName,Zc,Qa,function(a){ad(a,xh)},Ve,We,oc,cd]}};(function(a){var b=a.findFiberByHostInstance;return ai(B({},a,{overrideProps:null,currentDispatcherRef:Ma.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=
+tf(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null}}))})({findFiberByHostInstance:dc,bundleType:0,version:"16.8.6",rendererPackageName:"react-dom"});var ph={default:oh},qh=ph&&oh||ph;return qh.default||qh});
diff --git a/graphene_django/static/graphiql/js/react.production.min.js b/graphene_django/static/graphiql/js/react.production.min.js
new file mode 100755
index 0000000..4dc1c2c
--- /dev/null
+++ b/graphene_django/static/graphiql/js/react.production.min.js
@@ -0,0 +1,33 @@
+/** @license React v16.8.6
+ * react.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+'use strict';(function(N,q){"object"===typeof exports&&"undefined"!==typeof module?module.exports=q():"function"===typeof define&&define.amd?define(q):N.React=q()})(this,function(){function N(a,b,d,g,p,c,e,h){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var n=[d,g,p,c,e,h],f=0;a=Error(b.replace(/%s/g,function(){return n[f++]}));a.name="Invariant Violation"}a.framesToPop=1;
+throw a;}}function q(a){for(var b=arguments.length-1,d="https://reactjs.org/docs/error-decoder.html?invariant="+a,g=0;g=b){d=a;break}a=a.next}while(a!==c);null===d?d=c:d===
+c&&(c=n,u());b=d.previous;b.next=d.previous=n;n.next=d;n.previous=b}}function F(){if(-1===k&&null!==c&&1===c.priorityLevel){x=!0;try{do Q();while(null!==c&&1===c.priorityLevel)}finally{x=!1,null!==c?u():C=!1}}}function ta(a){x=!0;var b=G;G=a;try{if(a)for(;null!==c;){var d=l();if(c.expirationTime<=d){do Q();while(null!==c&&c.expirationTime<=d)}else break}else if(null!==c){do Q();while(null!==c&&!H())}}finally{x=!1,G=b,null!==c?u():C=!1,F()}}function ea(a,b,d){var g=void 0,p={},c=null,e=null;if(null!=
+b)for(g in void 0!==b.ref&&(e=b.ref),void 0!==b.key&&(c=""+b.key),b)fa.call(b,g)&&!ha.hasOwnProperty(g)&&(p[g]=b[g]);var h=arguments.length-2;if(1===h)p.children=d;else if(1I.length&&I.push(a)}function T(a,b,d,g){var c=typeof a;if("undefined"===c||"boolean"===c)a=null;var e=!1;if(null===
+a)e=!0;else switch(c){case "string":case "number":e=!0;break;case "object":switch(a.$$typeof){case y:case wa:e=!0}}if(e)return d(g,a,""===b?"."+U(a,0):b),1;e=0;b=""===b?".":b+":";if(Array.isArray(a))for(var f=0;fa;a++)b["_"+String.fromCharCode(a)]=a;if("0123456789"!==Object.getOwnPropertyNames(b).map(function(a){return b[a]}).join(""))return!1;var d={};"abcdefghijklmnopqrst".split("").forEach(function(a){d[a]=a});return"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},d)).join("")?!1:!0}catch(g){return!1}}()?Object.assign:function(a,b){if(null===a||void 0===a)throw new TypeError("Object.assign cannot be called with null or undefined");var d=Object(a);for(var c,e=1;e=L-d)if(-1!==b&&b<=d)c=!0;else{A||(A=!0,Y(aa));w=a;z=b;return}if(null!==a){Z=!0;try{a(c)}finally{Z=!1}}};var aa=function(a){if(null!==w){Y(aa);var b=a-L+B;bb&&(b=8),B=bb?sa.postMessage(void 0):A||(A=!0,Y(aa))};P=function(){w=null;K=!1;z=-1}}var Oa=
+0,ma={current:null},R={current:null};e={ReactCurrentDispatcher:ma,ReactCurrentOwner:R,assign:J};J(e,{Scheduler:{unstable_cancelCallback:function(a){var b=a.next;if(null!==b){if(b===a)c=null;else{a===c&&(c=b);var d=a.previous;d.next=b;b.previous=d}a.next=a.previous=null}},unstable_shouldYield:function(){return!G&&(null!==c&&c.expirationTimeb){d=g;break}g=g.next}while(g!==c);null===d?d=c:d===c&&(c=a,u());b=d.previous;b.next=d.previous=a;a.next=d;a.previous=b}return a},unstable_runWithPriority:function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=
+3}var d=f,c=k;f=a;k=l();try{return b()}finally{f=d,k=c,F()}},unstable_next:function(a){switch(f){case 1:case 2:case 3:var b=3;break;default:b=f}var d=f,c=k;f=b;k=l();try{return a()}finally{f=d,k=c,F()}},unstable_wrapCallback:function(a){var b=f;return function(){var d=f,c=k;f=b;k=l();try{return a.apply(this,arguments)}finally{f=d,k=c,F()}}},unstable_getFirstCallbackNode:function(){return c},unstable_pauseExecution:function(){},unstable_continueExecution:function(){null!==c&&u()},unstable_getCurrentPriorityLevel:function(){return f},
+unstable_IdlePriority:5,unstable_ImmediatePriority:1,unstable_LowPriority:4,unstable_NormalPriority:3,unstable_UserBlockingPriority:2},SchedulerTracing:{__interactionsRef:null,__subscriberRef:null,unstable_clear:function(a){return a()},unstable_getCurrent:function(){return null},unstable_getThreadID:function(){return++Oa},unstable_subscribe:function(a){},unstable_trace:function(a,b,d){return d()},unstable_unsubscribe:function(a){},unstable_wrap:function(a){return a}}});var fa=Object.prototype.hasOwnProperty,
+ha={key:!0,ref:!0,__self:!0,__source:!0},la=/\/+/g,I=[];r={Children:{map:function(a,b,d){if(null==a)return a;var c=[];W(a,c,null,b,d);return c},forEach:function(a,b,d){if(null==a)return a;b=ia(null,null,b,d);V(a,xa,b);ja(b)},count:function(a){return V(a,function(){return null},null)},toArray:function(a){var b=[];W(a,b,null,function(a){return a});return b},only:function(a){S(a)?void 0:q("143");return a}},createRef:function(){return{current:null}},Component:t,PureComponent:O,createContext:function(a,
+b){void 0===b&&(b=null);a={$$typeof:Ba,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:Aa,_context:a};return a.Consumer=a},forwardRef:function(a){return{$$typeof:Da,render:a}},lazy:function(a){return{$$typeof:Ga,_ctor:a,_status:-1,_result:null}},memo:function(a,b){return{$$typeof:Fa,type:a,compare:void 0===b?null:b}},useCallback:function(a,b){return m().useCallback(a,b)},useContext:function(a,b){return m().useContext(a,b)},
+useEffect:function(a,b){return m().useEffect(a,b)},useImperativeHandle:function(a,b,d){return m().useImperativeHandle(a,b,d)},useDebugValue:function(a,b){},useLayoutEffect:function(a,b){return m().useLayoutEffect(a,b)},useMemo:function(a,b){return m().useMemo(a,b)},useReducer:function(a,b,d){return m().useReducer(a,b,d)},useRef:function(a){return m().useRef(a)},useState:function(a){return m().useState(a)},Fragment:r,StrictMode:X,Suspense:Ea,createElement:ea,cloneElement:function(a,b,d){null===a||
+void 0===a?q("267",a):void 0;var c=void 0,e=J({},a.props),f=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=R.current);void 0!==b.key&&(f=""+b.key);var l=void 0;a.type&&a.type.defaultProps&&(l=a.type.defaultProps);for(c in b)fa.call(b,c)&&!ha.hasOwnProperty(c)&&(e[c]=void 0===b[c]&&void 0!==l?l[c]:b[c])}c=arguments.length-2;if(1===c)e.children=d;else if(1
+
+
+
+
+
+
+
+ {% if 'cdn' == TEMPLATE_SOURCE %}
+
+
+
+
+
+ {% endif %}
+
+ {% if 'static' == TEMPLATE_SOURCE %}
+
+
+
+
+
+ {% endif %}
+
+ {% block title %}{% endblock %}
+
+
+
+
+ {% block content %}
+ {% endblock %}
+
+
diff --git a/graphene_django/templates/graphene/graphiql.html b/graphene_django/templates/graphene/graphiql.html
old mode 100644
new mode 100755
index d0546bd..9d3ebf6
--- a/graphene_django/templates/graphene/graphiql.html
+++ b/graphene_django/templates/graphene/graphiql.html
@@ -1,38 +1,11 @@
-
+{% extends 'graphene/base.html' %}
+
{% load static %}
-
-
-
-
-
-
-
-
-
-
-
-
+
+{% block title %}-- Local graphiQL --{% endblock %}
+{% block additional_headers %}{{ auth_header }}{% endblock %}
+
+{% block content %}
{% csrf_token %}
-
-
+{% endblock %}
diff --git a/graphene_django/templates/graphene/header_jwt_auth.html b/graphene_django/templates/graphene/header_jwt_auth.html
new file mode 100755
index 0000000..1e9ecc6
--- /dev/null
+++ b/graphene_django/templates/graphene/header_jwt_auth.html
@@ -0,0 +1,15 @@
+{% extends 'graphene/base.html' %}
+
+{% load static %}
+
+{% block title %}set a JWT token in the headers (HTTP_AUTHORIZATION){% endblock %}
+
+{% block content %}
+
+{% endblock %}
diff --git a/graphene_django/views.py b/graphene_django/views.py
index 4c58839..05d5706 100644
--- a/graphene_django/views.py
+++ b/graphene_django/views.py
@@ -3,21 +3,22 @@ import json
import re
import six
-from django.http import HttpResponse, HttpResponseNotAllowed
+from django.http import HttpRequest, HttpResponse, HttpResponseNotAllowed
from django.http.response import HttpResponseBadRequest
from django.shortcuts import render
from django.utils.decorators import method_decorator
-from django.views.generic import View
from django.views.decorators.csrf import ensure_csrf_cookie
+from rest_framework.views import APIView
+
from graphql import get_default_backend
from graphql.error import format_error as format_graphql_error
from graphql.error import GraphQLError
from graphql.execution import ExecutionResult
from graphql.type.schema import GraphQLSchema
-from .settings import graphene_settings
-
+from graphene_django.settings import graphene_settings
+from graphene_django.forms.forms import HeaderForm
class HttpError(Exception):
def __init__(self, response, message=None, *args, **kwargs):
@@ -50,13 +51,10 @@ def instantiate_middleware(middlewares):
yield middleware
-class GraphQLView(View):
- graphiql_version = "0.14.0"
- graphiql_template = "graphene/graphiql.html"
- react_version = "16.8.6"
-
+class GraphQLView(APIView):
schema = None
graphiql = False
+ graphiql_headers = False
executor = None
backend = None
middleware = None
@@ -71,6 +69,7 @@ class GraphQLView(View):
middleware=None,
root_value=None,
graphiql=False,
+ graphiql_headers=False,
pretty=False,
batch=False,
backend=None,
@@ -91,6 +90,7 @@ class GraphQLView(View):
self.root_value = root_value
self.pretty = self.pretty or pretty
self.graphiql = self.graphiql or graphiql
+ self.graphiql_headers = self.graphiql_headers or graphiql_headers
self.batch = self.batch or batch
self.backend = backend
@@ -114,6 +114,22 @@ class GraphQLView(View):
@method_decorator(ensure_csrf_cookie)
def dispatch(self, request, *args, **kwargs):
+ GET_FROM_CDN = kwargs.get('GET_FROM_CDN', None)
+ if GET_FROM_CDN is None:
+ GET_FROM_CDN = 'static' # this is diconnected
+
+ graphiql_arguments = {}
+ if GET_FROM_CDN == 'cdn':
+ graphiql_arguments.update({'graphiql_version': '0.14.0'})
+ graphiql_arguments.update({'graphiql_template': 'graphene/graphiql.html'})
+ graphiql_arguments.update({'react_version': '16.8.6'})
+ graphiql_arguments.update({'TEMPLATE_SOURCE': 'cdn'})
+ elif GET_FROM_CDN == 'static':
+ graphiql_arguments.update({'graphiql_template': 'graphene/graphiql.html'})
+ graphiql_arguments.update({'TEMPLATE_SOURCE': 'static'})
+ else:
+ print('Unsuppored option in setting. Choose or ')
+
try:
if request.method.lower() not in ("get", "post"):
raise HttpError(
@@ -123,14 +139,38 @@ class GraphQLView(View):
)
data = self.parse_body(request)
+ try:
+ if request.session['use_graphiql']:
+ use_graphiql = True
+ else:
+ use_graphiql = False
+ except:
+ use_graphiql = False
+
show_graphiql = self.graphiql and self.can_display_graphiql(request, data)
+ show_graphiql_headers = self.graphiql_headers and self.can_display_graphiql(request, data)
if show_graphiql:
+ request.session['use_graphiql'] = True
+ request.session.save()
+ graphiql_arguments.update({'auth_header': None})
return self.render_graphiql(
request,
- graphiql_version=self.graphiql_version,
- react_version=self.react_version,
+ graphiql_arguments,
)
+ elif show_graphiql_headers:
+ request.session['use_graphiql'] = True
+ request.session.save()
+
+ return _get_auth_header(self, request, graphiql_arguments)
+ else:
+ # not interactive, so save headers in session -- nothing to return() here
+ try:
+ request.session['HTTP_AUTHORIZATION'] = request.META['HTTP_AUTHORIZATION']
+ request.session['use_graphiql'] = False
+ request.session.save()
+ except:
+ pass # not first time through
if self.batch:
responses = [self.get_response(request, entry) for entry in data]
@@ -143,7 +183,7 @@ class GraphQLView(View):
or 200
)
else:
- result, status_code = self.get_response(request, data, show_graphiql)
+ result, status_code = self.get_response(request, data, use_graphiql)
return HttpResponse(
status=status_code, content=result, content_type="application/json"
@@ -185,11 +225,15 @@ class GraphQLView(View):
result = self.json_encode(request, response, pretty=show_graphiql)
else:
result = None
-
+
return result, status_code
- def render_graphiql(self, request, **data):
- return render(request, self.graphiql_template, data)
+ def render_graphiql(self, request, data):
+ template = None
+ for (key, value) in data.items():
+ if key == 'graphiql_template':
+ template = value
+ return render(request, template, data) # data is context -- list of dicts
def json_encode(self, request, d, pretty=False):
if not (self.pretty or pretty) and not request.GET.get("pretty"):
@@ -273,6 +317,8 @@ class GraphQLView(View):
# executor is not a valid argument in all backends
extra_options["executor"] = self.executor
+ # put auth in session for the schema.py to use
+ request.META.update({'HTTP_AUTHORIZATION': request.session['HTTP_AUTHORIZATION']})
return document.execute(
root_value=self.get_root_value(request),
variable_values=variables,
@@ -338,3 +384,35 @@ class GraphQLView(View):
meta = request.META
content_type = meta.get("CONTENT_TYPE", meta.get("HTTP_CONTENT_TYPE", ""))
return content_type.split(";", 1)[0].lower()
+
+def _get_auth_header(iQLView, request, graphiql_arguments):
+ # If this is a POST request then process the Form data
+ if request.method == 'POST':
+
+ # Create a form instance and populate it with data from the request (binding):
+ form = HeaderForm(request.POST)
+
+ # Check if the form is valid:
+ if form.is_valid():
+ # process the data in form.cleaned_data as required (here we just write it to the model due_back field)
+ auth_header = form.cleaned_data['headers']
+
+ # return extra stuff to put in META tag for graphiql:
+ request.session['HTTP_AUTHORIZATION'] = auth_header
+ request.session['use_graphiql'] = True
+ request.session.save()
+ graphiql_arguments.update({'auth_header': auth_header})
+ return iQLView.render_graphiql(
+ request,
+ graphiql_arguments,
+ )
+
+ # If this is a GET (or any other method) create the default form.
+ else:
+ form = HeaderForm()
+
+ context = {
+ 'form': form,
+ }
+
+ return render(request, 'graphene/header_jwt_auth.html', context)