diff --git a/.dockerignore b/.dockerignore index aec92e5..e69de29 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +0,0 @@ -cmd/agent-ui/output -cmd/agent-ui/bind_* diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 300f1b2..e519dfc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -66,8 +66,6 @@ jobs: echo "::set-output name=format_ok::1" fi - cd cmd/agent-ui && ./placeholders.sh && cd ../.. - echo "Starting vault" vault server -dev & echo $! > $HOME/vault.pid echo "Waiting vault settle" & sleep 2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2b2088e..88555a7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -60,8 +60,6 @@ jobs: echo "::set-output name=format_ok::1" fi - cd cmd/agent-ui && ./placeholders.sh && cd ../.. - echo "Starting vault" vault server -dev & echo $! > $HOME/vault.pid echo "Waiting vault settle" & sleep 2 @@ -123,9 +121,6 @@ jobs: run: | export COMMIT=${GITHUB_SHA::8} export GO111MODULE=on - cd cmd/agent-ui - "./placeholders.sh" - cd ../.. echo "Calling travis-binary-build.sh" "./scripts/travis-binary-build.sh" echo "Done" diff --git a/.travis.yml b/.travis.yml index 15a9908..019f974 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,10 +9,6 @@ go: - 1.13.x git: depth: 1 -before_install: -- cd cmd/agent-ui -- "./placeholders.sh" -- cd ../.. script: - echo "Calling travis-binary-build.sh" - "./scripts/travis-binary-build.sh" diff --git a/README.md b/README.md index 793386a..ddeade7 100644 --- a/README.md +++ b/README.md @@ -69,17 +69,7 @@ These are the Environment Variables that you can set to manage the webserver: * `RequestIDHeader` => Header field to get request ID * `LOG_FORMAT` => Change log format (default is pipe delimited, provide the value `json` to log in JSON format) -Agent UI Development -==================== +Where is AgentUI?? +================== -The graphql-playground fork for AgentUI is hosted at [https://github.com/quan-to/graphql-playground](https://github.com/quan-to/graphql-playground) - -Top update agent-ui playground: - -1. Clone Repository https://github.com/quan-to/graphql-playground -2. `yarn` -3. Edit the package `packages/graphql-playground-react` -4. `yarn build` -5. Copy `build/*` to `cmd/agent-ui/resources/app/` -6. Change `/static/` to `./static/` in `cmd/agent-ui/resources/app/index.html` -7. Run `astilectron-bundler` in `cmd/agent-ui` +Agent-UI project has been moved to a separated repository. Check [https://github.com/quan-to/agent-ui](https://github.com/quan-to/agent-ui) \ No newline at end of file diff --git a/cmd/agent-ui/.gitignore b/cmd/agent-ui/.gitignore deleted file mode 100644 index b7d7b2d..0000000 --- a/cmd/agent-ui/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -output -store -bind_*.go -keys diff --git a/cmd/agent-ui/agentui.go b/cmd/agent-ui/agentui.go deleted file mode 100644 index 91c1ed1..0000000 --- a/cmd/agent-ui/agentui.go +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "flag" - "github.com/asticode/go-astilectron" - "github.com/quan-to/chevron/internal/tools" - "github.com/quan-to/slog" -) - -// Vars -var ( - AppName string - BuiltAt string - debug = flag.Bool("d", false, "enables the debug mode") - w *astilectron.Window - log = slog.Scope("AgentUI").Tag(tools.DefaultTag) -) - -func main() { - // Init - flag.Parse() - slog.SetDebug(*debug) - - Migrate() - - // Run bootstrap - log.Debug("Running app built at %s", BuiltAt) - Begin() - Run() -} diff --git a/cmd/agent-ui/bind.go b/cmd/agent-ui/bind.go deleted file mode 100644 index b72874d..0000000 --- a/cmd/agent-ui/bind.go +++ /dev/null @@ -1,18 +0,0 @@ -// +build !linux,amd64 -// +build !darwin,amd64 -// +build !windows,amd64 - -// Placeholder file for assets binding -package main - -func Asset(name string) ([]byte, error) { - return []byte{}, nil -} - -func AssetDir(name string) ([]string, error) { - return []string{}, nil -} - -func RestoreAssets(dir, name string) error { - return nil -} diff --git a/cmd/agent-ui/bundleit.sh b/cmd/agent-ui/bundleit.sh deleted file mode 100755 index f535ba4..0000000 --- a/cmd/agent-ui/bundleit.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -cat << EOF > bind.go -// +build !linux,amd64 -// +build !darwin,amd64 -// +build !windows,amd64 - -// Placeholder file for assets binding -package main - -func Asset(name string) ([]byte, error) { - return []byte{}, nil -} - -func AssetDir(name string) ([]string, error) { - return []string{}, nil -} - -func RestoreAssets(dir, name string) error { - return nil -} -EOF - -astilectron-bundler -d -w -l diff --git a/cmd/agent-ui/bundler.json b/cmd/agent-ui/bundler.json deleted file mode 100644 index 37bb517..0000000 --- a/cmd/agent-ui/bundler.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "app_name": "AgentUI", - "icon_path_darwin": "resources/icon.icns", - "icon_path_linux": "resources/icon.png", - "icon_path_windows": "resources/icon.ico", - "environments": [ - {"arch": "amd64", "os": "darwin"}, - {"arch": "amd64", "os": "linux"}, - {"arch": "amd64", "os": "windows"} - ], - "version_electron": "7.1.10", - "version_astilectron": "0.37.0" -} diff --git a/cmd/agent-ui/handleMessages.go b/cmd/agent-ui/handleMessages.go deleted file mode 100644 index 57d97ec..0000000 --- a/cmd/agent-ui/handleMessages.go +++ /dev/null @@ -1,133 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "github.com/asticode/go-astilectron" - "github.com/asticode/go-astilectron-bootstrap" - "github.com/quan-to/slog" - "strings" -) - -const ( - messageError = "error" - messageLog = "log" - messageSign = "sign" - messageEncrypt = "encrypt" - messageDecrypt = "decrypt" - messageAddPrivateKey = "addPrivateKey" - messageUnlockKey = "unlockKey" - messageListPrivateKeys = "listKeys" - messageLoadPrivateKey = "loadPrivateKey" - messageLoadPrivateKeyResult = "loadPrivateKeyResult" -) - -var electronLog = slog.Scope("Electron") - -// handleMessages handles messages -func handleMessages(_ *astilectron.Window, m bootstrap.MessageIn) (payload interface{}, err error) { - log.DebugNote("Received message %s", m.Name) - switch m.Name { - case messageLoadPrivateKey: - var paths []string - if err = json.Unmarshal(m.Payload, &paths); err != nil { - payload = err.Error() - return - } - log.Info("Loading keys from %s", strings.Join(paths, ", ")) - hasErrors, errs := AddKeys(paths) - if hasErrors { - for i, v := range errs { - if v != "" { - log.Error("Error processing key %d (%s): %s", i, paths[i], v) - } - } - _ = w.SendMessage(bootstrap.MessageOut{ - Name: messageError, - Payload: errs, - }) - return errs, fmt.Errorf("one or more keys cannot be loaded") - } - _ = w.SendMessage(bootstrap.MessageOut{ - Name: messageLoadPrivateKeyResult, - Payload: "OK", - }) - return "OK", nil - case messageListPrivateKeys: - return ListPrivateKeys() - case messageSign: - var p map[string]interface{} - if err = json.Unmarshal(m.Payload, &p); err != nil { - payload = err.Error() - return - } - - fingerPrint := p["fingerPrint"] - data := p["data"] - - if fingerPrint == nil || data == nil { - err = fmt.Errorf("fingerPrint or data missing") - return - } - - return Sign(fingerPrint.(string), data.(string)) - case messageEncrypt: - return nil, fmt.Errorf("not implemented") - case messageDecrypt: - return nil, fmt.Errorf("not implemented") - case messageAddPrivateKey: - key := string(m.Payload) - return AddPrivateKey(key) - case messageUnlockKey: - var p map[string]interface{} - if err = json.Unmarshal(m.Payload, &p); err != nil { - payload = err.Error() - return - } - - fingerPrint := p["fingerPrint"] - password := p["password"] - - if fingerPrint == nil || password == nil { - err = fmt.Errorf("fingerPrint or password missing") - return - } - - return UnlockKey(fingerPrint.(string), password.(string)) - case messageLog: - var arguments map[int]interface{} - if err = json.Unmarshal(m.Payload, &arguments); err != nil { - payload = err.Error() - return - } - args := make([]interface{}, len(arguments)) - fStr := "" - - i := 0 - for _, v := range arguments { - args[i] = v - switch v.(type) { - case string: - fStr += "%s " - case int: - fStr += "%d " - case float32: - fStr += "%f " - case float64: - fStr += "%f " - case map[string]interface{}: - newV, _ := json.Marshal(v) - args[i] = string(newV) - fStr += "%s" - default: - fStr += "%+v" - } - fStr += " " - i++ - } - electronLog.Info(fStr, args...) - default: - log.Error("Unknown Message: %+v", m) - } - return -} diff --git a/cmd/agent-ui/localResources.go b/cmd/agent-ui/localResources.go deleted file mode 100644 index 44beb92..0000000 --- a/cmd/agent-ui/localResources.go +++ /dev/null @@ -1,195 +0,0 @@ -package main - -import ( - "context" - "crypto" - "fmt" - "github.com/quan-to/chevron/pkg/chevronlib" - "github.com/quan-to/chevron/pkg/interfaces" - "github.com/quan-to/chevron/pkg/models" - "io/ioutil" - "net/http" - "os" - "path" - "path/filepath" - "strings" -) - -const ( - MaxFileSize = 2 * 1024 * 1024 // 1MB -) - -var ( - pgp interfaces.PGPManager - krm interfaces.KeyRingManager - executableFolder string - keysFolder string -) - -var ctx = context.Background() - -func init() { - ex, _ := os.Executable() - executableFolder = filepath.Dir(ex) - keysFolder = path.Join(executableFolder, "keys") -} - -func Begin() { - _ = os.Mkdir(keysFolder, os.ModePerm) - kb := chevronlib.MakeSaveToDiskBackend(nil, keysFolder, "key_") - krm = chevronlib.MakeKeyRingManager(nil) - pgp = chevronlib.MakePGPManager(nil, kb, krm) - pgp.LoadKeys(ctx) -} - -func AddPrivateKey(privateKeyData string) (string, error) { - n, err := pgp.LoadKey(ctx, privateKeyData) - if err != nil { - return err.Error(), err - } - - return fmt.Sprintf("Loaded %d keys", n), nil -} - -func UnlockKey(fingerPrint, password string) (string, error) { - err := pgp.UnlockKey(ctx, fingerPrint, password) - if err != nil { - log.Error("Error unlocking key %s: %s", fingerPrint, err) - return err.Error(), err - } - - return fmt.Sprintf("Key %s unlocked!", fingerPrint), nil -} - -func Sign(fingerPrint, data string) (string, error) { - key := pgp.GetPrivateKeyInfo(ctx, fingerPrint) - - if key == nil { - err := fmt.Errorf("key not found") - return err.Error(), err - } - - if !key.PrivateKeyIsDecrypted { - err := fmt.Errorf("key is not decrypted") - return err.Error(), err - } - - signature, err := pgp.SignData(ctx, fingerPrint, []byte(data), crypto.SHA512) - if err != nil { - return err.Error(), err - } - quantoSig := chevronlib.GPG2Quanto(signature, fingerPrint, "SHA512") - return quantoSig, nil -} - -func ListPrivateKeys() ([]models.KeyInfo, error) { - return pgp.GetLoadedPrivateKeys(ctx), nil -} - -func IsFile(name string) bool { - fi, err := os.Stat(name) - if err != nil { - return false - } - - return fi.Mode().IsRegular() -} - -func FileSize(name string) int64 { - fi, err := os.Stat(name) - if err != nil { - return 0 - } - - return fi.Size() -} - -func GetFileContentType(name string) string { - f, err := os.Open(name) - if err != nil { - panic(err) - } - defer f.Close() - - // Only the first 512 bytes are used to sniff the content type. - buffer := make([]byte, 512) - - _, err = f.Read(buffer) - if err != nil { - return "error reading file" - } - - // Use the net/http package's handy DectectContentType function. Always returns a valid - // content-type by returning "application/octet-stream" if no others seemed to match. - contentType := http.DetectContentType(buffer) - - return contentType -} - -func AddKeys(files []string) (bool, []string) { - errors := make([]string, len(files)) - hasErrors := false - - for i, file := range files { - if !IsFile(file) { - errors[i] = fmt.Sprintf("%s is not a regular file", file) - hasErrors = true - continue - } - - fileType := GetFileContentType(file) - if !strings.Contains(fileType, "text/plain") { - errors[i] = fmt.Sprintf("invalid file type: %s", fileType) - hasErrors = true - continue - } - - size := FileSize(file) - if size > MaxFileSize { - errors[i] = fmt.Sprintf("file size too big: %d", size) - hasErrors = true - continue - } - - data, err := ioutil.ReadFile(file) - if err != nil { - errors[i] = err.Error() - hasErrors = true - continue - } - - fingerPrint, err := chevronlib.GetFingerprintFromKey(string(data)) - if err != nil { - errors[i] = err.Error() - continue - } - - log.Info("Saving key %s from %s", fingerPrint, file) - err = pgp.SaveKey(fingerPrint, string(data), nil) - if err != nil { - errors[i] = err.Error() - hasErrors = true - continue - } - - pgp.LoadKeys(ctx) - } - - return hasErrors, errors -} - -func Migrate() { - storeFolder := path.Join(executableFolder, "store") - if chevronlib.FolderExists(storeFolder) { // Old key store - log.Warn("Found \"store\" folder. Migrating keys...") - err := chevronlib.CopyFiles(storeFolder, keysFolder) - if err != nil { - log.Error("Error moving files from store to keys: %s", err) - } else { - err = os.RemoveAll(storeFolder) - if err != nil { - log.Error("Error removing folder store: %s", err) - } - } - } -} diff --git a/cmd/agent-ui/placeholders.sh b/cmd/agent-ui/placeholders.sh deleted file mode 100755 index 2c4ffe1..0000000 --- a/cmd/agent-ui/placeholders.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env bash - -cat << EOF > bind_darwin_amd64.go -// +build darwin,amd64 - -// Placeholder file for assets binding -package main - -func Asset(name string) ([]byte, error) { - return []byte{}, nil -} - -func AssetDir(name string) ([]string, error) { - return []string{}, nil -} - -func RestoreAssets(dir, name string) error { - return nil -} -EOF -cat << EOF > bind_linux_amd64.go -// +build linux,amd64 - -// Placeholder file for assets binding -package main - -func Asset(name string) ([]byte, error) { - return []byte{}, nil -} - -func AssetDir(name string) ([]string, error) { - return []string{}, nil -} - -func RestoreAssets(dir, name string) error { - return nil -} -EOF -cat << EOF > bind_windows_amd64.go -// +build windows,amd64 - -// Placeholder file for assets binding -package main - -func Asset(name string) ([]byte, error) { - return []byte{}, nil -} - -func AssetDir(name string) ([]string, error) { - return []string{}, nil -} - -func RestoreAssets(dir, name string) error { - return nil -} -EOF diff --git a/cmd/agent-ui/resources/.gitignore b/cmd/agent-ui/resources/.gitignore deleted file mode 100644 index ababb72..0000000 --- a/cmd/agent-ui/resources/.gitignore +++ /dev/null @@ -1 +0,0 @@ -multires diff --git a/cmd/agent-ui/resources/AgentUI.svg b/cmd/agent-ui/resources/AgentUI.svg deleted file mode 100644 index 3aeca78..0000000 --- a/cmd/agent-ui/resources/AgentUI.svg +++ /dev/null @@ -1,1060 +0,0 @@ - - - - \ No newline at end of file diff --git a/cmd/agent-ui/resources/app/_headers b/cmd/agent-ui/resources/app/_headers deleted file mode 100755 index 6834fee..0000000 --- a/cmd/agent-ui/resources/app/_headers +++ /dev/null @@ -1,3 +0,0 @@ -/*.graphql - Content-Type: text/plain - Access-Control-Allow-Origin: * diff --git a/cmd/agent-ui/resources/app/_redirects b/cmd/agent-ui/resources/app/_redirects deleted file mode 100755 index c127d66..0000000 --- a/cmd/agent-ui/resources/app/_redirects +++ /dev/null @@ -1,2 +0,0 @@ -# general fallback -/* /index.html 200 diff --git a/cmd/agent-ui/resources/app/asset-manifest.json b/cmd/agent-ui/resources/app/asset-manifest.json deleted file mode 100644 index 8555e47..0000000 --- a/cmd/agent-ui/resources/app/asset-manifest.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "index.css": "static/css/index.css", - "index.css.map": "static/css/index.css.map", - "index.js": "static/js/index.js", - "index.js.map": "static/js/index.js.map", - "middleware.css": "static/css/middleware.css", - "middleware.css.map": "static/css/middleware.css.map", - "middleware.js": "static/js/middleware.js", - "middleware.js.map": "static/js/middleware.js.map", - "static/media/GraphQLLanguageService.js.flow": "static/media/GraphQLLanguageService.js.fa07138d.flow", - "static/media/autocompleteUtils.js.flow": "static/media/autocompleteUtils.js.4ce7ba19.flow", - "static/media/getAutocompleteSuggestions.js.flow": "static/media/getAutocompleteSuggestions.js.5f735c7b.flow", - "static/media/getDefinition.js.flow": "static/media/getDefinition.js.0c48668e.flow", - "static/media/getDiagnostics.js.flow": "static/media/getDiagnostics.js.889c0b27.flow", - "static/media/getOutline.js.flow": "static/media/getOutline.js.458a3518.flow", - "static/media/index.js.flow": "static/media/index.js.641230f5.flow", - "static/media/logo.png": "static/media/logo.57ee3b60.png" -} \ No newline at end of file diff --git a/cmd/agent-ui/resources/app/index.html b/cmd/agent-ui/resources/app/index.html deleted file mode 100644 index db054fe..0000000 --- a/cmd/agent-ui/resources/app/index.html +++ /dev/null @@ -1,15 +0,0 @@ -QRS Web
Loading QRS Web
\ No newline at end of file diff --git a/cmd/agent-ui/resources/app/logo-64.png b/cmd/agent-ui/resources/app/logo-64.png deleted file mode 100644 index ee4360b..0000000 Binary files a/cmd/agent-ui/resources/app/logo-64.png and /dev/null differ diff --git a/cmd/agent-ui/resources/app/logo.png b/cmd/agent-ui/resources/app/logo.png deleted file mode 100644 index 246006d..0000000 Binary files a/cmd/agent-ui/resources/app/logo.png and /dev/null differ diff --git a/cmd/agent-ui/resources/app/middleware.html b/cmd/agent-ui/resources/app/middleware.html deleted file mode 100644 index 671efbb..0000000 --- a/cmd/agent-ui/resources/app/middleware.html +++ /dev/null @@ -1,15 +0,0 @@ -QRS Web
Loading QRS Web
\ No newline at end of file diff --git a/cmd/agent-ui/resources/app/static/css/index.css b/cmd/agent-ui/resources/app/static/css/index.css deleted file mode 100644 index 9de585f..0000000 --- a/cmd/agent-ui/resources/app/static/css/index.css +++ /dev/null @@ -1,2 +0,0 @@ -body{margin:0;padding:0;font-family:sans-serif;overflow:hidden}#root{height:100%}body{font-family:Open Sans,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:rgba(0,0,0,.8);line-height:1.5;height:100vh;letter-spacing:.53px;margin-right:-1px!important}a,body,code,h1,h2,h3,h4,html,p,pre,ul{margin:0;padding:0;color:inherit}a:active,a:focus,button:focus,input:focus{outline:none}button,input,submit{border:none}button,input,pre{font-family:Open Sans,sans-serif}code{font-family:Consolas,monospace} -/*# sourceMappingURL=index.css.map*/ \ No newline at end of file diff --git a/cmd/agent-ui/resources/app/static/css/index.css.map b/cmd/agent-ui/resources/app/static/css/index.css.map deleted file mode 100644 index f3ef408..0000000 --- a/cmd/agent-ui/resources/app/static/css/index.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["index.css"],"names":[],"mappings":"AAAA,KACE,SACA,UACA,uBACA,eAAiB,CAGnB,MACE,WAAa,CAGf,KACE,iCACA,mCACA,kCACA,qBACA,gBACA,aACA,qBACA,2BAA8B,CAGhC,sCACE,SACA,UACA,aAAe,CAGjB,0CACE,YAAc,CAGhB,oBACE,WAAa,CAGf,iBACE,gCAAqC,CAGvC,KACE,8BAAiC","file":"static/css/index.css","sourcesContent":["body {\n margin: 0;\n padding: 0;\n font-family: sans-serif;\n overflow: hidden;\n}\n\n#root {\n height: 100%;\n}\n\nbody {\n font-family: 'Open Sans', sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n color: rgba(0,0,0,.8);\n line-height: 1.5;\n height: 100vh;\n letter-spacing: 0.53px;\n margin-right: -1px !important;\n}\n\nhtml, body, p, a, h1, h2, h3, h4, ul, pre, code {\n margin: 0;\n padding: 0;\n color: inherit;\n}\n\na:active, a:focus, button:focus, input:focus {\n outline: none;\n}\n\ninput, button, submit {\n border: none;\n}\n\ninput, button, pre {\n font-family: 'Open Sans', sans-serif;\n}\n\ncode {\n font-family: Consolas, monospace;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.css"],"sourceRoot":""} \ No newline at end of file diff --git a/cmd/agent-ui/resources/app/static/css/middleware.css b/cmd/agent-ui/resources/app/static/css/middleware.css deleted file mode 100644 index 55e1d65..0000000 --- a/cmd/agent-ui/resources/app/static/css/middleware.css +++ /dev/null @@ -1,2 +0,0 @@ -body{margin:0;padding:0;font-family:sans-serif;overflow:hidden}#root{height:100%}body{font-family:Open Sans,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:rgba(0,0,0,.8);line-height:1.5;height:100vh;letter-spacing:.53px;margin-right:-1px!important}a,body,code,h1,h2,h3,h4,html,p,pre,ul{margin:0;padding:0;color:inherit}a:active,a:focus,button:focus,input:focus{outline:none}button,input,submit{border:none}button,input,pre{font-family:Open Sans,sans-serif}code{font-family:Consolas,monospace} -/*# sourceMappingURL=middleware.css.map*/ \ No newline at end of file diff --git a/cmd/agent-ui/resources/app/static/css/middleware.css.map b/cmd/agent-ui/resources/app/static/css/middleware.css.map deleted file mode 100644 index b47427b..0000000 --- a/cmd/agent-ui/resources/app/static/css/middleware.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["index.css"],"names":[],"mappings":"AAAA,KACE,SACA,UACA,uBACA,eAAiB,CAGnB,MACE,WAAa,CAGf,KACE,iCACA,mCACA,kCACA,qBACA,gBACA,aACA,qBACA,2BAA8B,CAGhC,sCACE,SACA,UACA,aAAe,CAGjB,0CACE,YAAc,CAGhB,oBACE,WAAa,CAGf,iBACE,gCAAqC,CAGvC,KACE,8BAAiC","file":"static/css/middleware.css","sourcesContent":["body {\n margin: 0;\n padding: 0;\n font-family: sans-serif;\n overflow: hidden;\n}\n\n#root {\n height: 100%;\n}\n\nbody {\n font-family: 'Open Sans', sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n color: rgba(0,0,0,.8);\n line-height: 1.5;\n height: 100vh;\n letter-spacing: 0.53px;\n margin-right: -1px !important;\n}\n\nhtml, body, p, a, h1, h2, h3, h4, ul, pre, code {\n margin: 0;\n padding: 0;\n color: inherit;\n}\n\na:active, a:focus, button:focus, input:focus {\n outline: none;\n}\n\ninput, button, submit {\n border: none;\n}\n\ninput, button, pre {\n font-family: 'Open Sans', sans-serif;\n}\n\ncode {\n font-family: Consolas, monospace;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.css"],"sourceRoot":""} \ No newline at end of file diff --git a/cmd/agent-ui/resources/app/static/js/index.js b/cmd/agent-ui/resources/app/static/js/index.js deleted file mode 100644 index b1db2a4..0000000 --- a/cmd/agent-ui/resources/app/static/js/index.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=768)}([function(e,t,n){"use strict";e.exports=n(316)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(86));var r=n(86);t.styled=r.default},function(e,t,n){!function(t,n){e.exports=n()}(0,function(){"use strict";function e(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function t(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function n(e,n){return t(e).appendChild(n)}function r(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}function f(e,t){for(var n=0;n=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}function h(e){for(;Qa.length<=e;)Qa.push(m(Qa)+" ");return Qa[e]}function m(e){return e[e.length-1]}function g(e,t){for(var n=[],r=0;r"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Ka.test(e))}function E(e,t){return t?!!(t.source.indexOf("\\w")>-1&&x(e))||t.test(e):x(e)}function C(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function D(e){return e.charCodeAt(0)>=768&&Ja.test(e)}function w(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function k(e,t,n){var o=this;this.input=n,o.scrollbarFiller=r("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=r("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=i("div",null,"CodeMirror-code"),o.selectionDiv=r("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=r("div",null,"CodeMirror-cursors"),o.measure=r("div",null,"CodeMirror-measure"),o.lineMeasure=r("div",null,"CodeMirror-measure"),o.lineSpace=i("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var a=i("div",[o.lineSpace],"CodeMirror-lines");o.mover=r("div",[a],null,"position: relative"),o.sizer=r("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=r("div",null,null,"position: absolute; height: "+Ga+"px; width: 1px;"),o.gutters=r("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=r("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=r("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),ba&&xa<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),Ea||ma&&Oa||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,n.init(o)}function _(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?L(n,_(e,n).text.length):G(t,_(e,t.line).text.length)}function G(e,t){var n=e.ch;return null==n||n>t?L(e.line,t):n<0?L(e.line,0):e}function q(e,t){for(var n=[],r=0;r=t:o.to>t);(r||(r=[])).push(new W(a,o.from,u?null:o.to))}}return r}function X(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t);if(s||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var u=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var E=0;E0)){var l=[u,1],p=M(c.from,s.from),d=M(c.to,s.to);(p<0||!a.inclusiveLeft&&!p)&&l.push({from:c.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&l.push({from:s.to,to:c.to}),i.splice.apply(i,l),u+=l.length-3}}return i}function ne(e){var t=e.markedSpans;if(t){for(var n=0;nt)&&(!n||ae(n,o.marker)<0)&&(n=o.marker)}return n}function pe(e,t,n,r,i){var o=_(e,t),a=Xa&&o.markedSpans;if(a)for(var s=0;s=0&&p<=0||l<=0&&p>=0)&&(l<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?M(c.to,n)>=0:M(c.to,n)>0)||l>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?M(c.from,r)<=0:M(c.from,r)<0)))return!0}}}function fe(e){for(var t;t=ue(e);)e=t.find(-1,!0).line;return e}function de(e){for(var t;t=ce(e);)e=t.find(1,!0).line;return e}function he(e){for(var t,n;t=ce(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function me(e,t){var n=_(e,t),r=fe(n);return n==r?t:F(r)}function ge(e,t){if(t>e.lastLine())return t;var n,r=_(e,t);if(!ye(e,r))return t;for(;n=ce(r);)r=n.find(1,!0).line;return F(r)+1}function ye(e,t){var n=Xa&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function Ce(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;ot||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}function De(e,t,n){var r;Za=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:Za=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:Za=i)}return null!=r?r:Za}function we(e,t){var n=e.order;return null==n&&(n=e.order=es(e.text,t)),n}function Se(e,t){return e._handlers&&e._handlers[t]||ts}function ke(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=f(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function _e(e,t){var n=Se(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function Fe(e){e.prototype.on=function(e,t){ns(this,e,t)},e.prototype.off=function(e,t){ke(this,e,t)}}function Ne(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ie(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Pe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Le(e){Ne(e),Ie(e)}function Me(e){return e.target||e.srcElement}function je(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),Fa&&e.ctrlKey&&1==t&&(t=3),t}function Re(e){if(null==Ua){var t=r("span","\u200b");n(e,r("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ua=t.offsetWidth<=1&&t.offsetHeight>2&&!(ba&&xa<8))}var i=Ua?r("span","\u200b"):r("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Be(e){if(null!=za)return za;var r=n(e,document.createTextNode("A\u062eA")),i=La(r,0,1).getBoundingClientRect(),o=La(r,1,2).getBoundingClientRect();return t(e),!(!i||i.left==i.right)&&(za=o.right-i.right<3)}function $e(e){if(null!=ss)return ss;var t=n(e,r("span","x")),i=t.getBoundingClientRect(),o=La(t,0,1).getBoundingClientRect();return ss=Math.abs(i.left-o.left)>1}function Ue(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),us[e]=t}function ze(e,t){cs[e]=t}function Ge(e){if("string"==typeof e&&cs.hasOwnProperty(e))e=cs[e];else if(e&&"string"==typeof e.name&&cs.hasOwnProperty(e.name)){var t=cs[e.name];"string"==typeof t&&(t={name:t}),e=b(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ge("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ge("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function qe(e,t){t=Ge(t);var n=us[t.name];if(!n)return qe(e,"text/plain");var r=n(e,t);if(ls.hasOwnProperty(t.name)){var i=ls[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}function Ve(e,t){l(t,ls.hasOwnProperty(e)?ls[e]:ls[e]={})}function He(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function We(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Qe(e,t,n){return!e.startState||e.startState(t,n)}function Ke(e,t,n,r){var i=[e.state.modeGen],o={};rt(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},o,r);for(var a=n.state,s=0;se&&i.splice(u,1,e,i[u+1],r),u+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,u-n,e,"overlay "+t),u=n+2;else for(;ne.options.maxHighlightLength&&He(e.doc.mode,r.state),o=Ke(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Ye(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ds(r,!0,t);var o=it(e,t,n),a=o>r.first&&_(r,o-1).stateAfter,s=a?ds.fromSaved(r,a,o):new ds(r,Qe(r.mode),o);return r.iter(o,t,function(n){Xe(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function tt(e,t,n,r){var i,o=e.doc,a=o.mode;t=z(o,t);var s,u=_(o,t.line),c=Ye(e,t.line,n),l=new ps(u.text,e.options.tabSize,c);for(r&&(s=[]);(r||l.pose.options.maxHighlightLength?(s=!1,a&&Xe(e,t,r,p.pos),p.pos=t.length,u=null):u=nt(et(n,p,r.state,f),o),f){var d=f[0].name;d&&(u="m-"+(u?d+" "+u:d))}if(!s||l!=u){for(;ca;--s){if(s<=o.first)return o.first;var u=_(o,s-1),c=u.stateAfter;if(c&&(!n||s+(c instanceof fs?c.lookAhead:0)<=o.modeFrontier))return s;var l=p(u.text,null,e.options.tabSize);(null==i||r>l)&&(i=s-1,r=l)}return i}function ot(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=_(e,r).stateAfter;if(i&&(!(i instanceof fs)||r+i.lookAhead1&&!/ /.test(e))return e;for(var n=t,r="",i=0;ic&&p.from<=c));f++);if(p.to>=l)return e(n,r,i,o,a,s,u);e(n,r.slice(0,p.to-c),i,o,null,s,u),o=null,r=r.slice(p.to-c),c=p.to}}}function ht(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function mt(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,u,c,l,p,f,d=i.length,h=0,m=1,g="",y=0;;){if(y==h){u=c=l=p=s="",f=null,y=1/0;for(var v=[],b=void 0,x=0;xh||C.collapsed&&E.to==h&&E.from==h)?(null!=E.to&&E.to!=h&&y>E.to&&(y=E.to,c=""),C.className&&(u+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&E.from==h&&(l+=" "+C.startStyle),C.endStyle&&E.to==y&&(b||(b=[])).push(C.endStyle,E.to),C.title&&!p&&(p=C.title),C.collapsed&&(!f||ae(f.marker,C)<0)&&(f=E)):E.from>h&&y>E.from&&(y=E.from)}if(b)for(var D=0;D=d)break;for(var S=Math.min(d,y);;){if(g){var k=h+g.length;if(!f){var _=k>S?g.slice(0,S-h):g;t.addToken(t,_,a?a+u:u,l,h+_.length==y?c:"",p,s)}if(k>=S){g=g.slice(S-h),h=S;break}h=k,l=""}g=i.slice(o,o=n[m++]),a=ut(n[m++],t.cm.options)}}else for(var A=1;A2&&o.push((u.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function qt(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Vt(e,t){t=fe(t);var r=F(t),i=e.display.externalMeasured=new gt(e.doc,t,r);i.lineN=r;var o=i.built=ct(e,i);return i.text=o.pre,n(e.display.lineMeasure,o.pre),i}function Ht(e,t,n,r){return Kt(e,Qt(e,t),n,r)}function Wt(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(o=u-s,i=o-1,t>=u&&(a="right")),null!=i){if(r=e[c+2],s==u&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&i==u-s)for(;c=0&&(n=e[i]).left==n.right;i--);return n}function Xt(e,t,n,r){var i,o=Jt(t.map,n,r),a=o.node,s=o.start,u=o.end,c=o.collapse;if(3==a.nodeType){for(var l=0;l<4;l++){for(;s&&D(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+u0&&(c=r="right");var p;i=e.options.lineWrapping&&(p=a.getClientRects()).length>1?p["right"==r?p.length-1:0]:a.getBoundingClientRect()}if(ba&&xa<9&&!s&&(!i||!i.left&&!i.right)){var f=a.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+En(e.display),top:f.top,bottom:f.bottom}:Es}for(var d=i.top-t.rect.top,h=i.bottom-t.rect.top,m=(d+h)/2,g=t.view.measure.heights,y=0;y=r.text.length?(c=r.text.length,l="before"):c<=0&&(c=0,l="after"),!u)return a("before"==l?c-1:c,"before"==l);var p=De(u,c,l),f=Za,d=s(c,p,"before"==l);return null!=f&&(d.other=s(c,f,"before"!=l)),d}function pn(e,t){var n=0;t=z(e.doc,t),e.options.lineWrapping||(n=En(e.display)*t.ch);var r=_(e.doc,t.line),i=be(r)+jt(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function fn(e,t,n,r,i){var o=L(e,t,n);return o.xRel=i,r&&(o.outside=!0),o}function dn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return fn(r.first,0,null,!0,-1);var i=N(r,n),o=r.first+r.size-1;if(i>o)return fn(r.first+r.size-1,_(r,o).text.length,null,!0,1);t<0&&(t=0);for(var a=_(r,i);;){var s=yn(e,a,i,t,n),u=le(a,s.ch+(s.xRel>0?1:0));if(!u)return s;var c=u.find(1);if(c.line==i)return c;a=_(r,i=c.line)}}function hn(e,t,n,r){r-=an(t);var i=t.text.length,o=S(function(t){return Kt(e,n,t-1).bottom<=r},i,0);return i=S(function(t){return Kt(e,n,t).top>r},o,i),{begin:o,end:i}}function mn(e,t,n,r){return n||(n=Qt(e,t)),hn(e,t,n,sn(e,t,Kt(e,n,r),"line").top)}function gn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function yn(e,t,n,r,i){i-=be(t);var o=Qt(e,t),a=an(t),s=0,u=t.text.length,c=!0,l=we(t,e.doc.direction);if(l){var p=(e.options.lineWrapping?bn:vn)(e,t,n,o,l,r,i);c=1!=p.level,s=c?p.from:p.to-1,u=c?p.to:p.from-1}var f,d,h=null,m=null,g=S(function(t){var n=Kt(e,o,t);return n.top+=a,n.bottom+=a,!!gn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(h=t,m=n),!0)},s,u),y=!1;if(m){var v=r-m.left=x.bottom}return g=w(t.text,g,1),fn(n,g,d,y,r-f)}function vn(e,t,n,r,i,o,a){var s=S(function(s){var u=i[s],c=1!=u.level;return gn(ln(e,L(n,c?u.to:u.from,c?"before":"after"),"line",t,r),o,a,!0)},0,i.length-1),u=i[s];if(s>0){var c=1!=u.level,l=ln(e,L(n,c?u.from:u.to,c?"after":"before"),"line",t,r);gn(l,o,a,!0)&&l.top>a&&(u=i[s-1])}return u}function bn(e,t,n,r,i,o,a){var s=hn(e,t,r,a),u=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var l=null,p=null,f=0;f=c||d.to<=u)){var h=1!=d.level,m=Kt(e,r,h?Math.min(c,d.to)-1:Math.max(u,d.from)).right,g=mg)&&(l=d,p=g)}}return l||(l=i[i.length-1]),l.fromc&&(l={from:l.from,to:c,level:l.level}),l}function xn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==gs){gs=r("pre");for(var i=0;i<49;++i)gs.appendChild(document.createTextNode("x")),gs.appendChild(r("br"));gs.appendChild(document.createTextNode("x"))}n(e.measure,gs);var o=gs.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),t(e.measure),o||1}function En(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=r("span","xxxxxxxxxx"),i=r("pre",[t]);n(e.measure,i);var o=t.getBoundingClientRect(),a=(o.right-o.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function Cn(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a)n[e.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,r[e.options.gutters[a]]=o.clientWidth;return{fixedPos:Dn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Dn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function wn(e){var t=xn(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/En(e.display)-3);return function(i){if(ye(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r=e.display.viewTo||s.to().line0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Pn(e){e.state.focused||(e.display.input.focus(),Mn(e))}function Ln(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,jn(e))},100)}function Mn(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(_e(e,"focus",e,t),e.state.focused=!0,s(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),Ea&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),In(e))}function jn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(_e(e,"blur",e,t),e.state.focused=!1,Ra(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Rn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||u<-.005)&&(O(i.line,o),Bn(i.line),i.rest))for(var c=0;c=a&&(o=N(t,be(_(t,u))-e.wrapper.clientHeight),a=u)}return{from:o,to:Math.max(a,o+1)}}function Un(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Dn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!_a){var a=r("div","\u200b",null,"position: absolute;\n top: "+(t.top-n.viewOffset-jt(e.display))+"px;\n height: "+(t.bottom-t.top+$t(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(o),e.display.lineSpace.removeChild(a)}}}function qn(e,t,n,r){null==r&&(r=0);var i;e.options.lineWrapping||t!=n||(t=t.ch?L(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t,n="before"==t.sticky?L(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=ln(e,t),u=n&&n!=t?ln(e,n):s;i={left:Math.min(s.left,u.left),top:Math.min(s.top,u.top)-r,right:Math.max(s.left,u.left),bottom:Math.max(s.bottom,u.bottom)+r};var c=Hn(e,i),l=e.doc.scrollTop,p=e.doc.scrollLeft;if(null!=c.scrollTop&&(Zn(e,c.scrollTop),Math.abs(e.doc.scrollTop-l)>1&&(a=!0)),null!=c.scrollLeft&&(tr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-p)>1&&(a=!0)),!a)break}return i}function Vn(e,t){var n=Hn(e,t);null!=n.scrollTop&&Zn(e,n.scrollTop),null!=n.scrollLeft&&tr(e,n.scrollLeft)}function Hn(e,t){var n=e.display,r=xn(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=zt(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Rt(n),u=t.tops-r;if(t.topi+o){var l=Math.min(t.top,(c?s:t.bottom)-o);l!=i&&(a.scrollTop=l)}var p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,f=Ut(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),d=t.right-t.left>f;return d&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.leftf+p-3&&(a.scrollLeft=t.right+(d?0:10)-f),a}function Wn(e,t){null!=t&&(Yn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Qn(e){Yn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Kn(e,t,n){null==t&&null==n||Yn(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Jn(e,t){Yn(e),e.curOp.scrollToPos=t}function Yn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;Xn(e,pn(e,t.from),pn(e,t.to),t.margin)}}function Xn(e,t,n,r){var i=Hn(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Kn(e,i.scrollLeft,i.scrollTop)}function Zn(e,t){Math.abs(e.doc.scrollTop-t)<2||(ma||Fr(e,{top:t}),er(e,t,!0),ma&&Fr(e),wr(e,100))}function er(e,t,n){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function tr(e,t,n,r){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,Un(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function nr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Rt(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+$t(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function rr(e,t){t||(t=nr(e));var n=e.display.barWidth,r=e.display.barHeight;ir(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Rn(e),ir(e,nr(e)),n=e.display.barWidth,r=e.display.barHeight}function ir(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function or(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Ra(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ws[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ns(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){"horizontal"==n?tr(e,t):Zn(e,t)},e),e.display.scrollbars.addClass&&s(e.display.wrapper,e.display.scrollbars.addClass)}function ar(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ss},vt(e.curOp)}function sr(e){xt(e.curOp,function(e){for(var t=0;t=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ks(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function lr(e){e.updatedDisplay=e.mustUpdate&&Tr(e.cm,e.update)}function pr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Rn(t),e.barMeasure=nr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ht(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+$t(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Ut(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function fr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeftt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Xa&&me(e.doc,t)i.viewFrom?xr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)xr(e);else if(t<=i.viewFrom){var o=Er(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):xr(e)}else if(n>=i.viewTo){var a=Er(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):xr(e)}else{var s=Er(e,t,t,-1),u=Er(e,n,n+r,1);s&&u?(i.view=i.view.slice(0,s.index).concat(yt(e,s.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=r):xr(e)}var c=i.externalMeasured;c&&(n=i.lineN&&t=r.viewTo)){var o=r.view[_n(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==f(a,n)&&a.push(n)}}}function xr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Er(e,t,n,r){var i,o=_n(e,t),a=e.display.view;if(!Xa||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,u=0;u0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;me(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function Cr(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=yt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=yt(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,_n(e,n)))),r.viewTo=n}function Dr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo)){var n=+new Date+e.options.workTime,r=Ye(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?He(t.mode,r.state):null,u=Ke(e,o,r,!0);s&&(r.state=s),o.styles=u.styles;var c=o.styleClasses,l=u.classes;l?o.styleClasses=l:c&&(o.styleClasses=null);for(var p=!a||a.length!=o.styles.length||c!=l&&(!c||!l||c.bgClass!=l.bgClass||c.textClass!=l.textClass),f=0;!p&&fn)return wr(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&hr(e,function(){for(var t=0;t=r.viewFrom&&n.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Dr(e))return!1;zn(e)&&(xr(e),n.dims=Cn(e));var o=i.first+i.size,a=Math.max(n.visible.from-e.options.viewportMargin,i.first),s=Math.min(o,n.visible.to+e.options.viewportMargin);r.viewFroms&&r.viewTo-s<20&&(s=Math.min(o,r.viewTo)),Xa&&(a=me(e.doc,a),s=ge(e.doc,s));var u=a!=r.viewFrom||s!=r.viewTo||r.lastWrapHeight!=n.wrapperHeight||r.lastWrapWidth!=n.wrapperWidth;Cr(e,a,s),r.viewOffset=be(_(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var c=Dr(e);if(!u&&0==c&&!n.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var l=_r(e);return c>4&&(r.lineDiv.style.display="none"),Nr(e,r.updateLineNumbers,n.dims),c>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Ar(l),t(r.cursorDiv),t(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,u&&(r.lastWrapHeight=n.wrapperHeight,r.lastWrapWidth=n.wrapperWidth,wr(e,400)),r.updateLineNumbers=null,!0}function Or(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Ut(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Rt(e.display)-zt(e),n.top)}),t.visible=$n(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&Tr(e,t);r=!1){Rn(e);var i=nr(e);An(e),rr(e,i),Pr(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Fr(e,t){var n=new ks(e,t);if(Tr(e,n)){Rn(e),Or(e,n);var r=nr(e);An(e),rr(e,r),Pr(e,r),n.finish()}}function Nr(e,n,r){function i(t){var n=t.nextSibling;return Ea&&Fa&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var o=e.display,a=e.options.lineNumbers,s=o.lineDiv,u=s.firstChild,c=o.view,l=o.viewFrom,p=0;p-1&&(h=!1),Dt(e,d,l,r)),h&&(t(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(P(e.options,l)))),u=d.node.nextSibling}else{var m=Ft(e,d,l,r);s.insertBefore(m,u)}l+=d.size}for(;u;)u=i(u)}function Ir(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Pr(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+$t(e)+"px"}function Lr(e){var n=e.display.gutters,i=e.options.gutters;t(n);for(var o=0;o-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function jr(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function Rr(e){var t=jr(e);return t.x*=As,t.y*=As,t}function Br(e,t){var n=jr(t),r=n.x,i=n.y,o=e.display,a=o.scroller,s=a.scrollWidth>a.clientWidth,u=a.scrollHeight>a.clientHeight;if(r&&s||i&&u){if(i&&Fa&&Ea)e:for(var c=t.target,l=o.view;c!=a;c=c.parentNode)for(var p=0;p=0){var a=$(o.from(),i.from()),s=B(o.to(),i.to()),u=o.empty()?i.from()==i.head:o.from()==o.head;r<=t&&--t,e.splice(--r,2,new Os(u?s:a,u?a:s))}}return new Ts(e,t)}function Ur(e,t){return new Ts([new Os(e,t||e)],0)}function zr(e){return e.text?L(e.from.line+e.text.length-1,m(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Gr(e,t){if(M(e,t.from)<0)return e;if(M(e,t.to)<=0)return zr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=zr(t).ch-t.to.ch),L(n,r)}function qr(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,h-1),e.insert(s.line+1,v)}Et(e,"change",e,t)}function Yr(e,t,n){function r(e,i,o){if(e.linked)for(var a=0;a1&&!e.done[e.done.length-2].ranges?(e.done.pop(),m(e.done)):void 0}function oi(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=ii(i,i.lastOp==r)))a=m(o.changes),0==M(t.from,t.to)&&0==M(t.from,a.to)?a.to=zr(t):o.changes.push(ni(e,t));else{var u=m(i.done);for(u&&u.ranges||ui(e.sel,i.done),o={changes:[ni(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||_e(e,"historyAdded")}function ai(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function si(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||ai(e,o,m(i.done),t))?i.done[i.done.length-1]=t:ui(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&ri(i.undone)}function ui(e,t){var n=m(t);n&&n.ranges&&n.equals(e)||t.push(e)}function ci(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function li(e){if(!e)return null;for(var t,n=0;n-1&&(m(s)[p]=c[p],delete c[p])}}}return r}function hi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=M(t,i)<0;o!=M(n,i)<0?(i=t,t=n):o!=M(t,n)<0&&(t=n)}return new Os(i,t)}return new Os(n||t,t)}function mi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Ei(e,new Ts([hi(e.sel.primary(),t,n,i)],0),r)}function gi(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(_e(u,"beforeCursorEnter"),u.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!u.atomic)continue;if(n){var c=u.find(r<0?1:-1),l=void 0;if((r<0?u.inclusiveRight:u.inclusiveLeft)&&(c=Ai(e,c,-r,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(l=M(c,n))&&(r<0?l<0:l>0))return ki(e,c,t,r,i)}var p=u.find(r<0?-1:1);return(r<0?u.inclusiveLeft:u.inclusiveRight)&&(p=Ai(e,p,r,p.line==t.line?o:null)),p?ki(e,p,t,r,i):null}}return t}function _i(e,t,n,r,i){var o=r||1,a=ki(e,t,n,o,i)||!i&&ki(e,t,n,o,!0)||ki(e,t,n,-o,i)||!i&&ki(e,t,n,-o,!0);return a||(e.cantEdit=!0,L(e.first,0))}function Ai(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?z(e,L(t.line-1)):null:n>0&&t.ch==(r||_(e,t.line)).text.length?t.line=0;--i)Ni(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Ni(e,t)}}function Ni(e,t){if(1!=t.text.length||""!=t.text[0]||0!=M(t.from,t.to)){var n=qr(e,t);oi(e,t,n,e.cm?e.cm.curOp.id:NaN),Li(e,t,n,Z(e,t));var r=[];Yr(e,function(e,n){n||-1!=f(r,e.history)||($i(e.history,t),r.push(e.history)),Li(e,t,null,Z(e,t))})}}function Ii(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,u="undo"==t?o.undone:o.done,c=0;c=0;--d){var h=function(n){var r=i.changes[n];if(r.origin=t,p&&!Oi(e,r,!1))return s.length=0,{};l.push(ni(e,r));var o=n?qr(e,r):m(s);Li(e,r,o,fi(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:zr(r)});var a=[];Yr(e,function(e,t){t||-1!=f(a,e.history)||($i(e.history,r),a.push(e.history)),Li(e,r,null,fi(e,r))})}(d);if(h)return h.v}}}}function Pi(e,t){if(0!=t&&(e.first+=t,e.sel=new Ts(g(e.sel.ranges,function(e){return new Os(L(e.anchor.line+t,e.anchor.ch),L(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){vr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:L(o,_(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=A(e,t.from,t.to),n||(n=qr(e,t)),e.cm?Mi(e.cm,t,r):Jr(e,t,r),Ci(e,n,Va)}}function Mi(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,u=o.line;e.options.lineWrapping||(u=F(fe(_(r,o.line))),r.iter(u,a.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Te(e),Jr(r,t,n,wn(e)),e.options.lineWrapping||(r.iter(u,o.line+t.text.length,function(e){var t=xe(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),ot(r,o.line),wr(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?vr(e):o.line!=a.line||1!=t.text.length||Kr(e.doc,t)?vr(e,o.line,a.line+1,c):br(e,o.line,"text");var l=Oe(e,"changes"),p=Oe(e,"change");if(p||l){var f={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};p&&Et(e,"change",e,f),l&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function ji(e,t,n,r,i){if(r||(r=n),M(r,n)<0){var o;o=[r,n],n=o[0],r=o[1]}"string"==typeof t&&(t=e.splitLines(t)),Fi(e,{from:n,to:r,text:t,origin:i})}function Ri(e,t,n,r){n0||0==s&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=i("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(pe(e,t.line,t,n,a)||t.line!=n.line&&pe(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");H()}a.addToHistory&&oi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var u,c=t.line,p=e.cm;if(e.iter(c,n.line+1,function(e){p&&a.collapsed&&!p.options.lineWrapping&&fe(e)==p.display.maxLine&&(u=!0),a.collapsed&&c!=t.line&&O(e,0),J(e,new W(a,c==t.line?t.ch:null,c==n.line?n.ch:null)),++c}),a.collapsed&&e.iter(t.line,n.line+1,function(t){ye(e,t)&&O(t,0)}),a.clearOnEnter&&ns(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(V(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Ns,a.atomic=!0),p){if(u&&(p.curOp.updateMaxLine=!0),a.collapsed)vr(p,t.line,n.line+1);else if(a.className||a.title||a.startStyle||a.endStyle||a.css)for(var f=t.line;f<=n.line;f++)br(p,f,"text");a.atomic&&wi(p.doc),Et(p,"markerAdded",p,a)}return a}function Wi(e,t,n,r,i){r=l(r),r.shared=!1;var o=[Hi(e,t,n,r,i)],a=o[0],s=r.widgetNode;return Yr(e,function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(Hi(e,z(e,t),z(e,n),r,i));for(var u=0;u-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var u=e.dataTransfer.getData("Text");if(u){var c;if(t.state.draggingText&&!t.state.draggingText.copy&&(c=t.listSelections()),Ci(t.doc,Ur(n,n)),c)for(var l=0;l=0;t--)ji(e.doc,"",r[t].from,r[t].to,"+delete");Qn(e)})}function ho(e,t,n){var r=w(e.text,t+n,n);return r<0||r>e.text.length?null:r}function mo(e,t,n){var r=ho(e,t.ch,n);return null==r?null:new L(t.line,r,n<0?"after":"before")}function go(e,t,n,r,i){if(e){var o=we(n,t.doc.direction);if(o){var a,s=i<0?m(o):o[0],u=i<0==(1==s.level),c=u?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var l=Qt(t,n);a=i<0?n.text.length-1:0;var p=Kt(t,l,a).top;a=S(function(e){return Kt(t,l,e).top==p},i<0==(1==s.level)?s.from:s.to-1,a),"before"==c&&(a=ho(n,a,1))}else a=i<0?s.to:s.from;return new L(r,a,c)}}return new L(r,i<0?n.text.length:0,i<0?"before":"after")}function yo(e,t,n,r){var i=we(t,e.doc.direction);if(!i)return mo(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=De(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&f>=l.begin)){var d=p?"before":"after";return new L(n.line,f,d)}}var h=function(e,t,r){for(var o=function(e,t){return t?new L(n.line,u(e,1),"before"):new L(n.line,e,"after")};e>=0&&e0==(1!=a.level),c=s?r.begin:u(r.end,-1);if(a.from<=c&&c0?l.end:u(l.begin,-1);return null==g||r>0&&g==t.text.length||!(m=h(r>0?0:i.length-1,r,c(g)))?null:m}function vo(e,t){var n=_(e.doc,t),r=fe(n);return r!=n&&(t=F(r)),go(!0,e,r,t,1)}function bo(e,t){var n=_(e.doc,t),r=de(n);return r!=n&&(t=F(r)),go(!0,e,n,t,-1)}function xo(e,t){var n=vo(e,t.line),r=_(e.doc,n.line),i=we(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return L(n.line,a?0:o,n.sticky)}return n}function Eo(e,t,n){if("string"==typeof t&&!(t=qs[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=qa}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function Co(e,t,n){for(var r=0;r-1&&(M((i=s.ranges[i]).from(),t)<0||t.xRel>0)&&(M(i.to(),t)>0||t.xRel<0)?Mo(e,r,t,o):Ro(e,r,t,o)}function Mo(e,t,n,r){var i=e.display,o=!1,a=mr(e,function(t){Ea&&(i.scroller.draggable=!1),e.state.draggingText=!1,ke(i.wrapper.ownerDocument,"mouseup",a),ke(i.wrapper.ownerDocument,"mousemove",s),ke(i.scroller,"dragstart",u),ke(i.scroller,"drop",a),o||(Ne(t),r.addNew||mi(e.doc,n,null,null,r.extend),Ea||ba&&9==xa?setTimeout(function(){i.wrapper.ownerDocument.body.focus(),i.input.focus()},20):i.input.focus())}),s=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},u=function(){return o=!0};Ea&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),ns(i.wrapper.ownerDocument,"mouseup",a),ns(i.wrapper.ownerDocument,"mousemove",s),ns(i.scroller,"dragstart",u),ns(i.scroller,"drop",a),Ln(e),setTimeout(function(){return i.input.focus()},20)}function jo(e,t,n){if("char"==n)return new Os(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Os(L(t.line,0),z(e.doc,L(t.line+1,0)));var r=n(e,t);return new Os(r.from,r.to)}function Ro(e,t,n,r){function i(t){if(0!=M(y,t))if(y=t,"rectangle"==r.unit){for(var i=[],o=e.options.tabSize,a=p(_(c,n.line).text,n.ch,o),s=p(_(c,t.line).text,t.ch,o),u=Math.min(a,s),m=Math.max(a,s),g=Math.min(n.line,t.line),v=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=v;g++){var b=_(c,g).text,x=d(b,u,o);u==m?i.push(new Os(L(g,x),L(g,x))):b.length>x&&i.push(new Os(L(g,x),L(g,d(b,m,o))))}i.length||i.push(new Os(n,n)),Ei(c,$r(h.ranges.slice(0,f).concat(i),f),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var E,C=l,D=jo(e,t,r.unit),w=C.anchor;M(D.anchor,w)>0?(E=D.head,w=$(C.from(),D.anchor)):(E=D.anchor,w=B(C.to(),D.head));var S=h.ranges.slice(0);S[f]=Bo(e,new Os(z(c,w),E)),Ei(c,$r(S,f),Ha)}}function o(t){var n=++b,s=kn(e,t,!0,"rectangle"==r.unit);if(s)if(0!=M(s,y)){e.curOp.focus=a(),i(s);var l=$n(u,c);(s.line>=l.to||s.linev.bottom?20:0;p&&setTimeout(mr(e,function(){b==n&&(u.scroller.scrollTop+=p,o(t))}),50)}}function s(t){e.state.selectingText=!1,b=1/0,Ne(t),u.input.focus(),ke(u.wrapper.ownerDocument,"mousemove",x),ke(u.wrapper.ownerDocument,"mouseup",E),c.history.lastSelOrigin=null}var u=e.display,c=e.doc;Ne(t);var l,f,h=c.sel,m=h.ranges;if(r.addNew&&!r.extend?(f=c.sel.contains(n),l=f>-1?m[f]:new Os(n,n)):(l=c.sel.primary(),f=c.sel.primIndex),"rectangle"==r.unit)r.addNew||(l=new Os(n,n)),n=kn(e,t,!0,!0),f=-1;else{var g=jo(e,n,r.unit);l=r.extend?hi(l,g.anchor,g.head,r.extend):g}r.addNew?-1==f?(f=m.length,Ei(c,$r(m.concat([l]),f),{scroll:!1,origin:"*mouse"})):m.length>1&&m[f].empty()&&"char"==r.unit&&!r.extend?(Ei(c,$r(m.slice(0,f).concat(m.slice(f+1)),0),{scroll:!1,origin:"*mouse"}),h=c.sel):yi(c,f,l,Ha):(f=0,Ei(c,new Ts([l],0),Ha),h=c.sel);var y=n,v=u.wrapper.getBoundingClientRect(),b=0,x=mr(e,function(e){0!==e.buttons&&je(e)?o(e):s(e)}),E=mr(e,s);e.state.selectingText=E,ns(u.wrapper.ownerDocument,"mousemove",x),ns(u.wrapper.ownerDocument,"mouseup",E)}function Bo(e,t){var n=t.anchor,r=t.head,i=_(e.doc,n.line);if(0==M(n,r)&&n.sticky==r.sticky)return t;var o=we(i);if(!o)return t;var a=De(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var u=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==u||u==o.length)return t;var c;if(r.line!=n.line)c=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var l=De(o,r.ch,r.sticky),p=l-a||(r.ch-n.ch)*(1==s.level?-1:1);c=l==u-1||l==u?p<0:p>0}var f=o[u+(c?-1:0)],d=c==(1==f.level),h=d?f.from:f.to,m=d?"after":"before";return n.ch==h&&n.sticky==m?t:new Os(new L(n.line,h,m),r)}function $o(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Ne(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!Oe(e,n))return Pe(t);o-=s.top-a.viewOffset;for(var u=0;u=i){return _e(e,n,e,N(e.doc,o),e.options.gutters[u],t),Pe(t)}}}function Uo(e,t){return $o(e,t,"gutterClick",!0)}function zo(e,t){Mt(e.display,t)||Go(e,t)||Ae(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function Go(e,t){return!!Oe(e,"gutterContextMenu")&&$o(e,t,"gutterContextMenu",!1)}function qo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),nn(e)}function Vo(e){Lr(e),vr(e),Un(e)}function Ho(e,t,n){if(!t!=!(n&&n!=Js)){var r=e.display.dragFunctions,i=t?ns:ke;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Wo(e){e.options.lineWrapping?(s(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Ra(e.display.wrapper,"CodeMirror-wrap"),Ee(e)),Sn(e),vr(e),nn(e),setTimeout(function(){return rr(e)},100)}function Qo(e,t){var n=this;if(!(this instanceof Qo))return new Qo(e,t);this.options=t=t?l(t):{},l(Ys,t,!1),Mr(t);var r=t.value;"string"==typeof r&&(r=new Ms(r,t.mode,null,t.lineSeparator,t.direction)),this.doc=r;var i=new Qo.inputStyles[t.inputStyle](this),o=this.display=new k(e,r,i);o.wrapper.CodeMirror=this,Lr(this),qo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),or(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 $a,keySeq:null,specialChars:null},t.autofocus&&!Oa&&o.input.focus(),ba&&xa<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Ko(this),no(),ar(this),this.curOp.forceUpdate=!0,Xr(this,r),t.autofocus&&!Oa||this.hasFocus()?setTimeout(c(Mn,this),20):jn(this);for(var a in Xs)Xs.hasOwnProperty(a)&&Xs[a](n,t[a],Js);zn(this),t.finishInit&&t.finishInit(this);for(var s=0;s400}var i=e.display;ns(i.scroller,"mousedown",mr(e,No)),ba&&xa<11?ns(i.scroller,"dblclick",mr(e,function(t){if(!Ae(e,t)){var n=kn(e,t);if(n&&!Uo(e,t)&&!Mt(e.display,t)){Ne(t);var r=e.findWordAt(n);mi(e.doc,r.anchor,r.head)}}})):ns(i.scroller,"dblclick",function(t){return Ae(e,t)||Ne(t)}),ja||ns(i.scroller,"contextmenu",function(t){return zo(e,t)});var o,a={end:0};ns(i.scroller,"touchstart",function(t){if(!Ae(e,t)&&!n(t)&&!Uo(e,t)){i.input.ensurePolled(),clearTimeout(o);var r=+new Date;i.activeTouch={start:r,moved:!1,prev:r-a.end<=300?a:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),ns(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),ns(i.scroller,"touchend",function(n){var o=i.activeTouch;if(o&&!Mt(i,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,s=e.coordsChar(i.activeTouch,"page");a=!o.prev||r(o,o.prev)?new Os(s,s):!o.prev.prev||r(o,o.prev.prev)?e.findWordAt(s):new Os(L(s.line,0),z(e.doc,L(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Ne(n)}t()}),ns(i.scroller,"touchcancel",t),ns(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Zn(e,i.scroller.scrollTop),tr(e,i.scroller.scrollLeft,!0),_e(e,"scroll",e))}),ns(i.scroller,"mousewheel",function(t){return Br(e,t)}),ns(i.scroller,"DOMMouseScroll",function(t){return Br(e,t)}),ns(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Ae(e,t)||Le(t)},over:function(t){Ae(e,t)||(Zi(e,t),Le(t))},start:function(t){return Xi(e,t)},drop:mr(e,Yi),leave:function(t){Ae(e,t)||eo(e)}};var s=i.input.getField();ns(s,"keyup",function(t){return To.call(e,t)}),ns(s,"keydown",mr(e,_o)),ns(s,"keypress",mr(e,Oo)),ns(s,"focus",function(t){return Mn(e,t)}),ns(s,"blur",function(t){return jn(e,t)})}function Jo(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=Ye(e,t).state:n="prev");var a=e.options.tabSize,s=_(o,t),u=p(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,l=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((c=o.mode.indent(i,s.text.slice(l.length),s.text))==qa||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?p(_(o,t-1).text,null,a):0:"add"==n?c=u+e.options.indentUnit:"subtract"==n?c=u-e.options.indentUnit:"number"==typeof n&&(c=u+n),c=Math.max(0,c);var f="",d=0;if(e.options.indentWithTabs)for(var m=Math.floor(c/a);m;--m)d+=a,f+="\t";if(d1)if(eu&&eu.text.join("\n")==t){if(r.ranges.length%eu.text.length==0){u=[];for(var c=0;c=0;p--){var f=r.ranges[p],d=f.from(),h=f.to();f.empty()&&(n&&n>0?d=L(d.line,d.ch-n):e.state.overwrite&&!a?h=L(h.line,Math.min(_(o,h.line).text.length,h.ch+m(s).length)):eu&&eu.lineWise&&eu.text.join("\n")==t&&(d=h=L(d.line,0))),l=e.curOp.updateInput;var y={from:d,to:h,text:u?u[p%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};Fi(e.doc,y),Et(e,"inputRead",e,y)}t&&!a&&ea(e,t),Qn(e),e.curOp.updateInput=l,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Zo(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||hr(t,function(){return Xo(t,n,0,null,"paste")}),!0}function ea(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Jo(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(_(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Jo(e,i.head.line,"smart"));a&&Et(e,"electricInput",e,i.head.line)}}}function ta(e){for(var t=[],n=[],r=0;r=e.first+e.size)&&(t=new L(r,t.ch,t.sticky),c=_(e,r))}function a(r){var a;if(null==(a=i?yo(e.cm,c,t,n):mo(c,t,n))){if(r||!o())return!1;t=go(i,e.cm,c,t.line,n)}else t=a;return!0}var s=t,u=n,c=_(e,t.line);if("char"==r)a();else if("column"==r)a(!0);else if("word"==r||"group"==r)for(var l=null,p="group"==r,f=e.cm&&e.cm.getHelper(t,"wordChars"),d=!0;!(n<0)||a(!d);d=!1){var h=c.text.charAt(t.ch)||"\n",m=E(h,f)?"w":p&&"\n"==h?"n":!p||/\s/.test(h)?null:"p";if(!p||d||m||(m="s"),l&&l!=m){n<0&&(n=1,a(),t.sticky="after");break}if(m&&(l=m),n>0&&!a(!d))break}var g=_i(e,t,s,u,!0);return j(s,g)&&(g.hitSide=!0),g}function oa(e,t,n,r){var i,o=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(s-.5*xn(e.display),3);i=(n>0?t.bottom:t.top)+n*u}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(var c;c=dn(e,a,i),c.outside;){if(n<0?i<=0:i>=o.height){c.hitSide=!0;break}i+=5*n}return c}function aa(e,t){var n=Wt(e,t.line);if(!n||n.hidden)return null;var r=_(e.doc,t.line),i=qt(n,r,t.line),o=we(r,e.doc.direction),a="left";if(o){a=De(o,t.ch)%2?"right":"left"}var s=Jt(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function sa(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ua(e,t){return t&&(e.bad=!0),e}function ca(e,t,n,r,i){function o(e){return function(t){return t.id==e}}function a(){l&&(c+=p,f&&(c+=p),l=f=!1)}function s(e){e&&(a(),c+=e)}function u(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void s(n);var c,d=t.getAttribute("cm-marker");if(d){var h=e.findMarks(L(r,0),L(i+1,0),o(+d));return void(h.length&&(c=h[0].find(0))&&s(A(e.doc,c.from,c.to).join(p)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&a();for(var g=0;g=15&&(wa=!1,Ea=!0);var La,Ma=Fa&&(Ca||wa&&(null==Pa||Pa<12.11)),ja=ma||ba&&xa>=9,Ra=function(t,n){var r=t.className,i=e(n).exec(r);if(i){var o=r.slice(i.index+i[0].length);t.className=r.slice(0,i.index)+(o?i[1]+o:"")}};La=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var Ba=function(e){e.select()};Aa?Ba=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:ba&&(Ba=function(e){try{e.select()}catch(e){}});var $a=function(){this.id=null};$a.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Ua,za,Ga=30,qa={toString:function(){return"CodeMirror.Pass"}},Va={scroll:!1},Ha={origin:"*mouse"},Wa={origin:"+move"},Qa=[""],Ka=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Ja=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,Ya=!1,Xa=!1,Za=null,es=function(){function e(e){return e<=247?n.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?r.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,s=/[Lb1n]/,u=/[1n]/;return function(n,r){var c="ltr"==r?"L":"R";if(0==n.length||"ltr"==r&&!i.test(n))return!1;for(var l=n.length,p=[],f=0;f=this.string.length},ps.prototype.sol=function(){return this.pos==this.lineStart},ps.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ps.prototype.next=function(){if(this.post},ps.prototype.eatSpace=function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},ps.prototype.skipToEnd=function(){this.pos=this.string.length},ps.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},ps.prototype.backUp=function(e){this.pos-=e},ps.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},ps.prototype.current=function(){return this.string.slice(this.start,this.pos)},ps.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},ps.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},ps.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var fs=function(e,t){this.state=e,this.lookAhead=t},ds=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};ds.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ds.prototype.baseToken=function(e){var t=this;if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)t.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ds.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ds.fromSaved=function(e,t,n){return t instanceof fs?new ds(e,He(e.mode,t.state),n,t.lookAhead):new ds(e,He(e.mode,t),n)},ds.prototype.save=function(e){var t=!1!==e?He(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new fs(t,this.maxLookAhead):t};var hs=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n},ms=function(e,t,n){this.text=e,re(this,t),this.height=n?n(this):1};ms.prototype.lineNo=function(){return F(this)},Fe(ms);var gs,ys={},vs={},bs=null,xs=null,Es={left:0,right:0,top:0,bottom:0},Cs=function(e,t,n){this.cm=n;var i=this.vert=r("div",[r("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=r("div",[r("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=o.tabIndex=-1,e(i),e(o),ns(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),ns(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ba&&xa<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Cs.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Cs.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Cs.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Cs.prototype.zeroWidthHack=function(){var e=Fa&&!ka?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new $a,this.disableVert=new $a},Cs.prototype.enableZeroWidthBar=function(e,t,n){function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},Cs.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ds=function(){};Ds.prototype.update=function(){return{bottom:0,right:0}},Ds.prototype.setScrollLeft=function(){},Ds.prototype.setScrollTop=function(){},Ds.prototype.clear=function(){};var ws={native:Cs,null:Ds},Ss=0,ks=function(e,t,n){var r=e.display;this.viewport=t,this.visible=$n(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Ut(e),this.force=n,this.dims=Cn(e),this.events=[]};ks.prototype.signal=function(e,t){Oe(e,t)&&this.events.push(arguments)},ks.prototype.finish=function(){for(var e=this,t=0;t=0&&M(e,i.to())<=0)return r}return-1};var Os=function(e,t){this.anchor=e,this.head=t};Os.prototype.from=function(){return $(this.anchor,this.head)},Os.prototype.to=function(){return B(this.anchor,this.head)},Os.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},zi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=this,r=e,i=e+t;r1||!(this.children[0]instanceof zi))){var u=[];this.collapse(u),this.children=[new zi(u)],this.children[0].parent=this}},collapse:function(e){for(var t=this,n=0;n50){for(var s=o.lines.length%25+25,u=s;u10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=this,i=0;it.display.maxLineLength&&(t.display.maxLine=l,t.display.maxLineLength=p,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&vr(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&wi(t.doc)),t&&Et(t,"markerCleared",t,this,i,o),n&&sr(t),this.parent&&this.parent.clear()}},Is.prototype.find=function(e,t){var n=this;null==e&&"bookmark"==this.type&&(e=1);for(var r,i,o=0;o=0;c--)Fi(r,i[c]);u?xi(this,u):this.cm&&Qn(this.cm)}),undo:yr(function(){Ii(this,"undo")}),redo:yr(function(){Ii(this,"redo")}),undoSelection:yr(function(){Ii(this,"undo",!0)}),redoSelection:yr(function(){Ii(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=z(this,e),t=z(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var s=0;s=u.to||null==u.from&&i!=e.line||null!=u.from&&i==t.line&&u.from>=t.ch||n&&!n(u.marker)||r.push(u.marker.parent||u.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n}),z(this,L(n,t))},indexFromPos:function(e){e=z(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.to0)i=new L(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),L(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=_(e.doc,i.line-1).text;a&&(i=new L(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),L(i.line-1,a.length-1),i,"+transpose"))}n.push(new Os(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return hr(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;re&&0==M(t,this.pos)&&n==this.button};var Qs,Ks,Js={toString:function(){return"CodeMirror.Init"}},Ys={},Xs={};Qo.defaults=Ys,Qo.optionHandlers=Xs;var Zs=[];Qo.defineInitHook=function(e){return Zs.push(e)};var eu=null,tu=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new $a,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};tu.prototype.init=function(e){function t(e){if(!Ae(i,e)){if(i.somethingSelected())Yo({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=ta(i);Yo({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation(function(){i.setSelections(t.ranges,0,Va),i.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var n=eu.text.join("\n");if(e.clipboardData.setData("Text",n),e.clipboardData.getData("Text")==n)return void e.preventDefault()}var a=ra(),s=a.firstChild;i.display.lineSpace.insertBefore(a,i.display.lineSpace.firstChild),s.value=eu.text.join("\n");var u=document.activeElement;Ba(s),setTimeout(function(){i.display.lineSpace.removeChild(a),u.focus(),u==o&&r.showPrimarySelection()},50)}}var n=this,r=this,i=r.cm,o=r.div=e.lineDiv;na(o,i.options.spellcheck),ns(o,"paste",function(e){Ae(i,e)||Zo(e,i)||xa<=11&&setTimeout(mr(i,function(){return n.updateFromDOM()}),20)}),ns(o,"compositionstart",function(e){n.composing={data:e.data,done:!1}}),ns(o,"compositionupdate",function(e){n.composing||(n.composing={data:e.data,done:!1})}),ns(o,"compositionend",function(e){n.composing&&(e.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),ns(o,"touchstart",function(){return r.forceCompositionEnd()}),ns(o,"input",function(){n.composing||n.readFromDOMSoon()}),ns(o,"copy",t),ns(o,"cut",t)},tu.prototype.prepareSelection=function(){var e=Tn(this.cm,!1);return e.focus=this.cm.state.focused,e},tu.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},tu.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},tu.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line=t.display.viewFrom&&aa(t,r)||{node:s[0].measure.map[2],offset:0},c=i.linee.firstLine()&&(r=L(r.line-1,_(e.doc,r.line-1).length)),i.ch==_(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var o,a,s;r.line==t.viewFrom||0==(o=_n(e,r.line))?(a=F(t.view[0].line),s=t.view[0].node):(a=F(t.view[o].line),s=t.view[o-1].node.nextSibling);var u,c,l=_n(e,i.line);if(l==t.view.length-1?(u=t.viewTo-1,c=t.lineDiv.lastChild):(u=F(t.view[l+1].line)-1,c=t.view[l+1].node.previousSibling),!s)return!1;for(var p=e.doc.splitLines(ca(e,s,c,a,u)),f=A(e.doc,L(a,0),L(u,_(e.doc,u).text.length));p.length>1&&f.length>1;)if(m(p)==m(f))p.pop(),f.pop(),u--;else{if(p[0]!=f[0])break;p.shift(),f.shift(),a++}for(var d=0,h=0,g=p[0],y=f[0],v=Math.min(g.length,y.length);dr.ch&&b.charCodeAt(b.length-h-1)==x.charCodeAt(x.length-h-1);)d--,h++;p[p.length-1]=b.slice(0,b.length-h).replace(/^\u200b+/,""),p[0]=p[0].slice(d).replace(/\u200b+$/,"");var C=L(a,d),D=L(u,f.length?m(f).length-h:0);return p.length>1||p[0]||M(C,D)?(ji(e.doc,p,C,D,"+input"),!0):void 0},tu.prototype.ensurePolled=function(){this.forceCompositionEnd()},tu.prototype.reset=function(){this.forceCompositionEnd()},tu.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},tu.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},tu.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||hr(this.cm,function(){return vr(e.cm)})},tu.prototype.setUneditable=function(e){e.contentEditable="false"},tu.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||mr(this.cm,Xo)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},tu.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},tu.prototype.onContextMenu=function(){},tu.prototype.resetPosition=function(){},tu.prototype.needsContentAttribute=!0;var nu=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new $a,this.hasSelection=!1,this.composing=null};nu.prototype.init=function(e){function t(e){if(!Ae(i,e)){if(i.somethingSelected())Yo({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=ta(i);Yo({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,Va):(r.prevInput="",o.value=t.text.join("\n"),Ba(o))}"cut"==e.type&&(i.state.cutIncoming=!0)}}var n=this,r=this,i=this.cm;this.createField(e);var o=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),Aa&&(o.style.width="0px"),ns(o,"input",function(){ba&&xa>=9&&n.hasSelection&&(n.hasSelection=null),r.poll()}),ns(o,"paste",function(e){Ae(i,e)||Zo(e,i)||(i.state.pasteIncoming=!0,r.fastPoll())}),ns(o,"cut",t),ns(o,"copy",t),ns(e.scroller,"paste",function(t){Mt(e,t)||Ae(i,t)||(i.state.pasteIncoming=!0,r.focus())}),ns(e.lineSpace,"selectstart",function(t){Mt(e,t)||Ne(t)}),ns(o,"compositionstart",function(){var e=i.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),ns(o,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},nu.prototype.createField=function(e){this.wrapper=ra(),this.textarea=this.wrapper.firstChild},nu.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Tn(e);if(e.options.moveInputWithCursor){var i=ln(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},nu.prototype.showSelection=function(e){var t=this.cm,r=t.display;n(r.cursorDiv,e.cursors),n(r.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},nu.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&Ba(this.textarea),ba&&xa>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",ba&&xa>=9&&(this.hasSelection=null))}},nu.prototype.getField=function(){return this.textarea},nu.prototype.supportsTouch=function(){return!1},nu.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Oa||a()!=this.textarea))try{this.textarea.focus()}catch(e){}},nu.prototype.blur=function(){this.textarea.blur()},nu.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},nu.prototype.receivedFocus=function(){this.slowPoll()},nu.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},nu.prototype.fastPoll=function(){function e(){n.poll()||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},nu.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||os(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(ba&&xa>=9&&this.hasSelection===i||Fa&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="\u200b"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,s=Math.min(r.length,i.length);a1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},nu.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},nu.prototype.onKeyPress=function(){ba&&xa>=9&&(this.hasSelection=null),this.fastPoll()},nu.prototype.onContextMenu=function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t="\u200b"+(e?a.value:"");a.value="\u21da",a.value=t,r.prevInput=e?"":"\u200b",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.cssText=l,a.style.cssText=c,ba&&xa<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=u),null!=a.selectionStart){(!ba||ba&&xa<9)&&t();var e=0,n=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"\u200b"==r.prevInput?mr(i,Ti)(i):e++<10?o.detectingSelectAll=setTimeout(n,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(n,200)}}var r=this,i=r.cm,o=i.display,a=r.textarea,s=kn(i,e),u=o.scroller.scrollTop;if(s&&!wa){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(s)&&mr(i,Ei)(i.doc,Ur(s),Va);var c=a.style.cssText,l=r.wrapper.style.cssText;r.wrapper.style.cssText="position: absolute";var p=r.wrapper.getBoundingClientRect();a.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(ba?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var f;if(Ea&&(f=window.scrollY),o.input.focus(),Ea&&window.scrollTo(null,f),o.input.reset(),i.somethingSelected()||(a.value=r.prevInput=" "),r.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),ba&&xa>=9&&t(),ja){Le(e);var d=function(){ke(window,"mouseup",d),setTimeout(n,20)};ns(window,"mouseup",d)}else setTimeout(n,50)}},nu.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},nu.prototype.setUneditable=function(){},nu.prototype.needsContentAttribute=!1,function(e){function t(t,r,i,o){e.defaults[t]=r,i&&(n[t]=o?function(e,t,n){n!=Js&&i(e,t,n)}:i)}var n=e.optionHandlers;e.defineOption=t,e.Init=Js,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,Wr(e)},!0),t("indentUnit",2,Wr,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){Qr(e),nn(e),vr(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(L(r,o))}r++});for(var i=n.length-1;i>=0;i--)ji(e.doc,t,n[i],L(n[i].line,n[i].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Js&&e.refresh()}),t("specialCharPlaceholder",lt,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",Oa?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!Ia),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){qo(e),Vo(e)},!0),t("keyMap","default",function(e,t,n){var r=po(t),i=n!=Js&&po(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,Wo,!0),t("gutters",[],function(e){Mr(e.options),Vo(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?Dn(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return rr(e)},!0),t("scrollbarStyle","native",function(e){or(e),rr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Mr(e.options),Vo(e)},!0),t("firstLineNumber",1,Vo,!0),t("lineNumberFormatter",function(e){return e},Vo,!0),t("showCursorWhenSelecting",!1,An,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("readOnly",!1,function(e,t){"nocursor"==t&&(jn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,Ho),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,An,!0),t("singleCursorHeightPerLine",!0,An,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Qr,!0),t("addModeClass",!1,Qr,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,Qr,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null),t("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(Qo),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&mr(this,t[e])(this,n,i),_e(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](po(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nr&&(Jo(t,o.head.line,e,!0),r=o.head.line,i==t.doc.sel.primIndex&&Qn(t));else{var a=o.from(),s=o.to(),u=Math.max(r,a.line);r=Math.min(t.lastLine(),s.line-(s.ch?0:1))+1;for(var c=u;c0&&yi(t.doc,i,new Os(a,l[i].to()),Va)}}}),getTokenAt:function(e,t){return tt(this,e,t)},getLineTokens:function(e,t){return tt(this,L(e),t,!0)},getTokenTypeAt:function(e){e=z(this.doc,e);var t,n=Je(this,_(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(e=o,i=!0),r=_(this.doc,e)}else r=e;return sn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-be(r):0)},defaultTextHeight:function(){return xn(this.display)},defaultCharWidth:function(){return En(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=ln(this,z(this.doc,e));var a=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var u=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>u)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=u&&(a=e.bottom),s+t.offsetWidth>c&&(s=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&Vn(this,{left:s,top:a,right:s+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:gr(_o),triggerOnKeyPress:gr(Oo),triggerOnKeyUp:To,triggerOnMouseDown:gr(No),execCommand:function(e){if(qs.hasOwnProperty(e))return qs[e].call(null,this)},triggerElectric:gr(function(e){ea(this,e)}),findPosH:function(e,t,n,r){var i=this,o=1;t<0&&(o=-1,t=-t);for(var a=z(this.doc,e),s=0;s0&&s(n.charAt(r-1));)--r;for(;i.5)&&Sn(this),_e(this,"refresh",this)}),swapDoc:gr(function(e){var t=this.doc;return t.cm=null,Xr(this,e),nn(this),this.display.input.reset(),Kn(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Et(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Fe(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(Qo);var ru="iter insert remove copy getEditor constructor".split(" ");for(var iu in Ms.prototype)Ms.prototype.hasOwnProperty(iu)&&f(ru,iu)<0&&(Qo.prototype[iu]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ms.prototype[iu]));return Fe(Ms),Qo.inputStyles={textarea:nu,contenteditable:tu},Qo.defineMode=function(e){Qo.defaults.mode||"null"==e||(Qo.defaults.mode=e),Ue.apply(this,arguments)},Qo.defineMIME=ze,Qo.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Qo.defineMIME("text/plain","null"),Qo.defineExtension=function(e,t){Qo.prototype[e]=t},Qo.defineDocExtension=function(e,t){Ms.prototype[e]=t},Qo.fromTextArea=fa,function(e){e.off=ke,e.on=ns,e.wheelEventPixels=Rr,e.Doc=Ms,e.splitLines=is,e.countColumn=p,e.findColumn=d,e.isWordChar=x,e.Pass=qa,e.signal=_e,e.Line=ms,e.changeEnd=zr,e.scrollbarModel=ws,e.Pos=L,e.cmpPos=M,e.modes=us,e.mimeModes=cs,e.resolveMode=Ge,e.getMode=qe,e.modeExtensions=ls,e.extendMode=Ve,e.copyState=He,e.startState=Qe,e.innerMode=We,e.commands=qs,e.keyMap=Gs,e.keyName=lo,e.isModifierKey=uo,e.lookupKey=so,e.normalizeKeyMap=ao,e.StringStream=ps,e.SharedTextMarker=Ps,e.TextMarker=Is,e.LineWidget=Fs,e.e_preventDefault=Ne,e.e_stopPropagation=Ie,e.e_stop=Le,e.addClass=s,e.contains=o,e.rmClass=Ra,e.keyNames=Bs}(Qo),Qo.version="5.38.0",Qo})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(45);Object.defineProperty(t,"GraphQLError",{enumerable:!0,get:function(){return r.GraphQLError}});var i=n(471);Object.defineProperty(t,"syntaxError",{enumerable:!0,get:function(){return i.syntaxError}});var o=n(220);Object.defineProperty(t,"locatedError",{enumerable:!0,get:function(){return o.locatedError}});var a=n(472);Object.defineProperty(t,"formatError",{enumerable:!0,get:function(){return a.formatError}})},function(e,t,n){"use strict";function r(e){return Object.prototype.toString.call(e)}function i(e){return"[object String]"===r(e)}function o(e,t){return E.call(e,t)}function a(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){if(t){if("object"!==typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e}function s(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function u(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!==(65535&e)&&65534!==(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function c(e){if(e>65535){e-=65536;var t=55296+(e>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function l(e,t){var n=0;return o(k,t)?k[t]:35===t.charCodeAt(0)&&S.test(t)&&(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10),u(n))?c(n):e}function p(e){return e.indexOf("\\")<0?e:e.replace(C,"$1")}function f(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(w,function(e,t,n){return t||l(e,n)})}function d(e){return T[e]}function h(e){return _.test(e)?e.replace(A,d):e}function m(e){return e.replace(O,"\\$&")}function g(e){switch(e){case 9:case 32:return!0}return!1}function y(e){if(e>=8192&&e<=8202)return!0;switch(e){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}function v(e){return F.test(e)}function b(e){switch(e){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}}function x(e){return e.trim().replace(/\s+/g," ").toUpperCase()}var E=Object.prototype.hasOwnProperty,C=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,D=/&([a-z#][a-z0-9]{1,31});/gi,w=new RegExp(C.source+"|"+D.source,"gi"),S=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,k=n(259),_=/[&<>"]/,A=/[&<>"]/g,T={"&":"&","<":"<",">":">",'"':"""},O=/[.?*+^$[\]\\(){}|-]/g,F=n(261);t.lib={},t.lib.mdurl=n(87),t.lib.ucmicro=n(524),t.assign=a,t.isString=i,t.has=o,t.unescapeMd=p,t.unescapeAll=f,t.isValidEntityCode=u,t.fromCodePoint=c,t.escapeHtml=h,t.arrayReplaceAt=s,t.isSpace=g,t.isWhiteSpace=y,t.isMdAsciiPunct=b,t.isPunctChar=v,t.escapeRE=m,t.normalizeReference=x},function(e,t,n){"use strict";function r(e){return Object.prototype.toString.call(e)}function i(e){return"[object String]"===r(e)}function o(e,t){return E.call(e,t)}function a(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){if(t){if("object"!==typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e}function s(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function u(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!==(65535&e)&&65534!==(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function c(e){if(e>65535){e-=65536;var t=55296+(e>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function l(e,t){var n=0;return o(k,t)?k[t]:35===t.charCodeAt(0)&&S.test(t)&&(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10),u(n))?c(n):e}function p(e){return e.indexOf("\\")<0?e:e.replace(C,"$1")}function f(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(w,function(e,t,n){return t||l(e,n)})}function d(e){return T[e]}function h(e){return _.test(e)?e.replace(A,d):e}function m(e){return e.replace(O,"\\$&")}function g(e){switch(e){case 9:case 32:return!0}return!1}function y(e){if(e>=8192&&e<=8202)return!0;switch(e){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}function v(e){return F.test(e)}function b(e){switch(e){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}}function x(e){return e.trim().replace(/\s+/g," ").toUpperCase()}var E=Object.prototype.hasOwnProperty,C=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,D=/&([a-z#][a-z0-9]{1,31});/gi,w=new RegExp(C.source+"|"+D.source,"gi"),S=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,k=n(294),_=/[&<>"]/,A=/[&<>"]/g,T={"&":"&","<":"<",">":">",'"':"""},O=/[.?*+^$[\]\\(){}|-]/g,F=n(136);t.lib={},t.lib.mdurl=n(87),t.lib.ucmicro=n(630),t.assign=a,t.isString=i,t.has=o,t.unescapeMd=p,t.unescapeAll=f,t.isValidEntityCode=u,t.fromCodePoint=c,t.escapeHtml=h,t.arrayReplaceAt=s,t.isSpace=g,t.isWhiteSpace=y,t.isMdAsciiPunct=b,t.isPunctChar=v,t.escapeRE=m,t.normalizeReference=x},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){return e instanceof j||e instanceof R||e instanceof B||e instanceof $||e instanceof U||e instanceof z||e instanceof G||e instanceof q}function a(e){return o(e)||(0,F.default)(0,"Expected "+String(e)+" to be a GraphQL type."),e}function s(e){return e instanceof j||e instanceof U||e instanceof z||e instanceof q&&s(e.ofType)||e instanceof G&&s(e.ofType)}function u(e){return s(e)||(0,F.default)(0,"Expected "+String(e)+" to be a GraphQL input type."),e}function c(e){return e instanceof j||e instanceof R||e instanceof B||e instanceof $||e instanceof U||e instanceof q&&c(e.ofType)||e instanceof G&&c(e.ofType)}function l(e){return c(e)||(0,F.default)(0,"Expected "+String(e)+" to be a GraphQL output type."),e}function p(e){return e instanceof j||e instanceof U}function f(e){return p(e)||(0,F.default)(0,"Expected "+String(e)+" to be a GraphQL leaf type."),e}function d(e){return e instanceof R||e instanceof B||e instanceof $}function h(e){return d(e)||(0,F.default)(0,"Expected "+String(e)+" to be a GraphQL composite type."),e}function m(e){return e instanceof B||e instanceof $}function g(e){return m(e)||(0,F.default)(0,"Expected "+String(e)+" to be a GraphQL abstract type."),e}function y(e){return e instanceof q?e.ofType:e}function v(e){return e instanceof j||e instanceof R||e instanceof B||e instanceof $||e instanceof U||e instanceof z}function b(e){return v(e)||(0,F.default)(0,"Expected "+String(e)+" to be a GraphQL named type."),e}function x(e){if(e){for(var t=e;t instanceof G||t instanceof q;)t=t.ofType;return t}}function E(e){return"function"===typeof e?e():e}function C(e,t){var n=E(t);if(!n)return[];Array.isArray(n)||(0,F.default)(0,e.name+" interfaces must be an Array or a function which returns an Array.");var r=Object.create(null);return n.forEach(function(t){t instanceof B||(0,F.default)(0,e.name+" may only implement Interface types, it cannot implement: "+String(t)+"."),r[t.name]&&(0,F.default)(0,e.name+" may declare it implements "+t.name+" only once."),r[t.name]=!0,"function"!==typeof t.resolveType&&"function"!==typeof e.isTypeOf&&(0,F.default)(0,"Interface Type "+t.name+' does not provide a "resolveType" function and implementing Type '+e.name+' does not provide a "isTypeOf" function. There is no way to resolve this implementing type during execution.')}),n}function D(e,t){var n=E(t);w(n)||(0,F.default)(0,e.name+" fields must be an object with field names as keys or a function which returns such an object.");var r=Object.keys(n);r.length>0||(0,F.default)(0,e.name+" fields must be an object with field names as keys or a function which returns such an object.");var i=Object.create(null);return r.forEach(function(t){(0,M.assertValidName)(t);var r=n[t];w(r)||(0,F.default)(0,e.name+"."+t+" field config must be an object"),r.hasOwnProperty("isDeprecated")&&(0,F.default)(0,e.name+"."+t+' should provide "deprecationReason" instead of "isDeprecated".');var o=T({},r,{isDeprecated:Boolean(r.deprecationReason),name:t});c(o.type)||(0,F.default)(0,e.name+"."+t+" field type must be Output Type but got: "+String(o.type)+"."),S(o.resolve)||(0,F.default)(0,e.name+"."+t+" field resolver must be a function if provided, but got: "+String(o.resolve)+".");var a=r.args;a?(w(a)||(0,F.default)(0,e.name+"."+t+" args must be an object with argument names as keys."),o.args=Object.keys(a).map(function(n){(0,M.assertValidName)(n);var r=a[n];return s(r.type)||(0,F.default)(0,e.name+"."+t+"("+n+":) argument type must be Input Type but got: "+String(r.type)+"."),{name:n,description:void 0===r.description?null:r.description,type:r.type,defaultValue:r.defaultValue,astNode:r.astNode}})):o.args=[],i[t]=o}),i}function w(e){return e&&"object"===("undefined"===typeof e?"undefined":A(e))&&!Array.isArray(e)}function S(e){return null==e||"function"===typeof e}function k(e,t){var n=E(t);Array.isArray(n)&&n.length>0||(0,F.default)(0,"Must provide Array of types or a function which returns such an array for Union "+e.name+".");var r=Object.create(null);return n.forEach(function(t){t instanceof R||(0,F.default)(0,e.name+" may only contain Object types, it cannot contain: "+String(t)+"."),r[t.name]&&(0,F.default)(0,e.name+" can include "+t.name+" type only once."),r[t.name]=!0,"function"!==typeof e.resolveType&&"function"!==typeof t.isTypeOf&&(0,F.default)(0,'Union type "'+e.name+'" does not provide a "resolveType" function and possible type "'+t.name+'" does not provide an "isTypeOf" function. There is no way to resolve this possible type during execution.')}),n}function _(e,t){w(t)||(0,F.default)(0,e.name+" values must be an object with value names as keys.");var n=Object.keys(t);return n.length>0||(0,F.default)(0,e.name+" values must be an object with value names as keys."),n.map(function(n){(0,M.assertValidName)(n),-1!==["true","false","null"].indexOf(n)&&(0,F.default)(0,'Name "'+n+'" can not be used as an Enum value.');var r=t[n];return w(r)||(0,F.default)(0,e.name+"."+n+' must refer to an object with a "value" key representing an internal value but got: '+String(r)+"."),r.hasOwnProperty("isDeprecated")&&(0,F.default)(0,e.name+"."+n+' should provide "deprecationReason" instead of "isDeprecated".'),{name:n,description:r.description,isDeprecated:Boolean(r.deprecationReason),deprecationReason:r.deprecationReason,astNode:r.astNode,value:r.hasOwnProperty("value")?r.value:n}})}Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLNonNull=t.GraphQLList=t.GraphQLInputObjectType=t.GraphQLEnumType=t.GraphQLUnionType=t.GraphQLInterfaceType=t.GraphQLObjectType=t.GraphQLScalarType=void 0;var A="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T=Object.assign||function(e){for(var t=1;t0||(0,F.default)(0,this.name+" fields must be an object with field names as keys or a function which returns such an object.");var r=Object.create(null);return n.forEach(function(n){(0,M.assertValidName)(n);var i=T({},t[n],{name:n});s(i.type)||(0,F.default)(0,e.name+"."+n+" field type must be Input Type but got: "+String(i.type)+"."),null!=i.resolve&&(0,F.default)(0,e.name+"."+n+" field type has a resolve property, but Input Types cannot define resolvers."),r[n]=i}),r},e.prototype.toString=function(){return this.name},e}();z.prototype.toJSON=z.prototype.inspect=z.prototype.toString;var G=t.GraphQLList=function(){function e(t){i(this,e),o(t)||(0,F.default)(0,"Can only create List of a GraphQLType but got: "+String(t)+"."),this.ofType=t}return e.prototype.toString=function(){return"["+String(this.ofType)+"]"},e}();G.prototype.toJSON=G.prototype.inspect=G.prototype.toString;var q=t.GraphQLNonNull=function(){function e(t){i(this,e),(!o(t)||t instanceof e)&&(0,F.default)(0,"Can only create NonNull of a Nullable GraphQLType but got: "+String(t)+"."),this.ofType=t}return e.prototype.toString=function(){return this.ofType.toString()+"!"},e}();q.prototype.toJSON=q.prototype.inspect=q.prototype.toString},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(470);Object.defineProperty(t,"graphql",{enumerable:!0,get:function(){return r.graphql}});var i=n(473);Object.defineProperty(t,"GraphQLSchema",{enumerable:!0,get:function(){return i.GraphQLSchema}}),Object.defineProperty(t,"GraphQLScalarType",{enumerable:!0,get:function(){return i.GraphQLScalarType}}),Object.defineProperty(t,"GraphQLObjectType",{enumerable:!0,get:function(){return i.GraphQLObjectType}}),Object.defineProperty(t,"GraphQLInterfaceType",{enumerable:!0,get:function(){return i.GraphQLInterfaceType}}),Object.defineProperty(t,"GraphQLUnionType",{enumerable:!0,get:function(){return i.GraphQLUnionType}}),Object.defineProperty(t,"GraphQLEnumType",{enumerable:!0,get:function(){return i.GraphQLEnumType}}),Object.defineProperty(t,"GraphQLInputObjectType",{enumerable:!0,get:function(){return i.GraphQLInputObjectType}}),Object.defineProperty(t,"GraphQLList",{enumerable:!0,get:function(){return i.GraphQLList}}),Object.defineProperty(t,"GraphQLNonNull",{enumerable:!0,get:function(){return i.GraphQLNonNull}}),Object.defineProperty(t,"GraphQLDirective",{enumerable:!0,get:function(){return i.GraphQLDirective}}),Object.defineProperty(t,"TypeKind",{enumerable:!0,get:function(){return i.TypeKind}}),Object.defineProperty(t,"DirectiveLocation",{enumerable:!0,get:function(){return i.DirectiveLocation}}),Object.defineProperty(t,"GraphQLInt",{enumerable:!0,get:function(){return i.GraphQLInt}}),Object.defineProperty(t,"GraphQLFloat",{enumerable:!0,get:function(){return i.GraphQLFloat}}),Object.defineProperty(t,"GraphQLString",{enumerable:!0,get:function(){return i.GraphQLString}}),Object.defineProperty(t,"GraphQLBoolean",{enumerable:!0,get:function(){return i.GraphQLBoolean}}),Object.defineProperty(t,"GraphQLID",{enumerable:!0,get:function(){return i.GraphQLID}}),Object.defineProperty(t,"specifiedDirectives",{enumerable:!0,get:function(){return i.specifiedDirectives}}),Object.defineProperty(t,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return i.GraphQLIncludeDirective}}),Object.defineProperty(t,"GraphQLSkipDirective",{enumerable:!0,get:function(){return i.GraphQLSkipDirective}}),Object.defineProperty(t,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return i.GraphQLDeprecatedDirective}}),Object.defineProperty(t,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return i.DEFAULT_DEPRECATION_REASON}}),Object.defineProperty(t,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return i.SchemaMetaFieldDef}}),Object.defineProperty(t,"TypeMetaFieldDef",{enumerable:!0,get:function(){return i.TypeMetaFieldDef}}),Object.defineProperty(t,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return i.TypeNameMetaFieldDef}}),Object.defineProperty(t,"__Schema",{enumerable:!0,get:function(){return i.__Schema}}),Object.defineProperty(t,"__Directive",{enumerable:!0,get:function(){return i.__Directive}}),Object.defineProperty(t,"__DirectiveLocation",{enumerable:!0,get:function(){return i.__DirectiveLocation}}),Object.defineProperty(t,"__Type",{enumerable:!0,get:function(){return i.__Type}}),Object.defineProperty(t,"__Field",{enumerable:!0,get:function(){return i.__Field}}),Object.defineProperty(t,"__InputValue",{enumerable:!0,get:function(){return i.__InputValue}}),Object.defineProperty(t,"__EnumValue",{enumerable:!0,get:function(){return i.__EnumValue}}),Object.defineProperty(t,"__TypeKind",{enumerable:!0,get:function(){return i.__TypeKind}}),Object.defineProperty(t,"isType",{enumerable:!0,get:function(){return i.isType}}),Object.defineProperty(t,"isInputType",{enumerable:!0,get:function(){return i.isInputType}}),Object.defineProperty(t,"isOutputType",{enumerable:!0,get:function(){return i.isOutputType}}),Object.defineProperty(t,"isLeafType",{enumerable:!0,get:function(){return i.isLeafType}}),Object.defineProperty(t,"isCompositeType",{enumerable:!0,get:function(){return i.isCompositeType}}),Object.defineProperty(t,"isAbstractType",{enumerable:!0,get:function(){return i.isAbstractType}}),Object.defineProperty(t,"isNamedType",{enumerable:!0,get:function(){return i.isNamedType}}),Object.defineProperty(t,"assertType",{enumerable:!0,get:function(){return i.assertType}}),Object.defineProperty(t,"assertInputType",{enumerable:!0,get:function(){return i.assertInputType}}),Object.defineProperty(t,"assertOutputType",{enumerable:!0,get:function(){return i.assertOutputType}}),Object.defineProperty(t,"assertLeafType",{enumerable:!0,get:function(){return i.assertLeafType}}),Object.defineProperty(t,"assertCompositeType",{enumerable:!0,get:function(){return i.assertCompositeType}}),Object.defineProperty(t,"assertAbstractType",{enumerable:!0,get:function(){return i.assertAbstractType}}),Object.defineProperty(t,"assertNamedType",{enumerable:!0,get:function(){return i.assertNamedType}}),Object.defineProperty(t,"getNullableType",{enumerable:!0,get:function(){return i.getNullableType}}),Object.defineProperty(t,"getNamedType",{enumerable:!0,get:function(){return i.getNamedType}});var o=n(474);Object.defineProperty(t,"Source",{enumerable:!0,get:function(){return o.Source}}),Object.defineProperty(t,"getLocation",{enumerable:!0,get:function(){return o.getLocation}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return o.parse}}),Object.defineProperty(t,"parseValue",{enumerable:!0,get:function(){return o.parseValue}}),Object.defineProperty(t,"parseType",{enumerable:!0,get:function(){return o.parseType}}),Object.defineProperty(t,"print",{enumerable:!0,get:function(){return o.print}}),Object.defineProperty(t,"visit",{enumerable:!0,get:function(){return o.visit}}),Object.defineProperty(t,"visitInParallel",{enumerable:!0,get:function(){return o.visitInParallel}}),Object.defineProperty(t,"visitWithTypeInfo",{enumerable:!0,get:function(){return o.visitWithTypeInfo}}),Object.defineProperty(t,"getVisitFn",{enumerable:!0,get:function(){return o.getVisitFn}}),Object.defineProperty(t,"Kind",{enumerable:!0,get:function(){return o.Kind}}),Object.defineProperty(t,"TokenKind",{enumerable:!0,get:function(){return o.TokenKind}}),Object.defineProperty(t,"BREAK",{enumerable:!0,get:function(){return o.BREAK}});var a=n(475);Object.defineProperty(t,"execute",{enumerable:!0,get:function(){return a.execute}}),Object.defineProperty(t,"defaultFieldResolver",{enumerable:!0,get:function(){return a.defaultFieldResolver}}),Object.defineProperty(t,"responsePathAsArray",{enumerable:!0,get:function(){return a.responsePathAsArray}}),Object.defineProperty(t,"getDirectiveValues",{enumerable:!0,get:function(){return a.getDirectiveValues}});var s=n(476);Object.defineProperty(t,"subscribe",{enumerable:!0,get:function(){return s.subscribe}}),Object.defineProperty(t,"createSourceEventStream",{enumerable:!0,get:function(){return s.createSourceEventStream}});var u=n(479);Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return u.validate}}),Object.defineProperty(t,"ValidationContext",{enumerable:!0,get:function(){return u.ValidationContext}}),Object.defineProperty(t,"specifiedRules",{enumerable:!0,get:function(){return u.specifiedRules}}),Object.defineProperty(t,"ArgumentsOfCorrectTypeRule",{enumerable:!0,get:function(){return u.ArgumentsOfCorrectTypeRule}}),Object.defineProperty(t,"DefaultValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return u.DefaultValuesOfCorrectTypeRule}}),Object.defineProperty(t,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return u.FieldsOnCorrectTypeRule}}),Object.defineProperty(t,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return u.FragmentsOnCompositeTypesRule}}),Object.defineProperty(t,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return u.KnownArgumentNamesRule}}),Object.defineProperty(t,"KnownDirectivesRule",{enumerable:!0,get:function(){return u.KnownDirectivesRule}}),Object.defineProperty(t,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return u.KnownFragmentNamesRule}}),Object.defineProperty(t,"KnownTypeNamesRule",{enumerable:!0,get:function(){return u.KnownTypeNamesRule}}),Object.defineProperty(t,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return u.LoneAnonymousOperationRule}}),Object.defineProperty(t,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return u.NoFragmentCyclesRule}}),Object.defineProperty(t,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return u.NoUndefinedVariablesRule}}),Object.defineProperty(t,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return u.NoUnusedFragmentsRule}}),Object.defineProperty(t,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return u.NoUnusedVariablesRule}}),Object.defineProperty(t,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return u.OverlappingFieldsCanBeMergedRule}}),Object.defineProperty(t,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return u.PossibleFragmentSpreadsRule}}),Object.defineProperty(t,"ProvidedNonNullArgumentsRule",{enumerable:!0,get:function(){return u.ProvidedNonNullArgumentsRule}}),Object.defineProperty(t,"ScalarLeafsRule",{enumerable:!0,get:function(){return u.ScalarLeafsRule}}),Object.defineProperty(t,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return u.SingleFieldSubscriptionsRule}}),Object.defineProperty(t,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return u.UniqueArgumentNamesRule}}),Object.defineProperty(t,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return u.UniqueDirectivesPerLocationRule}}),Object.defineProperty(t,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return u.UniqueFragmentNamesRule}}),Object.defineProperty(t,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return u.UniqueInputFieldNamesRule}}),Object.defineProperty(t,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return u.UniqueOperationNamesRule}}),Object.defineProperty(t,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return u.UniqueVariableNamesRule}}),Object.defineProperty(t,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return u.VariablesAreInputTypesRule}}),Object.defineProperty(t,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return u.VariablesInAllowedPositionRule}});var c=n(3);Object.defineProperty(t,"GraphQLError",{enumerable:!0,get:function(){return c.GraphQLError}}),Object.defineProperty(t,"formatError",{enumerable:!0,get:function(){return c.formatError}});var l=n(480);Object.defineProperty(t,"introspectionQuery",{enumerable:!0,get:function(){return l.introspectionQuery}}),Object.defineProperty(t,"getOperationAST",{enumerable:!0,get:function(){return l.getOperationAST}}),Object.defineProperty(t,"buildClientSchema",{enumerable:!0,get:function(){return l.buildClientSchema}}),Object.defineProperty(t,"buildASTSchema",{enumerable:!0,get:function(){return l.buildASTSchema}}),Object.defineProperty(t,"buildSchema",{enumerable:!0,get:function(){return l.buildSchema}}),Object.defineProperty(t,"extendSchema",{enumerable:!0,get:function(){return l.extendSchema}}),Object.defineProperty(t,"printSchema",{enumerable:!0,get:function(){return l.printSchema}}),Object.defineProperty(t,"printIntrospectionSchema",{enumerable:!0,get:function(){return l.printIntrospectionSchema}}),Object.defineProperty(t,"printType",{enumerable:!0,get:function(){return l.printType}}),Object.defineProperty(t,"typeFromAST",{enumerable:!0,get:function(){return l.typeFromAST}}),Object.defineProperty(t,"valueFromAST",{enumerable:!0,get:function(){return l.valueFromAST}}),Object.defineProperty(t,"astFromValue",{enumerable:!0,get:function(){return l.astFromValue}}),Object.defineProperty(t,"TypeInfo",{enumerable:!0,get:function(){return l.TypeInfo}}),Object.defineProperty(t,"isValidJSValue",{enumerable:!0,get:function(){return l.isValidJSValue}}),Object.defineProperty(t,"isValidLiteralValue",{enumerable:!0,get:function(){return l.isValidLiteralValue}}),Object.defineProperty(t,"concatAST",{enumerable:!0,get:function(){return l.concatAST}}),Object.defineProperty(t,"separateOperations",{enumerable:!0,get:function(){return l.separateOperations}}),Object.defineProperty(t,"isEqualType",{enumerable:!0,get:function(){return l.isEqualType}}),Object.defineProperty(t,"isTypeSubTypeOf",{enumerable:!0,get:function(){return l.isTypeSubTypeOf}}),Object.defineProperty(t,"doTypesOverlap",{enumerable:!0,get:function(){return l.doTypesOverlap}}),Object.defineProperty(t,"assertValidName",{enumerable:!0,get:function(){return l.assertValidName}}),Object.defineProperty(t,"findBreakingChanges",{enumerable:!0,get:function(){return l.findBreakingChanges}}),Object.defineProperty(t,"findDangerousChanges",{enumerable:!0,get:function(){return l.findDangerousChanges}}),Object.defineProperty(t,"BreakingChangeType",{enumerable:!0,get:function(){return l.BreakingChangeType}}),Object.defineProperty(t,"DangerousChangeType",{enumerable:!0,get:function(){return l.DangerousChangeType}}),Object.defineProperty(t,"findDeprecatedUsages",{enumerable:!0,get:function(){return l.findDeprecatedUsages}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(340),i=n(164),o=n(345);n.d(t,"Provider",function(){return r.b}),n.d(t,"createProvider",function(){return r.a}),n.d(t,"connectAdvanced",function(){return i.a}),n.d(t,"connect",function(){return o.a})},function(e,t,n){"use strict";function r(e,t){return e===t}function i(e,t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,i=0;i1&&void 0!==arguments[1]?arguments[1]:r,n=null,o=null;return function(){return i(t,n,arguments)||(o=e.apply(null,arguments)),n=arguments,o}}function a(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(e){return"function"===typeof e})){var n=t.map(function(e){return typeof e}).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return t}function s(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:c;if("object"!==typeof e)throw new Error("createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);var n=Object.keys(e);return t(n.map(function(t){return e[t]}),function(){for(var e=arguments.length,t=Array(e),r=0;r>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?a(e)+t:t}function u(){return!0}function c(e,t,n){return(0===e&&!d(e)||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function l(e,t){return f(e,t,0)}function p(e,t){return f(e,t,t)}function f(e,t,n){return void 0===e?n:d(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function d(e){return e<0||0===e&&1/e===-1/0}function h(e){return m(e)||x(e)}function m(e){return!(!e||!e[hn])}function g(e){return!(!e||!e[mn])}function y(e){return!(!e||!e[gn])}function v(e){return g(e)||y(e)}function b(e){return!(!e||!e[yn])}function x(e){return!(!e||!e[vn])}function E(e){return!(!e||"function"!==typeof e.equals||"function"!==typeof e.hashCode)}function C(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function D(){return{value:void 0,done:!0}}function w(e){return!!_(e)}function S(e){return e&&"function"===typeof e.next}function k(e){var t=_(e);return t&&t.call(e)}function _(e){var t=e&&(kn&&e[kn]||e[_n]);if("function"===typeof t)return t}function A(e){return e&&"number"===typeof e.length}function T(e){return!(!e||!e[Ln])}function O(){return Rn||(Rn=new Mn([]))}function F(e){var t=Array.isArray(e)?new Mn(e):S(e)?new Un(e):w(e)?new $n(e):void 0;if(t)return t.fromEntrySeq();if("object"===typeof e)return new jn(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function N(e){var t=P(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function I(e){var t=P(e);if(t)return t;if("object"===typeof e)return new jn(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}function P(e){return A(e)?new Mn(e):S(e)?new Un(e):w(e)?new $n(e):void 0}function L(e,t){if(e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1;if("function"===typeof e.valueOf&&"function"===typeof t.valueOf){if(e=e.valueOf(),t=t.valueOf(),e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1}return!!(E(e)&&E(t)&&e.equals(t))}function M(e){return e>>>1&1073741824|3221225471&e}function j(e){if(!1===e||null===e||void 0===e)return 0;if("function"===typeof e.valueOf&&(!1===(e=e.valueOf())||null===e||void 0===e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!==e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)e/=4294967295,n^=e;return M(n)}if("string"===t)return e.length>Qn?R(e):B(e);if("function"===typeof e.hashCode)return M(e.hashCode());if("object"===t)return $(e);if("function"===typeof e.toString)return B(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function R(e){var t=Yn[e];return void 0===t&&(t=B(e),Jn===Kn&&(Jn=0,Yn={}),Jn++,Yn[e]=t),t}function B(e){for(var t=0,n=0;n0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}function z(e){var t=ue(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=ce,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(t===Sn){var r=e.__iterator(t,n);return new Tn(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===wn?Dn:wn,n)},t}function G(e,t,n){var r=ue(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,pn);return o===pn?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate(function(e,i,a){return!1!==r(t.call(n,e,i,a),i,o)},i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(Sn,i);return new Tn(function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return C(r,s,t.call(n,a[1],s,e),i)})},r}function q(e,t){var n=this,r=ue(e);return r._iter=e,r.size=e.size,r.reverse=function(){return e},e.flip&&(r.flip=function(){var t=z(e);return t.reverse=function(){return e.flip()},t}),r.get=function(n,r){return e.get(t?n:-1-n,r)},r.has=function(n){return e.has(t?n:-1-n)},r.includes=function(t){return e.includes(t)},r.cacheResult=ce,r.__iterate=function(n,r){var i=this,o=0;return r&&a(e),e.__iterate(function(e,a){return n(e,t?a:r?i.size-++o:o++,i)},!r)},r.__iterator=function(r,i){var o=0;i&&a(e);var s=e.__iterator(Sn,!i);return new Tn(function(){var e=s.next();if(e.done)return e;var a=e.value;return C(r,t?a[0]:i?n.size-++o:o++,a[1],e)})},r}function V(e,t,n,r){var i=ue(e);return r&&(i.has=function(r){var i=e.get(r,pn);return i!==pn&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,pn);return o!==pn&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return e.__iterate(function(e,o,u){if(t.call(n,e,o,u))return s++,i(e,r?o:s-1,a)},o),s},i.__iteratorUncached=function(i,o){var a=e.__iterator(Sn,o),s=0;return new Tn(function(){for(;;){var o=a.next();if(o.done)return o;var u=o.value,c=u[0],l=u[1];if(t.call(n,l,c,e))return C(i,r?c:s++,l,o)}})},i}function H(e,t,n){var r=nr().asMutable();return e.__iterate(function(i,o){r.update(t.call(n,i,o,e),0,function(e){return e+1})}),r.asImmutable()}function W(e,t,n){var r=g(e),i=(b(e)?Er():nr()).asMutable();e.__iterate(function(o,a){i.update(t.call(n,o,a,e),function(e){return e=e||[],e.push(r?[a,o]:o),e})});var o=se(e);return i.map(function(t){return oe(e,o(t))})}function Q(e,t,n,r){var i=e.size;if(c(t,n,i))return e;var o=l(t,i),a=p(n,i);if(o!==o||a!==a)return Q(e.toSeq().cacheResult(),t,n,r);var u,f=a-o;f===f&&(u=f<0?0:f);var d=ue(e);return d.size=0===u?u:e.size&&u||void 0,!r&&T(e)&&u>=0&&(d.get=function(t,n){return t=s(this,t),t>=0&&tu)return D();var e=i.next();return r||t===wn||e.done?e:t===Dn?C(t,s-1,void 0,e):C(t,s-1,e.value[1],e)})},d}function K(e,t,n){var r=ue(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate(function(e,i,s){return t.call(n,e,i,s)&&++a&&r(e,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(Sn,i),s=!0;return new Tn(function(){if(!s)return D();var e=a.next();if(e.done)return e;var i=e.value,u=i[0],c=i[1];return t.call(n,c,u,o)?r===Sn?e:C(r,u,c,e):(s=!1,D())})},r}function J(e,t,n,r){var i=ue(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return e.__iterate(function(e,o,c){if(!s||!(s=t.call(n,e,o,c)))return u++,i(e,r?o:u-1,a)}),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(Sn,o),u=!0,c=0;return new Tn(function(){var e,o,l;do{if(e=s.next(),e.done)return r||i===wn?e:i===Dn?C(i,c++,void 0,e):C(i,c++,e.value[1],e);var p=e.value;o=p[0],l=p[1],u&&(u=t.call(n,l,o,a))}while(u);return i===Sn?e:C(i,o,l,e)})},i}function Y(e,t){var n=g(e),r=[e].concat(t).map(function(e){return m(e)?n&&(e=xn(e)):e=n?F(e):N(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===r.length)return e;if(1===r.length){var i=r[0];if(i===e||n&&g(i)||y(e)&&y(i))return i}var o=new Mn(r);return n?o=o.toKeyedSeq():y(e)||(o=o.toSetSeq()),o=o.flatten(!0),o.size=r.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),o}function X(e,t,n){var r=ue(e);return r.__iterateUncached=function(i,o){function a(e,c){e.__iterate(function(e,o){return(!t||c0}function ie(e,t,n,r){var i=ue(e),o=new Mn(n).map(function(e){return e.size});return i.size=r?o.max():o.min(),i.__iterate=function(e,t){for(var n,r=this,i=this.__iterator(wn,t),o=0;!(n=i.next()).done&&!1!==e(n.value,o++,r););return o},i.__iteratorUncached=function(e,i){var o=n.map(function(e){return e=bn(e),k(i?e.reverse():e)}),a=0,s=!1;return new Tn(function(){var n;return s||(n=o.map(function(e){return e.next()}),s=r?n.every(function(e){return e.done}):n.some(function(e){return e.done})),s?D():C(e,a++,t.apply(null,n.map(function(e){return e.value})))})},i}function oe(e,t){return e===t?e:T(e)?t:e.constructor(t)}function ae(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function se(e){return g(e)?xn:y(e)?En:Cn}function ue(e){return Object.create((g(e)?Nn:y(e)?In:Pn).prototype)}function ce(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Fn.prototype.cacheResult.call(this)}function le(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:e>t?1:e0;)t[n]=arguments[n+1];return Pe(this,t,e)}function Pe(e,t,n){for(var r=[],i=0;i0;)t[n]=arguments[n+1];return $e(e,t)}function Me(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return $e(t,n,e)}function je(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Be(e,t)}function Re(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return Be(t,n,e)}function Be(e,t,n){return $e(e,t,Ue(n))}function $e(e,t,n){if(!ge(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(h(e))return e.mergeWith?e.mergeWith.apply(e,[n].concat(t)):e.concat.apply(e,t);for(var r=Array.isArray(e),i=e,o=r?En:xn,a=r?function(t){i===e&&(i=xe(i)),i.push(t)}:function(t,r){var o=On.call(i,r),a=o&&n?n(i[r],t,r):t;o&&a===i[r]||(i===e&&(i=xe(i)),i[r]=a)},s=0;s0;)t[n]=arguments[n+1];return Be(this,t,e)}function qe(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return De(this,e,et(),function(e){return $e(e,t)})}function Ve(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return De(this,e,et(),function(e){return Be(e,t)})}function He(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function We(){return this.__ownerID?this:this.__ensureOwner(new o)}function Qe(){return this.__ensureOwner()}function Ke(){return this.__altered}function Je(e){return!(!e||!e[rr])}function Ye(e,t){return C(e,t[0],t[1])}function Xe(e,t){return{node:e,index:0,__prev:t}}function Ze(e,t,n,r){var i=Object.create(ir);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function et(){return lr||(lr=Ze(0))}function tt(e,t,n){var i,o;if(e._root){var a=r(fn),s=r(dn);if(i=nt(e._root,e.__ownerID,0,void 0,t,n,a,s),!s.value)return e;o=e.size+(a.value?n===pn?-1:1:0)}else{if(n===pn)return e;o=1,i=new or(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=i,e.__hash=void 0,e.__altered=!0,e):i?Ze(o,i):et()}function nt(e,t,n,r,o,a,s,u){return e?e.update(t,n,r,o,a,s,u):a===pn?e:(i(u),i(s),new cr(t,r,[o,a]))}function rt(e){return e.constructor===cr||e.constructor===ur}function it(e,t,n,r,i){if(e.keyHash===r)return new ur(t,r,[e.entry,i]);var o,a=(0===n?e.keyHash:e.keyHash>>>n)&ln,s=(0===n?r:r>>>n)&ln,u=a===s?[it(e,t,n+un,r,i)]:(o=new cr(t,r,i),a>>=1)a[s]=1&n?t[o++]:void 0;return a[r]=i,new sr(e,o+1,a)}function ut(e){return e-=e>>1&1431655765,e=(858993459&e)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function ct(e,t,n,r){var i=r?e:pe(e);return i[t]=n,i}function lt(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,s=0;so?0:o-n,c=a-n;return c>cn&&(c=cn),function(){if(i===c)return xr;var e=t?--c:i++;return r&&r[e]}}function i(e,r,i){var s,u=e&&e.array,c=i>o?0:o-i>>r,l=1+(a-i>>r);return l>cn&&(l=cn),function(){for(;;){if(s){var e=s();if(e!==xr)return e;s=null}if(c===l)return xr;var o=t?--l:c++;s=n(u&&u[o],r-un,i+(o<=e.size||t<0)return e.withMutations(function(e){t<0?xt(e,t).set(0,n):xt(e,0,t+1).set(t,n)});t+=e._origin;var i=e._tail,o=e._root,a=r(dn);return t>=Et(e._capacity)?i=yt(i,e.__ownerID,0,t,n,a):o=yt(o,e.__ownerID,e._level,t,n,a),a.value?e.__ownerID?(e._root=o,e._tail=i,e.__hash=void 0,e.__altered=!0,e):ht(e._origin,e._capacity,e._level,o,i):e}function yt(e,t,n,r,o,a){var s=r>>>n&ln,u=e&&s0){var l=e&&e.array[s],p=yt(l,t,n-un,r,o,a);return p===l?e:(c=vt(e,t),c.array[s]=p,c)}return u&&e.array[s]===o?e:(i(a),c=vt(e,t),void 0===o&&s===c.array.length-1?c.array.pop():c.array[s]=o,c)}function vt(e,t){return t&&e&&t===e.ownerID?e:new vr(e?e.array.slice():[],t)}function bt(e,t){if(t>=Et(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&ln],r-=un;return n}}function xt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new o,i=e._origin,a=e._capacity,s=i+t,u=void 0===n?a:n<0?a+n:i+n;if(s===i&&u===a)return e;if(s>=u)return e.clear();for(var c=e._level,l=e._root,p=0;s+p<0;)l=new vr(l&&l.array.length?[void 0,l]:[],r),c+=un,p+=1<=1<f?new vr([],r):h;if(h&&d>f&&sun;y-=un){var v=f>>>y&ln;g=g.array[v]=vt(g.array[v],r)}g.array[f>>>un&ln]=h}if(u=d)s-=d,u-=d,c=un,l=null,m=m&&m.removeBefore(r,0,s);else if(s>i||d>>c&ln;if(b!==d>>>c&ln)break;b&&(p+=(1<i&&(l=l.removeBefore(r,c,s-p)),l&&d>>un<=cn&&a.size>=2*o.size?(i=a.filter(function(e,t){return void 0!==e&&s!==t}),r=i.toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(n===a.get(s)[1])return e;r=o,i=a.set(s,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):Dt(r,i)}function kt(e){return!(!e||!e[wr])}function _t(e,t,n,r){var i=Object.create(Sr);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function At(){return kr||(kr=_t(0))}function Tt(e,t){if(e===t)return!0;if(!m(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||g(e)!==g(t)||y(e)!==y(t)||b(e)!==b(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!v(e);if(b(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&L(i[1],e)&&(n||L(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"===typeof e.cacheResult&&e.cacheResult();else{i=!0;var o=e;e=t,t=o}var a=!0,s=t.__iterate(function(t,r){if(n?!e.has(t):i?!L(t,e.get(r,pn)):!L(e.get(r,pn),t))return a=!1,!1});return a&&e.size===s}function Ot(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}function Ft(e){return ge(e)?Fn(e).map(Ft).toJSON():e}function Nt(e){return!(!e||!e[Ar])}function It(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function Pt(e,t){var n=Object.create(Tr);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Lt(){return Or||(Or=Pt(et()))}function Mt(e,t,n){for(var r=he(t),i=0;i!==r.length;)if((e=be(e,r[i++],pn))===pn)return n;return e}function jt(e,t){return Mt(this,e,t)}function Rt(e,t){return Mt(e,t,pn)!==pn}function Bt(e){return Rt(this,e)}function $t(){de(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e}function Ut(e,t,n,r,i,o){return de(e.size),e.__iterate(function(e,o,a){i?(i=!1,n=e):n=t.call(r,n,e,o,a)},o),n}function zt(e,t){return t}function Gt(e,t){return[t,e]}function qt(e){return function(){return!e.apply(this,arguments)}}function Vt(e){return function(){return-e.apply(this,arguments)}}function Ht(){return pe(arguments)}function Wt(e,t){return et?-1:0}function Qt(e){if(e.size===1/0)return 0;var t=b(e),n=g(e),r=t?1:0;return Kt(e.__iterate(n?t?function(e,t){r=31*r+Jt(j(e),j(t))|0}:function(e,t){r=r+Jt(j(e),j(t))|0}:t?function(e){r=31*r+j(e)|0}:function(e){r=r+j(e)|0}),r)}function Kt(e,t){return t=zn(t,3432918353),t=zn(t<<15|t>>>-15,461845907),t=zn(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=zn(t^t>>>16,2246822507),t=zn(t^t>>>13,3266489909),t=M(t^t>>>16)}function Jt(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}function Yt(e){return Nt(e)&&b(e)}function Xt(e,t){var n=Object.create(jr);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Zt(){return Rr||(Rr=Xt(wt()))}function en(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._values=t,r.__ownerID=n,r}function tn(e){return e._name||e.constructor.name||"Record"}function nn(e){return F(e._keys.map(function(t){return[t,e.get(t)]}))}function rn(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){fe(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}catch(e){}}function on(e,t){return an([],t||sn,e,"",t&&t.length>2?[]:void 0,{"":e})}function an(e,t,n,r,i,o){var a=Array.isArray(n)?In:me(n)?Nn:null;if(a){if(~e.indexOf(n))throw new TypeError("Cannot convert circular structure to Immutable");e.push(n),i&&""!==r&&i.push(r);var s=t.call(o,r,a(n).map(function(r,o){return an(e,t,r,o,i,n)}),i&&i.slice());return e.pop(),i&&i.pop(),s}return n}function sn(e,t){return g(t)?t.toMap():t.toList()}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"version",function(){return Gr}),n.d(t,"Collection",function(){return bn}),n.d(t,"Iterable",function(){return Vr}),n.d(t,"Seq",function(){return Fn}),n.d(t,"Map",function(){return nr}),n.d(t,"OrderedMap",function(){return Er}),n.d(t,"List",function(){return mr}),n.d(t,"Stack",function(){return Dr}),n.d(t,"Set",function(){return _r}),n.d(t,"OrderedSet",function(){return Mr}),n.d(t,"Record",function(){return Br}),n.d(t,"Range",function(){return Nr}),n.d(t,"Repeat",function(){return zr}),n.d(t,"is",function(){return L}),n.d(t,"fromJS",function(){return on}),n.d(t,"hash",function(){return j}),n.d(t,"isImmutable",function(){return h}),n.d(t,"isCollection",function(){return m}),n.d(t,"isKeyed",function(){return g}),n.d(t,"isIndexed",function(){return y}),n.d(t,"isAssociative",function(){return v}),n.d(t,"isOrdered",function(){return b}),n.d(t,"isValueObject",function(){return E}),n.d(t,"get",function(){return be}),n.d(t,"getIn",function(){return Mt}),n.d(t,"has",function(){return ve}),n.d(t,"hasIn",function(){return Rt}),n.d(t,"merge",function(){return Le}),n.d(t,"mergeDeep",function(){return je}),n.d(t,"mergeWith",function(){return Me}),n.d(t,"mergeDeepWith",function(){return Re}),n.d(t,"remove",function(){return Ee}),n.d(t,"removeIn",function(){return _e}),n.d(t,"set",function(){return Ce}),n.d(t,"setIn",function(){return Se}),n.d(t,"update",function(){return Te}),n.d(t,"updateIn",function(){return De});var un=5,cn=1<=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return C(e,i,r[i++])})},t}(In),zn="function"===typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){e|=0,t|=0;var n=65535&e,r=65535&t;return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0},Gn=Object.isExtensible,qn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}(),Vn="function"===typeof WeakMap;Vn&&(Bn=new WeakMap);var Hn=0,Wn="__immutablehash__";"function"===typeof Symbol&&(Wn=Symbol(Wn));var Qn=16,Kn=255,Jn=0,Yn={},Xn=function(e){function t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this._iter.get(e,t)},t.prototype.has=function(e){return this._iter.has(e)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var e=this,t=q(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},t.prototype.map=function(e,t){var n=this,r=G(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t,r){return e(t,r,n)},t)},t.prototype.__iterator=function(e,t){return this._iter.__iterator(e,t)},t}(Nn);Xn.prototype[yn]=!0;var Zn=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.includes=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this,r=0;return t&&a(this),this._iter.__iterate(function(i){return e(i,t?n.size-++r:r++,n)},t)},t.prototype.__iterator=function(e,t){var n=this,r=this._iter.__iterator(wn,t),i=0;return t&&a(this),new Tn(function(){var o=r.next();return o.done?o:C(e,t?n.size-++i:i++,o.value,o)})},t}(In),er=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.has=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(wn,t);return new Tn(function(){var t=n.next();return t.done?t:C(e,t.value,t.value,t)})},t}(Pn),tr=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){ae(t);var r=m(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(wn,t);return new Tn(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){ae(r);var i=m(r);return C(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},t}(Nn);Zn.prototype.cacheResult=Xn.prototype.cacheResult=er.prototype.cacheResult=tr.prototype.cacheResult=ce;var nr=function(e){function t(t){return null===t||void 0===t?et():Je(t)&&!b(t)?t:et().withMutations(function(n){var r=e(t);de(r.size),r.forEach(function(e,t){return n.set(t,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return et().withMutations(function(t){for(var n=0;n=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}})},t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return tt(this,e,t)},t.prototype.remove=function(e){return tt(this,e,pn)},t.prototype.deleteAll=function(e){var t=bn(e);return 0===t.size?this:this.withMutations(function(e){t.forEach(function(t){return e.remove(t)})})},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):et()},t.prototype.sort=function(e){return Er(te(this,e))},t.prototype.sortBy=function(e,t){return Er(te(this,t,e))},t.prototype.__iterator=function(e,t){return new pr(this,e,t)},t.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Ze(this.size,this._root,e,this.__hash):0===this.size?et():(this.__ownerID=e,this.__altered=!1,this)},t}(xn);nr.isMap=Je;var rr="@@__IMMUTABLE_MAP__@@",ir=nr.prototype;ir[rr]=!0,ir.delete=ir.remove,ir.removeAll=ir.deleteAll,ir.concat=ir.merge,ir.setIn=ke,ir.removeIn=ir.deleteIn=Ae,ir.update=Oe,ir.updateIn=Fe,ir.merge=Ne,ir.mergeWith=Ie,ir.mergeDeep=ze,ir.mergeDeepWith=Ge,ir.mergeIn=qe,ir.mergeDeepIn=Ve,ir.withMutations=He,ir.wasAltered=Ke,ir.asImmutable=Qe,ir["@@transducer/init"]=ir.asMutable=We,ir["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},ir["@@transducer/result"]=function(e){return e.asImmutable()};var or=function(e,t){this.ownerID=e,this.entries=t};or.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o=fr)return ot(e,c,r,o);var d=e&&e===this.ownerID,h=d?c:pe(c);return f?u?l===p-1?h.pop():h[l]=h.pop():h[l]=[r,o]:h.push([r,o]),d?(this.entries=h,this):new or(e,h)}};var ar=function(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n};ar.prototype.get=function(e,t,n,r){void 0===t&&(t=j(n));var i=1<<((0===e?t:t>>>e)&ln),o=this.bitmap;return 0===(o&i)?r:this.nodes[ut(o&i-1)].get(e+un,t,n,r)},ar.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=j(r));var s=(0===t?n:n>>>t)&ln,u=1<=dr)return st(e,f,c,s,h);if(l&&!h&&2===f.length&&rt(f[1^p]))return f[1^p];if(l&&h&&1===f.length&&rt(h))return h;var m=e&&e===this.ownerID,g=l?h?c:c^u:c|u,y=l?h?ct(f,p,h,m):pt(f,p,m):lt(f,p,h,m);return m?(this.bitmap=g,this.nodes=y,this):new ar(e,g,y)};var sr=function(e,t,n){this.ownerID=e,this.count=t,this.nodes=n};sr.prototype.get=function(e,t,n,r){void 0===t&&(t=j(n));var i=(0===e?t:t>>>e)&ln,o=this.nodes[i];return o?o.get(e+un,t,n,r):r},sr.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=j(r));var s=(0===t?n:n>>>t)&ln,u=i===pn,c=this.nodes,l=c[s];if(u&&!l)return this;var p=nt(l,e,t+un,n,r,i,o,a);if(p===l)return this;var f=this.count;if(l){if(!p&&--f0&&i=0&&e>>t&ln;if(r>=this.array.length)return new vr([],e);var i,o=0===r;if(t>0){var a=this.array[r];if((i=a&&a.removeBefore(e,t-un,n))===a&&o)return this}if(o&&!i)return this;var s=vt(this,e);if(!o)for(var u=0;u>>t&ln;if(r>=this.array.length)return this;var i;if(t>0){var o=this.array[r];if((i=o&&o.removeAfter(e,t-un,n))===o&&r===this.array.length-1)return this}var a=vt(this,e);return a.array.splice(r+1),i&&(a.array[r]=i),a};var br,xr={},Er=function(e){function t(e){return null===e||void 0===e?wt():Ct(e)?e:wt().withMutations(function(t){var n=xn(e);de(n.size),n.forEach(function(e,n){return t.set(n,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):wt()},t.prototype.set=function(e,t){return St(this,e,t)},t.prototype.remove=function(e){return St(this,e,pn)},t.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},t.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Dt(t,n,e,this.__hash):0===this.size?wt():(this.__ownerID=e,this._map=t,this._list=n,this)},t}(nr);Er.isOrderedMap=Ct,Er.prototype[yn]=!0,Er.prototype.delete=Er.prototype.remove;var Cr,Dr=function(e){function t(e){return null===e||void 0===e?At():kt(e)?e:At().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(e,t){var n=this._head;for(e=s(this,e);n&&e--;)n=n.next;return n?n.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,n=this._head,r=arguments.length-1;r>=0;r--)n={value:e[r],next:n};return this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):_t(t,n)},t.prototype.pushAll=function(t){if(t=e(t),0===t.size)return this;if(0===this.size&&kt(t))return t;de(t.size);var n=this.size,r=this._head;return t.__iterate(function(e){n++,r={value:e,next:r}},!0),this.__ownerID?(this.size=n,this._head=r,this.__hash=void 0,this.__altered=!0,this):_t(n,r)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):At()},t.prototype.slice=function(t,n){if(c(t,n,this.size))return this;var r=l(t,this.size);if(p(n,this.size)!==this.size)return e.prototype.slice.call(this,t,n);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):_t(i,o)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?_t(this.size,this._head,e,this.__hash):0===this.size?At():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var n=this;if(t)return new Mn(this.toArray()).__iterate(function(t,r){return e(t,r,n)},t);for(var r=0,i=this._head;i&&!1!==e(i.value,r++,n);)i=i.next;return r},t.prototype.__iterator=function(e,t){if(t)return new Mn(this.toArray()).__iterator(e,t);var n=0,r=this._head;return new Tn(function(){if(r){var t=r.value;return r=r.next,C(e,n++,t)}return D()})},t}(En);Dr.isStack=kt;var wr="@@__IMMUTABLE_STACK__@@",Sr=Dr.prototype;Sr[wr]=!0,Sr.shift=Sr.pop,Sr.unshift=Sr.push,Sr.unshiftAll=Sr.pushAll,Sr.withMutations=He,Sr.wasAltered=Ke,Sr.asImmutable=Qe,Sr["@@transducer/init"]=Sr.asMutable=We,Sr["@@transducer/step"]=function(e,t){return e.unshift(t)},Sr["@@transducer/result"]=function(e){return e.asImmutable()};var kr,_r=function(e){function t(t){return null===t||void 0===t?Lt():Nt(t)&&!b(t)?t:Lt().withMutations(function(n){var r=e(t);de(r.size),r.forEach(function(e){return n.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(xn(e).keySeq())},t.intersect=function(e){return e=bn(e).toArray(),e.length?Tr.intersect.apply(t(e.pop()),e):Lt()},t.union=function(e){return e=bn(e).toArray(),e.length?Tr.union.apply(t(e.pop()),e):Lt()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return It(this,this._map.set(e,e))},t.prototype.remove=function(e){return It(this,this._map.remove(e))},t.prototype.clear=function(){return It(this,this._map.clear())},t.prototype.union=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return t=t.filter(function(e){return 0!==e.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(n){for(var r=0;r=0&&t=0&&nthis.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return(e=s(this,e))>=0&&(void 0!==this.size?this.size===1/0||e=0&&e.splice(n,1)}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=d({},e),n=new Promise(function(e,n){t.resolve=e,t.reject=n});return t.promise=n,t}function s(e){for(var t=[],n=0;n1&&void 0!==arguments[1])||arguments[1],n=void 0,r=new Promise(function(r){n=setTimeout(function(){return r(t)},e)});return r[b]=function(){return clearTimeout(n)},r}function c(){var e,t=!0,n=void 0,r=void 0;return e={},e[g]=!0,e.isRunning=function(){return t},e.result=function(){return n},e.error=function(){return r},e.setRunning=function(e){return t=e},e.setResult=function(e){return n=e},e.setError=function(e){return r=e},e}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:F,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments[3],i={name:n,next:e,throw:t,return:N};return r&&(i[y]=!0),"undefined"!==typeof Symbol&&(i[Symbol.iterator]=function(){return i}),i}function p(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";"undefined"===typeof window?console.log("redux-saga "+e+": "+t+"\n"+(n&&n.stack||n)):console[e](t,n)}function f(e,t){return function(){return e.apply(void 0,arguments)}}n.d(t,"x",function(){return m}),n.d(t,"e",function(){return g}),n.d(t,"b",function(){return v}),n.d(t,"a",function(){return b}),n.d(t,"c",function(){return x}),n.d(t,"d",function(){return E}),n.d(t,"r",function(){return D}),n.d(t,"u",function(){return w}),n.d(t,"o",function(){return S}),t.h=r,n.d(t,"q",function(){return _}),n.d(t,"v",function(){return A}),t.w=o,n.d(t,"f",function(){return T}),t.l=a,t.g=s,t.m=u,t.j=c,n.d(t,"y",function(){return O}),t.t=l,t.s=p,t.n=f,n.d(t,"z",function(){return I}),n.d(t,"p",function(){return P}),n.d(t,"k",function(){return L}),n.d(t,"A",function(){return M}),n.d(t,"i",function(){return j});var d=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:0;return function(){return++e}}(),F=function(e){throw e},N=function(e){return{value:e,done:!0}},I=function(e,t){return e+" has been deprecated in favor of "+t+", please update your code"},P=function(e){return new Error("\n redux-saga: Error checking hooks detected an inconsistent state. This is likely a bug\n in redux-saga code and not yours. Thanks for reporting this in the project's github repo.\n Error: "+e+"\n")},L=function(e,t){return(e?e+".":"")+"setContext(props): argument "+t+" is not a plain object"},M=function(e){return function(t){return e(Object.defineProperty(t,x,{value:!0}))}},j=function e(t){return function(){for(var n=arguments.length,r=Array(n),i=0;i if provided but got: "+String(t.directives)+"."),this._directives=t.directives||c.specifiedDirectives,this.astNode=t.astNode||null;var r=[this.getQueryType(),this.getMutationType(),this.getSubscriptionType(),l.__Schema],p=t.types;p&&(r=r.concat(p)),this._typeMap=r.reduce(o,Object.create(null)),this._implementations=Object.create(null),Object.keys(this._typeMap).forEach(function(e){var t=n._typeMap[e];t instanceof u.GraphQLObjectType&&t.getInterfaces().forEach(function(e){var r=n._implementations[e.name];r?r.push(t):n._implementations[e.name]=[t]})}),Object.keys(this._typeMap).forEach(function(e){var t=n._typeMap[e];t instanceof u.GraphQLObjectType&&t.getInterfaces().forEach(function(e){return a(n,t,e)})})}return e.prototype.getQueryType=function(){return this._queryType},e.prototype.getMutationType=function(){return this._mutationType},e.prototype.getSubscriptionType=function(){return this._subscriptionType},e.prototype.getTypeMap=function(){return this._typeMap},e.prototype.getType=function(e){return this.getTypeMap()[e]},e.prototype.getPossibleTypes=function(e){return e instanceof u.GraphQLUnionType?e.getTypes():(e instanceof u.GraphQLInterfaceType||(0,h.default)(0),this._implementations[e.name])},e.prototype.isPossibleType=function(e,t){var n=this._possibleTypeMap;if(n||(this._possibleTypeMap=n=Object.create(null)),!n[e.name]){var r=this.getPossibleTypes(e);Array.isArray(r)||(0,h.default)(0,"Could not find possible implementing types for "+e.name+" in schema. Check that schema.types is defined and is an array of all possible types in the schema."),n[e.name]=r.reduce(function(e,t){return e[t.name]=!0,e},Object.create(null))}return Boolean(n[e.name][t.name])},e.prototype.getDirectives=function(){return this._directives},e.prototype.getDirective=function(e){return(0,f.default)(this.getDirectives(),function(t){return t.name===e})},e}()},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.specifiedDirectives=t.GraphQLDeprecatedDirective=t.DEFAULT_DEPRECATION_REASON=t.GraphQLSkipDirective=t.GraphQLIncludeDirective=t.GraphQLDirective=t.DirectiveLocation=void 0;var i=n(6),o=n(31),a=n(13),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=n(121),c=t.DirectiveLocation={QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"},l=t.GraphQLDirective=function e(t){r(this,e),t.name||(0,s.default)(0,"Directive must be named."),(0,u.assertValidName)(t.name),Array.isArray(t.locations)||(0,s.default)(0,"Must provide locations for directive."),this.name=t.name,this.description=t.description,this.locations=t.locations,this.astNode=t.astNode;var n=t.args;n?(Array.isArray(n)&&(0,s.default)(0,"@"+t.name+" args must be an object with argument names as keys."),this.args=Object.keys(n).map(function(e){(0,u.assertValidName)(e);var r=n[e];return(0,i.isInputType)(r.type)||(0,s.default)(0,"@"+t.name+"("+e+":) argument type must be Input Type but got: "+String(r.type)+"."),{name:e,description:void 0===r.description?null:r.description,type:r.type,defaultValue:r.defaultValue,astNode:r.astNode}})):this.args=[]},p=t.GraphQLIncludeDirective=new l({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[c.FIELD,c.FRAGMENT_SPREAD,c.INLINE_FRAGMENT],args:{if:{type:new i.GraphQLNonNull(o.GraphQLBoolean),description:"Included when true."}}}),f=t.GraphQLSkipDirective=new l({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[c.FIELD,c.FRAGMENT_SPREAD,c.INLINE_FRAGMENT],args:{if:{type:new i.GraphQLNonNull(o.GraphQLBoolean),description:"Skipped when true."}}}),d=t.DEFAULT_DEPRECATION_REASON="No longer supported",h=t.GraphQLDeprecatedDirective=new l({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[c.FIELD_DEFINITION,c.ENUM_VALUE],args:{reason:{type:o.GraphQLString,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https://daringfireball.net/projects/markdown/).",defaultValue:d}}});t.specifiedDirectives=[p,f,h]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeNameMetaFieldDef=t.TypeMetaFieldDef=t.SchemaMetaFieldDef=t.__TypeKind=t.TypeKind=t.__EnumValue=t.__InputValue=t.__Field=t.__Type=t.__DirectiveLocation=t.__Directive=t.__Schema=void 0;var r=n(62),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=n(122),a=n(18),s=n(6),u=n(31),c=n(27),l=t.__Schema=new s.GraphQLObjectType({name:"__Schema",isIntrospection:!0,description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:function(){return{types:{description:"A list of all types supported by this server.",type:new s.GraphQLNonNull(new s.GraphQLList(new s.GraphQLNonNull(d))),resolve:function(e){var t=e.getTypeMap();return Object.keys(t).map(function(e){return t[e]})}},queryType:{description:"The type that query operations will be rooted at.",type:new s.GraphQLNonNull(d),resolve:function(e){return e.getQueryType()}},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:d,resolve:function(e){return e.getMutationType()}},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:d,resolve:function(e){return e.getSubscriptionType()}},directives:{description:"A list of all directives supported by this server.",type:new s.GraphQLNonNull(new s.GraphQLList(new s.GraphQLNonNull(p))),resolve:function(e){return e.getDirectives()}}}}}),p=t.__Directive=new s.GraphQLObjectType({name:"__Directive",isIntrospection:!0,description:"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",fields:function(){return{name:{type:new s.GraphQLNonNull(u.GraphQLString)},description:{type:u.GraphQLString},locations:{type:new s.GraphQLNonNull(new s.GraphQLList(new s.GraphQLNonNull(f)))},args:{type:new s.GraphQLNonNull(new s.GraphQLList(new s.GraphQLNonNull(m))),resolve:function(e){return e.args||[]}},onOperation:{deprecationReason:"Use `locations`.",type:new s.GraphQLNonNull(u.GraphQLBoolean),resolve:function(e){return-1!==e.locations.indexOf(c.DirectiveLocation.QUERY)||-1!==e.locations.indexOf(c.DirectiveLocation.MUTATION)||-1!==e.locations.indexOf(c.DirectiveLocation.SUBSCRIPTION)}},onFragment:{deprecationReason:"Use `locations`.",type:new s.GraphQLNonNull(u.GraphQLBoolean),resolve:function(e){return-1!==e.locations.indexOf(c.DirectiveLocation.FRAGMENT_SPREAD)||-1!==e.locations.indexOf(c.DirectiveLocation.INLINE_FRAGMENT)||-1!==e.locations.indexOf(c.DirectiveLocation.FRAGMENT_DEFINITION)}},onField:{deprecationReason:"Use `locations`.",type:new s.GraphQLNonNull(u.GraphQLBoolean),resolve:function(e){return-1!==e.locations.indexOf(c.DirectiveLocation.FIELD)}}}}}),f=t.__DirectiveLocation=new s.GraphQLEnumType({name:"__DirectiveLocation",isIntrospection:!0,description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:c.DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:c.DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:c.DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:c.DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:c.DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:c.DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:c.DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},SCHEMA:{value:c.DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:c.DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:c.DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:c.DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:c.DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:c.DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:c.DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:c.DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:c.DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:c.DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:c.DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),d=t.__Type=new s.GraphQLObjectType({name:"__Type",isIntrospection:!0,description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:function(){return{kind:{type:new s.GraphQLNonNull(v),resolve:function(e){if(e instanceof s.GraphQLScalarType)return y.SCALAR;if(e instanceof s.GraphQLObjectType)return y.OBJECT;if(e instanceof s.GraphQLInterfaceType)return y.INTERFACE;if(e instanceof s.GraphQLUnionType)return y.UNION;if(e instanceof s.GraphQLEnumType)return y.ENUM;if(e instanceof s.GraphQLInputObjectType)return y.INPUT_OBJECT;if(e instanceof s.GraphQLList)return y.LIST;if(e instanceof s.GraphQLNonNull)return y.NON_NULL;throw new Error("Unknown kind of type: "+e)}},name:{type:u.GraphQLString},description:{type:u.GraphQLString},fields:{type:new s.GraphQLList(new s.GraphQLNonNull(h)),args:{includeDeprecated:{type:u.GraphQLBoolean,defaultValue:!1}},resolve:function(e,t){var n=t.includeDeprecated;if(e instanceof s.GraphQLObjectType||e instanceof s.GraphQLInterfaceType){var r=e.getFields(),i=Object.keys(r).map(function(e){return r[e]});return n||(i=i.filter(function(e){return!e.deprecationReason})),i}return null}},interfaces:{type:new s.GraphQLList(new s.GraphQLNonNull(d)),resolve:function(e){if(e instanceof s.GraphQLObjectType)return e.getInterfaces()}},possibleTypes:{type:new s.GraphQLList(new s.GraphQLNonNull(d)),resolve:function(e,t,n,r){var i=r.schema;if((0,s.isAbstractType)(e))return i.getPossibleTypes(e)}},enumValues:{type:new s.GraphQLList(new s.GraphQLNonNull(g)),args:{includeDeprecated:{type:u.GraphQLBoolean,defaultValue:!1}},resolve:function(e,t){var n=t.includeDeprecated;if(e instanceof s.GraphQLEnumType){var r=e.getValues();return n||(r=r.filter(function(e){return!e.deprecationReason})),r}}},inputFields:{type:new s.GraphQLList(new s.GraphQLNonNull(m)),resolve:function(e){if(e instanceof s.GraphQLInputObjectType){var t=e.getFields();return Object.keys(t).map(function(e){return t[e]})}}},ofType:{type:d}}}}),h=t.__Field=new s.GraphQLObjectType({name:"__Field",isIntrospection:!0,description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:function(){return{name:{type:new s.GraphQLNonNull(u.GraphQLString)},description:{type:u.GraphQLString},args:{type:new s.GraphQLNonNull(new s.GraphQLList(new s.GraphQLNonNull(m))),resolve:function(e){return e.args||[]}},type:{type:new s.GraphQLNonNull(d)},isDeprecated:{type:new s.GraphQLNonNull(u.GraphQLBoolean)},deprecationReason:{type:u.GraphQLString}}}}),m=t.__InputValue=new s.GraphQLObjectType({name:"__InputValue",isIntrospection:!0,description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:function(){return{name:{type:new s.GraphQLNonNull(u.GraphQLString)},description:{type:u.GraphQLString},type:{type:new s.GraphQLNonNull(d)},defaultValue:{type:u.GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve:function(e){return(0,i.default)(e.defaultValue)?null:(0,a.print)((0,o.astFromValue)(e.defaultValue,e.type))}}}}}),g=t.__EnumValue=new s.GraphQLObjectType({name:"__EnumValue",isIntrospection:!0,description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:function(){return{name:{type:new s.GraphQLNonNull(u.GraphQLString)},description:{type:u.GraphQLString},isDeprecated:{type:new s.GraphQLNonNull(u.GraphQLBoolean)},deprecationReason:{type:u.GraphQLString}}}}),y=t.TypeKind={SCALAR:"SCALAR",OBJECT:"OBJECT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",INPUT_OBJECT:"INPUT_OBJECT",LIST:"LIST",NON_NULL:"NON_NULL"},v=t.__TypeKind=new s.GraphQLEnumType({name:"__TypeKind",isIntrospection:!0,description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:y.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:y.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:y.INTERFACE,description:"Indicates this type is an interface. `fields` and `possibleTypes` are valid fields."},UNION:{value:y.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:y.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:y.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:y.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:y.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}});t.SchemaMetaFieldDef={name:"__schema",type:new s.GraphQLNonNull(l),description:"Access the current type schema of this server.",args:[],resolve:function(e,t,n,r){return r.schema}},t.TypeMetaFieldDef={name:"__type",type:d,description:"Request the type information of a single type.",args:[{name:"name",type:new s.GraphQLNonNull(u.GraphQLString)}],resolve:function(e,t,n,r){var i=t.name;return r.schema.getType(i)}},t.TypeNameMetaFieldDef={name:"__typename",type:new s.GraphQLNonNull(u.GraphQLString),description:"The name of the current Object type at runtime.",args:[],resolve:function(e,t,n,r){return r.parentType.name}}},function(e,t,n){"use strict";function r(e,t){var n=void 0;return t.kind===s.LIST_TYPE?(n=c(e,t.type))&&new u.GraphQLList(n):t.kind===s.NON_NULL_TYPE?(n=c(e,t.type))&&new u.GraphQLNonNull(n):(t.kind!==s.NAMED_TYPE&&(0,o.default)(0,"Must be a named type."),e.getType(t.name.value))}Object.defineProperty(t,"__esModule",{value:!0}),t.typeFromAST=void 0;var i=n(13),o=function(e){return e&&e.__esModule?e:{default:e}}(i),a=n(11),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(a),u=n(6),c=t.typeFromAST=r},function(e,t,n){"use strict";function r(e){return null!=e&&"object"==typeof e}t.a=r},function(e,t,n){"use strict";function r(e){if(""===e)throw new TypeError("Int cannot represent non 32-bit signed integer value: (empty string)");var t=Number(e);if(t!==t||t>c||t=l)return t}return null}}),t.GraphQLFloat=new a.GraphQLScalarType({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point). ",serialize:i,parseValue:i,parseLiteral:function(e){return e.kind===u.FLOAT||e.kind===u.INT?parseFloat(e.value):null}}),t.GraphQLString=new a.GraphQLScalarType({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize:o,parseValue:o,parseLiteral:function(e){return e.kind===u.STRING?e.value:null}}),t.GraphQLBoolean=new a.GraphQLScalarType({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:Boolean,parseValue:Boolean,parseLiteral:function(e){return e.kind===u.BOOLEAN?e.value:null}}),t.GraphQLID=new a.GraphQLScalarType({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize:String,parseValue:String,parseLiteral:function(e){return e.kind===u.STRING||e.kind===u.INT?e.value:null}})},function(e,t,n){"use strict";function r(e){return null==e?void 0===e?u:s:c&&c in Object(e)?Object(o.a)(e):Object(a.a)(e)}var i=n(106),o=n(362),a=n(363),s="[object Null]",u="[object Undefined]",c=i.a?i.a.toStringTag:void 0;t.a=r},function(e,t,n){"use strict";function r(e){return{id:i(),query:t.defaultQuery,variables:"",responses:a.List([]),endpoint:e,operationName:void 0,hasMutation:!1,hasSubscription:!1,hasQuery:!1,queryTypes:o.getQueryTypes(t.defaultQuery),subscriptionActive:!1,date:new Date,starred:!1,queryRunning:!1,operations:a.List([]),isReloadingSchema:!1,isSchemaPendingUpdate:!1,responseExtensions:{},queryVariablesActive:!1,endpointUnreachable:!1,editorFlex:1,variableEditorOpen:!1,variableEditorHeight:200,responseTracingOpen:!1,responseTracingHeight:300,docExplorerWidth:350,variableToType:a.Map({}),headers:"",file:void 0,isFile:!1,name:void 0,filePath:void 0,selectedUserToken:void 0,hasChanged:void 0,absolutePath:void 0,isSettingsTab:void 0,isConfigTab:void 0,currentQueryStartTime:void 0,currentQueryEndTime:void 0,nextQueryStartTime:void 0,tracingSupported:void 0,changed:void 0,scrollTop:void 0}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(60),o=n(210),a=n(14);t.columnWidth=300,t.introspectionQuery="\n query IntrospectionQuery {\n __schema {\n queryType { name }\n mutationType { name }\n subscriptionType { name }\n types {\n ...FullType\n }\n directives {\n name\n description\n locations\n args {\n ...InputValue\n }\n }\n }\n }\n\n fragment FullType on __Type {\n kind\n name\n description\n fields(includeDeprecated: true) {\n name\n description\n args {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n description\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n }\n\n fragment InputValue on __InputValue {\n name\n description\n type { ...TypeRef }\n defaultValue\n }\n\n fragment TypeRef on __Type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n }\n }\n",t.defaultQuery="# Write your query or mutation here\n",t.modalStyle={overlay:{zIndex:99999,backgroundColor:"rgba(15,32,46,.9)",display:"flex",alignItems:"center",justifyContent:"center"},content:{position:"relative",width:976,height:"auto",top:"initial",left:"initial",right:"initial",bottom:"initial",borderRadius:2,padding:0,border:"none",background:"none",boxShadow:"0 1px 7px rgba(0,0,0,.2)"}},t.getDefaultSession=r},function(e,t,n){"use strict";function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*";if(arguments.length&&Object(w.h)(arguments[0],w.q.notUndef,"take(patternOrChannel): patternOrChannel is undefined"),w.q.pattern(e))return G(_,{pattern:e});if(w.q.channel(e))return G(_,{channel:e});throw new Error("take(patternOrChannel): argument "+String(e)+" is not valid channel or a valid pattern")}function i(e,t){return arguments.length>1?(Object(w.h)(e,w.q.notUndef,"put(channel, action): argument channel is undefined"),Object(w.h)(e,w.q.channel,"put(channel, action): argument "+e+" is not a valid channel"),Object(w.h)(t,w.q.notUndef,"put(channel, action): argument action is undefined")):(Object(w.h)(e,w.q.notUndef,"put(action): argument action is undefined"),t=e,e=null),G(A,{channel:e,action:t})}function o(e){return G(T,e)}function a(e){return G(O,e)}function s(e,t,n){Object(w.h)(t,w.q.notUndef,e+": argument fn is undefined");var r=null;if(w.q.array(t)){var i=t;r=i[0],t=i[1]}else if(t.fn){var o=t;r=o.context,t=o.fn}return r&&w.q.string(t)&&w.q.func(r[t])&&(t=r[t]),Object(w.h)(t,w.q.func,e+": argument "+t+" is not a function"),{context:r,fn:t,args:n}}function u(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:[];return G(F,s("apply",{context:e,fn:t},n))}function l(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1)return o(t.map(function(e){return d(e)}));var r=t[0];return Object(w.h)(r,w.q.notUndef,"join(task): argument task is undefined"),Object(w.h)(r,w.q.task,"join(task): argument "+r+" is not a valid Task object "+z),G(P,r)}function h(){for(var e=arguments.length,t=Array(e),n=0;n1)return o(t.map(function(e){return h(e)}));var r=t[0];return 1===t.length&&(Object(w.h)(r,w.q.notUndef,"cancel(task): argument task is undefined"),Object(w.h)(r,w.q.task,"cancel(task): argument "+r+" is not a valid Task object "+z)),G(L,r||w.d)}function m(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1&&(Object(w.h)(t,w.q.notUndef,"actionChannel(pattern, buffer): argument buffer is undefined"),Object(w.h)(t,w.q.buffer,"actionChannel(pattern, buffer): argument "+t+" is not a valid buffer")),G(j,{pattern:e,buffer:t})}function y(){return G(R,{})}function v(e){return Object(w.h)(e,w.q.channel,"flush(channel): argument "+e+" is not valid channel"),G(B,e)}function b(e){return Object(w.h)(e,w.q.string,"getContext(prop): argument "+e+" is not a string"),G($,e)}function x(e){return Object(w.h)(e,w.q.object,Object(w.k)(null,e)),G(U,e)}function E(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i2?n-2:0),i=2;i3?r-3:0),o=3;o